@angular/platform-browser 15.2.0-rc.0 → 15.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.2.0-rc.0
2
+ * @license Angular v15.2.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -205,15 +205,15 @@ const platformBrowserTesting = createPlatformFactory(platformCore, 'browserTesti
205
205
  */
206
206
  class BrowserTestingModule {
207
207
  }
208
- BrowserTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: BrowserTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
209
- BrowserTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.0-rc.0", ngImport: i0, type: BrowserTestingModule, exports: [BrowserModule] });
210
- BrowserTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: BrowserTestingModule, providers: [
208
+ BrowserTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: BrowserTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
209
+ BrowserTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.1", ngImport: i0, type: BrowserTestingModule, exports: [BrowserModule] });
210
+ BrowserTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: BrowserTestingModule, providers: [
211
211
  { provide: APP_ID, useValue: 'a' },
212
212
  { provide: NgZone, useFactory: createNgZone },
213
213
  (ENABLE_MOCK_PLATFORM_LOCATION ? [{ provide: PlatformLocation, useClass: MockPlatformLocation }] :
214
214
  []),
215
215
  ], imports: [BrowserModule] });
216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: BrowserTestingModule, decorators: [{
216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.1", ngImport: i0, type: BrowserTestingModule, decorators: [{
217
217
  type: NgModule,
218
218
  args: [{
219
219
  exports: [BrowserModule],
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.2.0-rc.0
2
+ * @license Angular v15.2.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -628,6 +628,15 @@ export declare const platformBrowser: (extraProviders?: StaticProvider[]) => Pla
628
628
  */
629
629
  export declare function provideProtractorTestingSupport(): Provider[];
630
630
 
631
+ /**
632
+ * A [DI token](guide/glossary#di-token "DI token definition") that indicates whether styles
633
+ * of destroyed components should be removed from DOM.
634
+ *
635
+ * By default, the value is set to `false`. This will be changed in the next major version.
636
+ * @publicApi
637
+ */
638
+ export declare const REMOVE_STYLES_ON_COMPONENT_DESTROY: InjectionToken<boolean>;
639
+
631
640
  /**
632
641
  * Marker interface for a value that's safe to use as HTML.
633
642
  *
@@ -739,6 +748,7 @@ export declare class Title {
739
748
  export declare class TransferState {
740
749
  private store;
741
750
  private onSerializeCallbacks;
751
+ constructor();
742
752
  /**
743
753
  * Get the value corresponding to a key. Return `defaultValue` if key is not found.
744
754
  */
@@ -814,14 +824,17 @@ export declare class ɵDomEventsPlugin extends EventManagerPlugin {
814
824
  static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomEventsPlugin>;
815
825
  }
816
826
 
817
- export declare class ɵDomRendererFactory2 implements RendererFactory2 {
827
+ export declare class ɵDomRendererFactory2 implements RendererFactory2, OnDestroy {
818
828
  private eventManager;
819
829
  private sharedStylesHost;
820
830
  private appId;
831
+ private removeStylesOnCompDestory;
821
832
  private rendererByCompId;
822
833
  private defaultRenderer;
823
- constructor(eventManager: EventManager, sharedStylesHost: ɵDomSharedStylesHost, appId: string);
834
+ constructor(eventManager: EventManager, sharedStylesHost: ɵDomSharedStylesHost, appId: string, removeStylesOnCompDestory: boolean);
824
835
  createRenderer(element: any, type: RendererType2 | null): Renderer2;
836
+ private getOrCreateRenderer;
837
+ ngOnDestroy(): void;
825
838
  begin(): void;
826
839
  end(): void;
827
840
  static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomRendererFactory2, never>;
@@ -842,14 +855,17 @@ export declare class ɵDomSanitizerImpl extends DomSanitizer {
842
855
  }
843
856
 
844
857
  export declare class ɵDomSharedStylesHost extends ɵSharedStylesHost implements OnDestroy {
845
- private _doc;
846
- private _hostNodes;
847
- constructor(_doc: any);
848
- private _addStylesToHost;
858
+ private readonly doc;
859
+ private readonly styleRef;
860
+ private hostNodes;
861
+ constructor(doc: any);
862
+ onStyleAdded(style: string): void;
863
+ onStyleRemoved(style: string): void;
864
+ ngOnDestroy(): void;
849
865
  addHost(hostNode: Node): void;
850
866
  removeHost(hostNode: Node): void;
851
- onStylesAdded(additions: Set<string>): void;
852
- ngOnDestroy(): void;
867
+ private addStyleToHost;
868
+ private resetHostNodes;
853
869
  static ɵfac: i0.ɵɵFactoryDeclaration<ɵDomSharedStylesHost, never>;
854
870
  static ɵprov: i0.ɵɵInjectableDeclaration<ɵDomSharedStylesHost>;
855
871
  }
@@ -947,10 +963,15 @@ export declare const ɵNAMESPACE_URIS: {
947
963
  [ns: string]: string;
948
964
  };
949
965
 
950
- export declare class ɵSharedStylesHost {
966
+ export declare class ɵSharedStylesHost implements OnDestroy {
967
+ private readonly usageCount;
951
968
  addStyles(styles: string[]): void;
952
- onStylesAdded(additions: Set<string>): void;
953
- getAllStyles(): string[];
969
+ removeStyles(styles: string[]): void;
970
+ onStyleRemoved(style: string): void;
971
+ onStyleAdded(style: string): void;
972
+ getAllStyles(): IterableIterator<string>;
973
+ private changeUsageCount;
974
+ ngOnDestroy(): void;
954
975
  static ɵfac: i0.ɵɵFactoryDeclaration<ɵSharedStylesHost, never>;
955
976
  static ɵprov: i0.ɵɵInjectableDeclaration<ɵSharedStylesHost>;
956
977
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/platform-browser",
3
- "version": "15.2.0-rc.0",
3
+ "version": "15.2.1",
4
4
  "description": "Angular - library for using Angular in a web browser",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -11,9 +11,9 @@
11
11
  "tslib": "^2.3.0"
12
12
  },
13
13
  "peerDependencies": {
14
- "@angular/animations": "15.2.0-rc.0",
15
- "@angular/core": "15.2.0-rc.0",
16
- "@angular/common": "15.2.0-rc.0"
14
+ "@angular/animations": "15.2.1",
15
+ "@angular/core": "15.2.1",
16
+ "@angular/common": "15.2.1"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "@angular/animations": {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.2.0-rc.0
2
+ * @license Angular v15.2.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */