@angular/core 20.2.2 → 20.2.3

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 (59) hide show
  1. package/api.d.d.ts +1 -1
  2. package/chrome_dev_tools_performance.d.d.ts +1 -1
  3. package/discovery.d.d.ts +8 -17
  4. package/effect.d.d.ts +1 -1
  5. package/event_dispatcher.d.d.ts +1 -1
  6. package/fesm2022/attribute.mjs +1 -1
  7. package/fesm2022/core.mjs +9 -11
  8. package/fesm2022/core.mjs.map +1 -1
  9. package/fesm2022/debug_node.mjs +26 -36
  10. package/fesm2022/debug_node.mjs.map +1 -1
  11. package/fesm2022/effect.mjs +1 -1
  12. package/fesm2022/not_found.mjs +1 -1
  13. package/fesm2022/primitives/di.mjs +1 -1
  14. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  15. package/fesm2022/primitives/signals.mjs +1 -1
  16. package/fesm2022/resource.mjs +1 -1
  17. package/fesm2022/root_effect_scheduler.mjs +1 -1
  18. package/fesm2022/rxjs-interop.mjs +2 -2
  19. package/fesm2022/rxjs-interop.mjs.map +1 -1
  20. package/fesm2022/signal.mjs +1 -1
  21. package/fesm2022/testing.mjs +4 -6
  22. package/fesm2022/testing.mjs.map +1 -1
  23. package/fesm2022/weak_ref.mjs +1 -1
  24. package/graph.d.d.ts +1 -1
  25. package/index.d.ts +2 -1
  26. package/package.json +2 -2
  27. package/primitives/di/index.d.ts +1 -1
  28. package/primitives/event-dispatch/index.d.ts +1 -1
  29. package/primitives/signals/index.d.ts +1 -1
  30. package/rxjs-interop/index.d.ts +1 -1
  31. package/schematics/bundles/{apply_import_manager-jh6mrC6i.cjs → apply_import_manager-BTXb3nRr.cjs} +3 -3
  32. package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
  33. package/schematics/bundles/{compiler_host-B_eI7M_O.cjs → compiler_host-Btt7nH4b.cjs} +2 -2
  34. package/schematics/bundles/control-flow-migration.cjs +3 -3
  35. package/schematics/bundles/document-core.cjs +5 -5
  36. package/schematics/bundles/imports-CIX-JgAN.cjs +1 -1
  37. package/schematics/bundles/{index-D6oJ4URa.cjs → index-CAfBb4YL.cjs} +12 -12
  38. package/schematics/bundles/{index-BakSPuLU.cjs → index-rL7rOVXa.cjs} +4 -4
  39. package/schematics/bundles/inject-flags.cjs +5 -5
  40. package/schematics/bundles/inject-migration.cjs +3 -3
  41. package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
  42. package/schematics/bundles/{migrate_ts_type_references-Cv_ejjaV.cjs → migrate_ts_type_references-Dyjkgb1x.cjs} +5 -5
  43. package/schematics/bundles/ng_decorators-B5HCqr20.cjs +1 -1
  44. package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
  45. package/schematics/bundles/output-migration.cjs +6 -6
  46. package/schematics/bundles/{project_paths-CSaggenP.cjs → project_paths-BUuKobrE.cjs} +3 -3
  47. package/schematics/bundles/{project_tsconfig_paths-BDoOg2Cc.cjs → project_tsconfig_paths-x7xrmbI9.cjs} +5 -5
  48. package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
  49. package/schematics/bundles/route-lazy-loading.cjs +3 -3
  50. package/schematics/bundles/router-current-navigation.cjs +4 -4
  51. package/schematics/bundles/self-closing-tags-migration.cjs +4 -4
  52. package/schematics/bundles/signal-input-migration.cjs +7 -7
  53. package/schematics/bundles/signal-queries-migration.cjs +7 -7
  54. package/schematics/bundles/signals.cjs +7 -7
  55. package/schematics/bundles/standalone-migration.cjs +4 -4
  56. package/schematics/bundles/symbol-VPWguRxr.cjs +1 -1
  57. package/schematics/bundles/test-bed-get.cjs +4 -4
  58. package/testing/index.d.ts +1 -1
  59. package/weak_ref.d.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.2.2
2
+ * @license Angular v20.2.3
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -8398,7 +8398,13 @@ function handleUncaughtError(lView, error) {
8398
8398
  if (!injector) {
8399
8399
  return;
8400
8400
  }
8401
- const errorHandler = injector.get(INTERNAL_APPLICATION_ERROR_HANDLER, null);
8401
+ let errorHandler;
8402
+ try {
8403
+ errorHandler = injector.get(INTERNAL_APPLICATION_ERROR_HANDLER, null);
8404
+ }
8405
+ catch {
8406
+ errorHandler = null;
8407
+ }
8402
8408
  errorHandler?.(error);
8403
8409
  }
