@angular/platform-browser 17.0.0-next.6 → 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.
Files changed (39) hide show
  1. package/animations/async/index.d.ts +40 -0
  2. package/animations/index.d.ts +1 -16
  3. package/esm2022/animations/async/async.mjs +5 -0
  4. package/esm2022/animations/async/index.mjs +13 -0
  5. package/esm2022/animations/async/public_api.mjs +14 -0
  6. package/esm2022/animations/async/src/async-animations.mjs +14 -0
  7. package/esm2022/animations/async/src/async_animation_renderer.mjs +192 -0
  8. package/esm2022/animations/async/src/providers.mjs +55 -0
  9. package/esm2022/animations/src/animation_builder.mjs +5 -5
  10. package/esm2022/animations/src/module.mjs +8 -8
  11. package/esm2022/animations/src/private_export.mjs +2 -3
  12. package/esm2022/animations/src/providers.mjs +3 -3
  13. package/esm2022/src/browser/meta.mjs +3 -3
  14. package/esm2022/src/browser/title.mjs +3 -3
  15. package/esm2022/src/browser/xhr.mjs +3 -3
  16. package/esm2022/src/browser.mjs +4 -4
  17. package/esm2022/src/dom/dom_renderer.mjs +13 -6
  18. package/esm2022/src/dom/events/dom_events.mjs +3 -3
  19. package/esm2022/src/dom/events/event_manager.mjs +3 -3
  20. package/esm2022/src/dom/events/hammer_gestures.mjs +10 -10
  21. package/esm2022/src/dom/events/key_events.mjs +3 -3
  22. package/esm2022/src/dom/shared_styles_host.mjs +20 -18
  23. package/esm2022/src/errors.mjs +1 -1
  24. package/esm2022/src/hydration.mjs +31 -49
  25. package/esm2022/src/platform-browser.mjs +2 -2
  26. package/esm2022/src/private_export.mjs +1 -1
  27. package/esm2022/src/security/dom_sanitization_service.mjs +7 -7
  28. package/esm2022/src/version.mjs +1 -1
  29. package/esm2022/testing/src/browser.mjs +4 -4
  30. package/fesm2022/animations/async.mjs +258 -0
  31. package/fesm2022/animations/async.mjs.map +1 -0
  32. package/fesm2022/animations.mjs +16 -17
  33. package/fesm2022/animations.mjs.map +1 -1
  34. package/fesm2022/platform-browser.mjs +100 -109
  35. package/fesm2022/platform-browser.mjs.map +1 -1
  36. package/fesm2022/testing.mjs +5 -5
  37. package/index.d.ts +32 -37
  38. package/package.json +10 -4
  39. package/testing/index.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.0.0-next.6
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.6", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
166
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", 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.6", 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.6", 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.6", 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.6", 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.6", 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.6", 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.6", 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.6", 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.6", 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.6", 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,
@@ -554,6 +556,11 @@ class DefaultDomRenderer2 {
554
556
  this.ngZone = ngZone;
555
557
  this.platformIsServer = platformIsServer;
556
558
  this.data = Object.create(null);
559
+ /**
560
+ * By default this renderer throws when encountering synthetic properties
561
+ * This can be disabled for example by the AsyncAnimationRendererFactory
562
+ */
563
+ this.throwOnSyntheticProps = true;
557
564
  this.destroyNode = null;
558
565
  }
559
566
  destroy() { }
@@ -664,14 +671,16 @@ class DefaultDomRenderer2 {
664
671
  }
665
672
  }
666
673
  setProperty(el, name, value) {
667
- (typeof ngDevMode === 'undefined' || ngDevMode) && checkNoSyntheticProp(name, 'property');
674
+ (typeof ngDevMode === 'undefined' || ngDevMode) && this.throwOnSyntheticProps &&
675
+ checkNoSyntheticProp(name, 'property');
668
676
  el[name] = value;
669
677
  }
670
678
  setValue(node, value) {
671
679
  node.nodeValue = value;
672
680
  }
