@angular/platform-browser 17.0.0-next.7 → 17.0.0-next.8

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 v17.0.0-next.7
2
+ * @license Angular v17.0.0-next.8
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -162,10 +162,10 @@ class BrowserXhr {
162
162
  build() {
163
163
  return new XMLHttpRequest();
164
164
  }
165
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
166
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: BrowserXhr }); }
165
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
166
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: BrowserXhr }); }
167
167
  }
168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: BrowserXhr, decorators: [{
168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: BrowserXhr, decorators: [{
169
169
  type: Injectable
170
170
  }] });
171
171
 
@@ -227,10 +227,10 @@ class EventManager {
227
227
  this._eventNameToPlugin.set(eventName, plugin);
228
228
  return plugin;
229
229
  }
230
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: EventManager, deps: [{ token: EVENT_MANAGER_PLUGINS }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
231
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: EventManager }); }
230
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: EventManager, deps: [{ token: EVENT_MANAGER_PLUGINS }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
231
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: EventManager }); }
232
232
  }
233
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: EventManager, decorators: [{
233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: EventManager, decorators: [{
234
234
  type: Injectable
235
235
  }], ctorParameters: () => [{ type: undefined, decorators: [{
236
236
  type: Inject,
@@ -305,6 +305,9 @@ class SharedStylesHost {
305
305
  }
306
306
  removeHost(hostNode) {
307
307
  this.hostNodes.delete(hostNode);
308
+ for (const { elements } of this.styleRef.values()) {
309
+ elements.delete(hostNode);
310
+ }
308
311
  }
309
312
  getAllStyles() {
310
313
  return this.styleRef.keys();
@@ -335,10 +338,14 @@ class SharedStylesHost {
335
338
  return styleRefValue.usage;
336
339
  }
337
340
  const usage = nonNegativeNumber(delta);
338
- map.set(style, { usage, elements: [] });
341
+ map.set(style, { usage, elements: new Map() });
339
342
  return usage;
340
343
  }
341
- getStyleElement(host, style) {
344
+ getStyleElement(host, style, existingStyleElements) {
345
+ const existingStyleElement = existingStyleElements?.get(host);
346
+ if (existingStyleElement) {
347
+ return existingStyleElement;
348
+ }
342
349
  const styleNodesInDOM = this.styleNodesInDOM;
343
350
  const styleEl = styleNodesInDOM?.get(style);
344
351
  if (styleEl?.parentNode === host) {
@@ -364,22 +371,17 @@ class SharedStylesHost {
364
371
  }
365
372
  }
366
373
  addStyleToHost(host, style) {
367
- const styleEl = this.getStyleElement(host, style);
368
- host.appendChild(styleEl);
369
374
  const styleRef = this.styleRef;
370
- const styleResult = styleRef.get(style);
371
- if (styleResult) {
372
- if (styleResult.usage === 0) {
373
- disableStylesheet(styleEl);
374
- }
375
- else {
376
- enableStylesheet(styleEl);
377
- }
378
- styleResult.elements.push(styleEl);
375
+ const styleResult = styleRef.get(style); // This will always be defined in `changeUsageCount`
376
+ const styleEl = this.getStyleElement(host, style, styleResult.elements);
377
+ host.appendChild(styleEl);
378
+ if (styleResult.usage === 0) {
379
+ disableStylesheet(styleEl);
379
380
  }
380
381
  else {
381
- styleRef.set(style, { elements: [styleEl], usage: 1 });
382
+ enableStylesheet(styleEl);
382
383
  }
384
+ styleResult.elements.set(host, styleEl);
383
385
  }
384
386
  resetHostNodes() {
385
387
  const hostNodes = this.hostNodes;
@@ -387,10 +389,10 @@ class SharedStylesHost {
387
389
  // Re-add the head element back since this is the default host.
388
390
  hostNodes.add(this.doc.head);
389
391
  }
390
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: SharedStylesHost, deps: [{ token: DOCUMENT }, { token: APP_ID }, { token: CSP_NONCE, optional: true }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
391
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: SharedStylesHost }); }
392
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: SharedStylesHost, deps: [{ token: DOCUMENT }, { token: APP_ID }, { token: CSP_NONCE, optional: true }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
393
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: SharedStylesHost }); }
392
394
  }
393
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: SharedStylesHost, decorators: [{
395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: SharedStylesHost, decorators: [{
394
396
  type: Injectable
395
397
  }], ctorParameters: () => [{ type: Document, decorators: [{
396
398
  type: Inject,
@@ -526,10 +528,10 @@ class DomRendererFactory2 {
526
528
  ngOnDestroy() {
527
529
  this.rendererByCompId.clear();
528
530
  }
529
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: DomRendererFactory2, deps: [{ token: EventManager }, { token: SharedStylesHost }, { token: APP_ID }, { token: REMOVE_STYLES_ON_COMPONENT_DESTROY }, { token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: CSP_NONCE }], target: i0.ɵɵFactoryTarget.Injectable }); }
530
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: DomRendererFactory2 }); }
531
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomRendererFactory2, deps: [{ token: EventManager }, { token: SharedStylesHost }, { token: APP_ID }, { token: REMOVE_STYLES_ON_COMPONENT_DESTROY }, { token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: CSP_NONCE }], target: i0.ɵɵFactoryTarget.Injectable }); }
532
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomRendererFactory2 }); }
531
533
  }
