@angular/core 17.0.4 → 17.0.5
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_init.mjs +2 -2
- package/esm2022/src/render3/features/host_directives_feature.mjs +20 -13
- package/esm2022/src/render3/instructions/change_detection.mjs +3 -4
- package/esm2022/src/render3/util/view_utils.mjs +11 -12
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed.mjs +3 -3
- package/esm2022/testing/src/test_bed_compiler.mjs +19 -10
- package/fesm2022/core.mjs +32 -27
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +21 -12
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +3 -3
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/block-template-entities/bundle.js +307 -302
- package/schematics/migrations/block-template-entities/bundle.js.map +4 -4
- package/schematics/migrations/compiler-options/bundle.js +13 -13
- package/schematics/migrations/transfer-state/bundle.js +13 -13
- package/schematics/ng-generate/control-flow-migration/bundle.js +510 -382
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +4 -4
- package/schematics/ng-generate/standalone-migration/bundle.js +571 -560
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
package/fesm2022/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v17.0.
|
|
2
|
+
* @license Angular v17.0.5
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -2722,20 +2722,19 @@ function walkUpViews(nestingLevel, currentView) {
|
|
|
2722
2722
|
}
|
|
2723
2723
|
return currentView;
|
|
2724
2724
|
}
|
|
2725
|
+
function requiresRefreshOrTraversal(lView) {
|
|
2726
|
+
return lView[FLAGS] & (1024 /* LViewFlags.RefreshView */ | 8192 /* LViewFlags.HasChildViewsToRefresh */) ||
|
|
2727
|
+
lView[REACTIVE_TEMPLATE_CONSUMER]?.dirty;
|
|
2728
|
+
}
|
|
2725
2729
|
/**
|
|
2726
|
-
* Updates the `
|
|
2727
|
-
* parents above
|
|
2728
|
-
* 1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh
|
|
2729
|
-
* or
|
|
2730
|
-
* 2. counter goes from 1 to 0, indicating there are no more descendant views to refresh
|
|
2731
|
-
* When attaching/re-attaching an `LView` to the change detection tree, we need to ensure that the
|
|
2732
|
-
* views above it are traversed during change detection if this one is marked for refresh or has
|
|
2733
|
-
* some child or descendant that needs to be refreshed.
|
|
2730
|
+
* Updates the `HasChildViewsToRefresh` flag on the parents of the `LView` as well as the
|
|
2731
|
+
* parents above.
|
|
2734
2732
|
*/
|
|
2735
2733
|
function updateAncestorTraversalFlagsOnAttach(lView) {
|
|
2736
|
-
if (lView
|
|
2737
|
-
|
|
2734
|
+
if (!requiresRefreshOrTraversal(lView)) {
|
|
2735
|
+
return;
|
|
2738
2736
|
}
|
|
2737
|
+
markAncestorsForTraversal(lView);
|
|
2739
2738
|
}
|
|
2740
2739
|
/**
|
|
2741
2740
|
* Ensures views above the given `lView` are traversed during change detection even when they are
|
|
@@ -10428,7 +10427,7 @@ class Version {
|
|
|
10428
10427
|
/**
|
|
10429
10428
|
* @publicApi
|
|
10430
10429
|
*/
|
|
10431
|
-
const VERSION = new Version('17.0.
|
|
10430
|
+
const VERSION = new Version('17.0.5');
|
|
10432
10431
|
|
|
10433
10432
|
// This default value is when checking the hierarchy for a token.
|
|
10434
10433
|
//
|
|
@@ -13335,8 +13334,7 @@ function detectChangesInViewWhileDirty(lView) {
|
|
|
13335
13334
|
// descendants views that need to be refreshed due to re-dirtying during the change detection
|
|
13336
13335
|
// run, detect changes on the view again. We run change detection in `Targeted` mode to only
|
|
13337
13336
|
// refresh views with the `RefreshView` flag.
|
|
13338
|
-
while (lView
|
|
13339
|
-
lView[REACTIVE_TEMPLATE_CONSUMER]?.dirty) {
|
|
13337
|
+
while (requiresRefreshOrTraversal(lView)) {
|
|
13340
13338
|
if (retries === MAXIMUM_REFRESH_RERUNS) {
|
|
13341
13339
|
throw new RuntimeError(103 /* RuntimeErrorCode.INFINITE_CHANGE_DETECTION */, ngDevMode &&
|
|
13342
13340
|
'Infinite change detection while trying to refresh views. ' +
|
|
@@ -15986,19 +15984,26 @@ function ɵɵCopyDefinitionFeature(definition) {
|
|
|
15986
15984
|
* @codeGenApi
|
|
15987
15985
|
*/
|
|
15988
15986
|
function ɵɵHostDirectivesFeature(rawHostDirectives) {
|
|
15989
|
-
|
|
15990
|
-
|
|
15991
|
-
|
|
15992
|
-
|
|
15993
|
-
|
|
15994
|
-
|
|
15995
|
-
|
|
15996
|
-
|
|
15997
|
-
|
|
15998
|
-
|
|
15999
|
-
|
|
16000
|
-
|
|
15987
|
+
const feature = (definition) => {
|
|
15988
|
+
const resolved = (Array.isArray(rawHostDirectives) ? rawHostDirectives : rawHostDirectives()).map(dir => {
|
|
15989
|
+
return typeof dir === 'function' ?
|
|
15990
|
+
{ directive: resolveForwardRef(dir), inputs: EMPTY_OBJ, outputs: EMPTY_OBJ } :
|
|
15991
|
+
{
|
|
15992
|
+
directive: resolveForwardRef(dir.directive),
|
|
15993
|
+
inputs: bindingArrayToMap(dir.inputs),
|
|
15994
|
+
outputs: bindingArrayToMap(dir.outputs)
|
|
15995
|
+
};
|
|
15996
|
+
});
|
|
15997
|
+
if (definition.hostDirectives === null) {
|
|
15998
|
+
definition.findHostDirectiveDefs = findHostDirectiveDefs;
|
|
15999
|
+
definition.hostDirectives = resolved;
|
|
16000
|
+
}
|
|
16001
|
+
else {
|
|
16002
|
+
definition.hostDirectives.unshift(...resolved);
|
|
16003
|
+
}
|
|
16001
16004
|
};
|
|
16005
|
+
feature.ngInherit = true;
|
|
16006
|
+
return feature;
|
|
16002
16007
|
}
|
|
16003
16008
|
function findHostDirectiveDefs(currentDef, matchedDefs, hostDirectiveDefs) {
|
|
16004
16009
|
if (currentDef.hostDirectives !== null) {
|
|
@@ -30003,7 +30008,7 @@ const ITS_JUST_ANGULAR = true;
|
|
|
30003
30008
|
* provideHttpClient(),
|
|
30004
30009
|
* {
|
|
30005
30010
|
* provide: APP_INITIALIZER,
|
|
30006
|
-
* useFactory:
|
|
30011
|
+
* useFactory: initializeAppFactory,
|
|
30007
30012
|
* multi: true,
|
|
30008
30013
|
* deps: [HttpClient],
|
|
30009
30014
|
* },
|