673
681
  listen(target, event, callback) {
674
- (typeof ngDevMode === 'undefined' || ngDevMode) && checkNoSyntheticProp(event, 'listener');
682
+ (typeof ngDevMode === 'undefined' || ngDevMode) && this.throwOnSyntheticProps &&
683
+ checkNoSyntheticProp(event, 'listener');
675
684
  if (typeof target === 'string') {
676
685
  target = ɵgetDOM().getGlobalEventTarget(this.doc, target);
677
686
  if (!target) {
@@ -804,10 +813,10 @@ class DomEventsPlugin extends EventManagerPlugin {
804
813
  removeEventListener(target, eventName, callback) {
805
814
  return target.removeEventListener(eventName, callback);
806
815
  }
807
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
808
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", 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 }); }
809
818
  }
810
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: DomEventsPlugin, decorators: [{
819
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomEventsPlugin, decorators: [{
811
820
  type: Injectable
812
821
  }], ctorParameters: () => [{ type: undefined, decorators: [{
813
822
  type: Inject,
@@ -976,10 +985,10 @@ class KeyEventsPlugin extends EventManagerPlugin {
976
985
  static _normalizeKey(keyName) {
977
986
  return keyName === 'esc' ? 'escape' : keyName;
978
987
  }
979
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
980
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", 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 }); }
981
990
  }
982
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: KeyEventsPlugin, decorators: [{
991
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: KeyEventsPlugin, decorators: [{
983
992
  type: Injectable
984
993
  }], ctorParameters: () => [{ type: undefined, decorators: [{
985
994
  type: Inject,
@@ -1186,11 +1195,11 @@ class BrowserModule {
1186
1195
  ],
1187
1196
  };
1188
1197
  }
1189
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: BrowserModule, deps: [{ token: BROWSER_MODULE_PROVIDERS_MARKER, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
1190
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.6", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] }); }
1191
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.6", 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] }); }
1192
1201
  }
1193
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: BrowserModule, decorators: [{
1202
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: BrowserModule, decorators: [{
1194
1203
  type: NgModule,
1195
1204
  args: [{
1196
1205
  providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS],
@@ -1360,10 +1369,10 @@ class Meta {
1360
1369
  _getMetaKeyMap(prop) {
1361
1370
  return META_KEYS_MAP[prop] || prop;
1362
1371
  }
1363
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1364
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", 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: [] }); }
1365
1374
  }
1366
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: Meta, decorators: [{
1375
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: Meta, decorators: [{
1367
1376
  type: Injectable,
1368
1377
  args: [{ providedIn: 'root', useFactory: createMeta, deps: [] }]
1369
1378
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -1410,10 +1419,10 @@ class Title {
1410
1419
  setTitle(newTitle) {
1411
1420
  this._doc.title = newTitle || '';
1412
1421
  }
1413
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1414
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", 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: [] }); }
1415
1424
  }
1416
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: Title, decorators: [{
1425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: Title, decorators: [{
1417
1426
  type: Injectable,
1418
1427
  args: [{ providedIn: 'root', useFactory: createTitle, deps: [] }]
1419
1428
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -1682,10 +1691,10 @@ class HammerGestureConfig {
1682
1691
  }
1683
1692
  return mc;
1684
1693
  }
1685
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1686
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", 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 }); }
1687
1696
  }
1688
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: HammerGestureConfig, decorators: [{
1697
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: HammerGestureConfig, decorators: [{
1689
1698
  type: Injectable
1690
1699
  }] });
1691
1700
  /**
@@ -1780,10 +1789,10 @@ class HammerGesturesPlugin extends EventManagerPlugin {
1780
1789
  isCustomEvent(eventName) {
1781
1790
  return this._config.events.indexOf(eventName) > -1;
1782
1791
  }
1783
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: HammerGesturesPlugin, deps: [{ token: DOCUMENT }, { token: HAMMER_GESTURE_CONFIG }, { token: i0.ɵConsole }, { token: HAMMER_LOADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1784
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", 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 }); }
1785
1794
  }
1786
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: HammerGesturesPlugin, decorators: [{
1795
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: HammerGesturesPlugin, decorators: [{
1787
1796
  type: Injectable
1788
1797
  }], ctorParameters: () => [{ type: undefined, decorators: [{
1789
1798
  type: Inject,
@@ -1809,9 +1818,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6",
1809
1818
  * @publicApi
1810
1819
  */
1811
1820
  class HammerModule {
1812
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1813
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-next.6", ngImport: i0, type: HammerModule }); }
1814
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-next.6", 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: [
1815
1824
  {
1816
1825
  provide: EVENT_MANAGER_PLUGINS,
1817
1826
  useClass: HammerGesturesPlugin,
@@ -1821,7 +1830,7 @@ class HammerModule {
1821
1830
  { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },
1822
1831
  ] }); }
1823
1832
  }
1824
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: HammerModule, decorators: [{
1833
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: HammerModule, decorators: [{
1825
1834
  type: NgModule,
1826
1835
  args: [{
1827
1836
  providers: [
@@ -1868,10 +1877,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6",
1868
1877
  * @publicApi
1869
1878
  */
1870
1879
  class DomSanitizer {
1871
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1872
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(function () { return 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) }); }
1873
1882
  }
1874
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: DomSanitizer, decorators: [{
1883
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomSanitizer, decorators: [{
1875
1884
  type: Injectable,
1876
1885
  args: [{ providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl) }]
1877
1886
  }] });
@@ -1936,10 +1945,10 @@ class DomSanitizerImpl extends DomSanitizer {
1936
1945
  bypassSecurityTrustResourceUrl(value) {
1937
1946
  return ɵbypassSanitizationTrustResourceUrl(value);
1938
1947
  }
1939
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
1940
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-next.6", 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 }] }); }
1941
1950
  }
1942
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6", ngImport: i0, type: DomSanitizerImpl, decorators: [{
1951
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.8", ngImport: i0, type: DomSanitizerImpl, decorators: [{
1943
1952
  type: Injectable,
1944
1953
  args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [Injector] }]
1945
1954
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -1950,56 +1959,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.6",
1950
1959
  /**
1951
1960
  * Helper function to create an object that represents a Hydration feature.
1952
1961
  */
1953
- function hydrationFeature(kind, providers = []) {
1954
- return { ɵkind: kind, ɵproviders: providers };
1962
+ function hydrationFeature(ɵkind, ɵproviders = [], ɵoptions = {}) {
1963
+ return { ɵkind, ɵproviders };
1955
1964
  }
1956
1965
  /**
1957
- * Disables DOM nodes reuse during hydration. Effectively makes
1958
- * Angular re-render an application from scratch on the client.
1959
- *
1960
- * When this option is enabled, make sure that the initial navigation
1961
- * option is configured for the Router as `enabledBlocking` by using the
1962
- * `withEnabledBlockingInitialNavigation` in the `provideRouter` call:
1963
- *
1964
- * ```
1965
- * bootstrapApplication(RootComponent, {
1966
- * providers: [
1967
- * provideRouter(
1968
- * // ... other features ...
1969
- * withEnabledBlockingInitialNavigation()
1970
- * ),
1971
- * provideClientHydration(withNoDomReuse())
1972
- * ]
1973
- * });
1974
- * ```
1975
- *
1976
- * This would ensure that the application is rerendered after all async
1977
- * operations in the Router (such as lazy-loading of components,
1978
- * waiting for async guards and resolvers) are completed to avoid
1979
- * clearing the DOM on the client too soon, thus causing content flicker.
1980
- *
1981
- * @see {@link provideRouter}
1982
- * @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.
1983
1968
  *
1984
1969
  * @publicApi
1985
1970
  * @developerPreview
1986
1971
  */
1987
- function withNoDomReuse() {
1972
+ function withNoHttpTransferCache() {
1988
1973
  // This feature has no providers and acts as a flag that turns off
1989
- // non-destructive hydration (which otherwise is turned on by default).
1990
- return hydrationFeature(0 /* HydrationFeatureKind.NoDomReuseFeature */);
1974
+ // HTTP transfer cache (which otherwise is turned on by default).
1975
+ return hydrationFeature(0 /* HydrationFeatureKind.NoHttpTransferCache */);
1991
1976
  }
1992
1977
  /**
1993
- * Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the
1994
- * 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.
1995
1982
  *
1996
1983
  * @publicApi
1997
1984
  * @developerPreview
1998
1985
  */
1999
- function withNoHttpTransferCache() {
2000
- // This feature has no providers and acts as a flag that turns off
2001
- // HTTP transfer cache (which otherwise is turned on by default).
2002
- 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));
2003
1989
  }
2004
1990
  /**
2005
1991
  * Returns an `ENVIRONMENT_INITIALIZER` token setup with a function
@@ -2029,19 +2015,16 @@ function provideZoneJsCompatibilityDetector() {
2029
2015
  * Sets up providers necessary to enable hydration functionality for the application.
2030
2016
  *
2031
2017
  * By default, the function enables the recommended set of features for the optimal
2032
- * performance for most of the applications. You can enable/disable features by
2033
- * passing special functions (from the `HydrationFeatures` set) as arguments to the
2034
- * `provideClientHydration` function. It includes the following features:
2018
+ * performance for most of the applications. It includes the following features:
2035
2019
  *
2036
2020
  * * Reconciling DOM hydration. Learn more about it [here](guide/hydration).
2037
2021
  * * [`HttpClient`](api/common/http/HttpClient) response caching while running on the server and
2038
2022
  * transferring this cache to the client to avoid extra HTTP requests. Learn more about data caching
2039
2023
  * [here](/guide/universal#caching-data-when-using-httpclient).
2040
2024
  *
2041
- * These functions functions will allow you to disable some of the default features:
2042
- * * {@link withNoDomReuse} to disable DOM nodes reuse during hydration
2025
+ * These functions allow you to disable some of the default features or configure features
2043
2026
  * * {@link withNoHttpTransferCache} to disable HTTP transfer cache
2044
- *
2027
+ * * {@link withHttpTransferCacheOptions} to configure some HTTP transfer cache options
2045
2028
  *
2046
2029
  * @usageNotes
2047
2030
  *
@@ -2064,8 +2047,8 @@ function provideZoneJsCompatibilityDetector() {
2064
2047
  * export class AppModule {}
2065
2048
  * ```
2066
2049
  *
2067
- * @see {@link withNoDomReuse}
2068
2050
  * @see {@link withNoHttpTransferCache}
2051
+ * @see {@link withHttpTransferCacheOptions}
2069
2052
  *
2070
2053
  * @param features Optional features to configure additional router behaviors.
2071
2054
  * @returns A set of providers to enable hydration.
@@ -2076,16 +2059,24 @@ function provideZoneJsCompatibilityDetector() {
2076
2059
  function provideClientHydration(...features) {
2077
2060
  const providers = [];
2078
2061
  const featuresKind = new Set();
2062
+ const hasHttpTransferCacheOptions = featuresKind.has(1 /* HydrationFeatureKind.HttpTransferCacheOptions */);
2079
2063
  for (const { ɵproviders, ɵkind } of features) {
2080
2064
  featuresKind.add(ɵkind);
2081
2065
  if (ɵproviders.length) {
2082
2066
  providers.push(ɵproviders);
2083
2067
  }
2084
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
+ }
2085
2074
  return makeEnvironmentProviders([
2086
2075
  (typeof ngDevMode !== 'undefined' && ngDevMode) ? provideZoneJsCompatibilityDetector() : [],
2087
- (featuresKind.has(0 /* HydrationFeatureKind.NoDomReuseFeature */) ? [] : ɵwithDomHydration()),
2088
- (featuresKind.has(1 /* HydrationFeatureKind.NoHttpTransferCache */) ? [] : ɵwithHttpTransferCache()),
2076
+ ɵwithDomHydration(),
2077
+ ((featuresKind.has(0 /* HydrationFeatureKind.NoHttpTransferCache */) || hasHttpTransferCacheOptions) ?
2078
+ [] :
2079
+ ɵwithHttpTransferCache({})),
2089
2080
  providers,
2090
2081
  ]);
2091
2082
  }
@@ -2098,7 +2089,7 @@ function provideClientHydration(...features) {
2098
2089
  /**
2099
2090
  * @publicApi
2100
2091
  */
2101
- const VERSION = new Version('17.0.0-next.6');
2092
+ const VERSION = new Version('17.0.0-next.8');
2102
2093
 
2103
2094
  // Re-export TransferState to the public API of the `platform-browser` for backwards-compatibility.
2104
2095
  /**
@@ -2134,5 +2125,5 @@ const TransferState = TransferState$1;
2134
2125
  * Generated bundle index. Do not edit.
2135
2126
  */
2136
2127
 
2137
- 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 };
2138
2129
  //# sourceMappingURL=platform-browser.mjs.map