@angular/core 14.0.0-next.13 → 14.0.0-next.14
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/core.d.ts +121 -65
- package/esm2020/src/application_ref.mjs +109 -22
- package/esm2020/src/compiler/compiler_facade_interface.mjs +7 -1
- package/esm2020/src/core.mjs +2 -2
- package/esm2020/src/core_render3_private_export.mjs +2 -2
- package/esm2020/src/di/index.mjs +2 -1
- package/esm2020/src/di/injection_token.mjs +7 -1
- package/esm2020/src/di/interface/defs.mjs +1 -1
- package/esm2020/src/di/r3_injector.mjs +216 -125
- package/esm2020/src/di/scope.mjs +1 -1
- package/esm2020/src/errors.mjs +1 -1
- package/esm2020/src/linker/component_factory.mjs +1 -1
- package/esm2020/src/linker/ng_module_factory.mjs +1 -1
- package/esm2020/src/linker/view_container_ref.mjs +12 -9
- package/esm2020/src/render3/component_ref.mjs +8 -4
- package/esm2020/src/render3/definition.mjs +14 -20
- package/esm2020/src/render3/errors.mjs +6 -3
- package/esm2020/src/render3/errors_di.mjs +1 -1
- package/esm2020/src/render3/features/inherit_definition_feature.mjs +3 -2
- package/esm2020/src/render3/features/standalone_feature.mjs +7 -0
- package/esm2020/src/render3/index.mjs +4 -3
- package/esm2020/src/render3/instructions/shared.mjs +6 -3
- package/esm2020/src/render3/interfaces/definition.mjs +1 -1
- package/esm2020/src/render3/interfaces/public_definitions.mjs +1 -1
- package/esm2020/src/render3/jit/directive.mjs +2 -3
- package/esm2020/src/render3/jit/environment.mjs +2 -1
- package/esm2020/src/render3/ng_module_ref.mjs +33 -4
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/fesm2015/core.mjs +414 -180
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +1 -1
- package/fesm2020/core.mjs +412 -181
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +1 -1
- package/package.json +1 -1
- package/testing/testing.d.ts +1 -1
package/fesm2020/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-next.
|
|
2
|
+
* @license Angular v14.0.0-next.14
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -918,19 +918,21 @@ function ɵɵdefineComponent(componentDefinition) {
|
|
|
918
918
|
schemas: componentDefinition.schemas || null,
|
|
919
919
|
tView: null,
|
|
920
920
|
};
|
|
921
|
-
const
|
|
921
|
+
const dependencies = componentDefinition.dependencies;
|
|
922
922
|
const feature = componentDefinition.features;
|
|
923
|
-
const pipeTypes = componentDefinition.pipes;
|
|
924
923
|
def.id += _renderCompCount++;
|
|
925
924
|
def.inputs = invertObject(componentDefinition.inputs, declaredInputs),
|
|
926
925
|
def.outputs = invertObject(componentDefinition.outputs),
|
|
927
926
|
feature && feature.forEach((fn) => fn(def));
|
|
928
|
-
def.directiveDefs =
|
|
929
|
-
() => (typeof
|
|
930
|
-
.map(extractDirectiveDef)
|
|
927
|
+
def.directiveDefs = dependencies ?
|
|
928
|
+
(() => (typeof dependencies === 'function' ? dependencies() : dependencies)
|
|
929
|
+
.map(extractDirectiveDef)
|
|
930
|
+
.filter(nonNull)) :
|
|
931
931
|
null;
|
|
932
|
-
def.pipeDefs =
|
|
933
|
-
() => (typeof
|
|
932
|
+
def.pipeDefs = dependencies ?
|
|
933
|
+
(() => (typeof dependencies === 'function' ? dependencies() : dependencies)
|
|
934
|
+
.map(getPipeDef$1)
|
|
935
|
+
.filter(nonNull)) :
|
|
934
936
|
null;
|
|
935
937
|
return def;
|
|
936
938
|
});
|
|
@@ -947,21 +949,13 @@ function ɵɵdefineComponent(componentDefinition) {
|
|
|
947
949
|
function ɵɵsetComponentScope(type, directives, pipes) {
|
|
948
950
|
const def = type.ɵcmp;
|
|
949
951
|
def.directiveDefs = () => directives.map(extractDirectiveDef);
|
|
950
|
-
def.pipeDefs = () => pipes.map(
|
|
952
|
+
def.pipeDefs = () => pipes.map(getPipeDef$1);
|
|
951
953
|
}
|
|
952
954
|
function extractDirectiveDef(type) {
|
|
953
|
-
|
|
954
|
-
if (ngDevMode && !def) {
|
|
955
|
-
throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`);
|
|
956
|
-
}
|
|
957
|
-
return def;
|
|
955
|
+
return getComponentDef(type) || getDirectiveDef(type);
|
|
958
956
|
}
|
|
959
|
-
function
|
|
960
|
-
|
|
961
|
-
if (ngDevMode && !def) {
|
|
962
|
-
throw new Error(`'${type.name}' is not a 'PipeType'.`);
|
|
963
|
-
}
|
|
964
|
-
return def;
|
|
957
|
+
function nonNull(value) {
|
|
958
|
+
return value !== null;
|
|
965
959
|
}
|
|
966
960
|
const autoRegisterModuleById = {};
|
|
967
961
|
/**
|
|
@@ -4015,6 +4009,12 @@ class InjectionToken {
|
|
|
4015
4009
|
});
|
|
4016
4010
|
}
|
|
4017
4011
|
}
|
|
4012
|
+
/**
|
|
4013
|
+
* @internal
|
|
4014
|
+
*/
|
|
4015
|
+
get multi() {
|
|
4016
|
+
return this;
|
|
4017
|
+
}
|
|
4018
4018
|
toString() {
|
|
4019
4019
|
return `InjectionToken ${this._desc}`;
|
|
4020
4020
|
}
|
|
@@ -4141,6 +4141,12 @@ var FactoryTarget;
|
|
|
4141
4141
|
FactoryTarget[FactoryTarget["Pipe"] = 3] = "Pipe";
|
|
4142
4142
|
FactoryTarget[FactoryTarget["NgModule"] = 4] = "NgModule";
|
|
4143
4143
|
})(FactoryTarget || (FactoryTarget = {}));
|
|
4144
|
+
var R3TemplateDependencyKind;
|
|
4145
|
+
(function (R3TemplateDependencyKind) {
|
|
4146
|
+
R3TemplateDependencyKind[R3TemplateDependencyKind["Directive"] = 0] = "Directive";
|
|
4147
|
+
R3TemplateDependencyKind[R3TemplateDependencyKind["Pipe"] = 1] = "Pipe";
|
|
4148
|
+
R3TemplateDependencyKind[R3TemplateDependencyKind["NgModule"] = 2] = "NgModule";
|
|
4149
|
+
})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {}));
|
|
4144
4150
|
var ViewEncapsulation;
|
|
4145
4151
|
(function (ViewEncapsulation) {
|
|
4146
4152
|
ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated";
|
|
@@ -6922,8 +6928,10 @@ function maybeUnwrapFn(value) {
|
|
|
6922
6928
|
* found in the LICENSE file at https://angular.io/license
|
|
6923
6929
|
*/
|
|
6924
6930
|
/** Called when there are multiple component selectors that match a given node */
|
|
6925
|
-
function throwMultipleComponentError(tNode) {
|
|
6926
|
-
throw new RuntimeError(-300 /* MULTIPLE_COMPONENTS_MATCH */, `Multiple components match node with tagname ${tNode.value}`
|
|
6931
|
+
function throwMultipleComponentError(tNode, first, second) {
|
|
6932
|
+
throw new RuntimeError(-300 /* MULTIPLE_COMPONENTS_MATCH */, `Multiple components match node with tagname ${tNode.value}: ` +
|
|
6933
|
+
`${stringifyForError(first)} and ` +
|
|
6934
|
+
`${stringifyForError(second)}`);
|
|
6927
6935
|
}
|
|
6928
6936
|
/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */
|
|
6929
6937
|
function throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) {
|
|
@@ -10598,8 +10606,11 @@ function findDirectiveDefMatches(tView, viewData, tNode) {
|
|
|
10598
10606
|
if (ngDevMode) {
|
|
10599
10607
|
assertTNodeType(tNode, 2 /* Element */, `"${tNode.value}" tags cannot be used as component hosts. ` +
|
|
10600
10608
|
`Please use a different tag to activate the ${stringify(def.type)} component.`);
|
|
10601
|
-
if (tNode.flags & 2 /* isComponentHost */)
|
|
10602
|
-
|
|
10609
|
+
if (tNode.flags & 2 /* isComponentHost */) {
|
|
10610
|
+
// If another component has been matched previously, it's the first element in the
|
|
10611
|
+
// `matches` array, see how we store components/directives in `matches` below.
|
|
10612
|
+
throwMultipleComponentError(tNode, matches[0].type, def.type);
|
|
10613
|
+
}
|
|
10603
10614
|
}
|
|
10604
10615
|
markAsComponentHost(tView, tNode);
|
|
10605
10616
|
// The component is always stored first with directives after.
|
|
@@ -11401,6 +11412,14 @@ const NOT_YET = {};
|
|
|
11401
11412
|
* a circular dependency among the providers.
|
|
11402
11413
|
*/
|
|
11403
11414
|
const CIRCULAR = {};
|
|
11415
|
+
/**
|
|
11416
|
+
* A multi-provider token for initialization functions that will run upon construction of a
|
|
11417
|
+
* non-view injector.
|
|
11418
|
+
*
|
|
11419
|
+
* @publicApi
|
|
11420
|
+
*/
|
|
11421
|
+
const INJECTOR_INITIALIZER = new InjectionToken('INJECTOR_INITIALIZER');
|
|
11422
|
+
const INJECTOR_DEF_TYPES = new InjectionToken('INJECTOR_DEF_TYPES');
|
|
11404
11423
|
/**
|
|
11405
11424
|
* A lazily initialized NullInjector.
|
|
11406
11425
|
*/
|
|
@@ -11418,7 +11437,7 @@ function getNullInjector() {
|
|
|
11418
11437
|
*/
|
|
11419
11438
|
function createInjector(defType, parent = null, additionalProviders = null, name) {
|
|
11420
11439
|
const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);
|
|
11421
|
-
injector.
|
|
11440
|
+
injector.resolveInjectorInitializers();
|
|
11422
11441
|
return injector;
|
|
11423
11442
|
}
|
|
11424
11443
|
/**
|
|
@@ -11426,42 +11445,180 @@ function createInjector(defType, parent = null, additionalProviders = null, name
|
|
|
11426
11445
|
* where resolving the injector types immediately can lead to an infinite loop. The injector types
|
|
11427
11446
|
* should be resolved at a later point by calling `_resolveInjectorDefTypes`.
|
|
11428
11447
|
*/
|
|
11429
|
-
function createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name) {
|
|
11430
|
-
|
|
11448
|
+
function createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name, scopes = new Set()) {
|
|
11449
|
+
const providers = [
|
|
11450
|
+
...flatten(additionalProviders || EMPTY_ARRAY),
|
|
11451
|
+
...importProvidersFrom(defType),
|
|
11452
|
+
];
|
|
11453
|
+
name = name || (typeof defType === 'object' ? undefined : stringify(defType));
|
|
11454
|
+
return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);
|
|
11431
11455
|
}
|
|
11432
|
-
|
|
11433
|
-
|
|
11456
|
+
/**
|
|
11457
|
+
* The logic visits an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive
|
|
11458
|
+
* providers and invokes specified callbacks when:
|
|
11459
|
+
* - an injector type is visited (typically an NgModule)
|
|
11460
|
+
* - a provider is visited
|
|
11461
|
+
*
|
|
11462
|
+
* If an `InjectorTypeWithProviders` that declares providers besides the type is specified,
|
|
11463
|
+
* the function will return "true" to indicate that the providers of the type definition need
|
|
11464
|
+
* to be processed. This allows us to process providers of injector types after all imports of
|
|
11465
|
+
* an injector definition are processed. (following View Engine semantics: see FW-1349)
|
|
11466
|
+
*/
|
|
11467
|
+
function walkProviderTree(container, providersOut, parents, dedup) {
|
|
11468
|
+
container = resolveForwardRef(container);
|
|
11469
|
+
if (!container)
|
|
11470
|
+
return false;
|
|
11471
|
+
// Either the defOrWrappedDef is an InjectorType (with injector def) or an
|
|
11472
|
+
// InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic
|
|
11473
|
+
// read, so care is taken to only do the read once.
|
|
11474
|
+
// First attempt to read the injector def (`ɵinj`).
|
|
11475
|
+
let def = getInjectorDef(container);
|
|
11476
|
+
// If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.
|
|
11477
|
+
const ngModule = (def == null) && container.ngModule || undefined;
|
|
11478
|
+
// Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,
|
|
11479
|
+
// then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type
|
|
11480
|
+
// is the `ngModule`.
|
|
11481
|
+
const defType = (ngModule === undefined) ? container : ngModule;
|
|
11482
|
+
// Check for circular dependencies.
|
|
11483
|
+
if (ngDevMode && parents.indexOf(defType) !== -1) {
|
|
11484
|
+
const defName = stringify(defType);
|
|
11485
|
+
const path = parents.map(stringify);
|
|
11486
|
+
throwCyclicDependencyError(defName, path);
|
|
11487
|
+
}
|
|
11488
|
+
// Check for multiple imports of the same module
|
|
11489
|
+
const isDuplicate = dedup.has(defType);
|
|
11490
|
+
// Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual
|
|
11491
|
+
// `InjectorDef` is on its `ngModule`.
|
|
11492
|
+
if (ngModule !== undefined) {
|
|
11493
|
+
def = getInjectorDef(ngModule);
|
|
11494
|
+
}
|
|
11495
|
+
// If no definition was found, it might be from exports. Remove it.
|
|
11496
|
+
if (def == null) {
|
|
11497
|
+
return false;
|
|
11498
|
+
}
|
|
11499
|
+
// Add providers in the same way that @NgModule resolution did:
|
|
11500
|
+
// First, include providers from any imports.
|
|
11501
|
+
if (def.imports != null && !isDuplicate) {
|
|
11502
|
+
// Before processing defType's imports, add it to the set of parents. This way, if it ends
|
|
11503
|
+
// up deeply importing itself, this can be detected.
|
|
11504
|
+
ngDevMode && parents.push(defType);
|
|
11505
|
+
// Add it to the set of dedups. This way we can detect multiple imports of the same module
|
|
11506
|
+
dedup.add(defType);
|
|
11507
|
+
let importTypesWithProviders;
|
|
11508
|
+
try {
|
|
11509
|
+
deepForEach(def.imports, imported => {
|
|
11510
|
+
if (walkProviderTree(imported, providersOut, parents, dedup)) {
|
|
11511
|
+
if (importTypesWithProviders === undefined)
|
|
11512
|
+
importTypesWithProviders = [];
|
|
11513
|
+
// If the processed import is an injector type with providers, we store it in the
|
|
11514
|
+
// list of import types with providers, so that we can process those afterwards.
|
|
11515
|
+
importTypesWithProviders.push(imported);
|
|
11516
|
+
}
|
|
11517
|
+
});
|
|
11518
|
+
}
|
|
11519
|
+
finally {
|
|
11520
|
+
// Remove it from the parents set when finished.
|
|
11521
|
+
ngDevMode && parents.pop();
|
|
11522
|
+
}
|
|
11523
|
+
// Imports which are declared with providers (TypeWithProviders) need to be processed
|
|
11524
|
+
// after all imported modules are processed. This is similar to how View Engine
|
|
11525
|
+
// processes/merges module imports in the metadata resolver. See: FW-1349.
|
|
11526
|
+
if (importTypesWithProviders !== undefined) {
|
|
11527
|
+
for (let i = 0; i < importTypesWithProviders.length; i++) {
|
|
11528
|
+
const { ngModule, providers } = importTypesWithProviders[i];
|
|
11529
|
+
deepForEach(providers, provider => {
|
|
11530
|
+
validateProvider(provider, providers || EMPTY_ARRAY, ngModule);
|
|
11531
|
+
providersOut.push(provider);
|
|
11532
|
+
});
|
|
11533
|
+
}
|
|
11534
|
+
}
|
|
11535
|
+
}
|
|
11536
|
+
// Track the InjectorType and add a provider for it.
|
|
11537
|
+
// It's important that this is done after the def's imports.
|
|
11538
|
+
const factory = getFactoryDef(defType) || (() => new defType());
|
|
11539
|
+
// Provider to create `defType` using its factory.
|
|
11540
|
+
providersOut.push({
|
|
11541
|
+
provide: defType,
|
|
11542
|
+
useFactory: factory,
|
|
11543
|
+
deps: EMPTY_ARRAY,
|
|
11544
|
+
});
|
|
11545
|
+
providersOut.push({
|
|
11546
|
+
provide: INJECTOR_DEF_TYPES,
|
|
11547
|
+
useValue: defType,
|
|
11548
|
+
multi: true,
|
|
11549
|
+
});
|
|
11550
|
+
// Provider to eagerly instantiate `defType` via `INJECTOR_INITIALIZER`.
|
|
11551
|
+
providersOut.push({
|
|
11552
|
+
provide: INJECTOR_INITIALIZER,
|
|
11553
|
+
useValue: () => inject(defType),
|
|
11554
|
+
multi: true,
|
|
11555
|
+
});
|
|
11556
|
+
// Next, include providers listed on the definition itself.
|
|
11557
|
+
const defProviders = def.providers;
|
|
11558
|
+
if (defProviders != null && !isDuplicate) {
|
|
11559
|
+
const injectorType = container;
|
|
11560
|
+
deepForEach(defProviders, provider => {
|
|
11561
|
+
// TODO: fix cast
|
|
11562
|
+
validateProvider(provider, defProviders, injectorType);
|
|
11563
|
+
providersOut.push(provider);
|
|
11564
|
+
});
|
|
11565
|
+
}
|
|
11566
|
+
return (ngModule !== undefined &&
|
|
11567
|
+
container.providers !== undefined);
|
|
11568
|
+
}
|
|
11569
|
+
/**
|
|
11570
|
+
* An `Injector` that's part of the environment injector hierarchy, which exists outside of the
|
|
11571
|
+
* component tree.
|
|
11572
|
+
*/
|
|
11573
|
+
class EnvironmentInjector {
|
|
11574
|
+
}
|
|
11575
|
+
/**
|
|
11576
|
+
* Collects providers from all NgModules, including transitively imported ones.
|
|
11577
|
+
*
|
|
11578
|
+
* @returns The list of collected providers from the specified list of NgModules.
|
|
11579
|
+
* @publicApi
|
|
11580
|
+
*/
|
|
11581
|
+
function importProvidersFrom(...injectorTypes) {
|
|
11582
|
+
const providers = [];
|
|
11583
|
+
deepForEach(injectorTypes, injectorDef => walkProviderTree(injectorDef, providers, [], new Set()));
|
|
11584
|
+
return providers;
|
|
11585
|
+
}
|
|
11586
|
+
class R3Injector extends EnvironmentInjector {
|
|
11587
|
+
constructor(providers, parent, source, scopes) {
|
|
11588
|
+
super();
|
|
11434
11589
|
this.parent = parent;
|
|
11590
|
+
this.source = source;
|
|
11591
|
+
this.scopes = scopes;
|
|
11435
11592
|
/**
|
|
11436
11593
|
* Map of tokens to records which contain the instances of those tokens.
|
|
11437
11594
|
* - `null` value implies that we don't have the record. Used by tree-shakable injectors
|
|
11438
11595
|
* to prevent further searches.
|
|
11439
11596
|
*/
|
|
11440
11597
|
this.records = new Map();
|
|
11441
|
-
/**
|
|
11442
|
-
* The transitive set of `InjectorType`s which define this injector.
|
|
11443
|
-
*/
|
|
11444
|
-
this.injectorDefTypes = new Set();
|
|
11445
11598
|
/**
|
|
11446
11599
|
* Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.
|
|
11447
11600
|
*/
|
|
11448
|
-
this.
|
|
11601
|
+
this._ngOnDestroyHooks = new Set();
|
|
11602
|
+
this._onDestroyHooks = [];
|
|
11449
11603
|
this._destroyed = false;
|
|
11450
|
-
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
additionalProviders &&
|
|
11455
|
-
deepForEach(additionalProviders, provider => this.processProvider(provider, def, additionalProviders));
|
|
11456
|
-
deepForEach([def], injectorDef => this.processInjectorType(injectorDef, [], dedupStack));
|
|
11604
|
+
// Start off by creating Records for every provider.
|
|
11605
|
+
for (const provider of providers) {
|
|
11606
|
+
this.processProvider(provider);
|
|
11607
|
+
}
|
|
11457
11608
|
// Make sure the INJECTOR token provides this injector.
|
|
11458
11609
|
this.records.set(INJECTOR, makeRecord(undefined, this));
|
|
11610
|
+
// And `EnvironmentInjector` if the current injector is supposed to be env-scoped.
|
|
11611
|
+
if (scopes.has('environment')) {
|
|
11612
|
+
this.records.set(EnvironmentInjector, makeRecord(undefined, this));
|
|
11613
|
+
}
|
|
11459
11614
|
// Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide
|
|
11460
11615
|
// any injectable scoped to APP_ROOT_SCOPE.
|
|
11461
11616
|
const record = this.records.get(INJECTOR_SCOPE);
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
11617
|
+
if (record != null && typeof record.value === 'string') {
|
|
11618
|
+
this.scopes.add(record.value);
|
|
11619
|
+
}
|
|
11620
|
+
this.injectorDefTypes =
|
|
11621
|
+
new Set(this.get(INJECTOR_DEF_TYPES.multi, EMPTY_ARRAY, InjectFlags.Self));
|
|
11465
11622
|
}
|
|
11466
11623
|
/**
|
|
11467
11624
|
* Flag indicating that this injector was previously destroyed.
|
|
@@ -11481,15 +11638,24 @@ class R3Injector {
|
|
|
11481
11638
|
this._destroyed = true;
|
|
11482
11639
|
try {
|
|
11483
11640
|
// Call all the lifecycle hooks.
|
|
11484
|
-
|
|
11641
|
+
for (const service of this._ngOnDestroyHooks) {
|
|
11642
|
+
service.ngOnDestroy();
|
|
11643
|
+
}
|
|
11644
|
+
for (const hook of this._onDestroyHooks) {
|
|
11645
|
+
hook();
|
|
11646
|
+
}
|
|
11485
11647
|
}
|
|
11486
11648
|
finally {
|
|
11487
11649
|
// Release all references.
|
|
11488
11650
|
this.records.clear();
|
|
11489
|
-
this.
|
|
11651
|
+
this._ngOnDestroyHooks.clear();
|
|
11490
11652
|
this.injectorDefTypes.clear();
|
|
11653
|
+
this._onDestroyHooks.length = 0;
|
|
11491
11654
|
}
|
|
11492
11655
|
}
|
|
11656
|
+
onDestroy(callback) {
|
|
11657
|
+
this._onDestroyHooks.push(callback);
|
|
11658
|
+
}
|
|
11493
11659
|
get(token, notFoundValue = THROW_IF_NOT_FOUND, flags = InjectFlags.Default) {
|
|
11494
11660
|
this.assertNotDestroyed();
|
|
11495
11661
|
// Set the injection context.
|
|
@@ -11553,12 +11719,26 @@ class R3Injector {
|
|
|
11553
11719
|
}
|
|
11554
11720
|
}
|
|
11555
11721
|
/** @internal */
|
|
11556
|
-
|
|
11557
|
-
|
|
11722
|
+
resolveInjectorInitializers() {
|
|
11723
|
+
const previousInjector = setCurrentInjector(this);
|
|
11724
|
+
const previousInjectImplementation = setInjectImplementation(undefined);
|
|
11725
|
+
try {
|
|
11726
|
+
const initializers = this.get(INJECTOR_INITIALIZER.multi, EMPTY_ARRAY, InjectFlags.Self);
|
|
11727
|
+
for (const initializer of initializers) {
|
|
11728
|
+
initializer();
|
|
11729
|
+
}
|
|
11730
|
+
}
|
|
11731
|
+
finally {
|
|
11732
|
+
setCurrentInjector(previousInjector);
|
|
11733
|
+
setInjectImplementation(previousInjectImplementation);
|
|
11734
|
+
}
|
|
11558
11735
|
}
|
|
11559
11736
|
toString() {
|
|
11560
|
-
const tokens = []
|
|
11561
|
-
records
|
|
11737
|
+
const tokens = [];
|
|
11738
|
+
const records = this.records;
|
|
11739
|
+
for (const token of records.keys()) {
|
|
11740
|
+
tokens.push(stringify(token));
|
|
11741
|
+
}
|
|
11562
11742
|
return `R3Injector[${tokens.join(', ')}]`;
|
|
11563
11743
|
}
|
|
11564
11744
|
assertNotDestroyed() {
|
|
@@ -11566,105 +11746,16 @@ class R3Injector {
|
|
|
11566
11746
|
throw new RuntimeError(205 /* INJECTOR_ALREADY_DESTROYED */, ngDevMode && 'Injector has already been destroyed.');
|
|
11567
11747
|
}
|
|
11568
11748
|
}
|
|
11569
|
-
/**
|
|
11570
|
-
* Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers
|
|
11571
|
-
* to this injector.
|
|
11572
|
-
*
|
|
11573
|
-
* If an `InjectorTypeWithProviders` that declares providers besides the type is specified,
|
|
11574
|
-
* the function will return "true" to indicate that the providers of the type definition need
|
|
11575
|
-
* to be processed. This allows us to process providers of injector types after all imports of
|
|
11576
|
-
* an injector definition are processed. (following View Engine semantics: see FW-1349)
|
|
11577
|
-
*/
|
|
11578
|
-
processInjectorType(defOrWrappedDef, parents, dedupStack) {
|
|
11579
|
-
defOrWrappedDef = resolveForwardRef(defOrWrappedDef);
|
|
11580
|
-
if (!defOrWrappedDef)
|
|
11581
|
-
return false;
|
|
11582
|
-
// Either the defOrWrappedDef is an InjectorType (with injector def) or an
|
|
11583
|
-
// InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic
|
|
11584
|
-
// read, so care is taken to only do the read once.
|
|
11585
|
-
// First attempt to read the injector def (`ɵinj`).
|
|
11586
|
-
let def = getInjectorDef(defOrWrappedDef);
|
|
11587
|
-
// If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.
|
|
11588
|
-
const ngModule = (def == null) && defOrWrappedDef.ngModule || undefined;
|
|
11589
|
-
// Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,
|
|
11590
|
-
// then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type
|
|
11591
|
-
// is the `ngModule`.
|
|
11592
|
-
const defType = (ngModule === undefined) ? defOrWrappedDef : ngModule;
|
|
11593
|
-
// Check for circular dependencies.
|
|
11594
|
-
if (ngDevMode && parents.indexOf(defType) !== -1) {
|
|
11595
|
-
const defName = stringify(defType);
|
|
11596
|
-
const path = parents.map(stringify);
|
|
11597
|
-
throwCyclicDependencyError(defName, path);
|
|
11598
|
-
}
|
|
11599
|
-
// Check for multiple imports of the same module
|
|
11600
|
-
const isDuplicate = dedupStack.indexOf(defType) !== -1;
|
|
11601
|
-
// Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual
|
|
11602
|
-
// `InjectorDef` is on its `ngModule`.
|
|
11603
|
-
if (ngModule !== undefined) {
|
|
11604
|
-
def = getInjectorDef(ngModule);
|
|
11605
|
-
}
|
|
11606
|
-
// If no definition was found, it might be from exports. Remove it.
|
|
11607
|
-
if (def == null) {
|
|
11608
|
-
return false;
|
|
11609
|
-
}
|
|
11610
|
-
// Add providers in the same way that @NgModule resolution did:
|
|
11611
|
-
// First, include providers from any imports.
|
|
11612
|
-
if (def.imports != null && !isDuplicate) {
|
|
11613
|
-
// Before processing defType's imports, add it to the set of parents. This way, if it ends
|
|
11614
|
-
// up deeply importing itself, this can be detected.
|
|
11615
|
-
ngDevMode && parents.push(defType);
|
|
11616
|
-
// Add it to the set of dedups. This way we can detect multiple imports of the same module
|
|
11617
|
-
dedupStack.push(defType);
|
|
11618
|
-
let importTypesWithProviders;
|
|
11619
|
-
try {
|
|
11620
|
-
deepForEach(def.imports, imported => {
|
|
11621
|
-
if (this.processInjectorType(imported, parents, dedupStack)) {
|
|
11622
|
-
if (importTypesWithProviders === undefined)
|
|
11623
|
-
importTypesWithProviders = [];
|
|
11624
|
-
// If the processed import is an injector type with providers, we store it in the
|
|
11625
|
-
// list of import types with providers, so that we can process those afterwards.
|
|
11626
|
-
importTypesWithProviders.push(imported);
|
|
11627
|
-
}
|
|
11628
|
-
});
|
|
11629
|
-
}
|
|
11630
|
-
finally {
|
|
11631
|
-
// Remove it from the parents set when finished.
|
|
11632
|
-
ngDevMode && parents.pop();
|
|
11633
|
-
}
|
|
11634
|
-
// Imports which are declared with providers (TypeWithProviders) need to be processed
|
|
11635
|
-
// after all imported modules are processed. This is similar to how View Engine
|
|
11636
|
-
// processes/merges module imports in the metadata resolver. See: FW-1349.
|
|
11637
|
-
if (importTypesWithProviders !== undefined) {
|
|
11638
|
-
for (let i = 0; i < importTypesWithProviders.length; i++) {
|
|
11639
|
-
const { ngModule, providers } = importTypesWithProviders[i];
|
|
11640
|
-
deepForEach(providers, provider => this.processProvider(provider, ngModule, providers || EMPTY_ARRAY));
|
|
11641
|
-
}
|
|
11642
|
-
}
|
|
11643
|
-
}
|
|
11644
|
-
// Track the InjectorType and add a provider for it. It's important that this is done after the
|
|
11645
|
-
// def's imports.
|
|
11646
|
-
this.injectorDefTypes.add(defType);
|
|
11647
|
-
const factory = getFactoryDef(defType) || (() => new defType());
|
|
11648
|
-
this.records.set(defType, makeRecord(factory, NOT_YET));
|
|
11649
|
-
// Next, include providers listed on the definition itself.
|
|
11650
|
-
const defProviders = def.providers;
|
|
11651
|
-
if (defProviders != null && !isDuplicate) {
|
|
11652
|
-
const injectorType = defOrWrappedDef;
|
|
11653
|
-
deepForEach(defProviders, provider => this.processProvider(provider, injectorType, defProviders));
|
|
11654
|
-
}
|
|
11655
|
-
return (ngModule !== undefined &&
|
|
11656
|
-
defOrWrappedDef.providers !== undefined);
|
|
11657
|
-
}
|
|
11658
11749
|
/**
|
|
11659
11750
|
* Process a `SingleProvider` and add it.
|
|
11660
11751
|
*/
|
|
11661
|
-
processProvider(provider
|
|
11752
|
+
processProvider(provider) {
|
|
11662
11753
|
// Determine the token from the provider. Either it's its own token, or has a {provide: ...}
|
|
11663
11754
|
// property.
|
|
11664
11755
|
provider = resolveForwardRef(provider);
|
|
11665
11756
|
let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);
|
|
11666
11757
|
// Construct a `Record` for the provider.
|
|
11667
|
-
const record = providerToRecord(provider
|
|
11758
|
+
const record = providerToRecord(provider);
|
|
11668
11759
|
if (!isTypeProvider(provider) && provider.multi === true) {
|
|
11669
11760
|
// If the provider indicates that it's a multi-provider, process it specially.
|
|
11670
11761
|
// First check whether it's been defined already.
|
|
@@ -11700,7 +11791,7 @@ class R3Injector {
|
|
|
11700
11791
|
record.value = record.factory();
|
|
11701
11792
|
}
|
|
11702
11793
|
if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {
|
|
11703
|
-
this.
|
|
11794
|
+
this._ngOnDestroyHooks.add(record.value);
|
|
11704
11795
|
}
|
|
11705
11796
|
return record.value;
|
|
11706
11797
|
}
|
|
@@ -11710,7 +11801,7 @@ class R3Injector {
|
|
|
11710
11801
|
}
|
|
11711
11802
|
const providedIn = resolveForwardRef(def.providedIn);
|
|
11712
11803
|
if (typeof providedIn === 'string') {
|
|
11713
|
-
return providedIn === 'any' || (
|
|
11804
|
+
return providedIn === 'any' || (this.scopes.has(providedIn));
|
|
11714
11805
|
}
|
|
11715
11806
|
else {
|
|
11716
11807
|
return this.injectorDefTypes.has(providedIn);
|
|
@@ -11756,12 +11847,12 @@ function getUndecoratedInjectableFactory(token) {
|
|
|
11756
11847
|
return () => new token();
|
|
11757
11848
|
}
|
|
11758
11849
|
}
|
|
11759
|
-
function providerToRecord(provider
|
|
11850
|
+
function providerToRecord(provider) {
|
|
11760
11851
|
if (isValueProvider(provider)) {
|
|
11761
11852
|
return makeRecord(undefined, provider.useValue);
|
|
11762
11853
|
}
|
|
11763
11854
|
else {
|
|
11764
|
-
const factory = providerToFactory(provider
|
|
11855
|
+
const factory = providerToFactory(provider);
|
|
11765
11856
|
return makeRecord(factory, NOT_YET);
|
|
11766
11857
|
}
|
|
11767
11858
|
}
|
|
@@ -11835,6 +11926,17 @@ function couldBeInjectableType(value) {
|
|
|
11835
11926
|
return (typeof value === 'function') ||
|
|
11836
11927
|
(typeof value === 'object' && value instanceof InjectionToken);
|
|
11837
11928
|
}
|
|
11929
|
+
function validateProvider(provider, providers, containerType) {
|
|
11930
|
+
if (isTypeProvider(provider) || isValueProvider(provider) || isFactoryProvider(provider) ||
|
|
11931
|
+
isExistingProvider(provider)) {
|
|
11932
|
+
return;
|
|
11933
|
+
}
|
|
11934
|
+
// Here we expect the provider to be a `useClass` provider (by elimination).
|
|
11935
|
+
const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));
|
|
11936
|
+
if (ngDevMode && !classRef) {
|
|
11937
|
+
throwInvalidProviderError(containerType, providers, provider);
|
|
11938
|
+
}
|
|
11939
|
+
}
|
|
11838
11940
|
|
|
11839
11941
|
/**
|
|
11840
11942
|
* @license
|
|
@@ -12611,7 +12713,7 @@ function ɵɵInheritDefinitionFeature(definition) {
|
|
|
12611
12713
|
else {
|
|
12612
12714
|
if (superType.ɵcmp) {
|
|
12613
12715
|
const errorMessage = (typeof ngDevMode === 'undefined' || ngDevMode) ?
|
|
12614
|
-
|
|
12716
|
+
`Directives cannot inherit Components. Directive ${stringifyForError(definition.type)} is attempting to extend component ${stringifyForError(superType)}` :
|
|
12615
12717
|
'';
|
|
12616
12718
|
throw new RuntimeError(903 /* INVALID_INHERITANCE */, errorMessage);
|
|
12617
12719
|
}
|
|
@@ -21068,6 +21170,13 @@ function ɵɵProvidersFeature(providers, viewProviders = []) {
|
|
|
21068
21170
|
};
|
|
21069
21171
|
}
|
|
21070
21172
|
|
|
21173
|
+
/**
|
|
21174
|
+
* TODO: Implements standalone stuff!
|
|
21175
|
+
*
|
|
21176
|
+
* @codeGenApi
|
|
21177
|
+
*/
|
|
21178
|
+
function ɵɵStandaloneFeature(definition) { }
|
|
21179
|
+
|
|
21071
21180
|
/**
|
|
21072
21181
|
* @license
|
|
21073
21182
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -21298,7 +21407,7 @@ class Version {
|
|
|
21298
21407
|
/**
|
|
21299
21408
|
* @publicApi
|
|
21300
21409
|
*/
|
|
21301
|
-
const VERSION = new Version('14.0.0-next.
|
|
21410
|
+
const VERSION = new Version('14.0.0-next.14');
|
|
21302
21411
|
|
|
21303
21412
|
/**
|
|
21304
21413
|
* @license
|
|
@@ -21750,9 +21859,12 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
21750
21859
|
get outputs() {
|
|
21751
21860
|
return toRefArray(this.componentDef.outputs);
|
|
21752
21861
|
}
|
|
21753
|
-
create(injector, projectableNodes, rootSelectorOrNode,
|
|
21754
|
-
|
|
21755
|
-
|
|
21862
|
+
create(injector, projectableNodes, rootSelectorOrNode, environmentInjector) {
|
|
21863
|
+
environmentInjector = environmentInjector || this.ngModule;
|
|
21864
|
+
let realEnvironmentInjector = environmentInjector instanceof EnvironmentInjector ?
|
|
21865
|
+
environmentInjector :
|
|
21866
|
+
environmentInjector?.injector;
|
|
21867
|
+
const rootViewInjector = realEnvironmentInjector ? new ChainedInjector(injector, realEnvironmentInjector) : injector;
|
|
21756
21868
|
const rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);
|
|
21757
21869
|
const sanitizer = rootViewInjector.get(Sanitizer, null);
|
|
21758
21870
|
const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);
|
|
@@ -21978,11 +22090,11 @@ class NgModuleRef extends NgModuleRef$1 {
|
|
|
21978
22090
|
provide: ComponentFactoryResolver$1,
|
|
21979
22091
|
useValue: this.componentFactoryResolver
|
|
21980
22092
|
}
|
|
21981
|
-
], stringify(ngModuleType));
|
|
22093
|
+
], stringify(ngModuleType), new Set(['environment']));
|
|
21982
22094
|
// We need to resolve the injector types separately from the injector creation, because
|
|
21983
22095
|
// the module might be trying to use this ref in its constructor for DI which will cause a
|
|
21984
22096
|
// circular error that will eventually error out, because the injector isn't created yet.
|
|
21985
|
-
this._r3Injector.
|
|
22097
|
+
this._r3Injector.resolveInjectorInitializers();
|
|
21986
22098
|
this.instance = this.get(ngModuleType);
|
|
21987
22099
|
}
|
|
21988
22100
|
get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND, injectFlags = InjectFlags.Default) {
|
|
@@ -22012,6 +22124,35 @@ class NgModuleFactory extends NgModuleFactory$1 {
|
|
|
22012
22124
|
return new NgModuleRef(this.moduleType, parentInjector);
|
|
22013
22125
|
}
|
|
22014
22126
|
}
|
|
22127
|
+
class EnvironmentNgModuleRefAdapter extends NgModuleRef$1 {
|
|
22128
|
+
constructor(providers, parent, source) {
|
|
22129
|
+
super();
|
|
22130
|
+
this.componentFactoryResolver = new ComponentFactoryResolver(this);
|
|
22131
|
+
this.instance = null;
|
|
22132
|
+
const injector = new R3Injector([
|
|
22133
|
+
...providers,
|
|
22134
|
+
{ provide: NgModuleRef$1, useValue: this },
|
|
22135
|
+
{ provide: ComponentFactoryResolver$1, useValue: this.componentFactoryResolver },
|
|
22136
|
+
], parent || getNullInjector(), source, new Set(['environment']));
|
|
22137
|
+
this.injector = injector;
|
|
22138
|
+
injector.resolveInjectorInitializers();
|
|
22139
|
+
}
|
|
22140
|
+
destroy() {
|
|
22141
|
+
this.injector.destroy();
|
|
22142
|
+
}
|
|
22143
|
+
onDestroy(callback) {
|
|
22144
|
+
this.injector.onDestroy(callback);
|
|
22145
|
+
}
|
|
22146
|
+
}
|
|
22147
|
+
/**
|
|
22148
|
+
* Create a new environment injector.
|
|
22149
|
+
*
|
|
22150
|
+
* @publicApi
|
|
22151
|
+
*/
|
|
22152
|
+
function createEnvironmentInjector(providers, parent = null, debugName = null) {
|
|
22153
|
+
const adapter = new EnvironmentNgModuleRefAdapter(providers, parent, debugName);
|
|
22154
|
+
return adapter.injector;
|
|
22155
|
+
}
|
|
22015
22156
|
|
|
22016
22157
|
/**
|
|
22017
22158
|
* @license
|
|
@@ -22936,7 +23077,7 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
|
|
|
22936
23077
|
this.insert(viewRef, index);
|
|
22937
23078
|
return viewRef;
|
|
22938
23079
|
}
|
|
22939
|
-
createComponent(componentFactoryOrType, indexOrOptions, injector, projectableNodes,
|
|
23080
|
+
createComponent(componentFactoryOrType, indexOrOptions, injector, projectableNodes, environmentInjector) {
|
|
22940
23081
|
const isComponentFactory = componentFactoryOrType && !isType(componentFactoryOrType);
|
|
22941
23082
|
let index;
|
|
22942
23083
|
// This function supports 2 signatures and we need to handle options correctly for both:
|
|
@@ -22964,17 +23105,20 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
|
|
|
22964
23105
|
'is incompatible. Please use an object as the second argument instead.');
|
|
22965
23106
|
}
|
|
22966
23107
|
const options = (indexOrOptions || {});
|
|
23108
|
+
if (ngDevMode && options.environmentInjector && options.ngModuleRef) {
|
|
23109
|
+
throwError(`Cannot pass both environmentInjector and ngModuleRef options to createComponent().`);
|
|
23110
|
+
}
|
|
22967
23111
|
index = options.index;
|
|
22968
23112
|
injector = options.injector;
|
|
22969
23113
|
projectableNodes = options.projectableNodes;
|
|
22970
|
-
|
|
23114
|
+
environmentInjector = options.environmentInjector || options.ngModuleRef;
|
|
22971
23115
|
}
|
|
22972
23116
|
const componentFactory = isComponentFactory ?
|
|
22973
23117
|
componentFactoryOrType :
|
|
22974
23118
|
new ComponentFactory(getComponentDef(componentFactoryOrType));
|
|
22975
23119
|
const contextInjector = injector || this.parentInjector;
|
|
22976
23120
|
// If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.
|
|
22977
|
-
if (!
|
|
23121
|
+
if (!environmentInjector && componentFactory.ngModule == null) {
|
|
22978
23122
|
// For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that
|
|
22979
23123
|
// an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an
|
|
22980
23124
|
// `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based
|
|
@@ -22995,12 +23139,12 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
|
|
|
22995
23139
|
// DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||
|
|
22996
23140
|
// undefined` expression which seems to cause internal google apps to fail. This is documented
|
|
22997
23141
|
// in the following internal bug issue: go/b/142967802
|
|
22998
|
-
const result = _injector.get(
|
|
23142
|
+
const result = _injector.get(EnvironmentInjector, null);
|
|
22999
23143
|
if (result) {
|
|
23000
|
-
|
|
23144
|
+
environmentInjector = result;
|
|
23001
23145
|
}
|
|
23002
23146
|
}
|
|
23003
|
-
const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined,
|
|
23147
|
+
const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, environmentInjector);
|
|
23004
23148
|
this.insert(componentRef.hostView, index);
|
|
23005
23149
|
return componentRef;
|
|
23006
23150
|
}
|
|
@@ -23690,6 +23834,7 @@ const angularCoreEnv = (() => ({
|
|
|
23690
23834
|
'ɵɵProvidersFeature': ɵɵProvidersFeature,
|
|
23691
23835
|
'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,
|
|
23692
23836
|
'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,
|
|
23837
|
+
'ɵɵStandaloneFeature': ɵɵStandaloneFeature,
|
|
23693
23838
|
'ɵɵnextContext': ɵɵnextContext,
|
|
23694
23839
|
'ɵɵnamespaceHTML': ɵɵnamespaceHTML,
|
|
23695
23840
|
'ɵɵnamespaceMathML': ɵɵnamespaceMathML,
|
|
@@ -24401,9 +24546,8 @@ function compileComponent(type, metadata) {
|
|
|
24401
24546
|
preserveWhitespaces,
|
|
24402
24547
|
styles: metadata.styles || EMPTY_ARRAY,
|
|
24403
24548
|
animations: metadata.animations,
|
|
24404
|
-
|
|
24549
|
+
declarations: [],
|
|
24405
24550
|
changeDetection: metadata.changeDetection,
|
|
24406
|
-
pipes: new Map(),
|
|
24407
24551
|
encapsulation,
|
|
24408
24552
|
interpolation: metadata.interpolation,
|
|
24409
24553
|
viewProviders: metadata.viewProviders || null,
|
|
@@ -26076,7 +26220,20 @@ let _testabilityGetter = new _NoopGetTestability();
|
|
|
26076
26220
|
* Use of this source code is governed by an MIT-style license that can be
|
|
26077
26221
|
* found in the LICENSE file at https://angular.io/license
|
|
26078
26222
|
*/
|
|
26079
|
-
let
|
|
26223
|
+
let _platformInjector = null;
|
|
26224
|
+
/**
|
|
26225
|
+
* Internal token to indicate whether having multiple bootstrapped platform should be allowed (only
|
|
26226
|
+
* one bootstrapped platform is allowed by default). This token helps to support SSR scenarios.
|
|
26227
|
+
*/
|
|
26228
|
+
const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');
|
|
26229
|
+
/**
|
|
26230
|
+
* Internal token that allows to register extra callbacks that should be invoked during the
|
|
26231
|
+
* `PlatformRef.destroy` operation. This token is needed to avoid a direct reference to the
|
|
26232
|
+
* `PlatformRef` class (i.e. register the callback via `PlatformRef.onDestroy`), thus making the
|
|
26233
|
+
* entire class tree-shakeable.
|
|
26234
|
+
*/
|
|
26235
|
+
const PLATFORM_ON_DESTROY = new InjectionToken('PlatformOnDestroy');
|
|
26236
|
+
const NG_DEV_MODE = typeof ngDevMode === 'undefined' || ngDevMode;
|
|
26080
26237
|
function compileNgModuleFactory(injector, options, moduleType) {
|
|
26081
26238
|
ngDevMode && assertNgModuleType(moduleType);
|
|
26082
26239
|
const moduleFactory = new NgModuleFactory(moduleType);
|
|
@@ -26121,7 +26278,6 @@ function publishDefaultGlobalUtils() {
|
|
|
26121
26278
|
function isBoundToModule(cf) {
|
|
26122
26279
|
return cf.isBoundToModule;
|
|
26123
26280
|
}
|
|
26124
|
-
const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');
|
|
26125
26281
|
/**
|
|
26126
26282
|
* A token for third-party components that can register themselves with NgProbe.
|
|
26127
26283
|
*
|
|
@@ -26140,19 +26296,19 @@ class NgProbeToken {
|
|
|
26140
26296
|
* @publicApi
|
|
26141
26297
|
*/
|
|
26142
26298
|
function createPlatform(injector) {
|
|
26143
|
-
if (
|
|
26144
|
-
!_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {
|
|
26299
|
+
if (_platformInjector && !_platformInjector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {
|
|
26145
26300
|
const errorMessage = (typeof ngDevMode === 'undefined' || ngDevMode) ?
|
|
26146
26301
|
'There can be only one platform. Destroy the previous one to create a new one.' :
|
|
26147
26302
|
'';
|
|
26148
26303
|
throw new RuntimeError(400 /* MULTIPLE_PLATFORMS */, errorMessage);
|
|
26149
26304
|
}
|
|
26150
26305
|
publishDefaultGlobalUtils();
|
|
26151
|
-
|
|
26306
|
+
_platformInjector = injector;
|
|
26307
|
+
const platform = injector.get(PlatformRef);
|
|
26152
26308
|
const inits = injector.get(PLATFORM_INITIALIZER, null);
|
|
26153
26309
|
if (inits)
|
|
26154
|
-
inits.forEach(
|
|
26155
|
-
return
|
|
26310
|
+
inits.forEach(initFn => initFn());
|
|
26311
|
+
return platform;
|
|
26156
26312
|
}
|
|
26157
26313
|
/**
|
|
26158
26314
|
* Creates a factory for a platform. Can be used to provide or override `Providers` specific to
|
|
@@ -26171,15 +26327,16 @@ function createPlatformFactory(parentPlatformFactory, name, providers = []) {
|
|
|
26171
26327
|
return (extraProviders = []) => {
|
|
26172
26328
|
let platform = getPlatform();
|
|
26173
26329
|
if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {
|
|
26330
|
+
const platformProviders = [
|
|
26331
|
+
...providers,
|
|
26332
|
+
...extraProviders,
|
|
26333
|
+
{ provide: marker, useValue: true }
|
|
26334
|
+
];
|
|
26174
26335
|
if (parentPlatformFactory) {
|
|
26175
|
-
parentPlatformFactory(
|
|
26336
|
+
parentPlatformFactory(platformProviders);
|
|
26176
26337
|
}
|
|
26177
26338
|
else {
|
|
26178
|
-
|
|
26179
|
-
provide: INJECTOR_SCOPE,
|
|
26180
|
-
useValue: 'platform'
|
|
26181
|
-
});
|
|
26182
|
-
createPlatform(Injector.create({ providers: injectedProviders, name: desc }));
|
|
26339
|
+
createPlatform(createPlatformInjector(platformProviders, desc));
|
|
26183
26340
|
}
|
|
26184
26341
|
}
|
|
26185
26342
|
return assertPlatform(marker);
|
|
@@ -26202,6 +26359,20 @@ function assertPlatform(requiredToken) {
|
|
|
26202
26359
|
}
|
|
26203
26360
|
return platform;
|
|
26204
26361
|
}
|
|
26362
|
+
/**
|
|
26363
|
+
* Helper function to create an instance of a platform injector (that maintains the 'platform'
|
|
26364
|
+
* scope).
|
|
26365
|
+
*/
|
|
26366
|
+
function createPlatformInjector(providers = [], name) {
|
|
26367
|
+
return Injector.create({
|
|
26368
|
+
name,
|
|
26369
|
+
providers: [
|
|
26370
|
+
{ provide: INJECTOR_SCOPE, useValue: 'platform' },
|
|
26371
|
+
{ provide: PLATFORM_ON_DESTROY, useValue: () => _platformInjector = null },
|
|
26372
|
+
...providers
|
|
26373
|
+
],
|
|
26374
|
+
});
|
|
26375
|
+
}
|
|
26205
26376
|
/**
|
|
26206
26377
|
* Destroys the current Angular platform and all Angular applications on the page.
|
|
26207
26378
|
* Destroys all modules and listeners registered with the platform.
|
|
@@ -26209,9 +26380,7 @@ function assertPlatform(requiredToken) {
|
|
|
26209
26380
|
* @publicApi
|
|
26210
26381
|
*/
|
|
26211
26382
|
function destroyPlatform() {
|
|
26212
|
-
|
|
26213
|
-
_platform.destroy();
|
|
26214
|
-
}
|
|
26383
|
+
getPlatform()?.destroy();
|
|
26215
26384
|
}
|
|
26216
26385
|
/**
|
|
26217
26386
|
* Returns the current platform.
|
|
@@ -26219,7 +26388,7 @@ function destroyPlatform() {
|
|
|
26219
26388
|
* @publicApi
|
|
26220
26389
|
*/
|
|
26221
26390
|
function getPlatform() {
|
|
26222
|
-
return
|
|
26391
|
+
return _platformInjector?.get(PlatformRef) ?? null;
|
|
26223
26392
|
}
|
|
26224
26393
|
/**
|
|
26225
26394
|
* The Angular platform is the entry point for Angular on a web page.
|
|
@@ -26353,12 +26522,17 @@ class PlatformRef {
|
|
|
26353
26522
|
const errorMessage = (typeof ngDevMode === 'undefined' || ngDevMode) ?
|
|
26354
26523
|
'The platform has already been destroyed!' :
|
|
26355
26524
|
'';
|
|
26356
|
-
throw new RuntimeError(404 /*
|
|
26525
|
+
throw new RuntimeError(404 /* PLATFORM_ALREADY_DESTROYED */, errorMessage);
|
|
26357
26526
|
}
|
|
26358
26527
|
this._modules.slice().forEach(module => module.destroy());
|
|
26359
26528
|
this._destroyListeners.forEach(listener => listener());
|
|
26529
|
+
const destroyListener = this._injector.get(PLATFORM_ON_DESTROY, null);
|
|
26530
|
+
destroyListener?.();
|
|
26360
26531
|
this._destroyed = true;
|
|
26361
26532
|
}
|
|
26533
|
+
/**
|
|
26534
|
+
* Indicates whether this instance was destroyed.
|
|
26535
|
+
*/
|
|
26362
26536
|
get destroyed() {
|
|
26363
26537
|
return this._destroyed;
|
|
26364
26538
|
}
|
|
@@ -26515,6 +26689,8 @@ class ApplicationRef {
|
|
|
26515
26689
|
this._views = [];
|
|
26516
26690
|
this._runningTick = false;
|
|
26517
26691
|
this._stable = true;
|
|
26692
|
+
this._destroyed = false;
|
|
26693
|
+
this._destroyListeners = [];
|
|
26518
26694
|
/**
|
|
26519
26695
|
* Get a list of component types registered to this application.
|
|
26520
26696
|
* This list is populated even before the component is created.
|
|
@@ -26574,6 +26750,12 @@ class ApplicationRef {
|
|
|
26574
26750
|
this.isStable =
|
|
26575
26751
|
merge$1(isCurrentlyStable, isStable.pipe(share()));
|
|
26576
26752
|
}
|
|
26753
|
+
/**
|
|
26754
|
+
* Indicates whether this instance was destroyed.
|
|
26755
|
+
*/
|
|
26756
|
+
get destroyed() {
|
|
26757
|
+
return this._destroyed;
|
|
26758
|
+
}
|
|
26577
26759
|
/**
|
|
26578
26760
|
* Bootstrap a component onto the element identified by its selector or, optionally, to a
|
|
26579
26761
|
* specified element.
|
|
@@ -26612,6 +26794,7 @@ class ApplicationRef {
|
|
|
26612
26794
|
* {@example core/ts/platform/platform.ts region='domNode'}
|
|
26613
26795
|
*/
|
|
26614
26796
|
bootstrap(componentOrFactory, rootSelectorOrNode) {
|
|
26797
|
+
NG_DEV_MODE && this.warnIfDestroyed();
|
|
26615
26798
|
if (!this._initStatus.done) {
|
|
26616
26799
|
const errorMessage = (typeof ngDevMode === 'undefined' || ngDevMode) ?
|
|
26617
26800
|
'Cannot bootstrap as there are still asynchronous initializers running. ' +
|
|
@@ -26663,6 +26846,7 @@ class ApplicationRef {
|
|
|
26663
26846
|
* detection pass during which all change detection must complete.
|
|
26664
26847
|
*/
|
|
26665
26848
|
tick() {
|
|
26849
|
+
NG_DEV_MODE && this.warnIfDestroyed();
|
|
26666
26850
|
if (this._runningTick) {
|
|
26667
26851
|
const errorMessage = (typeof ngDevMode === 'undefined' || ngDevMode) ?
|
|
26668
26852
|
'ApplicationRef.tick is called recursively' :
|
|
@@ -26694,6 +26878,7 @@ class ApplicationRef {
|
|
|
26694
26878
|
* This will throw if the view is already attached to a ViewContainer.
|
|
26695
26879
|
*/
|
|
26696
26880
|
attachView(viewRef) {
|
|
26881
|
+
NG_DEV_MODE && this.warnIfDestroyed();
|
|
26697
26882
|
const view = viewRef;
|
|
26698
26883
|
this._views.push(view);
|
|
26699
26884
|
view.attachToAppRef(this);
|
|
@@ -26702,6 +26887,7 @@ class ApplicationRef {
|
|
|
26702
26887
|
* Detaches a view from dirty checking again.
|
|
26703
26888
|
*/
|
|
26704
26889
|
detachView(viewRef) {
|
|
26890
|
+
NG_DEV_MODE && this.warnIfDestroyed();
|
|
26705
26891
|
const view = viewRef;
|
|
26706
26892
|
remove(this._views, view);
|
|
26707
26893
|
view.detachFromAppRef();
|
|
@@ -26716,8 +26902,48 @@ class ApplicationRef {
|
|
|
26716
26902
|
}
|
|
26717
26903
|
/** @internal */
|
|
26718
26904
|
ngOnDestroy() {
|
|
26719
|
-
this.
|
|
26720
|
-
|
|
26905
|
+
if (this._destroyed)
|
|
26906
|
+
return;
|
|
26907
|
+
try {
|
|
26908
|
+
// Call all the lifecycle hooks.
|
|
26909
|
+
this._destroyListeners.forEach(listener => listener());
|
|
26910
|
+
// Destroy all registered views.
|
|
26911
|
+
this._views.slice().forEach((view) => view.destroy());
|
|
26912
|
+
this._onMicrotaskEmptySubscription.unsubscribe();
|
|
26913
|
+
}
|
|
26914
|
+
finally {
|
|
26915
|
+
// Indicate that this instance is destroyed.
|
|
26916
|
+
this._destroyed = true;
|
|
26917
|
+
// Release all references.
|
|
26918
|
+
this._views = [];
|
|
26919
|
+
this._bootstrapListeners = [];
|
|
26920
|
+
this._destroyListeners = [];
|
|
26921
|
+
}
|
|
26922
|
+
}
|
|
26923
|
+
/**
|
|
26924
|
+
* Registers a listener to be called when an instance is destroyed.
|
|
26925
|
+
*
|
|
26926
|
+
* @param callback A callback function to add as a listener.
|
|
26927
|
+
* @returns A function which unregisters a listener.
|
|
26928
|
+
*
|
|
26929
|
+
* @internal
|
|
26930
|
+
*/
|
|
26931
|
+
onDestroy(callback) {
|
|
26932
|
+
NG_DEV_MODE && this.warnIfDestroyed();
|
|
26933
|
+
this._destroyListeners.push(callback);
|
|
26934
|
+
return () => remove(this._destroyListeners, callback);
|
|
26935
|
+
}
|
|
26936
|
+
destroy() {
|
|
26937
|
+
if (this._destroyed) {
|
|
26938
|
+
throw new RuntimeError(406 /* APPLICATION_REF_ALREADY_DESTROYED */, NG_DEV_MODE && 'This instance of the `ApplicationRef` has already been destroyed.');
|
|
26939
|
+
}
|
|
26940
|
+
const injector = this._injector;
|
|
26941
|
+
// Check that this injector instance supports destroy operation.
|
|
26942
|
+
if (injector.destroy && !injector.destroyed) {
|
|
26943
|
+
// Destroying an underlying injector will trigger the `ngOnDestroy` lifecycle
|
|
26944
|
+
// hook, which invokes the remaining cleanup actions.
|
|
26945
|
+
injector.destroy();
|
|
26946
|
+
}
|
|
26721
26947
|
}
|
|
26722
26948
|
/**
|
|
26723
26949
|
* Returns the number of attached views.
|
|
@@ -26725,6 +26951,11 @@ class ApplicationRef {
|
|
|
26725
26951
|
get viewCount() {
|
|
26726
26952
|
return this._views.length;
|
|
26727
26953
|
}
|
|
26954
|
+
warnIfDestroyed() {
|
|
26955
|
+
if (NG_DEV_MODE && this._destroyed) {
|
|
26956
|
+
console.warn(formatRuntimeError(406 /* APPLICATION_REF_ALREADY_DESTROYED */, 'This instance of the `ApplicationRef` has already been destroyed.'));
|
|
26957
|
+
}
|
|
26958
|
+
}
|
|
26728
26959
|
}
|
|
26729
26960
|
ApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ApplicationInitStatus)); };
|
|
26730
26961
|
ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' });
|
|
@@ -28915,5 +29146,5 @@ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
|
28915
29146
|
* Generated bundle index. Do not edit.
|
|
28916
29147
|
*/
|
|
28917
29148
|
|
|
28918
|
-
export { ANALYZE_FOR_ENTRY_COMPONENTS, ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, asNativeElements, assertPlatform, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, ChangeDetectorStatus as ɵChangeDetectorStatus, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LContext as ɵLContext, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, ViewRef$1 as ɵViewRef, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, coerceToBoolean as ɵcoerceToBoolean, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, getDebugNode as ɵgetDebugNode, getDebugNodeR2 as ɵgetDebugNodeR2, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, isBoundToModule as ɵisBoundToModule, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, ɵivyEnabled, makeDecorator as ɵmakeDecorator, markDirty as ɵmarkDirty, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, renderComponent as ɵrenderComponent, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, whenRendered as ɵwhenRendered, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵresetView, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵviewQuery };
|
|
29149
|
+
export { ANALYZE_FOR_ENTRY_COMPONENTS, ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ElementRef, EmbeddedViewRef, EnvironmentInjector, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, INJECTOR_INITIALIZER, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, asNativeElements, assertPlatform, createEnvironmentInjector, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, ChangeDetectorStatus as ɵChangeDetectorStatus, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LContext as ɵLContext, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, ViewRef$1 as ɵViewRef, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, coerceToBoolean as ɵcoerceToBoolean, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, getDebugNode as ɵgetDebugNode, getDebugNodeR2 as ɵgetDebugNodeR2, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getSanitizationBypassType as ɵgetSanitizationBypassType, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, isBoundToModule as ɵisBoundToModule, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, ɵivyEnabled, makeDecorator as ɵmakeDecorator, markDirty as ɵmarkDirty, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, publishDefaultGlobalUtils$1 as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, registerLocaleData as ɵregisterLocaleData, renderComponent as ɵrenderComponent, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, whenRendered as ɵwhenRendered, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵStandaloneFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵresetView, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵviewQuery };
|
|
28919
29150
|
//# sourceMappingURL=core.mjs.map
|