@angular/core 14.2.0-next.0 → 14.2.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/application_ref.mjs +2 -2
- package/esm2020/src/core_render3_private_export.mjs +4 -4
- package/esm2020/src/di/interface/defs.mjs +4 -1
- package/esm2020/src/render3/component_ref.mjs +4 -31
- package/esm2020/src/render3/definition.mjs +5 -5
- package/esm2020/src/render3/index.mjs +4 -4
- package/esm2020/src/render3/instructions/change_detection.mjs +3 -19
- package/esm2020/src/render3/instructions/shared.mjs +10 -50
- package/esm2020/src/render3/interfaces/view.mjs +1 -1
- package/esm2020/src/render3/jit/module.mjs +2 -6
- package/esm2020/src/render3/util/change_detection_utils.mjs +7 -3
- package/esm2020/src/render3/util/misc_utils.mjs +1 -7
- 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 +23 -108
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +20 -106
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +23 -108
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +20 -106
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +3 -97
- package/package.json +1 -1
- package/testing/index.d.ts +1 -1
- package/esm2020/src/render3/interfaces/player.mjs +0 -9
package/fesm2020/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.2.0-next.
|
|
2
|
+
* @license Angular v14.2.0-next.1
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -834,6 +834,9 @@ function ɵɵdefineInjector(options) {
|
|
|
834
834
|
function getInjectableDef(type) {
|
|
835
835
|
return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);
|
|
836
836
|
}
|
|
837
|
+
function isInjectable(type) {
|
|
838
|
+
return getInjectableDef(type) !== null;
|
|
839
|
+
}
|
|
837
840
|
/**
|
|
838
841
|
* Return definition only if it is defined directly on `type` and is not inherited from a base
|
|
839
842
|
* class of `type`.
|
|
@@ -2604,7 +2607,6 @@ function extractDirectiveDef(type) {
|
|
|
2604
2607
|
function nonNull(value) {
|
|
2605
2608
|
return value !== null;
|
|
2606
2609
|
}
|
|
2607
|
-
const autoRegisterModuleById = {};
|
|
2608
2610
|
/**
|
|
2609
2611
|
* @codeGenApi
|
|
2610
2612
|
*/
|
|
@@ -2620,9 +2622,6 @@ function ɵɵdefineNgModule(def) {
|
|
|
2620
2622
|
schemas: def.schemas || null,
|
|
2621
2623
|
id: def.id || null,
|
|
2622
2624
|
};
|
|
2623
|
-
if (def.id != null) {
|
|
2624
|
-
autoRegisterModuleById[def.id] = def.type;
|
|
2625
|
-
}
|
|
2626
2625
|
return res;
|
|
2627
2626
|
});
|
|
2628
2627
|
}
|
|
@@ -2776,6 +2775,10 @@ function getDirectiveDef(type) {
|
|
|
2776
2775
|
function getPipeDef$1(type) {
|
|
2777
2776
|
return type[NG_PIPE_DEF] || null;
|
|
2778
2777
|
}
|
|
2778
|
+
function isStandalone(type) {
|
|
2779
|
+
const def = getComponentDef$1(type) || getDirectiveDef(type) || getPipeDef$1(type);
|
|
2780
|
+
return def !== null ? def.standalone : false;
|
|
2781
|
+
}
|
|
2779
2782
|
function getNgModuleDef(type, throwNotFound) {
|
|
2780
2783
|
const ngModuleDef = type[NG_MOD_DEF] || null;
|
|
2781
2784
|
if (!ngModuleDef && throwNotFound === true) {
|
|
@@ -5508,11 +5511,6 @@ function setAllowDuplicateNgModuleIdsForTest(allowDuplicates) {
|
|
|
5508
5511
|
* Use of this source code is governed by an MIT-style license that can be
|
|
5509
5512
|
* found in the LICENSE file at https://angular.io/license
|
|
5510
5513
|
*/
|
|
5511
|
-
const defaultScheduler = (() => (typeof requestAnimationFrame !== 'undefined' &&
|
|
5512
|
-
requestAnimationFrame || // browser only
|
|
5513
|
-
setTimeout // everything else
|
|
5514
|
-
)
|
|
5515
|
-
.bind(_global$1))();
|
|
5516
5514
|
/**
|
|
5517
5515
|
*
|
|
5518
5516
|
* @codeGenApi
|
|
@@ -7649,7 +7647,7 @@ class Version {
|
|
|
7649
7647
|
/**
|
|
7650
7648
|
* @publicApi
|
|
7651
7649
|
*/
|
|
7652
|
-
const VERSION = new Version('14.2.0-next.
|
|
7650
|
+
const VERSION = new Version('14.2.0-next.1');
|
|
7653
7651
|
|
|
7654
7652
|
/**
|
|
7655
7653
|
* @license
|
|
@@ -12045,11 +12043,6 @@ class LContainerDebug {
|
|
|
12045
12043
|
* Use of this source code is governed by an MIT-style license that can be
|
|
12046
12044
|
* found in the LICENSE file at https://angular.io/license
|
|
12047
12045
|
*/
|
|
12048
|
-
/**
|
|
12049
|
-
* A permanent marker promise which signifies that the current CD tree is
|
|
12050
|
-
* clean.
|
|
12051
|
-
*/
|
|
12052
|
-
const _CLEAN_PROMISE = (() => Promise.resolve(null))();
|
|
12053
12046
|
/**
|
|
12054
12047
|
* Invoke `HostBindingsFunction`s for view.
|
|
12055
12048
|
*
|
|
@@ -13430,13 +13423,15 @@ function refreshContainsDirtyView(lView) {
|
|
|
13430
13423
|
for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {
|
|
13431
13424
|
for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
|
|
13432
13425
|
const embeddedLView = lContainer[i];
|
|
13433
|
-
if (embeddedLView
|
|
13434
|
-
|
|
13435
|
-
|
|
13436
|
-
|
|
13437
|
-
|
|
13438
|
-
|
|
13439
|
-
|
|
13426
|
+
if (viewAttachedToChangeDetector(embeddedLView)) {
|
|
13427
|
+
if (embeddedLView[FLAGS] & 512 /* LViewFlags.RefreshTransplantedView */) {
|
|
13428
|
+
const embeddedTView = embeddedLView[TVIEW];
|
|
13429
|
+
ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');
|
|
13430
|
+
refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);
|
|
13431
|
+
}
|
|
13432
|
+
else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {
|
|
13433
|
+
refreshContainsDirtyView(embeddedLView);
|
|
13434
|
+
}
|
|
13440
13435
|
}
|
|
13441
13436
|
}
|
|
13442
13437
|
}
|
|
@@ -13545,42 +13540,6 @@ function markViewDirty(lView) {
|
|
|
13545
13540
|
}
|
|
13546
13541
|
return null;
|
|
13547
13542
|
}
|
|
13548
|
-
/**
|
|
13549
|
-
* Used to schedule change detection on the whole application.
|
|
13550
|
-
*
|
|
13551
|
-
* Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.
|
|
13552
|
-
* It is usually called indirectly by calling `markDirty` when the view needs to be
|
|
13553
|
-
* re-rendered.
|
|
13554
|
-
*
|
|
13555
|
-
* Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple
|
|
13556
|
-
* `scheduleTick` requests. The scheduling function can be overridden in
|
|
13557
|
-
* `renderComponent`'s `scheduler` option.
|
|
13558
|
-
*/
|
|
13559
|
-
function scheduleTick(rootContext, flags) {
|
|
13560
|
-
const nothingScheduled = rootContext.flags === 0 /* RootContextFlags.Empty */;
|
|
13561
|
-
if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) {
|
|
13562
|
-
// https://github.com/angular/angular/issues/39296
|
|
13563
|
-
// should only attach the flags when really scheduling a tick
|
|
13564
|
-
rootContext.flags |= flags;
|
|
13565
|
-
let res;
|
|
13566
|
-
rootContext.clean = new Promise((r) => res = r);
|
|
13567
|
-
rootContext.scheduler(() => {
|
|
13568
|
-
if (rootContext.flags & 1 /* RootContextFlags.DetectChanges */) {
|
|
13569
|
-
rootContext.flags &= ~1 /* RootContextFlags.DetectChanges */;
|
|
13570
|
-
tickRootContext(rootContext);
|
|
13571
|
-
}
|
|
13572
|
-
if (rootContext.flags & 2 /* RootContextFlags.FlushPlayers */) {
|
|
13573
|
-
rootContext.flags &= ~2 /* RootContextFlags.FlushPlayers */;
|
|
13574
|
-
const playerHandler = rootContext.playerHandler;
|
|
13575
|
-
if (playerHandler) {
|
|
13576
|
-
playerHandler.flushPlayers();
|
|
13577
|
-
}
|
|
13578
|
-
}
|
|
13579
|
-
rootContext.clean = _CLEAN_PROMISE;
|
|
13580
|
-
res(null);
|
|
13581
|
-
});
|
|
13582
|
-
}
|
|
13583
|
-
}
|
|
13584
13543
|
function tickRootContext(rootContext) {
|
|
13585
13544
|
for (let i = 0; i < rootContext.components.length; i++) {
|
|
13586
13545
|
const rootComponent = rootContext.components[i];
|
|
@@ -13689,7 +13648,6 @@ function storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex,
|
|
|
13689
13648
|
}
|
|
13690
13649
|
}
|
|
13691
13650
|
}
|
|
13692
|
-
const CLEAN_PROMISE = _CLEAN_PROMISE;
|
|
13693
13651
|
function getOrCreateLViewCleanup(view) {
|
|
13694
13652
|
// top level variables should not be exported for performance reasons (PERF_NOTES.md)
|
|
13695
13653
|
return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup() : []);
|
|
@@ -14448,14 +14406,8 @@ function createRootComponent(componentView, componentDef, rootLView, rootContext
|
|
|
14448
14406
|
}
|
|
14449
14407
|
return component;
|
|
14450
14408
|
}
|
|
14451
|
-
function createRootContext(
|
|
14452
|
-
return {
|
|
14453
|
-
components: [],
|
|
14454
|
-
scheduler: scheduler || defaultScheduler,
|
|
14455
|
-
clean: CLEAN_PROMISE,
|
|
14456
|
-
playerHandler: playerHandler || null,
|
|
14457
|
-
flags: 0 /* RootContextFlags.Empty */
|
|
14458
|
-
};
|
|
14409
|
+
function createRootContext() {
|
|
14410
|
+
return { components: [] };
|
|
14459
14411
|
}
|
|
14460
14412
|
/**
|
|
14461
14413
|
* Used to enable lifecycle hooks on the root component.
|
|
@@ -14475,25 +14427,6 @@ function LifecycleHooksFeature() {
|
|
|
14475
14427
|
ngDevMode && assertDefined(tNode, 'TNode is required');
|
|
14476
14428
|
registerPostOrderHooks(getLView()[TVIEW], tNode);
|
|
14477
14429
|
}
|
|
14478
|
-
/**
|
|
14479
|
-
* Wait on component until it is rendered.
|
|
14480
|
-
*
|
|
14481
|
-
* This function returns a `Promise` which is resolved when the component's
|
|
14482
|
-
* change detection is executed. This is determined by finding the scheduler
|
|
14483
|
-
* associated with the `component`'s render tree and waiting until the scheduler
|
|
14484
|
-
* flushes. If nothing is scheduled, the function returns a resolved promise.
|
|
14485
|
-
*
|
|
14486
|
-
* Example:
|
|
14487
|
-
* ```
|
|
14488
|
-
* await whenRendered(myComponent);
|
|
14489
|
-
* ```
|
|
14490
|
-
*
|
|
14491
|
-
* @param component Component to wait upon
|
|
14492
|
-
* @returns Promise which resolves when the component is rendered.
|
|
14493
|
-
*/
|
|
14494
|
-
function whenRendered(component) {
|
|
14495
|
-
return getRootContext(component).clean;
|
|
14496
|
-
}
|
|
14497
14430
|
|
|
14498
14431
|
/**
|
|
14499
14432
|
* @license
|
|
@@ -15478,21 +15411,6 @@ function detectChanges(component) {
|
|
|
15478
15411
|
const view = getComponentViewByInstance(component);
|
|
15479
15412
|
detectChangesInternal(view[TVIEW], view, component);
|
|
15480
15413
|
}
|
|
15481
|
-
/**
|
|
15482
|
-
* Marks the component as dirty (needing change detection). Marking a component dirty will
|
|
15483
|
-
* schedule a change detection on it at some point in the future.
|
|
15484
|
-
*
|
|
15485
|
-
* Marking an already dirty component as dirty won't do anything. Only one outstanding change
|
|
15486
|
-
* detection can be scheduled per component tree.
|
|
15487
|
-
*
|
|
15488
|
-
* @param component Component to mark as dirty.
|
|
15489
|
-
*/
|
|
15490
|
-
function markDirty(component) {
|
|
15491
|
-
ngDevMode && assertDefined(component, 'component');
|
|
15492
|
-
const rootView = markViewDirty(getComponentViewByInstance(component));
|
|
15493
|
-
ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined');
|
|
15494
|
-
scheduleTick(rootView[CONTEXT], 1 /* RootContextFlags.DetectChanges */);
|
|
15495
|
-
}
|
|
15496
15414
|
|
|
15497
15415
|
/**
|
|
15498
15416
|
* @license
|
|
@@ -24654,10 +24572,6 @@ function compileNgModuleDefs(moduleType, ngModule, allowDuplicateDeclarationsInR
|
|
|
24654
24572
|
configurable: !!ngDevMode,
|
|
24655
24573
|
});
|
|
24656
24574
|
}
|
|
24657
|
-
function isStandalone(type) {
|
|
24658
|
-
const def = getComponentDef$1(type) || getDirectiveDef(type) || getPipeDef$1(type);
|
|
24659
|
-
return def !== null ? def.standalone : false;
|
|
24660
|
-
}
|
|
24661
24575
|
function generateStandaloneInDeclarationsError(type, location) {
|
|
24662
24576
|
const prefix = `Unexpected "${stringifyForError(type)}" found in the "declarations" array of the`;
|
|
24663
24577
|
const suffix = `"${stringifyForError(type)}" is marked as standalone and can't be declared ` +
|