@angular/core 21.1.2 → 21.1.4

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.
Files changed (66) hide show
  1. package/fesm2022/_attribute-chunk.mjs +1 -1
  2. package/fesm2022/_debug_node-chunk.mjs +28 -15
  3. package/fesm2022/_debug_node-chunk.mjs.map +1 -1
  4. package/fesm2022/_effect-chunk.mjs +1 -1
  5. package/fesm2022/_linked_signal-chunk.mjs +5 -2
  6. package/fesm2022/_linked_signal-chunk.mjs.map +1 -1
  7. package/fesm2022/_not_found-chunk.mjs +1 -1
  8. package/fesm2022/_resource-chunk.mjs +1 -1
  9. package/fesm2022/_untracked-chunk.mjs +2 -2
  10. package/fesm2022/_untracked-chunk.mjs.map +1 -1
  11. package/fesm2022/_weak_ref-chunk.mjs +1 -1
  12. package/fesm2022/core.mjs +1 -5
  13. package/fesm2022/core.mjs.map +1 -1
  14. package/fesm2022/primitives-di.mjs +1 -1
  15. package/fesm2022/primitives-event-dispatch.mjs +2 -2
  16. package/fesm2022/primitives-event-dispatch.mjs.map +1 -1
  17. package/fesm2022/primitives-signals.mjs +1 -1
  18. package/fesm2022/rxjs-interop.mjs +1 -1
  19. package/fesm2022/testing.mjs +1 -1
  20. package/package.json +2 -2
  21. package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +1 -1
  22. package/schematics/bundles/application-config-core.cjs +1 -1
  23. package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
  24. package/schematics/bundles/bootstrap-options-migration.cjs +1 -1
  25. package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
  26. package/schematics/bundles/common-to-standalone-migration.cjs +1 -1
  27. package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
  28. package/schematics/bundles/control-flow-migration.cjs +1 -1
  29. package/schematics/bundles/imports-CVmcbVA9.cjs +1 -1
  30. package/schematics/bundles/index-BtLcQH8g.cjs +1 -1
  31. package/schematics/bundles/inject-migration.cjs +1 -1
  32. package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
  33. package/schematics/bundles/migrate_ts_type_references-CV7qdt5t.cjs +1 -1
  34. package/schematics/bundles/ng_component_template-BOuKAnQd.cjs +1 -1
  35. package/schematics/bundles/ng_decorators-DYy6II6x.cjs +1 -1
  36. package/schematics/bundles/ngclass-to-class-migration.cjs +1 -1
  37. package/schematics/bundles/ngstyle-to-style-migration.cjs +1 -1
  38. package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
  39. package/schematics/bundles/output-migration.cjs +1 -1
  40. package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
  41. package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
  42. package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
  43. package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
  44. package/schematics/bundles/route-lazy-loading.cjs +1 -1
  45. package/schematics/bundles/router-current-navigation.cjs +1 -1
  46. package/schematics/bundles/router-last-successful-navigation.cjs +1 -1
  47. package/schematics/bundles/router-testing-module-migration.cjs +1 -1
  48. package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
  49. package/schematics/bundles/signal-input-migration.cjs +1 -1
  50. package/schematics/bundles/signal-queries-migration.cjs +1 -1
  51. package/schematics/bundles/signals.cjs +1 -1
  52. package/schematics/bundles/standalone-migration.cjs +1 -1
  53. package/schematics/bundles/symbol-DZeHSR-V.cjs +1 -1
  54. package/types/_api-chunk.d.ts +1 -1
  55. package/types/_chrome_dev_tools_performance-chunk.d.ts +1 -1
  56. package/types/_discovery-chunk.d.ts +2 -2
  57. package/types/_effect-chunk.d.ts +1 -1
  58. package/types/_event_dispatcher-chunk.d.ts +2 -2
  59. package/types/_formatter-chunk.d.ts +1 -1
  60. package/types/_weak_ref-chunk.d.ts +1 -1
  61. package/types/core.d.ts +2 -2
  62. package/types/primitives-di.d.ts +1 -1
  63. package/types/primitives-event-dispatch.d.ts +3 -3
  64. package/types/primitives-signals.d.ts +1 -1
  65. package/types/rxjs-interop.d.ts +1 -1
  66. package/types/testing.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.1.2
