@angular/core 14.0.0-next.1 → 14.0.0-next.10
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 +172 -126
- package/esm2020/src/application_init.mjs +4 -3
- package/esm2020/src/application_module.mjs +5 -104
- package/esm2020/src/application_ref.mjs +6 -24
- package/esm2020/src/application_tokens.mjs +14 -2
- package/esm2020/src/change_detection/change_detection.mjs +2 -3
- package/esm2020/src/compiler/compiler_facade_interface.mjs +1 -1
- package/esm2020/src/core.mjs +2 -2
- package/esm2020/src/core_private_export.mjs +2 -1
- package/esm2020/src/core_render3_private_export.mjs +4 -3
- package/esm2020/src/debug/debug_node.mjs +137 -53
- package/esm2020/src/di/injector_compatibility.mjs +2 -2
- package/esm2020/src/di/reflective_provider.mjs +4 -4
- package/esm2020/src/i18n/tokens.mjs +39 -3
- package/esm2020/src/linker/compiler.mjs +4 -3
- package/esm2020/src/linker/ng_module_factory_loader.mjs +2 -2
- package/esm2020/src/linker/ng_module_registration.mjs +55 -0
- package/esm2020/src/linker/template_ref.mjs +3 -3
- package/esm2020/src/linker/view_container_ref.mjs +35 -8
- package/esm2020/src/reflection/platform_reflection_capabilities.mjs +1 -1
- package/esm2020/src/reflection/reflection_capabilities.mjs +1 -37
- package/esm2020/src/render3/component.mjs +3 -3
- package/esm2020/src/render3/component_ref.mjs +22 -26
- package/esm2020/src/render3/context_discovery.mjs +34 -30
- package/esm2020/src/render3/definition.mjs +3 -1
- package/esm2020/src/render3/di.mjs +177 -97
- package/esm2020/src/render3/hooks.mjs +3 -3
- package/esm2020/src/render3/i18n/i18n_parse.mjs +3 -3
- package/esm2020/src/render3/index.mjs +2 -2
- package/esm2020/src/render3/instructions/element.mjs +7 -1
- package/esm2020/src/render3/instructions/element_container.mjs +7 -1
- package/esm2020/src/render3/instructions/lview_debug.mjs +7 -4
- package/esm2020/src/render3/instructions/shared.mjs +16 -7
- package/esm2020/src/render3/interfaces/context.mjs +35 -2
- package/esm2020/src/render3/interfaces/definition.mjs +1 -1
- package/esm2020/src/render3/interfaces/injector.mjs +1 -1
- package/esm2020/src/render3/interfaces/lview_tracking.mjs +33 -0
- package/esm2020/src/render3/interfaces/renderer_dom.mjs +1 -1
- package/esm2020/src/render3/interfaces/view.mjs +4 -2
- package/esm2020/src/render3/jit/directive.mjs +5 -2
- package/esm2020/src/render3/jit/environment.mjs +4 -1
- package/esm2020/src/render3/jit/module.mjs +7 -1
- package/esm2020/src/render3/jit/module_patch.mjs +11 -0
- package/esm2020/src/render3/jit/pipe.mjs +5 -2
- package/esm2020/src/render3/ng_module_ref.mjs +1 -29
- package/esm2020/src/render3/node_manipulation.mjs +12 -3
- package/esm2020/src/render3/state.mjs +16 -2
- package/esm2020/src/render3/styling/styling_parser.mjs +2 -2
- package/esm2020/src/render3/util/discovery_utils.mjs +33 -22
- package/esm2020/src/util/coercion.mjs +12 -0
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/fake_async.mjs +3 -2
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/esm2020/testing/src/r3_test_bed.mjs +8 -2
- package/fesm2015/core.mjs +729 -571
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +10 -3
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +729 -564
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +10 -3
- package/fesm2020/testing.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/migrations/entry-components/util.js +2 -2
- package/schematics/migrations/typed-forms/index.d.ts +1 -5
- package/schematics/migrations/typed-forms/index.js +12 -34
- package/schematics/migrations/typed-forms/util.d.ts +8 -10
- package/schematics/migrations/typed-forms/util.js +99 -47
- package/schematics/utils/import_manager.js +11 -22
- package/schematics/utils/typescript/imports.js +5 -9
- package/schematics/utils/typescript/parse_tsconfig.js +6 -2
- package/schematics/utils/typescript/symbol.js +4 -3
- package/testing/testing.d.ts +3 -2
- package/esm2020/src/di/util.mjs +0 -51
- package/esm2020/src/linker/ng_module_factory_registration.mjs +0 -59
- package/esm2020/src/reflection/reflection.mjs +0 -16
- package/esm2020/src/reflection/reflector.mjs +0 -56
- package/esm2020/src/reflection/types.mjs +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.10
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -905,6 +905,7 @@ function ɵɵdefineComponent(componentDefinition) {
|
|
|
905
905
|
onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,
|
|
906
906
|
directiveDefs: null,
|
|
907
907
|
pipeDefs: null,
|
|
908
|
+
standalone: componentDefinition.standalone === true,
|
|
908
909
|
selectors: componentDefinition.selectors || EMPTY_ARRAY,
|
|
909
910
|
viewQuery: componentDefinition.viewQuery || null,
|
|
910
911
|
features: componentDefinition.features || null,
|
|
@@ -1116,6 +1117,7 @@ function ɵɵdefinePipe(pipeDef) {
|
|
|
1116
1117
|
name: pipeDef.name,
|
|
1117
1118
|
factory: null,
|
|
1118
1119
|
pure: pipeDef.pure !== false,
|
|
1120
|
+
standalone: pipeDef.standalone === true,
|
|
1119
1121
|
onDestroy: pipeDef.type.prototype.ngOnDestroy || null
|
|
1120
1122
|
};
|
|
1121
1123
|
}
|
|
@@ -1172,6 +1174,8 @@ const DECLARATION_COMPONENT_VIEW = 16;
|
|
|
1172
1174
|
const DECLARATION_LCONTAINER = 17;
|
|
1173
1175
|
const PREORDER_HOOK_FLAGS = 18;
|
|
1174
1176
|
const QUERIES = 19;
|
|
1177
|
+
const ID = 20;
|
|
1178
|
+
const EMBEDDED_VIEW_INJECTOR = 21;
|
|
1175
1179
|
/**
|
|
1176
1180
|
* Size of LView's header. Necessary to adjust for it when setting slots.
|
|
1177
1181
|
*
|
|
@@ -1179,7 +1183,7 @@ const QUERIES = 19;
|
|
|
1179
1183
|
* instruction index into `LView` index. All other indexes should be in the `LView` index space and
|
|
1180
1184
|
* there should be no need to refer to `HEADER_OFFSET` anywhere else.
|
|
1181
1185
|
*/
|
|
1182
|
-
const HEADER_OFFSET =
|
|
1186
|
+
const HEADER_OFFSET = 22;
|
|
1183
1187
|
/**
|
|
1184
1188
|
* Converts `TViewType` into human readable text.
|
|
1185
1189
|
* Make sure this matches with `TViewType`
|
|
@@ -1928,6 +1932,7 @@ function getLView() {
|
|
|
1928
1932
|
function getTView() {
|
|
1929
1933
|
return instructionState.lFrame.tView;
|
|
1930
1934
|
}
|
|
1935
|
+
// TODO(crisbeto): revert the @noinline once Closure issue is resolved.
|
|
1931
1936
|
/**
|
|
1932
1937
|
* Restores `contextViewData` to the given OpaqueViewState instance.
|
|
1933
1938
|
*
|
|
@@ -1939,11 +1944,22 @@ function getTView() {
|
|
|
1939
1944
|
* @returns Context of the restored OpaqueViewState instance.
|
|
1940
1945
|
*
|
|
1941
1946
|
* @codeGenApi
|
|
1947
|
+
* @noinline Disable inlining due to issue with Closure in listeners inside embedded views.
|
|
1942
1948
|
*/
|
|
1943
1949
|
function ɵɵrestoreView(viewToRestore) {
|
|
1944
1950
|
instructionState.lFrame.contextLView = viewToRestore;
|
|
1945
1951
|
return viewToRestore[CONTEXT];
|
|
1946
1952
|
}
|
|
1953
|
+
/**
|
|
1954
|
+
* Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in
|
|
1955
|
+
* value so that it can be used as a return value of an instruction.
|
|
1956
|
+
*
|
|
1957
|
+
* @codeGenApi
|
|
1958
|
+
*/
|
|
1959
|
+
function ɵɵresetView(value) {
|
|
1960
|
+
instructionState.lFrame.contextLView = null;
|
|
1961
|
+
return value;
|
|
1962
|
+
}
|
|
1947
1963
|
function getCurrentTNode() {
|
|
1948
1964
|
let currentTNode = getCurrentTNodePlaceholderOk();
|
|
1949
1965
|
while (currentTNode !== null && currentTNode.type === 64 /* Placeholder */) {
|
|
@@ -1975,7 +1991,9 @@ function setCurrentTNodeAsParent() {
|
|
|
1975
1991
|
instructionState.lFrame.isParent = true;
|
|
1976
1992
|
}
|
|
1977
1993
|
function getContextLView() {
|
|
1978
|
-
|
|
1994
|
+
const contextLView = instructionState.lFrame.contextLView;
|
|
1995
|
+
ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');
|
|
1996
|
+
return contextLView;
|
|
1979
1997
|
}
|
|
1980
1998
|
function isInCheckNoChangesMode() {
|
|
1981
1999
|
// TODO(misko): remove this from the LView since it is ngDevMode=true mode only.
|
|
@@ -2474,7 +2492,7 @@ function incrementInitPhaseFlags(lView, initPhase) {
|
|
|
2474
2492
|
assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');
|
|
2475
2493
|
let flags = lView[FLAGS];
|
|
2476
2494
|
if ((flags & 3 /* InitPhaseStateMask */) === initPhase) {
|
|
2477
|
-
flags &=
|
|
2495
|
+
flags &= 4095 /* IndexWithinInitPhaseReset */;
|
|
2478
2496
|
flags += 1 /* InitPhaseStateIncrementer */;
|
|
2479
2497
|
lView[FLAGS] = flags;
|
|
2480
2498
|
}
|
|
@@ -2538,12 +2556,12 @@ function callHook(currentView, initPhase, arr, i) {
|
|
|
2538
2556
|
const directiveIndex = isInitHook ? -arr[i] : arr[i];
|
|
2539
2557
|
const directive = currentView[directiveIndex];
|
|
2540
2558
|
if (isInitHook) {
|
|
2541
|
-
const indexWithintInitPhase = currentView[FLAGS] >>
|
|
2559
|
+
const indexWithintInitPhase = currentView[FLAGS] >> 12 /* IndexWithinInitPhaseShift */;
|
|
2542
2560
|
// The init phase state must be always checked here as it may have been recursively updated.
|
|
2543
2561
|
if (indexWithintInitPhase <
|
|
2544
2562
|
(currentView[PREORDER_HOOK_FLAGS] >> 16 /* NumberOfInitHooksCalledShift */) &&
|
|
2545
2563
|
(currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {
|
|
2546
|
-
currentView[FLAGS] +=
|
|
2564
|
+
currentView[FLAGS] += 4096 /* IndexWithinInitPhaseIncrementer */;
|
|
2547
2565
|
profiler(4 /* LifecycleHookStart */, directive, hook);
|
|
2548
2566
|
try {
|
|
2549
2567
|
hook.call(directive);
|
|
@@ -3104,6 +3122,8 @@ const BLOOM_MASK = BLOOM_SIZE - 1;
|
|
|
3104
3122
|
const BLOOM_BUCKET_BITS = 5;
|
|
3105
3123
|
/** Counter used to generate unique IDs for directives. */
|
|
3106
3124
|
let nextNgElementId = 0;
|
|
3125
|
+
/** Value used when something wasn't found by an injector. */
|
|
3126
|
+
const NOT_FOUND = {};
|
|
3107
3127
|
/**
|
|
3108
3128
|
* Registers this directive as present in its node's injector by flipping the directive's
|
|
3109
3129
|
* corresponding bit in the injector's bloom filter.
|
|
@@ -3215,23 +3235,7 @@ function getParentInjectorLocation(tNode, lView) {
|
|
|
3215
3235
|
// `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent
|
|
3216
3236
|
// `NodeInjector`.
|
|
3217
3237
|
while (lViewCursor !== null) {
|
|
3218
|
-
|
|
3219
|
-
const tView = lViewCursor[TVIEW];
|
|
3220
|
-
const tViewType = tView.type;
|
|
3221
|
-
if (tViewType === 2 /* Embedded */) {
|
|
3222
|
-
ngDevMode &&
|
|
3223
|
-
assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');
|
|
3224
|
-
parentTNode = tView.declTNode;
|
|
3225
|
-
}
|
|
3226
|
-
else if (tViewType === 1 /* Component */) {
|
|
3227
|
-
// Components don't have `TView.declTNode` because each instance of component could be
|
|
3228
|
-
// inserted in different location, hence `TView.declTNode` is meaningless.
|
|
3229
|
-
parentTNode = lViewCursor[T_HOST];
|
|
3230
|
-
}
|
|
3231
|
-
else {
|
|
3232
|
-
ngDevMode && assertEqual(tView.type, 0 /* Root */, 'Root type expected');
|
|
3233
|
-
parentTNode = null;
|
|
3234
|
-
}
|
|
3238
|
+
parentTNode = getTNodeFromLView(lViewCursor);
|
|
3235
3239
|
if (parentTNode === null) {
|
|
3236
3240
|
// If we have no parent, than we are done.
|
|
3237
3241
|
return NO_PARENT_INJECTOR;
|
|
@@ -3392,93 +3396,116 @@ function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {
|
|
|
3392
3396
|
*/
|
|
3393
3397
|
function getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) {
|
|
3394
3398
|
if (tNode !== null) {
|
|
3395
|
-
|
|
3396
|
-
//
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
if (
|
|
3400
|
-
|
|
3401
|
-
// flag, the module injector is not searched for that token in Ivy.
|
|
3402
|
-
return (flags & InjectFlags.Host) ?
|
|
3403
|
-
notFoundValueOrThrow(notFoundValue, token, flags) :
|
|
3404
|
-
lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
|
|
3399
|
+
// If the view or any of its ancestors have an embedded
|
|
3400
|
+
// view injector, we have to look it up there first.
|
|
3401
|
+
if (lView[FLAGS] & 2048 /* HasEmbeddedViewInjector */) {
|
|
3402
|
+
const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);
|
|
3403
|
+
if (embeddedInjectorValue !== NOT_FOUND) {
|
|
3404
|
+
return embeddedInjectorValue;
|
|
3405
3405
|
}
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3406
|
+
}
|
|
3407
|
+
// Otherwise try the node injector.
|
|
3408
|
+
const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);
|
|
3409
|
+
if (value !== NOT_FOUND) {
|
|
3410
|
+
return value;
|
|
3411
|
+
}
|
|
3412
|
+
}
|
|
3413
|
+
// Finally, fall back to the module injector.
|
|
3414
|
+
return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
|
|
3415
|
+
}
|
|
3416
|
+
/**
|
|
3417
|
+
* Returns the value associated to the given token from the node injector.
|
|
3418
|
+
*
|
|
3419
|
+
* @param tNode The Node where the search for the injector should start
|
|
3420
|
+
* @param lView The `LView` that contains the `tNode`
|
|
3421
|
+
* @param token The token to look for
|
|
3422
|
+
* @param flags Injection flags
|
|
3423
|
+
* @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`
|
|
3424
|
+
* @returns the value from the injector, `null` when not found, or `notFoundValue` if provided
|
|
3425
|
+
*/
|
|
3426
|
+
function lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {
|
|
3427
|
+
const bloomHash = bloomHashBitOrFactory(token);
|
|
3428
|
+
// If the ID stored here is a function, this is a special object like ElementRef or TemplateRef
|
|
3429
|
+
// so just call the factory function to create it.
|
|
3430
|
+
if (typeof bloomHash === 'function') {
|
|
3431
|
+
if (!enterDI(lView, tNode, flags)) {
|
|
3432
|
+
// Failed to enter DI, try module injector instead. If a token is injected with the @Host
|
|
3433
|
+
// flag, the module injector is not searched for that token in Ivy.
|
|
3434
|
+
return (flags & InjectFlags.Host) ?
|
|
3435
|
+
notFoundValueOrThrow(notFoundValue, token, flags) :
|
|
3436
|
+
lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
|
|
3437
|
+
}
|
|
3438
|
+
try {
|
|
3439
|
+
const value = bloomHash(flags);
|
|
3440
|
+
if (value == null && !(flags & InjectFlags.Optional)) {
|
|
3441
|
+
throwProviderNotFoundError(token);
|
|
3414
3442
|
}
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
}
|
|
3418
|
-
}
|
|
3419
|
-
else if (typeof bloomHash === 'number') {
|
|
3420
|
-
// A reference to the previous injector TView that was found while climbing the element
|
|
3421
|
-
// injector tree. This is used to know if viewProviders can be accessed on the current
|
|
3422
|
-
// injector.
|
|
3423
|
-
let previousTView = null;
|
|
3424
|
-
let injectorIndex = getInjectorIndex(tNode, lView);
|
|
3425
|
-
let parentLocation = NO_PARENT_INJECTOR;
|
|
3426
|
-
let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;
|
|
3427
|
-
// If we should skip this injector, or if there is no injector on this node, start by
|
|
3428
|
-
// searching the parent injector.
|
|
3429
|
-
if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
|
|
3430
|
-
parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :
|
|
3431
|
-
lView[injectorIndex + 8 /* PARENT */];
|
|
3432
|
-
if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {
|
|
3433
|
-
injectorIndex = -1;
|
|
3434
|
-
}
|
|
3435
|
-
else {
|
|
3436
|
-
previousTView = lView[TVIEW];
|
|
3437
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
3438
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
3439
|
-
}
|
|
3443
|
+
else {
|
|
3444
|
+
return value;
|
|
3440
3445
|
}
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3446
|
+
}
|
|
3447
|
+
finally {
|
|
3448
|
+
leaveDI();
|
|
3449
|
+
}
|
|
3450
|
+
}
|
|
3451
|
+
else if (typeof bloomHash === 'number') {
|
|
3452
|
+
// A reference to the previous injector TView that was found while climbing the element
|
|
3453
|
+
// injector tree. This is used to know if viewProviders can be accessed on the current
|
|
3454
|
+
// injector.
|
|
3455
|
+
let previousTView = null;
|
|
3456
|
+
let injectorIndex = getInjectorIndex(tNode, lView);
|
|
3457
|
+
let parentLocation = NO_PARENT_INJECTOR;
|
|
3458
|
+
let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;
|
|
3459
|
+
// If we should skip this injector, or if there is no injector on this node, start by
|
|
3460
|
+
// searching the parent injector.
|
|
3461
|
+
if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
|
|
3462
|
+
parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :
|
|
3463
|
+
lView[injectorIndex + 8 /* PARENT */];
|
|
3464
|
+
if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {
|
|
3465
|
+
injectorIndex = -1;
|
|
3466
|
+
}
|
|
3467
|
+
else {
|
|
3468
|
+
previousTView = lView[TVIEW];
|
|
3469
|
+
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
3470
|
+
lView = getParentInjectorView(parentLocation, lView);
|
|
3471
|
+
}
|
|
3472
|
+
}
|
|
3473
|
+
// Traverse up the injector tree until we find a potential match or until we know there
|
|
3474
|
+
// *isn't* a match.
|
|
3475
|
+
while (injectorIndex !== -1) {
|
|
3476
|
+
ngDevMode && assertNodeInjector(lView, injectorIndex);
|
|
3477
|
+
// Check the current injector. If it matches, see if it contains token.
|
|
3478
|
+
const tView = lView[TVIEW];
|
|
3479
|
+
ngDevMode &&
|
|
3480
|
+
assertTNodeForLView(tView.data[injectorIndex + 8 /* TNODE */], lView);
|
|
3481
|
+
if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {
|
|
3482
|
+
// At this point, we have an injector which *may* contain the token, so we step through
|
|
3483
|
+
// the providers and directives associated with the injector's corresponding node to get
|
|
3484
|
+
// the instance.
|
|
3485
|
+
const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);
|
|
3486
|
+
if (instance !== NOT_FOUND) {
|
|
3487
|
+
return instance;
|
|
3473
3488
|
}
|
|
3474
3489
|
}
|
|
3490
|
+
parentLocation = lView[injectorIndex + 8 /* PARENT */];
|
|
3491
|
+
if (parentLocation !== NO_PARENT_INJECTOR &&
|
|
3492
|
+
shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* TNODE */] === hostTElementNode) &&
|
|
3493
|
+
bloomHasToken(bloomHash, injectorIndex, lView)) {
|
|
3494
|
+
// The def wasn't found anywhere on this node, so it was a false positive.
|
|
3495
|
+
// Traverse up the tree and continue searching.
|
|
3496
|
+
previousTView = tView;
|
|
3497
|
+
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
3498
|
+
lView = getParentInjectorView(parentLocation, lView);
|
|
3499
|
+
}
|
|
3500
|
+
else {
|
|
3501
|
+
// If we should not search parent OR If the ancestor bloom filter value does not have the
|
|
3502
|
+
// bit corresponding to the directive we can give up on traversing up to find the specific
|
|
3503
|
+
// injector.
|
|
3504
|
+
injectorIndex = -1;
|
|
3505
|
+
}
|
|
3475
3506
|
}
|
|
3476
3507
|
}
|
|
3477
|
-
return
|
|
3478
|
-
}
|
|
3479
|
-
const NOT_FOUND = {};
|
|
3480
|
-
function createNodeInjector() {
|
|
3481
|
-
return new NodeInjector(getCurrentTNode(), getLView());
|
|
3508
|
+
return notFoundValue;
|
|
3482
3509
|
}
|
|
3483
3510
|
function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {
|
|
3484
3511
|
const currentTView = lView[TVIEW];
|
|
@@ -3652,6 +3679,10 @@ class NodeInjector {
|
|
|
3652
3679
|
return getOrCreateInjectable(this._tNode, this._lView, token, flags, notFoundValue);
|
|
3653
3680
|
}
|
|
3654
3681
|
}
|
|
3682
|
+
/** Creates a `NodeInjector` for the current node. */
|
|
3683
|
+
function createNodeInjector() {
|
|
3684
|
+
return new NodeInjector(getCurrentTNode(), getLView());
|
|
3685
|
+
}
|
|
3655
3686
|
/**
|
|
3656
3687
|
* @codeGenApi
|
|
3657
3688
|
*/
|
|
@@ -3690,6 +3721,73 @@ function getFactoryOf(type) {
|
|
|
3690
3721
|
}
|
|
3691
3722
|
return getFactoryDef(type);
|
|
3692
3723
|
}
|
|
3724
|
+
/**
|
|
3725
|
+
* Returns a value from the closest embedded or node injector.
|
|
3726
|
+
*
|
|
3727
|
+
* @param tNode The Node where the search for the injector should start
|
|
3728
|
+
* @param lView The `LView` that contains the `tNode`
|
|
3729
|
+
* @param token The token to look for
|
|
3730
|
+
* @param flags Injection flags
|
|
3731
|
+
* @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`
|
|
3732
|
+
* @returns the value from the injector, `null` when not found, or `notFoundValue` if provided
|
|
3733
|
+
*/
|
|
3734
|
+
function lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {
|
|
3735
|
+
let currentTNode = tNode;
|
|
3736
|
+
let currentLView = lView;
|
|
3737
|
+
// When an LView with an embedded view injector is inserted, it'll likely be interlaced with
|
|
3738
|
+
// nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).
|
|
3739
|
+
// Since the bloom filters for the node injectors have already been constructed and we don't
|
|
3740
|
+
// have a way of extracting the records from an injector, the only way to maintain the correct
|
|
3741
|
+
// hierarchy when resolving the value is to walk it node-by-node while attempting to resolve
|
|
3742
|
+
// the token at each level.
|
|
3743
|
+
while (currentTNode !== null && currentLView !== null &&
|
|
3744
|
+
(currentLView[FLAGS] & 2048 /* HasEmbeddedViewInjector */) &&
|
|
3745
|
+
!(currentLView[FLAGS] & 512 /* IsRoot */)) {
|
|
3746
|
+
ngDevMode && assertTNodeForLView(currentTNode, currentLView);
|
|
3747
|
+
// Note that this lookup on the node injector is using the `Self` flag, because
|
|
3748
|
+
// we don't want the node injector to look at any parent injectors since we
|
|
3749
|
+
// may hit the embedded view injector first.
|
|
3750
|
+
const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | InjectFlags.Self, NOT_FOUND);
|
|
3751
|
+
if (nodeInjectorValue !== NOT_FOUND) {
|
|
3752
|
+
return nodeInjectorValue;
|
|
3753
|
+
}
|
|
3754
|
+
// Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191
|
|
3755
|
+
let parentTNode = currentTNode.parent;
|
|
3756
|
+
// `TNode.parent` includes the parent within the current view only. If it doesn't exist,
|
|
3757
|
+
// it means that we've hit the view boundary and we need to go up to the next view.
|
|
3758
|
+
if (!parentTNode) {
|
|
3759
|
+
// Before we go to the next LView, check if the token exists on the current embedded injector.
|
|
3760
|
+
const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];
|
|
3761
|
+
if (embeddedViewInjector) {
|
|
3762
|
+
const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);
|
|
3763
|
+
if (embeddedViewInjectorValue !== NOT_FOUND) {
|
|
3764
|
+
return embeddedViewInjectorValue;
|
|
3765
|
+
}
|
|
3766
|
+
}
|
|
3767
|
+
// Otherwise keep going up the tree.
|
|
3768
|
+
parentTNode = getTNodeFromLView(currentLView);
|
|
3769
|
+
currentLView = currentLView[DECLARATION_VIEW];
|
|
3770
|
+
}
|
|
3771
|
+
currentTNode = parentTNode;
|
|
3772
|
+
}
|
|
3773
|
+
return notFoundValue;
|
|
3774
|
+
}
|
|
3775
|
+
/** Gets the TNode associated with an LView inside of the declaration view. */
|
|
3776
|
+
function getTNodeFromLView(lView) {
|
|
3777
|
+
const tView = lView[TVIEW];
|
|
3778
|
+
const tViewType = tView.type;
|
|
3779
|
+
// The parent pointer differs based on `TView.type`.
|
|
3780
|
+
if (tViewType === 2 /* Embedded */) {
|
|
3781
|
+
ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');
|
|
3782
|
+
return tView.declTNode;
|
|
3783
|
+
}
|
|
3784
|
+
else if (tViewType === 1 /* Component */) {
|
|
3785
|
+
// Components don't have `TView.declTNode` because each instance of component could be
|
|
3786
|
+
// inserted in different location, hence `TView.declTNode` is meaningless.
|
|
3787
|
+
return lView[T_HOST];
|
|
3788
|
+
}
|
|
3789
|
+
return null;
|
|
3790
|
+
}
|
|
3693
3791
|
|
|
3694
3792
|
/**
|
|
3695
3793
|
* @license
|
|
@@ -4513,9 +4611,6 @@ class ReflectionCapabilities {
|
|
|
4513
4611
|
constructor(reflect) {
|
|
4514
4612
|
this._reflect = reflect || _global['Reflect'];
|
|
4515
4613
|
}
|
|
4516
|
-
isReflectionEnabled() {
|
|
4517
|
-
return true;
|
|
4518
|
-
}
|
|
4519
4614
|
factory(t) {
|
|
4520
4615
|
return (...args) => new t(...args);
|
|
4521
4616
|
}
|
|
@@ -4687,38 +4782,6 @@ class ReflectionCapabilities {
|
|
|
4687
4782
|
hasLifecycleHook(type, lcProperty) {
|
|
4688
4783
|
return type instanceof Type && lcProperty in type.prototype;
|
|
4689
4784
|
}
|
|
4690
|
-
guards(type) {
|
|
4691
|
-
return {};
|
|
4692
|
-
}
|
|
4693
|
-
getter(name) {
|
|
4694
|
-
return new Function('o', 'return o.' + name + ';');
|
|
4695
|
-
}
|
|
4696
|
-
setter(name) {
|
|
4697
|
-
return new Function('o', 'v', 'return o.' + name + ' = v;');
|
|
4698
|
-
}
|
|
4699
|
-
method(name) {
|
|
4700
|
-
const functionBody = `if (!o.${name}) throw new Error('"${name}" is undefined');
|
|
4701
|
-
return o.${name}.apply(o, args);`;
|
|
4702
|
-
return new Function('o', 'args', functionBody);
|
|
4703
|
-
}
|
|
4704
|
-
// There is not a concept of import uri in Js, but this is useful in developing Dart applications.
|
|
4705
|
-
importUri(type) {
|
|
4706
|
-
// StaticSymbol
|
|
4707
|
-
if (typeof type === 'object' && type['filePath']) {
|
|
4708
|
-
return type['filePath'];
|
|
4709
|
-
}
|
|
4710
|
-
// Runtime type
|
|
4711
|
-
return `./${stringify(type)}`;
|
|
4712
|
-
}
|
|
4713
|
-
resourceUri(type) {
|
|
4714
|
-
return `./${stringify(type)}`;
|
|
4715
|
-
}
|
|
4716
|
-
resolveIdentifier(name, moduleUrl, members, runtime) {
|
|
4717
|
-
return runtime;
|
|
4718
|
-
}
|
|
4719
|
-
resolveEnum(enumIdentifier, name) {
|
|
4720
|
-
return enumIdentifier[name];
|
|
4721
|
-
}
|
|
4722
4785
|
}
|
|
4723
4786
|
function convertTsickleDecoratorIntoMetadata(decoratorInvocations) {
|
|
4724
4787
|
if (!decoratorInvocations) {
|
|
@@ -4906,7 +4969,7 @@ function catchInjectorError(e, token, injectorErrorName, source) {
|
|
|
4906
4969
|
throw e;
|
|
4907
4970
|
}
|
|
4908
4971
|
function formatError(text, obj, injectorErrorName, source = null) {
|
|
4909
|
-
text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.
|
|
4972
|
+
text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text;
|
|
4910
4973
|
let context = stringify(obj);
|
|
4911
4974
|
if (Array.isArray(obj)) {
|
|
4912
4975
|
context = obj.map(stringify).join(' -> ');
|
|
@@ -5165,6 +5228,60 @@ function componentDefResolved(type) {
|
|
|
5165
5228
|
componentDefPendingResolution.delete(type);
|
|
5166
5229
|
}
|
|
5167
5230
|
|
|
5231
|
+
/**
|
|
5232
|
+
* @license
|
|
5233
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5234
|
+
*
|
|
5235
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5236
|
+
* found in the LICENSE file at https://angular.io/license
|
|
5237
|
+
*/
|
|
5238
|
+
/**
|
|
5239
|
+
* Map of module-id to the corresponding NgModule.
|
|
5240
|
+
*/
|
|
5241
|
+
const modules = new Map();
|
|
5242
|
+
/**
|
|
5243
|
+
* Whether to check for duplicate NgModule registrations.
|
|
5244
|
+
*
|
|
5245
|
+
* This can be disabled for testing.
|
|
5246
|
+
*/
|
|
5247
|
+
let checkForDuplicateNgModules = true;
|
|
5248
|
+
function assertSameOrNotExisting(id, type, incoming) {
|
|
5249
|
+
if (type && type !== incoming && checkForDuplicateNgModules) {
|
|
5250
|
+
throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);
|
|
5251
|
+
}
|
|
5252
|
+
}
|
|
5253
|
+
/**
|
|
5254
|
+
* Adds the given NgModule type to Angular's NgModule registry.
|
|
5255
|
+
*
|
|
5256
|
+
* This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in
|
|
5257
|
+
* explicitly and not read from the NgModule definition. This is for two reasons: it avoids a
|
|
5258
|
+
* megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be
|
|
5259
|
+
* fully resolved when it's registered.
|
|
5260
|
+
*
|
|
5261
|
+
* @codeGenApi
|
|
5262
|
+
*/
|
|
5263
|
+
function registerNgModuleType(ngModuleType, id) {
|
|
5264
|
+
const existing = modules.get(id) || null;
|
|
5265
|
+
assertSameOrNotExisting(id, existing, ngModuleType);
|
|
5266
|
+
modules.set(id, ngModuleType);
|
|
5267
|
+
}
|
|
5268
|
+
function clearModulesForTest() {
|
|
5269
|
+
modules.clear();
|
|
5270
|
+
}
|
|
5271
|
+
function getRegisteredNgModuleType(id) {
|
|
5272
|
+
return modules.get(id);
|
|
5273
|
+
}
|
|
5274
|
+
/**
|
|
5275
|
+
* Control whether the NgModule registration system enforces that each NgModule type registered has
|
|
5276
|
+
* a unique id.
|
|
5277
|
+
*
|
|
5278
|
+
* This is useful for testing as the NgModule registry cannot be properly reset between tests with
|
|
5279
|
+
* Angular's current API.
|
|
5280
|
+
*/
|
|
5281
|
+
function setAllowDuplicateNgModuleIdsForTest(allowDuplicates) {
|
|
5282
|
+
checkForDuplicateNgModules = !allowDuplicates;
|
|
5283
|
+
}
|
|
5284
|
+
|
|
5168
5285
|
/**
|
|
5169
5286
|
* @license
|
|
5170
5287
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6170,6 +6287,78 @@ function getSanitizer() {
|
|
|
6170
6287
|
return lView && lView[SANITIZER];
|
|
6171
6288
|
}
|
|
6172
6289
|
|
|
6290
|
+
/**
|
|
6291
|
+
* @license
|
|
6292
|
+
* Copyright Google LLC All Rights Reserved.
|
|
6293
|
+
*
|
|
6294
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6295
|
+
* found in the LICENSE file at https://angular.io/license
|
|
6296
|
+
*/
|
|
6297
|
+
// Keeps track of the currently-active LViews.
|
|
6298
|
+
const TRACKED_LVIEWS = new Map();
|
|
6299
|
+
// Used for generating unique IDs for LViews.
|
|
6300
|
+
let uniqueIdCounter = 0;
|
|
6301
|
+
/** Gets a unique ID that can be assigned to an LView. */
|
|
6302
|
+
function getUniqueLViewId() {
|
|
6303
|
+
return uniqueIdCounter++;
|
|
6304
|
+
}
|
|
6305
|
+
/** Starts tracking an LView. */
|
|
6306
|
+
function registerLView(lView) {
|
|
6307
|
+
ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');
|
|
6308
|
+
TRACKED_LVIEWS.set(lView[ID], lView);
|
|
6309
|
+
}
|
|
6310
|
+
/** Gets an LView by its unique ID. */
|
|
6311
|
+
function getLViewById(id) {
|
|
6312
|
+
ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');
|
|
6313
|
+
return TRACKED_LVIEWS.get(id) || null;
|
|
6314
|
+
}
|
|
6315
|
+
/** Stops tracking an LView. */
|
|
6316
|
+
function unregisterLView(lView) {
|
|
6317
|
+
ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');
|
|
6318
|
+
TRACKED_LVIEWS.delete(lView[ID]);
|
|
6319
|
+
}
|
|
6320
|
+
|
|
6321
|
+
/**
|
|
6322
|
+
* @license
|
|
6323
|
+
* Copyright Google LLC All Rights Reserved.
|
|
6324
|
+
*
|
|
6325
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6326
|
+
* found in the LICENSE file at https://angular.io/license
|
|
6327
|
+
*/
|
|
6328
|
+
/**
|
|
6329
|
+
* The internal view context which is specific to a given DOM element, directive or
|
|
6330
|
+
* component instance. Each value in here (besides the LView and element node details)
|
|
6331
|
+
* can be present, null or undefined. If undefined then it implies the value has not been
|
|
6332
|
+
* looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
|
|
6333
|
+
*
|
|
6334
|
+
* Each value will get filled when the respective value is examined within the getContext
|
|
6335
|
+
* function. The component, element and each directive instance will share the same instance
|
|
6336
|
+
* of the context.
|
|
6337
|
+
*/
|
|
6338
|
+
class LContext {
|
|
6339
|
+
constructor(
|
|
6340
|
+
/**
|
|
6341
|
+
* ID of the component's parent view data.
|
|
6342
|
+
*/
|
|
6343
|
+
lViewId,
|
|
6344
|
+
/**
|
|
6345
|
+
* The index instance of the node.
|
|
6346
|
+
*/
|
|
6347
|
+
nodeIndex,
|
|
6348
|
+
/**
|
|
6349
|
+
* The instance of the DOM node that is attached to the lNode.
|
|
6350
|
+
*/
|
|
6351
|
+
native) {
|
|
6352
|
+
this.lViewId = lViewId;
|
|
6353
|
+
this.nodeIndex = nodeIndex;
|
|
6354
|
+
this.native = native;
|
|
6355
|
+
}
|
|
6356
|
+
/** Component's parent view data. */
|
|
6357
|
+
get lView() {
|
|
6358
|
+
return getLViewById(this.lViewId);
|
|
6359
|
+
}
|
|
6360
|
+
}
|
|
6361
|
+
|
|
6173
6362
|
/**
|
|
6174
6363
|
* @license
|
|
6175
6364
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6202,7 +6391,7 @@ function getLContext(target) {
|
|
|
6202
6391
|
if (mpValue) {
|
|
6203
6392
|
// only when it's an array is it considered an LView instance
|
|
6204
6393
|
// ... otherwise it's an already constructed LContext instance
|
|
6205
|
-
if (
|
|
6394
|
+
if (isLView(mpValue)) {
|
|
6206
6395
|
const lView = mpValue;
|
|
6207
6396
|
let nodeIndex;
|
|
6208
6397
|
let component = undefined;
|
|
@@ -6261,13 +6450,7 @@ function getLContext(target) {
|
|
|
6261
6450
|
while (parent = parent.parentNode) {
|
|
6262
6451
|
const parentContext = readPatchedData(parent);
|
|
6263
6452
|
if (parentContext) {
|
|
6264
|
-
|
|
6265
|
-
if (Array.isArray(parentContext)) {
|
|
6266
|
-
lView = parentContext;
|
|
6267
|
-
}
|
|
6268
|
-
else {
|
|
6269
|
-
lView = parentContext.lView;
|
|
6270
|
-
}
|
|
6453
|
+
const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;
|
|
6271
6454
|
// the edge of the app was also reached here through another means
|
|
6272
6455
|
// (maybe because the DOM was changed manually).
|
|
6273
6456
|
if (!lView) {
|
|
@@ -6290,14 +6473,7 @@ function getLContext(target) {
|
|
|
6290
6473
|
* Creates an empty instance of a `LContext` context
|
|
6291
6474
|
*/
|
|
6292
6475
|
function createLContext(lView, nodeIndex, native) {
|
|
6293
|
-
return
|
|
6294
|
-
lView,
|
|
6295
|
-
nodeIndex,
|
|
6296
|
-
native,
|
|
6297
|
-
component: undefined,
|
|
6298
|
-
directives: undefined,
|
|
6299
|
-
localRefs: undefined,
|
|
6300
|
-
};
|
|
6476
|
+
return new LContext(lView[ID], nodeIndex, native);
|
|
6301
6477
|
}
|
|
6302
6478
|
/**
|
|
6303
6479
|
* Takes a component instance and returns the view for that component.
|
|
@@ -6306,21 +6482,24 @@ function createLContext(lView, nodeIndex, native) {
|
|
|
6306
6482
|
* @returns The component's view
|
|
6307
6483
|
*/
|
|
6308
6484
|
function getComponentViewByInstance(componentInstance) {
|
|
6309
|
-
let
|
|
6310
|
-
let
|
|
6311
|
-
if (
|
|
6312
|
-
const
|
|
6313
|
-
|
|
6314
|
-
|
|
6485
|
+
let patchedData = readPatchedData(componentInstance);
|
|
6486
|
+
let lView;
|
|
6487
|
+
if (isLView(patchedData)) {
|
|
6488
|
+
const contextLView = patchedData;
|
|
6489
|
+
const nodeIndex = findViaComponent(contextLView, componentInstance);
|
|
6490
|
+
lView = getComponentLViewByIndex(nodeIndex, contextLView);
|
|
6491
|
+
const context = createLContext(contextLView, nodeIndex, lView[HOST]);
|
|
6315
6492
|
context.component = componentInstance;
|
|
6316
6493
|
attachPatchData(componentInstance, context);
|
|
6317
6494
|
attachPatchData(context.native, context);
|
|
6318
6495
|
}
|
|
6319
6496
|
else {
|
|
6320
|
-
const context =
|
|
6321
|
-
|
|
6497
|
+
const context = patchedData;
|
|
6498
|
+
const contextLView = context.lView;
|
|
6499
|
+
ngDevMode && assertLView(contextLView);
|
|
6500
|
+
lView = getComponentLViewByIndex(context.nodeIndex, contextLView);
|
|
6322
6501
|
}
|
|
6323
|
-
return
|
|
6502
|
+
return lView;
|
|
6324
6503
|
}
|
|
6325
6504
|
/**
|
|
6326
6505
|
* This property will be monkey-patched on elements, components and directives.
|
|
@@ -6332,7 +6511,16 @@ const MONKEY_PATCH_KEY_NAME = '__ngContext__';
|
|
|
6332
6511
|
*/
|
|
6333
6512
|
function attachPatchData(target, data) {
|
|
6334
6513
|
ngDevMode && assertDefined(target, 'Target expected');
|
|
6335
|
-
|
|
6514
|
+
// Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this
|
|
6515
|
+
// for `LView`, because we have control over when an `LView` is created and destroyed, whereas
|
|
6516
|
+
// we can't know when to remove an `LContext`.
|
|
6517
|
+
if (isLView(data)) {
|
|
6518
|
+
target[MONKEY_PATCH_KEY_NAME] = data[ID];
|
|
6519
|
+
registerLView(data);
|
|
6520
|
+
}
|
|
6521
|
+
else {
|
|
6522
|
+
target[MONKEY_PATCH_KEY_NAME] = data;
|
|
6523
|
+
}
|
|
6336
6524
|
}
|
|
6337
6525
|
/**
|
|
6338
6526
|
* Returns the monkey-patch value data present on the target (which could be
|
|
@@ -6340,12 +6528,13 @@ function attachPatchData(target, data) {
|
|
|
6340
6528
|
*/
|
|
6341
6529
|
function readPatchedData(target) {
|
|
6342
6530
|
ngDevMode && assertDefined(target, 'Target expected');
|
|
6343
|
-
|
|
6531
|
+
const data = target[MONKEY_PATCH_KEY_NAME];
|
|
6532
|
+
return (typeof data === 'number') ? getLViewById(data) : data || null;
|
|
6344
6533
|
}
|
|
6345
6534
|
function readPatchedLView(target) {
|
|
6346
6535
|
const value = readPatchedData(target);
|
|
6347
6536
|
if (value) {
|
|
6348
|
-
return
|
|
6537
|
+
return isLView(value) ? value : value.lView;
|
|
6349
6538
|
}
|
|
6350
6539
|
return null;
|
|
6351
6540
|
}
|
|
@@ -7292,6 +7481,8 @@ function cleanUpView(tView, lView) {
|
|
|
7292
7481
|
lQueries.detachView(tView);
|
|
7293
7482
|
}
|
|
7294
7483
|
}
|
|
7484
|
+
// Unregister the view once everything else has been cleaned up.
|
|
7485
|
+
unregisterLView(lView);
|
|
7295
7486
|
}
|
|
7296
7487
|
}
|
|
7297
7488
|
/** Removes listeners and unsubscribes from output subscriptions */
|
|
@@ -7459,7 +7650,8 @@ function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {
|
|
|
7459
7650
|
renderer.insertBefore(parent, child, beforeNode, isMove);
|
|
7460
7651
|
}
|
|
7461
7652
|
else {
|
|
7462
|
-
parent.
|
|
7653
|
+
const targetParent = isTemplateNode(parent) ? parent.content : parent;
|
|
7654
|
+
targetParent.insertBefore(child, beforeNode, isMove);
|
|
7463
7655
|
}
|
|
7464
7656
|
}
|
|
7465
7657
|
function nativeAppendChild(renderer, parent, child) {
|
|
@@ -7469,7 +7661,8 @@ function nativeAppendChild(renderer, parent, child) {
|
|
|
7469
7661
|
renderer.appendChild(parent, child);
|
|
7470
7662
|
}
|
|
7471
7663
|
else {
|
|
7472
|
-
parent.
|
|
7664
|
+
const targetParent = isTemplateNode(parent) ? parent.content : parent;
|
|
7665
|
+
targetParent.appendChild(child);
|
|
7473
7666
|
}
|
|
7474
7667
|
}
|
|
7475
7668
|
function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {
|
|
@@ -7489,6 +7682,10 @@ function nativeRemoveChild(renderer, parent, child, isHostElement) {
|
|
|
7489
7682
|
parent.removeChild(child);
|
|
7490
7683
|
}
|
|
7491
7684
|
}
|
|
7685
|
+
/** Checks if an element is a `<template>` node. */
|
|
7686
|
+
function isTemplateNode(node) {
|
|
7687
|
+
return node.tagName === 'TEMPLATE' && node.content !== undefined;
|
|
7688
|
+
}
|
|
7492
7689
|
/**
|
|
7493
7690
|
* Returns a native parent of a given native node.
|
|
7494
7691
|
*/
|
|
@@ -8658,7 +8855,7 @@ function nameSuffix(text) {
|
|
|
8658
8855
|
if (text == null)
|
|
8659
8856
|
return '';
|
|
8660
8857
|
const index = text.lastIndexOf('_Template');
|
|
8661
|
-
return '_' + (index === -1 ? text : text.
|
|
8858
|
+
return '_' + (index === -1 ? text : text.slice(0, index));
|
|
8662
8859
|
}
|
|
8663
8860
|
/**
|
|
8664
8861
|
* This class is a debug version of Object literal so that we can have constructor name show up
|
|
@@ -9009,7 +9206,7 @@ class LViewDebug {
|
|
|
9009
9206
|
attached: !!(flags & 128 /* Attached */),
|
|
9010
9207
|
destroyed: !!(flags & 256 /* Destroyed */),
|
|
9011
9208
|
isRoot: !!(flags & 512 /* IsRoot */),
|
|
9012
|
-
indexWithinInitPhase: flags >>
|
|
9209
|
+
indexWithinInitPhase: flags >> 12 /* IndexWithinInitPhaseShift */,
|
|
9013
9210
|
};
|
|
9014
9211
|
}
|
|
9015
9212
|
get parent() {
|
|
@@ -9072,6 +9269,9 @@ class LViewDebug {
|
|
|
9072
9269
|
get tHost() {
|
|
9073
9270
|
return this._raw_lView[T_HOST];
|
|
9074
9271
|
}
|
|
9272
|
+
get id() {
|
|
9273
|
+
return this._raw_lView[ID];
|
|
9274
|
+
}
|
|
9075
9275
|
get decls() {
|
|
9076
9276
|
return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);
|
|
9077
9277
|
}
|
|
@@ -9301,10 +9501,14 @@ function renderChildComponents(hostLView, components) {
|
|
|
9301
9501
|
renderComponent$1(hostLView, components[i]);
|
|
9302
9502
|
}
|
|
9303
9503
|
}
|
|
9304
|
-
function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) {
|
|
9504
|
+
function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {
|
|
9305
9505
|
const lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice();
|
|
9306
9506
|
lView[HOST] = host;
|
|
9307
9507
|
lView[FLAGS] = flags | 4 /* CreationMode */ | 128 /* Attached */ | 8 /* FirstLViewPass */;
|
|
9508
|
+
if (embeddedViewInjector !== null ||
|
|
9509
|
+
(parentLView && (parentLView[FLAGS] & 2048 /* HasEmbeddedViewInjector */))) {
|
|
9510
|
+
lView[FLAGS] |= 2048 /* HasEmbeddedViewInjector */;
|
|
9511
|
+
}
|
|
9308
9512
|
resetPreOrderHookFlags(lView);
|
|
9309
9513
|
ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);
|
|
9310
9514
|
lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;
|
|
@@ -9316,6 +9520,8 @@ function createLView(parentLView, tView, context, flags, host, tHostNode, render
|
|
|
9316
9520
|
lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null;
|
|
9317
9521
|
lView[INJECTOR$1] = injector || parentLView && parentLView[INJECTOR$1] || null;
|
|
9318
9522
|
lView[T_HOST] = tHostNode;
|
|
9523
|
+
lView[ID] = getUniqueLViewId();
|
|
9524
|
+
lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector;
|
|
9319
9525
|
ngDevMode &&
|
|
9320
9526
|
assertEqual(tView.type == 2 /* Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
|
|
9321
9527
|
lView[DECLARATION_COMPONENT_VIEW] =
|
|
@@ -10324,7 +10530,6 @@ function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
|
10324
10530
|
function invokeDirectivesHostBindings(tView, lView, tNode) {
|
|
10325
10531
|
const start = tNode.directiveStart;
|
|
10326
10532
|
const end = tNode.directiveEnd;
|
|
10327
|
-
const firstCreatePass = tView.firstCreatePass;
|
|
10328
10533
|
const elementIndex = tNode.index;
|
|
10329
10534
|
const currentDirectiveIndex = getCurrentDirectiveIndex();
|
|
10330
10535
|
try {
|
|
@@ -10471,7 +10676,7 @@ function addComponentLogic(lView, hostTNode, def) {
|
|
|
10471
10676
|
// Only component views should be added to the view tree directly. Embedded views are
|
|
10472
10677
|
// accessed through their containers because they may be removed / re-added later.
|
|
10473
10678
|
const rendererFactory = lView[RENDERER_FACTORY];
|
|
10474
|
-
const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null));
|
|
10679
|
+
const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null, null));
|
|
10475
10680
|
// Component view will always be created before any injected LContainers,
|
|
10476
10681
|
// so this is a regular element, wrap it with the component view
|
|
10477
10682
|
lView[hostTNode.index] = componentView;
|
|
@@ -10840,8 +11045,11 @@ function tickRootContext(rootContext) {
|
|
|
10840
11045
|
for (let i = 0; i < rootContext.components.length; i++) {
|
|
10841
11046
|
const rootComponent = rootContext.components[i];
|
|
10842
11047
|
const lView = readPatchedLView(rootComponent);
|
|
10843
|
-
|
|
10844
|
-
|
|
11048
|
+
// We might not have an `LView` if the component was destroyed.
|
|
11049
|
+
if (lView !== null) {
|
|
11050
|
+
const tView = lView[TVIEW];
|
|
11051
|
+
renderComponentOrTemplate(tView, lView, tView.template, rootComponent);
|
|
11052
|
+
}
|
|
10845
11053
|
}
|
|
10846
11054
|
}
|
|
10847
11055
|
function detectChangesInternal(tView, lView, context) {
|
|
@@ -11699,12 +11907,16 @@ Injector.__NG_ELEMENT_ID__ = -1 /* Injector */;
|
|
|
11699
11907
|
* @globalApi ng
|
|
11700
11908
|
*/
|
|
11701
11909
|
function getComponent$1(element) {
|
|
11702
|
-
assertDomElement(element);
|
|
11910
|
+
ngDevMode && assertDomElement(element);
|
|
11703
11911
|
const context = getLContext(element);
|
|
11704
11912
|
if (context === null)
|
|
11705
11913
|
return null;
|
|
11706
11914
|
if (context.component === undefined) {
|
|
11707
|
-
|
|
11915
|
+
const lView = context.lView;
|
|
11916
|
+
if (lView === null) {
|
|
11917
|
+
return null;
|
|
11918
|
+
}
|
|
11919
|
+
context.component = getComponentAtNodeIndex(context.nodeIndex, lView);
|
|
11708
11920
|
}
|
|
11709
11921
|
return context.component;
|
|
11710
11922
|
}
|
|
@@ -11723,7 +11935,8 @@ function getComponent$1(element) {
|
|
|
11723
11935
|
function getContext(element) {
|
|
11724
11936
|
assertDomElement(element);
|
|
11725
11937
|
const context = getLContext(element);
|
|
11726
|
-
|
|
11938
|
+
const lView = context ? context.lView : null;
|
|
11939
|
+
return lView === null ? null : lView[CONTEXT];
|
|
11727
11940
|
}
|
|
11728
11941
|
/**
|
|
11729
11942
|
* Retrieves the component instance whose view contains the DOM element.
|
|
@@ -11742,11 +11955,10 @@ function getContext(element) {
|
|
|
11742
11955
|
*/
|
|
11743
11956
|
function getOwningComponent(elementOrDir) {
|
|
11744
11957
|
const context = getLContext(elementOrDir);
|
|
11745
|
-
|
|
11958
|
+
let lView = context ? context.lView : null;
|
|
11959
|
+
if (lView === null)
|
|
11746
11960
|
return null;
|
|
11747
|
-
let lView = context.lView;
|
|
11748
11961
|
let parent;
|
|
11749
|
-
ngDevMode && assertLView(lView);
|
|
11750
11962
|
while (lView[TVIEW].type === 2 /* Embedded */ && (parent = getLViewParent(lView))) {
|
|
11751
11963
|
lView = parent;
|
|
11752
11964
|
}
|
|
@@ -11764,7 +11976,8 @@ function getOwningComponent(elementOrDir) {
|
|
|
11764
11976
|
* @globalApi ng
|
|
11765
11977
|
*/
|
|
11766
11978
|
function getRootComponents(elementOrDir) {
|
|
11767
|
-
|
|
11979
|
+
const lView = readPatchedLView(elementOrDir);
|
|
11980
|
+
return lView !== null ? [...getRootContext(lView).components] : [];
|
|
11768
11981
|
}
|
|
11769
11982
|
/**
|
|
11770
11983
|
* Retrieves an `Injector` associated with an element, component or directive instance.
|
|
@@ -11778,10 +11991,11 @@ function getRootComponents(elementOrDir) {
|
|
|
11778
11991
|
*/
|
|
11779
11992
|
function getInjector(elementOrDir) {
|
|
11780
11993
|
const context = getLContext(elementOrDir);
|
|
11781
|
-
|
|
11994
|
+
const lView = context ? context.lView : null;
|
|
11995
|
+
if (lView === null)
|
|
11782
11996
|
return Injector.NULL;
|
|
11783
|
-
const tNode =
|
|
11784
|
-
return new NodeInjector(tNode,
|
|
11997
|
+
const tNode = lView[TVIEW].data[context.nodeIndex];
|
|
11998
|
+
return new NodeInjector(tNode, lView);
|
|
11785
11999
|
}
|
|
11786
12000
|
/**
|
|
11787
12001
|
* Retrieve a set of injection tokens at a given DOM node.
|
|
@@ -11790,9 +12004,9 @@ function getInjector(elementOrDir) {
|
|
|
11790
12004
|
*/
|
|
11791
12005
|
function getInjectionTokens(element) {
|
|
11792
12006
|
const context = getLContext(element);
|
|
11793
|
-
|
|
12007
|
+
const lView = context ? context.lView : null;
|
|
12008
|
+
if (lView === null)
|
|
11794
12009
|
return [];
|
|
11795
|
-
const lView = context.lView;
|
|
11796
12010
|
const tView = lView[TVIEW];
|
|
11797
12011
|
const tNode = tView.data[context.nodeIndex];
|
|
11798
12012
|
const providerTokens = [];
|
|
@@ -11842,10 +12056,10 @@ function getDirectives(node) {
|
|
|
11842
12056
|
return [];
|
|
11843
12057
|
}
|
|
11844
12058
|
const context = getLContext(node);
|
|
11845
|
-
|
|
12059
|
+
const lView = context ? context.lView : null;
|
|
12060
|
+
if (lView === null) {
|
|
11846
12061
|
return [];
|
|
11847
12062
|
}
|
|
11848
|
-
const lView = context.lView;
|
|
11849
12063
|
const tView = lView[TVIEW];
|
|
11850
12064
|
const nodeIndex = context.nodeIndex;
|
|
11851
12065
|
if (!tView?.data[nodeIndex]) {
|
|
@@ -11905,7 +12119,11 @@ function getLocalRefs(target) {
|
|
|
11905
12119
|
if (context === null)
|
|
11906
12120
|
return {};
|
|
11907
12121
|
if (context.localRefs === undefined) {
|
|
11908
|
-
|
|
12122
|
+
const lView = context.lView;
|
|
12123
|
+
if (lView === null) {
|
|
12124
|
+
return {};
|
|
12125
|
+
}
|
|
12126
|
+
context.localRefs = discoverLocalRefs(lView, context.nodeIndex);
|
|
11909
12127
|
}
|
|
11910
12128
|
return context.localRefs || {};
|
|
11911
12129
|
}
|
|
@@ -11969,11 +12187,11 @@ function getRenderedText(component) {
|
|
|
11969
12187
|
* @globalApi ng
|
|
11970
12188
|
*/
|
|
11971
12189
|
function getListeners(element) {
|
|
11972
|
-
assertDomElement(element);
|
|
12190
|
+
ngDevMode && assertDomElement(element);
|
|
11973
12191
|
const lContext = getLContext(element);
|
|
11974
|
-
|
|
12192
|
+
const lView = lContext === null ? null : lContext.lView;
|
|
12193
|
+
if (lView === null)
|
|
11975
12194
|
return [];
|
|
11976
|
-
const lView = lContext.lView;
|
|
11977
12195
|
const tView = lView[TVIEW];
|
|
11978
12196
|
const lCleanup = lView[CLEANUP];
|
|
11979
12197
|
const tCleanup = tView.cleanup;
|
|
@@ -12024,10 +12242,10 @@ function getDebugNode$1(element) {
|
|
|
12024
12242
|
throw new Error('Expecting instance of DOM Element');
|
|
12025
12243
|
}
|
|
12026
12244
|
const lContext = getLContext(element);
|
|
12027
|
-
|
|
12245
|
+
const lView = lContext ? lContext.lView : null;
|
|
12246
|
+
if (lView === null) {
|
|
12028
12247
|
return null;
|
|
12029
12248
|
}
|
|
12030
|
-
const lView = lContext.lView;
|
|
12031
12249
|
const nodeIndex = lContext.nodeIndex;
|
|
12032
12250
|
if (nodeIndex !== -1) {
|
|
12033
12251
|
const valueInLView = lView[nodeIndex];
|
|
@@ -12052,6 +12270,7 @@ function getComponentLView(target) {
|
|
|
12052
12270
|
const lContext = getLContext(target);
|
|
12053
12271
|
const nodeIndx = lContext.nodeIndex;
|
|
12054
12272
|
const lView = lContext.lView;
|
|
12273
|
+
ngDevMode && assertLView(lView);
|
|
12055
12274
|
const componentLView = lView[nodeIndx];
|
|
12056
12275
|
ngDevMode && assertLView(componentLView);
|
|
12057
12276
|
return componentLView;
|
|
@@ -12199,7 +12418,7 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
|
|
|
12199
12418
|
const rootContext = createRootContext(opts.scheduler, opts.playerHandler);
|
|
12200
12419
|
const renderer = rendererFactory.createRenderer(hostRNode, componentDef);
|
|
12201
12420
|
const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);
|
|
12202
|
-
const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null);
|
|
12421
|
+
const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null, null);
|
|
12203
12422
|
enterView(rootView);
|
|
12204
12423
|
let component;
|
|
12205
12424
|
try {
|
|
@@ -12254,7 +12473,7 @@ function createRootComponentView(rNode, def, rootView, rendererFactory, hostRend
|
|
|
12254
12473
|
}
|
|
12255
12474
|
}
|
|
12256
12475
|
const viewRenderer = rendererFactory.createRenderer(rNode, def);
|
|
12257
|
-
const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null);
|
|
12476
|
+
const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null, null);
|
|
12258
12477
|
if (tView.firstCreatePass) {
|
|
12259
12478
|
diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);
|
|
12260
12479
|
markAsComponentHost(tView, tNode);
|
|
@@ -13799,75 +14018,6 @@ class KeyRegistry {
|
|
|
13799
14018
|
}
|
|
13800
14019
|
const _globalKeyRegistry = new KeyRegistry();
|
|
13801
14020
|
|
|
13802
|
-
/**
|
|
13803
|
-
* @license
|
|
13804
|
-
* Copyright Google LLC All Rights Reserved.
|
|
13805
|
-
*
|
|
13806
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
13807
|
-
* found in the LICENSE file at https://angular.io/license
|
|
13808
|
-
*/
|
|
13809
|
-
/**
|
|
13810
|
-
* Provides access to reflection data about symbols. Used internally by Angular
|
|
13811
|
-
* to power dependency injection and compilation.
|
|
13812
|
-
*/
|
|
13813
|
-
class Reflector {
|
|
13814
|
-
constructor(reflectionCapabilities) {
|
|
13815
|
-
this.reflectionCapabilities = reflectionCapabilities;
|
|
13816
|
-
}
|
|
13817
|
-
updateCapabilities(caps) {
|
|
13818
|
-
this.reflectionCapabilities = caps;
|
|
13819
|
-
}
|
|
13820
|
-
factory(type) {
|
|
13821
|
-
return this.reflectionCapabilities.factory(type);
|
|
13822
|
-
}
|
|
13823
|
-
parameters(typeOrFunc) {
|
|
13824
|
-
return this.reflectionCapabilities.parameters(typeOrFunc);
|
|
13825
|
-
}
|
|
13826
|
-
annotations(typeOrFunc) {
|
|
13827
|
-
return this.reflectionCapabilities.annotations(typeOrFunc);
|
|
13828
|
-
}
|
|
13829
|
-
propMetadata(typeOrFunc) {
|
|
13830
|
-
return this.reflectionCapabilities.propMetadata(typeOrFunc);
|
|
13831
|
-
}
|
|
13832
|
-
hasLifecycleHook(type, lcProperty) {
|
|
13833
|
-
return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);
|
|
13834
|
-
}
|
|
13835
|
-
getter(name) {
|
|
13836
|
-
return this.reflectionCapabilities.getter(name);
|
|
13837
|
-
}
|
|
13838
|
-
setter(name) {
|
|
13839
|
-
return this.reflectionCapabilities.setter(name);
|
|
13840
|
-
}
|
|
13841
|
-
method(name) {
|
|
13842
|
-
return this.reflectionCapabilities.method(name);
|
|
13843
|
-
}
|
|
13844
|
-
importUri(type) {
|
|
13845
|
-
return this.reflectionCapabilities.importUri(type);
|
|
13846
|
-
}
|
|
13847
|
-
resourceUri(type) {
|
|
13848
|
-
return this.reflectionCapabilities.resourceUri(type);
|
|
13849
|
-
}
|
|
13850
|
-
resolveIdentifier(name, moduleUrl, members, runtime) {
|
|
13851
|
-
return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);
|
|
13852
|
-
}
|
|
13853
|
-
resolveEnum(identifier, name) {
|
|
13854
|
-
return this.reflectionCapabilities.resolveEnum(identifier, name);
|
|
13855
|
-
}
|
|
13856
|
-
}
|
|
13857
|
-
|
|
13858
|
-
/**
|
|
13859
|
-
* @license
|
|
13860
|
-
* Copyright Google LLC All Rights Reserved.
|
|
13861
|
-
*
|
|
13862
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
13863
|
-
* found in the LICENSE file at https://angular.io/license
|
|
13864
|
-
*/
|
|
13865
|
-
/**
|
|
13866
|
-
* The {@link Reflector} used internally in Angular to access metadata
|
|
13867
|
-
* about symbols.
|
|
13868
|
-
*/
|
|
13869
|
-
const reflector = new Reflector(new ReflectionCapabilities());
|
|
13870
|
-
|
|
13871
14021
|
/**
|
|
13872
14022
|
* @license
|
|
13873
14023
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -13924,7 +14074,7 @@ function resolveReflectiveFactory(provider) {
|
|
|
13924
14074
|
let resolvedDeps;
|
|
13925
14075
|
if (provider.useClass) {
|
|
13926
14076
|
const useClass = resolveForwardRef(provider.useClass);
|
|
13927
|
-
factoryFn =
|
|
14077
|
+
factoryFn = getReflect().factory(useClass);
|
|
13928
14078
|
resolvedDeps = _dependenciesFor(useClass);
|
|
13929
14079
|
}
|
|
13930
14080
|
else if (provider.useExisting) {
|
|
@@ -14020,7 +14170,7 @@ function constructDependencies(typeOrFunc, dependencies) {
|
|
|
14020
14170
|
}
|
|
14021
14171
|
}
|
|
14022
14172
|
function _dependenciesFor(typeOrFunc) {
|
|
14023
|
-
const params =
|
|
14173
|
+
const params = getReflect().parameters(typeOrFunc);
|
|
14024
14174
|
if (!params)
|
|
14025
14175
|
return [];
|
|
14026
14176
|
if (params.some(p => p == null)) {
|
|
@@ -14506,6 +14656,7 @@ function elementStartFirstCreatePass(index, tView, lView, native, name, attrsInd
|
|
|
14506
14656
|
* @param name Name of the DOM Node
|
|
14507
14657
|
* @param attrsIndex Index of the element's attributes in the `consts` array.
|
|
14508
14658
|
* @param localRefsIndex Index of the element's local references in the `consts` array.
|
|
14659
|
+
* @returns This function returns itself so that it may be chained.
|
|
14509
14660
|
*
|
|
14510
14661
|
* Attributes and localRefs are passed as an array of strings where elements with an even index
|
|
14511
14662
|
* hold an attribute name and elements with an odd index hold an attribute value, ex.:
|
|
@@ -14557,9 +14708,11 @@ function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {
|
|
|
14557
14708
|
if (localRefsIndex !== null) {
|
|
14558
14709
|
saveResolvedLocalsInData(lView, tNode);
|
|
14559
14710
|
}
|
|
14711
|
+
return ɵɵelementStart;
|
|
14560
14712
|
}
|
|
14561
14713
|
/**
|
|
14562
14714
|
* Mark the end of the element.
|
|
14715
|
+
* @returns This function returns itself so that it may be chained.
|
|
14563
14716
|
*
|
|
14564
14717
|
* @codeGenApi
|
|
14565
14718
|
*/
|
|
@@ -14590,6 +14743,7 @@ function ɵɵelementEnd() {
|
|
|
14590
14743
|
if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {
|
|
14591
14744
|
setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);
|
|
14592
14745
|
}
|
|
14746
|
+
return ɵɵelementEnd;
|
|
14593
14747
|
}
|
|
14594
14748
|
/**
|
|
14595
14749
|
* Creates an empty element using {@link elementStart} and {@link elementEnd}
|
|
@@ -14598,12 +14752,14 @@ function ɵɵelementEnd() {
|
|
|
14598
14752
|
* @param name Name of the DOM Node
|
|
14599
14753
|
* @param attrsIndex Index of the element's attributes in the `consts` array.
|
|
14600
14754
|
* @param localRefsIndex Index of the element's local references in the `consts` array.
|
|
14755
|
+
* @returns This function returns itself so that it may be chained.
|
|
14601
14756
|
*
|
|
14602
14757
|
* @codeGenApi
|
|
14603
14758
|
*/
|
|
14604
14759
|
function ɵɵelement(index, name, attrsIndex, localRefsIndex) {
|
|
14605
14760
|
ɵɵelementStart(index, name, attrsIndex, localRefsIndex);
|
|
14606
14761
|
ɵɵelementEnd();
|
|
14762
|
+
return ɵɵelement;
|
|
14607
14763
|
}
|
|
14608
14764
|
function logUnknownElementError(tView, element, tNode, hasDirectives) {
|
|
14609
14765
|
const schemas = tView.schemas;
|
|
@@ -14672,6 +14828,7 @@ function elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, l
|
|
|
14672
14828
|
* @param index Index of the element in the LView array
|
|
14673
14829
|
* @param attrsIndex Index of the container attributes in the `consts` array.
|
|
14674
14830
|
* @param localRefsIndex Index of the container's local references in the `consts` array.
|
|
14831
|
+
* @returns This function returns itself so that it may be chained.
|
|
14675
14832
|
*
|
|
14676
14833
|
* Even if this instruction accepts a set of attributes no actual attribute values are propagated to
|
|
14677
14834
|
* the DOM (as a comment node can't have attributes). Attributes are here only for directive
|
|
@@ -14702,9 +14859,11 @@ function ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {
|
|
|
14702
14859
|
if (localRefsIndex != null) {
|
|
14703
14860
|
saveResolvedLocalsInData(lView, tNode);
|
|
14704
14861
|
}
|
|
14862
|
+
return ɵɵelementContainerStart;
|
|
14705
14863
|
}
|
|
14706
14864
|
/**
|
|
14707
14865
|
* Mark the end of the <ng-container>.
|
|
14866
|
+
* @returns This function returns itself so that it may be chained.
|
|
14708
14867
|
*
|
|
14709
14868
|
* @codeGenApi
|
|
14710
14869
|
*/
|
|
@@ -14726,6 +14885,7 @@ function ɵɵelementContainerEnd() {
|
|
|
14726
14885
|
tView.queries.elementEnd(currentTNode);
|
|
14727
14886
|
}
|
|
14728
14887
|
}
|
|
14888
|
+
return ɵɵelementContainerEnd;
|
|
14729
14889
|
}
|
|
14730
14890
|
/**
|
|
14731
14891
|
* Creates an empty logical container using {@link elementContainerStart}
|
|
@@ -14734,12 +14894,14 @@ function ɵɵelementContainerEnd() {
|
|
|
14734
14894
|
* @param index Index of the element in the LView array
|
|
14735
14895
|
* @param attrsIndex Index of the container attributes in the `consts` array.
|
|
14736
14896
|
* @param localRefsIndex Index of the container's local references in the `consts` array.
|
|
14897
|
+
* @returns This function returns itself so that it may be chained.
|
|
14737
14898
|
*
|
|
14738
14899
|
* @codeGenApi
|
|
14739
14900
|
*/
|
|
14740
14901
|
function ɵɵelementContainer(index, attrsIndex, localRefsIndex) {
|
|
14741
14902
|
ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);
|
|
14742
14903
|
ɵɵelementContainerEnd();
|
|
14904
|
+
return ɵɵelementContainer;
|
|
14743
14905
|
}
|
|
14744
14906
|
|
|
14745
14907
|
/**
|
|
@@ -16308,7 +16470,7 @@ function consumeQuotedText(text, quoteCharCode, startIndex, endIndex) {
|
|
|
16308
16470
|
function malformedStyleError(text, expecting, index) {
|
|
16309
16471
|
ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');
|
|
16310
16472
|
throw throwError(`Malformed style at location ${index} in string '` + text.substring(0, index) + '[>>' +
|
|
16311
|
-
text.substring(index, index + 1) + '<<]' + text.
|
|
16473
|
+
text.substring(index, index + 1) + '<<]' + text.slice(index + 1) +
|
|
16312
16474
|
`'. Expecting '${expecting}'.`);
|
|
16313
16475
|
}
|
|
16314
16476
|
|
|
@@ -19993,7 +20155,7 @@ function removeInnerTemplateTranslation(message) {
|
|
|
19993
20155
|
}
|
|
19994
20156
|
ngDevMode &&
|
|
19995
20157
|
assertEqual(inTemplate, false, `Tag mismatch: unable to find the end of the sub-template in the translation "${message}"`);
|
|
19996
|
-
res += message.
|
|
20158
|
+
res += message.slice(index);
|
|
19997
20159
|
return res;
|
|
19998
20160
|
}
|
|
19999
20161
|
/**
|
|
@@ -20085,7 +20247,7 @@ function parseICUBlock(pattern) {
|
|
|
20085
20247
|
else {
|
|
20086
20248
|
icuType = 1 /* plural */;
|
|
20087
20249
|
}
|
|
20088
|
-
mainBinding = parseInt(binding.
|
|
20250
|
+
mainBinding = parseInt(binding.slice(1), 10);
|
|
20089
20251
|
return '';
|
|
20090
20252
|
});
|
|
20091
20253
|
const parts = i18nParseTextIntoPartsAndICU(pattern);
|
|
@@ -21090,7 +21252,7 @@ class Version {
|
|
|
21090
21252
|
/**
|
|
21091
21253
|
* @publicApi
|
|
21092
21254
|
*/
|
|
21093
|
-
const VERSION = new Version('14.0.0-next.
|
|
21255
|
+
const VERSION = new Version('14.0.0-next.10');
|
|
21094
21256
|
|
|
21095
21257
|
/**
|
|
21096
21258
|
* @license
|
|
@@ -21496,29 +21658,27 @@ function getNamespace(elementName) {
|
|
|
21496
21658
|
return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);
|
|
21497
21659
|
}
|
|
21498
21660
|
/**
|
|
21499
|
-
*
|
|
21500
|
-
*
|
|
21661
|
+
* Injector that looks up a value using a specific injector, before falling back to the module
|
|
21662
|
+
* injector. Used primarily when creating components or embedded views dynamically.
|
|
21501
21663
|
*/
|
|
21502
|
-
|
|
21503
|
-
|
|
21504
|
-
|
|
21505
|
-
|
|
21506
|
-
|
|
21507
|
-
|
|
21508
|
-
get
|
|
21509
|
-
|
|
21510
|
-
|
|
21511
|
-
|
|
21512
|
-
|
|
21513
|
-
|
|
21514
|
-
|
|
21515
|
-
|
|
21516
|
-
|
|
21517
|
-
return value;
|
|
21518
|
-
}
|
|
21519
|
-
return moduleInjector.get(token, notFoundValue, flags);
|
|
21664
|
+
class ChainedInjector {
|
|
21665
|
+
constructor(injector, parentInjector) {
|
|
21666
|
+
this.injector = injector;
|
|
21667
|
+
this.parentInjector = parentInjector;
|
|
21668
|
+
}
|
|
21669
|
+
get(token, notFoundValue, flags) {
|
|
21670
|
+
const value = this.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);
|
|
21671
|
+
if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||
|
|
21672
|
+
notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
|
|
21673
|
+
// Return the value from the root element injector when
|
|
21674
|
+
// - it provides it
|
|
21675
|
+
// (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
|
|
21676
|
+
// - the module injector should not be checked
|
|
21677
|
+
// (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
|
|
21678
|
+
return value;
|
|
21520
21679
|
}
|
|
21521
|
-
|
|
21680
|
+
return this.parentInjector.get(token, notFoundValue, flags);
|
|
21681
|
+
}
|
|
21522
21682
|
}
|
|
21523
21683
|
/**
|
|
21524
21684
|
* Render3 implementation of {@link viewEngine_ComponentFactory}.
|
|
@@ -21546,7 +21706,7 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
21546
21706
|
}
|
|
21547
21707
|
create(injector, projectableNodes, rootSelectorOrNode, ngModule) {
|
|
21548
21708
|
ngModule = ngModule || this.ngModule;
|
|
21549
|
-
const rootViewInjector = ngModule ?
|
|
21709
|
+
const rootViewInjector = ngModule ? new ChainedInjector(injector, ngModule.injector) : injector;
|
|
21550
21710
|
const rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);
|
|
21551
21711
|
const sanitizer = rootViewInjector.get(Sanitizer, null);
|
|
21552
21712
|
const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);
|
|
@@ -21561,7 +21721,7 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
21561
21721
|
const rootContext = createRootContext();
|
|
21562
21722
|
// Create the root view. Uses empty TView and ContentTemplate.
|
|
21563
21723
|
const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);
|
|
21564
|
-
const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector);
|
|
21724
|
+
const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector, null);
|
|
21565
21725
|
// rootView is the parent when bootstrapping
|
|
21566
21726
|
// TODO(misko): it looks like we are entering view here but we don't really need to as
|
|
21567
21727
|
// `renderView` does that. However as the code is written it is needed because
|
|
@@ -21731,62 +21891,6 @@ class NgModuleRef$1 {
|
|
|
21731
21891
|
class NgModuleFactory$1 {
|
|
21732
21892
|
}
|
|
21733
21893
|
|
|
21734
|
-
/**
|
|
21735
|
-
* @license
|
|
21736
|
-
* Copyright Google LLC All Rights Reserved.
|
|
21737
|
-
*
|
|
21738
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
21739
|
-
* found in the LICENSE file at https://angular.io/license
|
|
21740
|
-
*/
|
|
21741
|
-
/**
|
|
21742
|
-
* Map of module-id to the corresponding NgModule.
|
|
21743
|
-
* - In pre Ivy we track NgModuleFactory,
|
|
21744
|
-
* - In post Ivy we track the NgModuleType
|
|
21745
|
-
*/
|
|
21746
|
-
const modules = new Map();
|
|
21747
|
-
/**
|
|
21748
|
-
* Registers a loaded module. Should only be called from generated NgModuleFactory code.
|
|
21749
|
-
* @publicApi
|
|
21750
|
-
*/
|
|
21751
|
-
function registerModuleFactory(id, factory) {
|
|
21752
|
-
const existing = modules.get(id);
|
|
21753
|
-
assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);
|
|
21754
|
-
modules.set(id, factory);
|
|
21755
|
-
}
|
|
21756
|
-
function assertSameOrNotExisting(id, type, incoming) {
|
|
21757
|
-
if (type && type !== incoming) {
|
|
21758
|
-
throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);
|
|
21759
|
-
}
|
|
21760
|
-
}
|
|
21761
|
-
function registerNgModuleType(ngModuleType) {
|
|
21762
|
-
const visited = new Set();
|
|
21763
|
-
recurse(ngModuleType);
|
|
21764
|
-
function recurse(ngModuleType) {
|
|
21765
|
-
// The imports array of an NgModule must refer to other NgModules,
|
|
21766
|
-
// so an error is thrown if no module definition is available.
|
|
21767
|
-
const def = getNgModuleDef(ngModuleType, /* throwNotFound */ true);
|
|
21768
|
-
const id = def.id;
|
|
21769
|
-
if (id !== null) {
|
|
21770
|
-
const existing = modules.get(id);
|
|
21771
|
-
assertSameOrNotExisting(id, existing, ngModuleType);
|
|
21772
|
-
modules.set(id, ngModuleType);
|
|
21773
|
-
}
|
|
21774
|
-
const imports = maybeUnwrapFn(def.imports);
|
|
21775
|
-
for (const i of imports) {
|
|
21776
|
-
if (!visited.has(i)) {
|
|
21777
|
-
visited.add(i);
|
|
21778
|
-
recurse(i);
|
|
21779
|
-
}
|
|
21780
|
-
}
|
|
21781
|
-
}
|
|
21782
|
-
}
|
|
21783
|
-
function clearModulesForTest() {
|
|
21784
|
-
modules.clear();
|
|
21785
|
-
}
|
|
21786
|
-
function getRegisteredNgModuleType(id) {
|
|
21787
|
-
return (modules.get(id) || autoRegisterModuleById[id]);
|
|
21788
|
-
}
|
|
21789
|
-
|
|
21790
21894
|
/**
|
|
21791
21895
|
* @license
|
|
21792
21896
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -21857,33 +21961,6 @@ class NgModuleFactory extends NgModuleFactory$1 {
|
|
|
21857
21961
|
constructor(moduleType) {
|
|
21858
21962
|
super();
|
|
21859
21963
|
this.moduleType = moduleType;
|
|
21860
|
-
const ngModuleDef = getNgModuleDef(moduleType);
|
|
21861
|
-
if (ngModuleDef !== null) {
|
|
21862
|
-
// Register the NgModule with Angular's module registry. The location (and hence timing) of
|
|
21863
|
-
// this call is critical to ensure this works correctly (modules get registered when expected)
|
|
21864
|
-
// without bloating bundles (modules are registered when otherwise not referenced).
|
|
21865
|
-
//
|
|
21866
|
-
// In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has
|
|
21867
|
-
// several practical consequences:
|
|
21868
|
-
//
|
|
21869
|
-
// - If an .ngfactory file is not imported from, the module won't be registered (and can be
|
|
21870
|
-
// tree shaken).
|
|
21871
|
-
// - If an .ngfactory file is imported from, the module will be registered even if an instance
|
|
21872
|
-
// is not actually created (via `create` below).
|
|
21873
|
-
// - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's
|
|
21874
|
-
// imports,
|
|
21875
|
-
//
|
|
21876
|
-
// In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are
|
|
21877
|
-
// not a required API to use - there are other ways to obtain an NgModuleFactory for a given
|
|
21878
|
-
// NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,
|
|
21879
|
-
// the side effect of registration is added here, in the constructor of NgModuleFactory,
|
|
21880
|
-
// ensuring no matter how a factory is created, the module is registered correctly.
|
|
21881
|
-
//
|
|
21882
|
-
// An alternative would be to include the registration side effect inline following the actual
|
|
21883
|
-
// NgModule definition. This also has the correct timing, but breaks tree-shaking - modules
|
|
21884
|
-
// will be registered and retained even if they're otherwise never referenced.
|
|
21885
|
-
registerNgModuleType(moduleType);
|
|
21886
|
-
}
|
|
21887
21964
|
}
|
|
21888
21965
|
create(parentInjector) {
|
|
21889
21966
|
return new NgModuleRef(this.moduleType, parentInjector);
|
|
@@ -22681,9 +22758,9 @@ const R3TemplateRef = class TemplateRef extends ViewEngineTemplateRef {
|
|
|
22681
22758
|
this._declarationTContainer = _declarationTContainer;
|
|
22682
22759
|
this.elementRef = elementRef;
|
|
22683
22760
|
}
|
|
22684
|
-
createEmbeddedView(context) {
|
|
22761
|
+
createEmbeddedView(context, injector) {
|
|
22685
22762
|
const embeddedTView = this._declarationTContainer.tViews;
|
|
22686
|
-
const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null);
|
|
22763
|
+
const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null, injector || null);
|
|
22687
22764
|
const declarationLContainer = this._declarationLView[this._declarationTContainer.index];
|
|
22688
22765
|
ngDevMode && assertLContainer(declarationLContainer);
|
|
22689
22766
|
embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;
|
|
@@ -22799,8 +22876,17 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
|
|
|
22799
22876
|
get length() {
|
|
22800
22877
|
return this._lContainer.length - CONTAINER_HEADER_OFFSET;
|
|
22801
22878
|
}
|
|
22802
|
-
createEmbeddedView(templateRef, context,
|
|
22803
|
-
|
|
22879
|
+
createEmbeddedView(templateRef, context, indexOrOptions) {
|
|
22880
|
+
let index;
|
|
22881
|
+
let injector;
|
|
22882
|
+
if (typeof indexOrOptions === 'number') {
|
|
22883
|
+
index = indexOrOptions;
|
|
22884
|
+
}
|
|
22885
|
+
else if (indexOrOptions != null) {
|
|
22886
|
+
index = indexOrOptions.index;
|
|
22887
|
+
injector = indexOrOptions.injector;
|
|
22888
|
+
}
|
|
22889
|
+
const viewRef = templateRef.createEmbeddedView(context || {}, injector);
|
|
22804
22890
|
this.insert(viewRef, index);
|
|
22805
22891
|
return viewRef;
|
|
22806
22892
|
}
|
|
@@ -22841,11 +22927,29 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
|
|
|
22841
22927
|
componentFactoryOrType :
|
|
22842
22928
|
new ComponentFactory(getComponentDef(componentFactoryOrType));
|
|
22843
22929
|
const contextInjector = injector || this.parentInjector;
|
|
22844
|
-
|
|
22845
|
-
|
|
22846
|
-
//
|
|
22847
|
-
//
|
|
22848
|
-
|
|
22930
|
+
// If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.
|
|
22931
|
+
if (!ngModuleRef && componentFactory.ngModule == null) {
|
|
22932
|
+
// For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that
|
|
22933
|
+
// an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an
|
|
22934
|
+
// `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based
|
|
22935
|
+
// use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try
|
|
22936
|
+
// using a provided injector first, then fall back to the parent injector of this
|
|
22937
|
+
// `ViewContainerRef` instance.
|
|
22938
|
+
//
|
|
22939
|
+
// For the factory-less case, it's critical to establish a connection with the module
|
|
22940
|
+
// injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),
|
|
22941
|
+
// so that a component can use DI tokens provided in MgModules. For this reason, we can not
|
|
22942
|
+
// rely on the provided injector, since it might be detached from the DI tree (for example, if
|
|
22943
|
+
// it was created via `Injector.create` without specifying a parent injector, or if an
|
|
22944
|
+
// injector is retrieved from an `NgModuleRef` created via `createNgModuleRef` using an
|
|
22945
|
+
// NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent
|
|
22946
|
+
// injector, which is normally connected to the DI tree, which includes module injector
|
|
22947
|
+
// subtree.
|
|
22948
|
+
const _injector = isComponentFactory ? contextInjector : this.parentInjector;
|
|
22949
|
+
// DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||
|
|
22950
|
+
// undefined` expression which seems to cause internal google apps to fail. This is documented
|
|
22951
|
+
// in the following internal bug issue: go/b/142967802
|
|
22952
|
+
const result = _injector.get(NgModuleRef$1, null);
|
|
22849
22953
|
if (result) {
|
|
22850
22954
|
ngModuleRef = result;
|
|
22851
22955
|
}
|
|
@@ -23535,6 +23639,7 @@ const angularCoreEnv = (() => ({
|
|
|
23535
23639
|
'ɵɵinvalidFactory': ɵɵinvalidFactory,
|
|
23536
23640
|
'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,
|
|
23537
23641
|
'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,
|
|
23642
|
+
'ɵɵresetView': ɵɵresetView,
|
|
23538
23643
|
'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,
|
|
23539
23644
|
'ɵɵProvidersFeature': ɵɵProvidersFeature,
|
|
23540
23645
|
'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,
|
|
@@ -23647,6 +23752,7 @@ const angularCoreEnv = (() => ({
|
|
|
23647
23752
|
'ɵɵresolveBody': ɵɵresolveBody,
|
|
23648
23753
|
'ɵɵsetComponentScope': ɵɵsetComponentScope,
|
|
23649
23754
|
'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope,
|
|
23755
|
+
'ɵɵregisterNgModuleType': registerNgModuleType,
|
|
23650
23756
|
'ɵɵsanitizeHtml': ɵɵsanitizeHtml,
|
|
23651
23757
|
'ɵɵsanitizeStyle': ɵɵsanitizeStyle,
|
|
23652
23758
|
'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,
|
|
@@ -23682,6 +23788,17 @@ function resetJitOptions() {
|
|
|
23682
23788
|
jitOptions = null;
|
|
23683
23789
|
}
|
|
23684
23790
|
|
|
23791
|
+
/**
|
|
23792
|
+
* @license
|
|
23793
|
+
* Copyright Google LLC All Rights Reserved.
|
|
23794
|
+
*
|
|
23795
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
23796
|
+
* found in the LICENSE file at https://angular.io/license
|
|
23797
|
+
*/
|
|
23798
|
+
function patchModuleCompilation() {
|
|
23799
|
+
// Does nothing, but exists as a target for patching.
|
|
23800
|
+
}
|
|
23801
|
+
|
|
23685
23802
|
/**
|
|
23686
23803
|
* @license
|
|
23687
23804
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -23738,7 +23855,11 @@ function isResolvedDeclaration(declaration) {
|
|
|
23738
23855
|
* This function automatically gets called when a class has a `@NgModule` decorator.
|
|
23739
23856
|
*/
|
|
23740
23857
|
function compileNgModule(moduleType, ngModule = {}) {
|
|
23858
|
+
patchModuleCompilation();
|
|
23741
23859
|
compileNgModuleDefs(moduleType, ngModule);
|
|
23860
|
+
if (ngModule.id !== undefined) {
|
|
23861
|
+
registerNgModuleType(moduleType, ngModule.id);
|
|
23862
|
+
}
|
|
23742
23863
|
// Because we don't know if all declarations have resolved yet at the moment the
|
|
23743
23864
|
// NgModule decorator is executing, we're enqueueing the setting of module scope
|
|
23744
23865
|
// on its declarations to be run at a later time when all declarations for the module,
|
|
@@ -24362,7 +24483,10 @@ function directiveMetadata(type, metadata) {
|
|
|
24362
24483
|
usesInheritance: !extendsDirectlyFromObject(type),
|
|
24363
24484
|
exportAs: extractExportAs(metadata.exportAs),
|
|
24364
24485
|
providers: metadata.providers || null,
|
|
24365
|
-
viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery)
|
|
24486
|
+
viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),
|
|
24487
|
+
// TODO(alxhub): pass through the standalone flag from the directive metadata once standalone
|
|
24488
|
+
// functionality is fully rolled out.
|
|
24489
|
+
isStandalone: false,
|
|
24366
24490
|
};
|
|
24367
24491
|
}
|
|
24368
24492
|
/**
|
|
@@ -24506,7 +24630,10 @@ function getPipeMetadata(type, meta) {
|
|
|
24506
24630
|
type: type,
|
|
24507
24631
|
name: type.name,
|
|
24508
24632
|
pipeName: meta.name,
|
|
24509
|
-
pure: meta.pure !== undefined ? meta.pure : true
|
|
24633
|
+
pure: meta.pure !== undefined ? meta.pure : true,
|
|
24634
|
+
// TODO(alxhub): pass through the standalone flag from the pipe metadata once standalone
|
|
24635
|
+
// functionality is fully rolled out.
|
|
24636
|
+
isStandalone: false,
|
|
24510
24637
|
};
|
|
24511
24638
|
}
|
|
24512
24639
|
|
|
@@ -24808,9 +24935,10 @@ class ApplicationInitStatus {
|
|
|
24808
24935
|
}
|
|
24809
24936
|
}
|
|
24810
24937
|
ApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) { return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8)); };
|
|
24811
|
-
ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac });
|
|
24938
|
+
ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac, providedIn: 'root' });
|
|
24812
24939
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{
|
|
24813
|
-
type: Injectable
|
|
24940
|
+
type: Injectable,
|
|
24941
|
+
args: [{ providedIn: 'root' }]
|
|
24814
24942
|
}], function () { return [{ type: undefined, decorators: [{
|
|
24815
24943
|
type: Inject,
|
|
24816
24944
|
args: [APP_INITIALIZER]
|
|
@@ -24836,7 +24964,10 @@ ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Appli
|
|
|
24836
24964
|
*
|
|
24837
24965
|
* @publicApi
|
|
24838
24966
|
*/
|
|
24839
|
-
const APP_ID = new InjectionToken('AppId'
|
|
24967
|
+
const APP_ID = new InjectionToken('AppId', {
|
|
24968
|
+
providedIn: 'root',
|
|
24969
|
+
factory: _appIdRandomProviderFactory,
|
|
24970
|
+
});
|
|
24840
24971
|
function _appIdRandomProviderFactory() {
|
|
24841
24972
|
return `${_randomChar()}${_randomChar()}${_randomChar()}`;
|
|
24842
24973
|
}
|
|
@@ -24879,6 +25010,15 @@ const APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');
|
|
|
24879
25010
|
* @publicApi
|
|
24880
25011
|
*/
|
|
24881
25012
|
const PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');
|
|
25013
|
+
// We keep this token here, rather than the animations package, so that modules that only care
|
|
25014
|
+
// about which animations module is loaded (e.g. the CDK) can retrieve it without having to
|
|
25015
|
+
// include extra dependencies. See #44970 for more context.
|
|
25016
|
+
/**
|
|
25017
|
+
* A [DI token](guide/glossary#di-token "DI token definition") that indicates which animations
|
|
25018
|
+
* module has been loaded.
|
|
25019
|
+
* @publicApi
|
|
25020
|
+
*/
|
|
25021
|
+
const ANIMATION_MODULE_TYPE = new InjectionToken('AnimationModuleType');
|
|
24882
25022
|
|
|
24883
25023
|
/**
|
|
24884
25024
|
* @license
|
|
@@ -24911,6 +25051,33 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
|
|
|
24911
25051
|
* Use of this source code is governed by an MIT-style license that can be
|
|
24912
25052
|
* found in the LICENSE file at https://angular.io/license
|
|
24913
25053
|
*/
|
|
25054
|
+
/**
|
|
25055
|
+
* Work out the locale from the potential global properties.
|
|
25056
|
+
*
|
|
25057
|
+
* * Closure Compiler: use `goog.LOCALE`.
|
|
25058
|
+
* * Ivy enabled: use `$localize.locale`
|
|
25059
|
+
*/
|
|
25060
|
+
function getGlobalLocale() {
|
|
25061
|
+
if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
|
|
25062
|
+
typeof goog !== 'undefined' && goog.LOCALE !== 'en') {
|
|
25063
|
+
// * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.
|
|
25064
|
+
// * In order to preserve backwards compatibility, we use Angular default value over
|
|
25065
|
+
// Closure Compiler's one.
|
|
25066
|
+
return goog.LOCALE;
|
|
25067
|
+
}
|
|
25068
|
+
else {
|
|
25069
|
+
// KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
|
|
25070
|
+
// COMPILE-TIME INLINER.
|
|
25071
|
+
//
|
|
25072
|
+
// * During compile time inlining of translations the expression will be replaced
|
|
25073
|
+
// with a string literal that is the current locale. Other forms of this expression are not
|
|
25074
|
+
// guaranteed to be replaced.
|
|
25075
|
+
//
|
|
25076
|
+
// * During runtime translation evaluation, the developer is required to set `$localize.locale`
|
|
25077
|
+
// if required, or just to provide their own `LOCALE_ID` provider.
|
|
25078
|
+
return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
|
|
25079
|
+
}
|
|
25080
|
+
}
|
|
24914
25081
|
/**
|
|
24915
25082
|
* Provide this token to set the locale of your application.
|
|
24916
25083
|
* It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
|
|
@@ -24933,7 +25100,10 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
|
|
|
24933
25100
|
*
|
|
24934
25101
|
* @publicApi
|
|
24935
25102
|
*/
|
|
24936
|
-
const LOCALE_ID = new InjectionToken('LocaleId'
|
|
25103
|
+
const LOCALE_ID = new InjectionToken('LocaleId', {
|
|
25104
|
+
providedIn: 'root',
|
|
25105
|
+
factory: () => inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale(),
|
|
25106
|
+
});
|
|
24937
25107
|
/**
|
|
24938
25108
|
* Provide this token to set the default currency code your application uses for
|
|
24939
25109
|
* CurrencyPipe when there is no currency code passed into it. This is only used by
|
|
@@ -24972,7 +25142,10 @@ const LOCALE_ID = new InjectionToken('LocaleId');
|
|
|
24972
25142
|
*
|
|
24973
25143
|
* @publicApi
|
|
24974
25144
|
*/
|
|
24975
|
-
const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode'
|
|
25145
|
+
const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode', {
|
|
25146
|
+
providedIn: 'root',
|
|
25147
|
+
factory: () => USD_CURRENCY_CODE,
|
|
25148
|
+
});
|
|
24976
25149
|
/**
|
|
24977
25150
|
* Use this token at bootstrap to provide the content of your translation file (`xtb`,
|
|
24978
25151
|
* `xlf` or `xlf2`) when you want to translate your application in another language.
|
|
@@ -25139,9 +25312,10 @@ class Compiler {
|
|
|
25139
25312
|
}
|
|
25140
25313
|
}
|
|
25141
25314
|
Compiler.ɵfac = function Compiler_Factory(t) { return new (t || Compiler)(); };
|
|
25142
|
-
Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac });
|
|
25315
|
+
Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac, providedIn: 'root' });
|
|
25143
25316
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Compiler, [{
|
|
25144
|
-
type: Injectable
|
|
25317
|
+
type: Injectable,
|
|
25318
|
+
args: [{ providedIn: 'root' }]
|
|
25145
25319
|
}], null, null); })();
|
|
25146
25320
|
/**
|
|
25147
25321
|
* Token to provide CompilerOptions in the platform injector.
|
|
@@ -26014,26 +26188,7 @@ class PlatformRef {
|
|
|
26014
26188
|
this._destroyed = false;
|
|
26015
26189
|
}
|
|
26016
26190
|
/**
|
|
26017
|
-
* Creates an instance of an `@NgModule` for the given platform
|
|
26018
|
-
*
|
|
26019
|
-
* @usageNotes
|
|
26020
|
-
*
|
|
26021
|
-
* The following example creates the NgModule for a browser platform.
|
|
26022
|
-
*
|
|
26023
|
-
* ```typescript
|
|
26024
|
-
* my_module.ts:
|
|
26025
|
-
*
|
|
26026
|
-
* @NgModule({
|
|
26027
|
-
* imports: [BrowserModule]
|
|
26028
|
-
* })
|
|
26029
|
-
* class MyModule {}
|
|
26030
|
-
*
|
|
26031
|
-
* main.ts:
|
|
26032
|
-
* import {MyModuleNgFactory} from './my_module.ngfactory';
|
|
26033
|
-
* import {platformBrowser} from '@angular/platform-browser';
|
|
26034
|
-
*
|
|
26035
|
-
* let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
|
|
26036
|
-
* ```
|
|
26191
|
+
* Creates an instance of an `@NgModule` for the given platform.
|
|
26037
26192
|
*
|
|
26038
26193
|
* @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function
|
|
26039
26194
|
* argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.
|
|
@@ -26087,7 +26242,7 @@ class PlatformRef {
|
|
|
26087
26242
|
});
|
|
26088
26243
|
}
|
|
26089
26244
|
/**
|
|
26090
|
-
* Creates an instance of an `@NgModule` for a given platform
|
|
26245
|
+
* Creates an instance of an `@NgModule` for a given platform.
|
|
26091
26246
|
*
|
|
26092
26247
|
* @usageNotes
|
|
26093
26248
|
* ### Simple Example
|
|
@@ -26521,9 +26676,10 @@ class ApplicationRef {
|
|
|
26521
26676
|
}
|
|
26522
26677
|
}
|
|
26523
26678
|
ApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver$1), ɵɵinject(ApplicationInitStatus)); };
|
|
26524
|
-
ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac });
|
|
26679
|
+
ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' });
|
|
26525
26680
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{
|
|
26526
|
-
type: Injectable
|
|
26681
|
+
type: Injectable,
|
|
26682
|
+
args: [{ providedIn: 'root' }]
|
|
26527
26683
|
}], function () { return [{ type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver$1 }, { type: ApplicationInitStatus }]; }, null); })();
|
|
26528
26684
|
function remove(list, el) {
|
|
26529
26685
|
const index = list.indexOf(el);
|
|
@@ -26830,8 +26986,6 @@ var ng_module_factory_loader_impl = {};
|
|
|
26830
26986
|
* Use of this source code is governed by an MIT-style license that can be
|
|
26831
26987
|
* found in the LICENSE file at https://angular.io/license
|
|
26832
26988
|
*/
|
|
26833
|
-
// TODO(alxhub): recombine the interfaces and implementations here and move the docs back onto the
|
|
26834
|
-
// original classes.
|
|
26835
26989
|
/**
|
|
26836
26990
|
* @publicApi
|
|
26837
26991
|
*/
|
|
@@ -26847,47 +27001,92 @@ class DebugEventListener {
|
|
|
26847
27001
|
function asNativeElements(debugEls) {
|
|
26848
27002
|
return debugEls.map((el) => el.nativeElement);
|
|
26849
27003
|
}
|
|
26850
|
-
|
|
27004
|
+
/**
|
|
27005
|
+
* @publicApi
|
|
27006
|
+
*/
|
|
27007
|
+
class DebugNode {
|
|
26851
27008
|
constructor(nativeNode) {
|
|
26852
27009
|
this.nativeNode = nativeNode;
|
|
26853
27010
|
}
|
|
27011
|
+
/**
|
|
27012
|
+
* The `DebugElement` parent. Will be `null` if this is the root element.
|
|
27013
|
+
*/
|
|
26854
27014
|
get parent() {
|
|
26855
27015
|
const parent = this.nativeNode.parentNode;
|
|
26856
|
-
return parent ? new
|
|
27016
|
+
return parent ? new DebugElement(parent) : null;
|
|
26857
27017
|
}
|
|
27018
|
+
/**
|
|
27019
|
+
* The host dependency injector. For example, the root element's component instance injector.
|
|
27020
|
+
*/
|
|
26858
27021
|
get injector() {
|
|
26859
27022
|
return getInjector(this.nativeNode);
|
|
26860
27023
|
}
|
|
27024
|
+
/**
|
|
27025
|
+
* The element's own component instance, if it has one.
|
|
27026
|
+
*/
|
|
26861
27027
|
get componentInstance() {
|
|
26862
27028
|
const nativeElement = this.nativeNode;
|
|
26863
27029
|
return nativeElement &&
|
|
26864
27030
|
(getComponent$1(nativeElement) || getOwningComponent(nativeElement));
|
|
26865
27031
|
}
|
|
27032
|
+
/**
|
|
27033
|
+
* An object that provides parent context for this element. Often an ancestor component instance
|
|
27034
|
+
* that governs this element.
|
|
27035
|
+
*
|
|
27036
|
+
* When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`
|
|
27037
|
+
* property is the value of the row instance value. For example, the `hero` in `*ngFor="let hero
|
|
27038
|
+
* of heroes"`.
|
|
27039
|
+
*/
|
|
26866
27040
|
get context() {
|
|
26867
27041
|
return getComponent$1(this.nativeNode) || getContext(this.nativeNode);
|
|
26868
27042
|
}
|
|
27043
|
+
/**
|
|
27044
|
+
* The callbacks attached to the component's @Output properties and/or the element's event
|
|
27045
|
+
* properties.
|
|
27046
|
+
*/
|
|
26869
27047
|
get listeners() {
|
|
26870
27048
|
return getListeners(this.nativeNode).filter(listener => listener.type === 'dom');
|
|
26871
27049
|
}
|
|
27050
|
+
/**
|
|
27051
|
+
* Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local
|
|
27052
|
+
* variable name.
|
|
27053
|
+
*/
|
|
26872
27054
|
get references() {
|
|
26873
27055
|
return getLocalRefs(this.nativeNode);
|
|
26874
27056
|
}
|
|
27057
|
+
/**
|
|
27058
|
+
* This component's injector lookup tokens. Includes the component itself plus the tokens that the
|
|
27059
|
+
* component lists in its providers metadata.
|
|
27060
|
+
*/
|
|
26875
27061
|
get providerTokens() {
|
|
26876
27062
|
return getInjectionTokens(this.nativeNode);
|
|
26877
27063
|
}
|
|
26878
27064
|
}
|
|
26879
|
-
|
|
27065
|
+
/**
|
|
27066
|
+
* @publicApi
|
|
27067
|
+
*
|
|
27068
|
+
* @see [Component testing scenarios](guide/testing-components-scenarios)
|
|
27069
|
+
* @see [Basics of testing components](guide/testing-components-basics)
|
|
27070
|
+
* @see [Testing utility APIs](guide/testing-utility-apis)
|
|
27071
|
+
*/
|
|
27072
|
+
class DebugElement extends DebugNode {
|
|
26880
27073
|
constructor(nativeNode) {
|
|
26881
27074
|
ngDevMode && assertDomNode(nativeNode);
|
|
26882
27075
|
super(nativeNode);
|
|
26883
27076
|
}
|
|
27077
|
+
/**
|
|
27078
|
+
* The underlying DOM element at the root of the component.
|
|
27079
|
+
*/
|
|
26884
27080
|
get nativeElement() {
|
|
26885
27081
|
return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;
|
|
26886
27082
|
}
|
|
27083
|
+
/**
|
|
27084
|
+
* The element tag name, if it is an element.
|
|
27085
|
+
*/
|
|
26887
27086
|
get name() {
|
|
26888
27087
|
const context = getLContext(this.nativeNode);
|
|
26889
|
-
|
|
26890
|
-
|
|
27088
|
+
const lView = context ? context.lView : null;
|
|
27089
|
+
if (lView !== null) {
|
|
26891
27090
|
const tData = lView[TVIEW].data;
|
|
26892
27091
|
const tNode = tData[context.nodeIndex];
|
|
26893
27092
|
return tNode.value;
|
|
@@ -26910,10 +27109,10 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
|
|
|
26910
27109
|
*/
|
|
26911
27110
|
get properties() {
|
|
26912
27111
|
const context = getLContext(this.nativeNode);
|
|
26913
|
-
|
|
27112
|
+
const lView = context ? context.lView : null;
|
|
27113
|
+
if (lView === null) {
|
|
26914
27114
|
return {};
|
|
26915
27115
|
}
|
|
26916
|
-
const lView = context.lView;
|
|
26917
27116
|
const tData = lView[TVIEW].data;
|
|
26918
27117
|
const tNode = tData[context.nodeIndex];
|
|
26919
27118
|
const properties = {};
|
|
@@ -26924,6 +27123,9 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
|
|
|
26924
27123
|
collectPropertyBindings(properties, tNode, lView, tData);
|
|
26925
27124
|
return properties;
|
|
26926
27125
|
}
|
|
27126
|
+
/**
|
|
27127
|
+
* A map of attribute names to attribute values for an element.
|
|
27128
|
+
*/
|
|
26927
27129
|
get attributes() {
|
|
26928
27130
|
const attributes = {};
|
|
26929
27131
|
const element = this.nativeElement;
|
|
@@ -26931,10 +27133,10 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
|
|
|
26931
27133
|
return attributes;
|
|
26932
27134
|
}
|
|
26933
27135
|
const context = getLContext(element);
|
|
26934
|
-
|
|
27136
|
+
const lView = context ? context.lView : null;
|
|
27137
|
+
if (lView === null) {
|
|
26935
27138
|
return {};
|
|
26936
27139
|
}
|
|
26937
|
-
const lView = context.lView;
|
|
26938
27140
|
const tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;
|
|
26939
27141
|
const lowercaseTNodeAttrs = [];
|
|
26940
27142
|
// For debug nodes we take the element's attribute directly from the DOM since it allows us
|
|
@@ -26972,12 +27174,29 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
|
|
|
26972
27174
|
}
|
|
26973
27175
|
return attributes;
|
|
26974
27176
|
}
|
|
27177
|
+
/**
|
|
27178
|
+
* The inline styles of the DOM element.
|
|
27179
|
+
*
|
|
27180
|
+
* Will be `null` if there is no `style` property on the underlying DOM element.
|
|
27181
|
+
*
|
|
27182
|
+
* @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)
|
|
27183
|
+
*/
|
|
26975
27184
|
get styles() {
|
|
26976
27185
|
if (this.nativeElement && this.nativeElement.style) {
|
|
26977
27186
|
return this.nativeElement.style;
|
|
26978
27187
|
}
|
|
26979
27188
|
return {};
|
|
26980
27189
|
}
|
|
27190
|
+
/**
|
|
27191
|
+
* A map containing the class names on the element as keys.
|
|
27192
|
+
*
|
|
27193
|
+
* This map is derived from the `className` property of the DOM element.
|
|
27194
|
+
*
|
|
27195
|
+
* Note: The values of this object will always be `true`. The class key will not appear in the KV
|
|
27196
|
+
* object if it does not exist on the element.
|
|
27197
|
+
*
|
|
27198
|
+
* @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)
|
|
27199
|
+
*/
|
|
26981
27200
|
get classes() {
|
|
26982
27201
|
const result = {};
|
|
26983
27202
|
const element = this.nativeElement;
|
|
@@ -26987,15 +27206,23 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
|
|
|
26987
27206
|
classes.forEach((value) => result[value] = true);
|
|
26988
27207
|
return result;
|
|
26989
27208
|
}
|
|
27209
|
+
/**
|
|
27210
|
+
* The `childNodes` of the DOM element as a `DebugNode` array.
|
|
27211
|
+
*
|
|
27212
|
+
* @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
|
|
27213
|
+
*/
|
|
26990
27214
|
get childNodes() {
|
|
26991
27215
|
const childNodes = this.nativeNode.childNodes;
|
|
26992
27216
|
const children = [];
|
|
26993
27217
|
for (let i = 0; i < childNodes.length; i++) {
|
|
26994
27218
|
const element = childNodes[i];
|
|
26995
|
-
children.push(
|
|
27219
|
+
children.push(getDebugNode(element));
|
|
26996
27220
|
}
|
|
26997
27221
|
return children;
|
|
26998
27222
|
}
|
|
27223
|
+
/**
|
|
27224
|
+
* The immediate `DebugElement` children. Walk the tree by descending through `children`.
|
|
27225
|
+
*/
|
|
26999
27226
|
get children() {
|
|
27000
27227
|
const nativeElement = this.nativeElement;
|
|
27001
27228
|
if (!nativeElement)
|
|
@@ -27004,24 +27231,45 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
|
|
|
27004
27231
|
const children = [];
|
|
27005
27232
|
for (let i = 0; i < childNodes.length; i++) {
|
|
27006
27233
|
const element = childNodes[i];
|
|
27007
|
-
children.push(
|
|
27234
|
+
children.push(getDebugNode(element));
|
|
27008
27235
|
}
|
|
27009
27236
|
return children;
|
|
27010
27237
|
}
|
|
27238
|
+
/**
|
|
27239
|
+
* @returns the first `DebugElement` that matches the predicate at any depth in the subtree.
|
|
27240
|
+
*/
|
|
27011
27241
|
query(predicate) {
|
|
27012
27242
|
const results = this.queryAll(predicate);
|
|
27013
27243
|
return results[0] || null;
|
|
27014
27244
|
}
|
|
27245
|
+
/**
|
|
27246
|
+
* @returns All `DebugElement` matches for the predicate at any depth in the subtree.
|
|
27247
|
+
*/
|
|
27015
27248
|
queryAll(predicate) {
|
|
27016
27249
|
const matches = [];
|
|
27017
|
-
|
|
27250
|
+
_queryAll(this, predicate, matches, true);
|
|
27018
27251
|
return matches;
|
|
27019
27252
|
}
|
|
27253
|
+
/**
|
|
27254
|
+
* @returns All `DebugNode` matches for the predicate at any depth in the subtree.
|
|
27255
|
+
*/
|
|
27020
27256
|
queryAllNodes(predicate) {
|
|
27021
27257
|
const matches = [];
|
|
27022
|
-
|
|
27258
|
+
_queryAll(this, predicate, matches, false);
|
|
27023
27259
|
return matches;
|
|
27024
27260
|
}
|
|
27261
|
+
/**
|
|
27262
|
+
* Triggers the event by its name if there is a corresponding listener in the element's
|
|
27263
|
+
* `listeners` collection.
|
|
27264
|
+
*
|
|
27265
|
+
* If the event lacks a listener or there's some other problem, consider
|
|
27266
|
+
* calling `nativeElement.dispatchEvent(eventObject)`.
|
|
27267
|
+
*
|
|
27268
|
+
* @param eventName The name of the event to trigger
|
|
27269
|
+
* @param eventObj The _event object_ expected by the handler
|
|
27270
|
+
*
|
|
27271
|
+
* @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)
|
|
27272
|
+
*/
|
|
27025
27273
|
triggerEventHandler(eventName, eventObj) {
|
|
27026
27274
|
const node = this.nativeNode;
|
|
27027
27275
|
const invokedListeners = [];
|
|
@@ -27080,11 +27328,12 @@ function isPrimitiveValue(value) {
|
|
|
27080
27328
|
return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||
|
|
27081
27329
|
value === null;
|
|
27082
27330
|
}
|
|
27083
|
-
function
|
|
27331
|
+
function _queryAll(parentElement, predicate, matches, elementsOnly) {
|
|
27084
27332
|
const context = getLContext(parentElement.nativeNode);
|
|
27085
|
-
|
|
27086
|
-
|
|
27087
|
-
|
|
27333
|
+
const lView = context ? context.lView : null;
|
|
27334
|
+
if (lView !== null) {
|
|
27335
|
+
const parentTNode = lView[TVIEW].data[context.nodeIndex];
|
|
27336
|
+
_queryNodeChildren(parentTNode, lView, predicate, matches, elementsOnly, parentElement.nativeNode);
|
|
27088
27337
|
}
|
|
27089
27338
|
else {
|
|
27090
27339
|
// If the context is null, then `parentElement` was either created with Renderer2 or native DOM
|
|
@@ -27102,26 +27351,26 @@ function _queryAllR3(parentElement, predicate, matches, elementsOnly) {
|
|
|
27102
27351
|
* @param elementsOnly whether only elements should be searched
|
|
27103
27352
|
* @param rootNativeNode the root native node on which predicate should not be matched
|
|
27104
27353
|
*/
|
|
27105
|
-
function
|
|
27354
|
+
function _queryNodeChildren(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {
|
|
27106
27355
|
ngDevMode && assertTNodeForLView(tNode, lView);
|
|
27107
27356
|
const nativeNode = getNativeByTNodeOrNull(tNode, lView);
|
|
27108
27357
|
// For each type of TNode, specific logic is executed.
|
|
27109
27358
|
if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) {
|
|
27110
27359
|
// Case 1: the TNode is an element
|
|
27111
27360
|
// The native node has to be checked.
|
|
27112
|
-
|
|
27361
|
+
_addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
|
|
27113
27362
|
if (isComponentHost(tNode)) {
|
|
27114
27363
|
// If the element is the host of a component, then all nodes in its view have to be processed.
|
|
27115
27364
|
// Note: the component's content (tNode.child) will be processed from the insertion points.
|
|
27116
27365
|
const componentView = getComponentLViewByIndex(tNode.index, lView);
|
|
27117
27366
|
if (componentView && componentView[TVIEW].firstChild) {
|
|
27118
|
-
|
|
27367
|
+
_queryNodeChildren(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);
|
|
27119
27368
|
}
|
|
27120
27369
|
}
|
|
27121
27370
|
else {
|
|
27122
27371
|
if (tNode.child) {
|
|
27123
27372
|
// Otherwise, its children have to be processed.
|
|
27124
|
-
|
|
27373
|
+
_queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
|
|
27125
27374
|
}
|
|
27126
27375
|
// We also have to query the DOM directly in order to catch elements inserted through
|
|
27127
27376
|
// Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple
|
|
@@ -27137,16 +27386,16 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
|
|
|
27137
27386
|
// processed.
|
|
27138
27387
|
const nodeOrContainer = lView[tNode.index];
|
|
27139
27388
|
if (isLContainer(nodeOrContainer)) {
|
|
27140
|
-
|
|
27389
|
+
_queryNodeChildrenInContainer(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);
|
|
27141
27390
|
}
|
|
27142
27391
|
}
|
|
27143
27392
|
else if (tNode.type & 4 /* Container */) {
|
|
27144
27393
|
// Case 2: the TNode is a container
|
|
27145
27394
|
// The native node has to be checked.
|
|
27146
27395
|
const lContainer = lView[tNode.index];
|
|
27147
|
-
|
|
27396
|
+
_addQueryMatch(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);
|
|
27148
27397
|
// Each view inside the container has to be processed.
|
|
27149
|
-
|
|
27398
|
+
_queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode);
|
|
27150
27399
|
}
|
|
27151
27400
|
else if (tNode.type & 16 /* Projection */) {
|
|
27152
27401
|
// Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).
|
|
@@ -27156,18 +27405,18 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
|
|
|
27156
27405
|
const head = componentHost.projection[tNode.projection];
|
|
27157
27406
|
if (Array.isArray(head)) {
|
|
27158
27407
|
for (let nativeNode of head) {
|
|
27159
|
-
|
|
27408
|
+
_addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
|
|
27160
27409
|
}
|
|
27161
27410
|
}
|
|
27162
27411
|
else if (head) {
|
|
27163
27412
|
const nextLView = componentView[PARENT];
|
|
27164
27413
|
const nextTNode = nextLView[TVIEW].data[head.index];
|
|
27165
|
-
|
|
27414
|
+
_queryNodeChildren(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);
|
|
27166
27415
|
}
|
|
27167
27416
|
}
|
|
27168
27417
|
else if (tNode.child) {
|
|
27169
27418
|
// Case 4: the TNode is a view.
|
|
27170
|
-
|
|
27419
|
+
_queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
|
|
27171
27420
|
}
|
|
27172
27421
|
// We don't want to go to the next sibling of the root node.
|
|
27173
27422
|
if (rootNativeNode !== nativeNode) {
|
|
@@ -27175,7 +27424,7 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
|
|
|
27175
27424
|
// link, depending on whether the current node has been projected.
|
|
27176
27425
|
const nextTNode = (tNode.flags & 4 /* isProjected */) ? tNode.projectionNext : tNode.next;
|
|
27177
27426
|
if (nextTNode) {
|
|
27178
|
-
|
|
27427
|
+
_queryNodeChildren(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);
|
|
27179
27428
|
}
|
|
27180
27429
|
}
|
|
27181
27430
|
}
|
|
@@ -27188,12 +27437,12 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
|
|
|
27188
27437
|
* @param elementsOnly whether only elements should be searched
|
|
27189
27438
|
* @param rootNativeNode the root native node on which predicate should not be matched
|
|
27190
27439
|
*/
|
|
27191
|
-
function
|
|
27440
|
+
function _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode) {
|
|
27192
27441
|
for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
|
|
27193
27442
|
const childView = lContainer[i];
|
|
27194
27443
|
const firstChild = childView[TVIEW].firstChild;
|
|
27195
27444
|
if (firstChild) {
|
|
27196
|
-
|
|
27445
|
+
_queryNodeChildren(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);
|
|
27197
27446
|
}
|
|
27198
27447
|
}
|
|
27199
27448
|
}
|
|
@@ -27206,7 +27455,7 @@ function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, element
|
|
|
27206
27455
|
* @param elementsOnly whether only elements should be searched
|
|
27207
27456
|
* @param rootNativeNode the root native node on which predicate should not be matched
|
|
27208
27457
|
*/
|
|
27209
|
-
function
|
|
27458
|
+
function _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {
|
|
27210
27459
|
if (rootNativeNode !== nativeNode) {
|
|
27211
27460
|
const debugNode = getDebugNode(nativeNode);
|
|
27212
27461
|
if (!debugNode) {
|
|
@@ -27215,7 +27464,7 @@ function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNati
|
|
|
27215
27464
|
// Type of the "predicate and "matches" array are set based on the value of
|
|
27216
27465
|
// the "elementsOnly" parameter. TypeScript is not able to properly infer these
|
|
27217
27466
|
// types with generics, so we manually cast the parameters accordingly.
|
|
27218
|
-
if (elementsOnly && debugNode instanceof
|
|
27467
|
+
if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&
|
|
27219
27468
|
matches.indexOf(debugNode) === -1) {
|
|
27220
27469
|
matches.push(debugNode);
|
|
27221
27470
|
}
|
|
@@ -27240,7 +27489,7 @@ function _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnl
|
|
|
27240
27489
|
const node = nodes[i];
|
|
27241
27490
|
const debugNode = getDebugNode(node);
|
|
27242
27491
|
if (debugNode) {
|
|
27243
|
-
if (elementsOnly && debugNode instanceof
|
|
27492
|
+
if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&
|
|
27244
27493
|
matches.indexOf(debugNode) === -1) {
|
|
27245
27494
|
matches.push(debugNode);
|
|
27246
27495
|
}
|
|
@@ -27281,25 +27530,24 @@ function collectPropertyBindings(properties, tNode, lView, tData) {
|
|
|
27281
27530
|
// Need to keep the nodes in a global Map so that multiple angular apps are supported.
|
|
27282
27531
|
const _nativeNodeToDebugNode = new Map();
|
|
27283
27532
|
const NG_DEBUG_PROPERTY = '__ng_debug__';
|
|
27284
|
-
|
|
27533
|
+
/**
|
|
27534
|
+
* @publicApi
|
|
27535
|
+
*/
|
|
27536
|
+
function getDebugNode(nativeNode) {
|
|
27285
27537
|
if (nativeNode instanceof Node) {
|
|
27286
27538
|
if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {
|
|
27287
27539
|
nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?
|
|
27288
|
-
new
|
|
27289
|
-
new
|
|
27540
|
+
new DebugElement(nativeNode) :
|
|
27541
|
+
new DebugNode(nativeNode);
|
|
27290
27542
|
}
|
|
27291
27543
|
return nativeNode[NG_DEBUG_PROPERTY];
|
|
27292
27544
|
}
|
|
27293
27545
|
return null;
|
|
27294
27546
|
}
|
|
27295
|
-
|
|
27296
|
-
|
|
27297
|
-
*/
|
|
27298
|
-
const getDebugNode = getDebugNode__POST_R3__;
|
|
27299
|
-
function getDebugNodeR2__POST_R3__(_nativeNode) {
|
|
27547
|
+
// TODO: cleanup all references to this function and remove it.
|
|
27548
|
+
function getDebugNodeR2(_nativeNode) {
|
|
27300
27549
|
return null;
|
|
27301
27550
|
}
|
|
27302
|
-
const getDebugNodeR2 = getDebugNodeR2__POST_R3__;
|
|
27303
27551
|
function getAllDebugNodes() {
|
|
27304
27552
|
return Array.from(_nativeNodeToDebugNode.values());
|
|
27305
27553
|
}
|
|
@@ -27309,14 +27557,6 @@ function indexDebugNode(node) {
|
|
|
27309
27557
|
function removeDebugNodeFromIndex(node) {
|
|
27310
27558
|
_nativeNodeToDebugNode.delete(node.nativeNode);
|
|
27311
27559
|
}
|
|
27312
|
-
/**
|
|
27313
|
-
* @publicApi
|
|
27314
|
-
*/
|
|
27315
|
-
const DebugNode = DebugNode__POST_R3__;
|
|
27316
|
-
/**
|
|
27317
|
-
* @publicApi
|
|
27318
|
-
*/
|
|
27319
|
-
const DebugElement = DebugElement__POST_R3__;
|
|
27320
27560
|
|
|
27321
27561
|
/**
|
|
27322
27562
|
* @license
|
|
@@ -28444,96 +28684,10 @@ const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDER
|
|
|
28444
28684
|
* Use of this source code is governed by an MIT-style license that can be
|
|
28445
28685
|
* found in the LICENSE file at https://angular.io/license
|
|
28446
28686
|
*/
|
|
28447
|
-
function _iterableDiffersFactory() {
|
|
28448
|
-
return defaultIterableDiffers;
|
|
28449
|
-
}
|
|
28450
|
-
function _keyValueDiffersFactory() {
|
|
28451
|
-
return defaultKeyValueDiffers;
|
|
28452
|
-
}
|
|
28453
|
-
function _localeFactory(locale) {
|
|
28454
|
-
return locale || getGlobalLocale();
|
|
28455
|
-
}
|
|
28456
28687
|
/**
|
|
28457
|
-
* Work out the locale from the potential global properties.
|
|
28458
|
-
*
|
|
28459
|
-
* * Closure Compiler: use `goog.getLocale()`.
|
|
28460
|
-
* * Ivy enabled: use `$localize.locale`
|
|
28461
|
-
*/
|
|
28462
|
-
function getGlobalLocale() {
|
|
28463
|
-
if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
|
|
28464
|
-
typeof goog !== 'undefined' && goog.getLocale() !== 'en') {
|
|
28465
|
-
// * The default `goog.getLocale()` value is `en`, while Angular used `en-US`.
|
|
28466
|
-
// * In order to preserve backwards compatibility, we use Angular default value over
|
|
28467
|
-
// Closure Compiler's one.
|
|
28468
|
-
return goog.getLocale();
|
|
28469
|
-
}
|
|
28470
|
-
else {
|
|
28471
|
-
// KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
|
|
28472
|
-
// COMPILE-TIME INLINER.
|
|
28473
|
-
//
|
|
28474
|
-
// * During compile time inlining of translations the expression will be replaced
|
|
28475
|
-
// with a string literal that is the current locale. Other forms of this expression are not
|
|
28476
|
-
// guaranteed to be replaced.
|
|
28477
|
-
//
|
|
28478
|
-
// * During runtime translation evaluation, the developer is required to set `$localize.locale`
|
|
28479
|
-
// if required, or just to provide their own `LOCALE_ID` provider.
|
|
28480
|
-
return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
|
|
28481
|
-
}
|
|
28482
|
-
}
|
|
28483
|
-
/**
|
|
28484
|
-
* A built-in [dependency injection token](guide/glossary#di-token)
|
|
28485
|
-
* that is used to configure the root injector for bootstrapping.
|
|
28486
|
-
*/
|
|
28487
|
-
const APPLICATION_MODULE_PROVIDERS = [
|
|
28488
|
-
{
|
|
28489
|
-
provide: ApplicationRef,
|
|
28490
|
-
useClass: ApplicationRef,
|
|
28491
|
-
deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver$1, ApplicationInitStatus]
|
|
28492
|
-
},
|
|
28493
|
-
{ provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory },
|
|
28494
|
-
{
|
|
28495
|
-
provide: ApplicationInitStatus,
|
|
28496
|
-
useClass: ApplicationInitStatus,
|
|
28497
|
-
deps: [[new Optional(), APP_INITIALIZER]]
|
|
28498
|
-
},
|
|
28499
|
-
{ provide: Compiler, useClass: Compiler, deps: [] },
|
|
28500
|
-
APP_ID_RANDOM_PROVIDER,
|
|
28501
|
-
{ provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: [] },
|
|
28502
|
-
{ provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: [] },
|
|
28503
|
-
{
|
|
28504
|
-
provide: LOCALE_ID,
|
|
28505
|
-
useFactory: _localeFactory,
|
|
28506
|
-
deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]
|
|
28507
|
-
},
|
|
28508
|
-
{ provide: DEFAULT_CURRENCY_CODE, useValue: USD_CURRENCY_CODE },
|
|
28509
|
-
];
|
|
28510
|
-
/**
|
|
28511
|
-
* Schedule work at next available slot.
|
|
28512
|
-
*
|
|
28513
|
-
* In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped
|
|
28514
|
-
* using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.
|
|
28515
|
-
* This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.
|
|
28516
|
-
*
|
|
28517
|
-
* @param ngZone NgZone to use for scheduling.
|
|
28518
|
-
*/
|
|
28519
|
-
function zoneSchedulerFactory(ngZone) {
|
|
28520
|
-
let queue = [];
|
|
28521
|
-
ngZone.onStable.subscribe(() => {
|
|
28522
|
-
while (queue.length) {
|
|
28523
|
-
queue.pop()();
|
|
28524
|
-
}
|
|
28525
|
-
});
|
|
28526
|
-
return function (fn) {
|
|
28527
|
-
queue.push(fn);
|
|
28528
|
-
};
|
|
28529
|
-
}
|
|
28530
|
-
/**
|
|
28531
|
-
* Configures the root injector for an app with
|
|
28532
|
-
* providers of `@angular/core` dependencies that `ApplicationRef` needs
|
|
28533
|
-
* to bootstrap components.
|
|
28534
|
-
*
|
|
28535
28688
|
* Re-exported by `BrowserModule`, which is included automatically in the root
|
|
28536
|
-
* `AppModule` when you create a new app with the CLI `new` command.
|
|
28689
|
+
* `AppModule` when you create a new app with the CLI `new` command. Eagerly injects
|
|
28690
|
+
* `ApplicationRef` to instantiate it.
|
|
28537
28691
|
*
|
|
28538
28692
|
* @publicApi
|
|
28539
28693
|
*/
|
|
@@ -28543,12 +28697,23 @@ class ApplicationModule {
|
|
|
28543
28697
|
}
|
|
28544
28698
|
ApplicationModule.ɵfac = function ApplicationModule_Factory(t) { return new (t || ApplicationModule)(ɵɵinject(ApplicationRef)); };
|
|
28545
28699
|
ApplicationModule.ɵmod = /*@__PURE__*/ ɵɵdefineNgModule({ type: ApplicationModule });
|
|
28546
|
-
ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({
|
|
28700
|
+
ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({});
|
|
28547
28701
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
|
|
28548
|
-
type: NgModule
|
|
28549
|
-
args: [{ providers: APPLICATION_MODULE_PROVIDERS }]
|
|
28702
|
+
type: NgModule
|
|
28550
28703
|
}], function () { return [{ type: ApplicationRef }]; }, null); })();
|
|
28551
28704
|
|
|
28705
|
+
/**
|
|
28706
|
+
* @license
|
|
28707
|
+
* Copyright Google LLC All Rights Reserved.
|
|
28708
|
+
*
|
|
28709
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
28710
|
+
* found in the LICENSE file at https://angular.io/license
|
|
28711
|
+
*/
|
|
28712
|
+
/** Coerces a value (typically a string) to a boolean. */
|
|
28713
|
+
function coerceToBoolean(value) {
|
|
28714
|
+
return typeof value === 'boolean' ? value : (value != null && value !== 'false');
|
|
28715
|
+
}
|
|
28716
|
+
|
|
28552
28717
|
/**
|
|
28553
28718
|
* @license
|
|
28554
28719
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -28706,5 +28871,5 @@ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
|
28706
28871
|
* Generated bundle index. Do not edit.
|
|
28707
28872
|
*/
|
|
28708
28873
|
|
|
28709
|
-
export { ANALYZE_FOR_ENTRY_COMPONENTS, 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, 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, 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,
|
|
28874
|
+
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 };
|
|
28710
28875
|
//# sourceMappingURL=core.mjs.map
|