@angular/core 15.1.0-next.0 → 15.1.0-next.1
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/render/api.mjs +1 -3
- package/esm2020/src/render3/assert.mjs +1 -5
- package/esm2020/src/render3/component_ref.mjs +1 -12
- package/esm2020/src/render3/index.mjs +2 -2
- package/esm2020/src/render3/instructions/shared.mjs +87 -162
- package/esm2020/src/render3/interfaces/view.mjs +1 -10
- package/esm2020/src/render3/util/discovery_utils.mjs +3 -32
- 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 +184 -1019
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +186 -1021
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +184 -1019
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +186 -1021
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +1 -222
- package/package.json +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/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.
|
|
2
|
+
* @license Angular v15.0.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1482,15 +1482,6 @@ const EMBEDDED_VIEW_INJECTOR = 21;
|
|
|
1482
1482
|
* there should be no need to refer to `HEADER_OFFSET` anywhere else.
|
|
1483
1483
|
*/
|
|
1484
1484
|
const HEADER_OFFSET = 22;
|
|
1485
|
-
/**
|
|
1486
|
-
* Converts `TViewType` into human readable text.
|
|
1487
|
-
* Make sure this matches with `TViewType`
|
|
1488
|
-
*/
|
|
1489
|
-
const TViewTypeAsString = [
|
|
1490
|
-
'Root',
|
|
1491
|
-
'Component',
|
|
1492
|
-
'Embedded', // 2
|
|
1493
|
-
];
|
|
1494
1485
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
1495
1486
|
// failure based on types.
|
|
1496
1487
|
const unusedValueExportToPlacateAjd$7 = 1;
|
|
@@ -1613,10 +1604,6 @@ function assertIndexInDeclRange(lView, index) {
|
|
|
1613
1604
|
const tView = lView[1];
|
|
1614
1605
|
assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);
|
|
1615
1606
|
}
|
|
1616
|
-
function assertIndexInVarsRange(lView, index) {
|
|
1617
|
-
const tView = lView[1];
|
|
1618
|
-
assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);
|
|
1619
|
-
}
|
|
1620
1607
|
function assertIndexInExpandoRange(lView, index) {
|
|
1621
1608
|
const tView = lView[1];
|
|
1622
1609
|
assertBetween(tView.expandoStartIndex, lView.length, index);
|
|
@@ -9041,7 +9028,6 @@ function unwrapElementRef(value) {
|
|
|
9041
9028
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9042
9029
|
* found in the LICENSE file at https://angular.io/license
|
|
9043
9030
|
*/
|
|
9044
|
-
const Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');
|
|
9045
9031
|
/**
|
|
9046
9032
|
* Creates and initializes a custom renderer that implements the `Renderer2` base class.
|
|
9047
9033
|
*
|
|
@@ -9125,7 +9111,7 @@ class Version {
|
|
|
9125
9111
|
/**
|
|
9126
9112
|
* @publicApi
|
|
9127
9113
|
*/
|
|
9128
|
-
const VERSION = new Version('15.1.0-next.
|
|
9114
|
+
const VERSION = new Version('15.1.0-next.1');
|
|
9129
9115
|
|
|
9130
9116
|
/**
|
|
9131
9117
|
* @license
|
|
@@ -10974,812 +10960,6 @@ function ɵɵinvalidFactory() {
|
|
|
10974
10960
|
throw new Error(msg);
|
|
10975
10961
|
}
|
|
10976
10962
|
|
|
10977
|
-
/**
|
|
10978
|
-
* @license
|
|
10979
|
-
* Copyright Google LLC All Rights Reserved.
|
|
10980
|
-
*
|
|
10981
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
10982
|
-
* found in the LICENSE file at https://angular.io/license
|
|
10983
|
-
*/
|
|
10984
|
-
/**
|
|
10985
|
-
* THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!
|
|
10986
|
-
*/
|
|
10987
|
-
/**
|
|
10988
|
-
* Creates an `Array` construction with a given name. This is useful when
|
|
10989
|
-
* looking for memory consumption to see what time of array it is.
|
|
10990
|
-
*
|
|
10991
|
-
*
|
|
10992
|
-
* @param name Name to give to the constructor
|
|
10993
|
-
* @returns A subclass of `Array` if possible. This can only be done in
|
|
10994
|
-
* environments which support `class` construct.
|
|
10995
|
-
*/
|
|
10996
|
-
function createNamedArrayType(name) {
|
|
10997
|
-
// This should never be called in prod mode, so let's verify that is the case.
|
|
10998
|
-
if (ngDevMode) {
|
|
10999
|
-
try {
|
|
11000
|
-
// If this function were compromised the following could lead to arbitrary
|
|
11001
|
-
// script execution. We bless it with Trusted Types anyway since this
|
|
11002
|
-
// function is stripped out of production binaries.
|
|
11003
|
-
return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array);
|
|
11004
|
-
}
|
|
11005
|
-
catch (e) {
|
|
11006
|
-
// If it does not work just give up and fall back to regular Array.
|
|
11007
|
-
return Array;
|
|
11008
|
-
}
|
|
11009
|
-
}
|
|
11010
|
-
else {
|
|
11011
|
-
throw new Error('Looks like we are in \'prod mode\', but we are creating a named Array type, which is wrong! Check your code');
|
|
11012
|
-
}
|
|
11013
|
-
}
|
|
11014
|
-
|
|
11015
|
-
/**
|
|
11016
|
-
* @license
|
|
11017
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11018
|
-
*
|
|
11019
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11020
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11021
|
-
*/
|
|
11022
|
-
function toTStylingRange(prev, next) {
|
|
11023
|
-
ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11024
|
-
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11025
|
-
return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
11026
|
-
}
|
|
11027
|
-
function getTStylingRangePrev(tStylingRange) {
|
|
11028
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11029
|
-
return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
|
|
11030
|
-
}
|
|
11031
|
-
function getTStylingRangePrevDuplicate(tStylingRange) {
|
|
11032
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11033
|
-
return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
|
|
11034
|
-
2 /* StylingRange.PREV_DUPLICATE */;
|
|
11035
|
-
}
|
|
11036
|
-
function setTStylingRangePrev(tStylingRange, previous) {
|
|
11037
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11038
|
-
ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11039
|
-
return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
|
|
11040
|
-
(previous << 17 /* StylingRange.PREV_SHIFT */));
|
|
11041
|
-
}
|
|
11042
|
-
function setTStylingRangePrevDuplicate(tStylingRange) {
|
|
11043
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11044
|
-
return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
|
|
11045
|
-
}
|
|
11046
|
-
function getTStylingRangeNext(tStylingRange) {
|
|
11047
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11048
|
-
return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
|
|
11049
|
-
}
|
|
11050
|
-
function setTStylingRangeNext(tStylingRange, next) {
|
|
11051
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11052
|
-
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11053
|
-
return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
|
|
11054
|
-
next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
11055
|
-
}
|
|
11056
|
-
function getTStylingRangeNextDuplicate(tStylingRange) {
|
|
11057
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11058
|
-
return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
|
|
11059
|
-
1 /* StylingRange.NEXT_DUPLICATE */;
|
|
11060
|
-
}
|
|
11061
|
-
function setTStylingRangeNextDuplicate(tStylingRange) {
|
|
11062
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11063
|
-
return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
|
|
11064
|
-
}
|
|
11065
|
-
function getTStylingRangeTail(tStylingRange) {
|
|
11066
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11067
|
-
const next = getTStylingRangeNext(tStylingRange);
|
|
11068
|
-
return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
|
|
11069
|
-
}
|
|
11070
|
-
|
|
11071
|
-
/**
|
|
11072
|
-
* @license
|
|
11073
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11074
|
-
*
|
|
11075
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11076
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11077
|
-
*/
|
|
11078
|
-
/**
|
|
11079
|
-
* Patch a `debug` property on top of the existing object.
|
|
11080
|
-
*
|
|
11081
|
-
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
11082
|
-
*
|
|
11083
|
-
* @param obj Object to patch
|
|
11084
|
-
* @param debug Value to patch
|
|
11085
|
-
*/
|
|
11086
|
-
function attachDebugObject(obj, debug) {
|
|
11087
|
-
if (ngDevMode) {
|
|
11088
|
-
Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
|
|
11089
|
-
}
|
|
11090
|
-
else {
|
|
11091
|
-
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
11092
|
-
}
|
|
11093
|
-
}
|
|
11094
|
-
/**
|
|
11095
|
-
* Patch a `debug` property getter on top of the existing object.
|
|
11096
|
-
*
|
|
11097
|
-
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
11098
|
-
*
|
|
11099
|
-
* @param obj Object to patch
|
|
11100
|
-
* @param debugGetter Getter returning a value to patch
|
|
11101
|
-
*/
|
|
11102
|
-
function attachDebugGetter(obj, debugGetter) {
|
|
11103
|
-
if (ngDevMode) {
|
|
11104
|
-
Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
|
|
11105
|
-
}
|
|
11106
|
-
else {
|
|
11107
|
-
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
11108
|
-
}
|
|
11109
|
-
}
|
|
11110
|
-
|
|
11111
|
-
/**
|
|
11112
|
-
* @license
|
|
11113
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11114
|
-
*
|
|
11115
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11116
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11117
|
-
*/
|
|
11118
|
-
/*
|
|
11119
|
-
* This file contains conditionally attached classes which provide human readable (debug) level
|
|
11120
|
-
* information for `LView`, `LContainer` and other internal data structures. These data structures
|
|
11121
|
-
* are stored internally as array which makes it very difficult during debugging to reason about the
|
|
11122
|
-
* current state of the system.
|
|
11123
|
-
*
|
|
11124
|
-
* Patching the array with extra property does change the array's hidden class' but it does not
|
|
11125
|
-
* change the cost of access, therefore this patching should not have significant if any impact in
|
|
11126
|
-
* `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)
|
|
11127
|
-
*
|
|
11128
|
-
* So instead of seeing:
|
|
11129
|
-
* ```
|
|
11130
|
-
* Array(30) [Object, 659, null, …]
|
|
11131
|
-
* ```
|
|
11132
|
-
*
|
|
11133
|
-
* You get to see:
|
|
11134
|
-
* ```
|
|
11135
|
-
* LViewDebug {
|
|
11136
|
-
* views: [...],
|
|
11137
|
-
* flags: {attached: true, ...}
|
|
11138
|
-
* nodes: [
|
|
11139
|
-
* {html: '<div id="123">', ..., nodes: [
|
|
11140
|
-
* {html: '<span>', ..., nodes: null}
|
|
11141
|
-
* ]}
|
|
11142
|
-
* ]
|
|
11143
|
-
* }
|
|
11144
|
-
* ```
|
|
11145
|
-
*/
|
|
11146
|
-
let LVIEW_COMPONENT_CACHE;
|
|
11147
|
-
let LVIEW_EMBEDDED_CACHE;
|
|
11148
|
-
let LVIEW_ROOT;
|
|
11149
|
-
let LVIEW_COMPONENT;
|
|
11150
|
-
let LVIEW_EMBEDDED;
|
|
11151
|
-
/**
|
|
11152
|
-
* This function clones a blueprint and creates LView.
|
|
11153
|
-
*
|
|
11154
|
-
* Simple slice will keep the same type, and we need it to be LView
|
|
11155
|
-
*/
|
|
11156
|
-
function cloneToLViewFromTViewBlueprint(tView) {
|
|
11157
|
-
const debugTView = tView;
|
|
11158
|
-
const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);
|
|
11159
|
-
return lView.concat(tView.blueprint);
|
|
11160
|
-
}
|
|
11161
|
-
class LRootView extends Array {
|
|
11162
|
-
}
|
|
11163
|
-
class LComponentView extends Array {
|
|
11164
|
-
}
|
|
11165
|
-
class LEmbeddedView extends Array {
|
|
11166
|
-
}
|
|
11167
|
-
function getLViewToClone(type, name) {
|
|
11168
|
-
switch (type) {
|
|
11169
|
-
case 0 /* TViewType.Root */:
|
|
11170
|
-
if (LVIEW_ROOT === undefined)
|
|
11171
|
-
LVIEW_ROOT = new LRootView();
|
|
11172
|
-
return LVIEW_ROOT;
|
|
11173
|
-
case 1 /* TViewType.Component */:
|
|
11174
|
-
if (!ngDevMode || !ngDevMode.namedConstructors) {
|
|
11175
|
-
if (LVIEW_COMPONENT === undefined)
|
|
11176
|
-
LVIEW_COMPONENT = new LComponentView();
|
|
11177
|
-
return LVIEW_COMPONENT;
|
|
11178
|
-
}
|
|
11179
|
-
if (LVIEW_COMPONENT_CACHE === undefined)
|
|
11180
|
-
LVIEW_COMPONENT_CACHE = new Map();
|
|
11181
|
-
let componentArray = LVIEW_COMPONENT_CACHE.get(name);
|
|
11182
|
-
if (componentArray === undefined) {
|
|
11183
|
-
componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();
|
|
11184
|
-
LVIEW_COMPONENT_CACHE.set(name, componentArray);
|
|
11185
|
-
}
|
|
11186
|
-
return componentArray;
|
|
11187
|
-
case 2 /* TViewType.Embedded */:
|
|
11188
|
-
if (!ngDevMode || !ngDevMode.namedConstructors) {
|
|
11189
|
-
if (LVIEW_EMBEDDED === undefined)
|
|
11190
|
-
LVIEW_EMBEDDED = new LEmbeddedView();
|
|
11191
|
-
return LVIEW_EMBEDDED;
|
|
11192
|
-
}
|
|
11193
|
-
if (LVIEW_EMBEDDED_CACHE === undefined)
|
|
11194
|
-
LVIEW_EMBEDDED_CACHE = new Map();
|
|
11195
|
-
let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);
|
|
11196
|
-
if (embeddedArray === undefined) {
|
|
11197
|
-
embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();
|
|
11198
|
-
LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);
|
|
11199
|
-
}
|
|
11200
|
-
return embeddedArray;
|
|
11201
|
-
}
|
|
11202
|
-
}
|
|
11203
|
-
function nameSuffix(text) {
|
|
11204
|
-
if (text == null)
|
|
11205
|
-
return '';
|
|
11206
|
-
const index = text.lastIndexOf('_Template');
|
|
11207
|
-
return '_' + (index === -1 ? text : text.slice(0, index));
|
|
11208
|
-
}
|
|
11209
|
-
/**
|
|
11210
|
-
* This class is a debug version of Object literal so that we can have constructor name show up
|
|
11211
|
-
* in
|
|
11212
|
-
* debug tools in ngDevMode.
|
|
11213
|
-
*/
|
|
11214
|
-
const TViewConstructor = class TView {
|
|
11215
|
-
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) {
|
|
11216
|
-
this.type = type;
|
|
11217
|
-
this.blueprint = blueprint;
|
|
11218
|
-
this.template = template;
|
|
11219
|
-
this.queries = queries;
|
|
11220
|
-
this.viewQuery = viewQuery;
|
|
11221
|
-
this.declTNode = declTNode;
|
|
11222
|
-
this.data = data;
|
|
11223
|
-
this.bindingStartIndex = bindingStartIndex;
|
|
11224
|
-
this.expandoStartIndex = expandoStartIndex;
|
|
11225
|
-
this.hostBindingOpCodes = hostBindingOpCodes;
|
|
11226
|
-
this.firstCreatePass = firstCreatePass;
|
|
11227
|
-
this.firstUpdatePass = firstUpdatePass;
|
|
11228
|
-
this.staticViewQueries = staticViewQueries;
|
|
11229
|
-
this.staticContentQueries = staticContentQueries;
|
|
11230
|
-
this.preOrderHooks = preOrderHooks;
|
|
11231
|
-
this.preOrderCheckHooks = preOrderCheckHooks;
|
|
11232
|
-
this.contentHooks = contentHooks;
|
|
11233
|
-
this.contentCheckHooks = contentCheckHooks;
|
|
11234
|
-
this.viewHooks = viewHooks;
|
|
11235
|
-
this.viewCheckHooks = viewCheckHooks;
|
|
11236
|
-
this.destroyHooks = destroyHooks;
|
|
11237
|
-
this.cleanup = cleanup;
|
|
11238
|
-
this.contentQueries = contentQueries;
|
|
11239
|
-
this.components = components;
|
|
11240
|
-
this.directiveRegistry = directiveRegistry;
|
|
11241
|
-
this.pipeRegistry = pipeRegistry;
|
|
11242
|
-
this.firstChild = firstChild;
|
|
11243
|
-
this.schemas = schemas;
|
|
11244
|
-
this.consts = consts;
|
|
11245
|
-
this.incompleteFirstPass = incompleteFirstPass;
|
|
11246
|
-
this._decls = _decls;
|
|
11247
|
-
this._vars = _vars;
|
|
11248
|
-
}
|
|
11249
|
-
get template_() {
|
|
11250
|
-
const buf = [];
|
|
11251
|
-
processTNodeChildren(this.firstChild, buf);
|
|
11252
|
-
return buf.join('');
|
|
11253
|
-
}
|
|
11254
|
-
get type_() {
|
|
11255
|
-
return TViewTypeAsString[this.type] || `TViewType.?${this.type}?`;
|
|
11256
|
-
}
|
|
11257
|
-
};
|
|
11258
|
-
class TNode {
|
|
11259
|
-
constructor(tView_, //
|
|
11260
|
-
type, //
|
|
11261
|
-
index, //
|
|
11262
|
-
insertBeforeIndex, //
|
|
11263
|
-
injectorIndex, //
|
|
11264
|
-
componentOffset, //
|
|
11265
|
-
directiveStart, //
|
|
11266
|
-
directiveEnd, //
|
|
11267
|
-
directiveStylingLast, //
|
|
11268
|
-
propertyBindings, //
|
|
11269
|
-
flags, //
|
|
11270
|
-
providerIndexes, //
|
|
11271
|
-
value, //
|
|
11272
|
-
attrs, //
|
|
11273
|
-
mergedAttrs, //
|
|
11274
|
-
localNames, //
|
|
11275
|
-
initialInputs, //
|
|
11276
|
-
inputs, //
|
|
11277
|
-
outputs, //
|
|
11278
|
-
tViews, //
|
|
11279
|
-
next, //
|
|
11280
|
-
projectionNext, //
|
|
11281
|
-
child, //
|
|
11282
|
-
parent, //
|
|
11283
|
-
projection, //
|
|
11284
|
-
styles, //
|
|
11285
|
-
stylesWithoutHost, //
|
|
11286
|
-
residualStyles, //
|
|
11287
|
-
classes, //
|
|
11288
|
-
classesWithoutHost, //
|
|
11289
|
-
residualClasses, //
|
|
11290
|
-
classBindings, //
|
|
11291
|
-
styleBindings) {
|
|
11292
|
-
this.tView_ = tView_;
|
|
11293
|
-
this.type = type;
|
|
11294
|
-
this.index = index;
|
|
11295
|
-
this.insertBeforeIndex = insertBeforeIndex;
|
|
11296
|
-
this.injectorIndex = injectorIndex;
|
|
11297
|
-
this.componentOffset = componentOffset;
|
|
11298
|
-
this.directiveStart = directiveStart;
|
|
11299
|
-
this.directiveEnd = directiveEnd;
|
|
11300
|
-
this.directiveStylingLast = directiveStylingLast;
|
|
11301
|
-
this.propertyBindings = propertyBindings;
|
|
11302
|
-
this.flags = flags;
|
|
11303
|
-
this.providerIndexes = providerIndexes;
|
|
11304
|
-
this.value = value;
|
|
11305
|
-
this.attrs = attrs;
|
|
11306
|
-
this.mergedAttrs = mergedAttrs;
|
|
11307
|
-
this.localNames = localNames;
|
|
11308
|
-
this.initialInputs = initialInputs;
|
|
11309
|
-
this.inputs = inputs;
|
|
11310
|
-
this.outputs = outputs;
|
|
11311
|
-
this.tViews = tViews;
|
|
11312
|
-
this.next = next;
|
|
11313
|
-
this.projectionNext = projectionNext;
|
|
11314
|
-
this.child = child;
|
|
11315
|
-
this.parent = parent;
|
|
11316
|
-
this.projection = projection;
|
|
11317
|
-
this.styles = styles;
|
|
11318
|
-
this.stylesWithoutHost = stylesWithoutHost;
|
|
11319
|
-
this.residualStyles = residualStyles;
|
|
11320
|
-
this.classes = classes;
|
|
11321
|
-
this.classesWithoutHost = classesWithoutHost;
|
|
11322
|
-
this.residualClasses = residualClasses;
|
|
11323
|
-
this.classBindings = classBindings;
|
|
11324
|
-
this.styleBindings = styleBindings;
|
|
11325
|
-
}
|
|
11326
|
-
/**
|
|
11327
|
-
* Return a human debug version of the set of `NodeInjector`s which will be consulted when
|
|
11328
|
-
* resolving tokens from this `TNode`.
|
|
11329
|
-
*
|
|
11330
|
-
* When debugging applications, it is often difficult to determine which `NodeInjector`s will be
|
|
11331
|
-
* consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be
|
|
11332
|
-
* consulted in order when resolving a token starting at this `TNode`.
|
|
11333
|
-
*
|
|
11334
|
-
* The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is
|
|
11335
|
-
* difficult to reason about.
|
|
11336
|
-
*
|
|
11337
|
-
* @param lView The `LView` instance for this `TNode`.
|
|
11338
|
-
*/
|
|
11339
|
-
debugNodeInjectorPath(lView) {
|
|
11340
|
-
const path = [];
|
|
11341
|
-
let injectorIndex = getInjectorIndex(this, lView);
|
|
11342
|
-
if (injectorIndex === -1) {
|
|
11343
|
-
// Looks like the current `TNode` does not have `NodeInjector` associated with it => look for
|
|
11344
|
-
// parent NodeInjector.
|
|
11345
|
-
const parentLocation = getParentInjectorLocation(this, lView);
|
|
11346
|
-
if (parentLocation !== NO_PARENT_INJECTOR) {
|
|
11347
|
-
// We found a parent, so start searching from the parent location.
|
|
11348
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
11349
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
11350
|
-
}
|
|
11351
|
-
else {
|
|
11352
|
-
// No parents have been found, so there are no `NodeInjector`s to consult.
|
|
11353
|
-
}
|
|
11354
|
-
}
|
|
11355
|
-
while (injectorIndex !== -1) {
|
|
11356
|
-
ngDevMode && assertNodeInjector(lView, injectorIndex);
|
|
11357
|
-
const tNode = lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];
|
|
11358
|
-
path.push(buildDebugNode(tNode, lView));
|
|
11359
|
-
const parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];
|
|
11360
|
-
if (parentLocation === NO_PARENT_INJECTOR) {
|
|
11361
|
-
injectorIndex = -1;
|
|
11362
|
-
}
|
|
11363
|
-
else {
|
|
11364
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
11365
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
11366
|
-
}
|
|
11367
|
-
}
|
|
11368
|
-
return path;
|
|
11369
|
-
}
|
|
11370
|
-
get type_() {
|
|
11371
|
-
return toTNodeTypeAsString(this.type) || `TNodeType.?${this.type}?`;
|
|
11372
|
-
}
|
|
11373
|
-
get flags_() {
|
|
11374
|
-
const flags = [];
|
|
11375
|
-
if (this.flags & 8 /* TNodeFlags.hasClassInput */)
|
|
11376
|
-
flags.push('TNodeFlags.hasClassInput');
|
|
11377
|
-
if (this.flags & 4 /* TNodeFlags.hasContentQuery */)
|
|
11378
|
-
flags.push('TNodeFlags.hasContentQuery');
|
|
11379
|
-
if (this.flags & 16 /* TNodeFlags.hasStyleInput */)
|
|
11380
|
-
flags.push('TNodeFlags.hasStyleInput');
|
|
11381
|
-
if (this.flags & 64 /* TNodeFlags.hasHostBindings */)
|
|
11382
|
-
flags.push('TNodeFlags.hasHostBindings');
|
|
11383
|
-
if (this.flags & 1 /* TNodeFlags.isDirectiveHost */)
|
|
11384
|
-
flags.push('TNodeFlags.isDirectiveHost');
|
|
11385
|
-
if (this.flags & 32 /* TNodeFlags.isDetached */)
|
|
11386
|
-
flags.push('TNodeFlags.isDetached');
|
|
11387
|
-
if (this.flags & 2 /* TNodeFlags.isProjected */)
|
|
11388
|
-
flags.push('TNodeFlags.isProjected');
|
|
11389
|
-
return flags.join('|');
|
|
11390
|
-
}
|
|
11391
|
-
get template_() {
|
|
11392
|
-
if (this.type & 1 /* TNodeType.Text */)
|
|
11393
|
-
return this.value;
|
|
11394
|
-
const buf = [];
|
|
11395
|
-
const tagName = typeof this.value === 'string' && this.value || this.type_;
|
|
11396
|
-
buf.push('<', tagName);
|
|
11397
|
-
if (this.flags) {
|
|
11398
|
-
buf.push(' ', this.flags_);
|
|
11399
|
-
}
|
|
11400
|
-
if (this.attrs) {
|
|
11401
|
-
for (let i = 0; i < this.attrs.length;) {
|
|
11402
|
-
const attrName = this.attrs[i++];
|
|
11403
|
-
if (typeof attrName == 'number') {
|
|
11404
|
-
break;
|
|
11405
|
-
}
|
|
11406
|
-
const attrValue = this.attrs[i++];
|
|
11407
|
-
buf.push(' ', attrName, '="', attrValue, '"');
|
|
11408
|
-
}
|
|
11409
|
-
}
|
|
11410
|
-
buf.push('>');
|
|
11411
|
-
processTNodeChildren(this.child, buf);
|
|
11412
|
-
buf.push('</', tagName, '>');
|
|
11413
|
-
return buf.join('');
|
|
11414
|
-
}
|
|
11415
|
-
get styleBindings_() {
|
|
11416
|
-
return toDebugStyleBinding(this, false);
|
|
11417
|
-
}
|
|
11418
|
-
get classBindings_() {
|
|
11419
|
-
return toDebugStyleBinding(this, true);
|
|
11420
|
-
}
|
|
11421
|
-
get providerIndexStart_() {
|
|
11422
|
-
return this.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;
|
|
11423
|
-
}
|
|
11424
|
-
get providerIndexEnd_() {
|
|
11425
|
-
return this.providerIndexStart_ +
|
|
11426
|
-
(this.providerIndexes >>> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */);
|
|
11427
|
-
}
|
|
11428
|
-
}
|
|
11429
|
-
const TNodeDebug = TNode;
|
|
11430
|
-
function toDebugStyleBinding(tNode, isClassBased) {
|
|
11431
|
-
const tData = tNode.tView_.data;
|
|
11432
|
-
const bindings = [];
|
|
11433
|
-
const range = isClassBased ? tNode.classBindings : tNode.styleBindings;
|
|
11434
|
-
const prev = getTStylingRangePrev(range);
|
|
11435
|
-
const next = getTStylingRangeNext(range);
|
|
11436
|
-
let isTemplate = next !== 0;
|
|
11437
|
-
let cursor = isTemplate ? next : prev;
|
|
11438
|
-
while (cursor !== 0) {
|
|
11439
|
-
const itemKey = tData[cursor];
|
|
11440
|
-
const itemRange = tData[cursor + 1];
|
|
11441
|
-
bindings.unshift({
|
|
11442
|
-
key: itemKey,
|
|
11443
|
-
index: cursor,
|
|
11444
|
-
isTemplate: isTemplate,
|
|
11445
|
-
prevDuplicate: getTStylingRangePrevDuplicate(itemRange),
|
|
11446
|
-
nextDuplicate: getTStylingRangeNextDuplicate(itemRange),
|
|
11447
|
-
nextIndex: getTStylingRangeNext(itemRange),
|
|
11448
|
-
prevIndex: getTStylingRangePrev(itemRange),
|
|
11449
|
-
});
|
|
11450
|
-
if (cursor === prev)
|
|
11451
|
-
isTemplate = false;
|
|
11452
|
-
cursor = getTStylingRangePrev(itemRange);
|
|
11453
|
-
}
|
|
11454
|
-
bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);
|
|
11455
|
-
return bindings;
|
|
11456
|
-
}
|
|
11457
|
-
function processTNodeChildren(tNode, buf) {
|
|
11458
|
-
while (tNode) {
|
|
11459
|
-
buf.push(tNode.template_);
|
|
11460
|
-
tNode = tNode.next;
|
|
11461
|
-
}
|
|
11462
|
-
}
|
|
11463
|
-
class TViewData extends Array {
|
|
11464
|
-
}
|
|
11465
|
-
let TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because
|
|
11466
|
-
// `LView` constructor could have side-effects.
|
|
11467
|
-
/**
|
|
11468
|
-
* This function clones a blueprint and creates TData.
|
|
11469
|
-
*
|
|
11470
|
-
* Simple slice will keep the same type, and we need it to be TData
|
|
11471
|
-
*/
|
|
11472
|
-
function cloneToTViewData(list) {
|
|
11473
|
-
if (TVIEWDATA_EMPTY === undefined)
|
|
11474
|
-
TVIEWDATA_EMPTY = new TViewData();
|
|
11475
|
-
return TVIEWDATA_EMPTY.concat(list);
|
|
11476
|
-
}
|
|
11477
|
-
class LViewBlueprint extends Array {
|
|
11478
|
-
}
|
|
11479
|
-
class MatchesArray extends Array {
|
|
11480
|
-
}
|
|
11481
|
-
class TViewComponents extends Array {
|
|
11482
|
-
}
|
|
11483
|
-
class TNodeLocalNames extends Array {
|
|
11484
|
-
}
|
|
11485
|
-
class TNodeInitialInputs extends Array {
|
|
11486
|
-
}
|
|
11487
|
-
class LCleanup extends Array {
|
|
11488
|
-
}
|
|
11489
|
-
class TCleanup extends Array {
|
|
11490
|
-
}
|
|
11491
|
-
function attachLViewDebug(lView) {
|
|
11492
|
-
attachDebugObject(lView, new LViewDebug(lView));
|
|
11493
|
-
}
|
|
11494
|
-
function attachLContainerDebug(lContainer) {
|
|
11495
|
-
attachDebugObject(lContainer, new LContainerDebug(lContainer));
|
|
11496
|
-
}
|
|
11497
|
-
function toDebug(obj) {
|
|
11498
|
-
if (obj) {
|
|
11499
|
-
const debug = obj.debug;
|
|
11500
|
-
assertDefined(debug, 'Object does not have a debug representation.');
|
|
11501
|
-
return debug;
|
|
11502
|
-
}
|
|
11503
|
-
else {
|
|
11504
|
-
return obj;
|
|
11505
|
-
}
|
|
11506
|
-
}
|
|
11507
|
-
/**
|
|
11508
|
-
* Use this method to unwrap a native element in `LView` and convert it into HTML for easier
|
|
11509
|
-
* reading.
|
|
11510
|
-
*
|
|
11511
|
-
* @param value possibly wrapped native DOM node.
|
|
11512
|
-
* @param includeChildren If `true` then the serialized HTML form will include child elements
|
|
11513
|
-
* (same
|
|
11514
|
-
* as `outerHTML`). If `false` then the serialized HTML form will only contain the element
|
|
11515
|
-
* itself
|
|
11516
|
-
* (will not serialize child elements).
|
|
11517
|
-
*/
|
|
11518
|
-
function toHtml(value, includeChildren = false) {
|
|
11519
|
-
const node = unwrapRNode(value);
|
|
11520
|
-
if (node) {
|
|
11521
|
-
switch (node.nodeType) {
|
|
11522
|
-
case Node.TEXT_NODE:
|
|
11523
|
-
return node.textContent;
|
|
11524
|
-
case Node.COMMENT_NODE:
|
|
11525
|
-
return `<!--${node.textContent}-->`;
|
|
11526
|
-
case Node.ELEMENT_NODE:
|
|
11527
|
-
const outerHTML = node.outerHTML;
|
|
11528
|
-
if (includeChildren) {
|
|
11529
|
-
return outerHTML;
|
|
11530
|
-
}
|
|
11531
|
-
else {
|
|
11532
|
-
const innerHTML = '>' + node.innerHTML + '<';
|
|
11533
|
-
return (outerHTML.split(innerHTML)[0]) + '>';
|
|
11534
|
-
}
|
|
11535
|
-
}
|
|
11536
|
-
}
|
|
11537
|
-
return null;
|
|
11538
|
-
}
|
|
11539
|
-
class LViewDebug {
|
|
11540
|
-
constructor(_raw_lView) {
|
|
11541
|
-
this._raw_lView = _raw_lView;
|
|
11542
|
-
}
|
|
11543
|
-
/**
|
|
11544
|
-
* Flags associated with the `LView` unpacked into a more readable state.
|
|
11545
|
-
*/
|
|
11546
|
-
get flags() {
|
|
11547
|
-
const flags = this._raw_lView[FLAGS];
|
|
11548
|
-
return {
|
|
11549
|
-
__raw__flags__: flags,
|
|
11550
|
-
initPhaseState: flags & 3 /* LViewFlags.InitPhaseStateMask */,
|
|
11551
|
-
creationMode: !!(flags & 4 /* LViewFlags.CreationMode */),
|
|
11552
|
-
firstViewPass: !!(flags & 8 /* LViewFlags.FirstLViewPass */),
|
|
11553
|
-
checkAlways: !!(flags & 16 /* LViewFlags.CheckAlways */),
|
|
11554
|
-
dirty: !!(flags & 32 /* LViewFlags.Dirty */),
|
|
11555
|
-
attached: !!(flags & 64 /* LViewFlags.Attached */),
|
|
11556
|
-
destroyed: !!(flags & 128 /* LViewFlags.Destroyed */),
|
|
11557
|
-
isRoot: !!(flags & 256 /* LViewFlags.IsRoot */),
|
|
11558
|
-
indexWithinInitPhase: flags >> 11 /* LViewFlags.IndexWithinInitPhaseShift */,
|
|
11559
|
-
};
|
|
11560
|
-
}
|
|
11561
|
-
get parent() {
|
|
11562
|
-
return toDebug(this._raw_lView[PARENT]);
|
|
11563
|
-
}
|
|
11564
|
-
get hostHTML() {
|
|
11565
|
-
return toHtml(this._raw_lView[HOST], true);
|
|
11566
|
-
}
|
|
11567
|
-
get html() {
|
|
11568
|
-
return (this.nodes || []).map(mapToHTML).join('');
|
|
11569
|
-
}
|
|
11570
|
-
get context() {
|
|
11571
|
-
return this._raw_lView[CONTEXT];
|
|
11572
|
-
}
|
|
11573
|
-
/**
|
|
11574
|
-
* The tree of nodes associated with the current `LView`. The nodes have been normalized into
|
|
11575
|
-
* a tree structure with relevant details pulled out for readability.
|
|
11576
|
-
*/
|
|
11577
|
-
get nodes() {
|
|
11578
|
-
const lView = this._raw_lView;
|
|
11579
|
-
const tNode = lView[TVIEW].firstChild;
|
|
11580
|
-
return toDebugNodes(tNode, lView);
|
|
11581
|
-
}
|
|
11582
|
-
get template() {
|
|
11583
|
-
return this.tView.template_;
|
|
11584
|
-
}
|
|
11585
|
-
get tView() {
|
|
11586
|
-
return this._raw_lView[TVIEW];
|
|
11587
|
-
}
|
|
11588
|
-
get cleanup() {
|
|
11589
|
-
return this._raw_lView[CLEANUP];
|
|
11590
|
-
}
|
|
11591
|
-
get injector() {
|
|
11592
|
-
return this._raw_lView[INJECTOR$1];
|
|
11593
|
-
}
|
|
11594
|
-
get rendererFactory() {
|
|
11595
|
-
return this._raw_lView[RENDERER_FACTORY];
|
|
11596
|
-
}
|
|
11597
|
-
get renderer() {
|
|
11598
|
-
return this._raw_lView[RENDERER];
|
|
11599
|
-
}
|
|
11600
|
-
get sanitizer() {
|
|
11601
|
-
return this._raw_lView[SANITIZER];
|
|
11602
|
-
}
|
|
11603
|
-
get childHead() {
|
|
11604
|
-
return toDebug(this._raw_lView[CHILD_HEAD]);
|
|
11605
|
-
}
|
|
11606
|
-
get next() {
|
|
11607
|
-
return toDebug(this._raw_lView[NEXT]);
|
|
11608
|
-
}
|
|
11609
|
-
get childTail() {
|
|
11610
|
-
return toDebug(this._raw_lView[CHILD_TAIL]);
|
|
11611
|
-
}
|
|
11612
|
-
get declarationView() {
|
|
11613
|
-
return toDebug(this._raw_lView[DECLARATION_VIEW]);
|
|
11614
|
-
}
|
|
11615
|
-
get queries() {
|
|
11616
|
-
return this._raw_lView[QUERIES];
|
|
11617
|
-
}
|
|
11618
|
-
get tHost() {
|
|
11619
|
-
return this._raw_lView[T_HOST];
|
|
11620
|
-
}
|
|
11621
|
-
get id() {
|
|
11622
|
-
return this._raw_lView[ID];
|
|
11623
|
-
}
|
|
11624
|
-
get decls() {
|
|
11625
|
-
return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);
|
|
11626
|
-
}
|
|
11627
|
-
get vars() {
|
|
11628
|
-
return toLViewRange(this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex);
|
|
11629
|
-
}
|
|
11630
|
-
get expando() {
|
|
11631
|
-
return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);
|
|
11632
|
-
}
|
|
11633
|
-
/**
|
|
11634
|
-
* Normalized view of child views (and containers) attached at this location.
|
|
11635
|
-
*/
|
|
11636
|
-
get childViews() {
|
|
11637
|
-
const childViews = [];
|
|
11638
|
-
let child = this.childHead;
|
|
11639
|
-
while (child) {
|
|
11640
|
-
childViews.push(child);
|
|
11641
|
-
child = child.next;
|
|
11642
|
-
}
|
|
11643
|
-
return childViews;
|
|
11644
|
-
}
|
|
11645
|
-
}
|
|
11646
|
-
function mapToHTML(node) {
|
|
11647
|
-
if (node.type === 'ElementContainer') {
|
|
11648
|
-
return (node.children || []).map(mapToHTML).join('');
|
|
11649
|
-
}
|
|
11650
|
-
else if (node.type === 'IcuContainer') {
|
|
11651
|
-
throw new Error('Not implemented');
|
|
11652
|
-
}
|
|
11653
|
-
else {
|
|
11654
|
-
return toHtml(node.native, true) || '';
|
|
11655
|
-
}
|
|
11656
|
-
}
|
|
11657
|
-
function toLViewRange(tView, lView, start, end) {
|
|
11658
|
-
let content = [];
|
|
11659
|
-
for (let index = start; index < end; index++) {
|
|
11660
|
-
content.push({ index: index, t: tView.data[index], l: lView[index] });
|
|
11661
|
-
}
|
|
11662
|
-
return { start: start, end: end, length: end - start, content: content };
|
|
11663
|
-
}
|
|
11664
|
-
/**
|
|
11665
|
-
* Turns a flat list of nodes into a tree by walking the associated `TNode` tree.
|
|
11666
|
-
*
|
|
11667
|
-
* @param tNode
|
|
11668
|
-
* @param lView
|
|
11669
|
-
*/
|
|
11670
|
-
function toDebugNodes(tNode, lView) {
|
|
11671
|
-
if (tNode) {
|
|
11672
|
-
const debugNodes = [];
|
|
11673
|
-
let tNodeCursor = tNode;
|
|
11674
|
-
while (tNodeCursor) {
|
|
11675
|
-
debugNodes.push(buildDebugNode(tNodeCursor, lView));
|
|
11676
|
-
tNodeCursor = tNodeCursor.next;
|
|
11677
|
-
}
|
|
11678
|
-
return debugNodes;
|
|
11679
|
-
}
|
|
11680
|
-
else {
|
|
11681
|
-
return [];
|
|
11682
|
-
}
|
|
11683
|
-
}
|
|
11684
|
-
function buildDebugNode(tNode, lView) {
|
|
11685
|
-
const rawValue = lView[tNode.index];
|
|
11686
|
-
const native = unwrapRNode(rawValue);
|
|
11687
|
-
const factories = [];
|
|
11688
|
-
const instances = [];
|
|
11689
|
-
const tView = lView[TVIEW];
|
|
11690
|
-
for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {
|
|
11691
|
-
const def = tView.data[i];
|
|
11692
|
-
factories.push(def.type);
|
|
11693
|
-
instances.push(lView[i]);
|
|
11694
|
-
}
|
|
11695
|
-
return {
|
|
11696
|
-
html: toHtml(native),
|
|
11697
|
-
type: toTNodeTypeAsString(tNode.type),
|
|
11698
|
-
tNode,
|
|
11699
|
-
native: native,
|
|
11700
|
-
children: toDebugNodes(tNode.child, lView),
|
|
11701
|
-
factories,
|
|
11702
|
-
instances,
|
|
11703
|
-
injector: buildNodeInjectorDebug(tNode, tView, lView),
|
|
11704
|
-
get injectorResolutionPath() {
|
|
11705
|
-
return tNode.debugNodeInjectorPath(lView);
|
|
11706
|
-
},
|
|
11707
|
-
};
|
|
11708
|
-
}
|
|
11709
|
-
function buildNodeInjectorDebug(tNode, tView, lView) {
|
|
11710
|
-
const viewProviders = [];
|
|
11711
|
-
for (let i = tNode.providerIndexStart_; i < tNode.providerIndexEnd_; i++) {
|
|
11712
|
-
viewProviders.push(tView.data[i]);
|
|
11713
|
-
}
|
|
11714
|
-
const providers = [];
|
|
11715
|
-
for (let i = tNode.providerIndexEnd_; i < tNode.directiveEnd; i++) {
|
|
11716
|
-
providers.push(tView.data[i]);
|
|
11717
|
-
}
|
|
11718
|
-
const nodeInjectorDebug = {
|
|
11719
|
-
bloom: toBloom(lView, tNode.injectorIndex),
|
|
11720
|
-
cumulativeBloom: toBloom(tView.data, tNode.injectorIndex),
|
|
11721
|
-
providers,
|
|
11722
|
-
viewProviders,
|
|
11723
|
-
parentInjectorIndex: lView[tNode.providerIndexStart_ - 1],
|
|
11724
|
-
};
|
|
11725
|
-
return nodeInjectorDebug;
|
|
11726
|
-
}
|
|
11727
|
-
/**
|
|
11728
|
-
* Convert a number at `idx` location in `array` into binary representation.
|
|
11729
|
-
*
|
|
11730
|
-
* @param array
|
|
11731
|
-
* @param idx
|
|
11732
|
-
*/
|
|
11733
|
-
function binary(array, idx) {
|
|
11734
|
-
const value = array[idx];
|
|
11735
|
-
// If not a number we print 8 `?` to retain alignment but let user know that it was called on
|
|
11736
|
-
// wrong type.
|
|
11737
|
-
if (typeof value !== 'number')
|
|
11738
|
-
return '????????';
|
|
11739
|
-
// We prefix 0s so that we have constant length number
|
|
11740
|
-
const text = '00000000' + value.toString(2);
|
|
11741
|
-
return text.substring(text.length - 8);
|
|
11742
|
-
}
|
|
11743
|
-
/**
|
|
11744
|
-
* Convert a bloom filter at location `idx` in `array` into binary representation.
|
|
11745
|
-
*
|
|
11746
|
-
* @param array
|
|
11747
|
-
* @param idx
|
|
11748
|
-
*/
|
|
11749
|
-
function toBloom(array, idx) {
|
|
11750
|
-
if (idx < 0) {
|
|
11751
|
-
return 'NO_NODE_INJECTOR';
|
|
11752
|
-
}
|
|
11753
|
-
return `${binary(array, idx + 7)}_${binary(array, idx + 6)}_${binary(array, idx + 5)}_${binary(array, idx + 4)}_${binary(array, idx + 3)}_${binary(array, idx + 2)}_${binary(array, idx + 1)}_${binary(array, idx + 0)}`;
|
|
11754
|
-
}
|
|
11755
|
-
class LContainerDebug {
|
|
11756
|
-
constructor(_raw_lContainer) {
|
|
11757
|
-
this._raw_lContainer = _raw_lContainer;
|
|
11758
|
-
}
|
|
11759
|
-
get hasTransplantedViews() {
|
|
11760
|
-
return this._raw_lContainer[HAS_TRANSPLANTED_VIEWS];
|
|
11761
|
-
}
|
|
11762
|
-
get views() {
|
|
11763
|
-
return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET)
|
|
11764
|
-
.map(toDebug);
|
|
11765
|
-
}
|
|
11766
|
-
get parent() {
|
|
11767
|
-
return toDebug(this._raw_lContainer[PARENT]);
|
|
11768
|
-
}
|
|
11769
|
-
get movedViews() {
|
|
11770
|
-
return this._raw_lContainer[MOVED_VIEWS];
|
|
11771
|
-
}
|
|
11772
|
-
get host() {
|
|
11773
|
-
return this._raw_lContainer[HOST];
|
|
11774
|
-
}
|
|
11775
|
-
get native() {
|
|
11776
|
-
return this._raw_lContainer[NATIVE];
|
|
11777
|
-
}
|
|
11778
|
-
get next() {
|
|
11779
|
-
return toDebug(this._raw_lContainer[NEXT]);
|
|
11780
|
-
}
|
|
11781
|
-
}
|
|
11782
|
-
|
|
11783
10963
|
/**
|
|
11784
10964
|
* @license
|
|
11785
10965
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -11853,7 +11033,7 @@ function renderChildComponents(hostLView, components) {
|
|
|
11853
11033
|
}
|
|
11854
11034
|
}
|
|
11855
11035
|
function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {
|
|
11856
|
-
const lView =
|
|
11036
|
+
const lView = tView.blueprint.slice();
|
|
11857
11037
|
lView[HOST] = host;
|
|
11858
11038
|
lView[FLAGS] = flags | 4 /* LViewFlags.CreationMode */ | 64 /* LViewFlags.Attached */ | 8 /* LViewFlags.FirstLViewPass */;
|
|
11859
11039
|
if (embeddedViewInjector !== null ||
|
|
@@ -11877,7 +11057,6 @@ function createLView(parentLView, tView, context, flags, host, tHostNode, render
|
|
|
11877
11057
|
assertEqual(tView.type == 2 /* TViewType.Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
|
|
11878
11058
|
lView[DECLARATION_COMPONENT_VIEW] =
|
|
11879
11059
|
tView.type == 2 /* TViewType.Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;
|
|
11880
|
-
ngDevMode && attachLViewDebug(lView);
|
|
11881
11060
|
return lView;
|
|
11882
11061
|
}
|
|
11883
11062
|
function getOrCreateTNode(tView, index, type, name, attrs) {
|
|
@@ -12260,73 +11439,38 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
|
|
|
12260
11439
|
const initialViewLength = bindingStartIndex + vars;
|
|
12261
11440
|
const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
|
|
12262
11441
|
const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;
|
|
12263
|
-
const tView = blueprint[TVIEW] =
|
|
12264
|
-
|
|
12265
|
-
blueprint
|
|
12266
|
-
|
|
12267
|
-
|
|
12268
|
-
viewQuery
|
|
12269
|
-
declTNode
|
|
12270
|
-
|
|
12271
|
-
bindingStartIndex
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
typeof directives === 'function' ?
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
|
|
12292
|
-
|
|
12293
|
-
|
|
12294
|
-
|
|
12295
|
-
false, // incompleteFirstPass: boolean
|
|
12296
|
-
decls, // ngDevMode only: decls
|
|
12297
|
-
vars) :
|
|
12298
|
-
{
|
|
12299
|
-
type: type,
|
|
12300
|
-
blueprint: blueprint,
|
|
12301
|
-
template: templateFn,
|
|
12302
|
-
queries: null,
|
|
12303
|
-
viewQuery: viewQuery,
|
|
12304
|
-
declTNode: declTNode,
|
|
12305
|
-
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
12306
|
-
bindingStartIndex: bindingStartIndex,
|
|
12307
|
-
expandoStartIndex: initialViewLength,
|
|
12308
|
-
hostBindingOpCodes: null,
|
|
12309
|
-
firstCreatePass: true,
|
|
12310
|
-
firstUpdatePass: true,
|
|
12311
|
-
staticViewQueries: false,
|
|
12312
|
-
staticContentQueries: false,
|
|
12313
|
-
preOrderHooks: null,
|
|
12314
|
-
preOrderCheckHooks: null,
|
|
12315
|
-
contentHooks: null,
|
|
12316
|
-
contentCheckHooks: null,
|
|
12317
|
-
viewHooks: null,
|
|
12318
|
-
viewCheckHooks: null,
|
|
12319
|
-
destroyHooks: null,
|
|
12320
|
-
cleanup: null,
|
|
12321
|
-
contentQueries: null,
|
|
12322
|
-
components: null,
|
|
12323
|
-
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
12324
|
-
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
12325
|
-
firstChild: null,
|
|
12326
|
-
schemas: schemas,
|
|
12327
|
-
consts: consts,
|
|
12328
|
-
incompleteFirstPass: false
|
|
12329
|
-
};
|
|
11442
|
+
const tView = blueprint[TVIEW] = {
|
|
11443
|
+
type: type,
|
|
11444
|
+
blueprint: blueprint,
|
|
11445
|
+
template: templateFn,
|
|
11446
|
+
queries: null,
|
|
11447
|
+
viewQuery: viewQuery,
|
|
11448
|
+
declTNode: declTNode,
|
|
11449
|
+
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
11450
|
+
bindingStartIndex: bindingStartIndex,
|
|
11451
|
+
expandoStartIndex: initialViewLength,
|
|
11452
|
+
hostBindingOpCodes: null,
|
|
11453
|
+
firstCreatePass: true,
|
|
11454
|
+
firstUpdatePass: true,
|
|
11455
|
+
staticViewQueries: false,
|
|
11456
|
+
staticContentQueries: false,
|
|
11457
|
+
preOrderHooks: null,
|
|
11458
|
+
preOrderCheckHooks: null,
|
|
11459
|
+
contentHooks: null,
|
|
11460
|
+
contentCheckHooks: null,
|
|
11461
|
+
viewHooks: null,
|
|
11462
|
+
viewCheckHooks: null,
|
|
11463
|
+
destroyHooks: null,
|
|
11464
|
+
cleanup: null,
|
|
11465
|
+
contentQueries: null,
|
|
11466
|
+
components: null,
|
|
11467
|
+
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
11468
|
+
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
11469
|
+
firstChild: null,
|
|
11470
|
+
schemas: schemas,
|
|
11471
|
+
consts: consts,
|
|
11472
|
+
incompleteFirstPass: false
|
|
11473
|
+
};
|
|
12330
11474
|
if (ngDevMode) {
|
|
12331
11475
|
// For performance reasons it is important that the tView retains the same shape during runtime.
|
|
12332
11476
|
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
@@ -12336,7 +11480,7 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
|
|
|
12336
11480
|
return tView;
|
|
12337
11481
|
}
|
|
12338
11482
|
function createViewBlueprint(bindingStartIndex, initialViewLength) {
|
|
12339
|
-
const blueprint =
|
|
11483
|
+
const blueprint = [];
|
|
12340
11484
|
for (let i = 0; i < initialViewLength; i++) {
|
|
12341
11485
|
blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);
|
|
12342
11486
|
}
|
|
@@ -12389,74 +11533,40 @@ function createTNode(tView, tParent, type, index, value, attrs) {
|
|
|
12389
11533
|
ngDevMode && ngDevMode.tNode++;
|
|
12390
11534
|
ngDevMode && tParent && assertTNodeForTView(tParent, tView);
|
|
12391
11535
|
let injectorIndex = tParent ? tParent.injectorIndex : -1;
|
|
12392
|
-
const tNode =
|
|
12393
|
-
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12397
|
-
|
|
12398
|
-
-1,
|
|
12399
|
-
-1,
|
|
12400
|
-
-1,
|
|
12401
|
-
|
|
12402
|
-
|
|
12403
|
-
0,
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
null,
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
|
|
12417
|
-
|
|
12418
|
-
|
|
12419
|
-
|
|
12420
|
-
|
|
12421
|
-
|
|
12422
|
-
|
|
12423
|
-
|
|
12424
|
-
0,
|
|
12425
|
-
|
|
12426
|
-
{
|
|
12427
|
-
type,
|
|
12428
|
-
index,
|
|
12429
|
-
insertBeforeIndex: null,
|
|
12430
|
-
injectorIndex,
|
|
12431
|
-
directiveStart: -1,
|
|
12432
|
-
directiveEnd: -1,
|
|
12433
|
-
directiveStylingLast: -1,
|
|
12434
|
-
componentOffset: -1,
|
|
12435
|
-
propertyBindings: null,
|
|
12436
|
-
flags: 0,
|
|
12437
|
-
providerIndexes: 0,
|
|
12438
|
-
value: value,
|
|
12439
|
-
attrs: attrs,
|
|
12440
|
-
mergedAttrs: null,
|
|
12441
|
-
localNames: null,
|
|
12442
|
-
initialInputs: undefined,
|
|
12443
|
-
inputs: null,
|
|
12444
|
-
outputs: null,
|
|
12445
|
-
tViews: null,
|
|
12446
|
-
next: null,
|
|
12447
|
-
projectionNext: null,
|
|
12448
|
-
child: null,
|
|
12449
|
-
parent: tParent,
|
|
12450
|
-
projection: null,
|
|
12451
|
-
styles: null,
|
|
12452
|
-
stylesWithoutHost: null,
|
|
12453
|
-
residualStyles: undefined,
|
|
12454
|
-
classes: null,
|
|
12455
|
-
classesWithoutHost: null,
|
|
12456
|
-
residualClasses: undefined,
|
|
12457
|
-
classBindings: 0,
|
|
12458
|
-
styleBindings: 0,
|
|
12459
|
-
};
|
|
11536
|
+
const tNode = {
|
|
11537
|
+
type,
|
|
11538
|
+
index,
|
|
11539
|
+
insertBeforeIndex: null,
|
|
11540
|
+
injectorIndex,
|
|
11541
|
+
directiveStart: -1,
|
|
11542
|
+
directiveEnd: -1,
|
|
11543
|
+
directiveStylingLast: -1,
|
|
11544
|
+
componentOffset: -1,
|
|
11545
|
+
propertyBindings: null,
|
|
11546
|
+
flags: 0,
|
|
11547
|
+
providerIndexes: 0,
|
|
11548
|
+
value: value,
|
|
11549
|
+
attrs: attrs,
|
|
11550
|
+
mergedAttrs: null,
|
|
11551
|
+
localNames: null,
|
|
11552
|
+
initialInputs: undefined,
|
|
11553
|
+
inputs: null,
|
|
11554
|
+
outputs: null,
|
|
11555
|
+
tViews: null,
|
|
11556
|
+
next: null,
|
|
11557
|
+
projectionNext: null,
|
|
11558
|
+
child: null,
|
|
11559
|
+
parent: tParent,
|
|
11560
|
+
projection: null,
|
|
11561
|
+
styles: null,
|
|
11562
|
+
stylesWithoutHost: null,
|
|
11563
|
+
residualStyles: undefined,
|
|
11564
|
+
classes: null,
|
|
11565
|
+
classesWithoutHost: null,
|
|
11566
|
+
residualClasses: undefined,
|
|
11567
|
+
classBindings: 0,
|
|
11568
|
+
styleBindings: 0,
|
|
11569
|
+
};
|
|
12460
11570
|
if (ngDevMode) {
|
|
12461
11571
|
// For performance reasons it is important that the tNode retains the same shape during runtime.
|
|
12462
11572
|
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
@@ -12513,7 +11623,7 @@ function initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefinitionMa
|
|
|
12513
11623
|
const end = tNode.directiveEnd;
|
|
12514
11624
|
const tViewData = tView.data;
|
|
12515
11625
|
const tNodeAttrs = tNode.attrs;
|
|
12516
|
-
const inputsFromAttrs =
|
|
11626
|
+
const inputsFromAttrs = [];
|
|
12517
11627
|
let inputsStore = null;
|
|
12518
11628
|
let outputsStore = null;
|
|
12519
11629
|
for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {
|
|
@@ -12852,7 +11962,7 @@ function findDirectiveDefMatches(tView, tNode) {
|
|
|
12852
11962
|
for (let i = 0; i < registry.length; i++) {
|
|
12853
11963
|
const def = registry[i];
|
|
12854
11964
|
if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {
|
|
12855
|
-
matches || (matches =
|
|
11965
|
+
matches || (matches = []);
|
|
12856
11966
|
if (isComponentDef(def)) {
|
|
12857
11967
|
if (ngDevMode) {
|
|
12858
11968
|
assertTNodeType(tNode, 2 /* TNodeType.Element */, `"${tNode.value}" tags cannot be used as component hosts. ` +
|
|
@@ -12910,13 +12020,12 @@ function markAsComponentHost(tView, hostTNode, componentOffset) {
|
|
|
12910
12020
|
ngDevMode && assertFirstCreatePass(tView);
|
|
12911
12021
|
ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');
|
|
12912
12022
|
hostTNode.componentOffset = componentOffset;
|
|
12913
|
-
(tView.components || (tView.components =
|
|
12914
|
-
.push(hostTNode.index);
|
|
12023
|
+
(tView.components || (tView.components = [])).push(hostTNode.index);
|
|
12915
12024
|
}
|
|
12916
12025
|
/** Caches local names and their matching directive indices for query and template lookups. */
|
|
12917
12026
|
function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
|
|
12918
12027
|
if (localRefs) {
|
|
12919
|
-
const localNames = tNode.localNames =
|
|
12028
|
+
const localNames = tNode.localNames = [];
|
|
12920
12029
|
// Local names must be stored in tNode in the same order that localRefs are defined
|
|
12921
12030
|
// in the template to ensure the data is loaded in the same slots as their refs
|
|
12922
12031
|
// in the template (for template queries).
|
|
@@ -13099,9 +12208,6 @@ function generateInitialInputs(inputs, directiveIndex, attrs) {
|
|
|
13099
12208
|
//////////////////////////
|
|
13100
12209
|
//// ViewContainer & View
|
|
13101
12210
|
//////////////////////////
|
|
13102
|
-
// Not sure why I need to do `any` here but TS complains later.
|
|
13103
|
-
const LContainerArray = class LContainer extends Array {
|
|
13104
|
-
};
|
|
13105
12211
|
/**
|
|
13106
12212
|
* Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
|
|
13107
12213
|
*
|
|
@@ -13114,20 +12220,20 @@ const LContainerArray = class LContainer extends Array {
|
|
|
13114
12220
|
*/
|
|
13115
12221
|
function createLContainer(hostNative, currentView, native, tNode) {
|
|
13116
12222
|
ngDevMode && assertLView(currentView);
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
|
|
13121
|
-
|
|
13122
|
-
|
|
13123
|
-
|
|
13124
|
-
|
|
13125
|
-
|
|
13126
|
-
|
|
13127
|
-
|
|
12223
|
+
const lContainer = [
|
|
12224
|
+
hostNative,
|
|
12225
|
+
true,
|
|
12226
|
+
false,
|
|
12227
|
+
currentView,
|
|
12228
|
+
null,
|
|
12229
|
+
0,
|
|
12230
|
+
tNode,
|
|
12231
|
+
native,
|
|
12232
|
+
null,
|
|
12233
|
+
null, // moved views
|
|
12234
|
+
];
|
|
13128
12235
|
ngDevMode &&
|
|
13129
12236
|
assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');
|
|
13130
|
-
ngDevMode && attachLContainerDebug(lContainer);
|
|
13131
12237
|
return lContainer;
|
|
13132
12238
|
}
|
|
13133
12239
|
/**
|
|
@@ -13401,10 +12507,10 @@ function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex,
|
|
|
13401
12507
|
}
|
|
13402
12508
|
function getOrCreateLViewCleanup(view) {
|
|
13403
12509
|
// top level variables should not be exported for performance reasons (PERF_NOTES.md)
|
|
13404
|
-
return view[CLEANUP] || (view[CLEANUP] =
|
|
12510
|
+
return view[CLEANUP] || (view[CLEANUP] = []);
|
|
13405
12511
|
}
|
|
13406
12512
|
function getOrCreateTViewCleanup(tView) {
|
|
13407
|
-
return tView.cleanup || (tView.cleanup =
|
|
12513
|
+
return tView.cleanup || (tView.cleanup = []);
|
|
13408
12514
|
}
|
|
13409
12515
|
/**
|
|
13410
12516
|
* There are cases where the sub component's renderer needs to be included
|
|
@@ -14016,17 +13122,6 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
14016
13122
|
return new ComponentRef(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);
|
|
14017
13123
|
}
|
|
14018
13124
|
}
|
|
14019
|
-
const componentFactoryResolver = new ComponentFactoryResolver();
|
|
14020
|
-
/**
|
|
14021
|
-
* Creates a ComponentFactoryResolver and stores it on the injector. Or, if the
|
|
14022
|
-
* ComponentFactoryResolver
|
|
14023
|
-
* already exists, retrieves the existing ComponentFactoryResolver.
|
|
14024
|
-
*
|
|
14025
|
-
* @returns The ComponentFactoryResolver instance to use
|
|
14026
|
-
*/
|
|
14027
|
-
function injectComponentFactoryResolver() {
|
|
14028
|
-
return componentFactoryResolver;
|
|
14029
|
-
}
|
|
14030
13125
|
/**
|
|
14031
13126
|
* Represents an instance of a Component created via a {@link ComponentFactory}.
|
|
14032
13127
|
*
|
|
@@ -16612,6 +15707,62 @@ function ɵɵpropertyInterpolateV(propName, values, sanitizer) {
|
|
|
16612
15707
|
return ɵɵpropertyInterpolateV;
|
|
16613
15708
|
}
|
|
16614
15709
|
|
|
15710
|
+
/**
|
|
15711
|
+
* @license
|
|
15712
|
+
* Copyright Google LLC All Rights Reserved.
|
|
15713
|
+
*
|
|
15714
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
15715
|
+
* found in the LICENSE file at https://angular.io/license
|
|
15716
|
+
*/
|
|
15717
|
+
function toTStylingRange(prev, next) {
|
|
15718
|
+
ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15719
|
+
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15720
|
+
return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
15721
|
+
}
|
|
15722
|
+
function getTStylingRangePrev(tStylingRange) {
|
|
15723
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15724
|
+
return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
|
|
15725
|
+
}
|
|
15726
|
+
function getTStylingRangePrevDuplicate(tStylingRange) {
|
|
15727
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15728
|
+
return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
|
|
15729
|
+
2 /* StylingRange.PREV_DUPLICATE */;
|
|
15730
|
+
}
|
|
15731
|
+
function setTStylingRangePrev(tStylingRange, previous) {
|
|
15732
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15733
|
+
ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15734
|
+
return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
|
|
15735
|
+
(previous << 17 /* StylingRange.PREV_SHIFT */));
|
|
15736
|
+
}
|
|
15737
|
+
function setTStylingRangePrevDuplicate(tStylingRange) {
|
|
15738
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15739
|
+
return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
|
|
15740
|
+
}
|
|
15741
|
+
function getTStylingRangeNext(tStylingRange) {
|
|
15742
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15743
|
+
return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
|
|
15744
|
+
}
|
|
15745
|
+
function setTStylingRangeNext(tStylingRange, next) {
|
|
15746
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15747
|
+
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
15748
|
+
return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
|
|
15749
|
+
next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
15750
|
+
}
|
|
15751
|
+
function getTStylingRangeNextDuplicate(tStylingRange) {
|
|
15752
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15753
|
+
return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
|
|
15754
|
+
1 /* StylingRange.NEXT_DUPLICATE */;
|
|
15755
|
+
}
|
|
15756
|
+
function setTStylingRangeNextDuplicate(tStylingRange) {
|
|
15757
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15758
|
+
return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
|
|
15759
|
+
}
|
|
15760
|
+
function getTStylingRangeTail(tStylingRange) {
|
|
15761
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15762
|
+
const next = getTStylingRangeNext(tStylingRange);
|
|
15763
|
+
return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
|
|
15764
|
+
}
|
|
15765
|
+
|
|
16615
15766
|
/**
|
|
16616
15767
|
* @license
|
|
16617
15768
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -20433,6 +19584,46 @@ function loadIcuContainerVisitor() {
|
|
|
20433
19584
|
return icuContainerIteratorStart;
|
|
20434
19585
|
}
|
|
20435
19586
|
|
|
19587
|
+
/**
|
|
19588
|
+
* @license
|
|
19589
|
+
* Copyright Google LLC All Rights Reserved.
|
|
19590
|
+
*
|
|
19591
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
19592
|
+
* found in the LICENSE file at https://angular.io/license
|
|
19593
|
+
*/
|
|
19594
|
+
/**
|
|
19595
|
+
* Patch a `debug` property on top of the existing object.
|
|
19596
|
+
*
|
|
19597
|
+
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
19598
|
+
*
|
|
19599
|
+
* @param obj Object to patch
|
|
19600
|
+
* @param debug Value to patch
|
|
19601
|
+
*/
|
|
19602
|
+
function attachDebugObject(obj, debug) {
|
|
19603
|
+
if (ngDevMode) {
|
|
19604
|
+
Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
|
|
19605
|
+
}
|
|
19606
|
+
else {
|
|
19607
|
+
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
19608
|
+
}
|
|
19609
|
+
}
|
|
19610
|
+
/**
|
|
19611
|
+
* Patch a `debug` property getter on top of the existing object.
|
|
19612
|
+
*
|
|
19613
|
+
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
19614
|
+
*
|
|
19615
|
+
* @param obj Object to patch
|
|
19616
|
+
* @param debugGetter Getter returning a value to patch
|
|
19617
|
+
*/
|
|
19618
|
+
function attachDebugGetter(obj, debugGetter) {
|
|
19619
|
+
if (ngDevMode) {
|
|
19620
|
+
Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
|
|
19621
|
+
}
|
|
19622
|
+
else {
|
|
19623
|
+
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
19624
|
+
}
|
|
19625
|
+
}
|
|
19626
|
+
|
|
20436
19627
|
/**
|
|
20437
19628
|
* @license
|
|
20438
19629
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -22402,32 +21593,6 @@ function sortListeners(a, b) {
|
|
|
22402
21593
|
function isDirectiveDefHack(obj) {
|
|
22403
21594
|
return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;
|
|
22404
21595
|
}
|
|
22405
|
-
/**
|
|
22406
|
-
* Returns the attached `DebugNode` instance for an element in the DOM.
|
|
22407
|
-
*
|
|
22408
|
-
* @param element DOM element which is owned by an existing component's view.
|
|
22409
|
-
*/
|
|
22410
|
-
function getDebugNode$1(element) {
|
|
22411
|
-
if (ngDevMode && !(element instanceof Node)) {
|
|
22412
|
-
throw new Error('Expecting instance of DOM Element');
|
|
22413
|
-
}
|
|
22414
|
-
const lContext = getLContext(element);
|
|
22415
|
-
const lView = lContext ? lContext.lView : null;
|
|
22416
|
-
if (lView === null) {
|
|
22417
|
-
return null;
|
|
22418
|
-
}
|
|
22419
|
-
const nodeIndex = lContext.nodeIndex;
|
|
22420
|
-
if (nodeIndex !== -1) {
|
|
22421
|
-
const valueInLView = lView[nodeIndex];
|
|
22422
|
-
// this means that value in the lView is a component with its own
|
|
22423
|
-
// data. In this situation the TNode is not accessed at the same spot.
|
|
22424
|
-
const tNode = isLView(valueInLView) ? valueInLView[T_HOST] : getTNode(lView[TVIEW], nodeIndex);
|
|
22425
|
-
ngDevMode &&
|
|
22426
|
-
assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index');
|
|
22427
|
-
return buildDebugNode(tNode, lView);
|
|
22428
|
-
}
|
|
22429
|
-
return null;
|
|
22430
|
-
}
|
|
22431
21596
|
/**
|
|
22432
21597
|
* Retrieve the component `LView` from component/element.
|
|
22433
21598
|
*
|