532
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: DomRendererFactory2, decorators: [{
534
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomRendererFactory2, decorators: [{
533
535
  type: Injectable
534
536
  }], ctorParameters: () => [{ type: EventManager }, { type: SharedStylesHost }, { type: undefined, decorators: [{
535
537
  type: Inject,
@@ -811,10 +813,10 @@ class DomEventsPlugin extends EventManagerPlugin {
811
813
  removeEventListener(target, eventName, callback) {
812
814
  return target.removeEventListener(eventName, callback);
813
815
  }
814
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
815
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: DomEventsPlugin }); }
816
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
817
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomEventsPlugin }); }
816
818
  }
817
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: DomEventsPlugin, decorators: [{
819
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomEventsPlugin, decorators: [{
818
820
  type: Injectable
819
821
  }], ctorParameters: () => [{ type: undefined, decorators: [{
820
822
  type: Inject,
@@ -983,10 +985,10 @@ class KeyEventsPlugin extends EventManagerPlugin {
983
985
  static _normalizeKey(keyName) {
984
986
  return keyName === 'esc' ? 'escape' : keyName;
985
987
  }
986
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
987
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: KeyEventsPlugin }); }
988
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
989
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: KeyEventsPlugin }); }
988
990
  }
989
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: KeyEventsPlugin, decorators: [{
991
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: KeyEventsPlugin, decorators: [{
990
992
  type: Injectable
991
993
  }], ctorParameters: () => [{ type: undefined, decorators: [{
992
994
  type: Inject,
@@ -1193,11 +1195,11 @@ class BrowserModule {
1193
1195
  ],
1194
1196
  };
1195
1197
  }
1196
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: BrowserModule, deps: [{ token: BROWSER_MODULE_PROVIDERS_MARKER, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
1197
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.7", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] }); }
1198
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: BrowserModule, providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS], imports: [CommonModule, ApplicationModule] }); }
1198
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: BrowserModule, deps: [{ token: BROWSER_MODULE_PROVIDERS_MARKER, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
1199
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.8", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] }); }
1200
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: BrowserModule, providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS], imports: [CommonModule, ApplicationModule] }); }
1199
1201
  }
1200
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: BrowserModule, decorators: [{
1202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: BrowserModule, decorators: [{
1201
1203
  type: NgModule,
1202
1204
  args: [{
1203
1205
  providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS],
@@ -1367,10 +1369,10 @@ class Meta {
1367
1369
  _getMetaKeyMap(prop) {
1368
1370
  return META_KEYS_MAP[prop] || prop;
1369
1371
  }
1370
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1371
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: Meta, providedIn: 'root', useFactory: createMeta, deps: [] }); }
1372
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1373
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: Meta, providedIn: 'root', useFactory: createMeta, deps: [] }); }
1372
1374
  }
1373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: Meta, decorators: [{
1375
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: Meta, decorators: [{
1374
1376
  type: Injectable,
1375
1377
  args: [{ providedIn: 'root', useFactory: createMeta, deps: [] }]
1376
1378
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -1417,10 +1419,10 @@ class Title {
1417
1419
  setTitle(newTitle) {
1418
1420
  this._doc.title = newTitle || '';
1419
1421
  }
1420
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1421
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: Title, providedIn: 'root', useFactory: createTitle, deps: [] }); }
1422
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1423
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: Title, providedIn: 'root', useFactory: createTitle, deps: [] }); }
1422
1424
  }
