@angular/core 14.0.0-next.0 → 14.0.0-next.11
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 +202 -132
- 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/r3_injector.mjs +5 -15
- package/esm2020/src/di/reflective_injector.mjs +1 -1
- package/esm2020/src/di/reflective_provider.mjs +4 -4
- package/esm2020/src/errors.mjs +22 -5
- 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/metadata/directives.mjs +14 -5
- 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 +28 -7
- 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 +26 -12
- 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 +13 -2
- package/fesm2015/core.mjs +798 -604
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +15 -3
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +798 -597
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +15 -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/{router-link-empty-expression → path-match-type}/index.d.ts +2 -2
- package/schematics/migrations/path-match-type/index.js +95 -0
- package/schematics/migrations/path-match-type/transform.d.ts +19 -0
- package/schematics/migrations/path-match-type/transform.js +48 -0
- package/schematics/migrations/path-match-type/update_recorder.d.ts +18 -0
- package/schematics/migrations/path-match-type/update_recorder.js +20 -0
- package/schematics/migrations/path-match-type/util.d.ts +11 -0
- package/schematics/migrations/path-match-type/util.js +106 -0
- 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 -52
- package/schematics/migrations.json +11 -16
- 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/schematics/migrations/router-link-empty-expression/analyze_template.d.ts +0 -11
- package/schematics/migrations/router-link-empty-expression/analyze_template.js +0 -34
- package/schematics/migrations/router-link-empty-expression/angular/html_routerlink_empty_expr_visitor.d.ts +0 -20
- package/schematics/migrations/router-link-empty-expression/angular/html_routerlink_empty_expr_visitor.js +0 -47
- package/schematics/migrations/router-link-empty-expression/index.js +0 -170
- package/schematics/migrations/testbed-teardown/index.d.ts +0 -11
- package/schematics/migrations/testbed-teardown/index.js +0 -92
- package/schematics/migrations/testbed-teardown/util.d.ts +0 -35
- package/schematics/migrations/testbed-teardown/util.js +0 -188
package/fesm2015/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-next.
|
|
2
|
+
* @license Angular v14.0.0-next.11
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -152,20 +152,37 @@ const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';
|
|
|
152
152
|
* Use of this source code is governed by an MIT-style license that can be
|
|
153
153
|
* found in the LICENSE file at https://angular.io/license
|
|
154
154
|
*/
|
|
155
|
+
/**
|
|
156
|
+
* Class that represents a runtime error.
|
|
157
|
+
* Formats and outputs the error message in a consistent way.
|
|
158
|
+
*
|
|
159
|
+
* Example:
|
|
160
|
+
* ```
|
|
161
|
+
* throw new RuntimeError(
|
|
162
|
+
* RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,
|
|
163
|
+
* ngDevMode && 'Injector has already been destroyed.');
|
|
164
|
+
* ```
|
|
165
|
+
*
|
|
166
|
+
* Note: the `message` argument contains a descriptive error message as a string in development
|
|
167
|
+
* mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the
|
|
168
|
+
* `message` argument becomes `false`, thus we account for it in the typings and the runtime logic.
|
|
169
|
+
*/
|
|
155
170
|
class RuntimeError extends Error {
|
|
156
171
|
constructor(code, message) {
|
|
157
172
|
super(formatRuntimeError(code, message));
|
|
158
173
|
this.code = code;
|
|
159
174
|
}
|
|
160
175
|
}
|
|
161
|
-
/**
|
|
176
|
+
/**
|
|
177
|
+
* Called to format a runtime error.
|
|
178
|
+
* See additional info on the `message` argument type in the `RuntimeError` class description.
|
|
179
|
+
*/
|
|
162
180
|
function formatRuntimeError(code, message) {
|
|
163
|
-
const codeAsNumber = code;
|
|
164
181
|
// Error code might be a negative number, which is a special marker that instructs the logic to
|
|
165
182
|
// generate a link to the error details page on angular.io.
|
|
166
|
-
const fullCode = `NG0${Math.abs(
|
|
183
|
+
const fullCode = `NG0${Math.abs(code)}`;
|
|
167
184
|
let errorMessage = `${fullCode}${message ? ': ' + message : ''}`;
|
|
168
|
-
if (ngDevMode &&
|
|
185
|
+
if (ngDevMode && code < 0) {
|
|
169
186
|
errorMessage = `${errorMessage}. Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;
|
|
170
187
|
}
|
|
171
188
|
return errorMessage;
|
|
@@ -888,6 +905,7 @@ function ɵɵdefineComponent(componentDefinition) {
|
|
|
888
905
|
onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,
|
|
889
906
|
directiveDefs: null,
|
|
890
907
|
pipeDefs: null,
|
|
908
|
+
standalone: componentDefinition.standalone === true,
|
|
891
909
|
selectors: componentDefinition.selectors || EMPTY_ARRAY,
|
|
892
910
|
viewQuery: componentDefinition.viewQuery || null,
|
|
893
911
|
features: componentDefinition.features || null,
|
|
@@ -1099,6 +1117,7 @@ function ɵɵdefinePipe(pipeDef) {
|
|
|
1099
1117
|
name: pipeDef.name,
|
|
1100
1118
|
factory: null,
|
|
1101
1119
|
pure: pipeDef.pure !== false,
|
|
1120
|
+
standalone: pipeDef.standalone === true,
|
|
1102
1121
|
onDestroy: pipeDef.type.prototype.ngOnDestroy || null
|
|
1103
1122
|
};
|
|
1104
1123
|
}
|
|
@@ -1193,6 +1212,8 @@ const DECLARATION_COMPONENT_VIEW = 16;
|
|
|
1193
1212
|
const DECLARATION_LCONTAINER = 17;
|
|
1194
1213
|
const PREORDER_HOOK_FLAGS = 18;
|
|
1195
1214
|
const QUERIES = 19;
|
|
1215
|
+
const ID = 20;
|
|
1216
|
+
const EMBEDDED_VIEW_INJECTOR = 21;
|
|
1196
1217
|
/**
|
|
1197
1218
|
* Size of LView's header. Necessary to adjust for it when setting slots.
|
|
1198
1219
|
*
|
|
@@ -1200,7 +1221,7 @@ const QUERIES = 19;
|
|
|
1200
1221
|
* instruction index into `LView` index. All other indexes should be in the `LView` index space and
|
|
1201
1222
|
* there should be no need to refer to `HEADER_OFFSET` anywhere else.
|
|
1202
1223
|
*/
|
|
1203
|
-
const HEADER_OFFSET =
|
|
1224
|
+
const HEADER_OFFSET = 22;
|
|
1204
1225
|
/**
|
|
1205
1226
|
* Converts `TViewType` into human readable text.
|
|
1206
1227
|
* Make sure this matches with `TViewType`
|
|
@@ -1904,6 +1925,7 @@ function getLView() {
|
|
|
1904
1925
|
function getTView() {
|
|
1905
1926
|
return instructionState.lFrame.tView;
|
|
1906
1927
|
}
|
|
1928
|
+
// TODO(crisbeto): revert the @noinline once Closure issue is resolved.
|
|
1907
1929
|
/**
|
|
1908
1930
|
* Restores `contextViewData` to the given OpaqueViewState instance.
|
|
1909
1931
|
*
|
|
@@ -1915,11 +1937,22 @@ function getTView() {
|
|
|
1915
1937
|
* @returns Context of the restored OpaqueViewState instance.
|
|
1916
1938
|
*
|
|
1917
1939
|
* @codeGenApi
|
|
1940
|
+
* @noinline Disable inlining due to issue with Closure in listeners inside embedded views.
|
|
1918
1941
|
*/
|
|
1919
1942
|
function ɵɵrestoreView(viewToRestore) {
|
|
1920
1943
|
instructionState.lFrame.contextLView = viewToRestore;
|
|
1921
1944
|
return viewToRestore[CONTEXT];
|
|
1922
1945
|
}
|
|
1946
|
+
/**
|
|
1947
|
+
* Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in
|
|
1948
|
+
* value so that it can be used as a return value of an instruction.
|
|
1949
|
+
*
|
|
1950
|
+
* @codeGenApi
|
|
1951
|
+
*/
|
|
1952
|
+
function ɵɵresetView(value) {
|
|
1953
|
+
instructionState.lFrame.contextLView = null;
|
|
1954
|
+
return value;
|
|
1955
|
+
}
|
|
1923
1956
|
function getCurrentTNode() {
|
|
1924
1957
|
let currentTNode = getCurrentTNodePlaceholderOk();
|
|
1925
1958
|
while (currentTNode !== null && currentTNode.type === 64 /* Placeholder */) {
|
|
@@ -1951,7 +1984,9 @@ function setCurrentTNodeAsParent() {
|
|
|
1951
1984
|
instructionState.lFrame.isParent = true;
|
|
1952
1985
|
}
|
|
1953
1986
|
function getContextLView() {
|
|
1954
|
-
|
|
1987
|
+
const contextLView = instructionState.lFrame.contextLView;
|
|
1988
|
+
ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');
|
|
1989
|
+
return contextLView;
|
|
1955
1990
|
}
|
|
1956
1991
|
function isInCheckNoChangesMode() {
|
|
1957
1992
|
// TODO(misko): remove this from the LView since it is ngDevMode=true mode only.
|
|
@@ -2450,7 +2485,7 @@ function incrementInitPhaseFlags(lView, initPhase) {
|
|
|
2450
2485
|
assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');
|
|
2451
2486
|
let flags = lView[FLAGS];
|
|
2452
2487
|
if ((flags & 3 /* InitPhaseStateMask */) === initPhase) {
|
|
2453
|
-
flags &=
|
|
2488
|
+
flags &= 4095 /* IndexWithinInitPhaseReset */;
|
|
2454
2489
|
flags += 1 /* InitPhaseStateIncrementer */;
|
|
2455
2490
|
lView[FLAGS] = flags;
|
|
2456
2491
|
}
|
|
@@ -2514,12 +2549,12 @@ function callHook(currentView, initPhase, arr, i) {
|
|
|
2514
2549
|
const directiveIndex = isInitHook ? -arr[i] : arr[i];
|
|
2515
2550
|
const directive = currentView[directiveIndex];
|
|
2516
2551
|
if (isInitHook) {
|
|
2517
|
-
const indexWithintInitPhase = currentView[FLAGS] >>
|
|
2552
|
+
const indexWithintInitPhase = currentView[FLAGS] >> 12 /* IndexWithinInitPhaseShift */;
|
|
2518
2553
|
// The init phase state must be always checked here as it may have been recursively updated.
|
|
2519
2554
|
if (indexWithintInitPhase <
|
|
2520
2555
|
(currentView[PREORDER_HOOK_FLAGS] >> 16 /* NumberOfInitHooksCalledShift */) &&
|
|
2521
2556
|
(currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {
|
|
2522
|
-
currentView[FLAGS] +=
|
|
2557
|
+
currentView[FLAGS] += 4096 /* IndexWithinInitPhaseIncrementer */;
|
|
2523
2558
|
profiler(4 /* LifecycleHookStart */, directive, hook);
|
|
2524
2559
|
try {
|
|
2525
2560
|
hook.call(directive);
|
|
@@ -3080,6 +3115,8 @@ const BLOOM_MASK = BLOOM_SIZE - 1;
|
|
|
3080
3115
|
const BLOOM_BUCKET_BITS = 5;
|
|
3081
3116
|
/** Counter used to generate unique IDs for directives. */
|
|
3082
3117
|
let nextNgElementId = 0;
|
|
3118
|
+
/** Value used when something wasn't found by an injector. */
|
|
3119
|
+
const NOT_FOUND = {};
|
|
3083
3120
|
/**
|
|
3084
3121
|
* Registers this directive as present in its node's injector by flipping the directive's
|
|
3085
3122
|
* corresponding bit in the injector's bloom filter.
|
|
@@ -3191,23 +3228,7 @@ function getParentInjectorLocation(tNode, lView) {
|
|
|
3191
3228
|
// `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent
|
|
3192
3229
|
// `NodeInjector`.
|
|
3193
3230
|
while (lViewCursor !== null) {
|
|
3194
|
-
|
|
3195
|
-
const tView = lViewCursor[TVIEW];
|
|
3196
|
-
const tViewType = tView.type;
|
|
3197
|
-
if (tViewType === 2 /* Embedded */) {
|
|
3198
|
-
ngDevMode &&
|
|
3199
|
-
assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');
|
|
3200
|
-
parentTNode = tView.declTNode;
|
|
3201
|
-
}
|
|
3202
|
-
else if (tViewType === 1 /* Component */) {
|
|
3203
|
-
// Components don't have `TView.declTNode` because each instance of component could be
|
|
3204
|
-
// inserted in different location, hence `TView.declTNode` is meaningless.
|
|
3205
|
-
parentTNode = lViewCursor[T_HOST];
|
|
3206
|
-
}
|
|
3207
|
-
else {
|
|
3208
|
-
ngDevMode && assertEqual(tView.type, 0 /* Root */, 'Root type expected');
|
|
3209
|
-
parentTNode = null;
|
|
3210
|
-
}
|
|
3231
|
+
parentTNode = getTNodeFromLView(lViewCursor);
|
|
3211
3232
|
if (parentTNode === null) {
|
|
3212
3233
|
// If we have no parent, than we are done.
|
|
3213
3234
|
return NO_PARENT_INJECTOR;
|
|
@@ -3368,93 +3389,116 @@ function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {
|
|
|
3368
3389
|
*/
|
|
3369
3390
|
function getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) {
|
|
3370
3391
|
if (tNode !== null) {
|
|
3371
|
-
|
|
3372
|
-
//
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
if (
|
|
3376
|
-
|
|
3377
|
-
// flag, the module injector is not searched for that token in Ivy.
|
|
3378
|
-
return (flags & InjectFlags.Host) ?
|
|
3379
|
-
notFoundValueOrThrow(notFoundValue, token, flags) :
|
|
3380
|
-
lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
|
|
3392
|
+
// If the view or any of its ancestors have an embedded
|
|
3393
|
+
// view injector, we have to look it up there first.
|
|
3394
|
+
if (lView[FLAGS] & 2048 /* HasEmbeddedViewInjector */) {
|
|
3395
|
+
const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);
|
|
3396
|
+
if (embeddedInjectorValue !== NOT_FOUND) {
|
|
3397
|
+
return embeddedInjectorValue;
|
|
3381
3398
|
}
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3399
|
+
}
|
|
3400
|
+
// Otherwise try the node injector.
|
|
3401
|
+
const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);
|
|
3402
|
+
if (value !== NOT_FOUND) {
|
|
3403
|
+
return value;
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
// Finally, fall back to the module injector.
|
|
3407
|
+
return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
|
|
3408
|
+
}
|
|
3409
|
+
/**
|
|
3410
|
+
* Returns the value associated to the given token from the node injector.
|
|
3411
|
+
*
|
|
3412
|
+
* @param tNode The Node where the search for the injector should start
|
|
3413
|
+
* @param lView The `LView` that contains the `tNode`
|
|
3414
|
+
* @param token The token to look for
|
|
3415
|
+
* @param flags Injection flags
|
|
3416
|
+
* @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`
|
|
3417
|
+
* @returns the value from the injector, `null` when not found, or `notFoundValue` if provided
|
|
3418
|
+
*/
|
|
3419
|
+
function lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {
|
|
3420
|
+
const bloomHash = bloomHashBitOrFactory(token);
|
|
3421
|
+
// If the ID stored here is a function, this is a special object like ElementRef or TemplateRef
|
|
3422
|
+
// so just call the factory function to create it.
|
|
3423
|
+
if (typeof bloomHash === 'function') {
|
|
3424
|
+
if (!enterDI(lView, tNode, flags)) {
|
|
3425
|
+
// Failed to enter DI, try module injector instead. If a token is injected with the @Host
|
|
3426
|
+
// flag, the module injector is not searched for that token in Ivy.
|
|
3427
|
+
return (flags & InjectFlags.Host) ?
|
|
3428
|
+
notFoundValueOrThrow(notFoundValue, token, flags) :
|
|
3429
|
+
lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
|
|
3430
|
+
}
|
|
3431
|
+
try {
|
|
3432
|
+
const value = bloomHash(flags);
|
|
3433
|
+
if (value == null && !(flags & InjectFlags.Optional)) {
|
|
3434
|
+
throwProviderNotFoundError(token);
|
|
3390
3435
|
}
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
}
|
|
3394
|
-
}
|
|
3395
|
-
else if (typeof bloomHash === 'number') {
|
|
3396
|
-
// A reference to the previous injector TView that was found while climbing the element
|
|
3397
|
-
// injector tree. This is used to know if viewProviders can be accessed on the current
|
|
3398
|
-
// injector.
|
|
3399
|
-
let previousTView = null;
|
|
3400
|
-
let injectorIndex = getInjectorIndex(tNode, lView);
|
|
3401
|
-
let parentLocation = NO_PARENT_INJECTOR;
|
|
3402
|
-
let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;
|
|
3403
|
-
// If we should skip this injector, or if there is no injector on this node, start by
|
|
3404
|
-
// searching the parent injector.
|
|
3405
|
-
if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
|
|
3406
|
-
parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :
|
|
3407
|
-
lView[injectorIndex + 8 /* PARENT */];
|
|
3408
|
-
if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {
|
|
3409
|
-
injectorIndex = -1;
|
|
3410
|
-
}
|
|
3411
|
-
else {
|
|
3412
|
-
previousTView = lView[TVIEW];
|
|
3413
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
3414
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
3415
|
-
}
|
|
3436
|
+
else {
|
|
3437
|
+
return value;
|
|
3416
3438
|
}
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3439
|
+
}
|
|
3440
|
+
finally {
|
|
3441
|
+
leaveDI();
|
|
3442
|
+
}
|
|
3443
|
+
}
|
|
3444
|
+
else if (typeof bloomHash === 'number') {
|
|
3445
|
+
// A reference to the previous injector TView that was found while climbing the element
|
|
3446
|
+
// injector tree. This is used to know if viewProviders can be accessed on the current
|
|
3447
|
+
// injector.
|
|
3448
|
+
let previousTView = null;
|
|
3449
|
+
let injectorIndex = getInjectorIndex(tNode, lView);
|
|
3450
|
+
let parentLocation = NO_PARENT_INJECTOR;
|
|
3451
|
+
let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;
|
|
3452
|
+
// If we should skip this injector, or if there is no injector on this node, start by
|
|
3453
|
+
// searching the parent injector.
|
|
3454
|
+
if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {
|
|
3455
|
+
parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :
|
|
3456
|
+
lView[injectorIndex + 8 /* PARENT */];
|
|
3457
|
+
if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {
|
|
3458
|
+
injectorIndex = -1;
|
|
3459
|
+
}
|
|
3460
|
+
else {
|
|
3461
|
+
previousTView = lView[TVIEW];
|
|
3462
|
+
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
3463
|
+
lView = getParentInjectorView(parentLocation, lView);
|
|
3464
|
+
}
|
|
3465
|
+
}
|
|
3466
|
+
// Traverse up the injector tree until we find a potential match or until we know there
|
|
3467
|
+
// *isn't* a match.
|
|
3468
|
+
while (injectorIndex !== -1) {
|
|
3469
|
+
ngDevMode && assertNodeInjector(lView, injectorIndex);
|
|
3470
|
+
// Check the current injector. If it matches, see if it contains token.
|
|
3471
|
+
const tView = lView[TVIEW];
|
|
3472
|
+
ngDevMode &&
|
|
3473
|
+
assertTNodeForLView(tView.data[injectorIndex + 8 /* TNODE */], lView);
|
|
3474
|
+
if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {
|
|
3475
|
+
// At this point, we have an injector which *may* contain the token, so we step through
|
|
3476
|
+
// the providers and directives associated with the injector's corresponding node to get
|
|
3477
|
+
// the instance.
|
|
3478
|
+
const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);
|
|
3479
|
+
if (instance !== NOT_FOUND) {
|
|
3480
|
+
return instance;
|
|
3449
3481
|
}
|
|
3450
3482
|
}
|
|
3483
|
+
parentLocation = lView[injectorIndex + 8 /* PARENT */];
|
|
3484
|
+
if (parentLocation !== NO_PARENT_INJECTOR &&
|
|
3485
|
+
shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* TNODE */] === hostTElementNode) &&
|
|
3486
|
+
bloomHasToken(bloomHash, injectorIndex, lView)) {
|
|
3487
|
+
// The def wasn't found anywhere on this node, so it was a false positive.
|
|
3488
|
+
// Traverse up the tree and continue searching.
|
|
3489
|
+
previousTView = tView;
|
|
3490
|
+
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
3491
|
+
lView = getParentInjectorView(parentLocation, lView);
|
|
3492
|
+
}
|
|
3493
|
+
else {
|
|
3494
|
+
// If we should not search parent OR If the ancestor bloom filter value does not have the
|
|
3495
|
+
// bit corresponding to the directive we can give up on traversing up to find the specific
|
|
3496
|
+
// injector.
|
|
3497
|
+
injectorIndex = -1;
|
|
3498
|
+
}
|
|
3451
3499
|
}
|
|
3452
3500
|
}
|
|
3453
|
-
return
|
|
3454
|
-
}
|
|
3455
|
-
const NOT_FOUND = {};
|
|
3456
|
-
function createNodeInjector() {
|
|
3457
|
-
return new NodeInjector(getCurrentTNode(), getLView());
|
|
3501
|
+
return notFoundValue;
|
|
3458
3502
|
}
|
|
3459
3503
|
function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {
|
|
3460
3504
|
const currentTView = lView[TVIEW];
|
|
@@ -3628,6 +3672,10 @@ class NodeInjector {
|
|
|
3628
3672
|
return getOrCreateInjectable(this._tNode, this._lView, token, flags, notFoundValue);
|
|
3629
3673
|
}
|
|
3630
3674
|
}
|
|
3675
|
+
/** Creates a `NodeInjector` for the current node. */
|
|
3676
|
+
function createNodeInjector() {
|
|
3677
|
+
return new NodeInjector(getCurrentTNode(), getLView());
|
|
3678
|
+
}
|
|
3631
3679
|
/**
|
|
3632
3680
|
* @codeGenApi
|
|
3633
3681
|
*/
|
|
@@ -3666,6 +3714,73 @@ function getFactoryOf(type) {
|
|
|
3666
3714
|
}
|
|
3667
3715
|
return getFactoryDef(type);
|
|
3668
3716
|
}
|
|
3717
|
+
/**
|
|
3718
|
+
* Returns a value from the closest embedded or node injector.
|
|
3719
|
+
*
|
|
3720
|
+
* @param tNode The Node where the search for the injector should start
|
|
3721
|
+
* @param lView The `LView` that contains the `tNode`
|
|
3722
|
+
* @param token The token to look for
|
|
3723
|
+
* @param flags Injection flags
|
|
3724
|
+
* @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`
|
|
3725
|
+
* @returns the value from the injector, `null` when not found, or `notFoundValue` if provided
|
|
3726
|
+
*/
|
|
3727
|
+
function lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {
|
|
3728
|
+
let currentTNode = tNode;
|
|
3729
|
+
let currentLView = lView;
|
|
3730
|
+
// When an LView with an embedded view injector is inserted, it'll likely be interlaced with
|
|
3731
|
+
// nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).
|
|
3732
|
+
// Since the bloom filters for the node injectors have already been constructed and we don't
|
|
3733
|
+
// have a way of extracting the records from an injector, the only way to maintain the correct
|
|
3734
|
+
// hierarchy when resolving the value is to walk it node-by-node while attempting to resolve
|
|
3735
|
+
// the token at each level.
|
|
3736
|
+
while (currentTNode !== null && currentLView !== null &&
|
|
3737
|
+
(currentLView[FLAGS] & 2048 /* HasEmbeddedViewInjector */) &&
|
|
3738
|
+
!(currentLView[FLAGS] & 512 /* IsRoot */)) {
|
|
3739
|
+
ngDevMode && assertTNodeForLView(currentTNode, currentLView);
|
|
3740
|
+
// Note that this lookup on the node injector is using the `Self` flag, because
|
|
3741
|
+
// we don't want the node injector to look at any parent injectors since we
|
|
3742
|
+
// may hit the embedded view injector first.
|
|
3743
|
+
const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | InjectFlags.Self, NOT_FOUND);
|
|
3744
|
+
if (nodeInjectorValue !== NOT_FOUND) {
|
|
3745
|
+
return nodeInjectorValue;
|
|
3746
|
+
}
|
|
3747
|
+
// Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191
|
|
3748
|
+
let parentTNode = currentTNode.parent;
|
|
3749
|
+
// `TNode.parent` includes the parent within the current view only. If it doesn't exist,
|
|
3750
|
+
// it means that we've hit the view boundary and we need to go up to the next view.
|
|
3751
|
+
if (!parentTNode) {
|
|
3752
|
+
// Before we go to the next LView, check if the token exists on the current embedded injector.
|
|
3753
|
+
const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];
|
|
3754
|
+
if (embeddedViewInjector) {
|
|
3755
|
+
const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);
|
|
3756
|
+
if (embeddedViewInjectorValue !== NOT_FOUND) {
|
|
3757
|
+
return embeddedViewInjectorValue;
|
|
3758
|
+
}
|
|
3759
|
+
}
|
|
3760
|
+
// Otherwise keep going up the tree.
|
|
3761
|
+
parentTNode = getTNodeFromLView(currentLView);
|
|
3762
|
+
currentLView = currentLView[DECLARATION_VIEW];
|
|
3763
|
+
}
|
|
3764
|
+
currentTNode = parentTNode;
|
|
3765
|
+
}
|
|
3766
|
+
return notFoundValue;
|
|
3767
|
+
}
|
|
3768
|
+
/** Gets the TNode associated with an LView inside of the declaration view. */
|
|
3769
|
+
function getTNodeFromLView(lView) {
|
|
3770
|
+
const tView = lView[TVIEW];
|
|
3771
|
+
const tViewType = tView.type;
|
|
3772
|
+
// The parent pointer differs based on `TView.type`.
|
|
3773
|
+
if (tViewType === 2 /* Embedded */) {
|
|
3774
|
+
ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');
|
|
3775
|
+
return tView.declTNode;
|
|
3776
|
+
}
|
|
3777
|
+
else if (tViewType === 1 /* Component */) {
|
|
3778
|
+
// Components don't have `TView.declTNode` because each instance of component could be
|
|
3779
|
+
// inserted in different location, hence `TView.declTNode` is meaningless.
|
|
3780
|
+
return lView[T_HOST];
|
|
3781
|
+
}
|
|
3782
|
+
return null;
|
|
3783
|
+
}
|
|
3669
3784
|
|
|
3670
3785
|
/**
|
|
3671
3786
|
* @license
|
|
@@ -4475,9 +4590,6 @@ class ReflectionCapabilities {
|
|
|
4475
4590
|
constructor(reflect) {
|
|
4476
4591
|
this._reflect = reflect || _global['Reflect'];
|
|
4477
4592
|
}
|
|
4478
|
-
isReflectionEnabled() {
|
|
4479
|
-
return true;
|
|
4480
|
-
}
|
|
4481
4593
|
factory(t) {
|
|
4482
4594
|
return (...args) => new t(...args);
|
|
4483
4595
|
}
|
|
@@ -4649,38 +4761,6 @@ class ReflectionCapabilities {
|
|
|
4649
4761
|
hasLifecycleHook(type, lcProperty) {
|
|
4650
4762
|
return type instanceof Type && lcProperty in type.prototype;
|
|
4651
4763
|
}
|
|
4652
|
-
guards(type) {
|
|
4653
|
-
return {};
|
|
4654
|
-
}
|
|
4655
|
-
getter(name) {
|
|
4656
|
-
return new Function('o', 'return o.' + name + ';');
|
|
4657
|
-
}
|
|
4658
|
-
setter(name) {
|
|
4659
|
-
return new Function('o', 'v', 'return o.' + name + ' = v;');
|
|
4660
|
-
}
|
|
4661
|
-
method(name) {
|
|
4662
|
-
const functionBody = `if (!o.${name}) throw new Error('"${name}" is undefined');
|
|
4663
|
-
return o.${name}.apply(o, args);`;
|
|
4664
|
-
return new Function('o', 'args', functionBody);
|
|
4665
|
-
}
|
|
4666
|
-
// There is not a concept of import uri in Js, but this is useful in developing Dart applications.
|
|
4667
|
-
importUri(type) {
|
|
4668
|
-
// StaticSymbol
|
|
4669
|
-
if (typeof type === 'object' && type['filePath']) {
|
|
4670
|
-
return type['filePath'];
|
|
4671
|
-
}
|
|
4672
|
-
// Runtime type
|
|
4673
|
-
return `./${stringify(type)}`;
|
|
4674
|
-
}
|
|
4675
|
-
resourceUri(type) {
|
|
4676
|
-
return `./${stringify(type)}`;
|
|
4677
|
-
}
|
|
4678
|
-
resolveIdentifier(name, moduleUrl, members, runtime) {
|
|
4679
|
-
return runtime;
|
|
4680
|
-
}
|
|
4681
|
-
resolveEnum(enumIdentifier, name) {
|
|
4682
|
-
return enumIdentifier[name];
|
|
4683
|
-
}
|
|
4684
4764
|
}
|
|
4685
4765
|
function convertTsickleDecoratorIntoMetadata(decoratorInvocations) {
|
|
4686
4766
|
if (!decoratorInvocations) {
|
|
@@ -4868,7 +4948,7 @@ function catchInjectorError(e, token, injectorErrorName, source) {
|
|
|
4868
4948
|
throw e;
|
|
4869
4949
|
}
|
|
4870
4950
|
function formatError(text, obj, injectorErrorName, source = null) {
|
|
4871
|
-
text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.
|
|
4951
|
+
text = text && text.charAt(0) === '\n' && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text;
|
|
4872
4952
|
let context = stringify(obj);
|
|
4873
4953
|
if (Array.isArray(obj)) {
|
|
4874
4954
|
context = obj.map(stringify).join(' -> ');
|
|
@@ -5127,6 +5207,60 @@ function componentDefResolved(type) {
|
|
|
5127
5207
|
componentDefPendingResolution.delete(type);
|
|
5128
5208
|
}
|
|
5129
5209
|
|
|
5210
|
+
/**
|
|
5211
|
+
* @license
|
|
5212
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5213
|
+
*
|
|
5214
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
5215
|
+
* found in the LICENSE file at https://angular.io/license
|
|
5216
|
+
*/
|
|
5217
|
+
/**
|
|
5218
|
+
* Map of module-id to the corresponding NgModule.
|
|
5219
|
+
*/
|
|
5220
|
+
const modules = new Map();
|
|
5221
|
+
/**
|
|
5222
|
+
* Whether to check for duplicate NgModule registrations.
|
|
5223
|
+
*
|
|
5224
|
+
* This can be disabled for testing.
|
|
5225
|
+
*/
|
|
5226
|
+
let checkForDuplicateNgModules = true;
|
|
5227
|
+
function assertSameOrNotExisting(id, type, incoming) {
|
|
5228
|
+
if (type && type !== incoming && checkForDuplicateNgModules) {
|
|
5229
|
+
throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);
|
|
5230
|
+
}
|
|
5231
|
+
}
|
|
5232
|
+
/**
|
|
5233
|
+
* Adds the given NgModule type to Angular's NgModule registry.
|
|
5234
|
+
*
|
|
5235
|
+
* This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in
|
|
5236
|
+
* explicitly and not read from the NgModule definition. This is for two reasons: it avoids a
|
|
5237
|
+
* megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be
|
|
5238
|
+
* fully resolved when it's registered.
|
|
5239
|
+
*
|
|
5240
|
+
* @codeGenApi
|
|
5241
|
+
*/
|
|
5242
|
+
function registerNgModuleType(ngModuleType, id) {
|
|
5243
|
+
const existing = modules.get(id) || null;
|
|
5244
|
+
assertSameOrNotExisting(id, existing, ngModuleType);
|
|
5245
|
+
modules.set(id, ngModuleType);
|
|
5246
|
+
}
|
|
5247
|
+
function clearModulesForTest() {
|
|
5248
|
+
modules.clear();
|
|
5249
|
+
}
|
|
5250
|
+
function getRegisteredNgModuleType(id) {
|
|
5251
|
+
return modules.get(id);
|
|
5252
|
+
}
|
|
5253
|
+
/**
|
|
5254
|
+
* Control whether the NgModule registration system enforces that each NgModule type registered has
|
|
5255
|
+
* a unique id.
|
|
5256
|
+
*
|
|
5257
|
+
* This is useful for testing as the NgModule registry cannot be properly reset between tests with
|
|
5258
|
+
* Angular's current API.
|
|
5259
|
+
*/
|
|
5260
|
+
function setAllowDuplicateNgModuleIdsForTest(allowDuplicates) {
|
|
5261
|
+
checkForDuplicateNgModules = !allowDuplicates;
|
|
5262
|
+
}
|
|
5263
|
+
|
|
5130
5264
|
/**
|
|
5131
5265
|
* @license
|
|
5132
5266
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6138,6 +6272,78 @@ function getSanitizer() {
|
|
|
6138
6272
|
return lView && lView[SANITIZER];
|
|
6139
6273
|
}
|
|
6140
6274
|
|
|
6275
|
+
/**
|
|
6276
|
+
* @license
|
|
6277
|
+
* Copyright Google LLC All Rights Reserved.
|
|
6278
|
+
*
|
|
6279
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6280
|
+
* found in the LICENSE file at https://angular.io/license
|
|
6281
|
+
*/
|
|
6282
|
+
// Keeps track of the currently-active LViews.
|
|
6283
|
+
const TRACKED_LVIEWS = new Map();
|
|
6284
|
+
// Used for generating unique IDs for LViews.
|
|
6285
|
+
let uniqueIdCounter = 0;
|
|
6286
|
+
/** Gets a unique ID that can be assigned to an LView. */
|
|
6287
|
+
function getUniqueLViewId() {
|
|
6288
|
+
return uniqueIdCounter++;
|
|
6289
|
+
}
|
|
6290
|
+
/** Starts tracking an LView. */
|
|
6291
|
+
function registerLView(lView) {
|
|
6292
|
+
ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');
|
|
6293
|
+
TRACKED_LVIEWS.set(lView[ID], lView);
|
|
6294
|
+
}
|
|
6295
|
+
/** Gets an LView by its unique ID. */
|
|
6296
|
+
function getLViewById(id) {
|
|
6297
|
+
ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');
|
|
6298
|
+
return TRACKED_LVIEWS.get(id) || null;
|
|
6299
|
+
}
|
|
6300
|
+
/** Stops tracking an LView. */
|
|
6301
|
+
function unregisterLView(lView) {
|
|
6302
|
+
ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');
|
|
6303
|
+
TRACKED_LVIEWS.delete(lView[ID]);
|
|
6304
|
+
}
|
|
6305
|
+
|
|
6306
|
+
/**
|
|
6307
|
+
* @license
|
|
6308
|
+
* Copyright Google LLC All Rights Reserved.
|
|
6309
|
+
*
|
|
6310
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6311
|
+
* found in the LICENSE file at https://angular.io/license
|
|
6312
|
+
*/
|
|
6313
|
+
/**
|
|
6314
|
+
* The internal view context which is specific to a given DOM element, directive or
|
|
6315
|
+
* component instance. Each value in here (besides the LView and element node details)
|
|
6316
|
+
* can be present, null or undefined. If undefined then it implies the value has not been
|
|
6317
|
+
* looked up yet, otherwise, if null, then a lookup was executed and nothing was found.
|
|
6318
|
+
*
|
|
6319
|
+
* Each value will get filled when the respective value is examined within the getContext
|
|
6320
|
+
* function. The component, element and each directive instance will share the same instance
|
|
6321
|
+
* of the context.
|
|
6322
|
+
*/
|
|
6323
|
+
class LContext {
|
|
6324
|
+
constructor(
|
|
6325
|
+
/**
|
|
6326
|
+
* ID of the component's parent view data.
|
|
6327
|
+
*/
|
|
6328
|
+
lViewId,
|
|
6329
|
+
/**
|
|
6330
|
+
* The index instance of the node.
|
|
6331
|
+
*/
|
|
6332
|
+
nodeIndex,
|
|
6333
|
+
/**
|
|
6334
|
+
* The instance of the DOM node that is attached to the lNode.
|
|
6335
|
+
*/
|
|
6336
|
+
native) {
|
|
6337
|
+
this.lViewId = lViewId;
|
|
6338
|
+
this.nodeIndex = nodeIndex;
|
|
6339
|
+
this.native = native;
|
|
6340
|
+
}
|
|
6341
|
+
/** Component's parent view data. */
|
|
6342
|
+
get lView() {
|
|
6343
|
+
return getLViewById(this.lViewId);
|
|
6344
|
+
}
|
|
6345
|
+
}
|
|
6346
|
+
|
|
6141
6347
|
/**
|
|
6142
6348
|
* @license
|
|
6143
6349
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6170,7 +6376,7 @@ function getLContext(target) {
|
|
|
6170
6376
|
if (mpValue) {
|
|
6171
6377
|
// only when it's an array is it considered an LView instance
|
|
6172
6378
|
// ... otherwise it's an already constructed LContext instance
|
|
6173
|
-
if (
|
|
6379
|
+
if (isLView(mpValue)) {
|
|
6174
6380
|
const lView = mpValue;
|
|
6175
6381
|
let nodeIndex;
|
|
6176
6382
|
let component = undefined;
|
|
@@ -6229,13 +6435,7 @@ function getLContext(target) {
|
|
|
6229
6435
|
while (parent = parent.parentNode) {
|
|
6230
6436
|
const parentContext = readPatchedData(parent);
|
|
6231
6437
|
if (parentContext) {
|
|
6232
|
-
|
|
6233
|
-
if (Array.isArray(parentContext)) {
|
|
6234
|
-
lView = parentContext;
|
|
6235
|
-
}
|
|
6236
|
-
else {
|
|
6237
|
-
lView = parentContext.lView;
|
|
6238
|
-
}
|
|
6438
|
+
const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;
|
|
6239
6439
|
// the edge of the app was also reached here through another means
|
|
6240
6440
|
// (maybe because the DOM was changed manually).
|
|
6241
6441
|
if (!lView) {
|
|
@@ -6258,14 +6458,7 @@ function getLContext(target) {
|
|
|
6258
6458
|
* Creates an empty instance of a `LContext` context
|
|
6259
6459
|
*/
|
|
6260
6460
|
function createLContext(lView, nodeIndex, native) {
|
|
6261
|
-
return
|
|
6262
|
-
lView,
|
|
6263
|
-
nodeIndex,
|
|
6264
|
-
native,
|
|
6265
|
-
component: undefined,
|
|
6266
|
-
directives: undefined,
|
|
6267
|
-
localRefs: undefined,
|
|
6268
|
-
};
|
|
6461
|
+
return new LContext(lView[ID], nodeIndex, native);
|
|
6269
6462
|
}
|
|
6270
6463
|
/**
|
|
6271
6464
|
* Takes a component instance and returns the view for that component.
|
|
@@ -6274,21 +6467,24 @@ function createLContext(lView, nodeIndex, native) {
|
|
|
6274
6467
|
* @returns The component's view
|
|
6275
6468
|
*/
|
|
6276
6469
|
function getComponentViewByInstance(componentInstance) {
|
|
6277
|
-
let
|
|
6278
|
-
let
|
|
6279
|
-
if (
|
|
6280
|
-
const
|
|
6281
|
-
|
|
6282
|
-
|
|
6470
|
+
let patchedData = readPatchedData(componentInstance);
|
|
6471
|
+
let lView;
|
|
6472
|
+
if (isLView(patchedData)) {
|
|
6473
|
+
const contextLView = patchedData;
|
|
6474
|
+
const nodeIndex = findViaComponent(contextLView, componentInstance);
|
|
6475
|
+
lView = getComponentLViewByIndex(nodeIndex, contextLView);
|
|
6476
|
+
const context = createLContext(contextLView, nodeIndex, lView[HOST]);
|
|
6283
6477
|
context.component = componentInstance;
|
|
6284
6478
|
attachPatchData(componentInstance, context);
|
|
6285
6479
|
attachPatchData(context.native, context);
|
|
6286
6480
|
}
|
|
6287
6481
|
else {
|
|
6288
|
-
const context =
|
|
6289
|
-
|
|
6482
|
+
const context = patchedData;
|
|
6483
|
+
const contextLView = context.lView;
|
|
6484
|
+
ngDevMode && assertLView(contextLView);
|
|
6485
|
+
lView = getComponentLViewByIndex(context.nodeIndex, contextLView);
|
|
6290
6486
|
}
|
|
6291
|
-
return
|
|
6487
|
+
return lView;
|
|
6292
6488
|
}
|
|
6293
6489
|
/**
|
|
6294
6490
|
* This property will be monkey-patched on elements, components and directives.
|
|
@@ -6300,7 +6496,16 @@ const MONKEY_PATCH_KEY_NAME = '__ngContext__';
|
|
|
6300
6496
|
*/
|
|
6301
6497
|
function attachPatchData(target, data) {
|
|
6302
6498
|
ngDevMode && assertDefined(target, 'Target expected');
|
|
6303
|
-
|
|
6499
|
+
// Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this
|
|
6500
|
+
// for `LView`, because we have control over when an `LView` is created and destroyed, whereas
|
|
6501
|
+
// we can't know when to remove an `LContext`.
|
|
6502
|
+
if (isLView(data)) {
|
|
6503
|
+
target[MONKEY_PATCH_KEY_NAME] = data[ID];
|
|
6504
|
+
registerLView(data);
|
|
6505
|
+
}
|
|
6506
|
+
else {
|
|
6507
|
+
target[MONKEY_PATCH_KEY_NAME] = data;
|
|
6508
|
+
}
|
|
6304
6509
|
}
|
|
6305
6510
|
/**
|
|
6306
6511
|
* Returns the monkey-patch value data present on the target (which could be
|
|
@@ -6308,12 +6513,13 @@ function attachPatchData(target, data) {
|
|
|
6308
6513
|
*/
|
|
6309
6514
|
function readPatchedData(target) {
|
|
6310
6515
|
ngDevMode && assertDefined(target, 'Target expected');
|
|
6311
|
-
|
|
6516
|
+
const data = target[MONKEY_PATCH_KEY_NAME];
|
|
6517
|
+
return (typeof data === 'number') ? getLViewById(data) : data || null;
|
|
6312
6518
|
}
|
|
6313
6519
|
function readPatchedLView(target) {
|
|
6314
6520
|
const value = readPatchedData(target);
|
|
6315
6521
|
if (value) {
|
|
6316
|
-
return
|
|
6522
|
+
return isLView(value) ? value : value.lView;
|
|
6317
6523
|
}
|
|
6318
6524
|
return null;
|
|
6319
6525
|
}
|
|
@@ -7260,6 +7466,8 @@ function cleanUpView(tView, lView) {
|
|
|
7260
7466
|
lQueries.detachView(tView);
|
|
7261
7467
|
}
|
|
7262
7468
|
}
|
|
7469
|
+
// Unregister the view once everything else has been cleaned up.
|
|
7470
|
+
unregisterLView(lView);
|
|
7263
7471
|
}
|
|
7264
7472
|
}
|
|
7265
7473
|
/** Removes listeners and unsubscribes from output subscriptions */
|
|
@@ -7427,7 +7635,8 @@ function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {
|
|
|
7427
7635
|
renderer.insertBefore(parent, child, beforeNode, isMove);
|
|
7428
7636
|
}
|
|
7429
7637
|
else {
|
|
7430
|
-
parent.
|
|
7638
|
+
const targetParent = isTemplateNode(parent) ? parent.content : parent;
|
|
7639
|
+
targetParent.insertBefore(child, beforeNode, isMove);
|
|
7431
7640
|
}
|
|
7432
7641
|
}
|
|
7433
7642
|
function nativeAppendChild(renderer, parent, child) {
|
|
@@ -7437,7 +7646,8 @@ function nativeAppendChild(renderer, parent, child) {
|
|
|
7437
7646
|
renderer.appendChild(parent, child);
|
|
7438
7647
|
}
|
|
7439
7648
|
else {
|
|
7440
|
-
parent.
|
|
7649
|
+
const targetParent = isTemplateNode(parent) ? parent.content : parent;
|
|
7650
|
+
targetParent.appendChild(child);
|
|
7441
7651
|
}
|
|
7442
7652
|
}
|
|
7443
7653
|
function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {
|
|
@@ -7457,6 +7667,10 @@ function nativeRemoveChild(renderer, parent, child, isHostElement) {
|
|
|
7457
7667
|
parent.removeChild(child);
|
|
7458
7668
|
}
|
|
7459
7669
|
}
|
|
7670
|
+
/** Checks if an element is a `<template>` node. */
|
|
7671
|
+
function isTemplateNode(node) {
|
|
7672
|
+
return node.tagName === 'TEMPLATE' && node.content !== undefined;
|
|
7673
|
+
}
|
|
7460
7674
|
/**
|
|
7461
7675
|
* Returns a native parent of a given native node.
|
|
7462
7676
|
*/
|
|
@@ -8626,7 +8840,7 @@ function nameSuffix(text) {
|
|
|
8626
8840
|
if (text == null)
|
|
8627
8841
|
return '';
|
|
8628
8842
|
const index = text.lastIndexOf('_Template');
|
|
8629
|
-
return '_' + (index === -1 ? text : text.
|
|
8843
|
+
return '_' + (index === -1 ? text : text.slice(0, index));
|
|
8630
8844
|
}
|
|
8631
8845
|
/**
|
|
8632
8846
|
* This class is a debug version of Object literal so that we can have constructor name show up
|
|
@@ -8977,7 +9191,7 @@ class LViewDebug {
|
|
|
8977
9191
|
attached: !!(flags & 128 /* Attached */),
|
|
8978
9192
|
destroyed: !!(flags & 256 /* Destroyed */),
|
|
8979
9193
|
isRoot: !!(flags & 512 /* IsRoot */),
|
|
8980
|
-
indexWithinInitPhase: flags >>
|
|
9194
|
+
indexWithinInitPhase: flags >> 12 /* IndexWithinInitPhaseShift */,
|
|
8981
9195
|
};
|
|
8982
9196
|
}
|
|
8983
9197
|
get parent() {
|
|
@@ -9040,6 +9254,9 @@ class LViewDebug {
|
|
|
9040
9254
|
get tHost() {
|
|
9041
9255
|
return this._raw_lView[T_HOST];
|
|
9042
9256
|
}
|
|
9257
|
+
get id() {
|
|
9258
|
+
return this._raw_lView[ID];
|
|
9259
|
+
}
|
|
9043
9260
|
get decls() {
|
|
9044
9261
|
return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);
|
|
9045
9262
|
}
|
|
@@ -9269,10 +9486,14 @@ function renderChildComponents(hostLView, components) {
|
|
|
9269
9486
|
renderComponent$1(hostLView, components[i]);
|
|
9270
9487
|
}
|
|
9271
9488
|
}
|
|
9272
|
-
function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) {
|
|
9489
|
+
function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {
|
|
9273
9490
|
const lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice();
|
|
9274
9491
|
lView[HOST] = host;
|
|
9275
9492
|
lView[FLAGS] = flags | 4 /* CreationMode */ | 128 /* Attached */ | 8 /* FirstLViewPass */;
|
|
9493
|
+
if (embeddedViewInjector !== null ||
|
|
9494
|
+
(parentLView && (parentLView[FLAGS] & 2048 /* HasEmbeddedViewInjector */))) {
|
|
9495
|
+
lView[FLAGS] |= 2048 /* HasEmbeddedViewInjector */;
|
|
9496
|
+
}
|
|
9276
9497
|
resetPreOrderHookFlags(lView);
|
|
9277
9498
|
ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);
|
|
9278
9499
|
lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;
|
|
@@ -9284,6 +9505,8 @@ function createLView(parentLView, tView, context, flags, host, tHostNode, render
|
|
|
9284
9505
|
lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null;
|
|
9285
9506
|
lView[INJECTOR$1] = injector || parentLView && parentLView[INJECTOR$1] || null;
|
|
9286
9507
|
lView[T_HOST] = tHostNode;
|
|
9508
|
+
lView[ID] = getUniqueLViewId();
|
|
9509
|
+
lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector;
|
|
9287
9510
|
ngDevMode &&
|
|
9288
9511
|
assertEqual(tView.type == 2 /* Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
|
|
9289
9512
|
lView[DECLARATION_COMPONENT_VIEW] =
|
|
@@ -10035,7 +10258,7 @@ function elementPropertyInternal(tView, tNode, lView, propName, value, renderer,
|
|
|
10035
10258
|
else if (tNode.type & 12 /* AnyContainer */) {
|
|
10036
10259
|
// If the node is a container and the property didn't
|
|
10037
10260
|
// match any of the inputs or schemas we should throw.
|
|
10038
|
-
if (ngDevMode && !matchingSchemas(tView, tNode.value)) {
|
|
10261
|
+
if (ngDevMode && !matchingSchemas(tView.schemas, tNode.value)) {
|
|
10039
10262
|
logUnknownPropertyError(propName, tNode);
|
|
10040
10263
|
}
|
|
10041
10264
|
}
|
|
@@ -10097,15 +10320,20 @@ function validateProperty(tView, element, propName, tNode) {
|
|
|
10097
10320
|
return true;
|
|
10098
10321
|
// The property is considered valid if the element matches the schema, it exists on the element
|
|
10099
10322
|
// or it is synthetic, and we are in a browser context (web worker nodes should be skipped).
|
|
10100
|
-
if (matchingSchemas(tView, tNode.value) || propName in element ||
|
|
10323
|
+
if (matchingSchemas(tView.schemas, tNode.value) || propName in element ||
|
|
10324
|
+
isAnimationProp(propName)) {
|
|
10101
10325
|
return true;
|
|
10102
10326
|
}
|
|
10103
10327
|
// Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we
|
|
10104
10328
|
// need to account for both here, while being careful for `typeof null` also returning 'object'.
|
|
10105
10329
|
return typeof Node === 'undefined' || Node === null || !(element instanceof Node);
|
|
10106
10330
|
}
|
|
10107
|
-
|
|
10108
|
-
|
|
10331
|
+
/**
|
|
10332
|
+
* Returns true if the tag name is allowed by specified schemas.
|
|
10333
|
+
* @param schemas Array of schemas
|
|
10334
|
+
* @param tagName Name of the tag
|
|
10335
|
+
*/
|
|
10336
|
+
function matchingSchemas(schemas, tagName) {
|
|
10109
10337
|
if (schemas !== null) {
|
|
10110
10338
|
for (let i = 0; i < schemas.length; i++) {
|
|
10111
10339
|
const schema = schemas[i];
|
|
@@ -10292,7 +10520,6 @@ function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
|
10292
10520
|
function invokeDirectivesHostBindings(tView, lView, tNode) {
|
|
10293
10521
|
const start = tNode.directiveStart;
|
|
10294
10522
|
const end = tNode.directiveEnd;
|
|
10295
|
-
const firstCreatePass = tView.firstCreatePass;
|
|
10296
10523
|
const elementIndex = tNode.index;
|
|
10297
10524
|
const currentDirectiveIndex = getCurrentDirectiveIndex();
|
|
10298
10525
|
try {
|
|
@@ -10377,7 +10604,7 @@ function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
|
|
|
10377
10604
|
for (let i = 0; i < localRefs.length; i += 2) {
|
|
10378
10605
|
const index = exportsMap[localRefs[i + 1]];
|
|
10379
10606
|
if (index == null)
|
|
10380
|
-
throw new RuntimeError(-301 /* EXPORT_NOT_FOUND */, `Export of name '${localRefs[i + 1]}' not found!`);
|
|
10607
|
+
throw new RuntimeError(-301 /* EXPORT_NOT_FOUND */, ngDevMode && `Export of name '${localRefs[i + 1]}' not found!`);
|
|
10381
10608
|
localNames.push(localRefs[i], index);
|
|
10382
10609
|
}
|
|
10383
10610
|
}
|
|
@@ -10439,7 +10666,7 @@ function addComponentLogic(lView, hostTNode, def) {
|
|
|
10439
10666
|
// Only component views should be added to the view tree directly. Embedded views are
|
|
10440
10667
|
// accessed through their containers because they may be removed / re-added later.
|
|
10441
10668
|
const rendererFactory = lView[RENDERER_FACTORY];
|
|
10442
|
-
const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null));
|
|
10669
|
+
const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def), null, null, null));
|
|
10443
10670
|
// Component view will always be created before any injected LContainers,
|
|
10444
10671
|
// so this is a regular element, wrap it with the component view
|
|
10445
10672
|
lView[hostTNode.index] = componentView;
|
|
@@ -10808,8 +11035,11 @@ function tickRootContext(rootContext) {
|
|
|
10808
11035
|
for (let i = 0; i < rootContext.components.length; i++) {
|
|
10809
11036
|
const rootComponent = rootContext.components[i];
|
|
10810
11037
|
const lView = readPatchedLView(rootComponent);
|
|
10811
|
-
|
|
10812
|
-
|
|
11038
|
+
// We might not have an `LView` if the component was destroyed.
|
|
11039
|
+
if (lView !== null) {
|
|
11040
|
+
const tView = lView[TVIEW];
|
|
11041
|
+
renderComponentOrTemplate(tView, lView, tView.template, rootComponent);
|
|
11042
|
+
}
|
|
10813
11043
|
}
|
|
10814
11044
|
}
|
|
10815
11045
|
function detectChangesInternal(tView, lView, context) {
|
|
@@ -11303,10 +11533,7 @@ class R3Injector {
|
|
|
11303
11533
|
}
|
|
11304
11534
|
assertNotDestroyed() {
|
|
11305
11535
|
if (this._destroyed) {
|
|
11306
|
-
|
|
11307
|
-
'Injector has already been destroyed.' :
|
|
11308
|
-
'';
|
|
11309
|
-
throw new RuntimeError(205 /* INJECTOR_ALREADY_DESTROYED */, errorMessage);
|
|
11536
|
+
throw new RuntimeError(205 /* INJECTOR_ALREADY_DESTROYED */, ngDevMode && 'Injector has already been destroyed.');
|
|
11310
11537
|
}
|
|
11311
11538
|
}
|
|
11312
11539
|
/**
|
|
@@ -11470,28 +11697,21 @@ function injectableDefOrInjectorDefFactory(token) {
|
|
|
11470
11697
|
// InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.
|
|
11471
11698
|
// If it's missing that, it's an error.
|
|
11472
11699
|
if (token instanceof InjectionToken) {
|
|
11473
|
-
|
|
11474
|
-
`Token ${stringify(token)} is missing a ɵprov definition.` :
|
|
11475
|
-
'';
|
|
11476
|
-
throw new RuntimeError(204 /* INVALID_INJECTION_TOKEN */, errorMessage);
|
|
11700
|
+
throw new RuntimeError(204 /* INVALID_INJECTION_TOKEN */, ngDevMode && `Token ${stringify(token)} is missing a ɵprov definition.`);
|
|
11477
11701
|
}
|
|
11478
11702
|
// Undecorated types can sometimes be created if they have no constructor arguments.
|
|
11479
11703
|
if (token instanceof Function) {
|
|
11480
11704
|
return getUndecoratedInjectableFactory(token);
|
|
11481
11705
|
}
|
|
11482
11706
|
// There was no way to resolve a factory for this token.
|
|
11483
|
-
|
|
11484
|
-
throw new RuntimeError(204 /* INVALID_INJECTION_TOKEN */, errorMessage);
|
|
11707
|
+
throw new RuntimeError(204 /* INVALID_INJECTION_TOKEN */, ngDevMode && 'unreachable');
|
|
11485
11708
|
}
|
|
11486
11709
|
function getUndecoratedInjectableFactory(token) {
|
|
11487
11710
|
// If the token has parameters then it has dependencies that we cannot resolve implicitly.
|
|
11488
11711
|
const paramLength = token.length;
|
|
11489
11712
|
if (paramLength > 0) {
|
|
11490
11713
|
const args = newArray(paramLength, '?');
|
|
11491
|
-
|
|
11492
|
-
`Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).` :
|
|
11493
|
-
'';
|
|
11494
|
-
throw new RuntimeError(204 /* INVALID_INJECTION_TOKEN */, errorMessage);
|
|
11714
|
+
throw new RuntimeError(204 /* INVALID_INJECTION_TOKEN */, ngDevMode && `Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`);
|
|
11495
11715
|
}
|
|
11496
11716
|
// The constructor function appears to have no parameters.
|
|
11497
11717
|
// This might be because it inherits from a super-class. In which case, use an injectable
|
|
@@ -11678,12 +11898,16 @@ Injector.__NG_ELEMENT_ID__ = -1 /* Injector */;
|
|
|
11678
11898
|
* @globalApi ng
|
|
11679
11899
|
*/
|
|
11680
11900
|
function getComponent$1(element) {
|
|
11681
|
-
assertDomElement(element);
|
|
11901
|
+
ngDevMode && assertDomElement(element);
|
|
11682
11902
|
const context = getLContext(element);
|
|
11683
11903
|
if (context === null)
|
|
11684
11904
|
return null;
|
|
11685
11905
|
if (context.component === undefined) {
|
|
11686
|
-
|
|
11906
|
+
const lView = context.lView;
|
|
11907
|
+
if (lView === null) {
|
|
11908
|
+
return null;
|
|
11909
|
+
}
|
|
11910
|
+
context.component = getComponentAtNodeIndex(context.nodeIndex, lView);
|
|
11687
11911
|
}
|
|
11688
11912
|
return context.component;
|
|
11689
11913
|
}
|
|
@@ -11702,7 +11926,8 @@ function getComponent$1(element) {
|
|
|
11702
11926
|
function getContext(element) {
|
|
11703
11927
|
assertDomElement(element);
|
|
11704
11928
|
const context = getLContext(element);
|
|
11705
|
-
|
|
11929
|
+
const lView = context ? context.lView : null;
|
|
11930
|
+
return lView === null ? null : lView[CONTEXT];
|
|
11706
11931
|
}
|
|
11707
11932
|
/**
|
|
11708
11933
|
* Retrieves the component instance whose view contains the DOM element.
|
|
@@ -11721,11 +11946,10 @@ function getContext(element) {
|
|
|
11721
11946
|
*/
|
|
11722
11947
|
function getOwningComponent(elementOrDir) {
|
|
11723
11948
|
const context = getLContext(elementOrDir);
|
|
11724
|
-
|
|
11949
|
+
let lView = context ? context.lView : null;
|
|
11950
|
+
if (lView === null)
|
|
11725
11951
|
return null;
|
|
11726
|
-
let lView = context.lView;
|
|
11727
11952
|
let parent;
|
|
11728
|
-
ngDevMode && assertLView(lView);
|
|
11729
11953
|
while (lView[TVIEW].type === 2 /* Embedded */ && (parent = getLViewParent(lView))) {
|
|
11730
11954
|
lView = parent;
|
|
11731
11955
|
}
|
|
@@ -11743,7 +11967,8 @@ function getOwningComponent(elementOrDir) {
|
|
|
11743
11967
|
* @globalApi ng
|
|
11744
11968
|
*/
|
|
11745
11969
|
function getRootComponents(elementOrDir) {
|
|
11746
|
-
|
|
11970
|
+
const lView = readPatchedLView(elementOrDir);
|
|
11971
|
+
return lView !== null ? [...getRootContext(lView).components] : [];
|
|
11747
11972
|
}
|
|
11748
11973
|
/**
|
|
11749
11974
|
* Retrieves an `Injector` associated with an element, component or directive instance.
|
|
@@ -11757,10 +11982,11 @@ function getRootComponents(elementOrDir) {
|
|
|
11757
11982
|
*/
|
|
11758
11983
|
function getInjector(elementOrDir) {
|
|
11759
11984
|
const context = getLContext(elementOrDir);
|
|
11760
|
-
|
|
11985
|
+
const lView = context ? context.lView : null;
|
|
11986
|
+
if (lView === null)
|
|
11761
11987
|
return Injector.NULL;
|
|
11762
|
-
const tNode =
|
|
11763
|
-
return new NodeInjector(tNode,
|
|
11988
|
+
const tNode = lView[TVIEW].data[context.nodeIndex];
|
|
11989
|
+
return new NodeInjector(tNode, lView);
|
|
11764
11990
|
}
|
|
11765
11991
|
/**
|
|
11766
11992
|
* Retrieve a set of injection tokens at a given DOM node.
|
|
@@ -11769,9 +11995,9 @@ function getInjector(elementOrDir) {
|
|
|
11769
11995
|
*/
|
|
11770
11996
|
function getInjectionTokens(element) {
|
|
11771
11997
|
const context = getLContext(element);
|
|
11772
|
-
|
|
11998
|
+
const lView = context ? context.lView : null;
|
|
11999
|
+
if (lView === null)
|
|
11773
12000
|
return [];
|
|
11774
|
-
const lView = context.lView;
|
|
11775
12001
|
const tView = lView[TVIEW];
|
|
11776
12002
|
const tNode = tView.data[context.nodeIndex];
|
|
11777
12003
|
const providerTokens = [];
|
|
@@ -11821,10 +12047,10 @@ function getDirectives(node) {
|
|
|
11821
12047
|
return [];
|
|
11822
12048
|
}
|
|
11823
12049
|
const context = getLContext(node);
|
|
11824
|
-
|
|
12050
|
+
const lView = context ? context.lView : null;
|
|
12051
|
+
if (lView === null) {
|
|
11825
12052
|
return [];
|
|
11826
12053
|
}
|
|
11827
|
-
const lView = context.lView;
|
|
11828
12054
|
const tView = lView[TVIEW];
|
|
11829
12055
|
const nodeIndex = context.nodeIndex;
|
|
11830
12056
|
if (!(tView === null || tView === void 0 ? void 0 : tView.data[nodeIndex])) {
|
|
@@ -11884,7 +12110,11 @@ function getLocalRefs(target) {
|
|
|
11884
12110
|
if (context === null)
|
|
11885
12111
|
return {};
|
|
11886
12112
|
if (context.localRefs === undefined) {
|
|
11887
|
-
|
|
12113
|
+
const lView = context.lView;
|
|
12114
|
+
if (lView === null) {
|
|
12115
|
+
return {};
|
|
12116
|
+
}
|
|
12117
|
+
context.localRefs = discoverLocalRefs(lView, context.nodeIndex);
|
|
11888
12118
|
}
|
|
11889
12119
|
return context.localRefs || {};
|
|
11890
12120
|
}
|
|
@@ -11948,11 +12178,11 @@ function getRenderedText(component) {
|
|
|
11948
12178
|
* @globalApi ng
|
|
11949
12179
|
*/
|
|
11950
12180
|
function getListeners(element) {
|
|
11951
|
-
assertDomElement(element);
|
|
12181
|
+
ngDevMode && assertDomElement(element);
|
|
11952
12182
|
const lContext = getLContext(element);
|
|
11953
|
-
|
|
12183
|
+
const lView = lContext === null ? null : lContext.lView;
|
|
12184
|
+
if (lView === null)
|
|
11954
12185
|
return [];
|
|
11955
|
-
const lView = lContext.lView;
|
|
11956
12186
|
const tView = lView[TVIEW];
|
|
11957
12187
|
const lCleanup = lView[CLEANUP];
|
|
11958
12188
|
const tCleanup = tView.cleanup;
|
|
@@ -12003,10 +12233,10 @@ function getDebugNode$1(element) {
|
|
|
12003
12233
|
throw new Error('Expecting instance of DOM Element');
|
|
12004
12234
|
}
|
|
12005
12235
|
const lContext = getLContext(element);
|
|
12006
|
-
|
|
12236
|
+
const lView = lContext ? lContext.lView : null;
|
|
12237
|
+
if (lView === null) {
|
|
12007
12238
|
return null;
|
|
12008
12239
|
}
|
|
12009
|
-
const lView = lContext.lView;
|
|
12010
12240
|
const nodeIndex = lContext.nodeIndex;
|
|
12011
12241
|
if (nodeIndex !== -1) {
|
|
12012
12242
|
const valueInLView = lView[nodeIndex];
|
|
@@ -12031,6 +12261,7 @@ function getComponentLView(target) {
|
|
|
12031
12261
|
const lContext = getLContext(target);
|
|
12032
12262
|
const nodeIndx = lContext.nodeIndex;
|
|
12033
12263
|
const lView = lContext.lView;
|
|
12264
|
+
ngDevMode && assertLView(lView);
|
|
12034
12265
|
const componentLView = lView[nodeIndx];
|
|
12035
12266
|
ngDevMode && assertLView(componentLView);
|
|
12036
12267
|
return componentLView;
|
|
@@ -12178,7 +12409,7 @@ function renderComponent(componentType /* Type as workaround for: Microsoft/Type
|
|
|
12178
12409
|
const rootContext = createRootContext(opts.scheduler, opts.playerHandler);
|
|
12179
12410
|
const renderer = rendererFactory.createRenderer(hostRNode, componentDef);
|
|
12180
12411
|
const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);
|
|
12181
|
-
const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null);
|
|
12412
|
+
const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, null, opts.injector || null, null);
|
|
12182
12413
|
enterView(rootView);
|
|
12183
12414
|
let component;
|
|
12184
12415
|
try {
|
|
@@ -12233,7 +12464,7 @@ function createRootComponentView(rNode, def, rootView, rendererFactory, hostRend
|
|
|
12233
12464
|
}
|
|
12234
12465
|
}
|
|
12235
12466
|
const viewRenderer = rendererFactory.createRenderer(rNode, def);
|
|
12236
|
-
const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null);
|
|
12467
|
+
const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[index], tNode, rendererFactory, viewRenderer, sanitizer || null, null, null);
|
|
12237
12468
|
if (tView.firstCreatePass) {
|
|
12238
12469
|
diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);
|
|
12239
12470
|
markAsComponentHost(tView, tNode);
|
|
@@ -13778,75 +14009,6 @@ class KeyRegistry {
|
|
|
13778
14009
|
}
|
|
13779
14010
|
const _globalKeyRegistry = new KeyRegistry();
|
|
13780
14011
|
|
|
13781
|
-
/**
|
|
13782
|
-
* @license
|
|
13783
|
-
* Copyright Google LLC All Rights Reserved.
|
|
13784
|
-
*
|
|
13785
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
13786
|
-
* found in the LICENSE file at https://angular.io/license
|
|
13787
|
-
*/
|
|
13788
|
-
/**
|
|
13789
|
-
* Provides access to reflection data about symbols. Used internally by Angular
|
|
13790
|
-
* to power dependency injection and compilation.
|
|
13791
|
-
*/
|
|
13792
|
-
class Reflector {
|
|
13793
|
-
constructor(reflectionCapabilities) {
|
|
13794
|
-
this.reflectionCapabilities = reflectionCapabilities;
|
|
13795
|
-
}
|
|
13796
|
-
updateCapabilities(caps) {
|
|
13797
|
-
this.reflectionCapabilities = caps;
|
|
13798
|
-
}
|
|
13799
|
-
factory(type) {
|
|
13800
|
-
return this.reflectionCapabilities.factory(type);
|
|
13801
|
-
}
|
|
13802
|
-
parameters(typeOrFunc) {
|
|
13803
|
-
return this.reflectionCapabilities.parameters(typeOrFunc);
|
|
13804
|
-
}
|
|
13805
|
-
annotations(typeOrFunc) {
|
|
13806
|
-
return this.reflectionCapabilities.annotations(typeOrFunc);
|
|
13807
|
-
}
|
|
13808
|
-
propMetadata(typeOrFunc) {
|
|
13809
|
-
return this.reflectionCapabilities.propMetadata(typeOrFunc);
|
|
13810
|
-
}
|
|
13811
|
-
hasLifecycleHook(type, lcProperty) {
|
|
13812
|
-
return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);
|
|
13813
|
-
}
|
|
13814
|
-
getter(name) {
|
|
13815
|
-
return this.reflectionCapabilities.getter(name);
|
|
13816
|
-
}
|
|
13817
|
-
setter(name) {
|
|
13818
|
-
return this.reflectionCapabilities.setter(name);
|
|
13819
|
-
}
|
|
13820
|
-
method(name) {
|
|
13821
|
-
return this.reflectionCapabilities.method(name);
|
|
13822
|
-
}
|
|
13823
|
-
importUri(type) {
|
|
13824
|
-
return this.reflectionCapabilities.importUri(type);
|
|
13825
|
-
}
|
|
13826
|
-
resourceUri(type) {
|
|
13827
|
-
return this.reflectionCapabilities.resourceUri(type);
|
|
13828
|
-
}
|
|
13829
|
-
resolveIdentifier(name, moduleUrl, members, runtime) {
|
|
13830
|
-
return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);
|
|
13831
|
-
}
|
|
13832
|
-
resolveEnum(identifier, name) {
|
|
13833
|
-
return this.reflectionCapabilities.resolveEnum(identifier, name);
|
|
13834
|
-
}
|
|
13835
|
-
}
|
|
13836
|
-
|
|
13837
|
-
/**
|
|
13838
|
-
* @license
|
|
13839
|
-
* Copyright Google LLC All Rights Reserved.
|
|
13840
|
-
*
|
|
13841
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
13842
|
-
* found in the LICENSE file at https://angular.io/license
|
|
13843
|
-
*/
|
|
13844
|
-
/**
|
|
13845
|
-
* The {@link Reflector} used internally in Angular to access metadata
|
|
13846
|
-
* about symbols.
|
|
13847
|
-
*/
|
|
13848
|
-
const reflector = new Reflector(new ReflectionCapabilities());
|
|
13849
|
-
|
|
13850
14012
|
/**
|
|
13851
14013
|
* @license
|
|
13852
14014
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -13903,7 +14065,7 @@ function resolveReflectiveFactory(provider) {
|
|
|
13903
14065
|
let resolvedDeps;
|
|
13904
14066
|
if (provider.useClass) {
|
|
13905
14067
|
const useClass = resolveForwardRef(provider.useClass);
|
|
13906
|
-
factoryFn =
|
|
14068
|
+
factoryFn = getReflect().factory(useClass);
|
|
13907
14069
|
resolvedDeps = _dependenciesFor(useClass);
|
|
13908
14070
|
}
|
|
13909
14071
|
else if (provider.useExisting) {
|
|
@@ -13999,7 +14161,7 @@ function constructDependencies(typeOrFunc, dependencies) {
|
|
|
13999
14161
|
}
|
|
14000
14162
|
}
|
|
14001
14163
|
function _dependenciesFor(typeOrFunc) {
|
|
14002
|
-
const params =
|
|
14164
|
+
const params = getReflect().parameters(typeOrFunc);
|
|
14003
14165
|
if (!params)
|
|
14004
14166
|
return [];
|
|
14005
14167
|
if (params.some(p => p == null)) {
|
|
@@ -14466,7 +14628,7 @@ function elementStartFirstCreatePass(index, tView, lView, native, name, attrsInd
|
|
|
14466
14628
|
const attrs = getConstant(tViewConsts, attrsIndex);
|
|
14467
14629
|
const tNode = getOrCreateTNode(tView, index, 2 /* Element */, name, attrs);
|
|
14468
14630
|
const hasDirectives = resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));
|
|
14469
|
-
ngDevMode &&
|
|
14631
|
+
ngDevMode && validateElementIsKnown(native, tNode.value, tView.schemas, hasDirectives);
|
|
14470
14632
|
if (tNode.attrs !== null) {
|
|
14471
14633
|
computeStaticStyling(tNode, tNode.attrs, false);
|
|
14472
14634
|
}
|
|
@@ -14485,6 +14647,7 @@ function elementStartFirstCreatePass(index, tView, lView, native, name, attrsInd
|
|
|
14485
14647
|
* @param name Name of the DOM Node
|
|
14486
14648
|
* @param attrsIndex Index of the element's attributes in the `consts` array.
|
|
14487
14649
|
* @param localRefsIndex Index of the element's local references in the `consts` array.
|
|
14650
|
+
* @returns This function returns itself so that it may be chained.
|
|
14488
14651
|
*
|
|
14489
14652
|
* Attributes and localRefs are passed as an array of strings where elements with an even index
|
|
14490
14653
|
* hold an attribute name and elements with an odd index hold an attribute value, ex.:
|
|
@@ -14536,9 +14699,11 @@ function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {
|
|
|
14536
14699
|
if (localRefsIndex !== null) {
|
|
14537
14700
|
saveResolvedLocalsInData(lView, tNode);
|
|
14538
14701
|
}
|
|
14702
|
+
return ɵɵelementStart;
|
|
14539
14703
|
}
|
|
14540
14704
|
/**
|
|
14541
14705
|
* Mark the end of the element.
|
|
14706
|
+
* @returns This function returns itself so that it may be chained.
|
|
14542
14707
|
*
|
|
14543
14708
|
* @codeGenApi
|
|
14544
14709
|
*/
|
|
@@ -14569,6 +14734,7 @@ function ɵɵelementEnd() {
|
|
|
14569
14734
|
if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {
|
|
14570
14735
|
setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);
|
|
14571
14736
|
}
|
|
14737
|
+
return ɵɵelementEnd;
|
|
14572
14738
|
}
|
|
14573
14739
|
/**
|
|
14574
14740
|
* Creates an empty element using {@link elementStart} and {@link elementEnd}
|
|
@@ -14577,25 +14743,42 @@ function ɵɵelementEnd() {
|
|
|
14577
14743
|
* @param name Name of the DOM Node
|
|
14578
14744
|
* @param attrsIndex Index of the element's attributes in the `consts` array.
|
|
14579
14745
|
* @param localRefsIndex Index of the element's local references in the `consts` array.
|
|
14746
|
+
* @returns This function returns itself so that it may be chained.
|
|
14580
14747
|
*
|
|
14581
14748
|
* @codeGenApi
|
|
14582
14749
|
*/
|
|
14583
14750
|
function ɵɵelement(index, name, attrsIndex, localRefsIndex) {
|
|
14584
14751
|
ɵɵelementStart(index, name, attrsIndex, localRefsIndex);
|
|
14585
14752
|
ɵɵelementEnd();
|
|
14753
|
+
return ɵɵelement;
|
|
14586
14754
|
}
|
|
14587
|
-
|
|
14588
|
-
|
|
14755
|
+
/**
|
|
14756
|
+
* Validates that the element is known at runtime and produces
|
|
14757
|
+
* an error if it's not the case.
|
|
14758
|
+
* This check is relevant for JIT-compiled components (for AOT-compiled
|
|
14759
|
+
* ones this check happens at build time).
|
|
14760
|
+
*
|
|
14761
|
+
* The element is considered known if either:
|
|
14762
|
+
* - it's a known HTML element
|
|
14763
|
+
* - it's a known custom element
|
|
14764
|
+
* - the element matches any directive
|
|
14765
|
+
* - the element is allowed by one of the schemas
|
|
14766
|
+
*
|
|
14767
|
+
* @param element Element to validate
|
|
14768
|
+
* @param tagName Name of the tag to check
|
|
14769
|
+
* @param schemas Array of schemas
|
|
14770
|
+
* @param hasDirectives Boolean indicating that the element matches any directive
|
|
14771
|
+
*/
|
|
14772
|
+
function validateElementIsKnown(element, tagName, schemas, hasDirectives) {
|
|
14589
14773
|
// If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT
|
|
14590
14774
|
// mode where this check happens at compile time. In JIT mode, `schemas` is always present and
|
|
14591
14775
|
// defined as an array (as an empty array in case `schemas` field is not defined) and we should
|
|
14592
14776
|
// execute the check below.
|
|
14593
14777
|
if (schemas === null)
|
|
14594
14778
|
return;
|
|
14595
|
-
const tagName = tNode.value;
|
|
14596
14779
|
// If the element matches any directive, it's considered as valid.
|
|
14597
14780
|
if (!hasDirectives && tagName !== null) {
|
|
14598
|
-
// The element is unknown if it's an instance of HTMLUnknownElement or it isn't registered
|
|
14781
|
+
// The element is unknown if it's an instance of HTMLUnknownElement, or it isn't registered
|
|
14599
14782
|
// as a custom element. Note that unknown elements with a dash in their name won't be instances
|
|
14600
14783
|
// of HTMLUnknownElement in browsers that support web components.
|
|
14601
14784
|
const isUnknown =
|
|
@@ -14605,7 +14788,7 @@ function logUnknownElementError(tView, element, tNode, hasDirectives) {
|
|
|
14605
14788
|
element instanceof HTMLUnknownElement) ||
|
|
14606
14789
|
(typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 &&
|
|
14607
14790
|
!customElements.get(tagName));
|
|
14608
|
-
if (isUnknown && !matchingSchemas(
|
|
14791
|
+
if (isUnknown && !matchingSchemas(schemas, tagName)) {
|
|
14609
14792
|
let message = `'${tagName}' is not a known element:\n`;
|
|
14610
14793
|
message += `1. If '${tagName}' is an Angular component, then verify that it is part of this module.\n`;
|
|
14611
14794
|
if (tagName && tagName.indexOf('-') > -1) {
|
|
@@ -14651,6 +14834,7 @@ function elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, l
|
|
|
14651
14834
|
* @param index Index of the element in the LView array
|
|
14652
14835
|
* @param attrsIndex Index of the container attributes in the `consts` array.
|
|
14653
14836
|
* @param localRefsIndex Index of the container's local references in the `consts` array.
|
|
14837
|
+
* @returns This function returns itself so that it may be chained.
|
|
14654
14838
|
*
|
|
14655
14839
|
* Even if this instruction accepts a set of attributes no actual attribute values are propagated to
|
|
14656
14840
|
* the DOM (as a comment node can't have attributes). Attributes are here only for directive
|
|
@@ -14681,9 +14865,11 @@ function ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {
|
|
|
14681
14865
|
if (localRefsIndex != null) {
|
|
14682
14866
|
saveResolvedLocalsInData(lView, tNode);
|
|
14683
14867
|
}
|
|
14868
|
+
return ɵɵelementContainerStart;
|
|
14684
14869
|
}
|
|
14685
14870
|
/**
|
|
14686
14871
|
* Mark the end of the <ng-container>.
|
|
14872
|
+
* @returns This function returns itself so that it may be chained.
|
|
14687
14873
|
*
|
|
14688
14874
|
* @codeGenApi
|
|
14689
14875
|
*/
|
|
@@ -14705,6 +14891,7 @@ function ɵɵelementContainerEnd() {
|
|
|
14705
14891
|
tView.queries.elementEnd(currentTNode);
|
|
14706
14892
|
}
|
|
14707
14893
|
}
|
|
14894
|
+
return ɵɵelementContainerEnd;
|
|
14708
14895
|
}
|
|
14709
14896
|
/**
|
|
14710
14897
|
* Creates an empty logical container using {@link elementContainerStart}
|
|
@@ -14713,12 +14900,14 @@ function ɵɵelementContainerEnd() {
|
|
|
14713
14900
|
* @param index Index of the element in the LView array
|
|
14714
14901
|
* @param attrsIndex Index of the container attributes in the `consts` array.
|
|
14715
14902
|
* @param localRefsIndex Index of the container's local references in the `consts` array.
|
|
14903
|
+
* @returns This function returns itself so that it may be chained.
|
|
14716
14904
|
*
|
|
14717
14905
|
* @codeGenApi
|
|
14718
14906
|
*/
|
|
14719
14907
|
function ɵɵelementContainer(index, attrsIndex, localRefsIndex) {
|
|
14720
14908
|
ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);
|
|
14721
14909
|
ɵɵelementContainerEnd();
|
|
14910
|
+
return ɵɵelementContainer;
|
|
14722
14911
|
}
|
|
14723
14912
|
|
|
14724
14913
|
/**
|
|
@@ -16287,7 +16476,7 @@ function consumeQuotedText(text, quoteCharCode, startIndex, endIndex) {
|
|
|
16287
16476
|
function malformedStyleError(text, expecting, index) {
|
|
16288
16477
|
ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');
|
|
16289
16478
|
throw throwError(`Malformed style at location ${index} in string '` + text.substring(0, index) + '[>>' +
|
|
16290
|
-
text.substring(index, index + 1) + '<<]' + text.
|
|
16479
|
+
text.substring(index, index + 1) + '<<]' + text.slice(index + 1) +
|
|
16291
16480
|
`'. Expecting '${expecting}'.`);
|
|
16292
16481
|
}
|
|
16293
16482
|
|
|
@@ -19972,7 +20161,7 @@ function removeInnerTemplateTranslation(message) {
|
|
|
19972
20161
|
}
|
|
19973
20162
|
ngDevMode &&
|
|
19974
20163
|
assertEqual(inTemplate, false, `Tag mismatch: unable to find the end of the sub-template in the translation "${message}"`);
|
|
19975
|
-
res += message.
|
|
20164
|
+
res += message.slice(index);
|
|
19976
20165
|
return res;
|
|
19977
20166
|
}
|
|
19978
20167
|
/**
|
|
@@ -20064,7 +20253,7 @@ function parseICUBlock(pattern) {
|
|
|
20064
20253
|
else {
|
|
20065
20254
|
icuType = 1 /* plural */;
|
|
20066
20255
|
}
|
|
20067
|
-
mainBinding = parseInt(binding.
|
|
20256
|
+
mainBinding = parseInt(binding.slice(1), 10);
|
|
20068
20257
|
return '';
|
|
20069
20258
|
});
|
|
20070
20259
|
const parts = i18nParseTextIntoPartsAndICU(pattern);
|
|
@@ -21069,7 +21258,7 @@ class Version {
|
|
|
21069
21258
|
/**
|
|
21070
21259
|
* @publicApi
|
|
21071
21260
|
*/
|
|
21072
|
-
const VERSION = new Version('14.0.0-next.
|
|
21261
|
+
const VERSION = new Version('14.0.0-next.11');
|
|
21073
21262
|
|
|
21074
21263
|
/**
|
|
21075
21264
|
* @license
|
|
@@ -21475,29 +21664,27 @@ function getNamespace(elementName) {
|
|
|
21475
21664
|
return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);
|
|
21476
21665
|
}
|
|
21477
21666
|
/**
|
|
21478
|
-
*
|
|
21479
|
-
*
|
|
21667
|
+
* Injector that looks up a value using a specific injector, before falling back to the module
|
|
21668
|
+
* injector. Used primarily when creating components or embedded views dynamically.
|
|
21480
21669
|
*/
|
|
21481
|
-
|
|
21482
|
-
|
|
21483
|
-
|
|
21484
|
-
|
|
21485
|
-
|
|
21486
|
-
|
|
21487
|
-
get
|
|
21488
|
-
|
|
21489
|
-
|
|
21490
|
-
|
|
21491
|
-
|
|
21492
|
-
|
|
21493
|
-
|
|
21494
|
-
|
|
21495
|
-
|
|
21496
|
-
return value;
|
|
21497
|
-
}
|
|
21498
|
-
return moduleInjector.get(token, notFoundValue, flags);
|
|
21670
|
+
class ChainedInjector {
|
|
21671
|
+
constructor(injector, parentInjector) {
|
|
21672
|
+
this.injector = injector;
|
|
21673
|
+
this.parentInjector = parentInjector;
|
|
21674
|
+
}
|
|
21675
|
+
get(token, notFoundValue, flags) {
|
|
21676
|
+
const value = this.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);
|
|
21677
|
+
if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||
|
|
21678
|
+
notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
|
|
21679
|
+
// Return the value from the root element injector when
|
|
21680
|
+
// - it provides it
|
|
21681
|
+
// (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
|
|
21682
|
+
// - the module injector should not be checked
|
|
21683
|
+
// (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)
|
|
21684
|
+
return value;
|
|
21499
21685
|
}
|
|
21500
|
-
|
|
21686
|
+
return this.parentInjector.get(token, notFoundValue, flags);
|
|
21687
|
+
}
|
|
21501
21688
|
}
|
|
21502
21689
|
/**
|
|
21503
21690
|
* Render3 implementation of {@link viewEngine_ComponentFactory}.
|
|
@@ -21525,7 +21712,7 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
21525
21712
|
}
|
|
21526
21713
|
create(injector, projectableNodes, rootSelectorOrNode, ngModule) {
|
|
21527
21714
|
ngModule = ngModule || this.ngModule;
|
|
21528
|
-
const rootViewInjector = ngModule ?
|
|
21715
|
+
const rootViewInjector = ngModule ? new ChainedInjector(injector, ngModule.injector) : injector;
|
|
21529
21716
|
const rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);
|
|
21530
21717
|
const sanitizer = rootViewInjector.get(Sanitizer, null);
|
|
21531
21718
|
const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);
|
|
@@ -21540,7 +21727,7 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
21540
21727
|
const rootContext = createRootContext();
|
|
21541
21728
|
// Create the root view. Uses empty TView and ContentTemplate.
|
|
21542
21729
|
const rootTView = createTView(0 /* Root */, null, null, 1, 0, null, null, null, null, null);
|
|
21543
|
-
const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector);
|
|
21730
|
+
const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector, null);
|
|
21544
21731
|
// rootView is the parent when bootstrapping
|
|
21545
21732
|
// TODO(misko): it looks like we are entering view here but we don't really need to as
|
|
21546
21733
|
// `renderView` does that. However as the code is written it is needed because
|
|
@@ -21710,62 +21897,6 @@ class NgModuleRef$1 {
|
|
|
21710
21897
|
class NgModuleFactory$1 {
|
|
21711
21898
|
}
|
|
21712
21899
|
|
|
21713
|
-
/**
|
|
21714
|
-
* @license
|
|
21715
|
-
* Copyright Google LLC All Rights Reserved.
|
|
21716
|
-
*
|
|
21717
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
21718
|
-
* found in the LICENSE file at https://angular.io/license
|
|
21719
|
-
*/
|
|
21720
|
-
/**
|
|
21721
|
-
* Map of module-id to the corresponding NgModule.
|
|
21722
|
-
* - In pre Ivy we track NgModuleFactory,
|
|
21723
|
-
* - In post Ivy we track the NgModuleType
|
|
21724
|
-
*/
|
|
21725
|
-
const modules = new Map();
|
|
21726
|
-
/**
|
|
21727
|
-
* Registers a loaded module. Should only be called from generated NgModuleFactory code.
|
|
21728
|
-
* @publicApi
|
|
21729
|
-
*/
|
|
21730
|
-
function registerModuleFactory(id, factory) {
|
|
21731
|
-
const existing = modules.get(id);
|
|
21732
|
-
assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);
|
|
21733
|
-
modules.set(id, factory);
|
|
21734
|
-
}
|
|
21735
|
-
function assertSameOrNotExisting(id, type, incoming) {
|
|
21736
|
-
if (type && type !== incoming) {
|
|
21737
|
-
throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);
|
|
21738
|
-
}
|
|
21739
|
-
}
|
|
21740
|
-
function registerNgModuleType(ngModuleType) {
|
|
21741
|
-
const visited = new Set();
|
|
21742
|
-
recurse(ngModuleType);
|
|
21743
|
-
function recurse(ngModuleType) {
|
|
21744
|
-
// The imports array of an NgModule must refer to other NgModules,
|
|
21745
|
-
// so an error is thrown if no module definition is available.
|
|
21746
|
-
const def = getNgModuleDef(ngModuleType, /* throwNotFound */ true);
|
|
21747
|
-
const id = def.id;
|
|
21748
|
-
if (id !== null) {
|
|
21749
|
-
const existing = modules.get(id);
|
|
21750
|
-
assertSameOrNotExisting(id, existing, ngModuleType);
|
|
21751
|
-
modules.set(id, ngModuleType);
|
|
21752
|
-
}
|
|
21753
|
-
const imports = maybeUnwrapFn(def.imports);
|
|
21754
|
-
for (const i of imports) {
|
|
21755
|
-
if (!visited.has(i)) {
|
|
21756
|
-
visited.add(i);
|
|
21757
|
-
recurse(i);
|
|
21758
|
-
}
|
|
21759
|
-
}
|
|
21760
|
-
}
|
|
21761
|
-
}
|
|
21762
|
-
function clearModulesForTest() {
|
|
21763
|
-
modules.clear();
|
|
21764
|
-
}
|
|
21765
|
-
function getRegisteredNgModuleType(id) {
|
|
21766
|
-
return (modules.get(id) || autoRegisterModuleById[id]);
|
|
21767
|
-
}
|
|
21768
|
-
|
|
21769
21900
|
/**
|
|
21770
21901
|
* @license
|
|
21771
21902
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -21836,33 +21967,6 @@ class NgModuleFactory extends NgModuleFactory$1 {
|
|
|
21836
21967
|
constructor(moduleType) {
|
|
21837
21968
|
super();
|
|
21838
21969
|
this.moduleType = moduleType;
|
|
21839
|
-
const ngModuleDef = getNgModuleDef(moduleType);
|
|
21840
|
-
if (ngModuleDef !== null) {
|
|
21841
|
-
// Register the NgModule with Angular's module registry. The location (and hence timing) of
|
|
21842
|
-
// this call is critical to ensure this works correctly (modules get registered when expected)
|
|
21843
|
-
// without bloating bundles (modules are registered when otherwise not referenced).
|
|
21844
|
-
//
|
|
21845
|
-
// In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has
|
|
21846
|
-
// several practical consequences:
|
|
21847
|
-
//
|
|
21848
|
-
// - If an .ngfactory file is not imported from, the module won't be registered (and can be
|
|
21849
|
-
// tree shaken).
|
|
21850
|
-
// - If an .ngfactory file is imported from, the module will be registered even if an instance
|
|
21851
|
-
// is not actually created (via `create` below).
|
|
21852
|
-
// - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's
|
|
21853
|
-
// imports,
|
|
21854
|
-
//
|
|
21855
|
-
// In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are
|
|
21856
|
-
// not a required API to use - there are other ways to obtain an NgModuleFactory for a given
|
|
21857
|
-
// NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,
|
|
21858
|
-
// the side effect of registration is added here, in the constructor of NgModuleFactory,
|
|
21859
|
-
// ensuring no matter how a factory is created, the module is registered correctly.
|
|
21860
|
-
//
|
|
21861
|
-
// An alternative would be to include the registration side effect inline following the actual
|
|
21862
|
-
// NgModule definition. This also has the correct timing, but breaks tree-shaking - modules
|
|
21863
|
-
// will be registered and retained even if they're otherwise never referenced.
|
|
21864
|
-
registerNgModuleType(moduleType);
|
|
21865
|
-
}
|
|
21866
21970
|
}
|
|
21867
21971
|
create(parentInjector) {
|
|
21868
21972
|
return new NgModuleRef(this.moduleType, parentInjector);
|
|
@@ -22661,9 +22765,9 @@ const R3TemplateRef = class TemplateRef extends ViewEngineTemplateRef {
|
|
|
22661
22765
|
this._declarationTContainer = _declarationTContainer;
|
|
22662
22766
|
this.elementRef = elementRef;
|
|
22663
22767
|
}
|
|
22664
|
-
createEmbeddedView(context) {
|
|
22768
|
+
createEmbeddedView(context, injector) {
|
|
22665
22769
|
const embeddedTView = this._declarationTContainer.tViews;
|
|
22666
|
-
const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null);
|
|
22770
|
+
const embeddedLView = createLView(this._declarationLView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.declTNode, null, null, null, null, injector || null);
|
|
22667
22771
|
const declarationLContainer = this._declarationLView[this._declarationTContainer.index];
|
|
22668
22772
|
ngDevMode && assertLContainer(declarationLContainer);
|
|
22669
22773
|
embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;
|
|
@@ -22779,8 +22883,17 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
|
|
|
22779
22883
|
get length() {
|
|
22780
22884
|
return this._lContainer.length - CONTAINER_HEADER_OFFSET;
|
|
22781
22885
|
}
|
|
22782
|
-
createEmbeddedView(templateRef, context,
|
|
22783
|
-
|
|
22886
|
+
createEmbeddedView(templateRef, context, indexOrOptions) {
|
|
22887
|
+
let index;
|
|
22888
|
+
let injector;
|
|
22889
|
+
if (typeof indexOrOptions === 'number') {
|
|
22890
|
+
index = indexOrOptions;
|
|
22891
|
+
}
|
|
22892
|
+
else if (indexOrOptions != null) {
|
|
22893
|
+
index = indexOrOptions.index;
|
|
22894
|
+
injector = indexOrOptions.injector;
|
|
22895
|
+
}
|
|
22896
|
+
const viewRef = templateRef.createEmbeddedView(context || {}, injector);
|
|
22784
22897
|
this.insert(viewRef, index);
|
|
22785
22898
|
return viewRef;
|
|
22786
22899
|
}
|
|
@@ -22821,11 +22934,29 @@ const R3ViewContainerRef = class ViewContainerRef extends VE_ViewContainerRef {
|
|
|
22821
22934
|
componentFactoryOrType :
|
|
22822
22935
|
new ComponentFactory(getComponentDef(componentFactoryOrType));
|
|
22823
22936
|
const contextInjector = injector || this.parentInjector;
|
|
22824
|
-
|
|
22825
|
-
|
|
22826
|
-
//
|
|
22827
|
-
//
|
|
22828
|
-
|
|
22937
|
+
// If an `NgModuleRef` is not provided explicitly, try retrieving it from the DI tree.
|
|
22938
|
+
if (!ngModuleRef && componentFactory.ngModule == null) {
|
|
22939
|
+
// For the `ComponentFactory` case, entering this logic is very unlikely, since we expect that
|
|
22940
|
+
// an instance of a `ComponentFactory`, resolved via `ComponentFactoryResolver` would have an
|
|
22941
|
+
// `ngModule` field. This is possible in some test scenarios and potentially in some JIT-based
|
|
22942
|
+
// use-cases. For the `ComponentFactory` case we preserve backwards-compatibility and try
|
|
22943
|
+
// using a provided injector first, then fall back to the parent injector of this
|
|
22944
|
+
// `ViewContainerRef` instance.
|
|
22945
|
+
//
|
|
22946
|
+
// For the factory-less case, it's critical to establish a connection with the module
|
|
22947
|
+
// injector tree (by retrieving an instance of an `NgModuleRef` and accessing its injector),
|
|
22948
|
+
// so that a component can use DI tokens provided in MgModules. For this reason, we can not
|
|
22949
|
+
// rely on the provided injector, since it might be detached from the DI tree (for example, if
|
|
22950
|
+
// it was created via `Injector.create` without specifying a parent injector, or if an
|
|
22951
|
+
// injector is retrieved from an `NgModuleRef` created via `createNgModuleRef` using an
|
|
22952
|
+
// NgModule outside of a module tree). Instead, we always use `ViewContainerRef`'s parent
|
|
22953
|
+
// injector, which is normally connected to the DI tree, which includes module injector
|
|
22954
|
+
// subtree.
|
|
22955
|
+
const _injector = isComponentFactory ? contextInjector : this.parentInjector;
|
|
22956
|
+
// DO NOT REFACTOR. The code here used to have a `injector.get(NgModuleRef, null) ||
|
|
22957
|
+
// undefined` expression which seems to cause internal google apps to fail. This is documented
|
|
22958
|
+
// in the following internal bug issue: go/b/142967802
|
|
22959
|
+
const result = _injector.get(NgModuleRef$1, null);
|
|
22829
22960
|
if (result) {
|
|
22830
22961
|
ngModuleRef = result;
|
|
22831
22962
|
}
|
|
@@ -23515,6 +23646,7 @@ const angularCoreEnv = (() => ({
|
|
|
23515
23646
|
'ɵɵinvalidFactory': ɵɵinvalidFactory,
|
|
23516
23647
|
'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,
|
|
23517
23648
|
'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,
|
|
23649
|
+
'ɵɵresetView': ɵɵresetView,
|
|
23518
23650
|
'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,
|
|
23519
23651
|
'ɵɵProvidersFeature': ɵɵProvidersFeature,
|
|
23520
23652
|
'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,
|
|
@@ -23627,6 +23759,7 @@ const angularCoreEnv = (() => ({
|
|
|
23627
23759
|
'ɵɵresolveBody': ɵɵresolveBody,
|
|
23628
23760
|
'ɵɵsetComponentScope': ɵɵsetComponentScope,
|
|
23629
23761
|
'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope,
|
|
23762
|
+
'ɵɵregisterNgModuleType': registerNgModuleType,
|
|
23630
23763
|
'ɵɵsanitizeHtml': ɵɵsanitizeHtml,
|
|
23631
23764
|
'ɵɵsanitizeStyle': ɵɵsanitizeStyle,
|
|
23632
23765
|
'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,
|
|
@@ -23662,6 +23795,17 @@ function resetJitOptions() {
|
|
|
23662
23795
|
jitOptions = null;
|
|
23663
23796
|
}
|
|
23664
23797
|
|
|
23798
|
+
/**
|
|
23799
|
+
* @license
|
|
23800
|
+
* Copyright Google LLC All Rights Reserved.
|
|
23801
|
+
*
|
|
23802
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
23803
|
+
* found in the LICENSE file at https://angular.io/license
|
|
23804
|
+
*/
|
|
23805
|
+
function patchModuleCompilation() {
|
|
23806
|
+
// Does nothing, but exists as a target for patching.
|
|
23807
|
+
}
|
|
23808
|
+
|
|
23665
23809
|
/**
|
|
23666
23810
|
* @license
|
|
23667
23811
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -23718,7 +23862,11 @@ function isResolvedDeclaration(declaration) {
|
|
|
23718
23862
|
* This function automatically gets called when a class has a `@NgModule` decorator.
|
|
23719
23863
|
*/
|
|
23720
23864
|
function compileNgModule(moduleType, ngModule = {}) {
|
|
23865
|
+
patchModuleCompilation();
|
|
23721
23866
|
compileNgModuleDefs(moduleType, ngModule);
|
|
23867
|
+
if (ngModule.id !== undefined) {
|
|
23868
|
+
registerNgModuleType(moduleType, ngModule.id);
|
|
23869
|
+
}
|
|
23722
23870
|
// Because we don't know if all declarations have resolved yet at the moment the
|
|
23723
23871
|
// NgModule decorator is executing, we're enqueueing the setting of module scope
|
|
23724
23872
|
// on its declarations to be run at a later time when all declarations for the module,
|
|
@@ -24329,7 +24477,10 @@ function directiveMetadata(type, metadata) {
|
|
|
24329
24477
|
usesInheritance: !extendsDirectlyFromObject(type),
|
|
24330
24478
|
exportAs: extractExportAs(metadata.exportAs),
|
|
24331
24479
|
providers: metadata.providers || null,
|
|
24332
|
-
viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery)
|
|
24480
|
+
viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery),
|
|
24481
|
+
// TODO(alxhub): pass through the standalone flag from the directive metadata once standalone
|
|
24482
|
+
// functionality is fully rolled out.
|
|
24483
|
+
isStandalone: false,
|
|
24333
24484
|
};
|
|
24334
24485
|
}
|
|
24335
24486
|
/**
|
|
@@ -24473,7 +24624,10 @@ function getPipeMetadata(type, meta) {
|
|
|
24473
24624
|
type: type,
|
|
24474
24625
|
name: type.name,
|
|
24475
24626
|
pipeName: meta.name,
|
|
24476
|
-
pure: meta.pure !== undefined ? meta.pure : true
|
|
24627
|
+
pure: meta.pure !== undefined ? meta.pure : true,
|
|
24628
|
+
// TODO(alxhub): pass through the standalone flag from the pipe metadata once standalone
|
|
24629
|
+
// functionality is fully rolled out.
|
|
24630
|
+
isStandalone: false,
|
|
24477
24631
|
};
|
|
24478
24632
|
}
|
|
24479
24633
|
|
|
@@ -24548,19 +24702,20 @@ const HostBinding = makePropDecorator('HostBinding', (hostPropertyName) => ({ ho
|
|
|
24548
24702
|
*
|
|
24549
24703
|
* ```
|
|
24550
24704
|
*
|
|
24551
|
-
* The following example registers another DOM event handler that listens for key-press
|
|
24705
|
+
* The following example registers another DOM event handler that listens for `Enter` key-press
|
|
24706
|
+
* events on the global `window`.
|
|
24552
24707
|
* ``` ts
|
|
24553
24708
|
* import { HostListener, Component } from "@angular/core";
|
|
24554
24709
|
*
|
|
24555
24710
|
* @Component({
|
|
24556
24711
|
* selector: 'app',
|
|
24557
|
-
* template: `<h1>Hello, you have pressed
|
|
24558
|
-
* increment the counter.
|
|
24712
|
+
* template: `<h1>Hello, you have pressed enter {{counter}} number of times!</h1> Press enter key
|
|
24713
|
+
* to increment the counter.
|
|
24559
24714
|
* <button (click)="resetCounter()">Reset Counter</button>`
|
|
24560
24715
|
* })
|
|
24561
24716
|
* class AppComponent {
|
|
24562
24717
|
* counter = 0;
|
|
24563
|
-
* @HostListener('window:keydown', ['$event'])
|
|
24718
|
+
* @HostListener('window:keydown.enter', ['$event'])
|
|
24564
24719
|
* handleKeyDown(event: KeyboardEvent) {
|
|
24565
24720
|
* this.counter++;
|
|
24566
24721
|
* }
|
|
@@ -24569,6 +24724,14 @@ const HostBinding = makePropDecorator('HostBinding', (hostPropertyName) => ({ ho
|
|
|
24569
24724
|
* }
|
|
24570
24725
|
* }
|
|
24571
24726
|
* ```
|
|
24727
|
+
* The list of valid key names for `keydown` and `keyup` events
|
|
24728
|
+
* can be found here:
|
|
24729
|
+
* https://www.w3.org/TR/DOM-Level-3-Events-key/#named-key-attribute-values
|
|
24730
|
+
*
|
|
24731
|
+
* Note that keys can also be combined, e.g. `@HostListener('keydown.shift.a')`.
|
|
24732
|
+
*
|
|
24733
|
+
* The global target names that can be used to prefix an event name are
|
|
24734
|
+
* `document:`, `window:` and `body:`.
|
|
24572
24735
|
*
|
|
24573
24736
|
* @Annotation
|
|
24574
24737
|
* @publicApi
|
|
@@ -24758,10 +24921,11 @@ class ApplicationInitStatus {
|
|
|
24758
24921
|
}
|
|
24759
24922
|
}
|
|
24760
24923
|
ApplicationInitStatus.ɵfac = function ApplicationInitStatus_Factory(t) { return new (t || ApplicationInitStatus)(ɵɵinject(APP_INITIALIZER, 8)); };
|
|
24761
|
-
ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac });
|
|
24924
|
+
ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationInitStatus, factory: ApplicationInitStatus.ɵfac, providedIn: 'root' });
|
|
24762
24925
|
(function () {
|
|
24763
24926
|
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationInitStatus, [{
|
|
24764
|
-
type: Injectable
|
|
24927
|
+
type: Injectable,
|
|
24928
|
+
args: [{ providedIn: 'root' }]
|
|
24765
24929
|
}], function () {
|
|
24766
24930
|
return [{ type: undefined, decorators: [{
|
|
24767
24931
|
type: Inject,
|
|
@@ -24790,7 +24954,10 @@ ApplicationInitStatus.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Appli
|
|
|
24790
24954
|
*
|
|
24791
24955
|
* @publicApi
|
|
24792
24956
|
*/
|
|
24793
|
-
const APP_ID = new InjectionToken('AppId'
|
|
24957
|
+
const APP_ID = new InjectionToken('AppId', {
|
|
24958
|
+
providedIn: 'root',
|
|
24959
|
+
factory: _appIdRandomProviderFactory,
|
|
24960
|
+
});
|
|
24794
24961
|
function _appIdRandomProviderFactory() {
|
|
24795
24962
|
return `${_randomChar()}${_randomChar()}${_randomChar()}`;
|
|
24796
24963
|
}
|
|
@@ -24833,6 +25000,15 @@ const APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');
|
|
|
24833
25000
|
* @publicApi
|
|
24834
25001
|
*/
|
|
24835
25002
|
const PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');
|
|
25003
|
+
// We keep this token here, rather than the animations package, so that modules that only care
|
|
25004
|
+
// about which animations module is loaded (e.g. the CDK) can retrieve it without having to
|
|
25005
|
+
// include extra dependencies. See #44970 for more context.
|
|
25006
|
+
/**
|
|
25007
|
+
* A [DI token](guide/glossary#di-token "DI token definition") that indicates which animations
|
|
25008
|
+
* module has been loaded.
|
|
25009
|
+
* @publicApi
|
|
25010
|
+
*/
|
|
25011
|
+
const ANIMATION_MODULE_TYPE = new InjectionToken('AnimationModuleType');
|
|
24836
25012
|
|
|
24837
25013
|
/**
|
|
24838
25014
|
* @license
|
|
@@ -24867,6 +25043,33 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
|
|
|
24867
25043
|
* Use of this source code is governed by an MIT-style license that can be
|
|
24868
25044
|
* found in the LICENSE file at https://angular.io/license
|
|
24869
25045
|
*/
|
|
25046
|
+
/**
|
|
25047
|
+
* Work out the locale from the potential global properties.
|
|
25048
|
+
*
|
|
25049
|
+
* * Closure Compiler: use `goog.LOCALE`.
|
|
25050
|
+
* * Ivy enabled: use `$localize.locale`
|
|
25051
|
+
*/
|
|
25052
|
+
function getGlobalLocale() {
|
|
25053
|
+
if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
|
|
25054
|
+
typeof goog !== 'undefined' && goog.LOCALE !== 'en') {
|
|
25055
|
+
// * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.
|
|
25056
|
+
// * In order to preserve backwards compatibility, we use Angular default value over
|
|
25057
|
+
// Closure Compiler's one.
|
|
25058
|
+
return goog.LOCALE;
|
|
25059
|
+
}
|
|
25060
|
+
else {
|
|
25061
|
+
// KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
|
|
25062
|
+
// COMPILE-TIME INLINER.
|
|
25063
|
+
//
|
|
25064
|
+
// * During compile time inlining of translations the expression will be replaced
|
|
25065
|
+
// with a string literal that is the current locale. Other forms of this expression are not
|
|
25066
|
+
// guaranteed to be replaced.
|
|
25067
|
+
//
|
|
25068
|
+
// * During runtime translation evaluation, the developer is required to set `$localize.locale`
|
|
25069
|
+
// if required, or just to provide their own `LOCALE_ID` provider.
|
|
25070
|
+
return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
|
|
25071
|
+
}
|
|
25072
|
+
}
|
|
24870
25073
|
/**
|
|
24871
25074
|
* Provide this token to set the locale of your application.
|
|
24872
25075
|
* It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
|
|
@@ -24889,7 +25092,10 @@ Console.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Console, factory: C
|
|
|
24889
25092
|
*
|
|
24890
25093
|
* @publicApi
|
|
24891
25094
|
*/
|
|
24892
|
-
const LOCALE_ID = new InjectionToken('LocaleId'
|
|
25095
|
+
const LOCALE_ID = new InjectionToken('LocaleId', {
|
|
25096
|
+
providedIn: 'root',
|
|
25097
|
+
factory: () => inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale(),
|
|
25098
|
+
});
|
|
24893
25099
|
/**
|
|
24894
25100
|
* Provide this token to set the default currency code your application uses for
|
|
24895
25101
|
* CurrencyPipe when there is no currency code passed into it. This is only used by
|
|
@@ -24928,7 +25134,10 @@ const LOCALE_ID = new InjectionToken('LocaleId');
|
|
|
24928
25134
|
*
|
|
24929
25135
|
* @publicApi
|
|
24930
25136
|
*/
|
|
24931
|
-
const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode'
|
|
25137
|
+
const DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode', {
|
|
25138
|
+
providedIn: 'root',
|
|
25139
|
+
factory: () => USD_CURRENCY_CODE,
|
|
25140
|
+
});
|
|
24932
25141
|
/**
|
|
24933
25142
|
* Use this token at bootstrap to provide the content of your translation file (`xtb`,
|
|
24934
25143
|
* `xlf` or `xlf2`) when you want to translate your application in another language.
|
|
@@ -25095,10 +25304,11 @@ class Compiler {
|
|
|
25095
25304
|
}
|
|
25096
25305
|
}
|
|
25097
25306
|
Compiler.ɵfac = function Compiler_Factory(t) { return new (t || Compiler)(); };
|
|
25098
|
-
Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac });
|
|
25307
|
+
Compiler.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: Compiler, factory: Compiler.ɵfac, providedIn: 'root' });
|
|
25099
25308
|
(function () {
|
|
25100
25309
|
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(Compiler, [{
|
|
25101
|
-
type: Injectable
|
|
25310
|
+
type: Injectable,
|
|
25311
|
+
args: [{ providedIn: 'root' }]
|
|
25102
25312
|
}], null, null);
|
|
25103
25313
|
})();
|
|
25104
25314
|
/**
|
|
@@ -25976,26 +26186,7 @@ class PlatformRef {
|
|
|
25976
26186
|
this._destroyed = false;
|
|
25977
26187
|
}
|
|
25978
26188
|
/**
|
|
25979
|
-
* Creates an instance of an `@NgModule` for the given platform
|
|
25980
|
-
*
|
|
25981
|
-
* @usageNotes
|
|
25982
|
-
*
|
|
25983
|
-
* The following example creates the NgModule for a browser platform.
|
|
25984
|
-
*
|
|
25985
|
-
* ```typescript
|
|
25986
|
-
* my_module.ts:
|
|
25987
|
-
*
|
|
25988
|
-
* @NgModule({
|
|
25989
|
-
* imports: [BrowserModule]
|
|
25990
|
-
* })
|
|
25991
|
-
* class MyModule {}
|
|
25992
|
-
*
|
|
25993
|
-
* main.ts:
|
|
25994
|
-
* import {MyModuleNgFactory} from './my_module.ngfactory';
|
|
25995
|
-
* import {platformBrowser} from '@angular/platform-browser';
|
|
25996
|
-
*
|
|
25997
|
-
* let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
|
|
25998
|
-
* ```
|
|
26189
|
+
* Creates an instance of an `@NgModule` for the given platform.
|
|
25999
26190
|
*
|
|
26000
26191
|
* @deprecated Passing NgModule factories as the `PlatformRef.bootstrapModuleFactory` function
|
|
26001
26192
|
* argument is deprecated. Use the `PlatformRef.bootstrapModule` API instead.
|
|
@@ -26049,7 +26240,7 @@ class PlatformRef {
|
|
|
26049
26240
|
});
|
|
26050
26241
|
}
|
|
26051
26242
|
/**
|
|
26052
|
-
* Creates an instance of an `@NgModule` for a given platform
|
|
26243
|
+
* Creates an instance of an `@NgModule` for a given platform.
|
|
26053
26244
|
*
|
|
26054
26245
|
* @usageNotes
|
|
26055
26246
|
* ### Simple Example
|
|
@@ -26485,10 +26676,11 @@ class ApplicationRef {
|
|
|
26485
26676
|
}
|
|
26486
26677
|
}
|
|
26487
26678
|
ApplicationRef.ɵfac = function ApplicationRef_Factory(t) { return new (t || ApplicationRef)(ɵɵinject(NgZone), ɵɵinject(Injector), ɵɵinject(ErrorHandler), ɵɵinject(ComponentFactoryResolver$1), ɵɵinject(ApplicationInitStatus)); };
|
|
26488
|
-
ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac });
|
|
26679
|
+
ApplicationRef.ɵprov = /*@__PURE__*/ ɵɵdefineInjectable({ token: ApplicationRef, factory: ApplicationRef.ɵfac, providedIn: 'root' });
|
|
26489
26680
|
(function () {
|
|
26490
26681
|
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationRef, [{
|
|
26491
|
-
type: Injectable
|
|
26682
|
+
type: Injectable,
|
|
26683
|
+
args: [{ providedIn: 'root' }]
|
|
26492
26684
|
}], function () { return [{ type: NgZone }, { type: Injector }, { type: ErrorHandler }, { type: ComponentFactoryResolver$1 }, { type: ApplicationInitStatus }]; }, null);
|
|
26493
26685
|
})();
|
|
26494
26686
|
function remove(list, el) {
|
|
@@ -26796,8 +26988,6 @@ var ng_module_factory_loader_impl = {};
|
|
|
26796
26988
|
* Use of this source code is governed by an MIT-style license that can be
|
|
26797
26989
|
* found in the LICENSE file at https://angular.io/license
|
|
26798
26990
|
*/
|
|
26799
|
-
// TODO(alxhub): recombine the interfaces and implementations here and move the docs back onto the
|
|
26800
|
-
// original classes.
|
|
26801
26991
|
/**
|
|
26802
26992
|
* @publicApi
|
|
26803
26993
|
*/
|
|
@@ -26813,47 +27003,92 @@ class DebugEventListener {
|
|
|
26813
27003
|
function asNativeElements(debugEls) {
|
|
26814
27004
|
return debugEls.map((el) => el.nativeElement);
|
|
26815
27005
|
}
|
|
26816
|
-
|
|
27006
|
+
/**
|
|
27007
|
+
* @publicApi
|
|
27008
|
+
*/
|
|
27009
|
+
class DebugNode {
|
|
26817
27010
|
constructor(nativeNode) {
|
|
26818
27011
|
this.nativeNode = nativeNode;
|
|
26819
27012
|
}
|
|
27013
|
+
/**
|
|
27014
|
+
* The `DebugElement` parent. Will be `null` if this is the root element.
|
|
27015
|
+
*/
|
|
26820
27016
|
get parent() {
|
|
26821
27017
|
const parent = this.nativeNode.parentNode;
|
|
26822
|
-
return parent ? new
|
|
27018
|
+
return parent ? new DebugElement(parent) : null;
|
|
26823
27019
|
}
|
|
27020
|
+
/**
|
|
27021
|
+
* The host dependency injector. For example, the root element's component instance injector.
|
|
27022
|
+
*/
|
|
26824
27023
|
get injector() {
|
|
26825
27024
|
return getInjector(this.nativeNode);
|
|
26826
27025
|
}
|
|
27026
|
+
/**
|
|
27027
|
+
* The element's own component instance, if it has one.
|
|
27028
|
+
*/
|
|
26827
27029
|
get componentInstance() {
|
|
26828
27030
|
const nativeElement = this.nativeNode;
|
|
26829
27031
|
return nativeElement &&
|
|
26830
27032
|
(getComponent$1(nativeElement) || getOwningComponent(nativeElement));
|
|
26831
27033
|
}
|
|
27034
|
+
/**
|
|
27035
|
+
* An object that provides parent context for this element. Often an ancestor component instance
|
|
27036
|
+
* that governs this element.
|
|
27037
|
+
*
|
|
27038
|
+
* When an element is repeated within *ngFor, the context is an `NgForOf` whose `$implicit`
|
|
27039
|
+
* property is the value of the row instance value. For example, the `hero` in `*ngFor="let hero
|
|
27040
|
+
* of heroes"`.
|
|
27041
|
+
*/
|
|
26832
27042
|
get context() {
|
|
26833
27043
|
return getComponent$1(this.nativeNode) || getContext(this.nativeNode);
|
|
26834
27044
|
}
|
|
27045
|
+
/**
|
|
27046
|
+
* The callbacks attached to the component's @Output properties and/or the element's event
|
|
27047
|
+
* properties.
|
|
27048
|
+
*/
|
|
26835
27049
|
get listeners() {
|
|
26836
27050
|
return getListeners(this.nativeNode).filter(listener => listener.type === 'dom');
|
|
26837
27051
|
}
|
|
27052
|
+
/**
|
|
27053
|
+
* Dictionary of objects associated with template local variables (e.g. #foo), keyed by the local
|
|
27054
|
+
* variable name.
|
|
27055
|
+
*/
|
|
26838
27056
|
get references() {
|
|
26839
27057
|
return getLocalRefs(this.nativeNode);
|
|
26840
27058
|
}
|
|
27059
|
+
/**
|
|
27060
|
+
* This component's injector lookup tokens. Includes the component itself plus the tokens that the
|
|
27061
|
+
* component lists in its providers metadata.
|
|
27062
|
+
*/
|
|
26841
27063
|
get providerTokens() {
|
|
26842
27064
|
return getInjectionTokens(this.nativeNode);
|
|
26843
27065
|
}
|
|
26844
27066
|
}
|
|
26845
|
-
|
|
27067
|
+
/**
|
|
27068
|
+
* @publicApi
|
|
27069
|
+
*
|
|
27070
|
+
* @see [Component testing scenarios](guide/testing-components-scenarios)
|
|
27071
|
+
* @see [Basics of testing components](guide/testing-components-basics)
|
|
27072
|
+
* @see [Testing utility APIs](guide/testing-utility-apis)
|
|
27073
|
+
*/
|
|
27074
|
+
class DebugElement extends DebugNode {
|
|
26846
27075
|
constructor(nativeNode) {
|
|
26847
27076
|
ngDevMode && assertDomNode(nativeNode);
|
|
26848
27077
|
super(nativeNode);
|
|
26849
27078
|
}
|
|
27079
|
+
/**
|
|
27080
|
+
* The underlying DOM element at the root of the component.
|
|
27081
|
+
*/
|
|
26850
27082
|
get nativeElement() {
|
|
26851
27083
|
return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;
|
|
26852
27084
|
}
|
|
27085
|
+
/**
|
|
27086
|
+
* The element tag name, if it is an element.
|
|
27087
|
+
*/
|
|
26853
27088
|
get name() {
|
|
26854
27089
|
const context = getLContext(this.nativeNode);
|
|
26855
|
-
|
|
26856
|
-
|
|
27090
|
+
const lView = context ? context.lView : null;
|
|
27091
|
+
if (lView !== null) {
|
|
26857
27092
|
const tData = lView[TVIEW].data;
|
|
26858
27093
|
const tNode = tData[context.nodeIndex];
|
|
26859
27094
|
return tNode.value;
|
|
@@ -26876,10 +27111,10 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
|
|
|
26876
27111
|
*/
|
|
26877
27112
|
get properties() {
|
|
26878
27113
|
const context = getLContext(this.nativeNode);
|
|
26879
|
-
|
|
27114
|
+
const lView = context ? context.lView : null;
|
|
27115
|
+
if (lView === null) {
|
|
26880
27116
|
return {};
|
|
26881
27117
|
}
|
|
26882
|
-
const lView = context.lView;
|
|
26883
27118
|
const tData = lView[TVIEW].data;
|
|
26884
27119
|
const tNode = tData[context.nodeIndex];
|
|
26885
27120
|
const properties = {};
|
|
@@ -26890,6 +27125,9 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
|
|
|
26890
27125
|
collectPropertyBindings(properties, tNode, lView, tData);
|
|
26891
27126
|
return properties;
|
|
26892
27127
|
}
|
|
27128
|
+
/**
|
|
27129
|
+
* A map of attribute names to attribute values for an element.
|
|
27130
|
+
*/
|
|
26893
27131
|
get attributes() {
|
|
26894
27132
|
const attributes = {};
|
|
26895
27133
|
const element = this.nativeElement;
|
|
@@ -26897,10 +27135,10 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
|
|
|
26897
27135
|
return attributes;
|
|
26898
27136
|
}
|
|
26899
27137
|
const context = getLContext(element);
|
|
26900
|
-
|
|
27138
|
+
const lView = context ? context.lView : null;
|
|
27139
|
+
if (lView === null) {
|
|
26901
27140
|
return {};
|
|
26902
27141
|
}
|
|
26903
|
-
const lView = context.lView;
|
|
26904
27142
|
const tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;
|
|
26905
27143
|
const lowercaseTNodeAttrs = [];
|
|
26906
27144
|
// For debug nodes we take the element's attribute directly from the DOM since it allows us
|
|
@@ -26938,12 +27176,29 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
|
|
|
26938
27176
|
}
|
|
26939
27177
|
return attributes;
|
|
26940
27178
|
}
|
|
27179
|
+
/**
|
|
27180
|
+
* The inline styles of the DOM element.
|
|
27181
|
+
*
|
|
27182
|
+
* Will be `null` if there is no `style` property on the underlying DOM element.
|
|
27183
|
+
*
|
|
27184
|
+
* @see [ElementCSSInlineStyle](https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style)
|
|
27185
|
+
*/
|
|
26941
27186
|
get styles() {
|
|
26942
27187
|
if (this.nativeElement && this.nativeElement.style) {
|
|
26943
27188
|
return this.nativeElement.style;
|
|
26944
27189
|
}
|
|
26945
27190
|
return {};
|
|
26946
27191
|
}
|
|
27192
|
+
/**
|
|
27193
|
+
* A map containing the class names on the element as keys.
|
|
27194
|
+
*
|
|
27195
|
+
* This map is derived from the `className` property of the DOM element.
|
|
27196
|
+
*
|
|
27197
|
+
* Note: The values of this object will always be `true`. The class key will not appear in the KV
|
|
27198
|
+
* object if it does not exist on the element.
|
|
27199
|
+
*
|
|
27200
|
+
* @see [Element.className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)
|
|
27201
|
+
*/
|
|
26947
27202
|
get classes() {
|
|
26948
27203
|
const result = {};
|
|
26949
27204
|
const element = this.nativeElement;
|
|
@@ -26953,15 +27208,23 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
|
|
|
26953
27208
|
classes.forEach((value) => result[value] = true);
|
|
26954
27209
|
return result;
|
|
26955
27210
|
}
|
|
27211
|
+
/**
|
|
27212
|
+
* The `childNodes` of the DOM element as a `DebugNode` array.
|
|
27213
|
+
*
|
|
27214
|
+
* @see [Node.childNodes](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
|
|
27215
|
+
*/
|
|
26956
27216
|
get childNodes() {
|
|
26957
27217
|
const childNodes = this.nativeNode.childNodes;
|
|
26958
27218
|
const children = [];
|
|
26959
27219
|
for (let i = 0; i < childNodes.length; i++) {
|
|
26960
27220
|
const element = childNodes[i];
|
|
26961
|
-
children.push(
|
|
27221
|
+
children.push(getDebugNode(element));
|
|
26962
27222
|
}
|
|
26963
27223
|
return children;
|
|
26964
27224
|
}
|
|
27225
|
+
/**
|
|
27226
|
+
* The immediate `DebugElement` children. Walk the tree by descending through `children`.
|
|
27227
|
+
*/
|
|
26965
27228
|
get children() {
|
|
26966
27229
|
const nativeElement = this.nativeElement;
|
|
26967
27230
|
if (!nativeElement)
|
|
@@ -26970,24 +27233,45 @@ class DebugElement__POST_R3__ extends DebugNode__POST_R3__ {
|
|
|
26970
27233
|
const children = [];
|
|
26971
27234
|
for (let i = 0; i < childNodes.length; i++) {
|
|
26972
27235
|
const element = childNodes[i];
|
|
26973
|
-
children.push(
|
|
27236
|
+
children.push(getDebugNode(element));
|
|
26974
27237
|
}
|
|
26975
27238
|
return children;
|
|
26976
27239
|
}
|
|
27240
|
+
/**
|
|
27241
|
+
* @returns the first `DebugElement` that matches the predicate at any depth in the subtree.
|
|
27242
|
+
*/
|
|
26977
27243
|
query(predicate) {
|
|
26978
27244
|
const results = this.queryAll(predicate);
|
|
26979
27245
|
return results[0] || null;
|
|
26980
27246
|
}
|
|
27247
|
+
/**
|
|
27248
|
+
* @returns All `DebugElement` matches for the predicate at any depth in the subtree.
|
|
27249
|
+
*/
|
|
26981
27250
|
queryAll(predicate) {
|
|
26982
27251
|
const matches = [];
|
|
26983
|
-
|
|
27252
|
+
_queryAll(this, predicate, matches, true);
|
|
26984
27253
|
return matches;
|
|
26985
27254
|
}
|
|
27255
|
+
/**
|
|
27256
|
+
* @returns All `DebugNode` matches for the predicate at any depth in the subtree.
|
|
27257
|
+
*/
|
|
26986
27258
|
queryAllNodes(predicate) {
|
|
26987
27259
|
const matches = [];
|
|
26988
|
-
|
|
27260
|
+
_queryAll(this, predicate, matches, false);
|
|
26989
27261
|
return matches;
|
|
26990
27262
|
}
|
|
27263
|
+
/**
|
|
27264
|
+
* Triggers the event by its name if there is a corresponding listener in the element's
|
|
27265
|
+
* `listeners` collection.
|
|
27266
|
+
*
|
|
27267
|
+
* If the event lacks a listener or there's some other problem, consider
|
|
27268
|
+
* calling `nativeElement.dispatchEvent(eventObject)`.
|
|
27269
|
+
*
|
|
27270
|
+
* @param eventName The name of the event to trigger
|
|
27271
|
+
* @param eventObj The _event object_ expected by the handler
|
|
27272
|
+
*
|
|
27273
|
+
* @see [Testing components scenarios](guide/testing-components-scenarios#trigger-event-handler)
|
|
27274
|
+
*/
|
|
26991
27275
|
triggerEventHandler(eventName, eventObj) {
|
|
26992
27276
|
const node = this.nativeNode;
|
|
26993
27277
|
const invokedListeners = [];
|
|
@@ -27046,11 +27330,12 @@ function isPrimitiveValue(value) {
|
|
|
27046
27330
|
return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||
|
|
27047
27331
|
value === null;
|
|
27048
27332
|
}
|
|
27049
|
-
function
|
|
27333
|
+
function _queryAll(parentElement, predicate, matches, elementsOnly) {
|
|
27050
27334
|
const context = getLContext(parentElement.nativeNode);
|
|
27051
|
-
|
|
27052
|
-
|
|
27053
|
-
|
|
27335
|
+
const lView = context ? context.lView : null;
|
|
27336
|
+
if (lView !== null) {
|
|
27337
|
+
const parentTNode = lView[TVIEW].data[context.nodeIndex];
|
|
27338
|
+
_queryNodeChildren(parentTNode, lView, predicate, matches, elementsOnly, parentElement.nativeNode);
|
|
27054
27339
|
}
|
|
27055
27340
|
else {
|
|
27056
27341
|
// If the context is null, then `parentElement` was either created with Renderer2 or native DOM
|
|
@@ -27068,26 +27353,26 @@ function _queryAllR3(parentElement, predicate, matches, elementsOnly) {
|
|
|
27068
27353
|
* @param elementsOnly whether only elements should be searched
|
|
27069
27354
|
* @param rootNativeNode the root native node on which predicate should not be matched
|
|
27070
27355
|
*/
|
|
27071
|
-
function
|
|
27356
|
+
function _queryNodeChildren(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {
|
|
27072
27357
|
ngDevMode && assertTNodeForLView(tNode, lView);
|
|
27073
27358
|
const nativeNode = getNativeByTNodeOrNull(tNode, lView);
|
|
27074
27359
|
// For each type of TNode, specific logic is executed.
|
|
27075
27360
|
if (tNode.type & (3 /* AnyRNode */ | 8 /* ElementContainer */)) {
|
|
27076
27361
|
// Case 1: the TNode is an element
|
|
27077
27362
|
// The native node has to be checked.
|
|
27078
|
-
|
|
27363
|
+
_addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
|
|
27079
27364
|
if (isComponentHost(tNode)) {
|
|
27080
27365
|
// If the element is the host of a component, then all nodes in its view have to be processed.
|
|
27081
27366
|
// Note: the component's content (tNode.child) will be processed from the insertion points.
|
|
27082
27367
|
const componentView = getComponentLViewByIndex(tNode.index, lView);
|
|
27083
27368
|
if (componentView && componentView[TVIEW].firstChild) {
|
|
27084
|
-
|
|
27369
|
+
_queryNodeChildren(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);
|
|
27085
27370
|
}
|
|
27086
27371
|
}
|
|
27087
27372
|
else {
|
|
27088
27373
|
if (tNode.child) {
|
|
27089
27374
|
// Otherwise, its children have to be processed.
|
|
27090
|
-
|
|
27375
|
+
_queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
|
|
27091
27376
|
}
|
|
27092
27377
|
// We also have to query the DOM directly in order to catch elements inserted through
|
|
27093
27378
|
// Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple
|
|
@@ -27103,16 +27388,16 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
|
|
|
27103
27388
|
// processed.
|
|
27104
27389
|
const nodeOrContainer = lView[tNode.index];
|
|
27105
27390
|
if (isLContainer(nodeOrContainer)) {
|
|
27106
|
-
|
|
27391
|
+
_queryNodeChildrenInContainer(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);
|
|
27107
27392
|
}
|
|
27108
27393
|
}
|
|
27109
27394
|
else if (tNode.type & 4 /* Container */) {
|
|
27110
27395
|
// Case 2: the TNode is a container
|
|
27111
27396
|
// The native node has to be checked.
|
|
27112
27397
|
const lContainer = lView[tNode.index];
|
|
27113
|
-
|
|
27398
|
+
_addQueryMatch(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);
|
|
27114
27399
|
// Each view inside the container has to be processed.
|
|
27115
|
-
|
|
27400
|
+
_queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode);
|
|
27116
27401
|
}
|
|
27117
27402
|
else if (tNode.type & 16 /* Projection */) {
|
|
27118
27403
|
// Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).
|
|
@@ -27122,18 +27407,18 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
|
|
|
27122
27407
|
const head = componentHost.projection[tNode.projection];
|
|
27123
27408
|
if (Array.isArray(head)) {
|
|
27124
27409
|
for (let nativeNode of head) {
|
|
27125
|
-
|
|
27410
|
+
_addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode);
|
|
27126
27411
|
}
|
|
27127
27412
|
}
|
|
27128
27413
|
else if (head) {
|
|
27129
27414
|
const nextLView = componentView[PARENT];
|
|
27130
27415
|
const nextTNode = nextLView[TVIEW].data[head.index];
|
|
27131
|
-
|
|
27416
|
+
_queryNodeChildren(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);
|
|
27132
27417
|
}
|
|
27133
27418
|
}
|
|
27134
27419
|
else if (tNode.child) {
|
|
27135
27420
|
// Case 4: the TNode is a view.
|
|
27136
|
-
|
|
27421
|
+
_queryNodeChildren(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);
|
|
27137
27422
|
}
|
|
27138
27423
|
// We don't want to go to the next sibling of the root node.
|
|
27139
27424
|
if (rootNativeNode !== nativeNode) {
|
|
@@ -27141,7 +27426,7 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
|
|
|
27141
27426
|
// link, depending on whether the current node has been projected.
|
|
27142
27427
|
const nextTNode = (tNode.flags & 4 /* isProjected */) ? tNode.projectionNext : tNode.next;
|
|
27143
27428
|
if (nextTNode) {
|
|
27144
|
-
|
|
27429
|
+
_queryNodeChildren(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);
|
|
27145
27430
|
}
|
|
27146
27431
|
}
|
|
27147
27432
|
}
|
|
@@ -27154,12 +27439,12 @@ function _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, ro
|
|
|
27154
27439
|
* @param elementsOnly whether only elements should be searched
|
|
27155
27440
|
* @param rootNativeNode the root native node on which predicate should not be matched
|
|
27156
27441
|
*/
|
|
27157
|
-
function
|
|
27442
|
+
function _queryNodeChildrenInContainer(lContainer, predicate, matches, elementsOnly, rootNativeNode) {
|
|
27158
27443
|
for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
|
|
27159
27444
|
const childView = lContainer[i];
|
|
27160
27445
|
const firstChild = childView[TVIEW].firstChild;
|
|
27161
27446
|
if (firstChild) {
|
|
27162
|
-
|
|
27447
|
+
_queryNodeChildren(firstChild, childView, predicate, matches, elementsOnly, rootNativeNode);
|
|
27163
27448
|
}
|
|
27164
27449
|
}
|
|
27165
27450
|
}
|
|
@@ -27172,7 +27457,7 @@ function _queryNodeChildrenInContainerR3(lContainer, predicate, matches, element
|
|
|
27172
27457
|
* @param elementsOnly whether only elements should be searched
|
|
27173
27458
|
* @param rootNativeNode the root native node on which predicate should not be matched
|
|
27174
27459
|
*/
|
|
27175
|
-
function
|
|
27460
|
+
function _addQueryMatch(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {
|
|
27176
27461
|
if (rootNativeNode !== nativeNode) {
|
|
27177
27462
|
const debugNode = getDebugNode(nativeNode);
|
|
27178
27463
|
if (!debugNode) {
|
|
@@ -27181,7 +27466,7 @@ function _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNati
|
|
|
27181
27466
|
// Type of the "predicate and "matches" array are set based on the value of
|
|
27182
27467
|
// the "elementsOnly" parameter. TypeScript is not able to properly infer these
|
|
27183
27468
|
// types with generics, so we manually cast the parameters accordingly.
|
|
27184
|
-
if (elementsOnly && debugNode instanceof
|
|
27469
|
+
if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&
|
|
27185
27470
|
matches.indexOf(debugNode) === -1) {
|
|
27186
27471
|
matches.push(debugNode);
|
|
27187
27472
|
}
|
|
@@ -27206,7 +27491,7 @@ function _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnl
|
|
|
27206
27491
|
const node = nodes[i];
|
|
27207
27492
|
const debugNode = getDebugNode(node);
|
|
27208
27493
|
if (debugNode) {
|
|
27209
|
-
if (elementsOnly && debugNode instanceof
|
|
27494
|
+
if (elementsOnly && (debugNode instanceof DebugElement) && predicate(debugNode) &&
|
|
27210
27495
|
matches.indexOf(debugNode) === -1) {
|
|
27211
27496
|
matches.push(debugNode);
|
|
27212
27497
|
}
|
|
@@ -27247,25 +27532,24 @@ function collectPropertyBindings(properties, tNode, lView, tData) {
|
|
|
27247
27532
|
// Need to keep the nodes in a global Map so that multiple angular apps are supported.
|
|
27248
27533
|
const _nativeNodeToDebugNode = new Map();
|
|
27249
27534
|
const NG_DEBUG_PROPERTY = '__ng_debug__';
|
|
27250
|
-
|
|
27535
|
+
/**
|
|
27536
|
+
* @publicApi
|
|
27537
|
+
*/
|
|
27538
|
+
function getDebugNode(nativeNode) {
|
|
27251
27539
|
if (nativeNode instanceof Node) {
|
|
27252
27540
|
if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {
|
|
27253
27541
|
nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?
|
|
27254
|
-
new
|
|
27255
|
-
new
|
|
27542
|
+
new DebugElement(nativeNode) :
|
|
27543
|
+
new DebugNode(nativeNode);
|
|
27256
27544
|
}
|
|
27257
27545
|
return nativeNode[NG_DEBUG_PROPERTY];
|
|
27258
27546
|
}
|
|
27259
27547
|
return null;
|
|
27260
27548
|
}
|
|
27261
|
-
|
|
27262
|
-
|
|
27263
|
-
*/
|
|
27264
|
-
const getDebugNode = getDebugNode__POST_R3__;
|
|
27265
|
-
function getDebugNodeR2__POST_R3__(_nativeNode) {
|
|
27549
|
+
// TODO: cleanup all references to this function and remove it.
|
|
27550
|
+
function getDebugNodeR2(_nativeNode) {
|
|
27266
27551
|
return null;
|
|
27267
27552
|
}
|
|
27268
|
-
const getDebugNodeR2 = getDebugNodeR2__POST_R3__;
|
|
27269
27553
|
function getAllDebugNodes() {
|
|
27270
27554
|
return Array.from(_nativeNodeToDebugNode.values());
|
|
27271
27555
|
}
|
|
@@ -27275,14 +27559,6 @@ function indexDebugNode(node) {
|
|
|
27275
27559
|
function removeDebugNodeFromIndex(node) {
|
|
27276
27560
|
_nativeNodeToDebugNode.delete(node.nativeNode);
|
|
27277
27561
|
}
|
|
27278
|
-
/**
|
|
27279
|
-
* @publicApi
|
|
27280
|
-
*/
|
|
27281
|
-
const DebugNode = DebugNode__POST_R3__;
|
|
27282
|
-
/**
|
|
27283
|
-
* @publicApi
|
|
27284
|
-
*/
|
|
27285
|
-
const DebugElement = DebugElement__POST_R3__;
|
|
27286
27562
|
|
|
27287
27563
|
/**
|
|
27288
27564
|
* @license
|
|
@@ -28404,102 +28680,9 @@ const _CORE_PLATFORM_PROVIDERS = [
|
|
|
28404
28680
|
const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);
|
|
28405
28681
|
|
|
28406
28682
|
/**
|
|
28407
|
-
* @license
|
|
28408
|
-
* Copyright Google LLC All Rights Reserved.
|
|
28409
|
-
*
|
|
28410
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
28411
|
-
* found in the LICENSE file at https://angular.io/license
|
|
28412
|
-
*/
|
|
28413
|
-
function _iterableDiffersFactory() {
|
|
28414
|
-
return defaultIterableDiffers;
|
|
28415
|
-
}
|
|
28416
|
-
function _keyValueDiffersFactory() {
|
|
28417
|
-
return defaultKeyValueDiffers;
|
|
28418
|
-
}
|
|
28419
|
-
function _localeFactory(locale) {
|
|
28420
|
-
return locale || getGlobalLocale();
|
|
28421
|
-
}
|
|
28422
|
-
/**
|
|
28423
|
-
* Work out the locale from the potential global properties.
|
|
28424
|
-
*
|
|
28425
|
-
* * Closure Compiler: use `goog.getLocale()`.
|
|
28426
|
-
* * Ivy enabled: use `$localize.locale`
|
|
28427
|
-
*/
|
|
28428
|
-
function getGlobalLocale() {
|
|
28429
|
-
if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&
|
|
28430
|
-
typeof goog !== 'undefined' && goog.getLocale() !== 'en') {
|
|
28431
|
-
// * The default `goog.getLocale()` value is `en`, while Angular used `en-US`.
|
|
28432
|
-
// * In order to preserve backwards compatibility, we use Angular default value over
|
|
28433
|
-
// Closure Compiler's one.
|
|
28434
|
-
return goog.getLocale();
|
|
28435
|
-
}
|
|
28436
|
-
else {
|
|
28437
|
-
// KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
|
|
28438
|
-
// COMPILE-TIME INLINER.
|
|
28439
|
-
//
|
|
28440
|
-
// * During compile time inlining of translations the expression will be replaced
|
|
28441
|
-
// with a string literal that is the current locale. Other forms of this expression are not
|
|
28442
|
-
// guaranteed to be replaced.
|
|
28443
|
-
//
|
|
28444
|
-
// * During runtime translation evaluation, the developer is required to set `$localize.locale`
|
|
28445
|
-
// if required, or just to provide their own `LOCALE_ID` provider.
|
|
28446
|
-
return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
|
|
28447
|
-
}
|
|
28448
|
-
}
|
|
28449
|
-
/**
|
|
28450
|
-
* A built-in [dependency injection token](guide/glossary#di-token)
|
|
28451
|
-
* that is used to configure the root injector for bootstrapping.
|
|
28452
|
-
*/
|
|
28453
|
-
const APPLICATION_MODULE_PROVIDERS = [
|
|
28454
|
-
{
|
|
28455
|
-
provide: ApplicationRef,
|
|
28456
|
-
useClass: ApplicationRef,
|
|
28457
|
-
deps: [NgZone, Injector, ErrorHandler, ComponentFactoryResolver$1, ApplicationInitStatus]
|
|
28458
|
-
},
|
|
28459
|
-
{ provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory },
|
|
28460
|
-
{
|
|
28461
|
-
provide: ApplicationInitStatus,
|
|
28462
|
-
useClass: ApplicationInitStatus,
|
|
28463
|
-
deps: [[new Optional(), APP_INITIALIZER]]
|
|
28464
|
-
},
|
|
28465
|
-
{ provide: Compiler, useClass: Compiler, deps: [] },
|
|
28466
|
-
APP_ID_RANDOM_PROVIDER,
|
|
28467
|
-
{ provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: [] },
|
|
28468
|
-
{ provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: [] },
|
|
28469
|
-
{
|
|
28470
|
-
provide: LOCALE_ID,
|
|
28471
|
-
useFactory: _localeFactory,
|
|
28472
|
-
deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]
|
|
28473
|
-
},
|
|
28474
|
-
{ provide: DEFAULT_CURRENCY_CODE, useValue: USD_CURRENCY_CODE },
|
|
28475
|
-
];
|
|
28476
|
-
/**
|
|
28477
|
-
* Schedule work at next available slot.
|
|
28478
|
-
*
|
|
28479
|
-
* In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped
|
|
28480
|
-
* using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.
|
|
28481
|
-
* This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.
|
|
28482
|
-
*
|
|
28483
|
-
* @param ngZone NgZone to use for scheduling.
|
|
28484
|
-
*/
|
|
28485
|
-
function zoneSchedulerFactory(ngZone) {
|
|
28486
|
-
let queue = [];
|
|
28487
|
-
ngZone.onStable.subscribe(() => {
|
|
28488
|
-
while (queue.length) {
|
|
28489
|
-
queue.pop()();
|
|
28490
|
-
}
|
|
28491
|
-
});
|
|
28492
|
-
return function (fn) {
|
|
28493
|
-
queue.push(fn);
|
|
28494
|
-
};
|
|
28495
|
-
}
|
|
28496
|
-
/**
|
|
28497
|
-
* Configures the root injector for an app with
|
|
28498
|
-
* providers of `@angular/core` dependencies that `ApplicationRef` needs
|
|
28499
|
-
* to bootstrap components.
|
|
28500
|
-
*
|
|
28501
28683
|
* Re-exported by `BrowserModule`, which is included automatically in the root
|
|
28502
|
-
* `AppModule` when you create a new app with the CLI `new` command.
|
|
28684
|
+
* `AppModule` when you create a new app with the CLI `new` command. Eagerly injects
|
|
28685
|
+
* `ApplicationRef` to instantiate it.
|
|
28503
28686
|
*
|
|
28504
28687
|
* @publicApi
|
|
28505
28688
|
*/
|
|
@@ -28509,14 +28692,25 @@ class ApplicationModule {
|
|
|
28509
28692
|
}
|
|
28510
28693
|
ApplicationModule.ɵfac = function ApplicationModule_Factory(t) { return new (t || ApplicationModule)(ɵɵinject(ApplicationRef)); };
|
|
28511
28694
|
ApplicationModule.ɵmod = /*@__PURE__*/ ɵɵdefineNgModule({ type: ApplicationModule });
|
|
28512
|
-
ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({
|
|
28695
|
+
ApplicationModule.ɵinj = /*@__PURE__*/ ɵɵdefineInjector({});
|
|
28513
28696
|
(function () {
|
|
28514
28697
|
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ApplicationModule, [{
|
|
28515
|
-
type: NgModule
|
|
28516
|
-
args: [{ providers: APPLICATION_MODULE_PROVIDERS }]
|
|
28698
|
+
type: NgModule
|
|
28517
28699
|
}], function () { return [{ type: ApplicationRef }]; }, null);
|
|
28518
28700
|
})();
|
|
28519
28701
|
|
|
28702
|
+
/**
|
|
28703
|
+
* @license
|
|
28704
|
+
* Copyright Google LLC All Rights Reserved.
|
|
28705
|
+
*
|
|
28706
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
28707
|
+
* found in the LICENSE file at https://angular.io/license
|
|
28708
|
+
*/
|
|
28709
|
+
/** Coerces a value (typically a string) to a boolean. */
|
|
28710
|
+
function coerceToBoolean(value) {
|
|
28711
|
+
return typeof value === 'boolean' ? value : (value != null && value !== 'false');
|
|
28712
|
+
}
|
|
28713
|
+
|
|
28520
28714
|
/**
|
|
28521
28715
|
* @license
|
|
28522
28716
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -28675,5 +28869,5 @@ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
|
28675
28869
|
* Generated bundle index. Do not edit.
|
|
28676
28870
|
*/
|
|
28677
28871
|
|
|
28678
|
-
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,
|
|
28872
|
+
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 };
|
|
28679
28873
|
//# sourceMappingURL=core.mjs.map
|