2
+ * @license Angular v21.1.4
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.1.2
2
+ * @license Angular v21.1.4
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -4358,6 +4358,16 @@ function queueEnterAnimations(injector, enterAnimations) {
4358
4358
  addToAnimationQueue(injector, nodeAnimations.animateFns);
4359
4359
  }
4360
4360
  }
4361
+ function removeAnimationsFromQueue(injector, animationFns) {
4362
+ const animationQueue = injector.get(ANIMATION_QUEUE);
4363
+ if (Array.isArray(animationFns)) {
4364
+ for (const animateFn of animationFns) {
4365
+ animationQueue.queue.delete(animateFn);
4366
+ }
4367
+ } else {
4368
+ animationQueue.queue.delete(animationFns);
4369
+ }
4370
+ }
4361
4371
 
4362
4372
  function maybeQueueEnterAnimation(parentLView, parent, tNode, injector) {
4363
4373
  const enterAnimations = parentLView?.[ANIMATIONS]?.enter;
@@ -4493,6 +4503,9 @@ function cleanUpView(tView, lView) {
4493
4503
  }
4494
4504
  function runLeaveAnimationsWithCallback(lView, tNode, injector, callback) {
4495
4505
  const animations = lView?.[ANIMATIONS];
4506
+ if (animations?.enter?.has(tNode.index)) {
4507
+ removeAnimationsFromQueue(injector, animations.enter.get(tNode.index).animateFns);
4508
+ }
4496
4509
  if (animations == null || animations.leave == undefined || !animations.leave.has(tNode.index)) return callback(false);
4497
4510
  if (lView) allLeavingAnimations.add(lView[ID]);
4498
4511
  addToAnimationQueue(injector, () => {
@@ -7288,10 +7301,10 @@ function verifyStandaloneImport(depType, importingType) {
7288
7301
  }
7289
7302
 
7290
7303
  class DepsTracker {
7291
- ownerNgModule = new Map();
7304
+ ownerNgModule = new WeakMap();
7292
7305
  ngModulesWithSomeUnresolvedDecls = new Set();
7293
- ngModulesScopeCache = new Map();
7294
- standaloneComponentsScopeCache = new Map();
7306
+ ngModulesScopeCache = new WeakMap();
7307
+ standaloneComponentsScopeCache = new WeakMap();
7295
7308
  resolveNgModulesDecls() {
7296
7309
  if (this.ngModulesWithSomeUnresolvedDecls.size === 0) {
7297
7310
  return;
@@ -8314,7 +8327,7 @@ class ComponentFactory extends ComponentFactory$1 {
8314
8327
  }
8315
8328
  }
8316
8329
  function createRootTView(rootSelectorOrNode, componentDef, componentBindings, directives) {
8317
- const tAttributes = rootSelectorOrNode ? ['ng-version', '21.1.2'] : extractAttrsAndClassesFromSelector(componentDef.selectors[0]);
8330
+ const tAttributes = rootSelectorOrNode ? ['ng-version', '21.1.4'] : extractAttrsAndClassesFromSelector(componentDef.selectors[0]);
8318
8331
  let creationBindings = null;
8319
8332
  let updateBindings = null;
8320
8333
  let varsToAllocate = 0;
@@ -13052,16 +13065,16 @@ function ɵɵanimateEnter(value) {
13052
13065
  }
13053
13066
  const tNode = getCurrentTNode();
13054
13067
  cancelLeavingNodes(tNode, lView);
13055
- addAnimationToLView(getLViewEnterAnimations(lView), tNode, () => runEnterAnimation(lView, tNode, value));
13068
+ const ngZone = lView[INJECTOR].get(NgZone);
13069
+ addAnimationToLView(getLViewEnterAnimations(lView), tNode, () => runEnterAnimation(lView, tNode, value, ngZone));
13056
13070
  initializeAnimationQueueScheduler(lView[INJECTOR]);
13057
13071
  queueEnterAnimations(lView[INJECTOR], getLViewEnterAnimations(lView));
13058
13072
  return ɵɵanimateEnter;
13059
13073
  }
13060
- function runEnterAnimation(lView, tNode, value) {
13074
+ function runEnterAnimation(lView, tNode, value, ngZone) {
13061
13075
  const nativeElement = getNativeByTNode(tNode, lView);
13062
13076
  ngDevMode && assertElementNodes(nativeElement, 'animate.enter');
13063
13077
  const renderer = lView[RENDERER];
13064
- const ngZone = lView[INJECTOR].get(NgZone);
13065
13078
  const activeClasses = getClassListFromValue(value);
13066
13079
  const cleanupFns = [];
13067
13080
  const handleEnterAnimationStart = event => {
@@ -13146,11 +13159,12 @@ function ɵɵanimateLeave(value) {
13146
13159
  }
13147
13160
  const tNode = getCurrentTNode();
13148
13161
  cancelLeavingNodes(tNode, lView);
13149
- addAnimationToLView(getLViewLeaveAnimations(lView), tNode, () => runLeaveAnimations(lView, tNode, value));
13162
+ const ngZone = lView[INJECTOR].get(NgZone);
13163
+ addAnimationToLView(getLViewLeaveAnimations(lView), tNode, () => runLeaveAnimations(lView, tNode, value, ngZone));
13150
13164
  initializeAnimationQueueScheduler(lView[INJECTOR]);
13151
13165
  return ɵɵanimateLeave;
13152
13166
  }
13153
- function runLeaveAnimations(lView, tNode, value) {
13167
+ function runLeaveAnimations(lView, tNode, value, ngZone) {
13154
13168
  const {
13155
13169
  promise,
13156
13170
  resolve
@@ -13158,7 +13172,6 @@ function runLeaveAnimations(lView, tNode, value) {
13158
13172
  const nativeElement = getNativeByTNode(tNode, lView);
13159
13173
  ngDevMode && assertElementNodes(nativeElement, 'animate.leave');
13160
13174
  const renderer = lView[RENDERER];
13161
- const ngZone = lView[INJECTOR].get(NgZone);
13162
13175
  allLeavingAnimations.add(lView[ID]);
13163
13176
  (getLViewLeaveAnimations(lView).get(tNode.index).resolvers ??= []).push(resolve);
13164
13177
  const activeClasses = getClassListFromValue(value);
@@ -13220,11 +13233,13 @@ function ɵɵanimateLeaveListener(value) {
13220
13233
  const tNode = getCurrentTNode();
13221
13234
  cancelLeavingNodes(tNode, lView);
13222
13235
  allLeavingAnimations.add(lView[ID]);
13223
- addAnimationToLView(getLViewLeaveAnimations(lView), tNode, () => runLeaveAnimationFunction(lView, tNode, value));
13236
+ const ngZone = lView[INJECTOR].get(NgZone);
13237
+ const maxAnimationTimeout = lView[INJECTOR].get(MAX_ANIMATION_TIMEOUT);
13238
+ addAnimationToLView(getLViewLeaveAnimations(lView), tNode, () => runLeaveAnimationFunction(lView, tNode, value, ngZone, maxAnimationTimeout));
13224
13239
  initializeAnimationQueueScheduler(lView[INJECTOR]);
13225
13240
  return ɵɵanimateLeaveListener;
13226
13241
  }
13227
- function runLeaveAnimationFunction(lView, tNode, value) {
13242
+ function runLeaveAnimationFunction(lView, tNode, value, ngZone, maxAnimationTimeout) {
13228
13243
  const {
13229
13244
  promise,
13230
13245
  resolve
@@ -13234,8 +13249,6 @@ function runLeaveAnimationFunction(lView, tNode, value) {
13234
13249
  const cleanupFns = [];
13235
13250
  const renderer = lView[RENDERER];
13236
13251
  const animationsDisabled = areAnimationsDisabled(lView);
13237
- const ngZone = lView[INJECTOR].get(NgZone);
13238
- const maxAnimationTimeout = lView[INJECTOR].get(MAX_ANIMATION_TIMEOUT);
13239
13252
  (getLViewLeaveAnimations(lView).get(tNode.index).resolvers ??= []).push(resolve);
13240
13253
  const resolvers = getLViewLeaveAnimations(lView).get(tNode.index)?.resolvers;
13241
13254
  if (animationsDisabled) {