8404
8410
  /**
@@ -13515,7 +13521,7 @@ class ComponentFactory extends ComponentFactory$1 {
13515
13521
  }
13516
13522
  function createRootTView(rootSelectorOrNode, componentDef, componentBindings, directives) {
13517
13523
  const tAttributes = rootSelectorOrNode
13518
- ? ['ng-version', '20.2.2']
13524
+ ? ['ng-version', '20.2.3']
13519
13525
  : // Extract attributes and classes from the first selector only to match VE behavior.
13520
13526
  extractAttrsAndClassesFromSelector(componentDef.selectors[0]);
13521
13527
  let creationBindings = null;
@@ -21781,6 +21787,7 @@ class ElementRegistry {
21781
21787
  const details = this.outElements.get(el) ?? {
21782
21788
  classes: null,
21783
21789
  animateFn: () => { },
21790
+ isEventBinding: true,
21784
21791
  };
21785
21792
  details.animateFn = animateWrapperFn(el, value);
21786
21793
  this.outElements.set(el, details);
@@ -21790,6 +21797,7 @@ class ElementRegistry {
21790
21797
  const details = this.outElements.get(el) ?? {
21791
21798
  classes: new Set(),
21792
21799
  animateFn: () => { },
21800
+ isEventBinding: false,
21793
21801
  };
21794
21802
  if (typeof value === 'function') {
21795
21803
  this.trackResolver(details, value);
@@ -21825,8 +21833,11 @@ class ElementRegistry {
21825
21833
  };
21826
21834
  // this timeout is used to ensure elements actually get removed in the case
21827
21835
  // that the user forgot to call the remove callback. The timeout is cleared
21828
- // in the DOM renderer during the remove child process.
21829
- timeoutId = setTimeout(remove, maxAnimationTimeout);
21836
+ // in the DOM renderer during the remove child process. It only applies
21837
+ // to the event binding use case.
21838
+ if (details.isEventBinding) {
21839
+ timeoutId = setTimeout(remove, maxAnimationTimeout);
21840
+ }
21830
21841
  details.animateFn(remove);
21831
21842
  }
21832
21843
  }
@@ -22073,7 +22084,6 @@ function ɵɵanimateEnter(value) {
22073
22084
  // This also allows us to setup cancellation of animations in progress if the
22074
22085
  // gets removed early.
22075
22086
  const handleAnimationStart = (event) => {
22076
- setupAnimationCancel(event, renderer);
22077
22087
  const eventName = event instanceof AnimationEvent ? 'animationend' : 'transitionend';
22078
22088
  ngZone.runOutsideAngular(() => {
22079
22089
  cleanupFns.push(renderer.listen(nativeElement, eventName, handleInAnimationEnd));
@@ -22282,42 +22292,22 @@ function cancelAnimationsIfRunning(element, renderer) {
22282
22292
  if (!areAnimationSupported)
22283
22293
  return;
22284
22294
  const elementData = enterClassMap.get(element);
22285
- if (element.getAnimations().length > 0) {
22286
- for (const animation of element.getAnimations()) {
22287
- if (animation.playState === 'running') {
22288
- animation.cancel();
22289
- }
22290
- }
22291
- }
22292
- else {
22293
- if (elementData) {
22294
- for (const klass of elementData.classList) {
22295
- renderer.removeClass(element, klass);
22296
- }
22295
+ if (elementData &&
22296
+ elementData.classList.length > 0 &&
22297
+ elementHasClassList(element, elementData.classList)) {
22298
+ for (const klass of elementData.classList) {
22299
+ renderer.removeClass(element, klass);
22297
22300
  }
22298
22301
  }
22299
22302
  // We need to prevent any enter animation listeners from firing if they exist.
22300
22303
  cleanupEnterClassData(element);
22301
22304
  }
22302
- function setupAnimationCancel(event, renderer) {
22303
- if (!(event.target instanceof Element))
22304
- return;
22305
- const nativeElement = event.target;
22306
- if (areAnimationSupported) {
22307
- const elementData = enterClassMap.get(nativeElement);
22308
- const animations = nativeElement.getAnimations();
22309
- if (animations.length === 0)
22310
- return;
22311
- for (let animation of animations) {
22312
- animation.addEventListener('cancel', (event) => {
22313
- if (nativeElement === event.target && elementData?.classList) {
22314
- for (const klass of elementData.classList) {
22315
- renderer.removeClass(nativeElement, klass);
22316
- }
22317
- }
22318
- });
22319
- }
22305
+ function elementHasClassList(element, classList) {
22306
+ for (const className of classList) {
22307
+ if (element.classList.contains(className))
22308
+ return true;
22320
22309
  }
22310
+ return false;
22321
22311
  }
22322
22312
  function isLongestAnimation(event, nativeElement) {
22323
22313
  const longestAnimation = longestAnimations.get(nativeElement);