@angular/core 19.0.6 → 19.0.7
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/fesm2022/core.mjs +33 -28
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +4 -4
- package/index.d.ts +36 -33
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/bundles/{checker-99fcd356.js → checker-a3b46ff3.js} +19 -19
- package/schematics/bundles/{combine_units-755cada7.js → combine_units-e4fe9a1e.js} +3 -3
- package/schematics/bundles/{compiler_host-6ebdb0ca.js → compiler_host-00ae769f.js} +2 -2
- package/schematics/bundles/control-flow-migration.js +3 -3
- package/schematics/bundles/explicit-standalone-flag.js +5 -5
- package/schematics/bundles/{imports-abe29092.js → imports-31a38653.js} +1 -1
- package/schematics/bundles/inject-migration.js +6 -6
- package/schematics/bundles/{leading_space-d190b83b.js → leading_space-6e7a8ec6.js} +1 -1
- package/schematics/bundles/{migrate_ts_type_references-c61efd47.js → migrate_ts_type_references-c5fea22f.js} +5 -5
- package/schematics/bundles/{nodes-a9f0b985.js → nodes-88c2157f.js} +2 -2
- package/schematics/bundles/output-migration.js +5 -5
- package/schematics/bundles/pending-tasks.js +5 -5
- package/schematics/bundles/{program-2d2a3ded.js → program-857d3416.js} +34 -19
- package/schematics/bundles/{project_tsconfig_paths-e9ccccbf.js → project_tsconfig_paths-6c9cde78.js} +1 -1
- package/schematics/bundles/provide-initializer.js +5 -5
- package/schematics/bundles/route-lazy-loading.js +4 -4
- package/schematics/bundles/signal-input-migration.js +7 -7
- package/schematics/bundles/signal-queries-migration.js +13 -7
- package/schematics/bundles/signals.js +7 -7
- package/schematics/bundles/standalone-migration.js +8 -8
- package/testing/index.d.ts +1 -1
package/fesm2022/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.0.
|
|
2
|
+
* @license Angular v19.0.7
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -4401,7 +4401,7 @@ class NodeInjectorFactory {
|
|
|
4401
4401
|
* Example:
|
|
4402
4402
|
*
|
|
4403
4403
|
* If we have a component and directive active an a single element as declared here
|
|
4404
|
-
* ```
|
|
4404
|
+
* ```ts
|
|
4405
4405
|
* component:
|
|
4406
4406
|
* providers: [ {provide: String, useValue: 'component', multi: true} ],
|
|
4407
4407
|
* viewProviders: [ {provide: String, useValue: 'componentView', multi: true} ],
|
|
@@ -4412,7 +4412,7 @@ class NodeInjectorFactory {
|
|
|
4412
4412
|
*
|
|
4413
4413
|
* Then the expected results are:
|
|
4414
4414
|
*
|
|
4415
|
-
* ```
|
|
4415
|
+
* ```ts
|
|
4416
4416
|
* providers: ['component', 'directive']
|
|
4417
4417
|
* viewProviders: ['component', 'componentView', 'directive']
|
|
4418
4418
|
* ```
|
|
@@ -4435,7 +4435,7 @@ class NodeInjectorFactory {
|
|
|
4435
4435
|
* Example:
|
|
4436
4436
|
*
|
|
4437
4437
|
* Given:
|
|
4438
|
-
* ```
|
|
4438
|
+
* ```ts
|
|
4439
4439
|
* providers: [ {provide: String, useValue: 'all', multi: true} ],
|
|
4440
4440
|
* viewProviders: [ {provide: String, useValue: 'viewOnly', multi: true} ],
|
|
4441
4441
|
* ```
|
|
@@ -6137,7 +6137,7 @@ class PendingTasks {
|
|
|
6137
6137
|
/**
|
|
6138
6138
|
* Runs an asynchronous function and blocks the application's stability until the function completes.
|
|
6139
6139
|
*
|
|
6140
|
-
* ```
|
|
6140
|
+
* ```ts
|
|
6141
6141
|
* pendingTasks.run(async () => {
|
|
6142
6142
|
* const userData = await fetch('/api/user');
|
|
6143
6143
|
* this.userData.set(userData);
|
|
@@ -6147,7 +6147,7 @@ class PendingTasks {
|
|
|
6147
6147
|
* Application stability is at least delayed until the next tick after the `run` method resolves
|
|
6148
6148
|
* so it is safe to make additional updates to application state that would require UI synchronization:
|
|
6149
6149
|
*
|
|
6150
|
-
* ```
|
|
6150
|
+
* ```ts
|
|
6151
6151
|
* const userData = await pendingTasks.run(() => fetch('/api/user'));
|
|
6152
6152
|
* this.userData.set(userData);
|
|
6153
6153
|
* ```
|
|
@@ -16206,7 +16206,7 @@ function loadIcuContainerVisitor() {
|
|
|
16206
16206
|
* to determine which root belong to the ICU.
|
|
16207
16207
|
*
|
|
16208
16208
|
* Example of usage.
|
|
16209
|
-
* ```
|
|
16209
|
+
* ```ts
|
|
16210
16210
|
* const nextRNode = icuContainerIteratorStart(tIcuContainerNode, lView);
|
|
16211
16211
|
* let rNode: RNode|null;
|
|
16212
16212
|
* while(rNode = nextRNode()) {
|
|
@@ -18088,7 +18088,7 @@ function createRootComponent(componentView, rootComponentDef, rootDirectives, ho
|
|
|
18088
18088
|
function setRootNodeAttributes(hostRenderer, componentDef, hostRNode, rootSelectorOrNode) {
|
|
18089
18089
|
if (rootSelectorOrNode) {
|
|
18090
18090
|
// The placeholder will be replaced with the actual version at build time.
|
|
18091
|
-
setUpAttributes(hostRenderer, hostRNode, ['ng-version', '19.0.
|
|
18091
|
+
setUpAttributes(hostRenderer, hostRNode, ['ng-version', '19.0.7']);
|
|
18092
18092
|
}
|
|
18093
18093
|
else {
|
|
18094
18094
|
// If host element is created as a part of this function call (i.e. `rootSelectorOrNode`
|
|
@@ -33071,29 +33071,29 @@ function ɵɵreplaceMetadata(type, applyMetadata, namespaces, locals) {
|
|
|
33071
33071
|
}
|
|
33072
33072
|
/**
|
|
33073
33073
|
* Finds all LViews matching a specific component definition and recreates them.
|
|
33074
|
-
* @param
|
|
33074
|
+
* @param oldDef Component definition to search for.
|
|
33075
33075
|
* @param rootLView View from which to start the search.
|
|
33076
33076
|
*/
|
|
33077
|
-
function recreateMatchingLViews(
|
|
33077
|
+
function recreateMatchingLViews(oldDef, rootLView) {
|
|
33078
33078
|
ngDevMode &&
|
|
33079
|
-
assertDefined(
|
|
33079
|
+
assertDefined(oldDef.tView, 'Expected a component definition that has been instantiated at least once');
|
|
33080
33080
|
const tView = rootLView[TVIEW];
|
|
33081
33081
|
// Use `tView` to match the LView since `instanceof` can
|
|
33082
33082
|
// produce false positives when using inheritance.
|
|
33083
|
-
if (tView ===
|
|
33084
|
-
ngDevMode && assertComponentDef(
|
|
33085
|
-
recreateLView(getComponentDef(
|
|
33083
|
+
if (tView === oldDef.tView) {
|
|
33084
|
+
ngDevMode && assertComponentDef(oldDef.type);
|
|
33085
|
+
recreateLView(getComponentDef(oldDef.type), oldDef, rootLView);
|
|
33086
33086
|
return;
|
|
33087
33087
|
}
|
|
33088
33088
|
for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {
|
|
33089
33089
|
const current = rootLView[i];
|
|
33090
33090
|
if (isLContainer(current)) {
|
|
33091
33091
|
for (let i = CONTAINER_HEADER_OFFSET; i < current.length; i++) {
|
|
33092
|
-
recreateMatchingLViews(
|
|
33092
|
+
recreateMatchingLViews(oldDef, current[i]);
|
|
33093
33093
|
}
|
|
33094
33094
|
}
|
|
33095
33095
|
else if (isLView(current)) {
|
|
33096
|
-
recreateMatchingLViews(
|
|
33096
|
+
recreateMatchingLViews(oldDef, current);
|
|
33097
33097
|
}
|
|
33098
33098
|
}
|
|
33099
33099
|
}
|
|
@@ -33112,10 +33112,11 @@ function clearRendererCache(factory, def) {
|
|
|
33112
33112
|
}
|
|
33113
33113
|
/**
|
|
33114
33114
|
* Recreates an LView in-place from a new component definition.
|
|
33115
|
-
* @param
|
|
33115
|
+
* @param newDef Definition from which to recreate the view.
|
|
33116
|
+
* @param oldDef Previous component definition being swapped out.
|
|
33116
33117
|
* @param lView View to be recreated.
|
|
33117
33118
|
*/
|
|
33118
|
-
function recreateLView(
|
|
33119
|
+
function recreateLView(newDef, oldDef, lView) {
|
|
33119
33120
|
const instance = lView[CONTEXT];
|
|
33120
33121
|
const host = lView[HOST];
|
|
33121
33122
|
// In theory the parent can also be an LContainer, but it appears like that's
|
|
@@ -33124,14 +33125,15 @@ function recreateLView(def, lView) {
|
|
|
33124
33125
|
ngDevMode && assertLView(parentLView);
|
|
33125
33126
|
const tNode = lView[T_HOST];
|
|
33126
33127
|
ngDevMode && assertTNodeType(tNode, 2 /* TNodeType.Element */);
|
|
33128
|
+
ngDevMode && assertNotEqual(newDef, oldDef, 'Expected different component definition');
|
|
33127
33129
|
// Recreate the TView since the template might've changed.
|
|
33128
|
-
const newTView = getOrCreateComponentTView(
|
|
33130
|
+
const newTView = getOrCreateComponentTView(newDef);
|
|
33129
33131
|
// Always force the creation of a new renderer to ensure state captured during construction
|
|
33130
33132
|
// stays consistent with the new component definition by clearing any old cached factories.
|
|
33131
33133
|
const rendererFactory = lView[ENVIRONMENT].rendererFactory;
|
|
33132
|
-
clearRendererCache(rendererFactory,
|
|
33134
|
+
clearRendererCache(rendererFactory, oldDef);
|
|
33133
33135
|
// Create a new LView from the new TView, but reusing the existing TNode and DOM node.
|
|
33134
|
-
const newLView = createLView(parentLView, newTView, instance, getInitialLViewFlagsFromDef(
|
|
33136
|
+
const newLView = createLView(parentLView, newTView, instance, getInitialLViewFlagsFromDef(newDef), host, tNode, null, rendererFactory.createRenderer(host, newDef), null, null, null);
|
|
33135
33137
|
// Detach the LView from its current place in the tree so we don't
|
|
33136
33138
|
// start traversing any siblings and modifying their structure.
|
|
33137
33139
|
replaceLViewInTree(parentLView, lView, newLView, tNode.index);
|
|
@@ -34573,7 +34575,7 @@ class Version {
|
|
|
34573
34575
|
/**
|
|
34574
34576
|
* @publicApi
|
|
34575
34577
|
*/
|
|
34576
|
-
const VERSION = new Version('19.0.
|
|
34578
|
+
const VERSION = new Version('19.0.7');
|
|
34577
34579
|
|
|
34578
34580
|
/**
|
|
34579
34581
|
* Combination of NgModuleFactory and ComponentFactories.
|
|
@@ -37846,7 +37848,7 @@ class IterableDiffers {
|
|
|
37846
37848
|
* which will only be applied to the injector for this component and its children.
|
|
37847
37849
|
* This step is all that's required to make a new {@link IterableDiffer} available.
|
|
37848
37850
|
*
|
|
37849
|
-
* ```
|
|
37851
|
+
* ```ts
|
|
37850
37852
|
* @Component({
|
|
37851
37853
|
* viewProviders: [
|
|
37852
37854
|
* IterableDiffers.extend([new ImmutableListDiffer()])
|
|
@@ -37920,7 +37922,7 @@ class KeyValueDiffers {
|
|
|
37920
37922
|
* which will only be applied to the injector for this component and its children.
|
|
37921
37923
|
* This step is all that's required to make a new {@link KeyValueDiffer} available.
|
|
37922
37924
|
*
|
|
37923
|
-
* ```
|
|
37925
|
+
* ```ts
|
|
37924
37926
|
* @Component({
|
|
37925
37927
|
* viewProviders: [
|
|
37926
37928
|
* KeyValueDiffers.extend([new ImmutableMapDiffer()])
|
|
@@ -39075,7 +39077,6 @@ function serializeLContainer(lContainer, tNode, lView, parentDeferBlockId, conte
|
|
|
39075
39077
|
collectNativeNodesInLContainer(lContainer, rootNodes);
|
|
39076
39078
|
// Add defer block into info context.deferBlocks
|
|
39077
39079
|
const deferBlockInfo = {
|
|
39078
|
-
[DEFER_PARENT_BLOCK_ID]: parentDeferBlockId,
|
|
39079
39080
|
[NUM_ROOT_NODES]: rootNodes.length,
|
|
39080
39081
|
[DEFER_BLOCK_STATE$1]: lDetails[DEFER_BLOCK_STATE],
|
|
39081
39082
|
};
|
|
@@ -39083,6 +39084,10 @@ function serializeLContainer(lContainer, tNode, lView, parentDeferBlockId, conte
|
|
|
39083
39084
|
if (serializedTriggers.length > 0) {
|
|
39084
39085
|
deferBlockInfo[DEFER_HYDRATE_TRIGGERS] = serializedTriggers;
|
|
39085
39086
|
}
|
|
39087
|
+
if (parentDeferBlockId !== null) {
|
|
39088
|
+
// Serialize parent id only when it's present.
|
|
39089
|
+
deferBlockInfo[DEFER_PARENT_BLOCK_ID] = parentDeferBlockId;
|
|
39090
|
+
}
|
|
39086
39091
|
context.deferBlocks.set(deferBlockId, deferBlockInfo);
|
|
39087
39092
|
const node = unwrapRNode(lContainer);
|
|
39088
39093
|
if (node !== undefined) {
|
|
@@ -41113,7 +41118,7 @@ function mergeApplicationConfig(...configs) {
|
|
|
41113
41118
|
*
|
|
41114
41119
|
* @developerPreview
|
|
41115
41120
|
*/
|
|
41116
|
-
const REQUEST = new InjectionToken('REQUEST', {
|
|
41121
|
+
const REQUEST = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'REQUEST' : '', {
|
|
41117
41122
|
providedIn: 'platform',
|
|
41118
41123
|
factory: () => null,
|
|
41119
41124
|
});
|
|
@@ -41135,7 +41140,7 @@ const REQUEST = new InjectionToken('REQUEST', {
|
|
|
41135
41140
|
*
|
|
41136
41141
|
* @developerPreview
|
|
41137
41142
|
*/
|
|
41138
|
-
const RESPONSE_INIT = new InjectionToken('RESPONSE_INIT', {
|
|
41143
|
+
const RESPONSE_INIT = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'RESPONSE_INIT' : '', {
|
|
41139
41144
|
providedIn: 'platform',
|
|
41140
41145
|
factory: () => null,
|
|
41141
41146
|
});
|
|
@@ -41149,7 +41154,7 @@ const RESPONSE_INIT = new InjectionToken('RESPONSE_INIT', {
|
|
|
41149
41154
|
*
|
|
41150
41155
|
* @developerPreview
|
|
41151
41156
|
*/
|
|
41152
|
-
const REQUEST_CONTEXT = new InjectionToken('REQUEST_CONTEXT', {
|
|
41157
|
+
const REQUEST_CONTEXT = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'REQUEST_CONTEXT' : '', {
|
|
41153
41158
|
providedIn: 'platform',
|
|
41154
41159
|
factory: () => null,
|
|
41155
41160
|
});
|