1423
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: Title, decorators: [{
1425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: Title, decorators: [{
1424
1426
  type: Injectable,
1425
1427
  args: [{ providedIn: 'root', useFactory: createTitle, deps: [] }]
1426
1428
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -1689,10 +1691,10 @@ class HammerGestureConfig {
1689
1691
  }
1690
1692
  return mc;
1691
1693
  }
1692
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1693
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: HammerGestureConfig }); }
1694
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1695
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: HammerGestureConfig }); }
1694
1696
  }
1695
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: HammerGestureConfig, decorators: [{
1697
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: HammerGestureConfig, decorators: [{
1696
1698
  type: Injectable
1697
1699
  }] });
1698
1700
  /**
@@ -1787,10 +1789,10 @@ class HammerGesturesPlugin extends EventManagerPlugin {
1787
1789
  isCustomEvent(eventName) {
1788
1790
  return this._config.events.indexOf(eventName) > -1;
1789
1791
  }
1790
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: HammerGesturesPlugin, deps: [{ token: DOCUMENT }, { token: HAMMER_GESTURE_CONFIG }, { token: i0.ɵConsole }, { token: HAMMER_LOADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1791
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: HammerGesturesPlugin }); }
1792
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: HammerGesturesPlugin, deps: [{ token: DOCUMENT }, { token: HAMMER_GESTURE_CONFIG }, { token: i0.ɵConsole }, { token: HAMMER_LOADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1793
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: HammerGesturesPlugin }); }
1792
1794
  }
1793
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: HammerGesturesPlugin, decorators: [{
1795
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: HammerGesturesPlugin, decorators: [{
1794
1796
  type: Injectable
1795
1797
  }], ctorParameters: () => [{ type: undefined, decorators: [{
1796
1798
  type: Inject,
@@ -1816,9 +1818,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7",
1816
1818
  * @publicApi
1817
1819
  */
1818
1820
  class HammerModule {
1819
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1820
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.7", ngImport: i0, type: HammerModule }); }
1821
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: HammerModule, providers: [
1821
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1822
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.8", ngImport: i0, type: HammerModule }); }
1823
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: HammerModule, providers: [
1822
1824
  {
1823
1825
  provide: EVENT_MANAGER_PLUGINS,
1824
1826
  useClass: HammerGesturesPlugin,
@@ -1828,7 +1830,7 @@ class HammerModule {
1828
1830
  { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },
1829
1831
  ] }); }
1830
1832
  }
1831
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: HammerModule, decorators: [{
1833
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: HammerModule, decorators: [{
1832
1834
  type: NgModule,
1833
1835
  args: [{
1834
1836
  providers: [
@@ -1875,10 +1877,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7",
1875
1877
  * @publicApi
1876
1878
  */
1877
1879
  class DomSanitizer {
1878
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1879
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(() => DomSanitizerImpl) }); }
1880
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1881
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(() => DomSanitizerImpl) }); }
1880
1882
  }
1881
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: DomSanitizer, decorators: [{
1883
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomSanitizer, decorators: [{
1882
1884
  type: Injectable,
1883
1885
  args: [{ providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl) }]
1884
1886
  }] });
@@ -1943,10 +1945,10 @@ class DomSanitizerImpl extends DomSanitizer {
1943
1945
  bypassSecurityTrustResourceUrl(value) {
1944
1946
  return ɵbypassSanitizationTrustResourceUrl(value);
1945
1947
  }
1946
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1947
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: DomSanitizerImpl, providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [{ token: Injector }] }); }
1948
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1949
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomSanitizerImpl, providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [{ token: Injector }] }); }
1948
1950
  }
1949
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7", ngImport: i0, type: DomSanitizerImpl, decorators: [{
1951
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomSanitizerImpl, decorators: [{
1950
1952
  type: Injectable,
1951
1953
  args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [Injector] }]
1952
1954
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -1957,56 +1959,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7",
1957
1959
  /**
1958
1960
  * Helper function to create an object that represents a Hydration feature.
1959
1961
  */
