@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/fesm2020/testing.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.1.0-next.
|
|
2
|
+
* @license Angular v15.1.0-next.1
|
|
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 { ResourceLoader } from '@angular/compiler';
|
|
9
9
|
import { Subject, Subscription } from 'rxjs';
|
|
10
10
|
|
|
@@ -85,7 +85,7 @@ class ComponentFixture {
|
|
|
85
85
|
this._onErrorSubscription = null;
|
|
86
86
|
this.changeDetectorRef = componentRef.changeDetectorRef;
|
|
87
87
|
this.elementRef = componentRef.location;
|
|
88
|
-
this.debugElement = getDebugNode
|
|
88
|
+
this.debugElement = getDebugNode(this.elementRef.nativeElement);
|
|
89
89
|
this.componentInstance = componentRef.instance;
|
|
90
90
|
this.nativeElement = this.elementRef.nativeElement;
|
|
91
91
|
this.componentRef = componentRef;
|
|
@@ -2855,15 +2855,6 @@ const EMBEDDED_VIEW_INJECTOR = 21;
|
|
|
2855
2855
|
* there should be no need to refer to `HEADER_OFFSET` anywhere else.
|
|
2856
2856
|
*/
|
|
2857
2857
|
const HEADER_OFFSET = 22;
|
|
2858
|
-
/**
|
|
2859
|
-
* Converts `TViewType` into human readable text.
|
|
2860
|
-
* Make sure this matches with `TViewType`
|
|
2861
|
-
*/
|
|
2862
|
-
const TViewTypeAsString = [
|
|
2863
|
-
'Root',
|
|
2864
|
-
'Component',
|
|
2865
|
-
'Embedded', // 2
|
|
2866
|
-
];
|
|
2867
2858
|
// Note: This hack is necessary so we don't erroneously get a circular dependency
|
|
2868
2859
|
// failure based on types.
|
|
2869
2860
|
const unusedValueExportToPlacateAjd$8 = 1;
|
|
@@ -3031,10 +3022,6 @@ function assertIndexInDeclRange(lView, index) {
|
|
|
3031
3022
|
const tView = lView[1];
|
|
3032
3023
|
assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);
|
|
3033
3024
|
}
|
|
3034
|
-
function assertIndexInVarsRange(lView, index) {
|
|
3035
|
-
const tView = lView[1];
|
|
3036
|
-
assertBetween(tView.bindingStartIndex, tView.expandoStartIndex, index);
|
|
3037
|
-
}
|
|
3038
3025
|
function assertIndexInExpandoRange(lView, index) {
|
|
3039
3026
|
const tView = lView[1];
|
|
3040
3027
|
assertBetween(tView.expandoStartIndex, lView.length, index);
|
|
@@ -9441,7 +9428,6 @@ function unwrapElementRef(value) {
|
|
|
9441
9428
|
* Use of this source code is governed by an MIT-style license that can be
|
|
9442
9429
|
* found in the LICENSE file at https://angular.io/license
|
|
9443
9430
|
*/
|
|
9444
|
-
const Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');
|
|
9445
9431
|
/**
|
|
9446
9432
|
* Creates and initializes a custom renderer that implements the `Renderer2` base class.
|
|
9447
9433
|
*
|
|
@@ -9525,7 +9511,7 @@ class Version {
|
|
|
9525
9511
|
/**
|
|
9526
9512
|
* @publicApi
|
|
9527
9513
|
*/
|
|
9528
|
-
const VERSION = new Version('15.1.0-next.
|
|
9514
|
+
const VERSION = new Version('15.1.0-next.1');
|
|
9529
9515
|
|
|
9530
9516
|
/**
|
|
9531
9517
|
* @license
|
|
@@ -11318,812 +11304,6 @@ function ɵɵinvalidFactory() {
|
|
|
11318
11304
|
throw new Error(msg);
|
|
11319
11305
|
}
|
|
11320
11306
|
|
|
11321
|
-
/**
|
|
11322
|
-
* @license
|
|
11323
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11324
|
-
*
|
|
11325
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11326
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11327
|
-
*/
|
|
11328
|
-
/**
|
|
11329
|
-
* THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!
|
|
11330
|
-
*/
|
|
11331
|
-
/**
|
|
11332
|
-
* Creates an `Array` construction with a given name. This is useful when
|
|
11333
|
-
* looking for memory consumption to see what time of array it is.
|
|
11334
|
-
*
|
|
11335
|
-
*
|
|
11336
|
-
* @param name Name to give to the constructor
|
|
11337
|
-
* @returns A subclass of `Array` if possible. This can only be done in
|
|
11338
|
-
* environments which support `class` construct.
|
|
11339
|
-
*/
|
|
11340
|
-
function createNamedArrayType(name) {
|
|
11341
|
-
// This should never be called in prod mode, so let's verify that is the case.
|
|
11342
|
-
if (ngDevMode) {
|
|
11343
|
-
try {
|
|
11344
|
-
// If this function were compromised the following could lead to arbitrary
|
|
11345
|
-
// script execution. We bless it with Trusted Types anyway since this
|
|
11346
|
-
// function is stripped out of production binaries.
|
|
11347
|
-
return (newTrustedFunctionForDev('Array', `return class ${name} extends Array{}`))(Array);
|
|
11348
|
-
}
|
|
11349
|
-
catch (e) {
|
|
11350
|
-
// If it does not work just give up and fall back to regular Array.
|
|
11351
|
-
return Array;
|
|
11352
|
-
}
|
|
11353
|
-
}
|
|
11354
|
-
else {
|
|
11355
|
-
throw new Error('Looks like we are in \'prod mode\', but we are creating a named Array type, which is wrong! Check your code');
|
|
11356
|
-
}
|
|
11357
|
-
}
|
|
11358
|
-
|
|
11359
|
-
/**
|
|
11360
|
-
* @license
|
|
11361
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11362
|
-
*
|
|
11363
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11364
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11365
|
-
*/
|
|
11366
|
-
function toTStylingRange(prev, next) {
|
|
11367
|
-
ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11368
|
-
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11369
|
-
return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
11370
|
-
}
|
|
11371
|
-
function getTStylingRangePrev(tStylingRange) {
|
|
11372
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11373
|
-
return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
|
|
11374
|
-
}
|
|
11375
|
-
function getTStylingRangePrevDuplicate(tStylingRange) {
|
|
11376
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11377
|
-
return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
|
|
11378
|
-
2 /* StylingRange.PREV_DUPLICATE */;
|
|
11379
|
-
}
|
|
11380
|
-
function setTStylingRangePrev(tStylingRange, previous) {
|
|
11381
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11382
|
-
ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11383
|
-
return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
|
|
11384
|
-
(previous << 17 /* StylingRange.PREV_SHIFT */));
|
|
11385
|
-
}
|
|
11386
|
-
function setTStylingRangePrevDuplicate(tStylingRange) {
|
|
11387
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11388
|
-
return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
|
|
11389
|
-
}
|
|
11390
|
-
function getTStylingRangeNext(tStylingRange) {
|
|
11391
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11392
|
-
return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
|
|
11393
|
-
}
|
|
11394
|
-
function setTStylingRangeNext(tStylingRange, next) {
|
|
11395
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11396
|
-
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
11397
|
-
return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
|
|
11398
|
-
next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
11399
|
-
}
|
|
11400
|
-
function getTStylingRangeNextDuplicate(tStylingRange) {
|
|
11401
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11402
|
-
return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
|
|
11403
|
-
1 /* StylingRange.NEXT_DUPLICATE */;
|
|
11404
|
-
}
|
|
11405
|
-
function setTStylingRangeNextDuplicate(tStylingRange) {
|
|
11406
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11407
|
-
return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
|
|
11408
|
-
}
|
|
11409
|
-
function getTStylingRangeTail(tStylingRange) {
|
|
11410
|
-
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
11411
|
-
const next = getTStylingRangeNext(tStylingRange);
|
|
11412
|
-
return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
|
|
11413
|
-
}
|
|
11414
|
-
|
|
11415
|
-
/**
|
|
11416
|
-
* @license
|
|
11417
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11418
|
-
*
|
|
11419
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11420
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11421
|
-
*/
|
|
11422
|
-
/**
|
|
11423
|
-
* Patch a `debug` property on top of the existing object.
|
|
11424
|
-
*
|
|
11425
|
-
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
11426
|
-
*
|
|
11427
|
-
* @param obj Object to patch
|
|
11428
|
-
* @param debug Value to patch
|
|
11429
|
-
*/
|
|
11430
|
-
function attachDebugObject(obj, debug) {
|
|
11431
|
-
if (ngDevMode) {
|
|
11432
|
-
Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
|
|
11433
|
-
}
|
|
11434
|
-
else {
|
|
11435
|
-
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
11436
|
-
}
|
|
11437
|
-
}
|
|
11438
|
-
/**
|
|
11439
|
-
* Patch a `debug` property getter on top of the existing object.
|
|
11440
|
-
*
|
|
11441
|
-
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
11442
|
-
*
|
|
11443
|
-
* @param obj Object to patch
|
|
11444
|
-
* @param debugGetter Getter returning a value to patch
|
|
11445
|
-
*/
|
|
11446
|
-
function attachDebugGetter(obj, debugGetter) {
|
|
11447
|
-
if (ngDevMode) {
|
|
11448
|
-
Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
|
|
11449
|
-
}
|
|
11450
|
-
else {
|
|
11451
|
-
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
11452
|
-
}
|
|
11453
|
-
}
|
|
11454
|
-
|
|
11455
|
-
/**
|
|
11456
|
-
* @license
|
|
11457
|
-
* Copyright Google LLC All Rights Reserved.
|
|
11458
|
-
*
|
|
11459
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
11460
|
-
* found in the LICENSE file at https://angular.io/license
|
|
11461
|
-
*/
|
|
11462
|
-
/*
|
|
11463
|
-
* This file contains conditionally attached classes which provide human readable (debug) level
|
|
11464
|
-
* information for `LView`, `LContainer` and other internal data structures. These data structures
|
|
11465
|
-
* are stored internally as array which makes it very difficult during debugging to reason about the
|
|
11466
|
-
* current state of the system.
|
|
11467
|
-
*
|
|
11468
|
-
* Patching the array with extra property does change the array's hidden class' but it does not
|
|
11469
|
-
* change the cost of access, therefore this patching should not have significant if any impact in
|
|
11470
|
-
* `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)
|
|
11471
|
-
*
|
|
11472
|
-
* So instead of seeing:
|
|
11473
|
-
* ```
|
|
11474
|
-
* Array(30) [Object, 659, null, …]
|
|
11475
|
-
* ```
|
|
11476
|
-
*
|
|
11477
|
-
* You get to see:
|
|
11478
|
-
* ```
|
|
11479
|
-
* LViewDebug {
|
|
11480
|
-
* views: [...],
|
|
11481
|
-
* flags: {attached: true, ...}
|
|
11482
|
-
* nodes: [
|
|
11483
|
-
* {html: '<div id="123">', ..., nodes: [
|
|
11484
|
-
* {html: '<span>', ..., nodes: null}
|
|
11485
|
-
* ]}
|
|
11486
|
-
* ]
|
|
11487
|
-
* }
|
|
11488
|
-
* ```
|
|
11489
|
-
*/
|
|
11490
|
-
let LVIEW_COMPONENT_CACHE;
|
|
11491
|
-
let LVIEW_EMBEDDED_CACHE;
|
|
11492
|
-
let LVIEW_ROOT;
|
|
11493
|
-
let LVIEW_COMPONENT;
|
|
11494
|
-
let LVIEW_EMBEDDED;
|
|
11495
|
-
/**
|
|
11496
|
-
* This function clones a blueprint and creates LView.
|
|
11497
|
-
*
|
|
11498
|
-
* Simple slice will keep the same type, and we need it to be LView
|
|
11499
|
-
*/
|
|
11500
|
-
function cloneToLViewFromTViewBlueprint(tView) {
|
|
11501
|
-
const debugTView = tView;
|
|
11502
|
-
const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);
|
|
11503
|
-
return lView.concat(tView.blueprint);
|
|
11504
|
-
}
|
|
11505
|
-
class LRootView extends Array {
|
|
11506
|
-
}
|
|
11507
|
-
class LComponentView extends Array {
|
|
11508
|
-
}
|
|
11509
|
-
class LEmbeddedView extends Array {
|
|
11510
|
-
}
|
|
11511
|
-
function getLViewToClone(type, name) {
|
|
11512
|
-
switch (type) {
|
|
11513
|
-
case 0 /* TViewType.Root */:
|
|
11514
|
-
if (LVIEW_ROOT === undefined)
|
|
11515
|
-
LVIEW_ROOT = new LRootView();
|
|
11516
|
-
return LVIEW_ROOT;
|
|
11517
|
-
case 1 /* TViewType.Component */:
|
|
11518
|
-
if (!ngDevMode || !ngDevMode.namedConstructors) {
|
|
11519
|
-
if (LVIEW_COMPONENT === undefined)
|
|
11520
|
-
LVIEW_COMPONENT = new LComponentView();
|
|
11521
|
-
return LVIEW_COMPONENT;
|
|
11522
|
-
}
|
|
11523
|
-
if (LVIEW_COMPONENT_CACHE === undefined)
|
|
11524
|
-
LVIEW_COMPONENT_CACHE = new Map();
|
|
11525
|
-
let componentArray = LVIEW_COMPONENT_CACHE.get(name);
|
|
11526
|
-
if (componentArray === undefined) {
|
|
11527
|
-
componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();
|
|
11528
|
-
LVIEW_COMPONENT_CACHE.set(name, componentArray);
|
|
11529
|
-
}
|
|
11530
|
-
return componentArray;
|
|
11531
|
-
case 2 /* TViewType.Embedded */:
|
|
11532
|
-
if (!ngDevMode || !ngDevMode.namedConstructors) {
|
|
11533
|
-
if (LVIEW_EMBEDDED === undefined)
|
|
11534
|
-
LVIEW_EMBEDDED = new LEmbeddedView();
|
|
11535
|
-
return LVIEW_EMBEDDED;
|
|
11536
|
-
}
|
|
11537
|
-
if (LVIEW_EMBEDDED_CACHE === undefined)
|
|
11538
|
-
LVIEW_EMBEDDED_CACHE = new Map();
|
|
11539
|
-
let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);
|
|
11540
|
-
if (embeddedArray === undefined) {
|
|
11541
|
-
embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();
|
|
11542
|
-
LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);
|
|
11543
|
-
}
|
|
11544
|
-
return embeddedArray;
|
|
11545
|
-
}
|
|
11546
|
-
}
|
|
11547
|
-
function nameSuffix(text) {
|
|
11548
|
-
if (text == null)
|
|
11549
|
-
return '';
|
|
11550
|
-
const index = text.lastIndexOf('_Template');
|
|
11551
|
-
return '_' + (index === -1 ? text : text.slice(0, index));
|
|
11552
|
-
}
|
|
11553
|
-
/**
|
|
11554
|
-
* This class is a debug version of Object literal so that we can have constructor name show up
|
|
11555
|
-
* in
|
|
11556
|
-
* debug tools in ngDevMode.
|
|
11557
|
-
*/
|
|
11558
|
-
const TViewConstructor = class TView {
|
|
11559
|
-
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) {
|
|
11560
|
-
this.type = type;
|
|
11561
|
-
this.blueprint = blueprint;
|
|
11562
|
-
this.template = template;
|
|
11563
|
-
this.queries = queries;
|
|
11564
|
-
this.viewQuery = viewQuery;
|
|
11565
|
-
this.declTNode = declTNode;
|
|
11566
|
-
this.data = data;
|
|
11567
|
-
this.bindingStartIndex = bindingStartIndex;
|
|
11568
|
-
this.expandoStartIndex = expandoStartIndex;
|
|
11569
|
-
this.hostBindingOpCodes = hostBindingOpCodes;
|
|
11570
|
-
this.firstCreatePass = firstCreatePass;
|
|
11571
|
-
this.firstUpdatePass = firstUpdatePass;
|
|
11572
|
-
this.staticViewQueries = staticViewQueries;
|
|
11573
|
-
this.staticContentQueries = staticContentQueries;
|
|
11574
|
-
this.preOrderHooks = preOrderHooks;
|
|
11575
|
-
this.preOrderCheckHooks = preOrderCheckHooks;
|
|
11576
|
-
this.contentHooks = contentHooks;
|
|
11577
|
-
this.contentCheckHooks = contentCheckHooks;
|
|
11578
|
-
this.viewHooks = viewHooks;
|
|
11579
|
-
this.viewCheckHooks = viewCheckHooks;
|
|
11580
|
-
this.destroyHooks = destroyHooks;
|
|
11581
|
-
this.cleanup = cleanup;
|
|
11582
|
-
this.contentQueries = contentQueries;
|
|
11583
|
-
this.components = components;
|
|
11584
|
-
this.directiveRegistry = directiveRegistry;
|
|
11585
|
-
this.pipeRegistry = pipeRegistry;
|
|
11586
|
-
this.firstChild = firstChild;
|
|
11587
|
-
this.schemas = schemas;
|
|
11588
|
-
this.consts = consts;
|
|
11589
|
-
this.incompleteFirstPass = incompleteFirstPass;
|
|
11590
|
-
this._decls = _decls;
|
|
11591
|
-
this._vars = _vars;
|
|
11592
|
-
}
|
|
11593
|
-
get template_() {
|
|
11594
|
-
const buf = [];
|
|
11595
|
-
processTNodeChildren(this.firstChild, buf);
|
|
11596
|
-
return buf.join('');
|
|
11597
|
-
}
|
|
11598
|
-
get type_() {
|
|
11599
|
-
return TViewTypeAsString[this.type] || `TViewType.?${this.type}?`;
|
|
11600
|
-
}
|
|
11601
|
-
};
|
|
11602
|
-
class TNode {
|
|
11603
|
-
constructor(tView_, //
|
|
11604
|
-
type, //
|
|
11605
|
-
index, //
|
|
11606
|
-
insertBeforeIndex, //
|
|
11607
|
-
injectorIndex, //
|
|
11608
|
-
componentOffset, //
|
|
11609
|
-
directiveStart, //
|
|
11610
|
-
directiveEnd, //
|
|
11611
|
-
directiveStylingLast, //
|
|
11612
|
-
propertyBindings, //
|
|
11613
|
-
flags, //
|
|
11614
|
-
providerIndexes, //
|
|
11615
|
-
value, //
|
|
11616
|
-
attrs, //
|
|
11617
|
-
mergedAttrs, //
|
|
11618
|
-
localNames, //
|
|
11619
|
-
initialInputs, //
|
|
11620
|
-
inputs, //
|
|
11621
|
-
outputs, //
|
|
11622
|
-
tViews, //
|
|
11623
|
-
next, //
|
|
11624
|
-
projectionNext, //
|
|
11625
|
-
child, //
|
|
11626
|
-
parent, //
|
|
11627
|
-
projection, //
|
|
11628
|
-
styles, //
|
|
11629
|
-
stylesWithoutHost, //
|
|
11630
|
-
residualStyles, //
|
|
11631
|
-
classes, //
|
|
11632
|
-
classesWithoutHost, //
|
|
11633
|
-
residualClasses, //
|
|
11634
|
-
classBindings, //
|
|
11635
|
-
styleBindings) {
|
|
11636
|
-
this.tView_ = tView_;
|
|
11637
|
-
this.type = type;
|
|
11638
|
-
this.index = index;
|
|
11639
|
-
this.insertBeforeIndex = insertBeforeIndex;
|
|
11640
|
-
this.injectorIndex = injectorIndex;
|
|
11641
|
-
this.componentOffset = componentOffset;
|
|
11642
|
-
this.directiveStart = directiveStart;
|
|
11643
|
-
this.directiveEnd = directiveEnd;
|
|
11644
|
-
this.directiveStylingLast = directiveStylingLast;
|
|
11645
|
-
this.propertyBindings = propertyBindings;
|
|
11646
|
-
this.flags = flags;
|
|
11647
|
-
this.providerIndexes = providerIndexes;
|
|
11648
|
-
this.value = value;
|
|
11649
|
-
this.attrs = attrs;
|
|
11650
|
-
this.mergedAttrs = mergedAttrs;
|
|
11651
|
-
this.localNames = localNames;
|
|
11652
|
-
this.initialInputs = initialInputs;
|
|
11653
|
-
this.inputs = inputs;
|
|
11654
|
-
this.outputs = outputs;
|
|
11655
|
-
this.tViews = tViews;
|
|
11656
|
-
this.next = next;
|
|
11657
|
-
this.projectionNext = projectionNext;
|
|
11658
|
-
this.child = child;
|
|
11659
|
-
this.parent = parent;
|
|
11660
|
-
this.projection = projection;
|
|
11661
|
-
this.styles = styles;
|
|
11662
|
-
this.stylesWithoutHost = stylesWithoutHost;
|
|
11663
|
-
this.residualStyles = residualStyles;
|
|
11664
|
-
this.classes = classes;
|
|
11665
|
-
this.classesWithoutHost = classesWithoutHost;
|
|
11666
|
-
this.residualClasses = residualClasses;
|
|
11667
|
-
this.classBindings = classBindings;
|
|
11668
|
-
this.styleBindings = styleBindings;
|
|
11669
|
-
}
|
|
11670
|
-
/**
|
|
11671
|
-
* Return a human debug version of the set of `NodeInjector`s which will be consulted when
|
|
11672
|
-
* resolving tokens from this `TNode`.
|
|
11673
|
-
*
|
|
11674
|
-
* When debugging applications, it is often difficult to determine which `NodeInjector`s will be
|
|
11675
|
-
* consulted. This method shows a list of `DebugNode`s representing the `TNode`s which will be
|
|
11676
|
-
* consulted in order when resolving a token starting at this `TNode`.
|
|
11677
|
-
*
|
|
11678
|
-
* The original data is stored in `LView` and `TView` with a lot of offset indexes, and so it is
|
|
11679
|
-
* difficult to reason about.
|
|
11680
|
-
*
|
|
11681
|
-
* @param lView The `LView` instance for this `TNode`.
|
|
11682
|
-
*/
|
|
11683
|
-
debugNodeInjectorPath(lView) {
|
|
11684
|
-
const path = [];
|
|
11685
|
-
let injectorIndex = getInjectorIndex(this, lView);
|
|
11686
|
-
if (injectorIndex === -1) {
|
|
11687
|
-
// Looks like the current `TNode` does not have `NodeInjector` associated with it => look for
|
|
11688
|
-
// parent NodeInjector.
|
|
11689
|
-
const parentLocation = getParentInjectorLocation(this, lView);
|
|
11690
|
-
if (parentLocation !== NO_PARENT_INJECTOR) {
|
|
11691
|
-
// We found a parent, so start searching from the parent location.
|
|
11692
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
11693
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
11694
|
-
}
|
|
11695
|
-
else {
|
|
11696
|
-
// No parents have been found, so there are no `NodeInjector`s to consult.
|
|
11697
|
-
}
|
|
11698
|
-
}
|
|
11699
|
-
while (injectorIndex !== -1) {
|
|
11700
|
-
ngDevMode && assertNodeInjector(lView, injectorIndex);
|
|
11701
|
-
const tNode = lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];
|
|
11702
|
-
path.push(buildDebugNode(tNode, lView));
|
|
11703
|
-
const parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];
|
|
11704
|
-
if (parentLocation === NO_PARENT_INJECTOR) {
|
|
11705
|
-
injectorIndex = -1;
|
|
11706
|
-
}
|
|
11707
|
-
else {
|
|
11708
|
-
injectorIndex = getParentInjectorIndex(parentLocation);
|
|
11709
|
-
lView = getParentInjectorView(parentLocation, lView);
|
|
11710
|
-
}
|
|
11711
|
-
}
|
|
11712
|
-
return path;
|
|
11713
|
-
}
|
|
11714
|
-
get type_() {
|
|
11715
|
-
return toTNodeTypeAsString(this.type) || `TNodeType.?${this.type}?`;
|
|
11716
|
-
}
|
|
11717
|
-
get flags_() {
|
|
11718
|
-
const flags = [];
|
|
11719
|
-
if (this.flags & 8 /* TNodeFlags.hasClassInput */)
|
|
11720
|
-
flags.push('TNodeFlags.hasClassInput');
|
|
11721
|
-
if (this.flags & 4 /* TNodeFlags.hasContentQuery */)
|
|
11722
|
-
flags.push('TNodeFlags.hasContentQuery');
|
|
11723
|
-
if (this.flags & 16 /* TNodeFlags.hasStyleInput */)
|
|
11724
|
-
flags.push('TNodeFlags.hasStyleInput');
|
|
11725
|
-
if (this.flags & 64 /* TNodeFlags.hasHostBindings */)
|
|
11726
|
-
flags.push('TNodeFlags.hasHostBindings');
|
|
11727
|
-
if (this.flags & 1 /* TNodeFlags.isDirectiveHost */)
|
|
11728
|
-
flags.push('TNodeFlags.isDirectiveHost');
|
|
11729
|
-
if (this.flags & 32 /* TNodeFlags.isDetached */)
|
|
11730
|
-
flags.push('TNodeFlags.isDetached');
|
|
11731
|
-
if (this.flags & 2 /* TNodeFlags.isProjected */)
|
|
11732
|
-
flags.push('TNodeFlags.isProjected');
|
|
11733
|
-
return flags.join('|');
|
|
11734
|
-
}
|
|
11735
|
-
get template_() {
|
|
11736
|
-
if (this.type & 1 /* TNodeType.Text */)
|
|
11737
|
-
return this.value;
|
|
11738
|
-
const buf = [];
|
|
11739
|
-
const tagName = typeof this.value === 'string' && this.value || this.type_;
|
|
11740
|
-
buf.push('<', tagName);
|
|
11741
|
-
if (this.flags) {
|
|
11742
|
-
buf.push(' ', this.flags_);
|
|
11743
|
-
}
|
|
11744
|
-
if (this.attrs) {
|
|
11745
|
-
for (let i = 0; i < this.attrs.length;) {
|
|
11746
|
-
const attrName = this.attrs[i++];
|
|
11747
|
-
if (typeof attrName == 'number') {
|
|
11748
|
-
break;
|
|
11749
|
-
}
|
|
11750
|
-
const attrValue = this.attrs[i++];
|
|
11751
|
-
buf.push(' ', attrName, '="', attrValue, '"');
|
|
11752
|
-
}
|
|
11753
|
-
}
|
|
11754
|
-
buf.push('>');
|
|
11755
|
-
processTNodeChildren(this.child, buf);
|
|
11756
|
-
buf.push('</', tagName, '>');
|
|
11757
|
-
return buf.join('');
|
|
11758
|
-
}
|
|
11759
|
-
get styleBindings_() {
|
|
11760
|
-
return toDebugStyleBinding(this, false);
|
|
11761
|
-
}
|
|
11762
|
-
get classBindings_() {
|
|
11763
|
-
return toDebugStyleBinding(this, true);
|
|
11764
|
-
}
|
|
11765
|
-
get providerIndexStart_() {
|
|
11766
|
-
return this.providerIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;
|
|
11767
|
-
}
|
|
11768
|
-
get providerIndexEnd_() {
|
|
11769
|
-
return this.providerIndexStart_ +
|
|
11770
|
-
(this.providerIndexes >>> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */);
|
|
11771
|
-
}
|
|
11772
|
-
}
|
|
11773
|
-
const TNodeDebug = TNode;
|
|
11774
|
-
function toDebugStyleBinding(tNode, isClassBased) {
|
|
11775
|
-
const tData = tNode.tView_.data;
|
|
11776
|
-
const bindings = [];
|
|
11777
|
-
const range = isClassBased ? tNode.classBindings : tNode.styleBindings;
|
|
11778
|
-
const prev = getTStylingRangePrev(range);
|
|
11779
|
-
const next = getTStylingRangeNext(range);
|
|
11780
|
-
let isTemplate = next !== 0;
|
|
11781
|
-
let cursor = isTemplate ? next : prev;
|
|
11782
|
-
while (cursor !== 0) {
|
|
11783
|
-
const itemKey = tData[cursor];
|
|
11784
|
-
const itemRange = tData[cursor + 1];
|
|
11785
|
-
bindings.unshift({
|
|
11786
|
-
key: itemKey,
|
|
11787
|
-
index: cursor,
|
|
11788
|
-
isTemplate: isTemplate,
|
|
11789
|
-
prevDuplicate: getTStylingRangePrevDuplicate(itemRange),
|
|
11790
|
-
nextDuplicate: getTStylingRangeNextDuplicate(itemRange),
|
|
11791
|
-
nextIndex: getTStylingRangeNext(itemRange),
|
|
11792
|
-
prevIndex: getTStylingRangePrev(itemRange),
|
|
11793
|
-
});
|
|
11794
|
-
if (cursor === prev)
|
|
11795
|
-
isTemplate = false;
|
|
11796
|
-
cursor = getTStylingRangePrev(itemRange);
|
|
11797
|
-
}
|
|
11798
|
-
bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);
|
|
11799
|
-
return bindings;
|
|
11800
|
-
}
|
|
11801
|
-
function processTNodeChildren(tNode, buf) {
|
|
11802
|
-
while (tNode) {
|
|
11803
|
-
buf.push(tNode.template_);
|
|
11804
|
-
tNode = tNode.next;
|
|
11805
|
-
}
|
|
11806
|
-
}
|
|
11807
|
-
class TViewData extends Array {
|
|
11808
|
-
}
|
|
11809
|
-
let TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because
|
|
11810
|
-
// `LView` constructor could have side-effects.
|
|
11811
|
-
/**
|
|
11812
|
-
* This function clones a blueprint and creates TData.
|
|
11813
|
-
*
|
|
11814
|
-
* Simple slice will keep the same type, and we need it to be TData
|
|
11815
|
-
*/
|
|
11816
|
-
function cloneToTViewData(list) {
|
|
11817
|
-
if (TVIEWDATA_EMPTY === undefined)
|
|
11818
|
-
TVIEWDATA_EMPTY = new TViewData();
|
|
11819
|
-
return TVIEWDATA_EMPTY.concat(list);
|
|
11820
|
-
}
|
|
11821
|
-
class LViewBlueprint extends Array {
|
|
11822
|
-
}
|
|
11823
|
-
class MatchesArray extends Array {
|
|
11824
|
-
}
|
|
11825
|
-
class TViewComponents extends Array {
|
|
11826
|
-
}
|
|
11827
|
-
class TNodeLocalNames extends Array {
|
|
11828
|
-
}
|
|
11829
|
-
class TNodeInitialInputs extends Array {
|
|
11830
|
-
}
|
|
11831
|
-
class LCleanup extends Array {
|
|
11832
|
-
}
|
|
11833
|
-
class TCleanup extends Array {
|
|
11834
|
-
}
|
|
11835
|
-
function attachLViewDebug(lView) {
|
|
11836
|
-
attachDebugObject(lView, new LViewDebug(lView));
|
|
11837
|
-
}
|
|
11838
|
-
function attachLContainerDebug(lContainer) {
|
|
11839
|
-
attachDebugObject(lContainer, new LContainerDebug(lContainer));
|
|
11840
|
-
}
|
|
11841
|
-
function toDebug(obj) {
|
|
11842
|
-
if (obj) {
|
|
11843
|
-
const debug = obj.debug;
|
|
11844
|
-
assertDefined(debug, 'Object does not have a debug representation.');
|
|
11845
|
-
return debug;
|
|
11846
|
-
}
|
|
11847
|
-
else {
|
|
11848
|
-
return obj;
|
|
11849
|
-
}
|
|
11850
|
-
}
|
|
11851
|
-
/**
|
|
11852
|
-
* Use this method to unwrap a native element in `LView` and convert it into HTML for easier
|
|
11853
|
-
* reading.
|
|
11854
|
-
*
|
|
11855
|
-
* @param value possibly wrapped native DOM node.
|
|
11856
|
-
* @param includeChildren If `true` then the serialized HTML form will include child elements
|
|
11857
|
-
* (same
|
|
11858
|
-
* as `outerHTML`). If `false` then the serialized HTML form will only contain the element
|
|
11859
|
-
* itself
|
|
11860
|
-
* (will not serialize child elements).
|
|
11861
|
-
*/
|
|
11862
|
-
function toHtml(value, includeChildren = false) {
|
|
11863
|
-
const node = unwrapRNode(value);
|
|
11864
|
-
if (node) {
|
|
11865
|
-
switch (node.nodeType) {
|
|
11866
|
-
case Node.TEXT_NODE:
|
|
11867
|
-
return node.textContent;
|
|
11868
|
-
case Node.COMMENT_NODE:
|
|
11869
|
-
return `<!--${node.textContent}-->`;
|
|
11870
|
-
case Node.ELEMENT_NODE:
|
|
11871
|
-
const outerHTML = node.outerHTML;
|
|
11872
|
-
if (includeChildren) {
|
|
11873
|
-
return outerHTML;
|
|
11874
|
-
}
|
|
11875
|
-
else {
|
|
11876
|
-
const innerHTML = '>' + node.innerHTML + '<';
|
|
11877
|
-
return (outerHTML.split(innerHTML)[0]) + '>';
|
|
11878
|
-
}
|
|
11879
|
-
}
|
|
11880
|
-
}
|
|
11881
|
-
return null;
|
|
11882
|
-
}
|
|
11883
|
-
class LViewDebug {
|
|
11884
|
-
constructor(_raw_lView) {
|
|
11885
|
-
this._raw_lView = _raw_lView;
|
|
11886
|
-
}
|
|
11887
|
-
/**
|
|
11888
|
-
* Flags associated with the `LView` unpacked into a more readable state.
|
|
11889
|
-
*/
|
|
11890
|
-
get flags() {
|
|
11891
|
-
const flags = this._raw_lView[FLAGS];
|
|
11892
|
-
return {
|
|
11893
|
-
__raw__flags__: flags,
|
|
11894
|
-
initPhaseState: flags & 3 /* LViewFlags.InitPhaseStateMask */,
|
|
11895
|
-
creationMode: !!(flags & 4 /* LViewFlags.CreationMode */),
|
|
11896
|
-
firstViewPass: !!(flags & 8 /* LViewFlags.FirstLViewPass */),
|
|
11897
|
-
checkAlways: !!(flags & 16 /* LViewFlags.CheckAlways */),
|
|
11898
|
-
dirty: !!(flags & 32 /* LViewFlags.Dirty */),
|
|
11899
|
-
attached: !!(flags & 64 /* LViewFlags.Attached */),
|
|
11900
|
-
destroyed: !!(flags & 128 /* LViewFlags.Destroyed */),
|
|
11901
|
-
isRoot: !!(flags & 256 /* LViewFlags.IsRoot */),
|
|
11902
|
-
indexWithinInitPhase: flags >> 11 /* LViewFlags.IndexWithinInitPhaseShift */,
|
|
11903
|
-
};
|
|
11904
|
-
}
|
|
11905
|
-
get parent() {
|
|
11906
|
-
return toDebug(this._raw_lView[PARENT]);
|
|
11907
|
-
}
|
|
11908
|
-
get hostHTML() {
|
|
11909
|
-
return toHtml(this._raw_lView[HOST], true);
|
|
11910
|
-
}
|
|
11911
|
-
get html() {
|
|
11912
|
-
return (this.nodes || []).map(mapToHTML).join('');
|
|
11913
|
-
}
|
|
11914
|
-
get context() {
|
|
11915
|
-
return this._raw_lView[CONTEXT];
|
|
11916
|
-
}
|
|
11917
|
-
/**
|
|
11918
|
-
* The tree of nodes associated with the current `LView`. The nodes have been normalized into
|
|
11919
|
-
* a tree structure with relevant details pulled out for readability.
|
|
11920
|
-
*/
|
|
11921
|
-
get nodes() {
|
|
11922
|
-
const lView = this._raw_lView;
|
|
11923
|
-
const tNode = lView[TVIEW].firstChild;
|
|
11924
|
-
return toDebugNodes(tNode, lView);
|
|
11925
|
-
}
|
|
11926
|
-
get template() {
|
|
11927
|
-
return this.tView.template_;
|
|
11928
|
-
}
|
|
11929
|
-
get tView() {
|
|
11930
|
-
return this._raw_lView[TVIEW];
|
|
11931
|
-
}
|
|
11932
|
-
get cleanup() {
|
|
11933
|
-
return this._raw_lView[CLEANUP];
|
|
11934
|
-
}
|
|
11935
|
-
get injector() {
|
|
11936
|
-
return this._raw_lView[INJECTOR$1];
|
|
11937
|
-
}
|
|
11938
|
-
get rendererFactory() {
|
|
11939
|
-
return this._raw_lView[RENDERER_FACTORY];
|
|
11940
|
-
}
|
|
11941
|
-
get renderer() {
|
|
11942
|
-
return this._raw_lView[RENDERER];
|
|
11943
|
-
}
|
|
11944
|
-
get sanitizer() {
|
|
11945
|
-
return this._raw_lView[SANITIZER];
|
|
11946
|
-
}
|
|
11947
|
-
get childHead() {
|
|
11948
|
-
return toDebug(this._raw_lView[CHILD_HEAD]);
|
|
11949
|
-
}
|
|
11950
|
-
get next() {
|
|
11951
|
-
return toDebug(this._raw_lView[NEXT]);
|
|
11952
|
-
}
|
|
11953
|
-
get childTail() {
|
|
11954
|
-
return toDebug(this._raw_lView[CHILD_TAIL]);
|
|
11955
|
-
}
|
|
11956
|
-
get declarationView() {
|
|
11957
|
-
return toDebug(this._raw_lView[DECLARATION_VIEW]);
|
|
11958
|
-
}
|
|
11959
|
-
get queries() {
|
|
11960
|
-
return this._raw_lView[QUERIES];
|
|
11961
|
-
}
|
|
11962
|
-
get tHost() {
|
|
11963
|
-
return this._raw_lView[T_HOST];
|
|
11964
|
-
}
|
|
11965
|
-
get id() {
|
|
11966
|
-
return this._raw_lView[ID];
|
|
11967
|
-
}
|
|
11968
|
-
get decls() {
|
|
11969
|
-
return toLViewRange(this.tView, this._raw_lView, HEADER_OFFSET, this.tView.bindingStartIndex);
|
|
11970
|
-
}
|
|
11971
|
-
get vars() {
|
|
11972
|
-
return toLViewRange(this.tView, this._raw_lView, this.tView.bindingStartIndex, this.tView.expandoStartIndex);
|
|
11973
|
-
}
|
|
11974
|
-
get expando() {
|
|
11975
|
-
return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);
|
|
11976
|
-
}
|
|
11977
|
-
/**
|
|
11978
|
-
* Normalized view of child views (and containers) attached at this location.
|
|
11979
|
-
*/
|
|
11980
|
-
get childViews() {
|
|
11981
|
-
const childViews = [];
|
|
11982
|
-
let child = this.childHead;
|
|
11983
|
-
while (child) {
|
|
11984
|
-
childViews.push(child);
|
|
11985
|
-
child = child.next;
|
|
11986
|
-
}
|
|
11987
|
-
return childViews;
|
|
11988
|
-
}
|
|
11989
|
-
}
|
|
11990
|
-
function mapToHTML(node) {
|
|
11991
|
-
if (node.type === 'ElementContainer') {
|
|
11992
|
-
return (node.children || []).map(mapToHTML).join('');
|
|
11993
|
-
}
|
|
11994
|
-
else if (node.type === 'IcuContainer') {
|
|
11995
|
-
throw new Error('Not implemented');
|
|
11996
|
-
}
|
|
11997
|
-
else {
|
|
11998
|
-
return toHtml(node.native, true) || '';
|
|
11999
|
-
}
|
|
12000
|
-
}
|
|
12001
|
-
function toLViewRange(tView, lView, start, end) {
|
|
12002
|
-
let content = [];
|
|
12003
|
-
for (let index = start; index < end; index++) {
|
|
12004
|
-
content.push({ index: index, t: tView.data[index], l: lView[index] });
|
|
12005
|
-
}
|
|
12006
|
-
return { start: start, end: end, length: end - start, content: content };
|
|
12007
|
-
}
|
|
12008
|
-
/**
|
|
12009
|
-
* Turns a flat list of nodes into a tree by walking the associated `TNode` tree.
|
|
12010
|
-
*
|
|
12011
|
-
* @param tNode
|
|
12012
|
-
* @param lView
|
|
12013
|
-
*/
|
|
12014
|
-
function toDebugNodes(tNode, lView) {
|
|
12015
|
-
if (tNode) {
|
|
12016
|
-
const debugNodes = [];
|
|
12017
|
-
let tNodeCursor = tNode;
|
|
12018
|
-
while (tNodeCursor) {
|
|
12019
|
-
debugNodes.push(buildDebugNode(tNodeCursor, lView));
|
|
12020
|
-
tNodeCursor = tNodeCursor.next;
|
|
12021
|
-
}
|
|
12022
|
-
return debugNodes;
|
|
12023
|
-
}
|
|
12024
|
-
else {
|
|
12025
|
-
return [];
|
|
12026
|
-
}
|
|
12027
|
-
}
|
|
12028
|
-
function buildDebugNode(tNode, lView) {
|
|
12029
|
-
const rawValue = lView[tNode.index];
|
|
12030
|
-
const native = unwrapRNode(rawValue);
|
|
12031
|
-
const factories = [];
|
|
12032
|
-
const instances = [];
|
|
12033
|
-
const tView = lView[TVIEW];
|
|
12034
|
-
for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {
|
|
12035
|
-
const def = tView.data[i];
|
|
12036
|
-
factories.push(def.type);
|
|
12037
|
-
instances.push(lView[i]);
|
|
12038
|
-
}
|
|
12039
|
-
return {
|
|
12040
|
-
html: toHtml(native),
|
|
12041
|
-
type: toTNodeTypeAsString(tNode.type),
|
|
12042
|
-
tNode,
|
|
12043
|
-
native: native,
|
|
12044
|
-
children: toDebugNodes(tNode.child, lView),
|
|
12045
|
-
factories,
|
|
12046
|
-
instances,
|
|
12047
|
-
injector: buildNodeInjectorDebug(tNode, tView, lView),
|
|
12048
|
-
get injectorResolutionPath() {
|
|
12049
|
-
return tNode.debugNodeInjectorPath(lView);
|
|
12050
|
-
},
|
|
12051
|
-
};
|
|
12052
|
-
}
|
|
12053
|
-
function buildNodeInjectorDebug(tNode, tView, lView) {
|
|
12054
|
-
const viewProviders = [];
|
|
12055
|
-
for (let i = tNode.providerIndexStart_; i < tNode.providerIndexEnd_; i++) {
|
|
12056
|
-
viewProviders.push(tView.data[i]);
|
|
12057
|
-
}
|
|
12058
|
-
const providers = [];
|
|
12059
|
-
for (let i = tNode.providerIndexEnd_; i < tNode.directiveEnd; i++) {
|
|
12060
|
-
providers.push(tView.data[i]);
|
|
12061
|
-
}
|
|
12062
|
-
const nodeInjectorDebug = {
|
|
12063
|
-
bloom: toBloom(lView, tNode.injectorIndex),
|
|
12064
|
-
cumulativeBloom: toBloom(tView.data, tNode.injectorIndex),
|
|
12065
|
-
providers,
|
|
12066
|
-
viewProviders,
|
|
12067
|
-
parentInjectorIndex: lView[tNode.providerIndexStart_ - 1],
|
|
12068
|
-
};
|
|
12069
|
-
return nodeInjectorDebug;
|
|
12070
|
-
}
|
|
12071
|
-
/**
|
|
12072
|
-
* Convert a number at `idx` location in `array` into binary representation.
|
|
12073
|
-
*
|
|
12074
|
-
* @param array
|
|
12075
|
-
* @param idx
|
|
12076
|
-
*/
|
|
12077
|
-
function binary(array, idx) {
|
|
12078
|
-
const value = array[idx];
|
|
12079
|
-
// If not a number we print 8 `?` to retain alignment but let user know that it was called on
|
|
12080
|
-
// wrong type.
|
|
12081
|
-
if (typeof value !== 'number')
|
|
12082
|
-
return '????????';
|
|
12083
|
-
// We prefix 0s so that we have constant length number
|
|
12084
|
-
const text = '00000000' + value.toString(2);
|
|
12085
|
-
return text.substring(text.length - 8);
|
|
12086
|
-
}
|
|
12087
|
-
/**
|
|
12088
|
-
* Convert a bloom filter at location `idx` in `array` into binary representation.
|
|
12089
|
-
*
|
|
12090
|
-
* @param array
|
|
12091
|
-
* @param idx
|
|
12092
|
-
*/
|
|
12093
|
-
function toBloom(array, idx) {
|
|
12094
|
-
if (idx < 0) {
|
|
12095
|
-
return 'NO_NODE_INJECTOR';
|
|
12096
|
-
}
|
|
12097
|
-
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)}`;
|
|
12098
|
-
}
|
|
12099
|
-
class LContainerDebug {
|
|
12100
|
-
constructor(_raw_lContainer) {
|
|
12101
|
-
this._raw_lContainer = _raw_lContainer;
|
|
12102
|
-
}
|
|
12103
|
-
get hasTransplantedViews() {
|
|
12104
|
-
return this._raw_lContainer[HAS_TRANSPLANTED_VIEWS];
|
|
12105
|
-
}
|
|
12106
|
-
get views() {
|
|
12107
|
-
return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET)
|
|
12108
|
-
.map(toDebug);
|
|
12109
|
-
}
|
|
12110
|
-
get parent() {
|
|
12111
|
-
return toDebug(this._raw_lContainer[PARENT]);
|
|
12112
|
-
}
|
|
12113
|
-
get movedViews() {
|
|
12114
|
-
return this._raw_lContainer[MOVED_VIEWS];
|
|
12115
|
-
}
|
|
12116
|
-
get host() {
|
|
12117
|
-
return this._raw_lContainer[HOST];
|
|
12118
|
-
}
|
|
12119
|
-
get native() {
|
|
12120
|
-
return this._raw_lContainer[NATIVE];
|
|
12121
|
-
}
|
|
12122
|
-
get next() {
|
|
12123
|
-
return toDebug(this._raw_lContainer[NEXT]);
|
|
12124
|
-
}
|
|
12125
|
-
}
|
|
12126
|
-
|
|
12127
11307
|
/**
|
|
12128
11308
|
* @license
|
|
12129
11309
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -12197,7 +11377,7 @@ function renderChildComponents(hostLView, components) {
|
|
|
12197
11377
|
}
|
|
12198
11378
|
}
|
|
12199
11379
|
function createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector, embeddedViewInjector) {
|
|
12200
|
-
const lView =
|
|
11380
|
+
const lView = tView.blueprint.slice();
|
|
12201
11381
|
lView[HOST] = host;
|
|
12202
11382
|
lView[FLAGS] = flags | 4 /* LViewFlags.CreationMode */ | 64 /* LViewFlags.Attached */ | 8 /* LViewFlags.FirstLViewPass */;
|
|
12203
11383
|
if (embeddedViewInjector !== null ||
|
|
@@ -12221,7 +11401,6 @@ function createLView(parentLView, tView, context, flags, host, tHostNode, render
|
|
|
12221
11401
|
assertEqual(tView.type == 2 /* TViewType.Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
|
|
12222
11402
|
lView[DECLARATION_COMPONENT_VIEW] =
|
|
12223
11403
|
tView.type == 2 /* TViewType.Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;
|
|
12224
|
-
ngDevMode && attachLViewDebug(lView);
|
|
12225
11404
|
return lView;
|
|
12226
11405
|
}
|
|
12227
11406
|
function getOrCreateTNode(tView, index, type, name, attrs) {
|
|
@@ -12604,73 +11783,38 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
|
|
|
12604
11783
|
const initialViewLength = bindingStartIndex + vars;
|
|
12605
11784
|
const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
|
|
12606
11785
|
const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;
|
|
12607
|
-
const tView = blueprint[TVIEW] =
|
|
12608
|
-
|
|
12609
|
-
blueprint
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
viewQuery
|
|
12613
|
-
declTNode
|
|
12614
|
-
|
|
12615
|
-
bindingStartIndex
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
typeof directives === 'function' ?
|
|
12633
|
-
|
|
12634
|
-
|
|
12635
|
-
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
false, // incompleteFirstPass: boolean
|
|
12640
|
-
decls, // ngDevMode only: decls
|
|
12641
|
-
vars) :
|
|
12642
|
-
{
|
|
12643
|
-
type: type,
|
|
12644
|
-
blueprint: blueprint,
|
|
12645
|
-
template: templateFn,
|
|
12646
|
-
queries: null,
|
|
12647
|
-
viewQuery: viewQuery,
|
|
12648
|
-
declTNode: declTNode,
|
|
12649
|
-
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
12650
|
-
bindingStartIndex: bindingStartIndex,
|
|
12651
|
-
expandoStartIndex: initialViewLength,
|
|
12652
|
-
hostBindingOpCodes: null,
|
|
12653
|
-
firstCreatePass: true,
|
|
12654
|
-
firstUpdatePass: true,
|
|
12655
|
-
staticViewQueries: false,
|
|
12656
|
-
staticContentQueries: false,
|
|
12657
|
-
preOrderHooks: null,
|
|
12658
|
-
preOrderCheckHooks: null,
|
|
12659
|
-
contentHooks: null,
|
|
12660
|
-
contentCheckHooks: null,
|
|
12661
|
-
viewHooks: null,
|
|
12662
|
-
viewCheckHooks: null,
|
|
12663
|
-
destroyHooks: null,
|
|
12664
|
-
cleanup: null,
|
|
12665
|
-
contentQueries: null,
|
|
12666
|
-
components: null,
|
|
12667
|
-
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
12668
|
-
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
12669
|
-
firstChild: null,
|
|
12670
|
-
schemas: schemas,
|
|
12671
|
-
consts: consts,
|
|
12672
|
-
incompleteFirstPass: false
|
|
12673
|
-
};
|
|
11786
|
+
const tView = blueprint[TVIEW] = {
|
|
11787
|
+
type: type,
|
|
11788
|
+
blueprint: blueprint,
|
|
11789
|
+
template: templateFn,
|
|
11790
|
+
queries: null,
|
|
11791
|
+
viewQuery: viewQuery,
|
|
11792
|
+
declTNode: declTNode,
|
|
11793
|
+
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
11794
|
+
bindingStartIndex: bindingStartIndex,
|
|
11795
|
+
expandoStartIndex: initialViewLength,
|
|
11796
|
+
hostBindingOpCodes: null,
|
|
11797
|
+
firstCreatePass: true,
|
|
11798
|
+
firstUpdatePass: true,
|
|
11799
|
+
staticViewQueries: false,
|
|
11800
|
+
staticContentQueries: false,
|
|
11801
|
+
preOrderHooks: null,
|
|
11802
|
+
preOrderCheckHooks: null,
|
|
11803
|
+
contentHooks: null,
|
|
11804
|
+
contentCheckHooks: null,
|
|
11805
|
+
viewHooks: null,
|
|
11806
|
+
viewCheckHooks: null,
|
|
11807
|
+
destroyHooks: null,
|
|
11808
|
+
cleanup: null,
|
|
11809
|
+
contentQueries: null,
|
|
11810
|
+
components: null,
|
|
11811
|
+
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
11812
|
+
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
11813
|
+
firstChild: null,
|
|
11814
|
+
schemas: schemas,
|
|
11815
|
+
consts: consts,
|
|
11816
|
+
incompleteFirstPass: false
|
|
11817
|
+
};
|
|
12674
11818
|
if (ngDevMode) {
|
|
12675
11819
|
// For performance reasons it is important that the tView retains the same shape during runtime.
|
|
12676
11820
|
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
@@ -12680,7 +11824,7 @@ function createTView(type, declTNode, templateFn, decls, vars, directives, pipes
|
|
|
12680
11824
|
return tView;
|
|
12681
11825
|
}
|
|
12682
11826
|
function createViewBlueprint(bindingStartIndex, initialViewLength) {
|
|
12683
|
-
const blueprint =
|
|
11827
|
+
const blueprint = [];
|
|
12684
11828
|
for (let i = 0; i < initialViewLength; i++) {
|
|
12685
11829
|
blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);
|
|
12686
11830
|
}
|
|
@@ -12733,74 +11877,40 @@ function createTNode(tView, tParent, type, index, value, attrs) {
|
|
|
12733
11877
|
ngDevMode && ngDevMode.tNode++;
|
|
12734
11878
|
ngDevMode && tParent && assertTNodeForTView(tParent, tView);
|
|
12735
11879
|
let injectorIndex = tParent ? tParent.injectorIndex : -1;
|
|
12736
|
-
const tNode =
|
|
12737
|
-
|
|
12738
|
-
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
-1,
|
|
12743
|
-
-1,
|
|
12744
|
-
-1,
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
0,
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
|
-
null,
|
|
12752
|
-
|
|
12753
|
-
|
|
12754
|
-
|
|
12755
|
-
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
-
|
|
12759
|
-
|
|
12760
|
-
|
|
12761
|
-
|
|
12762
|
-
|
|
12763
|
-
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
0,
|
|
12769
|
-
|
|
12770
|
-
{
|
|
12771
|
-
type,
|
|
12772
|
-
index,
|
|
12773
|
-
insertBeforeIndex: null,
|
|
12774
|
-
injectorIndex,
|
|
12775
|
-
directiveStart: -1,
|
|
12776
|
-
directiveEnd: -1,
|
|
12777
|
-
directiveStylingLast: -1,
|
|
12778
|
-
componentOffset: -1,
|
|
12779
|
-
propertyBindings: null,
|
|
12780
|
-
flags: 0,
|
|
12781
|
-
providerIndexes: 0,
|
|
12782
|
-
value: value,
|
|
12783
|
-
attrs: attrs,
|
|
12784
|
-
mergedAttrs: null,
|
|
12785
|
-
localNames: null,
|
|
12786
|
-
initialInputs: undefined,
|
|
12787
|
-
inputs: null,
|
|
12788
|
-
outputs: null,
|
|
12789
|
-
tViews: null,
|
|
12790
|
-
next: null,
|
|
12791
|
-
projectionNext: null,
|
|
12792
|
-
child: null,
|
|
12793
|
-
parent: tParent,
|
|
12794
|
-
projection: null,
|
|
12795
|
-
styles: null,
|
|
12796
|
-
stylesWithoutHost: null,
|
|
12797
|
-
residualStyles: undefined,
|
|
12798
|
-
classes: null,
|
|
12799
|
-
classesWithoutHost: null,
|
|
12800
|
-
residualClasses: undefined,
|
|
12801
|
-
classBindings: 0,
|
|
12802
|
-
styleBindings: 0,
|
|
12803
|
-
};
|
|
11880
|
+
const tNode = {
|
|
11881
|
+
type,
|
|
11882
|
+
index,
|
|
11883
|
+
insertBeforeIndex: null,
|
|
11884
|
+
injectorIndex,
|
|
11885
|
+
directiveStart: -1,
|
|
11886
|
+
directiveEnd: -1,
|
|
11887
|
+
directiveStylingLast: -1,
|
|
11888
|
+
componentOffset: -1,
|
|
11889
|
+
propertyBindings: null,
|
|
11890
|
+
flags: 0,
|
|
11891
|
+
providerIndexes: 0,
|
|
11892
|
+
value: value,
|
|
11893
|
+
attrs: attrs,
|
|
11894
|
+
mergedAttrs: null,
|
|
11895
|
+
localNames: null,
|
|
11896
|
+
initialInputs: undefined,
|
|
11897
|
+
inputs: null,
|
|
11898
|
+
outputs: null,
|
|
11899
|
+
tViews: null,
|
|
11900
|
+
next: null,
|
|
11901
|
+
projectionNext: null,
|
|
11902
|
+
child: null,
|
|
11903
|
+
parent: tParent,
|
|
11904
|
+
projection: null,
|
|
11905
|
+
styles: null,
|
|
11906
|
+
stylesWithoutHost: null,
|
|
11907
|
+
residualStyles: undefined,
|
|
11908
|
+
classes: null,
|
|
11909
|
+
classesWithoutHost: null,
|
|
11910
|
+
residualClasses: undefined,
|
|
11911
|
+
classBindings: 0,
|
|
11912
|
+
styleBindings: 0,
|
|
11913
|
+
};
|
|
12804
11914
|
if (ngDevMode) {
|
|
12805
11915
|
// For performance reasons it is important that the tNode retains the same shape during runtime.
|
|
12806
11916
|
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
@@ -12857,7 +11967,7 @@ function initializeInputAndOutputAliases(tView, tNode, hostDirectiveDefinitionMa
|
|
|
12857
11967
|
const end = tNode.directiveEnd;
|
|
12858
11968
|
const tViewData = tView.data;
|
|
12859
11969
|
const tNodeAttrs = tNode.attrs;
|
|
12860
|
-
const inputsFromAttrs =
|
|
11970
|
+
const inputsFromAttrs = [];
|
|
12861
11971
|
let inputsStore = null;
|
|
12862
11972
|
let outputsStore = null;
|
|
12863
11973
|
for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {
|
|
@@ -13195,7 +12305,7 @@ function findDirectiveDefMatches(tView, tNode) {
|
|
|
13195
12305
|
for (let i = 0; i < registry.length; i++) {
|
|
13196
12306
|
const def = registry[i];
|
|
13197
12307
|
if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {
|
|
13198
|
-
matches || (matches =
|
|
12308
|
+
matches || (matches = []);
|
|
13199
12309
|
if (isComponentDef(def)) {
|
|
13200
12310
|
if (ngDevMode) {
|
|
13201
12311
|
assertTNodeType(tNode, 2 /* TNodeType.Element */, `"${tNode.value}" tags cannot be used as component hosts. ` +
|
|
@@ -13253,13 +12363,12 @@ function markAsComponentHost(tView, hostTNode, componentOffset) {
|
|
|
13253
12363
|
ngDevMode && assertFirstCreatePass(tView);
|
|
13254
12364
|
ngDevMode && assertGreaterThan(componentOffset, -1, 'componentOffset must be great than -1');
|
|
13255
12365
|
hostTNode.componentOffset = componentOffset;
|
|
13256
|
-
(tView.components || (tView.components =
|
|
13257
|
-
.push(hostTNode.index);
|
|
12366
|
+
(tView.components || (tView.components = [])).push(hostTNode.index);
|
|
13258
12367
|
}
|
|
13259
12368
|
/** Caches local names and their matching directive indices for query and template lookups. */
|
|
13260
12369
|
function cacheMatchingLocalNames(tNode, localRefs, exportsMap) {
|
|
13261
12370
|
if (localRefs) {
|
|
13262
|
-
const localNames = tNode.localNames =
|
|
12371
|
+
const localNames = tNode.localNames = [];
|
|
13263
12372
|
// Local names must be stored in tNode in the same order that localRefs are defined
|
|
13264
12373
|
// in the template to ensure the data is loaded in the same slots as their refs
|
|
13265
12374
|
// in the template (for template queries).
|
|
@@ -13442,9 +12551,6 @@ function generateInitialInputs(inputs, directiveIndex, attrs) {
|
|
|
13442
12551
|
//////////////////////////
|
|
13443
12552
|
//// ViewContainer & View
|
|
13444
12553
|
//////////////////////////
|
|
13445
|
-
// Not sure why I need to do `any` here but TS complains later.
|
|
13446
|
-
const LContainerArray = class LContainer extends Array {
|
|
13447
|
-
};
|
|
13448
12554
|
/**
|
|
13449
12555
|
* Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
|
|
13450
12556
|
*
|
|
@@ -13457,20 +12563,20 @@ const LContainerArray = class LContainer extends Array {
|
|
|
13457
12563
|
*/
|
|
13458
12564
|
function createLContainer(hostNative, currentView, native, tNode) {
|
|
13459
12565
|
ngDevMode && assertLView(currentView);
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
12566
|
+
const lContainer = [
|
|
12567
|
+
hostNative,
|
|
12568
|
+
true,
|
|
12569
|
+
false,
|
|
12570
|
+
currentView,
|
|
12571
|
+
null,
|
|
12572
|
+
0,
|
|
12573
|
+
tNode,
|
|
12574
|
+
native,
|
|
12575
|
+
null,
|
|
12576
|
+
null, // moved views
|
|
12577
|
+
];
|
|
13471
12578
|
ngDevMode &&
|
|
13472
12579
|
assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');
|
|
13473
|
-
ngDevMode && attachLContainerDebug(lContainer);
|
|
13474
12580
|
return lContainer;
|
|
13475
12581
|
}
|
|
13476
12582
|
/**
|
|
@@ -13744,10 +12850,10 @@ function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex,
|
|
|
13744
12850
|
}
|
|
13745
12851
|
function getOrCreateLViewCleanup(view) {
|
|
13746
12852
|
// top level variables should not be exported for performance reasons (PERF_NOTES.md)
|
|
13747
|
-
return view[CLEANUP] || (view[CLEANUP] =
|
|
12853
|
+
return view[CLEANUP] || (view[CLEANUP] = []);
|
|
13748
12854
|
}
|
|
13749
12855
|
function getOrCreateTViewCleanup(tView) {
|
|
13750
|
-
return tView.cleanup || (tView.cleanup =
|
|
12856
|
+
return tView.cleanup || (tView.cleanup = []);
|
|
13751
12857
|
}
|
|
13752
12858
|
/**
|
|
13753
12859
|
* There are cases where the sub component's renderer needs to be included
|
|
@@ -14359,17 +13465,6 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
14359
13465
|
return new ComponentRef(this.componentType, component, createElementRef(tElementNode, rootLView), rootLView, tElementNode);
|
|
14360
13466
|
}
|
|
14361
13467
|
}
|
|
14362
|
-
const componentFactoryResolver = new ComponentFactoryResolver();
|
|
14363
|
-
/**
|
|
14364
|
-
* Creates a ComponentFactoryResolver and stores it on the injector. Or, if the
|
|
14365
|
-
* ComponentFactoryResolver
|
|
14366
|
-
* already exists, retrieves the existing ComponentFactoryResolver.
|
|
14367
|
-
*
|
|
14368
|
-
* @returns The ComponentFactoryResolver instance to use
|
|
14369
|
-
*/
|
|
14370
|
-
function injectComponentFactoryResolver() {
|
|
14371
|
-
return componentFactoryResolver;
|
|
14372
|
-
}
|
|
14373
13468
|
/**
|
|
14374
13469
|
* Represents an instance of a Component created via a {@link ComponentFactory}.
|
|
14375
13470
|
*
|
|
@@ -16955,6 +16050,62 @@ function ɵɵpropertyInterpolateV(propName, values, sanitizer) {
|
|
|
16955
16050
|
return ɵɵpropertyInterpolateV;
|
|
16956
16051
|
}
|
|
16957
16052
|
|
|
16053
|
+
/**
|
|
16054
|
+
* @license
|
|
16055
|
+
* Copyright Google LLC All Rights Reserved.
|
|
16056
|
+
*
|
|
16057
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
16058
|
+
* found in the LICENSE file at https://angular.io/license
|
|
16059
|
+
*/
|
|
16060
|
+
function toTStylingRange(prev, next) {
|
|
16061
|
+
ngDevMode && assertNumberInRange(prev, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
16062
|
+
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
16063
|
+
return (prev << 17 /* StylingRange.PREV_SHIFT */ | next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
16064
|
+
}
|
|
16065
|
+
function getTStylingRangePrev(tStylingRange) {
|
|
16066
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
16067
|
+
return (tStylingRange >> 17 /* StylingRange.PREV_SHIFT */) & 32767 /* StylingRange.UNSIGNED_MASK */;
|
|
16068
|
+
}
|
|
16069
|
+
function getTStylingRangePrevDuplicate(tStylingRange) {
|
|
16070
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
16071
|
+
return (tStylingRange & 2 /* StylingRange.PREV_DUPLICATE */) ==
|
|
16072
|
+
2 /* StylingRange.PREV_DUPLICATE */;
|
|
16073
|
+
}
|
|
16074
|
+
function setTStylingRangePrev(tStylingRange, previous) {
|
|
16075
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
16076
|
+
ngDevMode && assertNumberInRange(previous, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
16077
|
+
return ((tStylingRange & ~4294836224 /* StylingRange.PREV_MASK */) |
|
|
16078
|
+
(previous << 17 /* StylingRange.PREV_SHIFT */));
|
|
16079
|
+
}
|
|
16080
|
+
function setTStylingRangePrevDuplicate(tStylingRange) {
|
|
16081
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
16082
|
+
return (tStylingRange | 2 /* StylingRange.PREV_DUPLICATE */);
|
|
16083
|
+
}
|
|
16084
|
+
function getTStylingRangeNext(tStylingRange) {
|
|
16085
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
16086
|
+
return (tStylingRange & 131068 /* StylingRange.NEXT_MASK */) >> 2 /* StylingRange.NEXT_SHIFT */;
|
|
16087
|
+
}
|
|
16088
|
+
function setTStylingRangeNext(tStylingRange, next) {
|
|
16089
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
16090
|
+
ngDevMode && assertNumberInRange(next, 0, 32767 /* StylingRange.UNSIGNED_MASK */);
|
|
16091
|
+
return ((tStylingRange & ~131068 /* StylingRange.NEXT_MASK */) | //
|
|
16092
|
+
next << 2 /* StylingRange.NEXT_SHIFT */);
|
|
16093
|
+
}
|
|
16094
|
+
function getTStylingRangeNextDuplicate(tStylingRange) {
|
|
16095
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
16096
|
+
return (tStylingRange & 1 /* StylingRange.NEXT_DUPLICATE */) ===
|
|
16097
|
+
1 /* StylingRange.NEXT_DUPLICATE */;
|
|
16098
|
+
}
|
|
16099
|
+
function setTStylingRangeNextDuplicate(tStylingRange) {
|
|
16100
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
16101
|
+
return (tStylingRange | 1 /* StylingRange.NEXT_DUPLICATE */);
|
|
16102
|
+
}
|
|
16103
|
+
function getTStylingRangeTail(tStylingRange) {
|
|
16104
|
+
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
16105
|
+
const next = getTStylingRangeNext(tStylingRange);
|
|
16106
|
+
return next === 0 ? getTStylingRangePrev(tStylingRange) : next;
|
|
16107
|
+
}
|
|
16108
|
+
|
|
16958
16109
|
/**
|
|
16959
16110
|
* @license
|
|
16960
16111
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -20776,6 +19927,46 @@ function loadIcuContainerVisitor() {
|
|
|
20776
19927
|
return icuContainerIteratorStart;
|
|
20777
19928
|
}
|
|
20778
19929
|
|
|
19930
|
+
/**
|
|
19931
|
+
* @license
|
|
19932
|
+
* Copyright Google LLC All Rights Reserved.
|
|
19933
|
+
*
|
|
19934
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
19935
|
+
* found in the LICENSE file at https://angular.io/license
|
|
19936
|
+
*/
|
|
19937
|
+
/**
|
|
19938
|
+
* Patch a `debug` property on top of the existing object.
|
|
19939
|
+
*
|
|
19940
|
+
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
19941
|
+
*
|
|
19942
|
+
* @param obj Object to patch
|
|
19943
|
+
* @param debug Value to patch
|
|
19944
|
+
*/
|
|
19945
|
+
function attachDebugObject(obj, debug) {
|
|
19946
|
+
if (ngDevMode) {
|
|
19947
|
+
Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });
|
|
19948
|
+
}
|
|
19949
|
+
else {
|
|
19950
|
+
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
19951
|
+
}
|
|
19952
|
+
}
|
|
19953
|
+
/**
|
|
19954
|
+
* Patch a `debug` property getter on top of the existing object.
|
|
19955
|
+
*
|
|
19956
|
+
* NOTE: always call this method with `ngDevMode && attachDebugObject(...)`
|
|
19957
|
+
*
|
|
19958
|
+
* @param obj Object to patch
|
|
19959
|
+
* @param debugGetter Getter returning a value to patch
|
|
19960
|
+
*/
|
|
19961
|
+
function attachDebugGetter(obj, debugGetter) {
|
|
19962
|
+
if (ngDevMode) {
|
|
19963
|
+
Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });
|
|
19964
|
+
}
|
|
19965
|
+
else {
|
|
19966
|
+
throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');
|
|
19967
|
+
}
|
|
19968
|
+
}
|
|
19969
|
+
|
|
20779
19970
|
/**
|
|
20780
19971
|
* @license
|
|
20781
19972
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -22745,32 +21936,6 @@ function sortListeners(a, b) {
|
|
|
22745
21936
|
function isDirectiveDefHack(obj) {
|
|
22746
21937
|
return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;
|
|
22747
21938
|
}
|
|
22748
|
-
/**
|
|
22749
|
-
* Returns the attached `DebugNode` instance for an element in the DOM.
|
|
22750
|
-
*
|
|
22751
|
-
* @param element DOM element which is owned by an existing component's view.
|
|
22752
|
-
*/
|
|
22753
|
-
function getDebugNode(element) {
|
|
22754
|
-
if (ngDevMode && !(element instanceof Node)) {
|
|
22755
|
-
throw new Error('Expecting instance of DOM Element');
|
|
22756
|
-
}
|
|
22757
|
-
const lContext = getLContext(element);
|
|
22758
|
-
const lView = lContext ? lContext.lView : null;
|
|
22759
|
-
if (lView === null) {
|
|
22760
|
-
return null;
|
|
22761
|
-
}
|
|
22762
|
-
const nodeIndex = lContext.nodeIndex;
|
|
22763
|
-
if (nodeIndex !== -1) {
|
|
22764
|
-
const valueInLView = lView[nodeIndex];
|
|
22765
|
-
// this means that value in the lView is a component with its own
|
|
22766
|
-
// data. In this situation the TNode is not accessed at the same spot.
|
|
22767
|
-
const tNode = isLView(valueInLView) ? valueInLView[T_HOST] : getTNode(lView[TVIEW], nodeIndex);
|
|
22768
|
-
ngDevMode &&
|
|
22769
|
-
assertEqual(tNode.index, nodeIndex, 'Expecting that TNode at index is same as index');
|
|
22770
|
-
return buildDebugNode(tNode, lView);
|
|
22771
|
-
}
|
|
22772
|
-
return null;
|
|
22773
|
-
}
|
|
22774
21939
|
/**
|
|
22775
21940
|
* Retrieve the component `LView` from component/element.
|
|
22776
21941
|
*
|