From 17650523a8195096147b55832abe617ba0079c3f Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 Jan 2020 16:27:43 -0600 Subject: [PATCH] build: remove unneeded style code for ngClass and ngStyle (#34998) With the release of Flex Layout v9.0.0-beta.28, some added code after the recent styling refactor is no longer needed. PR Close #34998 --- packages/common/src/directives/ng_class.ts | 7 ------- packages/common/src/directives/ng_style.ts | 6 ------ packages/common/src/private_export.ts | 8 +------- tools/public_api_guard/common/common.d.ts | 5 ----- 4 files changed, 1 insertion(+), 25 deletions(-) diff --git a/packages/common/src/directives/ng_class.ts b/packages/common/src/directives/ng_class.ts index 382d871fc1..63ddbe198e 100644 --- a/packages/common/src/directives/ng_class.ts +++ b/packages/common/src/directives/ng_class.ts @@ -157,11 +157,4 @@ export class NgClass implements DoCheck { }); } } - - // TODO(misko): Delete this code after angula/flex-layout stops depending on private APIs - // We need to export this to make angular/flex-layout happy - // https://github.com/angular/flex-layout/blob/ec7b57eb6adf59ecfdfff1de5ccf1ab2f6652ed3/src/lib/extended/class/class.ts#L9 - setClass(value: string) { this.klass = value; } - setNgClass(value: any) { this.ngClass = value; } - applyChanges() { this.ngDoCheck(); } } diff --git a/packages/common/src/directives/ng_style.ts b/packages/common/src/directives/ng_style.ts index 52d4dc45d7..73dab1a154 100644 --- a/packages/common/src/directives/ng_style.ts +++ b/packages/common/src/directives/ng_style.ts @@ -85,10 +85,4 @@ export class NgStyle implements DoCheck { changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue)); changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue)); } - - // TODO(misko): Delete this code after angula/flex-layout stops depending on private APIs - // We need to export this to make angular/flex-layout happy - // https://github.com/angular/flex-layout/blob/ec7b57eb6adf59ecfdfff1de5ccf1ab2f6652ed3/src/lib/extended/class/class.ts#L9 - setNgStyle(value: any) { this.ngStyle = value; } - applyChanges() { this.ngDoCheck(); } } diff --git a/packages/common/src/private_export.ts b/packages/common/src/private_export.ts index 8e07f8a780..a18c76694d 100644 --- a/packages/common/src/private_export.ts +++ b/packages/common/src/private_export.ts @@ -6,11 +6,5 @@ * found in the LICENSE file at https://angular.io/license */ -// TODO(misko): Delete this code after angula/flex-layout stops depending on private APIs -// We need to export this to make angular/flex-layout happy -// https://github.com/angular/flex-layout/blob/ec7b57eb6adf59ecfdfff1de5ccf1ab2f6652ed3/src/lib/extended/class/class.ts#L9 -export {NgClass as ɵNgClassImpl, NgClass as ɵNgClassR2Impl} from './directives/ng_class'; -export {NgStyle as ɵNgStyleR2Impl} from './directives/ng_style'; - export {DomAdapter as ɵDomAdapter, getDOM as ɵgetDOM, setRootDomAdapter as ɵsetRootDomAdapter} from './dom_adapter'; -export {BrowserPlatformLocation as ɵBrowserPlatformLocation} from './location/platform_location'; \ No newline at end of file +export {BrowserPlatformLocation as ɵBrowserPlatformLocation} from './location/platform_location'; diff --git a/tools/public_api_guard/common/common.d.ts b/tools/public_api_guard/common/common.d.ts index 72468bdc91..84ade8d7aa 100644 --- a/tools/public_api_guard/common/common.d.ts +++ b/tools/public_api_guard/common/common.d.ts @@ -195,10 +195,7 @@ export declare class NgClass implements DoCheck { [klass: string]: any; }); constructor(_iterableDiffers: IterableDiffers, _keyValueDiffers: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer2); - applyChanges(): void; ngDoCheck(): void; - setClass(value: string): void; - setNgClass(value: any): void; } export declare class NgComponentOutlet implements OnChanges, OnDestroy { @@ -273,9 +270,7 @@ export declare class NgStyle implements DoCheck { [klass: string]: any; } | null); constructor(_ngEl: ElementRef, _differs: KeyValueDiffers, _renderer: Renderer2); - applyChanges(): void; ngDoCheck(): void; - setNgStyle(value: any): void; } export declare class NgSwitch {