@angular/core 16.0.4 → 16.0.6
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/esm2022/src/application_ref.mjs +3 -3
- package/esm2022/src/hydration/annotate.mjs +4 -5
- package/esm2022/src/hydration/skip_hydration.mjs +10 -4
- package/esm2022/src/render3/instructions/element.mjs +7 -4
- package/esm2022/src/render3/instructions/shared.mjs +3 -3
- package/esm2022/src/render3/interfaces/renderer_dom.mjs +1 -1
- package/esm2022/src/render3/interfaces/type_checks.mjs +4 -1
- package/esm2022/src/render3/jit/directive.mjs +2 -2
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +24 -13
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +20 -8
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +2 -1
- package/package.json +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/guard-and-resolve-interfaces/bundle.js +13 -13
- package/schematics/migrations/remove-module-id/bundle.js +14 -14
- package/schematics/ng-generate/standalone-migration/bundle.js +364 -357
- package/schematics/ng-generate/standalone-migration/bundle.js.map +3 -3
- package/testing/index.d.ts +1 -1
package/fesm2022/testing.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.0.
|
|
2
|
+
* @license Angular v16.0.6
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -3334,6 +3334,9 @@ function isRootView(target) {
|
|
|
3334
3334
|
function isProjectionTNode(tNode) {
|
|
3335
3335
|
return (tNode.type & 16 /* TNodeType.Projection */) === 16 /* TNodeType.Projection */;
|
|
3336
3336
|
}
|
|
3337
|
+
function hasI18n(lView) {
|
|
3338
|
+
return (lView[FLAGS] & 32 /* LViewFlags.HasI18n */) === 32 /* LViewFlags.HasI18n */;
|
|
3339
|
+
}
|
|
3337
3340
|
|
|
3338
3341
|
// [Assert functions do not constraint type when they are guarded by a truthy
|
|
3339
3342
|
// expression.](https://github.com/microsoft/TypeScript/issues/37295)
|
|
@@ -6565,9 +6568,9 @@ function matchingSchemas(schemas, tagName) {
|
|
|
6565
6568
|
*/
|
|
6566
6569
|
const SKIP_HYDRATION_ATTR_NAME = 'ngSkipHydration';
|
|
6567
6570
|
/**
|
|
6568
|
-
* Helper function to check if a given
|
|
6571
|
+
* Helper function to check if a given TNode has the 'ngSkipHydration' attribute.
|
|
6569
6572
|
*/
|
|
6570
|
-
function
|
|
6573
|
+
function hasSkipHydrationAttrOnTNode(tNode) {
|
|
6571
6574
|
const SKIP_HYDRATION_ATTR_NAME_LOWER_CASE = SKIP_HYDRATION_ATTR_NAME.toLowerCase();
|
|
6572
6575
|
const attrs = tNode.mergedAttrs;
|
|
6573
6576
|
if (attrs === null)
|
|
@@ -6585,6 +6588,12 @@ function hasNgSkipHydrationAttr(tNode) {
|
|
|
6585
6588
|
}
|
|
6586
6589
|
return false;
|
|
6587
6590
|
}
|
|
6591
|
+
/**
|
|
6592
|
+
* Helper function to check if a given RElement has the 'ngSkipHydration' attribute.
|
|
6593
|
+
*/
|
|
6594
|
+
function hasSkipHydrationAttrOnRElement(rNode) {
|
|
6595
|
+
return rNode.hasAttribute(SKIP_HYDRATION_ATTR_NAME);
|
|
6596
|
+
}
|
|
6588
6597
|
/**
|
|
6589
6598
|
* Checks whether a TNode has a flag to indicate that it's a part of
|
|
6590
6599
|
* a skip hydration block.
|
|
@@ -6604,7 +6613,7 @@ function hasInSkipHydrationBlockFlag(tNode) {
|
|
|
6604
6613
|
function isInSkipHydrationBlock(tNode) {
|
|
6605
6614
|
let currentTNode = tNode.parent;
|
|
6606
6615
|
while (currentTNode) {
|
|
6607
|
-
if (
|
|
6616
|
+
if (hasSkipHydrationAttrOnTNode(currentTNode)) {
|
|
6608
6617
|
return true;
|
|
6609
6618
|
}
|
|
6610
6619
|
currentTNode = currentTNode.parent;
|
|
@@ -10464,7 +10473,7 @@ class Version {
|
|
|
10464
10473
|
/**
|
|
10465
10474
|
* @publicApi
|
|
10466
10475
|
*/
|
|
10467
|
-
const VERSION = new Version('16.0.
|
|
10476
|
+
const VERSION = new Version('16.0.6');
|
|
10468
10477
|
|
|
10469
10478
|
// This default value is when checking the hierarchy for a token.
|
|
10470
10479
|
//
|
|
@@ -11485,7 +11494,7 @@ let _applyRootElementTransformImpl = (rootElement) => null;
|
|
|
11485
11494
|
* @param rootElement the app root HTML Element
|
|
11486
11495
|
*/
|
|
11487
11496
|
function applyRootElementTransformImpl(rootElement) {
|
|
11488
|
-
if (rootElement
|
|
11497
|
+
if (hasSkipHydrationAttrOnRElement(rootElement)) {
|
|
11489
11498
|
// Handle a situation when the `ngSkipHydration` attribute is applied
|
|
11490
11499
|
// to the root node of an application. In this case, we should clear
|
|
11491
11500
|
// the contents and render everything from scratch.
|
|
@@ -15683,8 +15692,11 @@ function locateOrCreateElementNodeImpl(tView, lView, tNode, renderer, name, inde
|
|
|
15683
15692
|
setSegmentHead(hydrationInfo, index, native.nextSibling);
|
|
15684
15693
|
}
|
|
15685
15694
|
// Checks if the skip hydration attribute is present during hydration so we know to
|
|
15686
|
-
// skip attempting to hydrate this block.
|
|
15687
|
-
|
|
15695
|
+
// skip attempting to hydrate this block. We check both TNode and RElement for an
|
|
15696
|
+
// attribute: the RElement case is needed for i18n cases, when we add it to host
|
|
15697
|
+
// elements during the annotation phase (after all internal data structures are setup).
|
|
15698
|
+
if (hydrationInfo &&
|
|
15699
|
+
(hasSkipHydrationAttrOnTNode(tNode) || hasSkipHydrationAttrOnRElement(native))) {
|
|
15688
15700
|
if (isComponentHost(tNode)) {
|
|
15689
15701
|
enterSkipHydrationBlock(tNode);
|
|
15690
15702
|
// Since this isn't hydratable, we need to empty the node
|