@angular/core 14.0.0-next.14 → 14.0.0-next.15
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/esm2020/src/application_ref.mjs +98 -22
- package/esm2020/src/core_private_export.mjs +2 -2
- package/esm2020/src/core_render3_private_export.mjs +3 -2
- package/esm2020/src/di/create_injector.mjs +36 -0
- package/esm2020/src/di/index.mjs +4 -2
- package/esm2020/src/di/initializer_token.mjs +16 -0
- package/esm2020/src/di/injector.mjs +2 -2
- package/esm2020/src/di/injector_compatibility.mjs +1 -3
- package/esm2020/src/di/interface/defs.mjs +1 -1
- package/esm2020/src/di/interface/provider.mjs +1 -1
- package/esm2020/src/di/internal_tokens.mjs +10 -0
- package/esm2020/src/di/provider_collection.mjs +209 -0
- package/esm2020/src/di/r3_injector.mjs +7 -185
- package/esm2020/src/errors.mjs +1 -1
- package/esm2020/src/metadata/directives.mjs +1 -1
- package/esm2020/src/metadata/ng_module.mjs +1 -1
- package/esm2020/src/metadata.mjs +1 -1
- package/esm2020/src/render3/component_ref.mjs +5 -1
- package/esm2020/src/render3/definition.mjs +3 -1
- package/esm2020/src/render3/di_setup.mjs +3 -2
- package/esm2020/src/render3/errors.mjs +16 -1
- package/esm2020/src/render3/features/standalone_feature.mjs +65 -3
- package/esm2020/src/render3/interfaces/definition.mjs +1 -1
- package/esm2020/src/render3/jit/directive.mjs +92 -6
- package/esm2020/src/render3/jit/module.mjs +64 -17
- package/esm2020/src/render3/jit/pipe.mjs +2 -4
- package/esm2020/src/render3/ng_module_ref.mjs +3 -2
- package/esm2020/src/util/global.mjs +8 -8
- 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 +735 -376
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +1 -1
- package/fesm2020/core.mjs +734 -375
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +1 -1
- package/{core.d.ts → index.d.ts} +14716 -14668
- package/package.json +4 -4
- package/testing/{testing.d.ts → index.d.ts} +537 -536
- package/testing/package.json +0 -9
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.15
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -725,15 +725,15 @@ var ViewEncapsulation$1;
|
|
|
725
725
|
* Use of this source code is governed by an MIT-style license that can be
|
|
726
726
|
* found in the LICENSE file at https://angular.io/license
|
|
727
727
|
*/
|
|
728
|
-
const __globalThis = typeof globalThis !== 'undefined' && globalThis;
|
|
729
|
-
const __window = typeof window !== 'undefined' && window;
|
|
730
|
-
const __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
|
|
731
|
-
self instanceof WorkerGlobalScope && self;
|
|
732
|
-
const __global = typeof global !== 'undefined' && global;
|
|
733
728
|
// Always use __globalThis if available, which is the spec-defined global variable across all
|
|
734
729
|
// environments, then fallback to __global first, because in Node tests both __global and
|
|
735
|
-
// __window may be defined and _global should be __global in that case.
|
|
736
|
-
|
|
730
|
+
// __window may be defined and _global should be __global in that case. Note: Typeof/Instanceof
|
|
731
|
+
// checks are considered side-effects in Terser. We explicitly mark this as side-effect free:
|
|
732
|
+
// https://github.com/terser/terser/issues/250.
|
|
733
|
+
const _global = ( /* @__PURE__ */(() => (typeof globalThis !== 'undefined' && globalThis) ||
|
|
734
|
+
(typeof global !== 'undefined' && global) || (typeof window !== 'undefined' && window) ||
|
|
735
|
+
(typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&
|
|
736
|
+
self instanceof WorkerGlobalScope && self))());
|
|
737
737
|
|
|
738
738
|
/**
|
|
739
739
|
* @license
|
|
@@ -906,6 +906,8 @@ function ɵɵdefineComponent(componentDefinition) {
|
|
|
906
906
|
directiveDefs: null,
|
|
907
907
|
pipeDefs: null,
|
|
908
908
|
standalone: componentDefinition.standalone === true,
|
|
909
|
+
dependencies: componentDefinition.standalone === true && componentDefinition.dependencies || null,
|
|
910
|
+
getStandaloneInjector: null,
|
|
909
911
|
selectors: componentDefinition.selectors || EMPTY_ARRAY,
|
|
910
912
|
viewQuery: componentDefinition.viewQuery || null,
|
|
911
913
|
features: componentDefinition.features || null,
|
|
@@ -4828,7 +4830,6 @@ const NG_TOKEN_PATH = 'ngTokenPath';
|
|
|
4828
4830
|
const NEW_LINE = /\n/gm;
|
|
4829
4831
|
const NO_NEW_LINE = 'ɵ';
|
|
4830
4832
|
const SOURCE = '__source';
|
|
4831
|
-
const USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: getClosureSafeProperty });
|
|
4832
4833
|
/**
|
|
4833
4834
|
* Current injector value used by `inject`.
|
|
4834
4835
|
* - `undefined`: it is an error to call `inject`
|
|
@@ -6927,6 +6928,20 @@ function maybeUnwrapFn(value) {
|
|
|
6927
6928
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6928
6929
|
* found in the LICENSE file at https://angular.io/license
|
|
6929
6930
|
*/
|
|
6931
|
+
/** Verifies that a given type is a Standalone Component. */
|
|
6932
|
+
function assertStandaloneComponentType(type) {
|
|
6933
|
+
const componentDef = getComponentDef(type);
|
|
6934
|
+
if (!componentDef) {
|
|
6935
|
+
throw new RuntimeError(906 /* MISSING_GENERATED_DEF */, `The ${stringifyForError(type)} is not an Angular component, ` +
|
|
6936
|
+
`make sure it has the \`@Component\` decorator.`);
|
|
6937
|
+
}
|
|
6938
|
+
if (!componentDef.standalone) {
|
|
6939
|
+
throw new RuntimeError(907 /* TYPE_IS_NOT_STANDALONE */, `The ${stringifyForError(type)} component is not marked as standalone, ` +
|
|
6940
|
+
`but Angular expects to have a standalone component here. ` +
|
|
6941
|
+
`Please make sure the ${stringifyForError(type)} component has ` +
|
|
6942
|
+
`the \`standalone: true\` flag in the decorator.`);
|
|
6943
|
+
}
|
|
6944
|
+
}
|
|
6930
6945
|
/** Called when there are multiple component selectors that match a given node */
|
|
6931
6946
|
function throwMultipleComponentError(tNode, first, second) {
|
|
6932
6947
|
throw new RuntimeError(-300 /* MULTIPLE_COMPONENTS_MATCH */, `Multiple components match node with tagname ${tNode.value}: ` +
|
|
@@ -11341,6 +11356,235 @@ function tick(component) {
|
|
|
11341
11356
|
tickRootContext(rootContext);
|
|
11342
11357
|
}
|
|
11343
11358
|
|
|
11359
|
+
/**
|
|
11360
|
+
* @license
|
|
11361
|
+
* Copyright Google LLC All Rights Reserved.
|
|
11362
|
+
*
|
|
11363
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
11364
|
+
* found in the LICENSE file at https://angular.io/license
|
|
11365
|
+
*/
|
|
11366
|
+
|
|
11367
|
+
/**
|
|
11368
|
+
* @license
|
|
11369
|
+
* Copyright Google LLC All Rights Reserved.
|
|
11370
|
+
*
|
|
11371
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
11372
|
+
* found in the LICENSE file at https://angular.io/license
|
|
11373
|
+
*/
|
|
11374
|
+
/**
|
|
11375
|
+
* A multi-provider token for initialization functions that will run upon construction of a
|
|
11376
|
+
* non-view injector.
|
|
11377
|
+
*
|
|
11378
|
+
* @publicApi
|
|
11379
|
+
*/
|
|
11380
|
+
const INJECTOR_INITIALIZER = new InjectionToken('INJECTOR_INITIALIZER');
|
|
11381
|
+
|
|
11382
|
+
/**
|
|
11383
|
+
* @license
|
|
11384
|
+
* Copyright Google LLC All Rights Reserved.
|
|
11385
|
+
*
|
|
11386
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
11387
|
+
* found in the LICENSE file at https://angular.io/license
|
|
11388
|
+
*/
|
|
11389
|
+
const INJECTOR_DEF_TYPES = new InjectionToken('INJECTOR_DEF_TYPES');
|
|
11390
|
+
|
|
11391
|
+
/**
|
|
11392
|
+
* @license
|
|
11393
|
+
* Copyright Google LLC All Rights Reserved.
|
|
11394
|
+
*
|
|
11395
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
11396
|
+
* found in the LICENSE file at https://angular.io/license
|
|
11397
|
+
*/
|
|
11398
|
+
/**
|
|
11399
|
+
* Collects providers from all NgModules and standalone components, including transitively imported
|
|
11400
|
+
* ones.
|
|
11401
|
+
*
|
|
11402
|
+
* @returns The list of collected providers from the specified list of types.
|
|
11403
|
+
* @publicApi
|
|
11404
|
+
*/
|
|
11405
|
+
function importProvidersFrom(...sources) {
|
|
11406
|
+
const providersOut = [];
|
|
11407
|
+
const dedup = new Set(); // already seen types
|
|
11408
|
+
let injectorTypesWithProviders;
|
|
11409
|
+
deepForEach(sources, source => {
|
|
11410
|
+
// Narrow `source` to access the internal type analogue for `ModuleWithProviders`.
|
|
11411
|
+
const internalSource = source;
|
|
11412
|
+
if (walkProviderTree(internalSource, providersOut, [], dedup)) {
|
|
11413
|
+
injectorTypesWithProviders || (injectorTypesWithProviders = []);
|
|
11414
|
+
injectorTypesWithProviders.push(internalSource);
|
|
11415
|
+
}
|
|
11416
|
+
});
|
|
11417
|
+
// Collect all providers from `ModuleWithProviders` types.
|
|
11418
|
+
if (injectorTypesWithProviders !== undefined) {
|
|
11419
|
+
processInjectorTypesWithProviders(injectorTypesWithProviders, providersOut);
|
|
11420
|
+
}
|
|
11421
|
+
return providersOut;
|
|
11422
|
+
}
|
|
11423
|
+
/**
|
|
11424
|
+
* Collects all providers from the list of `ModuleWithProviders` and appends them to the provided
|
|
11425
|
+
* array.
|
|
11426
|
+
*/
|
|
11427
|
+
function processInjectorTypesWithProviders(typesWithProviders, providersOut) {
|
|
11428
|
+
for (let i = 0; i < typesWithProviders.length; i++) {
|
|
11429
|
+
const { ngModule, providers } = typesWithProviders[i];
|
|
11430
|
+
deepForEach(providers, provider => {
|
|
11431
|
+
ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);
|
|
11432
|
+
providersOut.push(provider);
|
|
11433
|
+
});
|
|
11434
|
+
}
|
|
11435
|
+
}
|
|
11436
|
+
/**
|
|
11437
|
+
* The logic visits an `InjectorType`, an `InjectorTypeWithProviders`, or a standalone
|
|
11438
|
+
* `ComponentType`, and all of its transitive providers and collects providers.
|
|
11439
|
+
*
|
|
11440
|
+
* If an `InjectorTypeWithProviders` that declares providers besides the type is specified,
|
|
11441
|
+
* the function will return "true" to indicate that the providers of the type definition need
|
|
11442
|
+
* to be processed. This allows us to process providers of injector types after all imports of
|
|
11443
|
+
* an injector definition are processed. (following View Engine semantics: see FW-1349)
|
|
11444
|
+
*/
|
|
11445
|
+
function walkProviderTree(container, providersOut, parents, dedup) {
|
|
11446
|
+
container = resolveForwardRef(container);
|
|
11447
|
+
if (!container)
|
|
11448
|
+
return false;
|
|
11449
|
+
// The actual type which had the definition. Usually `container`, but may be an unwrapped type
|
|
11450
|
+
// from `InjectorTypeWithProviders`.
|
|
11451
|
+
let defType = null;
|
|
11452
|
+
let injDef = getInjectorDef(container);
|
|
11453
|
+
const cmpDef = !injDef && getComponentDef(container);
|
|
11454
|
+
if (!injDef && !cmpDef) {
|
|
11455
|
+
// `container` is not an injector type or a component type. It might be:
|
|
11456
|
+
// * An `InjectorTypeWithProviders` that wraps an injector type.
|
|
11457
|
+
// * A standalone directive or pipe that got pulled in from a standalone component's
|
|
11458
|
+
// dependencies.
|
|
11459
|
+
// Try to unwrap it as an `InjectorTypeWithProviders` first.
|
|
11460
|
+
const ngModule = container.ngModule;
|
|
11461
|
+
injDef = getInjectorDef(ngModule);
|
|
11462
|
+
if (injDef) {
|
|
11463
|
+
defType = ngModule;
|
|
11464
|
+
}
|
|
11465
|
+
else {
|
|
11466
|
+
// Not a component or injector type, so ignore it.
|
|
11467
|
+
return false;
|
|
11468
|
+
}
|
|
11469
|
+
}
|
|
11470
|
+
else if (cmpDef && !cmpDef.standalone) {
|
|
11471
|
+
return false;
|
|
11472
|
+
}
|
|
11473
|
+
else {
|
|
11474
|
+
defType = container;
|
|
11475
|
+
}
|
|
11476
|
+
// Check for circular dependencies.
|
|
11477
|
+
if (ngDevMode && parents.indexOf(defType) !== -1) {
|
|
11478
|
+
const defName = stringify(defType);
|
|
11479
|
+
const path = parents.map(stringify);
|
|
11480
|
+
throwCyclicDependencyError(defName, path);
|
|
11481
|
+
}
|
|
11482
|
+
// Check for multiple imports of the same module
|
|
11483
|
+
const isDuplicate = dedup.has(defType);
|
|
11484
|
+
if (cmpDef) {
|
|
11485
|
+
if (isDuplicate) {
|
|
11486
|
+
// This component definition has already been processed.
|
|
11487
|
+
return false;
|
|
11488
|
+
}
|
|
11489
|
+
dedup.add(defType);
|
|
11490
|
+
if (cmpDef.dependencies) {
|
|
11491
|
+
const deps = typeof cmpDef.dependencies === 'function' ? cmpDef.dependencies() : cmpDef.dependencies;
|
|
11492
|
+
for (const dep of deps) {
|
|
11493
|
+
walkProviderTree(dep, providersOut, parents, dedup);
|
|
11494
|
+
}
|
|
11495
|
+
}
|
|
11496
|
+
}
|
|
11497
|
+
else if (injDef) {
|
|
11498
|
+
// First, include providers from any imports.
|
|
11499
|
+
if (injDef.imports != null && !isDuplicate) {
|
|
11500
|
+
// Before processing defType's imports, add it to the set of parents. This way, if it ends
|
|
11501
|
+
// up deeply importing itself, this can be detected.
|
|
11502
|
+
ngDevMode && parents.push(defType);
|
|
11503
|
+
// Add it to the set of dedups. This way we can detect multiple imports of the same module
|
|
11504
|
+
dedup.add(defType);
|
|
11505
|
+
let importTypesWithProviders;
|
|
11506
|
+
try {
|
|
11507
|
+
deepForEach(injDef.imports, imported => {
|
|
11508
|
+
if (walkProviderTree(imported, providersOut, parents, dedup)) {
|
|
11509
|
+
importTypesWithProviders || (importTypesWithProviders = []);
|
|
11510
|
+
// If the processed import is an injector type with providers, we store it in the
|
|
11511
|
+
// list of import types with providers, so that we can process those afterwards.
|
|
11512
|
+
importTypesWithProviders.push(imported);
|
|
11513
|
+
}
|
|
11514
|
+
});
|
|
11515
|
+
}
|
|
11516
|
+
finally {
|
|
11517
|
+
// Remove it from the parents set when finished.
|
|
11518
|
+
ngDevMode && parents.pop();
|
|
11519
|
+
}
|
|
11520
|
+
// Imports which are declared with providers (TypeWithProviders) need to be processed
|
|
11521
|
+
// after all imported modules are processed. This is similar to how View Engine
|
|
11522
|
+
// processes/merges module imports in the metadata resolver. See: FW-1349.
|
|
11523
|
+
if (importTypesWithProviders !== undefined) {
|
|
11524
|
+
processInjectorTypesWithProviders(importTypesWithProviders, providersOut);
|
|
11525
|
+
}
|
|
11526
|
+
}
|
|
11527
|
+
if (!isDuplicate) {
|
|
11528
|
+
// Track the InjectorType and add a provider for it.
|
|
11529
|
+
// It's important that this is done after the def's imports.
|
|
11530
|
+
const factory = getFactoryDef(defType) || (() => new defType());
|
|
11531
|
+
// Append extra providers to make more info available for consumers (to retrieve an injector
|
|
11532
|
+
// type), as well as internally (to calculate an injection scope correctly and eagerly
|
|
11533
|
+
// instantiate a `defType` when an injector is created).
|
|
11534
|
+
providersOut.push(
|
|
11535
|
+
// Provider to create `defType` using its factory.
|
|
11536
|
+
{ provide: defType, useFactory: factory, deps: EMPTY_ARRAY },
|
|
11537
|
+
// Make this `defType` available to an internal logic that calculates injector scope.
|
|
11538
|
+
{ provide: INJECTOR_DEF_TYPES, useValue: defType, multi: true },
|
|
11539
|
+
// Provider to eagerly instantiate `defType` via `INJECTOR_INITIALIZER`.
|
|
11540
|
+
{ provide: INJECTOR_INITIALIZER, useValue: () => ɵɵinject(defType), multi: true } //
|
|
11541
|
+
);
|
|
11542
|
+
}
|
|
11543
|
+
// Next, include providers listed on the definition itself.
|
|
11544
|
+
const defProviders = injDef.providers;
|
|
11545
|
+
if (defProviders != null && !isDuplicate) {
|
|
11546
|
+
const injectorType = container;
|
|
11547
|
+
deepForEach(defProviders, provider => {
|
|
11548
|
+
ngDevMode && validateProvider(provider, defProviders, injectorType);
|
|
11549
|
+
providersOut.push(provider);
|
|
11550
|
+
});
|
|
11551
|
+
}
|
|
11552
|
+
}
|
|
11553
|
+
else {
|
|
11554
|
+
// Should not happen, but just in case.
|
|
11555
|
+
return false;
|
|
11556
|
+
}
|
|
11557
|
+
return (defType !== container &&
|
|
11558
|
+
container.providers !== undefined);
|
|
11559
|
+
}
|
|
11560
|
+
function validateProvider(provider, providers, containerType) {
|
|
11561
|
+
if (isTypeProvider(provider) || isValueProvider(provider) || isFactoryProvider(provider) ||
|
|
11562
|
+
isExistingProvider(provider)) {
|
|
11563
|
+
return;
|
|
11564
|
+
}
|
|
11565
|
+
// Here we expect the provider to be a `useClass` provider (by elimination).
|
|
11566
|
+
const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));
|
|
11567
|
+
if (!classRef) {
|
|
11568
|
+
throwInvalidProviderError(containerType, providers, provider);
|
|
11569
|
+
}
|
|
11570
|
+
}
|
|
11571
|
+
const USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: getClosureSafeProperty });
|
|
11572
|
+
function isValueProvider(value) {
|
|
11573
|
+
return value !== null && typeof value == 'object' && USE_VALUE$1 in value;
|
|
11574
|
+
}
|
|
11575
|
+
function isExistingProvider(value) {
|
|
11576
|
+
return !!(value && value.useExisting);
|
|
11577
|
+
}
|
|
11578
|
+
function isFactoryProvider(value) {
|
|
11579
|
+
return !!(value && value.useFactory);
|
|
11580
|
+
}
|
|
11581
|
+
function isTypeProvider(value) {
|
|
11582
|
+
return typeof value === 'function';
|
|
11583
|
+
}
|
|
11584
|
+
function isClassProvider(value) {
|
|
11585
|
+
return !!value.useClass;
|
|
11586
|
+
}
|
|
11587
|
+
|
|
11344
11588
|
/**
|
|
11345
11589
|
* @license
|
|
11346
11590
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -11412,14 +11656,6 @@ const NOT_YET = {};
|
|
|
11412
11656
|
* a circular dependency among the providers.
|
|
11413
11657
|
*/
|
|
11414
11658
|
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');
|
|
11423
11659
|
/**
|
|
11424
11660
|
* A lazily initialized NullInjector.
|
|
11425
11661
|
*/
|
|
@@ -11430,159 +11666,12 @@ function getNullInjector() {
|
|
|
11430
11666
|
}
|
|
11431
11667
|
return NULL_INJECTOR$1;
|
|
11432
11668
|
}
|
|
11433
|
-
/**
|
|
11434
|
-
* Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
|
|
11435
|
-
*
|
|
11436
|
-
* @publicApi
|
|
11437
|
-
*/
|
|
11438
|
-
function createInjector(defType, parent = null, additionalProviders = null, name) {
|
|
11439
|
-
const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);
|
|
11440
|
-
injector.resolveInjectorInitializers();
|
|
11441
|
-
return injector;
|
|
11442
|
-
}
|
|
11443
|
-
/**
|
|
11444
|
-
* Creates a new injector without eagerly resolving its injector types. Can be used in places
|
|
11445
|
-
* where resolving the injector types immediately can lead to an infinite loop. The injector types
|
|
11446
|
-
* should be resolved at a later point by calling `_resolveInjectorDefTypes`.
|
|
11447
|
-
*/
|
|
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);
|
|
11455
|
-
}
|
|
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
11669
|
/**
|
|
11570
11670
|
* An `Injector` that's part of the environment injector hierarchy, which exists outside of the
|
|
11571
11671
|
* component tree.
|
|
11572
11672
|
*/
|
|
11573
11673
|
class EnvironmentInjector {
|
|
11574
11674
|
}
|
|
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
11675
|
class R3Injector extends EnvironmentInjector {
|
|
11587
11676
|
constructor(providers, parent, source, scopes) {
|
|
11588
11677
|
super();
|
|
@@ -11900,21 +11989,6 @@ function makeRecord(factory, value, multi = false) {
|
|
|
11900
11989
|
multi: multi ? [] : undefined,
|
|
11901
11990
|
};
|
|
11902
11991
|
}
|
|
11903
|
-
function isValueProvider(value) {
|
|
11904
|
-
return value !== null && typeof value == 'object' && USE_VALUE$1 in value;
|
|
11905
|
-
}
|
|
11906
|
-
function isExistingProvider(value) {
|
|
11907
|
-
return !!(value && value.useExisting);
|
|
11908
|
-
}
|
|
11909
|
-
function isFactoryProvider(value) {
|
|
11910
|
-
return !!(value && value.useFactory);
|
|
11911
|
-
}
|
|
11912
|
-
function isTypeProvider(value) {
|
|
11913
|
-
return typeof value === 'function';
|
|
11914
|
-
}
|
|
11915
|
-
function isClassProvider(value) {
|
|
11916
|
-
return !!value.useClass;
|
|
11917
|
-
}
|
|
11918
11992
|
function hasDeps(value) {
|
|
11919
11993
|
return !!value.deps;
|
|
11920
11994
|
}
|
|
@@ -11926,17 +12000,6 @@ function couldBeInjectableType(value) {
|
|
|
11926
12000
|
return (typeof value === 'function') ||
|
|
11927
12001
|
(typeof value === 'object' && value instanceof InjectionToken);
|
|
11928
12002
|
}
|
|
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
|
-
}
|
|
11940
12003
|
|
|
11941
12004
|
/**
|
|
11942
12005
|
* @license
|
|
@@ -11946,34 +12009,65 @@ function validateProvider(provider, providers, containerType) {
|
|
|
11946
12009
|
* found in the LICENSE file at https://angular.io/license
|
|
11947
12010
|
*/
|
|
11948
12011
|
/**
|
|
11949
|
-
*
|
|
11950
|
-
* with [providers](guide/glossary#provider) that associate
|
|
11951
|
-
* dependencies of various types with [injection tokens](guide/glossary#di-token).
|
|
11952
|
-
*
|
|
11953
|
-
* @see ["DI Providers"](guide/dependency-injection-providers).
|
|
11954
|
-
* @see `StaticProvider`
|
|
11955
|
-
*
|
|
11956
|
-
* @usageNotes
|
|
11957
|
-
*
|
|
11958
|
-
* The following example creates a service injector instance.
|
|
11959
|
-
*
|
|
11960
|
-
* {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
|
|
11961
|
-
*
|
|
11962
|
-
* ### Usage example
|
|
11963
|
-
*
|
|
11964
|
-
* {@example core/di/ts/injector_spec.ts region='Injector'}
|
|
11965
|
-
*
|
|
11966
|
-
* `Injector` returns itself when given `Injector` as a token:
|
|
11967
|
-
*
|
|
11968
|
-
* {@example core/di/ts/injector_spec.ts region='injectInjector'}
|
|
12012
|
+
* Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
|
|
11969
12013
|
*
|
|
11970
12014
|
* @publicApi
|
|
11971
12015
|
*/
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
12016
|
+
function createInjector(defType, parent = null, additionalProviders = null, name) {
|
|
12017
|
+
const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);
|
|
12018
|
+
injector.resolveInjectorInitializers();
|
|
12019
|
+
return injector;
|
|
12020
|
+
}
|
|
12021
|
+
/**
|
|
12022
|
+
* Creates a new injector without eagerly resolving its injector types. Can be used in places
|
|
12023
|
+
* where resolving the injector types immediately can lead to an infinite loop. The injector types
|
|
12024
|
+
* should be resolved at a later point by calling `_resolveInjectorDefTypes`.
|
|
12025
|
+
*/
|
|
12026
|
+
function createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name, scopes = new Set()) {
|
|
12027
|
+
const providers = [
|
|
12028
|
+
...flatten(additionalProviders || EMPTY_ARRAY),
|
|
12029
|
+
...importProvidersFrom(defType),
|
|
12030
|
+
];
|
|
12031
|
+
name = name || (typeof defType === 'object' ? undefined : stringify(defType));
|
|
12032
|
+
return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);
|
|
12033
|
+
}
|
|
12034
|
+
|
|
12035
|
+
/**
|
|
12036
|
+
* @license
|
|
12037
|
+
* Copyright Google LLC All Rights Reserved.
|
|
12038
|
+
*
|
|
12039
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
12040
|
+
* found in the LICENSE file at https://angular.io/license
|
|
12041
|
+
*/
|
|
12042
|
+
/**
|
|
12043
|
+
* Concrete injectors implement this interface. Injectors are configured
|
|
12044
|
+
* with [providers](guide/glossary#provider) that associate
|
|
12045
|
+
* dependencies of various types with [injection tokens](guide/glossary#di-token).
|
|
12046
|
+
*
|
|
12047
|
+
* @see ["DI Providers"](guide/dependency-injection-providers).
|
|
12048
|
+
* @see `StaticProvider`
|
|
12049
|
+
*
|
|
12050
|
+
* @usageNotes
|
|
12051
|
+
*
|
|
12052
|
+
* The following example creates a service injector instance.
|
|
12053
|
+
*
|
|
12054
|
+
* {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
|
|
12055
|
+
*
|
|
12056
|
+
* ### Usage example
|
|
12057
|
+
*
|
|
12058
|
+
* {@example core/di/ts/injector_spec.ts region='Injector'}
|
|
12059
|
+
*
|
|
12060
|
+
* `Injector` returns itself when given `Injector` as a token:
|
|
12061
|
+
*
|
|
12062
|
+
* {@example core/di/ts/injector_spec.ts region='injectInjector'}
|
|
12063
|
+
*
|
|
12064
|
+
* @publicApi
|
|
12065
|
+
*/
|
|
12066
|
+
class Injector {
|
|
12067
|
+
static create(options, parent) {
|
|
12068
|
+
if (Array.isArray(options)) {
|
|
12069
|
+
return createInjector({ name: '' }, parent, options, '');
|
|
12070
|
+
}
|
|
11977
12071
|
else {
|
|
11978
12072
|
const name = options.name ?? '';
|
|
11979
12073
|
return createInjector({ name }, options.parent, options.providers, name);
|
|
@@ -21170,44 +21264,6 @@ function ɵɵProvidersFeature(providers, viewProviders = []) {
|
|
|
21170
21264
|
};
|
|
21171
21265
|
}
|
|
21172
21266
|
|
|
21173
|
-
/**
|
|
21174
|
-
* TODO: Implements standalone stuff!
|
|
21175
|
-
*
|
|
21176
|
-
* @codeGenApi
|
|
21177
|
-
*/
|
|
21178
|
-
function ɵɵStandaloneFeature(definition) { }
|
|
21179
|
-
|
|
21180
|
-
/**
|
|
21181
|
-
* @license
|
|
21182
|
-
* Copyright Google LLC All Rights Reserved.
|
|
21183
|
-
*
|
|
21184
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
21185
|
-
* found in the LICENSE file at https://angular.io/license
|
|
21186
|
-
*/
|
|
21187
|
-
/**
|
|
21188
|
-
* Represents a component created by a `ComponentFactory`.
|
|
21189
|
-
* Provides access to the component instance and related objects,
|
|
21190
|
-
* and provides the means of destroying the instance.
|
|
21191
|
-
*
|
|
21192
|
-
* @publicApi
|
|
21193
|
-
*/
|
|
21194
|
-
class ComponentRef$1 {
|
|
21195
|
-
}
|
|
21196
|
-
/**
|
|
21197
|
-
* Base class for a factory that can create a component dynamically.
|
|
21198
|
-
* Instantiate a factory for a given type of component with `resolveComponentFactory()`.
|
|
21199
|
-
* Use the resulting `ComponentFactory.create()` method to create a component of that type.
|
|
21200
|
-
*
|
|
21201
|
-
* @see [Dynamic Components](guide/dynamic-component-loader)
|
|
21202
|
-
*
|
|
21203
|
-
* @publicApi
|
|
21204
|
-
*
|
|
21205
|
-
* @deprecated Angular no longer requires Component factories. Please use other APIs where
|
|
21206
|
-
* Component class can be used directly.
|
|
21207
|
-
*/
|
|
21208
|
-
class ComponentFactory$1 {
|
|
21209
|
-
}
|
|
21210
|
-
|
|
21211
21267
|
/**
|
|
21212
21268
|
* @license
|
|
21213
21269
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -21248,6 +21304,66 @@ class ComponentFactoryResolver$1 {
|
|
|
21248
21304
|
}
|
|
21249
21305
|
ComponentFactoryResolver$1.NULL = ( /* @__PURE__ */new _NullComponentFactoryResolver());
|
|
21250
21306
|
|
|
21307
|
+
/**
|
|
21308
|
+
* @license
|
|
21309
|
+
* Copyright Google LLC All Rights Reserved.
|
|
21310
|
+
*
|
|
21311
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
21312
|
+
* found in the LICENSE file at https://angular.io/license
|
|
21313
|
+
*/
|
|
21314
|
+
/**
|
|
21315
|
+
* Represents an instance of an `NgModule` created by an `NgModuleFactory`.
|
|
21316
|
+
* Provides access to the `NgModule` instance and related objects.
|
|
21317
|
+
*
|
|
21318
|
+
* @publicApi
|
|
21319
|
+
*/
|
|
21320
|
+
class NgModuleRef$1 {
|
|
21321
|
+
}
|
|
21322
|
+
/**
|
|
21323
|
+
* @publicApi
|
|
21324
|
+
*
|
|
21325
|
+
* @deprecated
|
|
21326
|
+
* This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy
|
|
21327
|
+
* JIT mode. See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes)
|
|
21328
|
+
* for additional context. Angular provides APIs that accept NgModule classes directly (such as
|
|
21329
|
+
* [PlatformRef.bootstrapModule](api/core/PlatformRef#bootstrapModule) and
|
|
21330
|
+
* [createNgModuleRef](api/core/createNgModuleRef)), consider switching to those APIs instead of
|
|
21331
|
+
* using factory-based ones.
|
|
21332
|
+
*/
|
|
21333
|
+
class NgModuleFactory$1 {
|
|
21334
|
+
}
|
|
21335
|
+
|
|
21336
|
+
/**
|
|
21337
|
+
* @license
|
|
21338
|
+
* Copyright Google LLC All Rights Reserved.
|
|
21339
|
+
*
|
|
21340
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
21341
|
+
* found in the LICENSE file at https://angular.io/license
|
|
21342
|
+
*/
|
|
21343
|
+
/**
|
|
21344
|
+
* Represents a component created by a `ComponentFactory`.
|
|
21345
|
+
* Provides access to the component instance and related objects,
|
|
21346
|
+
* and provides the means of destroying the instance.
|
|
21347
|
+
*
|
|
21348
|
+
* @publicApi
|
|
21349
|
+
*/
|
|
21350
|
+
class ComponentRef$1 {
|
|
21351
|
+
}
|
|
21352
|
+
/**
|
|
21353
|
+
* Base class for a factory that can create a component dynamically.
|
|
21354
|
+
* Instantiate a factory for a given type of component with `resolveComponentFactory()`.
|
|
21355
|
+
* Use the resulting `ComponentFactory.create()` method to create a component of that type.
|
|
21356
|
+
*
|
|
21357
|
+
* @see [Dynamic Components](guide/dynamic-component-loader)
|
|
21358
|
+
*
|
|
21359
|
+
* @publicApi
|
|
21360
|
+
*
|
|
21361
|
+
* @deprecated Angular no longer requires Component factories. Please use other APIs where
|
|
21362
|
+
* Component class can be used directly.
|
|
21363
|
+
*/
|
|
21364
|
+
class ComponentFactory$1 {
|
|
21365
|
+
}
|
|
21366
|
+
|
|
21251
21367
|
/**
|
|
21252
21368
|
* @license
|
|
21253
21369
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -21407,7 +21523,7 @@ class Version {
|
|
|
21407
21523
|
/**
|
|
21408
21524
|
* @publicApi
|
|
21409
21525
|
*/
|
|
21410
|
-
const VERSION = new Version('14.0.0-next.
|
|
21526
|
+
const VERSION = new Version('14.0.0-next.15');
|
|
21411
21527
|
|
|
21412
21528
|
/**
|
|
21413
21529
|
* @license
|
|
@@ -21864,6 +21980,10 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
21864
21980
|
let realEnvironmentInjector = environmentInjector instanceof EnvironmentInjector ?
|
|
21865
21981
|
environmentInjector :
|
|
21866
21982
|
environmentInjector?.injector;
|
|
21983
|
+
if (realEnvironmentInjector && this.componentDef.getStandaloneInjector !== null) {
|
|
21984
|
+
realEnvironmentInjector = this.componentDef.getStandaloneInjector(realEnvironmentInjector) ||
|
|
21985
|
+
realEnvironmentInjector;
|
|
21986
|
+
}
|
|
21867
21987
|
const rootViewInjector = realEnvironmentInjector ? new ChainedInjector(injector, realEnvironmentInjector) : injector;
|
|
21868
21988
|
const rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);
|
|
21869
21989
|
const sanitizer = rootViewInjector.get(Sanitizer, null);
|
|
@@ -21972,83 +22092,6 @@ class ComponentRef extends ComponentRef$1 {
|
|
|
21972
22092
|
}
|
|
21973
22093
|
}
|
|
21974
22094
|
|
|
21975
|
-
/**
|
|
21976
|
-
* @license
|
|
21977
|
-
* Copyright Google LLC All Rights Reserved.
|
|
21978
|
-
*
|
|
21979
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
21980
|
-
* found in the LICENSE file at https://angular.io/license
|
|
21981
|
-
*/
|
|
21982
|
-
/**
|
|
21983
|
-
* Adds decorator, constructor, and property metadata to a given type via static metadata fields
|
|
21984
|
-
* on the type.
|
|
21985
|
-
*
|
|
21986
|
-
* These metadata fields can later be read with Angular's `ReflectionCapabilities` API.
|
|
21987
|
-
*
|
|
21988
|
-
* Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments
|
|
21989
|
-
* being tree-shaken away during production builds.
|
|
21990
|
-
*/
|
|
21991
|
-
function setClassMetadata(type, decorators, ctorParameters, propDecorators) {
|
|
21992
|
-
return noSideEffects(() => {
|
|
21993
|
-
const clazz = type;
|
|
21994
|
-
if (decorators !== null) {
|
|
21995
|
-
if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) {
|
|
21996
|
-
clazz.decorators.push(...decorators);
|
|
21997
|
-
}
|
|
21998
|
-
else {
|
|
21999
|
-
clazz.decorators = decorators;
|
|
22000
|
-
}
|
|
22001
|
-
}
|
|
22002
|
-
if (ctorParameters !== null) {
|
|
22003
|
-
// Rather than merging, clobber the existing parameters. If other projects exist which
|
|
22004
|
-
// use tsickle-style annotations and reflect over them in the same way, this could
|
|
22005
|
-
// cause issues, but that is vanishingly unlikely.
|
|
22006
|
-
clazz.ctorParameters = ctorParameters;
|
|
22007
|
-
}
|
|
22008
|
-
if (propDecorators !== null) {
|
|
22009
|
-
// The property decorator objects are merged as it is possible different fields have
|
|
22010
|
-
// different decorator types. Decorators on individual fields are not merged, as it's
|
|
22011
|
-
// also incredibly unlikely that a field will be decorated both with an Angular
|
|
22012
|
-
// decorator and a non-Angular decorator that's also been downleveled.
|
|
22013
|
-
if (clazz.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) {
|
|
22014
|
-
clazz.propDecorators = { ...clazz.propDecorators, ...propDecorators };
|
|
22015
|
-
}
|
|
22016
|
-
else {
|
|
22017
|
-
clazz.propDecorators = propDecorators;
|
|
22018
|
-
}
|
|
22019
|
-
}
|
|
22020
|
-
});
|
|
22021
|
-
}
|
|
22022
|
-
|
|
22023
|
-
/**
|
|
22024
|
-
* @license
|
|
22025
|
-
* Copyright Google LLC All Rights Reserved.
|
|
22026
|
-
*
|
|
22027
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
22028
|
-
* found in the LICENSE file at https://angular.io/license
|
|
22029
|
-
*/
|
|
22030
|
-
/**
|
|
22031
|
-
* Represents an instance of an `NgModule` created by an `NgModuleFactory`.
|
|
22032
|
-
* Provides access to the `NgModule` instance and related objects.
|
|
22033
|
-
*
|
|
22034
|
-
* @publicApi
|
|
22035
|
-
*/
|
|
22036
|
-
class NgModuleRef$1 {
|
|
22037
|
-
}
|
|
22038
|
-
/**
|
|
22039
|
-
* @publicApi
|
|
22040
|
-
*
|
|
22041
|
-
* @deprecated
|
|
22042
|
-
* This class was mostly used as a part of ViewEngine-based JIT API and is no longer needed in Ivy
|
|
22043
|
-
* JIT mode. See [JIT API changes due to ViewEngine deprecation](guide/deprecations#jit-api-changes)
|
|
22044
|
-
* for additional context. Angular provides APIs that accept NgModule classes directly (such as
|
|
22045
|
-
* [PlatformRef.bootstrapModule](api/core/PlatformRef#bootstrapModule) and
|
|
22046
|
-
* [createNgModuleRef](api/core/createNgModuleRef)), consider switching to those APIs instead of
|
|
22047
|
-
* using factory-based ones.
|
|
22048
|
-
*/
|
|
22049
|
-
class NgModuleFactory$1 {
|
|
22050
|
-
}
|
|
22051
|
-
|
|
22052
22095
|
/**
|
|
22053
22096
|
* @license
|
|
22054
22097
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -22154,6 +22197,118 @@ function createEnvironmentInjector(providers, parent = null, debugName = null) {
|
|
|
22154
22197
|
return adapter.injector;
|
|
22155
22198
|
}
|
|
22156
22199
|
|
|
22200
|
+
/**
|
|
22201
|
+
* @license
|
|
22202
|
+
* Copyright Google LLC All Rights Reserved.
|
|
22203
|
+
*
|
|
22204
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
22205
|
+
* found in the LICENSE file at https://angular.io/license
|
|
22206
|
+
*/
|
|
22207
|
+
/**
|
|
22208
|
+
* A service used by the framework to create instances of standalone injectors. Those injectors are
|
|
22209
|
+
* created on demand in case of dynamic component instantiation and contain ambient providers
|
|
22210
|
+
* collected from the imports graph rooted at a given standalone component.
|
|
22211
|
+
*/
|
|
22212
|
+
class StandaloneService {
|
|
22213
|
+
constructor(_injector) {
|
|
22214
|
+
this._injector = _injector;
|
|
22215
|
+
this.cachedInjectors = new Map();
|
|
22216
|
+
}
|
|
22217
|
+
getOrCreateStandaloneInjector(componentDef) {
|
|
22218
|
+
if (!componentDef.standalone) {
|
|
22219
|
+
return null;
|
|
22220
|
+
}
|
|
22221
|
+
if (!this.cachedInjectors.has(componentDef)) {
|
|
22222
|
+
const providers = importProvidersFrom(componentDef.type);
|
|
22223
|
+
const standaloneInjector = providers.length > 0 ?
|
|
22224
|
+
createEnvironmentInjector(providers, this._injector, `Standalone[${componentDef.type.name}]`) :
|
|
22225
|
+
null;
|
|
22226
|
+
this.cachedInjectors.set(componentDef, standaloneInjector);
|
|
22227
|
+
}
|
|
22228
|
+
return this.cachedInjectors.get(componentDef);
|
|
22229
|
+
}
|
|
22230
|
+
ngOnDestroy() {
|
|
22231
|
+
try {
|
|
22232
|
+
for (const injector of this.cachedInjectors.values()) {
|
|
22233
|
+
if (injector !== null) {
|
|
22234
|
+
injector.destroy();
|
|
22235
|
+
}
|
|
22236
|
+
}
|
|
22237
|
+
}
|
|
22238
|
+
finally {
|
|
22239
|
+
this.cachedInjectors.clear();
|
|
22240
|
+
}
|
|
22241
|
+
}
|
|
22242
|
+
}
|
|
22243
|
+
StandaloneService.ɵprov = ɵɵdefineInjectable({
|
|
22244
|
+
token: StandaloneService,
|
|
22245
|
+
providedIn: 'environment',
|
|
22246
|
+
factory: () => new StandaloneService(ɵɵinject(EnvironmentInjector)),
|
|
22247
|
+
});
|
|
22248
|
+
/**
|
|
22249
|
+
* A feature that acts as a setup code for the {@see StandaloneService}.
|
|
22250
|
+
*
|
|
22251
|
+
* The most important responsaibility of this feature is to expose the "getStandaloneInjector"
|
|
22252
|
+
* function (an entry points to a standalone injector creation) on a component definition object. We
|
|
22253
|
+
* go through the features infrastructure to make sure that the standalone injector creation logic
|
|
22254
|
+
* is tree-shakable and not included in applications that don't use standalone components.
|
|
22255
|
+
*
|
|
22256
|
+
* @codeGenApi
|
|
22257
|
+
*/
|
|
22258
|
+
function ɵɵStandaloneFeature(definition) {
|
|
22259
|
+
definition.getStandaloneInjector = (parentInjector) => {
|
|
22260
|
+
return parentInjector.get(StandaloneService).getOrCreateStandaloneInjector(definition);
|
|
22261
|
+
};
|
|
22262
|
+
}
|
|
22263
|
+
|
|
22264
|
+
/**
|
|
22265
|
+
* @license
|
|
22266
|
+
* Copyright Google LLC All Rights Reserved.
|
|
22267
|
+
*
|
|
22268
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
22269
|
+
* found in the LICENSE file at https://angular.io/license
|
|
22270
|
+
*/
|
|
22271
|
+
/**
|
|
22272
|
+
* Adds decorator, constructor, and property metadata to a given type via static metadata fields
|
|
22273
|
+
* on the type.
|
|
22274
|
+
*
|
|
22275
|
+
* These metadata fields can later be read with Angular's `ReflectionCapabilities` API.
|
|
22276
|
+
*
|
|
22277
|
+
* Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments
|
|
22278
|
+
* being tree-shaken away during production builds.
|
|
22279
|
+
*/
|
|
22280
|
+
function setClassMetadata(type, decorators, ctorParameters, propDecorators) {
|
|
22281
|
+
return noSideEffects(() => {
|
|
22282
|
+
const clazz = type;
|
|
22283
|
+
if (decorators !== null) {
|
|
22284
|
+
if (clazz.hasOwnProperty('decorators') && clazz.decorators !== undefined) {
|
|
22285
|
+
clazz.decorators.push(...decorators);
|
|
22286
|
+
}
|
|
22287
|
+
else {
|
|
22288
|
+
clazz.decorators = decorators;
|
|
22289
|
+
}
|
|
22290
|
+
}
|
|
22291
|
+
if (ctorParameters !== null) {
|
|
22292
|
+
// Rather than merging, clobber the existing parameters. If other projects exist which
|
|
22293
|
+
// use tsickle-style annotations and reflect over them in the same way, this could
|
|
22294
|
+
// cause issues, but that is vanishingly unlikely.
|
|
22295
|
+
clazz.ctorParameters = ctorParameters;
|
|
22296
|
+
}
|
|
22297
|
+
if (propDecorators !== null) {
|
|
22298
|
+
// The property decorator objects are merged as it is possible different fields have
|
|
22299
|
+
// different decorator types. Decorators on individual fields are not merged, as it's
|
|
22300
|
+
// also incredibly unlikely that a field will be decorated both with an Angular
|
|
22301
|
+
// decorator and a non-Angular decorator that's also been downleveled.
|
|
22302
|
+
if (clazz.hasOwnProperty('propDecorators') && clazz.propDecorators !== undefined) {
|
|
22303
|
+
clazz.propDecorators = { ...clazz.propDecorators, ...propDecorators };
|
|
22304
|
+
}
|
|
22305
|
+
else {
|
|
22306
|
+
clazz.propDecorators = propDecorators;
|
|
22307
|
+
}
|
|
22308
|
+
}
|
|
22309
|
+
});
|
|
22310
|
+
}
|
|
22311
|
+
|
|
22157
22312
|
/**
|
|
22158
22313
|
* @license
|
|
22159
22314
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -24145,9 +24300,16 @@ function compileNgModuleDefs(moduleType, ngModule, allowDuplicateDeclarationsInR
|
|
|
24145
24300
|
configurable: !!ngDevMode,
|
|
24146
24301
|
});
|
|
24147
24302
|
}
|
|
24303
|
+
function isStandalone(type) {
|
|
24304
|
+
const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);
|
|
24305
|
+
return def !== null ? def.standalone : false;
|
|
24306
|
+
}
|
|
24148
24307
|
function verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) {
|
|
24149
24308
|
if (verifiedNgModule.get(moduleType))
|
|
24150
24309
|
return;
|
|
24310
|
+
// skip verifications of standalone components, direcrtives and pipes
|
|
24311
|
+
if (isStandalone(moduleType))
|
|
24312
|
+
return;
|
|
24151
24313
|
verifiedNgModule.set(moduleType, true);
|
|
24152
24314
|
moduleType = resolveForwardRef(moduleType);
|
|
24153
24315
|
let ngModuleDef;
|
|
@@ -24163,9 +24325,9 @@ function verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRo
|
|
|
24163
24325
|
const errors = [];
|
|
24164
24326
|
const declarations = maybeUnwrapFn(ngModuleDef.declarations);
|
|
24165
24327
|
const imports = maybeUnwrapFn(ngModuleDef.imports);
|
|
24166
|
-
flatten(imports).map(unwrapModuleWithProvidersImports).forEach(
|
|
24167
|
-
verifySemanticsOfNgModuleImport(
|
|
24168
|
-
verifySemanticsOfNgModuleDef(
|
|
24328
|
+
flatten(imports).map(unwrapModuleWithProvidersImports).forEach(modOrStandaloneCmpt => {
|
|
24329
|
+
verifySemanticsOfNgModuleImport(modOrStandaloneCmpt, moduleType);
|
|
24330
|
+
verifySemanticsOfNgModuleDef(modOrStandaloneCmpt, false, moduleType);
|
|
24169
24331
|
});
|
|
24170
24332
|
const exports = maybeUnwrapFn(ngModuleDef.exports);
|
|
24171
24333
|
declarations.forEach(verifyDeclarationsHaveDefinitions);
|
|
@@ -24262,10 +24424,12 @@ function verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRo
|
|
|
24262
24424
|
}
|
|
24263
24425
|
function verifySemanticsOfNgModuleImport(type, importingModule) {
|
|
24264
24426
|
type = resolveForwardRef(type);
|
|
24265
|
-
|
|
24427
|
+
const directiveDef = getComponentDef(type) || getDirectiveDef(type);
|
|
24428
|
+
if (directiveDef !== null && !directiveDef.standalone) {
|
|
24266
24429
|
throw new Error(`Unexpected directive '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);
|
|
24267
24430
|
}
|
|
24268
|
-
|
|
24431
|
+
const pipeDef = getPipeDef$1(type);
|
|
24432
|
+
if (pipeDef !== null && !pipeDef.standalone) {
|
|
24269
24433
|
throw new Error(`Unexpected pipe '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);
|
|
24270
24434
|
}
|
|
24271
24435
|
}
|
|
@@ -24319,7 +24483,11 @@ function resetCompiledComponents() {
|
|
|
24319
24483
|
*/
|
|
24320
24484
|
function computeCombinedExports(type) {
|
|
24321
24485
|
type = resolveForwardRef(type);
|
|
24322
|
-
const ngModuleDef = getNgModuleDef(type
|
|
24486
|
+
const ngModuleDef = getNgModuleDef(type);
|
|
24487
|
+
// a standalone component, directive or pipe
|
|
24488
|
+
if (ngModuleDef === null) {
|
|
24489
|
+
return [type];
|
|
24490
|
+
}
|
|
24323
24491
|
return [...flatten(maybeUnwrapFn(ngModuleDef.exports).map((type) => {
|
|
24324
24492
|
const ngModuleDef = getNgModuleDef(type);
|
|
24325
24493
|
if (ngModuleDef) {
|
|
@@ -24368,6 +24536,47 @@ function patchComponentDefWithScope(componentDef, transitiveScopes) {
|
|
|
24368
24536
|
// order to avoid this problem, we force fresh TView to be created.
|
|
24369
24537
|
componentDef.tView = null;
|
|
24370
24538
|
}
|
|
24539
|
+
/**
|
|
24540
|
+
* Compute the pair of transitive scopes (compilation scope and exported scope) for a given type
|
|
24541
|
+
* (eaither a NgModule or a standalone component / directive / pipe).
|
|
24542
|
+
*/
|
|
24543
|
+
function transitiveScopesFor(type) {
|
|
24544
|
+
if (isNgModule(type)) {
|
|
24545
|
+
return transitiveScopesForNgModule(type);
|
|
24546
|
+
}
|
|
24547
|
+
else if (isStandalone(type)) {
|
|
24548
|
+
const directiveDef = getComponentDef(type) || getDirectiveDef(type);
|
|
24549
|
+
if (directiveDef !== null) {
|
|
24550
|
+
return {
|
|
24551
|
+
schemas: null,
|
|
24552
|
+
compilation: {
|
|
24553
|
+
directives: new Set(),
|
|
24554
|
+
pipes: new Set(),
|
|
24555
|
+
},
|
|
24556
|
+
exported: {
|
|
24557
|
+
directives: new Set([type]),
|
|
24558
|
+
pipes: new Set(),
|
|
24559
|
+
},
|
|
24560
|
+
};
|
|
24561
|
+
}
|
|
24562
|
+
const pipeDef = getPipeDef$1(type);
|
|
24563
|
+
if (pipeDef !== null) {
|
|
24564
|
+
return {
|
|
24565
|
+
schemas: null,
|
|
24566
|
+
compilation: {
|
|
24567
|
+
directives: new Set(),
|
|
24568
|
+
pipes: new Set(),
|
|
24569
|
+
},
|
|
24570
|
+
exported: {
|
|
24571
|
+
directives: new Set(),
|
|
24572
|
+
pipes: new Set([type]),
|
|
24573
|
+
},
|
|
24574
|
+
};
|
|
24575
|
+
}
|
|
24576
|
+
}
|
|
24577
|
+
// TODO: change the error message to be more user-facing and take standalone into account
|
|
24578
|
+
throw new Error(`${type.name} does not have a module def (ɵmod property)`);
|
|
24579
|
+
}
|
|
24371
24580
|
/**
|
|
24372
24581
|
* Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.
|
|
24373
24582
|
*
|
|
@@ -24377,11 +24586,8 @@ function patchComponentDefWithScope(componentDef, transitiveScopes) {
|
|
|
24377
24586
|
*
|
|
24378
24587
|
* @param moduleType module that transitive scope should be calculated for.
|
|
24379
24588
|
*/
|
|
24380
|
-
function
|
|
24381
|
-
|
|
24382
|
-
throw new Error(`${moduleType.name} does not have a module def (ɵmod property)`);
|
|
24383
|
-
}
|
|
24384
|
-
const def = getNgModuleDef(moduleType);
|
|
24589
|
+
function transitiveScopesForNgModule(moduleType) {
|
|
24590
|
+
const def = getNgModuleDef(moduleType, true);
|
|
24385
24591
|
if (def.transitiveCompileScopes !== null) {
|
|
24386
24592
|
return def.transitiveCompileScopes;
|
|
24387
24593
|
}
|
|
@@ -24397,13 +24603,9 @@ function transitiveScopesFor(moduleType) {
|
|
|
24397
24603
|
},
|
|
24398
24604
|
};
|
|
24399
24605
|
maybeUnwrapFn(def.imports).forEach((imported) => {
|
|
24400
|
-
const importedType = imported;
|
|
24401
|
-
if (!isNgModule(importedType)) {
|
|
24402
|
-
throw new Error(`Importing ${importedType.name} which does not have a ɵmod property`);
|
|
24403
|
-
}
|
|
24404
24606
|
// When this module imports another, the imported module's exported directives and pipes are
|
|
24405
24607
|
// added to the compilation scope of this module.
|
|
24406
|
-
const importedScope = transitiveScopesFor(
|
|
24608
|
+
const importedScope = transitiveScopesFor(imported);
|
|
24407
24609
|
importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry));
|
|
24408
24610
|
importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry));
|
|
24409
24611
|
});
|
|
@@ -24546,18 +24748,35 @@ function compileComponent(type, metadata) {
|
|
|
24546
24748
|
preserveWhitespaces,
|
|
24547
24749
|
styles: metadata.styles || EMPTY_ARRAY,
|
|
24548
24750
|
animations: metadata.animations,
|
|
24751
|
+
// JIT components are always compiled against an empty set of `declarations`. Instead, the
|
|
24752
|
+
// `directiveDefs` and `pipeDefs` are updated at a later point:
|
|
24753
|
+
// * for NgModule-based components, they're set when the NgModule which declares the
|
|
24754
|
+
// component resolves in the module scoping queue
|
|
24755
|
+
// * for standalone components, they're set just below, after `compileComponent`.
|
|
24549
24756
|
declarations: [],
|
|
24550
24757
|
changeDetection: metadata.changeDetection,
|
|
24551
24758
|
encapsulation,
|
|
24552
24759
|
interpolation: metadata.interpolation,
|
|
24553
24760
|
viewProviders: metadata.viewProviders || null,
|
|
24761
|
+
isStandalone: !!metadata.standalone,
|
|
24554
24762
|
};
|
|
24555
24763
|
compilationDepth++;
|
|
24556
24764
|
try {
|
|
24557
24765
|
if (meta.usesInheritance) {
|
|
24558
24766
|
addDirectiveDefToUndecoratedParents(type);
|
|
24559
24767
|
}
|
|
24560
|
-
ngComponentDef =
|
|
24768
|
+
ngComponentDef =
|
|
24769
|
+
compiler.compileComponent(angularCoreEnv, templateUrl, meta);
|
|
24770
|
+
if (metadata.standalone) {
|
|
24771
|
+
// Patch the component definition for standalone components with `directiveDefs` and
|
|
24772
|
+
// `pipeDefs` functions which lazily compute the directives/pipes available in the
|
|
24773
|
+
// standalone component. Also set `dependencies` to the lazily resolved list of imports.
|
|
24774
|
+
const imports = flatten(metadata.imports || EMPTY_ARRAY);
|
|
24775
|
+
const { directiveDefs, pipeDefs } = getStandaloneDefFunctions(type, imports);
|
|
24776
|
+
ngComponentDef.directiveDefs = directiveDefs;
|
|
24777
|
+
ngComponentDef.pipeDefs = pipeDefs;
|
|
24778
|
+
ngComponentDef.dependencies = () => imports.map(resolveForwardRef);
|
|
24779
|
+
}
|
|
24561
24780
|
}
|
|
24562
24781
|
finally {
|
|
24563
24782
|
// Ensure that the compilation depth is decremented even when the compilation failed.
|
|
@@ -24579,6 +24798,17 @@ function compileComponent(type, metadata) {
|
|
|
24579
24798
|
const scopes = transitiveScopesFor(type.ngSelectorScope);
|
|
24580
24799
|
patchComponentDefWithScope(ngComponentDef, scopes);
|
|
24581
24800
|
}
|
|
24801
|
+
if (metadata.schemas) {
|
|
24802
|
+
if (metadata.standalone) {
|
|
24803
|
+
ngComponentDef.schemas = metadata.schemas;
|
|
24804
|
+
}
|
|
24805
|
+
else {
|
|
24806
|
+
throw new Error(`The 'schemas' was specified for the ${stringifyForError(type)} but is only valid on a component that is standalone.`);
|
|
24807
|
+
}
|
|
24808
|
+
}
|
|
24809
|
+
else if (metadata.standalone) {
|
|
24810
|
+
ngComponentDef.schemas = [];
|
|
24811
|
+
}
|
|
24582
24812
|
}
|
|
24583
24813
|
return ngComponentDef;
|
|
24584
24814
|
},
|
|
@@ -24586,6 +24816,65 @@ function compileComponent(type, metadata) {
|
|
|
24586
24816
|
configurable: !!ngDevMode,
|
|
24587
24817
|
});
|
|
24588
24818
|
}
|
|
24819
|
+
/**
|
|
24820
|
+
* Build memoized `directiveDefs` and `pipeDefs` functions for the component definition of a
|
|
24821
|
+
* standalone component, which process `imports` and filter out directives and pipes. The use of
|
|
24822
|
+
* memoized functions here allows for the delayed resolution of any `forwardRef`s present in the
|
|
24823
|
+
* component's `imports`.
|
|
24824
|
+
*/
|
|
24825
|
+
function getStandaloneDefFunctions(type, imports) {
|
|
24826
|
+
let cachedDirectiveDefs = null;
|
|
24827
|
+
let cachedPipeDefs = null;
|
|
24828
|
+
const directiveDefs = () => {
|
|
24829
|
+
if (cachedDirectiveDefs === null) {
|
|
24830
|
+
// Standalone components are always able to self-reference, so include the component's own
|
|
24831
|
+
// definition in its `directiveDefs`.
|
|
24832
|
+
cachedDirectiveDefs = [getComponentDef(type)];
|
|
24833
|
+
for (const rawDep of imports) {
|
|
24834
|
+
const dep = resolveForwardRef(rawDep);
|
|
24835
|
+
if (!!getNgModuleDef(dep)) {
|
|
24836
|
+
const scope = transitiveScopesFor(dep);
|
|
24837
|
+
for (const dir of scope.exported.directives) {
|
|
24838
|
+
const def = getComponentDef(dir) || getDirectiveDef(dir);
|
|
24839
|
+
if (def) {
|
|
24840
|
+
cachedDirectiveDefs.push(def);
|
|
24841
|
+
}
|
|
24842
|
+
}
|
|
24843
|
+
}
|
|
24844
|
+
else {
|
|
24845
|
+
const def = getComponentDef(dep) || getDirectiveDef(dep);
|
|
24846
|
+
if (def) {
|
|
24847
|
+
cachedDirectiveDefs.push(def);
|
|
24848
|
+
}
|
|
24849
|
+
}
|
|
24850
|
+
}
|
|
24851
|
+
}
|
|
24852
|
+
return cachedDirectiveDefs;
|
|
24853
|
+
};
|
|
24854
|
+
const pipeDefs = () => {
|
|
24855
|
+
if (cachedPipeDefs === null) {
|
|
24856
|
+
cachedPipeDefs = [];
|
|
24857
|
+
for (const rawDep of imports) {
|
|
24858
|
+
const dep = resolveForwardRef(rawDep);
|
|
24859
|
+
if (!!getNgModuleDef(dep)) {
|
|
24860
|
+
const scope = transitiveScopesFor(dep);
|
|
24861
|
+
cachedPipeDefs.push(...Array.from(scope.exported.pipes).map(pipe => getPipeDef$1(pipe)));
|
|
24862
|
+
}
|
|
24863
|
+
else {
|
|
24864
|
+
const def = getPipeDef$1(dep);
|
|
24865
|
+
if (def) {
|
|
24866
|
+
cachedPipeDefs.push(def);
|
|
24867
|
+
}
|
|
24868
|
+
}
|
|
24869
|
+
}
|
|
24870
|
+
}
|
|
24871
|
+
return cachedPipeDefs;
|
|
24872
|
+
};
|
|
24873
|
+
return {
|
|
24874
|
+
directiveDefs,
|
|
24875
|
+
pipeDefs,
|
|
24876
|
+
};
|
|
24877
|
+
}
|
|
24589
24878
|
function hasSelectorScope(component) {
|
|
24590
24879
|
return component.ngSelectorScope !== undefined;
|
|
24591
24880
|
}
|
|
@@ -24674,9 +24963,7 @@ function directiveMetadata(type, metadata) {
|
|
|
24674
24963
|
exportAs: extractExportAs(metadata.exportAs),
|
|
24675
24964
|
providers: metadata.providers || null,
|
|
24676
24965
|
viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),
|
|
24677
|
-
|
|
24678
|
-
// functionality is fully rolled out.
|
|
24679
|
-
isStandalone: false,
|
|
24966
|
+
isStandalone: !!metadata.standalone,
|
|
24680
24967
|
};
|
|
24681
24968
|
}
|
|
24682
24969
|
/**
|
|
@@ -24821,9 +25108,7 @@ function getPipeMetadata(type, meta) {
|
|
|
24821
25108
|
name: type.name,
|
|
24822
25109
|
pipeName: meta.name,
|
|
24823
25110
|
pure: meta.pure !== undefined ? meta.pure : true,
|
|
24824
|
-
|
|
24825
|
-
// functionality is fully rolled out.
|
|
24826
|
-
isStandalone: false,
|
|
25111
|
+
isStandalone: !!meta.standalone,
|
|
24827
25112
|
};
|
|
24828
25113
|
}
|
|
24829
25114
|
|
|
@@ -26305,11 +26590,81 @@ function createPlatform(injector) {
|
|
|
26305
26590
|
publishDefaultGlobalUtils();
|
|
26306
26591
|
_platformInjector = injector;
|
|
26307
26592
|
const platform = injector.get(PlatformRef);
|
|
26308
|
-
|
|
26309
|
-
if (inits)
|
|
26310
|
-
inits.forEach(initFn => initFn());
|
|
26593
|
+
runPlatformInitializers(injector);
|
|
26311
26594
|
return platform;
|
|
26312
26595
|
}
|
|
26596
|
+
/**
|
|
26597
|
+
* The goal of this function is to bootstrap a platform injector,
|
|
26598
|
+
* but avoid referencing `PlatformRef` class.
|
|
26599
|
+
* This function is needed for bootstrapping a Standalone Component.
|
|
26600
|
+
*/
|
|
26601
|
+
function createOrReusePlatformInjector(providers = []) {
|
|
26602
|
+
// If a platform injector already exists, it means that the platform
|
|
26603
|
+
// is already bootstrapped and no additional actions are required.
|
|
26604
|
+
if (_platformInjector)
|
|
26605
|
+
return _platformInjector;
|
|
26606
|
+
// Otherwise, setup a new platform injector and run platform initializers.
|
|
26607
|
+
const injector = createPlatformInjector(providers);
|
|
26608
|
+
_platformInjector = injector;
|
|
26609
|
+
publishDefaultGlobalUtils();
|
|
26610
|
+
runPlatformInitializers(injector);
|
|
26611
|
+
return injector;
|
|
26612
|
+
}
|
|
26613
|
+
function runPlatformInitializers(injector) {
|
|
26614
|
+
const inits = injector.get(PLATFORM_INITIALIZER, null);
|
|
26615
|
+
if (inits) {
|
|
26616
|
+
inits.forEach((init) => init());
|
|
26617
|
+
}
|
|
26618
|
+
}
|
|
26619
|
+
/**
|
|
26620
|
+
* Internal bootstrap application API that implements the core bootstrap logic.
|
|
26621
|
+
*
|
|
26622
|
+
* Platforms (such as `platform-browser`) may require different set of application and platform
|
|
26623
|
+
* providers for an application to function correctly. As a result, platforms may use this function
|
|
26624
|
+
* internally and supply the necessary providers during the bootstrap, while exposing
|
|
26625
|
+
* platform-specific APIs as a part of their public API.
|
|
26626
|
+
*
|
|
26627
|
+
* @returns A promise that returns an `ApplicationRef` instance once resolved.
|
|
26628
|
+
*/
|
|
26629
|
+
function bootstrapApplication(config) {
|
|
26630
|
+
const { rootComponent, appProviders, platformProviders } = config;
|
|
26631
|
+
NG_DEV_MODE && assertStandaloneComponentType(rootComponent);
|
|
26632
|
+
const platformInjector = createOrReusePlatformInjector(platformProviders);
|
|
26633
|
+
const ngZone = new NgZone(getNgZoneOptions());
|
|
26634
|
+
return ngZone.run(() => {
|
|
26635
|
+
// Create root application injector based on a set of providers configured at the platform
|
|
26636
|
+
// bootstrap level as well as providers passed to the bootstrap call by a user.
|
|
26637
|
+
const allAppProviders = [
|
|
26638
|
+
{ provide: NgZone, useValue: ngZone },
|
|
26639
|
+
...(appProviders || []), //
|
|
26640
|
+
];
|
|
26641
|
+
const appInjector = createEnvironmentInjector(allAppProviders, platformInjector, 'Environment Injector');
|
|
26642
|
+
const exceptionHandler = appInjector.get(ErrorHandler, null);
|
|
26643
|
+
if (NG_DEV_MODE && !exceptionHandler) {
|
|
26644
|
+
throw new RuntimeError(402 /* ERROR_HANDLER_NOT_FOUND */, 'No `ErrorHandler` found in the Dependency Injection tree.');
|
|
26645
|
+
}
|
|
26646
|
+
let onErrorSubscription;
|
|
26647
|
+
ngZone.runOutsideAngular(() => {
|
|
26648
|
+
onErrorSubscription = ngZone.onError.subscribe({
|
|
26649
|
+
next: (error) => {
|
|
26650
|
+
exceptionHandler.handleError(error);
|
|
26651
|
+
}
|
|
26652
|
+
});
|
|
26653
|
+
});
|
|
26654
|
+
return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {
|
|
26655
|
+
const initStatus = appInjector.get(ApplicationInitStatus);
|
|
26656
|
+
initStatus.runInitializers();
|
|
26657
|
+
return initStatus.donePromise.then(() => {
|
|
26658
|
+
const localeId = appInjector.get(LOCALE_ID, DEFAULT_LOCALE_ID);
|
|
26659
|
+
setLocaleId(localeId || DEFAULT_LOCALE_ID);
|
|
26660
|
+
const appRef = appInjector.get(ApplicationRef);
|
|
26661
|
+
appRef.onDestroy(() => onErrorSubscription.unsubscribe());
|
|
26662
|
+
appRef.bootstrap(rootComponent);
|
|
26663
|
+
return appRef;
|
|
26664
|
+
});
|
|
26665
|
+
});
|
|
26666
|
+
});
|
|
26667
|
+
}
|
|
26313
26668
|
/**
|
|
26314
26669
|
* Creates a factory for a platform. Can be used to provide or override `Providers` specific to
|
|
26315
26670
|
* your application's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.
|
|
@@ -26418,10 +26773,7 @@ class PlatformRef {
|
|
|
26418
26773
|
// as instantiating the module creates some providers eagerly.
|
|
26419
26774
|
// So we create a mini parent injector that just contains the new NgZone and
|
|
26420
26775
|
// pass that as parent to the NgModuleFactory.
|
|
26421
|
-
const
|
|
26422
|
-
const ngZoneEventCoalescing = (options && options.ngZoneEventCoalescing) || false;
|
|
26423
|
-
const ngZoneRunCoalescing = (options && options.ngZoneRunCoalescing) || false;
|
|
26424
|
-
const ngZone = getNgZone(ngZoneOption, { ngZoneEventCoalescing, ngZoneRunCoalescing });
|
|
26776
|
+
const ngZone = getNgZone(options?.ngZone, getNgZoneOptions(options));
|
|
26425
26777
|
const providers = [{ provide: NgZone, useValue: ngZone }];
|
|
26426
26778
|
// Note: Create ngZoneInjector within ngZone.run so that all of the instantiated services are
|
|
26427
26779
|
// created within the Angular zone
|
|
@@ -26543,17 +26895,23 @@ PlatformRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: PlatformRef, fa
|
|
|
26543
26895
|
type: Injectable,
|
|
26544
26896
|
args: [{ providedIn: 'platform' }]
|
|
26545
26897
|
}], function () { return [{ type: Injector }]; }, null); })();
|
|
26546
|
-
|
|
26898
|
+
// Transforms a set of `BootstrapOptions` (supported by the NgModule-based bootstrap APIs) ->
|
|
26899
|
+
// `NgZoneOptions` that are recognized by the NgZone constructor. Passing no options will result in
|
|
26900
|
+
// a set of default options returned.
|
|
26901
|
+
function getNgZoneOptions(options) {
|
|
26902
|
+
return {
|
|
26903
|
+
enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,
|
|
26904
|
+
shouldCoalesceEventChangeDetection: !!(options && options.ngZoneEventCoalescing) || false,
|
|
26905
|
+
shouldCoalesceRunChangeDetection: !!(options && options.ngZoneRunCoalescing) || false,
|
|
26906
|
+
};
|
|
26907
|
+
}
|
|
26908
|
+
function getNgZone(ngZoneToUse, options) {
|
|
26547
26909
|
let ngZone;
|
|
26548
|
-
if (
|
|
26910
|
+
if (ngZoneToUse === 'noop') {
|
|
26549
26911
|
ngZone = new NoopNgZone();
|
|
26550
26912
|
}
|
|
26551
26913
|
else {
|
|
26552
|
-
ngZone = (
|
|
26553
|
-
enableLongStackTrace: typeof ngDevMode === 'undefined' ? false : !!ngDevMode,
|
|
26554
|
-
shouldCoalesceEventChangeDetection: !!extra?.ngZoneEventCoalescing,
|
|
26555
|
-
shouldCoalesceRunChangeDetection: !!extra?.ngZoneRunCoalescing
|
|
26556
|
-
});
|
|
26914
|
+
ngZone = (ngZoneToUse === 'zone.js' ? undefined : ngZoneToUse) || new NgZone(options);
|
|
26557
26915
|
}
|
|
26558
26916
|
return ngZone;
|
|
26559
26917
|
}
|
|
@@ -26795,15 +27153,16 @@ class ApplicationRef {
|
|
|
26795
27153
|
*/
|
|
26796
27154
|
bootstrap(componentOrFactory, rootSelectorOrNode) {
|
|
26797
27155
|
NG_DEV_MODE && this.warnIfDestroyed();
|
|
27156
|
+
const isComponentFactory = componentOrFactory instanceof ComponentFactory$1;
|
|
26798
27157
|
if (!this._initStatus.done) {
|
|
26799
|
-
const
|
|
26800
|
-
|
|
26801
|
-
|
|
26802
|
-
|
|
26803
|
-
throw new RuntimeError(405 /* ASYNC_INITIALIZERS_STILL_RUNNING */, errorMessage);
|
|
27158
|
+
const standalone = !isComponentFactory && isStandalone(componentOrFactory);
|
|
27159
|
+
const errorMessage = 'Cannot bootstrap as there are still asynchronous initializers running.' +
|
|
27160
|
+
(standalone ? '' :
|
|
27161
|
+
' Bootstrap components in the `ngDoBootstrap` method of the root module.');
|
|
27162
|
+
throw new RuntimeError(405 /* ASYNC_INITIALIZERS_STILL_RUNNING */, NG_DEV_MODE && errorMessage);
|
|
26804
27163
|
}
|
|
26805
27164
|
let componentFactory;
|
|
26806
|
-
if (
|
|
27165
|
+
if (isComponentFactory) {
|
|
26807
27166
|
componentFactory = componentOrFactory;
|
|
26808
27167
|
}
|
|
26809
27168
|
else {
|
|
@@ -29146,5 +29505,5 @@ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
|
29146
29505
|
* Generated bundle index. Do not edit.
|
|
29147
29506
|
*/
|
|
29148
29507
|
|
|
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 };
|
|
29508
|
+
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, importProvidersFrom, 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, bootstrapApplication as ɵbootstrapApplication, 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, isStandalone as ɵisStandalone, 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 };
|
|
29150
29509
|
//# sourceMappingURL=core.mjs.map
|