@angular/platform-browser 17.0.0-next.7 → 17.0.0-rc.0
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.
- package/animations/async/index.d.ts +1 -1
- package/animations/index.d.ts +1 -14
- package/esm2022/animations/async/src/async_animation_renderer.mjs +42 -5
- package/esm2022/animations/src/module.mjs +8 -8
- package/esm2022/animations/src/private_export.mjs +1 -2
- package/esm2022/animations/src/providers.mjs +4 -7
- package/esm2022/src/browser/meta.mjs +3 -3
- package/esm2022/src/browser/title.mjs +3 -3
- package/esm2022/src/browser/xhr.mjs +3 -3
- package/esm2022/src/browser.mjs +4 -4
- package/esm2022/src/dom/dom_renderer.mjs +19 -19
- package/esm2022/src/dom/events/dom_events.mjs +3 -3
- package/esm2022/src/dom/events/event_manager.mjs +3 -3
- package/esm2022/src/dom/events/hammer_gestures.mjs +10 -10
- package/esm2022/src/dom/events/key_events.mjs +3 -3
- package/esm2022/src/dom/shared_styles_host.mjs +20 -47
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/hydration.mjs +31 -52
- package/esm2022/src/platform-browser.mjs +2 -2
- package/esm2022/src/private_export.mjs +1 -1
- package/esm2022/src/security/dom_sanitization_service.mjs +6 -6
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/browser.mjs +4 -4
- package/fesm2022/animations/async.mjs +42 -6
- package/fesm2022/animations/async.mjs.map +1 -1
- package/fesm2022/animations.mjs +14 -111
- package/fesm2022/animations.mjs.map +1 -1
- package/fesm2022/platform-browser.mjs +106 -154
- package/fesm2022/platform-browser.mjs.map +1 -1
- package/fesm2022/testing.mjs +5 -5
- package/index.d.ts +37 -47
- package/package.json +4 -4
- package/testing/index.d.ts +1 -1
- package/esm2022/animations/src/animation_builder.mjs +0 -106
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v17.0.0-
|
2
|
+
* @license Angular v17.0.0-rc.0
|
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-
|
166
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-
|
165
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
166
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: BrowserXhr }); }
|
167
167
|
}
|
168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", 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-
|
231
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-
|
230
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", 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-rc.0", ngImport: i0, type: EventManager }); }
|
232
232
|
}
|
233
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: EventManager, decorators: [{
|
234
234
|
type: Injectable
|
235
235
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
236
236
|
type: Inject,
|
@@ -274,17 +274,14 @@ class SharedStylesHost {
|
|
274
274
|
}
|
275
275
|
}
|
276
276
|
}
|
277
|
-
|
277
|
+
removeStyles(styles) {
|
278
278
|
for (const style of styles) {
|
279
279
|
const usageCount = this.changeUsageCount(style, -1);
|
280
|
-
if (usageCount
|
281
|
-
this.
|
280
|
+
if (usageCount <= 0) {
|
281
|
+
this.onStyleRemoved(style);
|
282
282
|
}
|
283
283
|
}
|
284
284
|
}
|
285
|
-
visitStyleElement(style, callback) {
|
286
|
-
this.styleRef.get(style)?.elements?.forEach(callback);
|
287
|
-
}
|
288
285
|
ngOnDestroy() {
|
289
286
|
const styleNodesInDOM = this.styleNodesInDOM;
|
290
287
|
if (styleNodesInDOM) {
|
@@ -292,8 +289,7 @@ class SharedStylesHost {
|
|
292
289
|
styleNodesInDOM.clear();
|
293
290
|
}
|
294
291
|
for (const style of this.getAllStyles()) {
|
295
|
-
this.
|
296
|
-
this.styleRef.delete(style);
|
292
|
+
this.onStyleRemoved(style);
|
297
293
|
}
|
298
294
|
this.resetHostNodes();
|
299
295
|
}
|
@@ -314,6 +310,11 @@ class SharedStylesHost {
|
|
314
310
|
this.addStyleToHost(host, style);
|
315
311
|
}
|
316
312
|
}
|
313
|
+
onStyleRemoved(style) {
|
314
|
+
const styleRef = this.styleRef;
|
315
|
+
styleRef.get(style)?.elements?.forEach((node) => node.remove());
|
316
|
+
styleRef.delete(style);
|
317
|
+
}
|
317
318
|
collectServerRenderedStyles() {
|
318
319
|
const styles = this.doc.head?.querySelectorAll(`style[${APP_ID_ATTRIBUTE_NAME}="${this.appId}"]`);
|
319
320
|
if (styles?.length) {
|
@@ -331,12 +332,11 @@ class SharedStylesHost {
|
|
331
332
|
const map = this.styleRef;
|
332
333
|
if (map.has(style)) {
|
333
334
|
const styleRefValue = map.get(style);
|
334
|
-
styleRefValue.usage
|
335
|
+
styleRefValue.usage += delta;
|
335
336
|
return styleRefValue.usage;
|
336
337
|
}
|
337
|
-
|
338
|
-
|
339
|
-
return usage;
|
338
|
+
map.set(style, { usage: delta, elements: [] });
|
339
|
+
return delta;
|
340
340
|
}
|
341
341
|
getStyleElement(host, style) {
|
342
342
|
const styleNodesInDOM = this.styleNodesInDOM;
|
@@ -360,22 +360,16 @@ class SharedStylesHost {
|
|
360
360
|
if (this.platformIsServer) {
|
361
361
|
styleEl.setAttribute(APP_ID_ATTRIBUTE_NAME, this.appId);
|
362
362
|
}
|
363
|
+
host.appendChild(styleEl);
|
363
364
|
return styleEl;
|
364
365
|
}
|
365
366
|
}
|
366
367
|
addStyleToHost(host, style) {
|
367
368
|
const styleEl = this.getStyleElement(host, style);
|
368
|
-
host.appendChild(styleEl);
|
369
369
|
const styleRef = this.styleRef;
|
370
|
-
const
|
371
|
-
if (
|
372
|
-
|
373
|
-
disableStylesheet(styleEl);
|
374
|
-
}
|
375
|
-
else {
|
376
|
-
enableStylesheet(styleEl);
|
377
|
-
}
|
378
|
-
styleResult.elements.push(styleEl);
|
370
|
+
const styleElRef = styleRef.get(style)?.elements;
|
371
|
+
if (styleElRef) {
|
372
|
+
styleElRef.push(styleEl);
|
379
373
|
}
|
380
374
|
else {
|
381
375
|
styleRef.set(style, { elements: [styleEl], usage: 1 });
|
@@ -387,10 +381,10 @@ class SharedStylesHost {
|
|
387
381
|
// Re-add the head element back since this is the default host.
|
388
382
|
hostNodes.add(this.doc.head);
|
389
383
|
}
|
390
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-
|
391
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-
|
384
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: SharedStylesHost, deps: [{ token: DOCUMENT }, { token: APP_ID }, { token: CSP_NONCE, optional: true }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
385
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: SharedStylesHost }); }
|
392
386
|
}
|
393
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: SharedStylesHost, decorators: [{
|
394
388
|
type: Injectable
|
395
389
|
}], ctorParameters: () => [{ type: Document, decorators: [{
|
396
390
|
type: Inject,
|
@@ -407,27 +401,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7",
|
|
407
401
|
type: Inject,
|
408
402
|
args: [PLATFORM_ID]
|
409
403
|
}] }] });
|
410
|
-
/**
|
411
|
-
* When a component that has styles is destroyed, we disable stylesheets
|
412
|
-
* instead of removing them to avoid performance issues related to style
|
413
|
-
* recalculation in a browser.
|
414
|
-
*/
|
415
|
-
function disableStylesheet(node) {
|
416
|
-
node.disabled = true;
|
417
|
-
}
|
418
|
-
/**
|
419
|
-
* Enables a stylesheet in a browser, see the `disableStylesheet` function
|
420
|
-
* docs for additional info.
|
421
|
-
*/
|
422
|
-
function enableStylesheet(node) {
|
423
|
-
node.disabled = false;
|
424
|
-
}
|
425
|
-
/**
|
426
|
-
* When the value is a negative a value of `0` is returned.
|
427
|
-
*/
|
428
|
-
function nonNegativeNumber(value) {
|
429
|
-
return value < 0 ? 0 : value;
|
430
|
-
}
|
431
404
|
|
432
405
|
const NAMESPACE_URIS = {
|
433
406
|
'svg': 'http://www.w3.org/2000/svg',
|
@@ -447,12 +420,12 @@ const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;
|
|
447
420
|
const REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT = true;
|
448
421
|
/**
|
449
422
|
* A [DI token](guide/glossary#di-token "DI token definition") that indicates whether styles
|
450
|
-
* of destroyed components should be
|
423
|
+
* of destroyed components should be removed from DOM.
|
451
424
|
*
|
452
425
|
* By default, the value is set to `true`.
|
453
426
|
* @publicApi
|
454
427
|
*/
|
455
|
-
const REMOVE_STYLES_ON_COMPONENT_DESTROY = new InjectionToken(
|
428
|
+
const REMOVE_STYLES_ON_COMPONENT_DESTROY = new InjectionToken('RemoveStylesOnCompDestroy', {
|
456
429
|
providedIn: 'root',
|
457
430
|
factory: () => REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT,
|
458
431
|
});
|
@@ -466,11 +439,11 @@ function shimStylesContent(compId, styles) {
|
|
466
439
|
return styles.map(s => s.replace(COMPONENT_REGEX, compId));
|
467
440
|
}
|
468
441
|
class DomRendererFactory2 {
|
469
|
-
constructor(eventManager, sharedStylesHost, appId,
|
442
|
+
constructor(eventManager, sharedStylesHost, appId, removeStylesOnCompDestroy, doc, platformId, ngZone, nonce = null) {
|
470
443
|
this.eventManager = eventManager;
|
471
444
|
this.sharedStylesHost = sharedStylesHost;
|
472
445
|
this.appId = appId;
|
473
|
-
this.
|
446
|
+
this.removeStylesOnCompDestroy = removeStylesOnCompDestroy;
|
474
447
|
this.doc = doc;
|
475
448
|
this.platformId = platformId;
|
476
449
|
this.ngZone = ngZone;
|
@@ -507,16 +480,16 @@ class DomRendererFactory2 {
|
|
507
480
|
const ngZone = this.ngZone;
|
508
481
|
const eventManager = this.eventManager;
|
509
482
|
const sharedStylesHost = this.sharedStylesHost;
|
510
|
-
const
|
483
|
+
const removeStylesOnCompDestroy = this.removeStylesOnCompDestroy;
|
511
484
|
const platformIsServer = this.platformIsServer;
|
512
485
|
switch (type.encapsulation) {
|
513
486
|
case ViewEncapsulation.Emulated:
|
514
|
-
renderer = new EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, type, this.appId,
|
487
|
+
renderer = new EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, type, this.appId, removeStylesOnCompDestroy, doc, ngZone, platformIsServer);
|
515
488
|
break;
|
516
489
|
case ViewEncapsulation.ShadowDom:
|
517
490
|
return new ShadowDomRenderer(eventManager, sharedStylesHost, element, type, doc, ngZone, this.nonce, platformIsServer);
|
518
491
|
default:
|
519
|
-
renderer = new NoneEncapsulationDomRenderer(eventManager, sharedStylesHost, type,
|
492
|
+
renderer = new NoneEncapsulationDomRenderer(eventManager, sharedStylesHost, type, removeStylesOnCompDestroy, doc, ngZone, platformIsServer);
|
520
493
|
break;
|
521
494
|
}
|
522
495
|
rendererByCompId.set(type.id, renderer);
|
@@ -526,10 +499,10 @@ class DomRendererFactory2 {
|
|
526
499
|
ngOnDestroy() {
|
527
500
|
this.rendererByCompId.clear();
|
528
501
|
}
|
529
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-
|
530
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-
|
502
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", 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 }); }
|
503
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: DomRendererFactory2 }); }
|
531
504
|
}
|
532
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: DomRendererFactory2, decorators: [{
|
533
506
|
type: Injectable
|
534
507
|
}], ctorParameters: () => [{ type: EventManager }, { type: SharedStylesHost }, { type: undefined, decorators: [{
|
535
508
|
type: Inject,
|
@@ -761,26 +734,26 @@ class ShadowDomRenderer extends DefaultDomRenderer2 {
|
|
761
734
|
}
|
762
735
|
}
|
763
736
|
class NoneEncapsulationDomRenderer extends DefaultDomRenderer2 {
|
764
|
-
constructor(eventManager, sharedStylesHost, component,
|
737
|
+
constructor(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, compId) {
|
765
738
|
super(eventManager, doc, ngZone, platformIsServer);
|
766
739
|
this.sharedStylesHost = sharedStylesHost;
|
767
|
-
this.
|
768
|
-
this.styles = component.styles;
|
740
|
+
this.removeStylesOnCompDestroy = removeStylesOnCompDestroy;
|
741
|
+
this.styles = compId ? shimStylesContent(compId, component.styles) : component.styles;
|
769
742
|
}
|
770
743
|
applyStyles() {
|
771
744
|
this.sharedStylesHost.addStyles(this.styles);
|
772
745
|
}
|
773
746
|
destroy() {
|
774
|
-
if (this.
|
775
|
-
|
747
|
+
if (!this.removeStylesOnCompDestroy) {
|
748
|
+
return;
|
776
749
|
}
|
750
|
+
this.sharedStylesHost.removeStyles(this.styles);
|
777
751
|
}
|
778
752
|
}
|
779
753
|
class EmulatedEncapsulationDomRenderer2 extends NoneEncapsulationDomRenderer {
|
780
|
-
constructor(eventManager, sharedStylesHost, component, appId,
|
781
|
-
super(eventManager, sharedStylesHost, component, disableStylesOnCompDestroy, doc, ngZone, platformIsServer);
|
754
|
+
constructor(eventManager, sharedStylesHost, component, appId, removeStylesOnCompDestroy, doc, ngZone, platformIsServer) {
|
782
755
|
const compId = appId + '-' + component.id;
|
783
|
-
|
756
|
+
super(eventManager, sharedStylesHost, component, removeStylesOnCompDestroy, doc, ngZone, platformIsServer, compId);
|
784
757
|
this.contentAttr = shimContentAttribute(compId);
|
785
758
|
this.hostAttr = shimHostAttribute(compId);
|
786
759
|
}
|
@@ -811,10 +784,10 @@ class DomEventsPlugin extends EventManagerPlugin {
|
|
811
784
|
removeEventListener(target, eventName, callback) {
|
812
785
|
return target.removeEventListener(eventName, callback);
|
813
786
|
}
|
814
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-
|
815
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-
|
787
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
788
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: DomEventsPlugin }); }
|
816
789
|
}
|
817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
790
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: DomEventsPlugin, decorators: [{
|
818
791
|
type: Injectable
|
819
792
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
820
793
|
type: Inject,
|
@@ -983,10 +956,10 @@ class KeyEventsPlugin extends EventManagerPlugin {
|
|
983
956
|
static _normalizeKey(keyName) {
|
984
957
|
return keyName === 'esc' ? 'escape' : keyName;
|
985
958
|
}
|
986
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-
|
987
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-
|
959
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
960
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: KeyEventsPlugin }); }
|
988
961
|
}
|
989
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
962
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: KeyEventsPlugin, decorators: [{
|
990
963
|
type: Injectable
|
991
964
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
992
965
|
type: Inject,
|
@@ -1193,11 +1166,11 @@ class BrowserModule {
|
|
1193
1166
|
],
|
1194
1167
|
};
|
1195
1168
|
}
|
1196
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-
|
1197
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-
|
1198
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-
|
1169
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: BrowserModule, deps: [{ token: BROWSER_MODULE_PROVIDERS_MARKER, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1170
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-rc.0", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] }); }
|
1171
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: BrowserModule, providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS], imports: [CommonModule, ApplicationModule] }); }
|
1199
1172
|
}
|
1200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
1173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: BrowserModule, decorators: [{
|
1201
1174
|
type: NgModule,
|
1202
1175
|
args: [{
|
1203
1176
|
providers: [...BROWSER_MODULE_PROVIDERS, ...TESTABILITY_PROVIDERS],
|
@@ -1367,10 +1340,10 @@ class Meta {
|
|
1367
1340
|
_getMetaKeyMap(prop) {
|
1368
1341
|
return META_KEYS_MAP[prop] || prop;
|
1369
1342
|
}
|
1370
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-
|
1371
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-
|
1343
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1344
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: Meta, providedIn: 'root', useFactory: createMeta, deps: [] }); }
|
1372
1345
|
}
|
1373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
1346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: Meta, decorators: [{
|
1374
1347
|
type: Injectable,
|
1375
1348
|
args: [{ providedIn: 'root', useFactory: createMeta, deps: [] }]
|
1376
1349
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
@@ -1417,10 +1390,10 @@ class Title {
|
|
1417
1390
|
setTitle(newTitle) {
|
1418
1391
|
this._doc.title = newTitle || '';
|
1419
1392
|
}
|
1420
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-
|
1421
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-
|
1393
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1394
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: Title, providedIn: 'root', useFactory: createTitle, deps: [] }); }
|
1422
1395
|
}
|
1423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
1396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: Title, decorators: [{
|
1424
1397
|
type: Injectable,
|
1425
1398
|
args: [{ providedIn: 'root', useFactory: createTitle, deps: [] }]
|
1426
1399
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
@@ -1689,10 +1662,10 @@ class HammerGestureConfig {
|
|
1689
1662
|
}
|
1690
1663
|
return mc;
|
1691
1664
|
}
|
1692
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-
|
1693
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-
|
1665
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1666
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: HammerGestureConfig }); }
|
1694
1667
|
}
|
1695
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
1668
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: HammerGestureConfig, decorators: [{
|
1696
1669
|
type: Injectable
|
1697
1670
|
}] });
|
1698
1671
|
/**
|
@@ -1787,10 +1760,10 @@ class HammerGesturesPlugin extends EventManagerPlugin {
|
|
1787
1760
|
isCustomEvent(eventName) {
|
1788
1761
|
return this._config.events.indexOf(eventName) > -1;
|
1789
1762
|
}
|
1790
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-
|
1791
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-
|
1763
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: HammerGesturesPlugin, deps: [{ token: DOCUMENT }, { token: HAMMER_GESTURE_CONFIG }, { token: i0.ɵConsole }, { token: HAMMER_LOADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1764
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: HammerGesturesPlugin }); }
|
1792
1765
|
}
|
1793
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
1766
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: HammerGesturesPlugin, decorators: [{
|
1794
1767
|
type: Injectable
|
1795
1768
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
1796
1769
|
type: Inject,
|
@@ -1816,9 +1789,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7",
|
|
1816
1789
|
* @publicApi
|
1817
1790
|
*/
|
1818
1791
|
class HammerModule {
|
1819
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-
|
1820
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-
|
1821
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-
|
1792
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
1793
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.0-rc.0", ngImport: i0, type: HammerModule }); }
|
1794
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: HammerModule, providers: [
|
1822
1795
|
{
|
1823
1796
|
provide: EVENT_MANAGER_PLUGINS,
|
1824
1797
|
useClass: HammerGesturesPlugin,
|
@@ -1828,7 +1801,7 @@ class HammerModule {
|
|
1828
1801
|
{ provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },
|
1829
1802
|
] }); }
|
1830
1803
|
}
|
1831
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
1804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: HammerModule, decorators: [{
|
1832
1805
|
type: NgModule,
|
1833
1806
|
args: [{
|
1834
1807
|
providers: [
|
@@ -1875,10 +1848,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7",
|
|
1875
1848
|
* @publicApi
|
1876
1849
|
*/
|
1877
1850
|
class DomSanitizer {
|
1878
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-
|
1879
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-
|
1851
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1852
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(() => DomSanitizerImpl) }); }
|
1880
1853
|
}
|
1881
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
1854
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: DomSanitizer, decorators: [{
|
1882
1855
|
type: Injectable,
|
1883
1856
|
args: [{ providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl) }]
|
1884
1857
|
}] });
|
@@ -1943,10 +1916,10 @@ class DomSanitizerImpl extends DomSanitizer {
|
|
1943
1916
|
bypassSecurityTrustResourceUrl(value) {
|
1944
1917
|
return ɵbypassSanitizationTrustResourceUrl(value);
|
1945
1918
|
}
|
1946
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-
|
1947
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-
|
1919
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1920
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: DomSanitizerImpl, providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [{ token: Injector }] }); }
|
1948
1921
|
}
|
1949
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-
|
1922
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-rc.0", ngImport: i0, type: DomSanitizerImpl, decorators: [{
|
1950
1923
|
type: Injectable,
|
1951
1924
|
args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [Injector] }]
|
1952
1925
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
@@ -1957,56 +1930,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.0-next.7",
|
|
1957
1930
|
/**
|
1958
1931
|
* Helper function to create an object that represents a Hydration feature.
|
1959
1932
|
*/
|
1960
|
-
function hydrationFeature(
|
1961
|
-
return { ɵkind
|
1933
|
+
function hydrationFeature(ɵkind, ɵproviders = [], ɵoptions = {}) {
|
1934
|
+
return { ɵkind, ɵproviders };
|
1962
1935
|
}
|
1963
1936
|
/**
|
1964
|
-
* Disables
|
1965
|
-
*
|
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}
|
1937
|
+
* Disables HTTP transfer cache. Effectively causes HTTP requests to be performed twice: once on the
|
1938
|
+
* server and other one on the browser.
|
1990
1939
|
*
|
1991
1940
|
* @publicApi
|
1992
|
-
* @developerPreview
|
1993
1941
|
*/
|
1994
|
-
function
|
1942
|
+
function withNoHttpTransferCache() {
|
1995
1943
|
// This feature has no providers and acts as a flag that turns off
|
1996
|
-
//
|
1997
|
-
return hydrationFeature(0 /* HydrationFeatureKind.
|
1944
|
+
// HTTP transfer cache (which otherwise is turned on by default).
|
1945
|
+
return hydrationFeature(0 /* HydrationFeatureKind.NoHttpTransferCache */);
|
1998
1946
|
}
|
1999
1947
|
/**
|
2000
|
-
*
|
2001
|
-
*
|
1948
|
+
* The function accepts a an object, which allows to configure cache parameters,
|
1949
|
+
* such as which headers should be included (no headers are included by default),
|
1950
|
+
* wether POST requests should be cached or a callback function to determine if a
|
1951
|
+
* particular request should be cached.
|
2002
1952
|
*
|
2003
1953
|
* @publicApi
|
2004
|
-
* @developerPreview
|
2005
1954
|
*/
|
2006
|
-
function
|
2007
|
-
// This feature has no providers and acts as a flag
|
2008
|
-
|
2009
|
-
return hydrationFeature(1 /* HydrationFeatureKind.NoHttpTransferCache */);
|
1955
|
+
function withHttpTransferCacheOptions(options) {
|
1956
|
+
// This feature has no providers and acts as a flag to pass options to the HTTP transfer cache.
|
1957
|
+
return hydrationFeature(1 /* HydrationFeatureKind.HttpTransferCacheOptions */, ɵwithHttpTransferCache(options));
|
2010
1958
|
}
|
2011
1959
|
/**
|
2012
1960
|
* Returns an `ENVIRONMENT_INITIALIZER` token setup with a function
|
@@ -2036,19 +1984,16 @@ function provideZoneJsCompatibilityDetector() {
|
|
2036
1984
|
* Sets up providers necessary to enable hydration functionality for the application.
|
2037
1985
|
*
|
2038
1986
|
* By default, the function enables the recommended set of features for the optimal
|
2039
|
-
* performance for most of the applications.
|
2040
|
-
* passing special functions (from the `HydrationFeatures` set) as arguments to the
|
2041
|
-
* `provideClientHydration` function. It includes the following features:
|
1987
|
+
* performance for most of the applications. It includes the following features:
|
2042
1988
|
*
|
2043
1989
|
* * Reconciling DOM hydration. Learn more about it [here](guide/hydration).
|
2044
1990
|
* * [`HttpClient`](api/common/http/HttpClient) response caching while running on the server and
|
2045
1991
|
* transferring this cache to the client to avoid extra HTTP requests. Learn more about data caching
|
2046
1992
|
* [here](/guide/universal#caching-data-when-using-httpclient).
|
2047
1993
|
*
|
2048
|
-
* These functions
|
2049
|
-
* * {@link withNoDomReuse} to disable DOM nodes reuse during hydration
|
1994
|
+
* These functions allow you to disable some of the default features or configure features
|
2050
1995
|
* * {@link withNoHttpTransferCache} to disable HTTP transfer cache
|
2051
|
-
*
|
1996
|
+
* * {@link withHttpTransferCacheOptions} to configure some HTTP transfer cache options
|
2052
1997
|
*
|
2053
1998
|
* @usageNotes
|
2054
1999
|
*
|
@@ -2071,28 +2016,35 @@ function provideZoneJsCompatibilityDetector() {
|
|
2071
2016
|
* export class AppModule {}
|
2072
2017
|
* ```
|
2073
2018
|
*
|
2074
|
-
* @see {@link withNoDomReuse}
|
2075
2019
|
* @see {@link withNoHttpTransferCache}
|
2020
|
+
* @see {@link withHttpTransferCacheOptions}
|
2076
2021
|
*
|
2077
2022
|
* @param features Optional features to configure additional router behaviors.
|
2078
2023
|
* @returns A set of providers to enable hydration.
|
2079
2024
|
*
|
2080
2025
|
* @publicApi
|
2081
|
-
* @developerPreview
|
2082
2026
|
*/
|
2083
2027
|
function provideClientHydration(...features) {
|
2084
2028
|
const providers = [];
|
2085
2029
|
const featuresKind = new Set();
|
2030
|
+
const hasHttpTransferCacheOptions = featuresKind.has(1 /* HydrationFeatureKind.HttpTransferCacheOptions */);
|
2086
2031
|
for (const { ɵproviders, ɵkind } of features) {
|
2087
2032
|
featuresKind.add(ɵkind);
|
2088
2033
|
if (ɵproviders.length) {
|
2089
2034
|
providers.push(ɵproviders);
|
2090
2035
|
}
|
2091
2036
|
}
|
2037
|
+
if (typeof ngDevMode !== 'undefined' && ngDevMode &&
|
2038
|
+
featuresKind.has(0 /* HydrationFeatureKind.NoHttpTransferCache */) && hasHttpTransferCacheOptions) {
|
2039
|
+
// TODO: Make this a runtime error
|
2040
|
+
throw new Error('Configuration error: found both withHttpTransferCacheOptions() and withNoHttpTransferCache() in the same call to provideClientHydration(), which is a contradiction.');
|
2041
|
+
}
|
2092
2042
|
return makeEnvironmentProviders([
|
2093
2043
|
(typeof ngDevMode !== 'undefined' && ngDevMode) ? provideZoneJsCompatibilityDetector() : [],
|
2094
|
-
|
2095
|
-
(featuresKind.has(
|
2044
|
+
ɵwithDomHydration(),
|
2045
|
+
((featuresKind.has(0 /* HydrationFeatureKind.NoHttpTransferCache */) || hasHttpTransferCacheOptions) ?
|
2046
|
+
[] :
|
2047
|
+
ɵwithHttpTransferCache({})),
|
2096
2048
|
providers,
|
2097
2049
|
]);
|
2098
2050
|
}
|
@@ -2105,7 +2057,7 @@ function provideClientHydration(...features) {
|
|
2105
2057
|
/**
|
2106
2058
|
* @publicApi
|
2107
2059
|
*/
|
2108
|
-
const VERSION = new Version('17.0.0-
|
2060
|
+
const VERSION = new Version('17.0.0-rc.0');
|
2109
2061
|
|
2110
2062
|
// Re-export TransferState to the public API of the `platform-browser` for backwards-compatibility.
|
2111
2063
|
/**
|
@@ -2141,5 +2093,5 @@ const TransferState = TransferState$1;
|
|
2141
2093
|
* Generated bundle index. Do not edit.
|
2142
2094
|
*/
|
2143
2095
|
|
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,
|
2096
|
+
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
2097
|
//# sourceMappingURL=platform-browser.mjs.map
|