1960
- function hydrationFeature(kind, providers = []) {
1961
- return { ɵkind: kind, ɵproviders: providers };
1962
+ function hydrationFeature(ɵkind, ɵproviders = [], ɵoptions = {}) {
1963
+ return { ɵkind, ɵproviders };
1962
1964
  }
1963
1965
  /**
1964
- * Disables DOM nodes reuse during hydration. Effectively makes
1965
- * Angular re-render an application from scratch on the client.
1966
- *
1967
- * When this option is enabled, make sure that the initial navigation
1968
- * option is configured for the Router as `enabledBlocking` by using the
1969
- * `withEnabledBlockingInitialNavigation` in the `provideRouter` call:
1970
- *
1971
- * ```
1972
- * bootstrapApplication(RootComponent, {
1973
- * providers: [
1974
- * provideRouter(
1975
- * // ... other features ...
1976
- * withEnabledBlockingInitialNavigation()
1977
- * ),
1978
- * provideClientHydration(withNoDomReuse())
1979
- * ]
1980
- * });
1981
- * ```
1982
- *
1983
- * This would ensure that the application is rerendered after all async
1984
- * operations in the Router (such as lazy-loading of components,
1985
- * waiting for async guards and resolvers) are completed to avoid
1986
- * clearing the DOM on the client too soon, thus causing content flicker.
1987
- *
1988
- * @see {@link provideRouter}
1989
- * @see {@link withEnabledBlockingInitialNavigation}
1966
+ * Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the
1967
+ * server and other one on the browser.
1990
1968
  *
1991
1969
  * @publicApi
1992
1970
  * @developerPreview
1993
1971
  */
1994
- function withNoDomReuse() {
1972
+ function withNoHttpTransferCache() {
1995
1973
  // This feature has no providers and acts as a flag that turns off
1996
- // non-destructive hydration (which otherwise is turned on by default).
1997
- return hydrationFeature(0 /* HydrationFeatureKind.NoDomReuseFeature */);
1974
+ // HTTP transfer cache (which otherwise is turned on by default).
1975
+ return hydrationFeature(0 /* HydrationFeatureKind.NoHttpTransferCache */);
1998
1976
  }
1999
1977
  /**
2000
- * Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the
2001
- * server and other one on the browser.
1978
+ * The function accepts a an object, which allows to configure cache parameters,
1979
+ * such as which headers should be included (no headers are included by default),
1980
+ * wether POST requests should be cached or a callback function to determine if a
1981
+ * particular request should be cached.
2002
1982
  *
2003
1983
  * @publicApi
2004
1984
  * @developerPreview
2005
1985
  */
2006
- function withNoHttpTransferCache() {
2007
- // This feature has no providers and acts as a flag that turns off
2008
- // HTTP transfer cache (which otherwise is turned on by default).
2009
- return hydrationFeature(1 /* HydrationFeatureKind.NoHttpTransferCache */);
1986
+ function withHttpTransferCacheOptions(options) {
1987
+ // This feature has no providers and acts as a flag to pass options to the HTTP transfer cache.
1988
+ return hydrationFeature(1 /* HydrationFeatureKind.HttpTransferCacheOptions */, ɵwithHttpTransferCache(options));
2010
1989
  }
2011
1990
  /**
2012
1991
  * Returns an `ENVIRONMENT_INITIALIZER` token setup with a function
@@ -2036,19 +2015,16 @@ function provideZoneJsCompatibilityDetector() {
2036
2015
  * Sets up providers necessary to enable hydration functionality for the application.
2037
2016
  *
2038
2017
  * By default, the function enables the recommended set of features for the optimal
2039
- * performance for most of the applications. You can enable/disable features by
2040
- * passing special functions (from the `HydrationFeatures` set) as arguments to the
2041
- * `provideClientHydration` function. It includes the following features:
2018
+ * performance for most of the applications. It includes the following features:
2042
2019
  *
2043
2020
  * * Reconciling DOM hydration. Learn more about it [here](guide/hydration).
2044
2021
  * * [`HttpClient`](api/common/http/HttpClient) response caching while running on the server and
2045
2022
  * transferring this cache to the client to avoid extra HTTP requests. Learn more about data caching
2046
2023
  * [here](/guide/universal#caching-data-when-using-httpclient).
2047
2024
  *
2048
- * These functions functions will allow you to disable some of the default features:
2049
- * * {@link withNoDomReuse} to disable DOM nodes reuse during hydration
2025
+ * These functions allow you to disable some of the default features or configure features
2050
2026
  * * {@link withNoHttpTransferCache} to disable HTTP transfer cache
2051
- *
2027
+ * * {@link withHttpTransferCacheOptions} to configure some HTTP transfer cache options
2052
2028
  *
2053
2029
  * @usageNotes
2054
2030
  *
@@ -2071,8 +2047,8 @@ function provideZoneJsCompatibilityDetector() {
2071
2047
  * export class AppModule {}
2072
2048
  * ```
2073
2049
  *
2074
- * @see {@link withNoDomReuse}
2075
2050
  * @see {@link withNoHttpTransferCache}
2051
+ * @see {@link withHttpTransferCacheOptions}
2076
2052
  *
2077
2053
  * @param features Optional features to configure additional router behaviors.
2078
2054
  * @returns A set of providers to enable hydration.
@@ -2083,16 +2059,24 @@ function provideZoneJsCompatibilityDetector() {
2083
2059
  function provideClientHydration(...features) {
2084
2060
  const providers = [];
2085
2061
  const featuresKind = new Set();
2062
+ const hasHttpTransferCacheOptions = featuresKind.has(1 /* HydrationFeatureKind.HttpTransferCacheOptions */);
2086
2063
  for (const { ɵproviders, ɵkind } of features) {
2087
2064
  featuresKind.add(ɵkind);
2088
2065
  if (ɵproviders.length) {
2089
2066
  providers.push(ɵproviders);
2090
2067
  }
2091
2068
  }
2069
+ if (typeof ngDevMode !== 'undefined' && ngDevMode &&
2070
+ featuresKind.has(0 /* HydrationFeatureKind.NoHttpTransferCache */) && hasHttpTransferCacheOptions) {
2071
+ // TODO: Make this a runtime error
2072
+ throw new Error('Configuration error: found both withHttpTransferCacheOptions() and withNoHttpTransferCache() in the same call to provideClientHydration(), which is a contradiction.');
2073
+ }
2092
2074
  return makeEnvironmentProviders([
2093
2075
  (typeof ngDevMode !== 'undefined' && ngDevMode) ? provideZoneJsCompatibilityDetector() : [],
2094
- (featuresKind.has(0 /* HydrationFeatureKind.NoDomReuseFeature */) ? [] : ɵwithDomHydration()),
2095
- (featuresKind.has(1 /* HydrationFeatureKind.NoHttpTransferCache */) ? [] : ɵwithHttpTransferCache()),
2076
+ ɵwithDomHydration(),
2077
+ ((featuresKind.has(0 /* HydrationFeatureKind.NoHttpTransferCache */) || hasHttpTransferCacheOptions) ?
2078
+ [] :
2079
+ ɵwithHttpTransferCache({})),
2096
2080
  providers,
2097
2081
  ]);
2098
2082
  }
@@ -2105,7 +2089,7 @@ function provideClientHydration(...features) {
2105
2089
  /**
2106
2090
  * @publicApi
2107
2091
  */
2108
- const VERSION = new Version('17.0.0-next.7');
2092
+ const VERSION = new Version('17.0.0-next.8');
2109
2093
 
2110
2094
  // Re-export TransferState to the public API of the `platform-browser` for backwards-compatibility.
2111
2095
  /**
@@ -2141,5 +2125,5 @@ const TransferState = TransferState$1;
2141
2125
  * Generated bundle index. Do not edit.
2142
2126
  */
2143
2127
 
2144
- export { BrowserModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, EventManagerPlugin, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, Meta, REMOVE_STYLES_ON_COMPONENT_DESTROY, Title, TransferState, VERSION, bootstrapApplication, createApplication, disableDebugTools, enableDebugTools, makeStateKey, platformBrowser, provideClientHydration, provideProtractorTestingSupport, withNoDomReuse, withNoHttpTransferCache, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserGetTestability as ɵBrowserGetTestability, DomEventsPlugin as ɵDomEventsPlugin, DomRendererFactory2 as ɵDomRendererFactory2, DomSanitizerImpl as ɵDomSanitizerImpl, HammerGesturesPlugin as ɵHammerGesturesPlugin, INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, KeyEventsPlugin as ɵKeyEventsPlugin, SharedStylesHost as ɵSharedStylesHost, initDomAdapter as ɵinitDomAdapter };
2128
+ export { BrowserModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, EventManagerPlugin, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, Meta, REMOVE_STYLES_ON_COMPONENT_DESTROY, Title, TransferState, VERSION, bootstrapApplication, createApplication, disableDebugTools, enableDebugTools, makeStateKey, platformBrowser, provideClientHydration, provideProtractorTestingSupport, withHttpTransferCacheOptions, withNoHttpTransferCache, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserGetTestability as ɵBrowserGetTestability, DomEventsPlugin as ɵDomEventsPlugin, DomRendererFactory2 as ɵDomRendererFactory2, DomSanitizerImpl as ɵDomSanitizerImpl, HammerGesturesPlugin as ɵHammerGesturesPlugin, INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, KeyEventsPlugin as ɵKeyEventsPlugin, SharedStylesHost as ɵSharedStylesHost, initDomAdapter as ɵinitDomAdapter };
2145
2129
  //# sourceMappingURL=platform-browser.mjs.map