@angular/platform-browser 16.0.0-next.0 → 16.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/animations/index.d.ts +1 -1
- package/esm2020/animations/src/animation_builder.mjs +6 -5
- package/esm2020/animations/src/animation_renderer.mjs +6 -5
- package/esm2020/animations/src/module.mjs +13 -11
- package/esm2020/animations/src/providers.mjs +6 -5
- package/esm2020/src/browser/meta.mjs +6 -5
- package/esm2020/src/browser/title.mjs +6 -5
- package/esm2020/src/browser/transfer_state_module.mjs +28 -0
- package/esm2020/src/browser/xhr.mjs +6 -5
- package/esm2020/src/browser.mjs +7 -6
- package/esm2020/src/dom/dom_renderer.mjs +6 -5
- package/esm2020/src/dom/events/dom_events.mjs +6 -5
- package/esm2020/src/dom/events/event_manager.mjs +6 -5
- package/esm2020/src/dom/events/hammer_gestures.mjs +17 -14
- package/esm2020/src/dom/events/key_events.mjs +6 -5
- package/esm2020/src/dom/shared_styles_host.mjs +11 -9
- package/esm2020/src/platform-browser.mjs +4 -2
- package/esm2020/src/private_export.mjs +1 -2
- package/esm2020/src/security/dom_sanitization_service.mjs +11 -9
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/browser.mjs +7 -6
- package/fesm2015/animations.mjs +18 -18
- package/fesm2015/animations.mjs.map +1 -1
- package/fesm2015/platform-browser.mjs +59 -204
- package/fesm2015/platform-browser.mjs.map +1 -1
- package/fesm2015/testing.mjs +5 -5
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/animations.mjs +18 -18
- package/fesm2020/animations.mjs.map +1 -1
- package/fesm2020/platform-browser.mjs +59 -204
- package/fesm2020/platform-browser.mjs.map +1 -1
- package/fesm2020/testing.mjs +5 -5
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +7 -85
- package/package.json +5 -5
- package/testing/index.d.ts +1 -1
- package/esm2020/src/browser/transfer_state.mjs +0 -176
@@ -1,13 +1,14 @@
|
|
1
1
|
/**
|
2
|
-
* @license Angular v16.0.0-next.
|
2
|
+
* @license Angular v16.0.0-next.1
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
4
4
|
* License: MIT
|
5
5
|
*/
|
6
6
|
|
7
|
+
import * as i0 from '@angular/core';
|
8
|
+
import { InjectionToken, ApplicationInitStatus, APP_INITIALIZER, Injector, ɵglobal, Injectable, Inject, ViewEncapsulation, APP_ID, RendererStyleFlags2, ɵinternalCreateApplication, ErrorHandler, ɵsetDocument, PLATFORM_ID, PLATFORM_INITIALIZER, createPlatformFactory, platformCore, ɵTESTABILITY_GETTER, ɵTESTABILITY, Testability, NgZone, TestabilityRegistry, ɵINJECTOR_SCOPE, RendererFactory2, ApplicationModule, NgModule, Optional, SkipSelf, ɵɵinject, ApplicationRef, ɵConsole, forwardRef, ɵXSS_SECURITY_URL, SecurityContext, ɵallowSanitizationBypassAndThrow, ɵunwrapSafeValue, ɵ_sanitizeUrl, ɵ_sanitizeHtml, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, Version } from '@angular/core';
|
9
|
+
export { ɵTransferState as TransferState, ɵmakeStateKey as makeStateKey } from '@angular/core';
|
7
10
|
import { ɵDomAdapter, ɵsetRootDomAdapter, ɵparseCookieValue, ɵgetDOM, DOCUMENT, ɵPLATFORM_BROWSER_ID, XhrFactory, CommonModule } from '@angular/common';
|
8
11
|
export { ɵgetDOM } from '@angular/common';
|
9
|
-
import * as i0 from '@angular/core';
|
10
|
-
import { InjectionToken, ApplicationInitStatus, APP_INITIALIZER, Injector, ɵglobal, Injectable, Inject, ViewEncapsulation, APP_ID, RendererStyleFlags2, ɵinternalCreateApplication, ErrorHandler, ɵsetDocument, PLATFORM_ID, PLATFORM_INITIALIZER, createPlatformFactory, platformCore, ɵTESTABILITY_GETTER, ɵTESTABILITY, Testability, NgZone, TestabilityRegistry, ɵINJECTOR_SCOPE, RendererFactory2, ApplicationModule, NgModule, Optional, SkipSelf, ɵɵinject, ApplicationRef, inject, ɵConsole, forwardRef, ɵXSS_SECURITY_URL, SecurityContext, ɵallowSanitizationBypassAndThrow, ɵunwrapSafeValue, ɵ_sanitizeUrl, ɵ_sanitizeHtml, ɵbypassSanitizationTrustHtml, ɵbypassSanitizationTrustStyle, ɵbypassSanitizationTrustScript, ɵbypassSanitizationTrustUrl, ɵbypassSanitizationTrustResourceUrl, Version } from '@angular/core';
|
11
12
|
|
12
13
|
/**
|
13
14
|
* Provides DOM operations in any browser environment.
|
@@ -190,9 +191,9 @@ class BrowserXhr {
|
|
190
191
|
return new XMLHttpRequest();
|
191
192
|
}
|
192
193
|
}
|
193
|
-
BrowserXhr.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
194
|
-
BrowserXhr.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
194
|
+
BrowserXhr.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: BrowserXhr, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
195
|
+
BrowserXhr.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: BrowserXhr });
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: BrowserXhr, decorators: [{
|
196
197
|
type: Injectable
|
197
198
|
}] });
|
198
199
|
|
@@ -268,9 +269,9 @@ class EventManager {
|
|
268
269
|
throw new Error(`No event manager plugin found for event ${eventName}`);
|
269
270
|
}
|
270
271
|
}
|
271
|
-
EventManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
272
|
-
EventManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
272
|
+
EventManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: EventManager, deps: [{ token: EVENT_MANAGER_PLUGINS }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
273
|
+
EventManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: EventManager });
|
274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: EventManager, decorators: [{
|
274
275
|
type: Injectable
|
275
276
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
276
277
|
type: Inject,
|
@@ -333,9 +334,9 @@ class SharedStylesHost {
|
|
333
334
|
this.usageCount.clear();
|
334
335
|
}
|
335
336
|
}
|
336
|
-
SharedStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
337
|
-
SharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
338
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
337
|
+
SharedStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: SharedStylesHost, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
338
|
+
SharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: SharedStylesHost });
|
339
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: SharedStylesHost, decorators: [{
|
339
340
|
type: Injectable
|
340
341
|
}] });
|
341
342
|
class DomSharedStylesHost extends SharedStylesHost {
|
@@ -391,9 +392,9 @@ class DomSharedStylesHost extends SharedStylesHost {
|
|
391
392
|
hostNodes.add(this.doc.head);
|
392
393
|
}
|
393
394
|
}
|
394
|
-
DomSharedStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
395
|
-
DomSharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
396
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
395
|
+
DomSharedStylesHost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomSharedStylesHost, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
396
|
+
DomSharedStylesHost.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomSharedStylesHost });
|
397
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomSharedStylesHost, decorators: [{
|
397
398
|
type: Injectable
|
398
399
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
399
400
|
type: Inject,
|
@@ -511,9 +512,9 @@ class DomRendererFactory2 {
|
|
511
512
|
begin() { }
|
512
513
|
end() { }
|
513
514
|
}
|
514
|
-
DomRendererFactory2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
515
|
-
DomRendererFactory2.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
516
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
515
|
+
DomRendererFactory2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomRendererFactory2, deps: [{ token: EventManager }, { token: DomSharedStylesHost }, { token: APP_ID }, { token: REMOVE_STYLES_ON_COMPONENT_DESTROY }], target: i0.ɵɵFactoryTarget.Injectable });
|
516
|
+
DomRendererFactory2.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomRendererFactory2 });
|
517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomRendererFactory2, decorators: [{
|
517
518
|
type: Injectable
|
518
519
|
}], ctorParameters: function () { return [{ type: EventManager }, { type: DomSharedStylesHost }, { type: undefined, decorators: [{
|
519
520
|
type: Inject,
|
@@ -752,9 +753,9 @@ class DomEventsPlugin extends EventManagerPlugin {
|
|
752
753
|
return target.removeEventListener(eventName, callback);
|
753
754
|
}
|
754
755
|
}
|
755
|
-
DomEventsPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
756
|
-
DomEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
757
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
756
|
+
DomEventsPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
757
|
+
DomEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomEventsPlugin });
|
758
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomEventsPlugin, decorators: [{
|
758
759
|
type: Injectable
|
759
760
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
760
761
|
type: Inject,
|
@@ -931,9 +932,9 @@ class KeyEventsPlugin extends EventManagerPlugin {
|
|
931
932
|
}
|
932
933
|
}
|
933
934
|
}
|
934
|
-
KeyEventsPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
935
|
-
KeyEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
936
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
935
|
+
KeyEventsPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: KeyEventsPlugin, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
936
|
+
KeyEventsPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: KeyEventsPlugin });
|
937
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: KeyEventsPlugin, decorators: [{
|
937
938
|
type: Injectable
|
938
939
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
939
940
|
type: Inject,
|
@@ -1145,13 +1146,13 @@ class BrowserModule {
|
|
1145
1146
|
};
|
1146
1147
|
}
|
1147
1148
|
}
|
1148
|
-
BrowserModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
1149
|
-
BrowserModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.
|
1150
|
-
BrowserModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.
|
1149
|
+
BrowserModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: BrowserModule, deps: [{ token: BROWSER_MODULE_PROVIDERS_MARKER, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
1150
|
+
BrowserModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.1", ngImport: i0, type: BrowserModule, exports: [CommonModule, ApplicationModule] });
|
1151
|
+
BrowserModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: BrowserModule, providers: [
|
1151
1152
|
...BROWSER_MODULE_PROVIDERS,
|
1152
1153
|
...TESTABILITY_PROVIDERS
|
1153
1154
|
], imports: [CommonModule, ApplicationModule] });
|
1154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
1155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: BrowserModule, decorators: [{
|
1155
1156
|
type: NgModule,
|
1156
1157
|
args: [{
|
1157
1158
|
providers: [
|
@@ -1325,9 +1326,9 @@ class Meta {
|
|
1325
1326
|
return META_KEYS_MAP[prop] || prop;
|
1326
1327
|
}
|
1327
1328
|
}
|
1328
|
-
Meta.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
1329
|
-
Meta.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
1330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
1329
|
+
Meta.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: Meta, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
1330
|
+
Meta.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: Meta, providedIn: 'root', useFactory: createMeta, deps: [] });
|
1331
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: Meta, decorators: [{
|
1331
1332
|
type: Injectable,
|
1332
1333
|
args: [{ providedIn: 'root', useFactory: createMeta, deps: [] }]
|
1333
1334
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
@@ -1375,9 +1376,9 @@ class Title {
|
|
1375
1376
|
this._doc.title = newTitle || '';
|
1376
1377
|
}
|
1377
1378
|
}
|
1378
|
-
Title.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
1379
|
-
Title.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
1380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
1379
|
+
Title.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: Title, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
1380
|
+
Title.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: Title, providedIn: 'root', useFactory: createTitle, deps: [] });
|
1381
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: Title, decorators: [{
|
1381
1382
|
type: Injectable,
|
1382
1383
|
args: [{ providedIn: 'root', useFactory: createTitle, deps: [] }]
|
1383
1384
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
@@ -1500,154 +1501,6 @@ function disableDebugTools() {
|
|
1500
1501
|
exportNgVar(PROFILER_GLOBAL_NAME, null);
|
1501
1502
|
}
|
1502
1503
|
|
1503
|
-
function escapeHtml(text) {
|
1504
|
-
const escapedText = {
|
1505
|
-
'&': '&a;',
|
1506
|
-
'"': '&q;',
|
1507
|
-
'\'': '&s;',
|
1508
|
-
'<': '&l;',
|
1509
|
-
'>': '&g;',
|
1510
|
-
};
|
1511
|
-
return text.replace(/[&"'<>]/g, s => escapedText[s]);
|
1512
|
-
}
|
1513
|
-
function unescapeHtml(text) {
|
1514
|
-
const unescapedText = {
|
1515
|
-
'&a;': '&',
|
1516
|
-
'&q;': '"',
|
1517
|
-
'&s;': '\'',
|
1518
|
-
'&l;': '<',
|
1519
|
-
'&g;': '>',
|
1520
|
-
};
|
1521
|
-
return text.replace(/&[^;]+;/g, s => unescapedText[s]);
|
1522
|
-
}
|
1523
|
-
/**
|
1524
|
-
* Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
|
1525
|
-
*
|
1526
|
-
* Example:
|
1527
|
-
*
|
1528
|
-
* ```
|
1529
|
-
* const COUNTER_KEY = makeStateKey<number>('counter');
|
1530
|
-
* let value = 10;
|
1531
|
-
*
|
1532
|
-
* transferState.set(COUNTER_KEY, value);
|
1533
|
-
* ```
|
1534
|
-
*
|
1535
|
-
* @publicApi
|
1536
|
-
*/
|
1537
|
-
function makeStateKey(key) {
|
1538
|
-
return key;
|
1539
|
-
}
|
1540
|
-
/**
|
1541
|
-
* A key value store that is transferred from the application on the server side to the application
|
1542
|
-
* on the client side.
|
1543
|
-
*
|
1544
|
-
* The `TransferState` is available as an injectable token.
|
1545
|
-
* On the client, just inject this token using DI and use it, it will be lazily initialized.
|
1546
|
-
* On the server it's already included if `renderApplication` function is used. Otherwise, import
|
1547
|
-
* the `ServerTransferStateModule` module to make the `TransferState` available.
|
1548
|
-
*
|
1549
|
-
* The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
|
1550
|
-
* boolean, number, string, null and non-class objects will be serialized and deserialized in a
|
1551
|
-
* non-lossy manner.
|
1552
|
-
*
|
1553
|
-
* @publicApi
|
1554
|
-
*/
|
1555
|
-
class TransferState {
|
1556
|
-
constructor() {
|
1557
|
-
this.store = {};
|
1558
|
-
this.onSerializeCallbacks = {};
|
1559
|
-
}
|
1560
|
-
/**
|
1561
|
-
* Get the value corresponding to a key. Return `defaultValue` if key is not found.
|
1562
|
-
*/
|
1563
|
-
get(key, defaultValue) {
|
1564
|
-
return this.store[key] !== undefined ? this.store[key] : defaultValue;
|
1565
|
-
}
|
1566
|
-
/**
|
1567
|
-
* Set the value corresponding to a key.
|
1568
|
-
*/
|
1569
|
-
set(key, value) {
|
1570
|
-
this.store[key] = value;
|
1571
|
-
}
|
1572
|
-
/**
|
1573
|
-
* Remove a key from the store.
|
1574
|
-
*/
|
1575
|
-
remove(key) {
|
1576
|
-
delete this.store[key];
|
1577
|
-
}
|
1578
|
-
/**
|
1579
|
-
* Test whether a key exists in the store.
|
1580
|
-
*/
|
1581
|
-
hasKey(key) {
|
1582
|
-
return this.store.hasOwnProperty(key);
|
1583
|
-
}
|
1584
|
-
/**
|
1585
|
-
* Indicates whether the state is empty.
|
1586
|
-
*/
|
1587
|
-
get isEmpty() {
|
1588
|
-
return Object.keys(this.store).length === 0;
|
1589
|
-
}
|
1590
|
-
/**
|
1591
|
-
* Register a callback to provide the value for a key when `toJson` is called.
|
1592
|
-
*/
|
1593
|
-
onSerialize(key, callback) {
|
1594
|
-
this.onSerializeCallbacks[key] = callback;
|
1595
|
-
}
|
1596
|
-
/**
|
1597
|
-
* Serialize the current state of the store to JSON.
|
1598
|
-
*/
|
1599
|
-
toJson() {
|
1600
|
-
// Call the onSerialize callbacks and put those values into the store.
|
1601
|
-
for (const key in this.onSerializeCallbacks) {
|
1602
|
-
if (this.onSerializeCallbacks.hasOwnProperty(key)) {
|
1603
|
-
try {
|
1604
|
-
this.store[key] = this.onSerializeCallbacks[key]();
|
1605
|
-
}
|
1606
|
-
catch (e) {
|
1607
|
-
console.warn('Exception in onSerialize callback: ', e);
|
1608
|
-
}
|
1609
|
-
}
|
1610
|
-
}
|
1611
|
-
return JSON.stringify(this.store);
|
1612
|
-
}
|
1613
|
-
}
|
1614
|
-
TransferState.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.0", ngImport: i0, type: TransferState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
1615
|
-
TransferState.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.0", ngImport: i0, type: TransferState, providedIn: 'root', useFactory: () => {
|
1616
|
-
const doc = inject(DOCUMENT);
|
1617
|
-
const appId = inject(APP_ID);
|
1618
|
-
const state = new TransferState();
|
1619
|
-
state.store = retrieveTransferredState(doc, appId);
|
1620
|
-
return state;
|
1621
|
-
} });
|
1622
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.0", ngImport: i0, type: TransferState, decorators: [{
|
1623
|
-
type: Injectable,
|
1624
|
-
args: [{
|
1625
|
-
providedIn: 'root',
|
1626
|
-
useFactory: () => {
|
1627
|
-
const doc = inject(DOCUMENT);
|
1628
|
-
const appId = inject(APP_ID);
|
1629
|
-
const state = new TransferState();
|
1630
|
-
state.store = retrieveTransferredState(doc, appId);
|
1631
|
-
return state;
|
1632
|
-
}
|
1633
|
-
}]
|
1634
|
-
}] });
|
1635
|
-
function retrieveTransferredState(doc, appId) {
|
1636
|
-
// Locate the script tag with the JSON data transferred from the server.
|
1637
|
-
// The id of the script tag is set to the Angular appId + 'state'.
|
1638
|
-
const script = doc.getElementById(appId + '-state');
|
1639
|
-
let initialState = {};
|
1640
|
-
if (script && script.textContent) {
|
1641
|
-
try {
|
1642
|
-
// Avoid using any here as it triggers lint errors in google3 (any is not allowed).
|
1643
|
-
initialState = JSON.parse(unescapeHtml(script.textContent));
|
1644
|
-
}
|
1645
|
-
catch (e) {
|
1646
|
-
console.warn('Exception while restoring TransferState for app ' + appId, e);
|
1647
|
-
}
|
1648
|
-
}
|
1649
|
-
return initialState;
|
1650
|
-
}
|
1651
1504
|
/**
|
1652
1505
|
* NgModule to install on the client side while using the `TransferState` to transfer state from
|
1653
1506
|
* server to client.
|
@@ -1658,10 +1511,10 @@ function retrieveTransferredState(doc, appId) {
|
|
1658
1511
|
*/
|
1659
1512
|
class BrowserTransferStateModule {
|
1660
1513
|
}
|
1661
|
-
BrowserTransferStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
1662
|
-
BrowserTransferStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.
|
1663
|
-
BrowserTransferStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.
|
1664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
1514
|
+
BrowserTransferStateModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: BrowserTransferStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1515
|
+
BrowserTransferStateModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.1", ngImport: i0, type: BrowserTransferStateModule });
|
1516
|
+
BrowserTransferStateModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: BrowserTransferStateModule });
|
1517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: BrowserTransferStateModule, decorators: [{
|
1665
1518
|
type: NgModule,
|
1666
1519
|
args: [{}]
|
1667
1520
|
}] });
|
@@ -1821,9 +1674,9 @@ class HammerGestureConfig {
|
|
1821
1674
|
return mc;
|
1822
1675
|
}
|
1823
1676
|
}
|
1824
|
-
HammerGestureConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
1825
|
-
HammerGestureConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
1826
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
1677
|
+
HammerGestureConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: HammerGestureConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
1678
|
+
HammerGestureConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: HammerGestureConfig });
|
1679
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: HammerGestureConfig, decorators: [{
|
1827
1680
|
type: Injectable
|
1828
1681
|
}] });
|
1829
1682
|
/**
|
@@ -1919,9 +1772,9 @@ class HammerGesturesPlugin extends EventManagerPlugin {
|
|
1919
1772
|
return this._config.events.indexOf(eventName) > -1;
|
1920
1773
|
}
|
1921
1774
|
}
|
1922
|
-
HammerGesturesPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
1923
|
-
HammerGesturesPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
1924
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
1775
|
+
HammerGesturesPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: HammerGesturesPlugin, deps: [{ token: DOCUMENT }, { token: HAMMER_GESTURE_CONFIG }, { token: i0.ɵConsole }, { token: HAMMER_LOADER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
1776
|
+
HammerGesturesPlugin.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: HammerGesturesPlugin });
|
1777
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: HammerGesturesPlugin, decorators: [{
|
1925
1778
|
type: Injectable
|
1926
1779
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
1927
1780
|
type: Inject,
|
@@ -1948,9 +1801,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.0",
|
|
1948
1801
|
*/
|
1949
1802
|
class HammerModule {
|
1950
1803
|
}
|
1951
|
-
HammerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
1952
|
-
HammerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.
|
1953
|
-
HammerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.
|
1804
|
+
HammerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: HammerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1805
|
+
HammerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0-next.1", ngImport: i0, type: HammerModule });
|
1806
|
+
HammerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: HammerModule, providers: [
|
1954
1807
|
{
|
1955
1808
|
provide: EVENT_MANAGER_PLUGINS,
|
1956
1809
|
useClass: HammerGesturesPlugin,
|
@@ -1959,7 +1812,7 @@ HammerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1959
1812
|
},
|
1960
1813
|
{ provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: [] },
|
1961
1814
|
] });
|
1962
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
1815
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: HammerModule, decorators: [{
|
1963
1816
|
type: NgModule,
|
1964
1817
|
args: [{
|
1965
1818
|
providers: [
|
@@ -2007,9 +1860,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.0",
|
|
2007
1860
|
*/
|
2008
1861
|
class DomSanitizer {
|
2009
1862
|
}
|
2010
|
-
DomSanitizer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
2011
|
-
DomSanitizer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
2012
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
1863
|
+
DomSanitizer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomSanitizer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
1864
|
+
DomSanitizer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomSanitizer, providedIn: 'root', useExisting: i0.forwardRef(function () { return DomSanitizerImpl; }) });
|
1865
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomSanitizer, decorators: [{
|
2013
1866
|
type: Injectable,
|
2014
1867
|
args: [{ providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl) }]
|
2015
1868
|
}] });
|
@@ -2072,9 +1925,9 @@ class DomSanitizerImpl extends DomSanitizer {
|
|
2072
1925
|
return ɵbypassSanitizationTrustResourceUrl(value);
|
2073
1926
|
}
|
2074
1927
|
}
|
2075
|
-
DomSanitizerImpl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.
|
2076
|
-
DomSanitizerImpl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.
|
2077
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.
|
1928
|
+
DomSanitizerImpl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomSanitizerImpl, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
1929
|
+
DomSanitizerImpl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomSanitizerImpl, providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [{ token: Injector }] });
|
1930
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.1", ngImport: i0, type: DomSanitizerImpl, decorators: [{
|
2078
1931
|
type: Injectable,
|
2079
1932
|
args: [{ providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [Injector] }]
|
2080
1933
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
@@ -2090,7 +1943,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0-next.0",
|
|
2090
1943
|
/**
|
2091
1944
|
* @publicApi
|
2092
1945
|
*/
|
2093
|
-
const VERSION = new Version('16.0.0-next.
|
1946
|
+
const VERSION = new Version('16.0.0-next.1');
|
1947
|
+
|
1948
|
+
// Re-export TransferState to the public API of the `platform-browser` for backwards-compatibility.
|
2094
1949
|
|
2095
1950
|
/**
|
2096
1951
|
* @module
|
@@ -2105,5 +1960,5 @@ const VERSION = new Version('16.0.0-next.0');
|
|
2105
1960
|
* Generated bundle index. Do not edit.
|
2106
1961
|
*/
|
2107
1962
|
|
2108
|
-
export { BrowserModule, BrowserTransferStateModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, Meta, REMOVE_STYLES_ON_COMPONENT_DESTROY, Title,
|
1963
|
+
export { BrowserModule, BrowserTransferStateModule, By, DomSanitizer, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HammerGestureConfig, HammerModule, Meta, REMOVE_STYLES_ON_COMPONENT_DESTROY, Title, VERSION, bootstrapApplication, createApplication, disableDebugTools, enableDebugTools, platformBrowser, provideProtractorTestingSupport, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserGetTestability as ɵBrowserGetTestability, DomEventsPlugin as ɵDomEventsPlugin, DomRendererFactory2 as ɵDomRendererFactory2, DomSanitizerImpl as ɵDomSanitizerImpl, DomSharedStylesHost as ɵDomSharedStylesHost, HammerGesturesPlugin as ɵHammerGesturesPlugin, INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, KeyEventsPlugin as ɵKeyEventsPlugin, NAMESPACE_URIS as ɵNAMESPACE_URIS, SharedStylesHost as ɵSharedStylesHost, TRANSITION_ID as ɵTRANSITION_ID, initDomAdapter as ɵinitDomAdapter, shimContentAttribute as ɵshimContentAttribute, shimHostAttribute as ɵshimHostAttribute, shimStylesContent as ɵshimStyles };
|
2109
1964
|
//# sourceMappingURL=platform-browser.mjs.map
|