@angular/core 15.1.0-next.0 → 15.1.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/src/application_ref.mjs +13 -13
- package/esm2020/src/core.mjs +2 -1
- package/esm2020/src/core_render3_private_export.mjs +1 -2
- package/esm2020/src/di/create_injector.mjs +1 -1
- package/esm2020/src/di/r3_injector.mjs +7 -7
- package/esm2020/src/linker/query_list.mjs +7 -7
- package/esm2020/src/render/api.mjs +1 -3
- package/esm2020/src/render3/assert.mjs +1 -10
- package/esm2020/src/render3/component_ref.mjs +7 -18
- package/esm2020/src/render3/definition.mjs +9 -1
- package/esm2020/src/render3/index.mjs +2 -2
- package/esm2020/src/render3/instructions/shared.mjs +95 -169
- package/esm2020/src/render3/interfaces/context.mjs +5 -5
- package/esm2020/src/render3/interfaces/view.mjs +1 -10
- package/esm2020/src/render3/jit/module.mjs +2 -3
- package/esm2020/src/render3/namespaces.mjs +1 -8
- package/esm2020/src/render3/node_manipulation.mjs +3 -7
- package/esm2020/src/render3/node_selector_matcher.mjs +1 -4
- package/esm2020/src/render3/query.mjs +1 -6
- package/esm2020/src/render3/state.mjs +1 -4
- package/esm2020/src/render3/util/discovery_utils.mjs +3 -32
- package/esm2020/src/render3/util/view_utils.mjs +1 -15
- package/esm2020/src/render3/view_ref.mjs +6 -6
- package/esm2020/src/util/array_utils.mjs +3 -71
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/fesm2015/core.mjs +282 -1253
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +287 -1258
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +282 -1253
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +287 -1258
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +11 -224
- package/package.json +1 -1
- package/schematics/migrations/relative-link-resolution/util.d.ts +1 -1
- package/schematics/migrations/router-link-with-href/util.d.ts +1 -1
- package/schematics/migrations/typed-forms/util.d.ts +1 -1
- package/schematics/utils/import_manager.js +23 -3
- package/schematics/utils/ng_decorators.d.ts +1 -1
- package/schematics/utils/typescript/compiler_host.d.ts +1 -1
- package/schematics/utils/typescript/imports.d.ts +1 -1
- package/schematics/utils/typescript/property_name.d.ts +1 -1
- package/testing/index.d.ts +1 -1
- package/esm2020/src/render3/instructions/lview_debug.mjs +0 -684
- package/esm2020/src/util/named_array_type.mjs +0 -40
package/fesm2015/testing.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.1.0-next.
|
|
2
|
+
* @license Angular v15.1.0-next.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { getDebugNode
|
|
7
|
+
import { getDebugNode, RendererFactory2 as RendererFactory2$1, InjectionToken as InjectionToken$1, ɵstringify, ɵReflectionCapabilities, Directive, Component, Pipe, NgModule, ɵgetInjectableDef, resolveForwardRef as resolveForwardRef$1, ɵNG_COMP_DEF, ɵRender3NgModuleRef, ApplicationInitStatus, LOCALE_ID as LOCALE_ID$1, ɵDEFAULT_LOCALE_ID, ɵsetLocaleId, ɵRender3ComponentFactory, ɵcompileComponent, ɵNG_DIR_DEF, ɵcompileDirective, ɵNG_PIPE_DEF, ɵcompilePipe, ɵNG_MOD_DEF, ɵtransitiveScopesFor, ɵpatchComponentDefWithScope, ɵNG_INJ_DEF, ɵcompileNgModuleDefs, NgZone, Compiler, COMPILER_OPTIONS, ɵNgModuleFactory, ɵisEnvironmentProviders, ModuleWithComponentFactories, ɵconvertToBitFlags, Injector as Injector$1, InjectFlags as InjectFlags$1, ɵsetAllowDuplicateNgModuleIdsForTest, ɵresetCompiledComponents, ɵsetUnknownElementStrictMode as ɵsetUnknownElementStrictMode$1, ɵsetUnknownPropertyStrictMode as ɵsetUnknownPropertyStrictMode$1, ɵgetUnknownElementStrictMode as ɵgetUnknownElementStrictMode$1, ɵgetUnknownPropertyStrictMode as ɵgetUnknownPropertyStrictMode$1, EnvironmentInjector as EnvironmentInjector$1, ɵflushModuleScopingQueueAsMuchAsPossible } from '@angular/core';
|
|
8
8
|
import { __awaiter } from 'tslib';
|
|
9
9
|
import { ResourceLoader } from '@angular/compiler';
|
|
10
10
|
import { Subject, Subscription } from 'rxjs';
|
|
@@ -86,7 +86,7 @@ class ComponentFixture {
|
|
|
86
86
|
this._onErrorSubscription = null;
|
|
87
87
|
this.changeDetectorRef = componentRef.changeDetectorRef;
|
|
88
88
|
this.elementRef = componentRef.location;
|
|
89
|
-
this.debugElement = getDebugNode
|
|
89
|
+
this.debugElement = getDebugNode(this.elementRef.nativeElement);
|
|
90
90
|
this.componentInstance = componentRef.instance;
|
|
91
91
|
this.nativeElement = this.elementRef.nativeElement;
|
|
92
92
|
this.componentRef = componentRef;
|
|
@@ -1095,17 +1095,6 @@ function assertOneOf(value, ...validValues) {
|
|
|
1095
1095
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1096
1096
|
* found in the LICENSE file at https://angular.io/license
|
|
1097
1097
|
*/
|
|
1098
|
-
/**
|
|
1099
|
-
* Equivalent to ES6 spread, add each item to an array.
|
|
1100
|
-
*
|
|
1101
|
-
* @param items The items to add
|
|
1102
|
-
* @param arr The array to which you want to add the items
|
|
1103
|
-
*/
|
|
1104
|
-
function addAllToArray(items, arr) {
|
|
1105
|
-
for (let i = 0; i < items.length; i++) {
|
|
1106
|
-
arr.push(items[i]);
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
1098
|
/**
|
|
1110
1099
|
* Determines if the contents of two arrays is identical
|
|
1111
1100
|
*
|
|
@@ -1133,25 +1122,8 @@ function arrayEquals(a, b, identityAccessor) {
|
|
|
1133
1122
|
/**
|
|
1134
1123
|
* Flattens an array.
|
|
1135
1124
|
*/
|
|
1136
|
-
function flatten$1(list
|
|
1137
|
-
|
|
1138
|
-
dst = list;
|
|
1139
|
-
for (let i = 0; i < list.length; i++) {
|
|
1140
|
-
let item = list[i];
|
|
1141
|
-
if (Array.isArray(item)) {
|
|
1142
|
-
// we need to inline it.
|
|
1143
|
-
if (dst === list) {
|
|
1144
|
-
// Our assumption that the list was already flat was wrong and
|
|
1145
|
-
// we need to clone flat since we need to write to it.
|
|
1146
|
-
dst = list.slice(0, i);
|
|
1147
|
-
}
|
|
1148
|
-
flatten$1(item, dst);
|
|
1149
|
-
}
|
|
1150
|
-
else if (dst !== list) {
|
|
1151
|
-
dst.push(item);
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
return dst;
|
|
1125
|
+
function flatten$1(list) {
|
|
1126
|
+
return list.flat(Number.POSITIVE_INFINITY);
|
|
1155
1127
|
}
|
|
1156
1128
|
function deepForEach(input, fn) {
|
|
1157
1129
|
input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));
|
|
@@ -1261,46 +1233,6 @@ function arrayInsert2(array, index, value1, value2) {
|
|
|
1261
1233
|
array[index + 1] = value2;
|
|
1262
1234
|
}
|
|
1263
1235
|
}
|
|
1264
|
-
/**
|
|
1265
|
-
* Insert a `value` into an `array` so that the array remains sorted.
|
|
1266
|
-
*
|
|
1267
|
-
* NOTE:
|
|
1268
|
-
* - Duplicates are not allowed, and are ignored.
|
|
1269
|
-
* - This uses binary search algorithm for fast inserts.
|
|
1270
|
-
*
|
|
1271
|
-
* @param array A sorted array to insert into.
|
|
1272
|
-
* @param value The value to insert.
|
|
1273
|
-
* @returns index of the inserted value.
|
|
1274
|
-
*/
|
|
1275
|
-
function arrayInsertSorted(array, value) {
|
|
1276
|
-
let index = arrayIndexOfSorted(array, value);
|
|
1277
|
-
if (index < 0) {
|
|
1278
|
-
// if we did not find it insert it.
|
|
1279
|
-
index = ~index;
|
|
1280
|
-
arrayInsert(array, index, value);
|
|
1281
|
-
}
|
|
1282
|
-
return index;
|
|
1283
|
-
}
|
|
1284
|
-
/**
|
|
1285
|
-
* Remove `value` from a sorted `array`.
|
|
1286
|
-
*
|
|
1287
|
-
* NOTE:
|
|
1288
|
-
* - This uses binary search algorithm for fast removals.
|
|
1289
|
-
*
|
|
1290
|
-
* @param array A sorted array to remove from.
|
|
1291
|
-
* @param value The value to remove.
|
|
1292
|
-
* @returns index of the removed value.
|
|
1293
|
-
* - positive index if value found and removed.
|
|
1294
|
-
* - negative index if value not found. (`~index` to get the value where it should have been
|
|
1295
|
-
* inserted)
|
|
1296
|
-
*/
|
|
1297
|
-
function arrayRemoveSorted(array, value) {
|
|
1298
|
-
const index = arrayIndexOfSorted(array, value);
|
|
1299
|
-
if (index >= 0) {
|
|
1300
|
-
arraySplice(array, index, 1);
|
|
1301
|
-
}
|
|
1302
|
-
return index;
|
|
1303
|
-
}
|
|
1304
1236
|
/**
|
|
1305
1237
|
* Get an index of an `value` in a sorted `array`.
|
|
1306
1238
|
*
|
|
@@ -2803,6 +2735,14 @@ function getDirectiveDef(type) {
|
|
|
2803
2735
|
function getPipeDef$1(type) {
|
|
2804
2736
|
return type[NG_PIPE_DEF] || null;
|
|
2805
2737
|
}
|
|
2738
|
+
/**
|
|
2739
|
+
* Checks whether a given Component, Directive or Pipe is marked as standalone.
|
|
2740
|
+
* This will return false if passed anything other than a Component, Directive, or Pipe class
|
|
2741
|
+
* See this guide for additional information: https://angular.io/guide/standalone-components
|
|
2742
|
+
*
|
|
2743
|
+
* @param type A reference to a Component, Directive or Pipe.
|
|
2744
|
+
* @publicApi
|
|
2745
|
+
*/
|
|
2806
2746
|
function isStandalone(type) {
|
|
2807
2747
|
const def = getComponentDef$1(type) || getDirectiveDef(type) || getPipeDef$1(type);
|
|
2808
2748
|
return def !== null ? def.standalone : false;
|
|
@@ -2851,7 +2791,7 @@ const MOVED_VIEWS = 9;
|
|
|
2851
2791
|
const CONTAINER_HEADER_OFFSET = 10;
|
|
2852
2792
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
2853
2793
|
// failure based on types.
|
|
2854
|
-
const unusedValueExportToPlacateAjd$
|
|
2794
|
+
const unusedValueExportToPlacateAjd$4 = 1;
|
|
2855
2795
|
|
|
2856
2796
|
/**
|
|
2857
2797
|
* @license
|
|
@@ -2894,18 +2834,9 @@ const EMBEDDED_VIEW_INJECTOR = 21;
|
|
|
2894
2834
|
* there should be no need to refer to `HEADER_OFFSET` anywhere else.
|
|
2895
2835
|
*/
|
|
2896
2836
|
const HEADER_OFFSET = 22;
|
|
2897
|
-
/**
|
|
2898
|
-
* Converts `TViewType` into human readable text.
|
|
2899
|
-
* Make sure this matches with `TViewType`
|
|
2900
|
-
*/
|
|
2901
|
-
const TViewTypeAsString = [
|
|
2902
|
-
'Root',
|
|
2903
|
-
'Component',
|
|
2904
|
-
'Embedded', // 2
|
|
2905
|
-
];
|
|
2906
2837
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
2907
2838
|
// failure based on types.
|
|
2908
|
-
const unusedValueExportToPlacateAjd$
|
|
2839
|
+
const unusedValueExportToPlacateAjd$3 = 1;
|
|
2909
2840
|
|
|
2910
2841
|
/**
|
|
2911
2842
|
* @license
|
|
@@ -2990,11 +2921,6 @@ function assertHasParent(tNode) {
|
|
|
2990
2921
|
assertDefined(tNode, 'currentTNode should exist!');
|
|
2991
2922
|
assertDefined(tNode.parent, 'currentTNode should have a parent');
|
|
2992
2923
|
}
|
|
2993
|
-
function assertDataNext(lView, index, arr) {
|
|
2994
|
-
if (arr == null)
|
|
2995
|
-
arr = lView;
|
|
2996
|
-
assertEqual(arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);
|
|
2997
|
-
}
|
|
2998
2924
|
function assertLContainer(value) {
|
|
2999
2925
|
assertDefined(value, 'LContainer must be defined');
|
|
3000
2926
|
assertEqual(isLContainer(value), true, 'Expecting LContainer');
|
|
@@ -3025,10 +2951,6 @@ function assertIndexInDeclRange(lView, index) {
|
|
|
3025
2951
|
const tView = lView[1];
|
|
3026
2952
|
assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);
|
|
3027
2953
|
}
|
|
3028
|
-
function assertIndexInVarsRange(lView, index) {
|
|
3029
|
-
const tView = lView[1];
|
|
3030
|
-
assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);
|
|
3031
|
-
}
|
|
3032
2954
|
function assertIndexInExpandoRange(lView, index) {
|
|
3033
2955
|
const tView = lView[1];
|
|
3034
2956
|
assertBetween(tView.expandoStartIndex, lView.length, index);
|
|
@@ -3247,14 +3169,7 @@ const profiler = function (event, instance, hookOrListener) {
|
|
|
3247
3169
|
* found in the LICENSE file at https://angular.io/license
|
|
3248
3170
|
*/
|
|
3249
3171
|
const SVG_NAMESPACE = 'svg';
|
|
3250
|
-
const SVG_NAMESPACE_URI = 'http://www.w3.org/2000/svg';
|
|
3251
3172
|
const MATH_ML_NAMESPACE = 'math';
|
|
3252
|
-
const MATH_ML_NAMESPACE_URI = 'http://www.w3.org/1998/MathML/';
|
|
3253
|
-
function getNamespaceUri(namespace) {
|
|
3254
|
-
const name = namespace.toLowerCase();
|
|
3255
|
-
return name === SVG_NAMESPACE ? SVG_NAMESPACE_URI :
|
|
3256
|
-
(name === MATH_ML_NAMESPACE ? MATH_ML_NAMESPACE_URI : null);
|
|
3257
|
-
}
|
|
3258
3173
|
|
|
3259
3174
|
/**
|
|
3260
3175
|
* @license
|
|
@@ -3303,20 +3218,6 @@ function unwrapLView(value) {
|
|
|
3303
3218
|
}
|
|
3304
3219
|
return null;
|
|
3305
3220
|
}
|
|
3306
|
-
/**
|
|
3307
|
-
* Returns `LContainer` or `null` if not found.
|
|
3308
|
-
* @param value wrapped value of `RNode`, `LView`, `LContainer`
|
|
3309
|
-
*/
|
|
3310
|
-
function unwrapLContainer(value) {
|
|
3311
|
-
while (Array.isArray(value)) {
|
|
3312
|
-
// This check is same as `isLContainer()` but we don't call at as we don't want to call
|
|
3313
|
-
// `Array.isArray()` twice and give JITer more work for inlining.
|
|
3314
|
-
if (value[TYPE] === true)
|
|
3315
|
-
return value;
|
|
3316
|
-
value = value[HOST];
|
|
3317
|
-
}
|
|
3318
|
-
return null;
|
|
3319
|
-
}
|
|
3320
3221
|
/**
|
|
3321
3222
|
* Retrieves an element value from the provided `viewData`, by unwrapping
|
|
3322
3223
|
* from any containers, component views, or style contexts.
|
|
@@ -3576,9 +3477,6 @@ function isCurrentTNodeParent() {
|
|
|
3576
3477
|
function setCurrentTNodeAsNotParent() {
|
|
3577
3478
|
instructionState.lFrame.isParent = false;
|
|
3578
3479
|
}
|
|
3579
|
-
function setCurrentTNodeAsParent() {
|
|
3580
|
-
instructionState.lFrame.isParent = true;
|
|
3581
|
-
}
|
|
3582
3480
|
function getContextLView() {
|
|
3583
3481
|
const contextLView = instructionState.lFrame.contextLView;
|
|
3584
3482
|
ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');
|
|
@@ -4301,7 +4199,7 @@ function isFactory(obj) {
|
|
|
4301
4199
|
}
|
|
4302
4200
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
4303
4201
|
// failure based on types.
|
|
4304
|
-
const unusedValueExportToPlacateAjd$
|
|
4202
|
+
const unusedValueExportToPlacateAjd$2 = 1;
|
|
4305
4203
|
|
|
4306
4204
|
/**
|
|
4307
4205
|
* Converts `TNodeType` into human readable text.
|
|
@@ -4320,7 +4218,7 @@ function toTNodeTypeAsString(tNodeType) {
|
|
|
4320
4218
|
}
|
|
4321
4219
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
4322
4220
|
// failure based on types.
|
|
4323
|
-
const unusedValueExportToPlacateAjd$
|
|
4221
|
+
const unusedValueExportToPlacateAjd$1 = 1;
|
|
4324
4222
|
/**
|
|
4325
4223
|
* Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.
|
|
4326
4224
|
*
|
|
@@ -6002,6 +5900,10 @@ function unregisterLView(lView) {
|
|
|
6002
5900
|
* of the context.
|
|
6003
5901
|
*/
|
|
6004
5902
|
class LContext {
|
|
5903
|
+
/** Component's parent view data. */
|
|
5904
|
+
get lView() {
|
|
5905
|
+
return getLViewById(this.lViewId);
|
|
5906
|
+
}
|
|
6005
5907
|
constructor(
|
|
6006
5908
|
/**
|
|
6007
5909
|
* ID of the component's parent view data.
|
|
@@ -6019,10 +5921,6 @@ class LContext {
|
|
|
6019
5921
|
this.nodeIndex = nodeIndex;
|
|
6020
5922
|
this.native = native;
|
|
6021
5923
|
}
|
|
6022
|
-
/** Component's parent view data. */
|
|
6023
|
-
get lView() {
|
|
6024
|
-
return getLViewById(this.lViewId);
|
|
6025
|
-
}
|
|
6026
5924
|
}
|
|
6027
5925
|
|
|
6028
5926
|
/**
|
|
@@ -6361,28 +6259,6 @@ function ensureIcuContainerVisitorLoaded(loader) {
|
|
|
6361
6259
|
}
|
|
6362
6260
|
}
|
|
6363
6261
|
|
|
6364
|
-
/**
|
|
6365
|
-
* @license
|
|
6366
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6367
|
-
*
|
|
6368
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6369
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6370
|
-
*/
|
|
6371
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
6372
|
-
// failure based on types.
|
|
6373
|
-
const unusedValueExportToPlacateAjd$4 = 1;
|
|
6374
|
-
|
|
6375
|
-
/**
|
|
6376
|
-
* @license
|
|
6377
|
-
* Copyright Google LLC All Rights Reserved.
|
|
6378
|
-
*
|
|
6379
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6380
|
-
* found in the LICENSE file at https://angular.io/license
|
|
6381
|
-
*/
|
|
6382
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
6383
|
-
// failure based on types.
|
|
6384
|
-
const unusedValueExportToPlacateAjd$3 = 1;
|
|
6385
|
-
|
|
6386
6262
|
/**
|
|
6387
6263
|
* @license
|
|
6388
6264
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6454,7 +6330,6 @@ function getNearestLContainer(viewOrContainer) {
|
|
|
6454
6330
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6455
6331
|
* found in the LICENSE file at https://angular.io/license
|
|
6456
6332
|
*/
|
|
6457
|
-
const unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$8 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$7;
|
|
6458
6333
|
/**
|
|
6459
6334
|
* NOTE: for performance reasons, the possible actions are inlined within the function instead of
|
|
6460
6335
|
* being passed as an argument.
|
|
@@ -8943,6 +8818,12 @@ function getNullInjector() {
|
|
|
8943
8818
|
class EnvironmentInjector {
|
|
8944
8819
|
}
|
|
8945
8820
|
class R3Injector extends EnvironmentInjector {
|
|
8821
|
+
/**
|
|
8822
|
+
* Flag indicating that this injector was previously destroyed.
|
|
8823
|
+
*/
|
|
8824
|
+
get destroyed() {
|
|
8825
|
+
return this._destroyed;
|
|
8826
|
+
}
|
|
8946
8827
|
constructor(providers, parent, source, scopes) {
|
|
8947
8828
|
super();
|
|
8948
8829
|
this.parent = parent;
|
|
@@ -8977,12 +8858,6 @@ class R3Injector extends EnvironmentInjector {
|
|
|
8977
8858
|
this.injectorDefTypes =
|
|
8978
8859
|
new Set(this.get(INJECTOR_DEF_TYPES.multi, EMPTY_ARRAY, InjectFlags.Self));
|
|
8979
8860
|
}
|
|
8980
|
-
/**
|
|
8981
|
-
* Flag indicating that this injector was previously destroyed.
|
|
8982
|
-
*/
|
|
8983
|
-
get destroyed() {
|
|
8984
|
-
return this._destroyed;
|
|
8985
|
-
}
|
|
8986
8861
|
/**
|
|
8987
8862
|
* Destroy the injector and release references to every instance or provider associated with it.
|
|
8988
8863
|
*
|
|
@@ -9442,7 +9317,6 @@ function unwrapElementRef(value) {
|
|
|
9442
9317
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9443
9318
|
* found in the LICENSE file at https://angular.io/license
|
|
9444
9319
|
*/
|
|
9445
|
-
const Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');
|
|
9446
9320
|
/**
|
|
9447
9321
|
* Creates and initializes a custom renderer that implements the `Renderer2` base class.
|
|
9448
9322
|
*
|
|
@@ -9526,7 +9400,7 @@ class Version {
|
|
|
9526
9400
|
/**
|
|
9527
9401
|
* @publicApi
|
|
9528
9402
|
*/
|
|
9529
|
-
const VERSION = new Version('15.1.0-next.
|
|
9403
|
+
const VERSION = new Version('15.1.0-next.2');
|
|
9530
9404
|
|
|
9531
9405
|
/**
|
|
9532
9406
|
* @license
|
|
@@ -9792,7 +9666,6 @@ function classIndexOf(className, classToSearch, startingIndex) {
|
|
|
9792
9666
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9793
9667
|
* found in the LICENSE file at https://angular.io/license
|
|
9794
9668
|
*/
|
|
9795
|
-
const unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$4;
|
|
9796
9669
|
const NG_TEMPLATE_SELECTOR = 'ng-template';
|
|
9797
9670
|
/**
|
|
9798
9671
|
* Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)
|
|
@@ -11256,874 +11129,68 @@ class ReflectiveInjector_ {
|
|
|
11256
11129
|
return `ReflectiveInjector(providers: [${providers}])`;
|
|
11257
11130
|
}
|
|
11258
11131
|
toString() {
|
|
11259
|
-
return this.displayName;
|
|
11260
|
-
}
|
|
11261
|
-
}
|
|
11262
|
-
ReflectiveInjector_.INJECTOR_KEY = ( /* @__PURE__ */ReflectiveKey.get(Injector));
|
|
11263
|
-
function _mapProviders(injector, fn) {
|
|
11264
|
-
const res = [];
|
|
11265
|
-
for (let i = 0; i < injector._providers.length; ++i) {
|
|
11266
|
-
res[i] = fn(injector.getProviderAtIndex(i));
|
|
11267
|
-
}
|
|
11268
|
-
return res;
|
|
11269
|
-
}
|
|
11270
|
-
|
|
11271
|
-
/**
|
|
11272
|
-
* @license
|
|
11273
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11274
|
-
*
|
|
11275
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11276
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11277
|
-
*/
|
|
11278
|
-
|
|
11279
|
-
/**
|
|
11280
|
-
* @license
|
|
11281
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11282
|
-
*
|
|
11283
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11284
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11285
|
-
*/
|
|
11286
|
-
|
|
11287
|
-
/**
|
|
11288
|
-
* @license
|
|
11289
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11290
|
-
*
|
|
11291
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11292
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11293
|
-
*/
|
|
11294
|
-
function ɵɵdirectiveInject(token, flags = InjectFlags.Default) {
|
|
11295
|
-
const lView = getLView();
|
|
11296
|
-
// Fall back to inject() if view hasn't been created. This situation can happen in tests
|
|
11297
|
-
// if inject utilities are used before bootstrapping.
|
|
11298
|
-
if (lView === null) {
|
|
11299
|
-
// Verify that we will not get into infinite loop.
|
|
11300
|
-
ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);
|
|
11301
|
-
return ɵɵinject(token, flags);
|
|
11302
|
-
}
|
|
11303
|
-
const tNode = getCurrentTNode();
|
|
11304
|
-
return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);
|
|
11305
|
-
}
|
|
11306
|
-
/**
|
|
11307
|
-
* Throws an error indicating that a factory function could not be generated by the compiler for a
|
|
11308
|
-
* particular class.
|
|
11309
|
-
*
|
|
11310
|
-
* This instruction allows the actual error message to be optimized away when ngDevMode is turned
|
|
11311
|
-
* off, saving bytes of generated code while still providing a good experience in dev mode.
|
|
11312
|
-
*
|
|
11313
|
-
* The name of the class is not mentioned here, but will be in the generated factory function name
|
|
11314
|
-
* and thus in the stack trace.
|
|
11315
|
-
*
|
|
11316
|
-
* @codeGenApi
|
|
11317
|
-
*/
|
|
11318
|
-
function ɵɵinvalidFactory() {
|
|
11319
|
-
const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';
|
|
11320
|
-
throw new Error(msg);
|
|
11321
|
-
}
|
|
11322
|
-
|
|
11323
|
-
/**
|
|
11324
|
-
* @license
|
|
11325
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11326
|
-
*
|
|
11327
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11328
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11329
|
-
*/
|
|
11330
|
-
/**
|
|
11331
|
-
* THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!
|
|
11332
|
-
*/
|
|
11333
|
-
/**
|
|
11334
|
-
* Creates an `Array` construction with a given name. This is useful when
|
|
11335
|
-
* looking for memory consumption to see what time of array it is.
|
|
11336
|
-
*
|
|
11337
|
-
*
|
|
11338
|
-
* @param name Name to give to the constructor
|
|
11339
|
-
* @returns A subclass of `Array` if possible. This can only be done in
|
|
11340
|
-
* environments which support `class` construct.
|
|
11341
|
-
*/
|
|
11342
|
-
function createNamedArrayType(name) {
|
|
11343
|
-
// This should never be called in prod mode, so let's verify that is the case.
|
|
11344
|
-
if (ngDevMode) {
|
|
11345
|
-
try {
|
|
11346
|
-
// If this function were compromised the following could lead to arbitrary
|
|
11347
|
-
// script execution. We bless it with Trusted Types anyway since this
|
|
11348
|
-
// function is stripped out of production binaries.
|
|
11349
|
-
return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array);
|
|
11350
|
-
}
|
|
11351
|
-
catch (e) {
|
|
11352
|
-
// If it does not work just give up and fall back to regular Array.
|
|
11353
|
-
return Array;
|
|
11354
|
-
}
|
|
11355
|
-
}
|
|
11356
|
-
else {
|
|
11357
|
-
throw new Error('Looks like we are in \'prod mode\', but we are creating a named Array type, which is wrong! Check your code');
|
|
11358
|
-
}
|
|
11359
|
-
}
|
|
11360
|
-
|
|
11361
|
-
/**
|
|
11362
|
-
* @license
|
|
11363
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11364
|
-
*
|
|
11365
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11366
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11367
|
-
*/
|
|
11368
|
-
function toTStylingRange(prev, next) {
|
|
11369
|
-
ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11370
|
-
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11371
|
-
return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
11372
|
-
}
|
|
11373
|
-
function getTStylingRangePrev(tStylingRange) {
|
|
11374
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11375
|
-
return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
|
|
11376
|
-
}
|
|
11377
|
-
function getTStylingRangePrevDuplicate(tStylingRange) {
|
|
11378
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11379
|
-
return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
|
|
11380
|
-
2 /* StylingRange.PREV_DUPLICATE */;
|
|
11381
|
-
}
|
|
11382
|
-
function setTStylingRangePrev(tStylingRange, previous) {
|
|
11383
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11384
|
-
ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11385
|
-
return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
|
|
11386
|
-
(previous << 17 /* StylingRange.PREV_SHIFT */));
|
|
11387
|
-
}
|
|
11388
|
-
function setTStylingRangePrevDuplicate(tStylingRange) {
|
|
11389
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11390
|
-
return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
|
|
11391
|
-
}
|
|
11392
|
-
function getTStylingRangeNext(tStylingRange) {
|
|
11393
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11394
|
-
return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
|
|
11395
|
-
}
|
|
11396
|
-
function setTStylingRangeNext(tStylingRange, next) {
|
|
11397
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11398
|
-
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11399
|
-
return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
|
|
11400
|
-
next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
11401
|
-
}
|
|
11402
|
-
function getTStylingRangeNextDuplicate(tStylingRange) {
|
|
11403
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11404
|
-
return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
|
|
11405
|
-
1 /* StylingRange.NEXT_DUPLICATE */;
|
|
11406
|
-
}
|
|
11407
|
-
function setTStylingRangeNextDuplicate(tStylingRange) {
|
|
11408
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11409
|
-
return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
|
|
11410
|
-
}
|
|
11411
|
-
function getTStylingRangeTail(tStylingRange) {
|
|
11412
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11413
|
-
const next = getTStylingRangeNext(tStylingRange);
|
|
11414
|
-
return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
|
|
11415
|
-
}
|
|
11416
|
-
|
|
11417
|
-
/**
|
|
11418
|
-
* @license
|
|
11419
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11420
|
-
*
|
|
11421
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11422
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11423
|
-
*/
|
|
11424
|
-
/**
|
|
11425
|
-
* Patch a `debug` property on top of the existing object.
|
|
11426
|
-
*
|
|
11427
|
-
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
11428
|
-
*
|
|
11429
|
-
* @param obj Object to patch
|
|
11430
|
-
* @param debug Value to patch
|
|
11431
|
-
*/
|
|
11432
|
-
function attachDebugObject(obj, debug) {
|
|
11433
|
-
if (ngDevMode) {
|
|
11434
|
-
Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
|
|
11435
|
-
}
|
|
11436
|
-
else {
|
|
11437
|
-
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
11438
|
-
}
|
|
11439
|
-
}
|
|
11440
|
-
/**
|
|
11441
|
-
* Patch a `debug` property getter on top of the existing object.
|
|
11442
|
-
*
|
|
11443
|
-
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
11444
|
-
*
|
|
11445
|
-
* @param obj Object to patch
|
|
11446
|
-
* @param debugGetter Getter returning a value to patch
|
|
11447
|
-
*/
|
|
11448
|
-
function attachDebugGetter(obj, debugGetter) {
|
|
11449
|
-
if (ngDevMode) {
|
|
11450
|
-
Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
|
|
11451
|
-
}
|
|
11452
|
-
else {
|
|
11453
|
-
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
11454
|
-
}
|
|
11455
|
-
}
|
|
11456
|
-
|
|
11457
|
-
/**
|
|
11458
|
-
* @license
|
|
11459
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11460
|
-
*
|
|
11461
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11462
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11463
|
-
*/
|
|
11464
|
-
/*
|
|
11465
|
-
* This file contains conditionally attached classes which provide human readable (debug) level
|
|
11466
|
-
* information for `LView`, `LContainer` and other internal data structures. These data structures
|
|
11467
|
-
* are stored internally as array which makes it very difficult during debugging to reason about the
|
|
11468
|
-
* current state of the system.
|
|
11469
|
-
*
|
|
11470
|
-
* Patching the array with extra property does change the array's hidden class' but it does not
|
|
11471
|
-
* change the cost of access, therefore this patching should not have significant if any impact in
|
|
11472
|
-
* `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)
|
|
11473
|
-
*
|
|
11474
|
-
* So instead of seeing:
|
|
11475
|
-
* ```
|
|
11476
|
-
* Array(30) [Object, 659, null, …]
|
|
11477
|
-
* ```
|
|
11478
|
-
*
|
|
11479
|
-
* You get to see:
|
|
11480
|
-
* ```
|
|
11481
|
-
* LViewDebug {
|
|
11482
|
-
* views: [...],
|
|
11483
|
-
* flags: {attached: true, ...}
|
|
11484
|
-
* nodes: [
|
|
11485
|
-
* {html: '<div id="123">', ..., nodes: [
|
|
11486
|
-
* {html: '<span>', ..., nodes: null}
|
|
11487
|
-
* ]}
|
|
11488
|
-
* ]
|
|
11489
|
-
* }
|
|
11490
|
-
* ```
|
|
11491
|
-
*/
|
|
11492
|
-
let LVIEW_COMPONENT_CACHE;
|
|
11493
|
-
let LVIEW_EMBEDDED_CACHE;
|
|
11494
|
-
let LVIEW_ROOT;
|
|
11495
|
-
let LVIEW_COMPONENT;
|
|
11496
|
-
let LVIEW_EMBEDDED;
|
|
11497
|
-
/**
|
|
11498
|
-
* This function clones a blueprint and creates LView.
|
|
11499
|
-
*
|
|
11500
|
-
* Simple slice will keep the same type, and we need it to be LView
|
|
11501
|
-
*/
|
|
11502
|
-
function cloneToLViewFromTViewBlueprint(tView) {
|
|
11503
|
-
const debugTView = tView;
|
|
11504
|
-
const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);
|
|
11505
|
-
return lView.concat(tView.blueprint);
|
|
11506
|
-
}
|
|
11507
|
-
class LRootView extends Array {
|
|
11508
|
-
}
|
|
11509
|
-
class LComponentView extends Array {
|
|
11510
|
-
}
|
|
11511
|
-
class LEmbeddedView extends Array {
|
|
11512
|
-
}
|
|
11513
|
-
function getLViewToClone(type, name) {
|
|
11514
|
-
switch (type) {
|
|
11515
|
-
case 0 /* TViewType.Root */:
|
|
11516
|
-
if (LVIEW_ROOT === undefined)
|
|
11517
|
-
LVIEW_ROOT = new LRootView();
|
|
11518
|
-
return LVIEW_ROOT;
|
|
11519
|
-
case 1 /* TViewType.Component */:
|
|
11520
|
-
if (!ngDevMode || !ngDevMode.namedConstructors) {
|
|
11521
|
-
if (LVIEW_COMPONENT === undefined)
|
|
11522
|
-
LVIEW_COMPONENT = new LComponentView();
|
|
11523
|
-
return LVIEW_COMPONENT;
|
|
11524
|
-
}
|
|
11525
|
-
if (LVIEW_COMPONENT_CACHE === undefined)
|
|
11526
|
-
LVIEW_COMPONENT_CACHE = new Map();
|
|
11527
|
-
let componentArray = LVIEW_COMPONENT_CACHE.get(name);
|
|
11528
|
-
if (componentArray === undefined) {
|
|
11529
|
-
componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();
|
|
11530
|
-
LVIEW_COMPONENT_CACHE.set(name, componentArray);
|
|
11531
|
-
}
|
|
11532
|
-
return componentArray;
|
|
11533
|
-
case 2 /* TViewType.Embedded */:
|
|
11534
|
-
if (!ngDevMode || !ngDevMode.namedConstructors) {
|
|
11535
|
-
if (LVIEW_EMBEDDED === undefined)
|
|
11536
|
-
LVIEW_EMBEDDED = new LEmbeddedView();
|
|
11537
|
-
return LVIEW_EMBEDDED;
|
|
11538
|
-
}
|
|
11539
|
-
if (LVIEW_EMBEDDED_CACHE === undefined)
|
|
11540
|
-
LVIEW_EMBEDDED_CACHE = new Map();
|
|
11541
|
-
let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);
|
|
11542
|
-
if (embeddedArray === undefined) {
|
|
11543
|
-
embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();
|
|
11544
|
-
LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);
|
|
11545
|
-
}
|
|
11546
|
-
return embeddedArray;
|
|
11547
|
-
}
|
|
11548
|
-
}
|
|
11549
|
-
function nameSuffix(text) {
|
|
11550
|
-
if (text == null)
|
|
11551
|
-
return '';
|
|
11552
|
-
const index = text.lastIndexOf('_Template');
|
|
11553
|
-
return '_' + (index === -1 ? text : text.slice(0, index));
|
|
11554
|
-
}
|
|
11555
|
-
/**
|
|
11556
|
-
* This class is a debug version of Object literal so that we can have constructor name show up
|
|
11557
|
-
* in
|
|
11558
|
-
* debug tools in ngDevMode.
|
|
11559
|
-
*/
|
|
11560
|
-
const TViewConstructor = class TView {
|
|
11561
|
-
constructor(type, blueprint, template, queries, viewQuery, declTNode, data, bindingStartIndex, expandoStartIndex, hostBindingOpCodes, firstCreatePass, firstUpdatePass, staticViewQueries, staticContentQueries, preOrderHooks, preOrderCheckHooks, contentHooks, contentCheckHooks, viewHooks, viewCheckHooks, destroyHooks, cleanup, contentQueries, components, directiveRegistry, pipeRegistry, firstChild, schemas, consts, incompleteFirstPass, _decls, _vars) {
|
|
11562
|
-
this.type = type;
|
|
11563
|
-
this.blueprint = blueprint;
|
|
11564
|
-
this.template = template;
|
|
11565
|
-
this.queries = queries;
|
|
11566
|
-
this.viewQuery = viewQuery;
|
|
11567
|
-
this.declTNode = declTNode;
|
|
11568
|
-
this.data = data;
|
|
11569
|
-
this.bindingStartIndex = bindingStartIndex;
|
|
11570
|
-
this.expandoStartIndex = expandoStartIndex;
|
|
11571
|
-
this.hostBindingOpCodes = hostBindingOpCodes;
|
|
11572
|
-
this.firstCreatePass = firstCreatePass;
|
|
11573
|
-
this.firstUpdatePass = firstUpdatePass;
|
|
11574
|
-
this.staticViewQueries = staticViewQueries;
|
|
11575
|
-
this.staticContentQueries = staticContentQueries;
|
|
11576
|
-
this.preOrderHooks = preOrderHooks;
|
|
11577
|
-
this.preOrderCheckHooks = preOrderCheckHooks;
|
|
11578
|
-
this.contentHooks = contentHooks;
|
|
11579
|
-
this.contentCheckHooks = contentCheckHooks;
|
|
11580
|
-
this.viewHooks = viewHooks;
|
|
11581
|
-
this.viewCheckHooks = viewCheckHooks;
|
|
11582
|
-
this.destroyHooks = destroyHooks;
|
|
11583
|
-
this.cleanup = cleanup;
|
|
11584
|
-
this.contentQueries = contentQueries;
|
|
11585
|
-
this.components = components;
|
|
11586
|
-
this.directiveRegistry = directiveRegistry;
|
|
11587
|
-
this.pipeRegistry = pipeRegistry;
|
|
11588
|
-
this.firstChild = firstChild;
|
|
11589
|
-
this.schemas = schemas;
|
|
11590
|
-
this.consts = consts;
|
|
11591
|
-
this.incompleteFirstPass = incompleteFirstPass;
|
|
11592
|
-
this._decls = _decls;
|
|
11593
|
-
this._vars = _vars;
|
|
11594
|
-
}
|
|
11595
|
-
get template_() {
|
|
11596
|
-
const buf = [];
|
|
11597
|
-
processTNodeChildren(this.firstChild, buf);
|
|
11598
|
-
return buf.join('');
|
|
11599
|
-
}
|
|
11600
|
-
get type_() {
|
|
11601
|
-
return TViewTypeAsString[this.type] || `TViewType.?${this.type}?`;
|
|
11602
|
-
}
|
|
11603
|
-
};
|
|
11604
|
-
class TNode {
|
|
11605
|
-
constructor(tView_, //
|
|
11606
|
-
type, //
|
|
11607
|
-
index, //
|
|
11608
|
-
insertBeforeIndex, //
|
|
11609
|
-
injectorIndex, //
|
|
11610
|
-
componentOffset, //
|
|
11611
|
-
directiveStart, //
|
|
11612
|
-
directiveEnd, //
|
|
11613
|
-
directiveStylingLast, //
|
|
11614
|
-
propertyBindings, //
|
|
11615
|
-
flags, //
|
|
11616
|
-
providerIndexes, //
|
|
11617
|
-
value, //
|
|
11618
|
-
attrs, //
|
|
11619
|
-
mergedAttrs, //
|
|
11620
|
-
localNames, //
|
|
11621
|
-
initialInputs, //
|
|
11622
|
-
inputs, //
|
|
11623
|
-
outputs, //
|
|
11624
|
-
tViews, //
|
|
11625
|
-
next, //
|
|
11626
|
-
projectionNext, //
|
|
11627
|
-
child, //
|
|
11628
|
-
parent, //
|
|
11629
|
-
projection, //
|
|
11630
|
-
styles, //
|
|
11631
|
-
stylesWithoutHost, //
|
|
11632
|
-
residualStyles, //
|
|
11633
|
-
classes, //
|
|
11634
|
-
classesWithoutHost, //
|
|
11635
|
-
residualClasses, //
|
|
11636
|
-
classBindings, //
|
|
11637
|
-
styleBindings) {
|
|
11638
|
-
this.tView_ = tView_;
|
|
11639
|
-
this.type = type;
|
|
11640
|
-
this.index = index;
|
|
11641
|
-
this.insertBeforeIndex = insertBeforeIndex;
|
|
11642
|
-
this.injectorIndex = injectorIndex;
|
|
11643
|
-
this.componentOffset = componentOffset;
|
|
11644
|
-
this.directiveStart = directiveStart;
|
|
11645
|
-
this.directiveEnd = directiveEnd;
|
|
11646
|
-
this.directiveStylingLast = directiveStylingLast;
|
|
11647
|
-
this.propertyBindings = propertyBindings;
|
|
11648
|
-
this.flags = flags;
|
|
11649
|
-
this.providerIndexes = providerIndexes;
|
|
11650
|
-
this.value = value;
|
|
11651
|
-
this.attrs = attrs;
|
|
11652
|
-
this.mergedAttrs = mergedAttrs;
|
|
11653
|
-
this.localNames = localNames;
|
|
11654
|
-
this.initialInputs = initialInputs;
|
|
11655
|
-
this.inputs = inputs;
|
|
11656
|
-
this.outputs = outputs;
|
|
11657
|
-
this.tViews = tViews;
|
|
11658
|
-
this.next = next;
|
|
11659
|
-
this.projectionNext = projectionNext;
|
|
11660
|
-
this.child = child;
|
|
11661
|
-
this.parent = parent;
|
|
11662
|
-
this.projection = projection;
|
|
11663
|
-
this.styles = styles;
|
|
11664
|
-
this.stylesWithoutHost = stylesWithoutHost;
|
|
11665
|
-
this.residualStyles = residualStyles;
|
|
11666
|
-
this.classes = classes;
|
|
11667
|
-
this.classesWithoutHost = classesWithoutHost;
|
|
11668
|
-
this.residualClasses = residualClasses;
|
|
11669
|
-
this.classBindings = classBindings;
|
|
11670
|
-
this.styleBindings = styleBindings;
|
|
11671
|
-
}
|
|
11672
|
-
/**
|
|
11673
|
-
* Return a human debug version of the set of `NodeInjector`s which will be consulted when
|
|
11674
|
-
* resolving tokens from this `TNode`.
|
|
11675
|
-
*
|
|
11676
|
-
* When debugging applications, it is often difficult to determine which `NodeInjector`s will be
|
|
11677
|
-
* consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be
|
|
11678
|
-
* consulted in order when resolving a token starting at this `TNode`.
|
|
11679
|
-
*
|
|
11680
|
-
* The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is
|
|
11681
|
-
* difficult to reason about.
|
|
11682
|
-
*
|
|
11683
|
-
* @param lView The `LView` instance for this `TNode`.
|
|
11684
|
-
*/
|
|
11685
|
-
debugNodeInjectorPath(lView) {
|
|
11686
|
-
const path = [];
|
|
11687
|
-
let injectorIndex = getInjectorIndex(this, lView);
|
|
11688
|
-
if (injectorIndex === -1) {
|
|
11689
|
-
// Looks like the current `TNode` does not have `NodeInjector` associated with it => look for
|
|
11690
|
-
// parent NodeInjector.
|
|
11691
|
-
const parentLocation = getParentInjectorLocation(this, lView);
|
|
11692
|
-
if (parentLocation !== NO_PARENT_INJECTOR) {
|
|
11693
|
-
// We found a parent, so start searching from the parent location.
|
|
11694
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
11695
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
11696
|
-
}
|
|
11697
|
-
else {
|
|
11698
|
-
// No parents have been found, so there are no `NodeInjector`s to consult.
|
|
11699
|
-
}
|
|
11700
|
-
}
|
|
11701
|
-
while (injectorIndex !== -1) {
|
|
11702
|
-
ngDevMode && assertNodeInjector(lView, injectorIndex);
|
|
11703
|
-
const tNode = lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];
|
|
11704
|
-
path.push(buildDebugNode(tNode, lView));
|
|
11705
|
-
const parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];
|
|
11706
|
-
if (parentLocation === NO_PARENT_INJECTOR) {
|
|
11707
|
-
injectorIndex = -1;
|
|
11708
|
-
}
|
|
11709
|
-
else {
|
|
11710
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
11711
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
11712
|
-
}
|
|
11713
|
-
}
|
|
11714
|
-
return path;
|
|
11715
|
-
}
|
|
11716
|
-
get type_() {
|
|
11717
|
-
return toTNodeTypeAsString(this.type) || `TNodeType.?${this.type}?`;
|
|
11718
|
-
}
|
|
11719
|
-
get flags_() {
|
|
11720
|
-
const flags = [];
|
|
11721
|
-
if (this.flags & 8 /* TNodeFlags.hasClassInput */)
|
|
11722
|
-
flags.push('TNodeFlags.hasClassInput');
|
|
11723
|
-
if (this.flags & 4 /* TNodeFlags.hasContentQuery */)
|
|
11724
|
-
flags.push('TNodeFlags.hasContentQuery');
|
|
11725
|
-
if (this.flags & 16 /* TNodeFlags.hasStyleInput */)
|
|
11726
|
-
flags.push('TNodeFlags.hasStyleInput');
|
|
11727
|
-
if (this.flags & 64 /* TNodeFlags.hasHostBindings */)
|
|
11728
|
-
flags.push('TNodeFlags.hasHostBindings');
|
|
11729
|
-
if (this.flags & 1 /* TNodeFlags.isDirectiveHost */)
|
|
11730
|
-
flags.push('TNodeFlags.isDirectiveHost');
|
|
11731
|
-
if (this.flags & 32 /* TNodeFlags.isDetached */)
|
|
11732
|
-
flags.push('TNodeFlags.isDetached');
|
|
11733
|
-
if (this.flags & 2 /* TNodeFlags.isProjected */)
|
|
11734
|
-
flags.push('TNodeFlags.isProjected');
|
|
11735
|
-
return flags.join('|');
|
|
11736
|
-
}
|
|
11737
|
-
get template_() {
|
|
11738
|
-
if (this.type & 1 /* TNodeType.Text */)
|
|
11739
|
-
return this.value;
|
|
11740
|
-
const buf = [];
|
|
11741
|
-
const tagName = typeof this.value === 'string' && this.value || this.type_;
|
|
11742
|
-
buf.push('<', tagName);
|
|
11743
|
-
if (this.flags) {
|
|
11744
|
-
buf.push(' ', this.flags_);
|
|
11745
|
-
}
|
|
11746
|
-
if (this.attrs) {
|
|
11747
|
-
for (let i = 0; i < this.attrs.length;) {
|
|
11748
|
-
const attrName = this.attrs[i++];
|
|
11749
|
-
if (typeof attrName == 'number') {
|
|
11750
|
-
break;
|
|
11751
|
-
}
|
|
11752
|
-
const attrValue = this.attrs[i++];
|
|
11753
|
-
buf.push(' ', attrName, '="', attrValue, '"');
|
|
11754
|
-
}
|
|
11755
|
-
}
|
|
11756
|
-
buf.push('>');
|
|
11757
|
-
processTNodeChildren(this.child, buf);
|
|
11758
|
-
buf.push('</', tagName, '>');
|
|
11759
|
-
return buf.join('');
|
|
11760
|
-
}
|
|
11761
|
-
get styleBindings_() {
|
|
11762
|
-
return toDebugStyleBinding(this, false);
|
|
11763
|
-
}
|
|
11764
|
-
get classBindings_() {
|
|
11765
|
-
return toDebugStyleBinding(this, true);
|
|
11766
|
-
}
|
|
11767
|
-
get providerIndexStart_() {
|
|
11768
|
-
return this.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;
|
|
11769
|
-
}
|
|
11770
|
-
get providerIndexEnd_() {
|
|
11771
|
-
return this.providerIndexStart_ +
|
|
11772
|
-
(this.providerIndexes >>> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */);
|
|
11773
|
-
}
|
|
11774
|
-
}
|
|
11775
|
-
const TNodeDebug = TNode;
|
|
11776
|
-
function toDebugStyleBinding(tNode, isClassBased) {
|
|
11777
|
-
const tData = tNode.tView_.data;
|
|
11778
|
-
const bindings = [];
|
|
11779
|
-
const range = isClassBased ? tNode.classBindings : tNode.styleBindings;
|
|
11780
|
-
const prev = getTStylingRangePrev(range);
|
|
11781
|
-
const next = getTStylingRangeNext(range);
|
|
11782
|
-
let isTemplate = next !== 0;
|
|
11783
|
-
let cursor = isTemplate ? next : prev;
|
|
11784
|
-
while (cursor !== 0) {
|
|
11785
|
-
const itemKey = tData[cursor];
|
|
11786
|
-
const itemRange = tData[cursor + 1];
|
|
11787
|
-
bindings.unshift({
|
|
11788
|
-
key: itemKey,
|
|
11789
|
-
index: cursor,
|
|
11790
|
-
isTemplate: isTemplate,
|
|
11791
|
-
prevDuplicate: getTStylingRangePrevDuplicate(itemRange),
|
|
11792
|
-
nextDuplicate: getTStylingRangeNextDuplicate(itemRange),
|
|
11793
|
-
nextIndex: getTStylingRangeNext(itemRange),
|
|
11794
|
-
prevIndex: getTStylingRangePrev(itemRange),
|
|
11795
|
-
});
|
|
11796
|
-
if (cursor === prev)
|
|
11797
|
-
isTemplate = false;
|
|
11798
|
-
cursor = getTStylingRangePrev(itemRange);
|
|
11799
|
-
}
|
|
11800
|
-
bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);
|
|
11801
|
-
return bindings;
|
|
11802
|
-
}
|
|
11803
|
-
function processTNodeChildren(tNode, buf) {
|
|
11804
|
-
while (tNode) {
|
|
11805
|
-
buf.push(tNode.template_);
|
|
11806
|
-
tNode = tNode.next;
|
|
11807
|
-
}
|
|
11808
|
-
}
|
|
11809
|
-
class TViewData extends Array {
|
|
11810
|
-
}
|
|
11811
|
-
let TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because
|
|
11812
|
-
// `LView` constructor could have side-effects.
|
|
11813
|
-
/**
|
|
11814
|
-
* This function clones a blueprint and creates TData.
|
|
11815
|
-
*
|
|
11816
|
-
* Simple slice will keep the same type, and we need it to be TData
|
|
11817
|
-
*/
|
|
11818
|
-
function cloneToTViewData(list) {
|
|
11819
|
-
if (TVIEWDATA_EMPTY === undefined)
|
|
11820
|
-
TVIEWDATA_EMPTY = new TViewData();
|
|
11821
|
-
return TVIEWDATA_EMPTY.concat(list);
|
|
11822
|
-
}
|
|
11823
|
-
class LViewBlueprint extends Array {
|
|
11824
|
-
}
|
|
11825
|
-
class MatchesArray extends Array {
|
|
11826
|
-
}
|
|
11827
|
-
class TViewComponents extends Array {
|
|
11828
|
-
}
|
|
11829
|
-
class TNodeLocalNames extends Array {
|
|
11830
|
-
}
|
|
11831
|
-
class TNodeInitialInputs extends Array {
|
|
11832
|
-
}
|
|
11833
|
-
class LCleanup extends Array {
|
|
11834
|
-
}
|
|
11835
|
-
class TCleanup extends Array {
|
|
11836
|
-
}
|
|
11837
|
-
function attachLViewDebug(lView) {
|
|
11838
|
-
attachDebugObject(lView, new LViewDebug(lView));
|
|
11839
|
-
}
|
|
11840
|
-
function attachLContainerDebug(lContainer) {
|
|
11841
|
-
attachDebugObject(lContainer, new LContainerDebug(lContainer));
|
|
11842
|
-
}
|
|
11843
|
-
function toDebug(obj) {
|
|
11844
|
-
if (obj) {
|
|
11845
|
-
const debug = obj.debug;
|
|
11846
|
-
assertDefined(debug, 'Object does not have a debug representation.');
|
|
11847
|
-
return debug;
|
|
11848
|
-
}
|
|
11849
|
-
else {
|
|
11850
|
-
return obj;
|
|
11851
|
-
}
|
|
11852
|
-
}
|
|
11853
|
-
/**
|
|
11854
|
-
* Use this method to unwrap a native element in `LView` and convert it into HTML for easier
|
|
11855
|
-
* reading.
|
|
11856
|
-
*
|
|
11857
|
-
* @param value possibly wrapped native DOM node.
|
|
11858
|
-
* @param includeChildren If `true` then the serialized HTML form will include child elements
|
|
11859
|
-
* (same
|
|
11860
|
-
* as `outerHTML`). If `false` then the serialized HTML form will only contain the element
|
|
11861
|
-
* itself
|
|
11862
|
-
* (will not serialize child elements).
|
|
11863
|
-
*/
|
|
11864
|
-
function toHtml(value, includeChildren = false) {
|
|
11865
|
-
const node = unwrapRNode(value);
|
|
11866
|
-
if (node) {
|
|
11867
|
-
switch (node.nodeType) {
|
|
11868
|
-
case Node.TEXT_NODE:
|
|
11869
|
-
return node.textContent;
|
|
11870
|
-
case Node.COMMENT_NODE:
|
|
11871
|
-
return `<!--${node.textContent}-->`;
|
|
11872
|
-
case Node.ELEMENT_NODE:
|
|
11873
|
-
const outerHTML = node.outerHTML;
|
|
11874
|
-
if (includeChildren) {
|
|
11875
|
-
return outerHTML;
|
|
11876
|
-
}
|
|
11877
|
-
else {
|
|
11878
|
-
const innerHTML = '>' + node.innerHTML + '<';
|
|
11879
|
-
return (outerHTML.split(innerHTML)[0]) + '>';
|
|
11880
|
-
}
|
|
11881
|
-
}
|
|
11882
|
-
}
|
|
11883
|
-
return null;
|
|
11884
|
-
}
|
|
11885
|
-
class LViewDebug {
|
|
11886
|
-
constructor(_raw_lView) {
|
|
11887
|
-
this._raw_lView = _raw_lView;
|
|
11888
|
-
}
|
|
11889
|
-
/**
|
|
11890
|
-
* Flags associated with the `LView` unpacked into a more readable state.
|
|
11891
|
-
*/
|
|
11892
|
-
get flags() {
|
|
11893
|
-
const flags = this._raw_lView[FLAGS];
|
|
11894
|
-
return {
|
|
11895
|
-
__raw__flags__: flags,
|
|
11896
|
-
initPhaseState: flags & 3 /* LViewFlags.InitPhaseStateMask */,
|
|
11897
|
-
creationMode: !!(flags & 4 /* LViewFlags.CreationMode */),
|
|
11898
|
-
firstViewPass: !!(flags & 8 /* LViewFlags.FirstLViewPass */),
|
|
11899
|
-
checkAlways: !!(flags & 16 /* LViewFlags.CheckAlways */),
|
|
11900
|
-
dirty: !!(flags & 32 /* LViewFlags.Dirty */),
|
|
11901
|
-
attached: !!(flags & 64 /* LViewFlags.Attached */),
|
|
11902
|
-
destroyed: !!(flags & 128 /* LViewFlags.Destroyed */),
|
|
11903
|
-
isRoot: !!(flags & 256 /* LViewFlags.IsRoot */),
|
|
11904
|
-
indexWithinInitPhase: flags >> 11 /* LViewFlags.IndexWithinInitPhaseShift */,
|
|
11905
|
-
};
|
|
11906
|
-
}
|
|
11907
|
-
get parent() {
|
|
11908
|
-
return toDebug(this._raw_lView[PARENT]);
|
|
11909
|
-
}
|
|
11910
|
-
get hostHTML() {
|
|
11911
|
-
return toHtml(this._raw_lView[HOST], true);
|
|
11912
|
-
}
|
|
11913
|
-
get html() {
|
|
11914
|
-
return (this.nodes || []).map(mapToHTML).join('');
|
|
11915
|
-
}
|
|
11916
|
-
get context() {
|
|
11917
|
-
return this._raw_lView[CONTEXT];
|
|
11918
|
-
}
|
|
11919
|
-
/**
|
|
11920
|
-
* The tree of nodes associated with the current `LView`. The nodes have been normalized into
|
|
11921
|
-
* a tree structure with relevant details pulled out for readability.
|
|
11922
|
-
*/
|
|
11923
|
-
get nodes() {
|
|
11924
|
-
const lView = this._raw_lView;
|
|
11925
|
-
const tNode = lView[TVIEW].firstChild;
|
|
11926
|
-
return toDebugNodes(tNode, lView);
|
|
11927
|
-
}
|
|
11928
|
-
get template() {
|
|
11929
|
-
return this.tView.template_;
|
|
11930
|
-
}
|
|
11931
|
-
get tView() {
|
|
11932
|
-
return this._raw_lView[TVIEW];
|
|
11933
|
-
}
|
|
11934
|
-
get cleanup() {
|
|
11935
|
-
return this._raw_lView[CLEANUP];
|
|
11936
|
-
}
|
|
11937
|
-
get injector() {
|
|
11938
|
-
return this._raw_lView[INJECTOR$1];
|
|
11939
|
-
}
|
|
11940
|
-
get rendererFactory() {
|
|
11941
|
-
return this._raw_lView[RENDERER_FACTORY];
|
|
11942
|
-
}
|
|
11943
|
-
get renderer() {
|
|
11944
|
-
return this._raw_lView[RENDERER];
|
|
11945
|
-
}
|
|
11946
|
-
get sanitizer() {
|
|
11947
|
-
return this._raw_lView[SANITIZER];
|
|
11948
|
-
}
|
|
11949
|
-
get childHead() {
|
|
11950
|
-
return toDebug(this._raw_lView[CHILD_HEAD]);
|
|
11951
|
-
}
|
|
11952
|
-
get next() {
|
|
11953
|
-
return toDebug(this._raw_lView[NEXT]);
|
|
11954
|
-
}
|
|
11955
|
-
get childTail() {
|
|
11956
|
-
return toDebug(this._raw_lView[CHILD_TAIL]);
|
|
11957
|
-
}
|
|
11958
|
-
get declarationView() {
|
|
11959
|
-
return toDebug(this._raw_lView[DECLARATION_VIEW]);
|
|
11960
|
-
}
|
|
11961
|
-
get queries() {
|
|
11962
|
-
return this._raw_lView[QUERIES];
|
|
11963
|
-
}
|
|
11964
|
-
get tHost() {
|
|
11965
|
-
return this._raw_lView[T_HOST];
|
|
11966
|
-
}
|
|
11967
|
-
get id() {
|
|
11968
|
-
return this._raw_lView[ID];
|
|
11969
|
-
}
|
|
11970
|
-
get decls() {
|
|
11971
|
-
return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);
|
|
11972
|
-
}
|
|
11973
|
-
get vars() {
|
|
11974
|
-
return toLViewRange(this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex);
|
|
11975
|
-
}
|
|
11976
|
-
get expando() {
|
|
11977
|
-
return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);
|
|
11978
|
-
}
|
|
11979
|
-
/**
|
|
11980
|
-
* Normalized view of child views (and containers) attached at this location.
|
|
11981
|
-
*/
|
|
11982
|
-
get childViews() {
|
|
11983
|
-
const childViews = [];
|
|
11984
|
-
let child = this.childHead;
|
|
11985
|
-
while (child) {
|
|
11986
|
-
childViews.push(child);
|
|
11987
|
-
child = child.next;
|
|
11988
|
-
}
|
|
11989
|
-
return childViews;
|
|
11990
|
-
}
|
|
11991
|
-
}
|
|
11992
|
-
function mapToHTML(node) {
|
|
11993
|
-
if (node.type === 'ElementContainer') {
|
|
11994
|
-
return (node.children || []).map(mapToHTML).join('');
|
|
11995
|
-
}
|
|
11996
|
-
else if (node.type === 'IcuContainer') {
|
|
11997
|
-
throw new Error('Not implemented');
|
|
11998
|
-
}
|
|
11999
|
-
else {
|
|
12000
|
-
return toHtml(node.native, true) || '';
|
|
12001
|
-
}
|
|
12002
|
-
}
|
|
12003
|
-
function toLViewRange(tView, lView, start, end) {
|
|
12004
|
-
let content = [];
|
|
12005
|
-
for (let index = start; index < end; index++) {
|
|
12006
|
-
content.push({ index: index, t: tView.data[index], l: lView[index] });
|
|
12007
|
-
}
|
|
12008
|
-
return { start: start, end: end, length: end - start, content: content };
|
|
12009
|
-
}
|
|
12010
|
-
/**
|
|
12011
|
-
* Turns a flat list of nodes into a tree by walking the associated `TNode` tree.
|
|
12012
|
-
*
|
|
12013
|
-
* @param tNode
|
|
12014
|
-
* @param lView
|
|
12015
|
-
*/
|
|
12016
|
-
function toDebugNodes(tNode, lView) {
|
|
12017
|
-
if (tNode) {
|
|
12018
|
-
const debugNodes = [];
|
|
12019
|
-
let tNodeCursor = tNode;
|
|
12020
|
-
while (tNodeCursor) {
|
|
12021
|
-
debugNodes.push(buildDebugNode(tNodeCursor, lView));
|
|
12022
|
-
tNodeCursor = tNodeCursor.next;
|
|
12023
|
-
}
|
|
12024
|
-
return debugNodes;
|
|
12025
|
-
}
|
|
12026
|
-
else {
|
|
12027
|
-
return [];
|
|
11132
|
+
return this.displayName;
|
|
12028
11133
|
}
|
|
12029
11134
|
}
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
const
|
|
12033
|
-
|
|
12034
|
-
|
|
12035
|
-
const tView = lView[TVIEW];
|
|
12036
|
-
for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {
|
|
12037
|
-
const def = tView.data[i];
|
|
12038
|
-
factories.push(def.type);
|
|
12039
|
-
instances.push(lView[i]);
|
|
11135
|
+
ReflectiveInjector_.INJECTOR_KEY = ( /* @__PURE__ */ReflectiveKey.get(Injector));
|
|
11136
|
+
function _mapProviders(injector, fn) {
|
|
11137
|
+
const res = [];
|
|
11138
|
+
for (let i = 0; i < injector._providers.length; ++i) {
|
|
11139
|
+
res[i] = fn(injector.getProviderAtIndex(i));
|
|
12040
11140
|
}
|
|
12041
|
-
return
|
|
12042
|
-
html: toHtml(native),
|
|
12043
|
-
type: toTNodeTypeAsString(tNode.type),
|
|
12044
|
-
tNode,
|
|
12045
|
-
native: native,
|
|
12046
|
-
children: toDebugNodes(tNode.child, lView),
|
|
12047
|
-
factories,
|
|
12048
|
-
instances,
|
|
12049
|
-
injector: buildNodeInjectorDebug(tNode, tView, lView),
|
|
12050
|
-
get injectorResolutionPath() {
|
|
12051
|
-
return tNode.debugNodeInjectorPath(lView);
|
|
12052
|
-
},
|
|
12053
|
-
};
|
|
12054
|
-
}
|
|
12055
|
-
function buildNodeInjectorDebug(tNode, tView, lView) {
|
|
12056
|
-
const viewProviders = [];
|
|
12057
|
-
for (let i = tNode.providerIndexStart_; i < tNode.providerIndexEnd_; i++) {
|
|
12058
|
-
viewProviders.push(tView.data[i]);
|
|
12059
|
-
}
|
|
12060
|
-
const providers = [];
|
|
12061
|
-
for (let i = tNode.providerIndexEnd_; i < tNode.directiveEnd; i++) {
|
|
12062
|
-
providers.push(tView.data[i]);
|
|
12063
|
-
}
|
|
12064
|
-
const nodeInjectorDebug = {
|
|
12065
|
-
bloom: toBloom(lView, tNode.injectorIndex),
|
|
12066
|
-
cumulativeBloom: toBloom(tView.data, tNode.injectorIndex),
|
|
12067
|
-
providers,
|
|
12068
|
-
viewProviders,
|
|
12069
|
-
parentInjectorIndex: lView[tNode.providerIndexStart_ - 1],
|
|
12070
|
-
};
|
|
12071
|
-
return nodeInjectorDebug;
|
|
11141
|
+
return res;
|
|
12072
11142
|
}
|
|
11143
|
+
|
|
12073
11144
|
/**
|
|
12074
|
-
*
|
|
11145
|
+
* @license
|
|
11146
|
+
* Copyright Google LLC All Rights Reserved.
|
|
12075
11147
|
*
|
|
12076
|
-
*
|
|
12077
|
-
*
|
|
11148
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
11149
|
+
* found in the LICENSE file at https://angular.io/license
|
|
12078
11150
|
*/
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
}
|
|
11151
|
+
|
|
11152
|
+
/**
|
|
11153
|
+
* @license
|
|
11154
|
+
* Copyright Google LLC All Rights Reserved.
|
|
11155
|
+
*
|
|
11156
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
11157
|
+
* found in the LICENSE file at https://angular.io/license
|
|
11158
|
+
*/
|
|
11159
|
+
|
|
12089
11160
|
/**
|
|
12090
|
-
*
|
|
11161
|
+
* @license
|
|
11162
|
+
* Copyright Google LLC All Rights Reserved.
|
|
12091
11163
|
*
|
|
12092
|
-
*
|
|
12093
|
-
*
|
|
11164
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
11165
|
+
* found in the LICENSE file at https://angular.io/license
|
|
12094
11166
|
*/
|
|
12095
|
-
function
|
|
12096
|
-
|
|
12097
|
-
|
|
11167
|
+
function ɵɵdirectiveInject(token, flags = InjectFlags.Default) {
|
|
11168
|
+
const lView = getLView();
|
|
11169
|
+
// Fall back to inject() if view hasn't been created. This situation can happen in tests
|
|
11170
|
+
// if inject utilities are used before bootstrapping.
|
|
11171
|
+
if (lView === null) {
|
|
11172
|
+
// Verify that we will not get into infinite loop.
|
|
11173
|
+
ngDevMode && assertInjectImplementationNotEqual(ɵɵdirectiveInject);
|
|
11174
|
+
return ɵɵinject(token, flags);
|
|
12098
11175
|
}
|
|
12099
|
-
|
|
11176
|
+
const tNode = getCurrentTNode();
|
|
11177
|
+
return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);
|
|
12100
11178
|
}
|
|
12101
|
-
|
|
12102
|
-
|
|
12103
|
-
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
|
|
12107
|
-
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
12115
|
-
|
|
12116
|
-
return this._raw_lContainer[MOVED_VIEWS];
|
|
12117
|
-
}
|
|
12118
|
-
get host() {
|
|
12119
|
-
return this._raw_lContainer[HOST];
|
|
12120
|
-
}
|
|
12121
|
-
get native() {
|
|
12122
|
-
return this._raw_lContainer[NATIVE];
|
|
12123
|
-
}
|
|
12124
|
-
get next() {
|
|
12125
|
-
return toDebug(this._raw_lContainer[NEXT]);
|
|
12126
|
-
}
|
|
11179
|
+
/**
|
|
11180
|
+
* Throws an error indicating that a factory function could not be generated by the compiler for a
|
|
11181
|
+
* particular class.
|
|
11182
|
+
*
|
|
11183
|
+
* This instruction allows the actual error message to be optimized away when ngDevMode is turned
|
|
11184
|
+
* off, saving bytes of generated code while still providing a good experience in dev mode.
|
|
11185
|
+
*
|
|
11186
|
+
* The name of the class is not mentioned here, but will be in the generated factory function name
|
|
11187
|
+
* and thus in the stack trace.
|
|
11188
|
+
*
|
|
11189
|
+
* @codeGenApi
|
|
11190
|
+
*/
|
|
11191
|
+
function ɵɵinvalidFactory() {
|
|
11192
|
+
const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';
|
|
11193
|
+
throw new Error(msg);
|
|
12127
11194
|
}
|
|
12128
11195
|
|
|
12129
11196
|
/**
|
|
@@ -12199,7 +11266,7 @@ function renderChildComponents(hostLView, components) {
|
|
|
12199
11266
|
}
|
|
12200
11267
|
}
|
|
12201
11268
|
function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {
|
|
12202
|
-
const lView =
|
|
11269
|
+
const lView = tView.blueprint.slice();
|
|
12203
11270
|
lView[HOST] = host;
|
|
12204
11271
|
lView[FLAGS] = flags | 4 /* LViewFlags.CreationMode */ | 64 /* LViewFlags.Attached */ | 8 /* LViewFlags.FirstLViewPass */;
|
|
12205
11272
|
if (embeddedViewInjector !== null ||
|
|
@@ -12223,7 +11290,6 @@ function createLView(parentLView, tView, context, flags, host, tHostNode, render
|
|
|
12223
11290
|
assertEqual(tView.type == 2 /* TViewType.Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
|
|
12224
11291
|
lView[DECLARATION_COMPONENT_VIEW] =
|
|
12225
11292
|
tView.type == 2 /* TViewType.Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;
|
|
12226
|
-
ngDevMode && attachLViewDebug(lView);
|
|
12227
11293
|
return lView;
|
|
12228
11294
|
}
|
|
12229
11295
|
function getOrCreateTNode(tView, index, type, name, attrs) {
|
|
@@ -12606,73 +11672,38 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
|
|
|
12606
11672
|
const initialViewLength = bindingStartIndex + vars;
|
|
12607
11673
|
const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
|
|
12608
11674
|
const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;
|
|
12609
|
-
const tView = blueprint[TVIEW] =
|
|
12610
|
-
|
|
12611
|
-
blueprint
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
viewQuery
|
|
12615
|
-
declTNode
|
|
12616
|
-
|
|
12617
|
-
bindingStartIndex
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
|
|
12633
|
-
|
|
12634
|
-
typeof directives === 'function' ?
|
|
12635
|
-
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
|
|
12640
|
-
|
|
12641
|
-
false, // incompleteFirstPass: boolean
|
|
12642
|
-
decls, // ngDevMode only: decls
|
|
12643
|
-
vars) :
|
|
12644
|
-
{
|
|
12645
|
-
type: type,
|
|
12646
|
-
blueprint: blueprint,
|
|
12647
|
-
template: templateFn,
|
|
12648
|
-
queries: null,
|
|
12649
|
-
viewQuery: viewQuery,
|
|
12650
|
-
declTNode: declTNode,
|
|
12651
|
-
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
12652
|
-
bindingStartIndex: bindingStartIndex,
|
|
12653
|
-
expandoStartIndex: initialViewLength,
|
|
12654
|
-
hostBindingOpCodes: null,
|
|
12655
|
-
firstCreatePass: true,
|
|
12656
|
-
firstUpdatePass: true,
|
|
12657
|
-
staticViewQueries: false,
|
|
12658
|
-
staticContentQueries: false,
|
|
12659
|
-
preOrderHooks: null,
|
|
12660
|
-
preOrderCheckHooks: null,
|
|
12661
|
-
contentHooks: null,
|
|
12662
|
-
contentCheckHooks: null,
|
|
12663
|
-
viewHooks: null,
|
|
12664
|
-
viewCheckHooks: null,
|
|
12665
|
-
destroyHooks: null,
|
|
12666
|
-
cleanup: null,
|
|
12667
|
-
contentQueries: null,
|
|
12668
|
-
components: null,
|
|
12669
|
-
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
12670
|
-
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
12671
|
-
firstChild: null,
|
|
12672
|
-
schemas: schemas,
|
|
12673
|
-
consts: consts,
|
|
12674
|
-
incompleteFirstPass: false
|
|
12675
|
-
};
|
|
11675
|
+
const tView = blueprint[TVIEW] = {
|
|
11676
|
+
type: type,
|
|
11677
|
+
blueprint: blueprint,
|
|
11678
|
+
template: templateFn,
|
|
11679
|
+
queries: null,
|
|
11680
|
+
viewQuery: viewQuery,
|
|
11681
|
+
declTNode: declTNode,
|
|
11682
|
+
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
11683
|
+
bindingStartIndex: bindingStartIndex,
|
|
11684
|
+
expandoStartIndex: initialViewLength,
|
|
11685
|
+
hostBindingOpCodes: null,
|
|
11686
|
+
firstCreatePass: true,
|
|
11687
|
+
firstUpdatePass: true,
|
|
11688
|
+
staticViewQueries: false,
|
|
11689
|
+
staticContentQueries: false,
|
|
11690
|
+
preOrderHooks: null,
|
|
11691
|
+
preOrderCheckHooks: null,
|
|
11692
|
+
contentHooks: null,
|
|
11693
|
+
contentCheckHooks: null,
|
|
11694
|
+
viewHooks: null,
|
|
11695
|
+
viewCheckHooks: null,
|
|
11696
|
+
destroyHooks: null,
|
|
11697
|
+
cleanup: null,
|
|
11698
|
+
contentQueries: null,
|
|
11699
|
+
components: null,
|
|
11700
|
+
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
11701
|
+
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
11702
|
+
firstChild: null,
|
|
11703
|
+
schemas: schemas,
|
|
11704
|
+
consts: consts,
|
|
11705
|
+
incompleteFirstPass: false
|
|
11706
|
+
};
|
|
12676
11707
|
if (ngDevMode) {
|
|
12677
11708
|
// For performance reasons it is important that the tView retains the same shape during runtime.
|
|
12678
11709
|
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
@@ -12682,7 +11713,7 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
|
|
|
12682
11713
|
return tView;
|
|
12683
11714
|
}
|
|
12684
11715
|
function createViewBlueprint(bindingStartIndex, initialViewLength) {
|
|
12685
|
-
const blueprint =
|
|
11716
|
+
const blueprint = [];
|
|
12686
11717
|
for (let i = 0; i < initialViewLength; i++) {
|
|
12687
11718
|
blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);
|
|
12688
11719
|
}
|
|
@@ -12735,74 +11766,40 @@ function createTNode(tView, tParent, type, index, value, attrs) {
|
|
|
12735
11766
|
ngDevMode && ngDevMode.tNode++;
|
|
12736
11767
|
ngDevMode && tParent && assertTNodeForTView(tParent, tView);
|
|
12737
11768
|
let injectorIndex = tParent ? tParent.injectorIndex : -1;
|
|
12738
|
-
const tNode =
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
-1,
|
|
12745
|
-
-1,
|
|
12746
|
-
-1,
|
|
12747
|
-
|
|
12748
|
-
|
|
12749
|
-
0,
|
|
12750
|
-
|
|
12751
|
-
|
|
12752
|
-
|
|
12753
|
-
null,
|
|
12754
|
-
|
|
12755
|
-
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
-
|
|
12759
|
-
|
|
12760
|
-
|
|
12761
|
-
|
|
12762
|
-
|
|
12763
|
-
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
0,
|
|
12771
|
-
|
|
12772
|
-
{
|
|
12773
|
-
type,
|
|
12774
|
-
index,
|
|
12775
|
-
insertBeforeIndex: null,
|
|
12776
|
-
injectorIndex,
|
|
12777
|
-
directiveStart: -1,
|
|
12778
|
-
directiveEnd: -1,
|
|
12779
|
-
directiveStylingLast: -1,
|
|
12780
|
-
componentOffset: -1,
|
|
12781
|
-
propertyBindings: null,
|
|
12782
|
-
flags: 0,
|
|
12783
|
-
providerIndexes: 0,
|
|
12784
|
-
value: value,
|
|
12785
|
-
attrs: attrs,
|
|
12786
|
-
mergedAttrs: null,
|
|
12787
|
-
localNames: null,
|
|
12788
|
-
initialInputs: undefined,
|
|
12789
|
-
inputs: null,
|
|
12790
|
-
outputs: null,
|
|
12791
|
-
tViews: null,
|
|
12792
|
-
next: null,
|
|
12793
|
-
projectionNext: null,
|
|
12794
|
-
child: null,
|
|
12795
|
-
parent: tParent,
|
|
12796
|
-
projection: null,
|
|
12797
|
-
styles: null,
|
|
12798
|
-
stylesWithoutHost: null,
|
|
12799
|
-
residualStyles: undefined,
|
|
12800
|
-
classes: null,
|
|
12801
|
-
classesWithoutHost: null,
|
|
12802
|
-
residualClasses: undefined,
|
|
12803
|
-
classBindings: 0,
|
|
12804
|
-
styleBindings: 0,
|
|
12805
|
-
};
|
|
11769
|
+
const tNode = {
|
|
11770
|
+
type,
|
|
11771
|
+
index,
|
|
11772
|
+
insertBeforeIndex: null,
|
|
11773
|
+
injectorIndex,
|
|
11774
|
+
directiveStart: -1,
|
|
11775
|
+
directiveEnd: -1,
|
|
11776
|
+
directiveStylingLast: -1,
|
|
11777
|
+
componentOffset: -1,
|
|
11778
|
+
propertyBindings: null,
|
|
11779
|
+
flags: 0,
|
|
11780
|
+
providerIndexes: 0,
|
|
11781
|
+
value: value,
|
|
11782
|
+
attrs: attrs,
|
|
11783
|
+
mergedAttrs: null,
|
|
11784
|
+
localNames: null,
|
|
11785
|
+
initialInputs: undefined,
|
|
11786
|
+
inputs: null,
|
|
11787
|
+
outputs: null,
|
|
11788
|
+
tViews: null,
|
|
11789
|
+
next: null,
|
|
11790
|
+
projectionNext: null,
|
|
11791
|
+
child: null,
|
|
11792
|
+
parent: tParent,
|
|
11793
|
+
projection: null,
|
|
11794
|
+
styles: null,
|
|
11795
|
+
stylesWithoutHost: null,
|
|
11796
|
+
residualStyles: undefined,
|
|
11797
|
+
classes: null,
|
|
11798
|
+
classesWithoutHost: null,
|
|
11799
|
+
residualClasses: undefined,
|
|
11800
|
+
classBindings: 0,
|
|
11801
|
+
styleBindings: 0,
|
|
11802
|
+
};
|
|
12806
11803
|
if (ngDevMode) {
|
|
12807
11804
|
// For performance reasons it is important that the tNode retains the same shape during runtime.
|
|
12808
11805
|
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
@@ -12859,7 +11856,7 @@ function initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefinitionMa
|
|
|
12859
11856
|
const end = tNode.directiveEnd;
|
|
12860
11857
|
const tViewData = tView.data;
|
|
12861
11858
|
const tNodeAttrs = tNode.attrs;
|
|
12862
|
-
const inputsFromAttrs =
|
|
11859
|
+
const inputsFromAttrs = [];
|
|
12863
11860
|
let inputsStore = null;
|
|
12864
11861
|
let outputsStore = null;
|
|
12865
11862
|
for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {
|
|
@@ -13128,6 +12125,12 @@ function lastSelectedElementIdx(hostBindingOpCodes) {
|
|
|
13128
12125
|
function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
13129
12126
|
const start = tNode.directiveStart;
|
|
13130
12127
|
const end = tNode.directiveEnd;
|
|
12128
|
+
// The component view needs to be created before creating the node injector
|
|
12129
|
+
// since it is used to inject some special symbols like `ChangeDetectorRef`.
|
|
12130
|
+
if (isComponentHost(tNode)) {
|
|
12131
|
+
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);
|
|
12132
|
+
addComponentLogic(lView, tNode, tView.data[start + tNode.componentOffset]);
|
|
12133
|
+
}
|
|
13131
12134
|
if (!tView.firstCreatePass) {
|
|
13132
12135
|
getOrCreateNodeInjectorForNode(tNode, lView);
|
|
13133
12136
|
}
|
|
@@ -13135,19 +12138,14 @@ function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
|
13135
12138
|
const initialInputs = tNode.initialInputs;
|
|
13136
12139
|
for (let i = start; i < end; i++) {
|
|
13137
12140
|
const def = tView.data[i];
|
|
13138
|
-
const isComponent = isComponentDef(def);
|
|
13139
|
-
if (isComponent) {
|
|
13140
|
-
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);
|
|
13141
|
-
addComponentLogic(lView, tNode, def);
|
|
13142
|
-
}
|
|
13143
12141
|
const directive = getNodeInjectable(lView, tView, i, tNode);
|
|
13144
12142
|
attachPatchData(directive, lView);
|
|
13145
12143
|
if (initialInputs !== null) {
|
|
13146
12144
|
setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);
|
|
13147
12145
|
}
|
|
13148
|
-
if (
|
|
12146
|
+
if (isComponentDef(def)) {
|
|
13149
12147
|
const componentView = getComponentLViewByIndex(tNode.index, lView);
|
|
13150
|
-
componentView[CONTEXT] =
|
|
12148
|
+
componentView[CONTEXT] = getNodeInjectable(lView, tView, i, tNode);
|
|
13151
12149
|
}
|
|
13152
12150
|
}
|
|
13153
12151
|
}
|
|
@@ -13198,7 +12196,7 @@ function findDirectiveDefMatches(tView, tNode) {
|
|
|
13198
12196
|
for (let i = 0; i < registry.length; i++) {
|
|
13199
12197
|
const def = registry[i];
|
|
13200
12198
|
if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {
|
|
13201
|
-
matches || (matches =
|
|
12199
|
+
matches || (matches = []);
|
|
13202
12200
|
if (isComponentDef(def)) {
|
|
13203
12201
|
if (ngDevMode) {
|
|
13204
12202
|
assertTNodeType(tNode, 2 /* TNodeType.Element */, `"${tNode.value}" tags cannot be used as component hosts. ` +
|
|
@@ -13256,13 +12254,12 @@ function markAsComponentHost(tView, hostTNode, componentOffset) {
|
|
|
13256
12254
|
ngDevMode && assertFirstCreatePass(tView);
|
|
13257
12255
|
ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');
|
|
13258
12256
|
hostTNode.componentOffset = componentOffset;
|
|
13259
|
-
(tView.components || (tView.components =
|
|
13260
|
-
.push(hostTNode.index);
|
|
12257
|
+
(tView.components || (tView.components = [])).push(hostTNode.index);
|
|
13261
12258
|
}
|
|
13262
12259
|
/** Caches local names and their matching directive indices for query and template lookups. */
|
|
13263
12260
|
function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
|
|
13264
12261
|
if (localRefs) {
|
|
13265
|
-
const localNames = tNode.localNames =
|
|
12262
|
+
const localNames = tNode.localNames = [];
|
|
13266
12263
|
// Local names must be stored in tNode in the same order that localRefs are defined
|
|
13267
12264
|
// in the template to ensure the data is loaded in the same slots as their refs
|
|
13268
12265
|
// in the template (for template queries).
|
|
@@ -13445,9 +12442,6 @@ function generateInitialInputs(inputs, directiveIndex, attrs) {
|
|
|
13445
12442
|
//////////////////////////
|
|
13446
12443
|
//// ViewContainer & View
|
|
13447
12444
|
//////////////////////////
|
|
13448
|
-
// Not sure why I need to do `any` here but TS complains later.
|
|
13449
|
-
const LContainerArray = class LContainer extends Array {
|
|
13450
|
-
};
|
|
13451
12445
|
/**
|
|
13452
12446
|
* Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
|
|
13453
12447
|
*
|
|
@@ -13460,20 +12454,20 @@ const LContainerArray = class LContainer extends Array {
|
|
|
13460
12454
|
*/
|
|
13461
12455
|
function createLContainer(hostNative, currentView, native, tNode) {
|
|
13462
12456
|
ngDevMode && assertLView(currentView);
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
13471
|
-
|
|
13472
|
-
|
|
13473
|
-
|
|
12457
|
+
const lContainer = [
|
|
12458
|
+
hostNative,
|
|
12459
|
+
true,
|
|
12460
|
+
false,
|
|
12461
|
+
currentView,
|
|
12462
|
+
null,
|
|
12463
|
+
0,
|
|
12464
|
+
tNode,
|
|
12465
|
+
native,
|
|
12466
|
+
null,
|
|
12467
|
+
null, // moved views
|
|
12468
|
+
];
|
|
13474
12469
|
ngDevMode &&
|
|
13475
12470
|
assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');
|
|
13476
|
-
ngDevMode && attachLContainerDebug(lContainer);
|
|
13477
12471
|
return lContainer;
|
|
13478
12472
|
}
|
|
13479
12473
|
/**
|
|
@@ -13747,10 +12741,10 @@ function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex,
|
|
|
13747
12741
|
}
|
|
13748
12742
|
function getOrCreateLViewCleanup(view) {
|
|
13749
12743
|
// top level variables should not be exported for performance reasons (PERF_NOTES.md)
|
|
13750
|
-
return view[CLEANUP] || (view[CLEANUP] =
|
|
12744
|
+
return view[CLEANUP] || (view[CLEANUP] = []);
|
|
13751
12745
|
}
|
|
13752
12746
|
function getOrCreateTViewCleanup(tView) {
|
|
13753
|
-
return tView.cleanup || (tView.cleanup =
|
|
12747
|
+
return tView.cleanup || (tView.cleanup = []);
|
|
13754
12748
|
}
|
|
13755
12749
|
/**
|
|
13756
12750
|
* There are cases where the sub component's renderer needs to be included
|
|
@@ -13916,6 +12910,11 @@ function collectNativeNodes(tView, lView, tNode, result, isProjection = false) {
|
|
|
13916
12910
|
* found in the LICENSE file at https://angular.io/license
|
|
13917
12911
|
*/
|
|
13918
12912
|
class ViewRef {
|
|
12913
|
+
get rootNodes() {
|
|
12914
|
+
const lView = this._lView;
|
|
12915
|
+
const tView = lView[TVIEW];
|
|
12916
|
+
return collectNativeNodes(tView, lView, tView.firstChild, []);
|
|
12917
|
+
}
|
|
13919
12918
|
constructor(
|
|
13920
12919
|
/**
|
|
13921
12920
|
* This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.
|
|
@@ -13941,11 +12940,6 @@ class ViewRef {
|
|
|
13941
12940
|
this._appRef = null;
|
|
13942
12941
|
this._attachedToViewContainer = false;
|
|
13943
12942
|
}
|
|
13944
|
-
get rootNodes() {
|
|
13945
|
-
const lView = this._lView;
|
|
13946
|
-
const tView = lView[TVIEW];
|
|
13947
|
-
return collectNativeNodes(tView, lView, tView.firstChild, []);
|
|
13948
|
-
}
|
|
13949
12943
|
get context() {
|
|
13950
12944
|
return this._lView[CONTEXT];
|
|
13951
12945
|
}
|
|
@@ -14267,6 +13261,12 @@ class ChainedInjector {
|
|
|
14267
13261
|
* ComponentFactory interface implementation.
|
|
14268
13262
|
*/
|
|
14269
13263
|
class ComponentFactory extends ComponentFactory$1 {
|
|
13264
|
+
get inputs() {
|
|
13265
|
+
return toRefArray(this.componentDef.inputs);
|
|
13266
|
+
}
|
|
13267
|
+
get outputs() {
|
|
13268
|
+
return toRefArray(this.componentDef.outputs);
|
|
13269
|
+
}
|
|
14270
13270
|
/**
|
|
14271
13271
|
* @param componentDef The component definition.
|
|
14272
13272
|
* @param ngModule The NgModuleRef to which the factory is bound.
|
|
@@ -14281,12 +13281,6 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
14281
13281
|
componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];
|
|
14282
13282
|
this.isBoundToModule = !!ngModule;
|
|
14283
13283
|
}
|
|
14284
|
-
get inputs() {
|
|
14285
|
-
return toRefArray(this.componentDef.inputs);
|
|
14286
|
-
}
|
|
14287
|
-
get outputs() {
|
|
14288
|
-
return toRefArray(this.componentDef.outputs);
|
|
14289
|
-
}
|
|
14290
13284
|
create(injector, projectableNodes, rootSelectorOrNode, environmentInjector) {
|
|
14291
13285
|
environmentInjector = environmentInjector || this.ngModule;
|
|
14292
13286
|
let realEnvironmentInjector = environmentInjector instanceof EnvironmentInjector ?
|
|
@@ -14362,17 +13356,6 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
14362
13356
|
return new ComponentRef(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);
|
|
14363
13357
|
}
|
|
14364
13358
|
}
|
|
14365
|
-
const componentFactoryResolver = new ComponentFactoryResolver();
|
|
14366
|
-
/**
|
|
14367
|
-
* Creates a ComponentFactoryResolver and stores it on the injector. Or, if the
|
|
14368
|
-
* ComponentFactoryResolver
|
|
14369
|
-
* already exists, retrieves the existing ComponentFactoryResolver.
|
|
14370
|
-
*
|
|
14371
|
-
* @returns The ComponentFactoryResolver instance to use
|
|
14372
|
-
*/
|
|
14373
|
-
function injectComponentFactoryResolver() {
|
|
14374
|
-
return componentFactoryResolver;
|
|
14375
|
-
}
|
|
14376
13359
|
/**
|
|
14377
13360
|
* Represents an instance of a Component created via a {@link ComponentFactory}.
|
|
14378
13361
|
*
|
|
@@ -16958,6 +15941,62 @@ function ɵɵpropertyInterpolateV(propName, values, sanitizer) {
|
|
|
16958
15941
|
return ɵɵpropertyInterpolateV;
|
|
16959
15942
|
}
|
|
16960
15943
|
|
|
15944
|
+
/**
|
|
15945
|
+
* @license
|
|
15946
|
+
* Copyright Google LLC All Rights Reserved.
|
|
15947
|
+
*
|
|
15948
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
15949
|
+
* found in the LICENSE file at https://angular.io/license
|
|
15950
|
+
*/
|
|
15951
|
+
function toTStylingRange(prev, next) {
|
|
15952
|
+
ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15953
|
+
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15954
|
+
return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
15955
|
+
}
|
|
15956
|
+
function getTStylingRangePrev(tStylingRange) {
|
|
15957
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15958
|
+
return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
|
|
15959
|
+
}
|
|
15960
|
+
function getTStylingRangePrevDuplicate(tStylingRange) {
|
|
15961
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15962
|
+
return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
|
|
15963
|
+
2 /* StylingRange.PREV_DUPLICATE */;
|
|
15964
|
+
}
|
|
15965
|
+
function setTStylingRangePrev(tStylingRange, previous) {
|
|
15966
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15967
|
+
ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15968
|
+
return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
|
|
15969
|
+
(previous << 17 /* StylingRange.PREV_SHIFT */));
|
|
15970
|
+
}
|
|
15971
|
+
function setTStylingRangePrevDuplicate(tStylingRange) {
|
|
15972
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15973
|
+
return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
|
|
15974
|
+
}
|
|
15975
|
+
function getTStylingRangeNext(tStylingRange) {
|
|
15976
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15977
|
+
return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
|
|
15978
|
+
}
|
|
15979
|
+
function setTStylingRangeNext(tStylingRange, next) {
|
|
15980
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15981
|
+
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15982
|
+
return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
|
|
15983
|
+
next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
15984
|
+
}
|
|
15985
|
+
function getTStylingRangeNextDuplicate(tStylingRange) {
|
|
15986
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15987
|
+
return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
|
|
15988
|
+
1 /* StylingRange.NEXT_DUPLICATE */;
|
|
15989
|
+
}
|
|
15990
|
+
function setTStylingRangeNextDuplicate(tStylingRange) {
|
|
15991
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15992
|
+
return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
|
|
15993
|
+
}
|
|
15994
|
+
function getTStylingRangeTail(tStylingRange) {
|
|
15995
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15996
|
+
const next = getTStylingRangeNext(tStylingRange);
|
|
15997
|
+
return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
|
|
15998
|
+
}
|
|
15999
|
+
|
|
16961
16000
|
/**
|
|
16962
16001
|
* @license
|
|
16963
16002
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -20010,7 +19049,7 @@ var I18nCreateOpCode;
|
|
|
20010
19049
|
})(I18nCreateOpCode || (I18nCreateOpCode = {}));
|
|
20011
19050
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
20012
19051
|
// failure based on types.
|
|
20013
|
-
const unusedValueExportToPlacateAjd
|
|
19052
|
+
const unusedValueExportToPlacateAjd = 1;
|
|
20014
19053
|
|
|
20015
19054
|
/**
|
|
20016
19055
|
* @license
|
|
@@ -20779,6 +19818,46 @@ function loadIcuContainerVisitor() {
|
|
|
20779
19818
|
return icuContainerIteratorStart;
|
|
20780
19819
|
}
|
|
20781
19820
|
|
|
19821
|
+
/**
|
|
19822
|
+
* @license
|
|
19823
|
+
* Copyright Google LLC All Rights Reserved.
|
|
19824
|
+
*
|
|
19825
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
19826
|
+
* found in the LICENSE file at https://angular.io/license
|
|
19827
|
+
*/
|
|
19828
|
+
/**
|
|
19829
|
+
* Patch a `debug` property on top of the existing object.
|
|
19830
|
+
*
|
|
19831
|
+
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
19832
|
+
*
|
|
19833
|
+
* @param obj Object to patch
|
|
19834
|
+
* @param debug Value to patch
|
|
19835
|
+
*/
|
|
19836
|
+
function attachDebugObject(obj, debug) {
|
|
19837
|
+
if (ngDevMode) {
|
|
19838
|
+
Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
|
|
19839
|
+
}
|
|
19840
|
+
else {
|
|
19841
|
+
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
19842
|
+
}
|
|
19843
|
+
}
|
|
19844
|
+
/**
|
|
19845
|
+
* Patch a `debug` property getter on top of the existing object.
|
|
19846
|
+
*
|
|
19847
|
+
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
19848
|
+
*
|
|
19849
|
+
* @param obj Object to patch
|
|
19850
|
+
* @param debugGetter Getter returning a value to patch
|
|
19851
|
+
*/
|
|
19852
|
+
function attachDebugGetter(obj, debugGetter) {
|
|
19853
|
+
if (ngDevMode) {
|
|
19854
|
+
Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
|
|
19855
|
+
}
|
|
19856
|
+
else {
|
|
19857
|
+
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
19858
|
+
}
|
|
19859
|
+
}
|
|
19860
|
+
|
|
20782
19861
|
/**
|
|
20783
19862
|
* @license
|
|
20784
19863
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -22748,32 +21827,6 @@ function sortListeners(a, b) {
|
|
|
22748
21827
|
function isDirectiveDefHack(obj) {
|
|
22749
21828
|
return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;
|
|
22750
21829
|
}
|
|
22751
|
-
/**
|
|
22752
|
-
* Returns the attached `DebugNode` instance for an element in the DOM.
|
|
22753
|
-
*
|
|
22754
|
-
* @param element DOM element which is owned by an existing component's view.
|
|
22755
|
-
*/
|
|
22756
|
-
function getDebugNode(element) {
|
|
22757
|
-
if (ngDevMode && !(element instanceof Node)) {
|
|
22758
|
-
throw new Error('Expecting instance of DOM Element');
|
|
22759
|
-
}
|
|
22760
|
-
const lContext = getLContext(element);
|
|
22761
|
-
const lView = lContext ? lContext.lView : null;
|
|
22762
|
-
if (lView === null) {
|
|
22763
|
-
return null;
|
|
22764
|
-
}
|
|
22765
|
-
const nodeIndex = lContext.nodeIndex;
|
|
22766
|
-
if (nodeIndex !== -1) {
|
|
22767
|
-
const valueInLView = lView[nodeIndex];
|
|
22768
|
-
// this means that value in the lView is a component with its own
|
|
22769
|
-
// data. In this situation the TNode is not accessed at the same spot.
|
|
22770
|
-
const tNode = isLView(valueInLView) ? valueInLView[T_HOST] : getTNode(lView[TVIEW], nodeIndex);
|
|
22771
|
-
ngDevMode &&
|
|
22772
|
-
assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index');
|
|
22773
|
-
return buildDebugNode(tNode, lView);
|
|
22774
|
-
}
|
|
22775
|
-
return null;
|
|
22776
|
-
}
|
|
22777
21830
|
/**
|
|
22778
21831
|
* Retrieve the component `LView` from component/element.
|
|
22779
21832
|
*
|
|
@@ -23479,6 +22532,12 @@ function symbolIterator() {
|
|
|
23479
22532
|
* @publicApi
|
|
23480
22533
|
*/
|
|
23481
22534
|
class QueryList {
|
|
22535
|
+
/**
|
|
22536
|
+
* Returns `Observable` of `QueryList` notifying the subscriber of changes.
|
|
22537
|
+
*/
|
|
22538
|
+
get changes() {
|
|
22539
|
+
return this._changes || (this._changes = new EventEmitter());
|
|
22540
|
+
}
|
|
23482
22541
|
/**
|
|
23483
22542
|
* @param emitDistinctChangesOnly Whether `QueryList.changes` should fire only when actual change
|
|
23484
22543
|
* has occurred. Or if it should fire when query is recomputed. (recomputing could resolve in
|
|
@@ -23502,12 +22561,6 @@ class QueryList {
|
|
|
23502
22561
|
if (!proto[symbol])
|
|
23503
22562
|
proto[symbol] = symbolIterator;
|
|
23504
22563
|
}
|
|
23505
|
-
/**
|
|
23506
|
-
* Returns `Observable` of `QueryList` notifying the subscriber of changes.
|
|
23507
|
-
*/
|
|
23508
|
-
get changes() {
|
|
23509
|
-
return this._changes || (this._changes = new EventEmitter());
|
|
23510
|
-
}
|
|
23511
22564
|
/**
|
|
23512
22565
|
* Returns the QueryList entry at `index`.
|
|
23513
22566
|
*/
|
|
@@ -23994,29 +23047,6 @@ function createContainerRef(hostTNode, hostLView) {
|
|
|
23994
23047
|
* Use of this source code is governed by an MIT-style license that can be
|
|
23995
23048
|
* found in the LICENSE file at https://angular.io/license
|
|
23996
23049
|
*/
|
|
23997
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
23998
|
-
// failure based on types.
|
|
23999
|
-
const unusedValueExportToPlacateAjd$1 = 1;
|
|
24000
|
-
|
|
24001
|
-
/**
|
|
24002
|
-
* @license
|
|
24003
|
-
* Copyright Google LLC All Rights Reserved.
|
|
24004
|
-
*
|
|
24005
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
24006
|
-
* found in the LICENSE file at https://angular.io/license
|
|
24007
|
-
*/
|
|
24008
|
-
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
24009
|
-
// failure based on types.
|
|
24010
|
-
const unusedValueExportToPlacateAjd = 1;
|
|
24011
|
-
|
|
24012
|
-
/**
|
|
24013
|
-
* @license
|
|
24014
|
-
* Copyright Google LLC All Rights Reserved.
|
|
24015
|
-
*
|
|
24016
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
24017
|
-
* found in the LICENSE file at https://angular.io/license
|
|
24018
|
-
*/
|
|
24019
|
-
const unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$6 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd;
|
|
24020
23050
|
class LQuery_ {
|
|
24021
23051
|
constructor(queryList) {
|
|
24022
23052
|
this.queryList = queryList;
|
|
@@ -24823,8 +23853,7 @@ function compileNgModuleDefs(moduleType, ngModule, allowDuplicateDeclarationsInR
|
|
|
24823
23853
|
Object.defineProperty(moduleType, NG_INJ_DEF, {
|
|
24824
23854
|
get: () => {
|
|
24825
23855
|
if (ngInjectorDef === null) {
|
|
24826
|
-
ngDevMode &&
|
|
24827
|
-
verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);
|
|
23856
|
+
ngDevMode && verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);
|
|
24828
23857
|
const meta = {
|
|
24829
23858
|
name: moduleType.name,
|
|
24830
23859
|
type: moduleType,
|