@angular/core 21.2.0-next.2 → 21.2.0-next.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 (75) hide show
  1. package/fesm2022/_attribute-chunk.mjs +1 -1
  2. package/fesm2022/_attribute-chunk.mjs.map +1 -1
  3. package/fesm2022/_debug_node-chunk.mjs +151 -58
  4. package/fesm2022/_debug_node-chunk.mjs.map +1 -1
  5. package/fesm2022/_effect-chunk.mjs +1 -1
  6. package/fesm2022/_effect-chunk.mjs.map +1 -1
  7. package/fesm2022/_effect-chunk2.mjs +2 -2
  8. package/fesm2022/_effect-chunk2.mjs.map +1 -1
  9. package/fesm2022/_not_found-chunk.mjs +1 -1
  10. package/fesm2022/_not_found-chunk.mjs.map +1 -1
  11. package/fesm2022/_resource-chunk.mjs +1 -1
  12. package/fesm2022/_resource-chunk.mjs.map +1 -1
  13. package/fesm2022/_untracked-chunk.mjs +1 -1
  14. package/fesm2022/_untracked-chunk.mjs.map +1 -1
  15. package/fesm2022/_weak_ref-chunk.mjs +1 -1
  16. package/fesm2022/_weak_ref-chunk.mjs.map +1 -1
  17. package/fesm2022/core.mjs +1 -1
  18. package/fesm2022/core.mjs.map +1 -1
  19. package/fesm2022/primitives-di.mjs +1 -1
  20. package/fesm2022/primitives-di.mjs.map +1 -1
  21. package/fesm2022/primitives-event-dispatch.mjs +1 -1
  22. package/fesm2022/primitives-event-dispatch.mjs.map +1 -1
  23. package/fesm2022/primitives-signals.mjs +1 -1
  24. package/fesm2022/primitives-signals.mjs.map +1 -1
  25. package/fesm2022/rxjs-interop.mjs +1 -1
  26. package/fesm2022/rxjs-interop.mjs.map +1 -1
  27. package/fesm2022/testing.mjs +1 -1
  28. package/fesm2022/testing.mjs.map +1 -1
  29. package/package.json +2 -2
  30. package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +1 -1
  31. package/schematics/bundles/application-config-core.cjs +1 -1
  32. package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
  33. package/schematics/bundles/bootstrap-options-migration.cjs +1 -1
  34. package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
  35. package/schematics/bundles/common-to-standalone-migration.cjs +1 -1
  36. package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
  37. package/schematics/bundles/control-flow-migration.cjs +1 -1
  38. package/schematics/bundles/imports-CVmcbVA9.cjs +1 -1
  39. package/schematics/bundles/index-BtLcQH8g.cjs +1 -1
  40. package/schematics/bundles/inject-migration.cjs +1 -1
  41. package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
  42. package/schematics/bundles/migrate_ts_type_references-MWoZx-Cb.cjs +1 -1
  43. package/schematics/bundles/ng_component_template-BOuKAnQd.cjs +1 -1
  44. package/schematics/bundles/ng_decorators-DYy6II6x.cjs +1 -1
  45. package/schematics/bundles/ngclass-to-class-migration.cjs +1 -1
  46. package/schematics/bundles/ngstyle-to-style-migration.cjs +1 -1
  47. package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
  48. package/schematics/bundles/output-migration.cjs +1 -1
  49. package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
  50. package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
  51. package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
  52. package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
  53. package/schematics/bundles/route-lazy-loading.cjs +1 -1
  54. package/schematics/bundles/router-current-navigation.cjs +1 -1
  55. package/schematics/bundles/router-last-successful-navigation.cjs +1 -1
  56. package/schematics/bundles/router-testing-module-migration.cjs +1 -1
  57. package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
  58. package/schematics/bundles/signal-input-migration.cjs +1 -1
  59. package/schematics/bundles/signal-queries-migration.cjs +1 -1
  60. package/schematics/bundles/signals.cjs +1 -1
  61. package/schematics/bundles/standalone-migration.cjs +1 -1
  62. package/schematics/bundles/symbol-DZeHSR-V.cjs +1 -1
  63. package/types/_api-chunk.d.ts +1 -1
  64. package/types/_chrome_dev_tools_performance-chunk.d.ts +1 -1
  65. package/types/_discovery-chunk.d.ts +1 -1
  66. package/types/_effect-chunk.d.ts +1 -1
  67. package/types/_event_dispatcher-chunk.d.ts +1 -1
  68. package/types/_formatter-chunk.d.ts +1 -1
  69. package/types/_weak_ref-chunk.d.ts +1 -1
  70. package/types/core.d.ts +1 -1
  71. package/types/primitives-di.d.ts +1 -1
  72. package/types/primitives-event-dispatch.d.ts +1 -1
  73. package/types/primitives-signals.d.ts +1 -1
  74. package/types/rxjs-interop.d.ts +1 -1
  75. package/types/testing.d.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.2.0-next.2
2
+ * @license Angular v21.2.0-next.3
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"_attribute-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/packages/core/primitives/event-dispatch/src/attribute.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport const Attribute = {\n /**\n * The jsaction attribute defines a mapping of a DOM event to a\n * generic event (aka jsaction), to which the actual event handlers\n * that implement the behavior of the application are bound. The\n * value is a semicolon separated list of colon separated pairs of\n * an optional DOM event name and a jsaction name. If the optional\n * DOM event name is omitted, 'click' is assumed. The jsaction names\n * are dot separated pairs of a namespace and a simple jsaction\n * name.\n *\n * See grammar in README.md for expected syntax in the attribute value.\n */\n JSACTION: 'jsaction' as const,\n};\n"],"names":["Attribute","JSACTION"],"mappings":";;;;;;AAQO,MAAMA,SAAS,GAAG;AAavBC,EAAAA,QAAQ,EAAE;;;;;"}
1
+ {"version":3,"file":"_attribute-chunk.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/packages/core/primitives/event-dispatch/src/attribute.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport const Attribute = {\n /**\n * The jsaction attribute defines a mapping of a DOM event to a\n * generic event (aka jsaction), to which the actual event handlers\n * that implement the behavior of the application are bound. The\n * value is a semicolon separated list of colon separated pairs of\n * an optional DOM event name and a jsaction name. If the optional\n * DOM event name is omitted, 'click' is assumed. The jsaction names\n * are dot separated pairs of a namespace and a simple jsaction\n * name.\n *\n * See grammar in README.md for expected syntax in the attribute value.\n */\n JSACTION: 'jsaction' as const,\n};\n"],"names":["Attribute","JSACTION"],"mappings":";;;;;;AAQO,MAAMA,SAAS,GAAG;AAavBC,EAAAA,QAAQ,EAAE;;;;;"}
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license Angular v21.2.0-next.2
2
+ * @license Angular v21.2.0-next.3
3
3
  * (c) 2010-2026 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
6
6
 
7
- import { attachInjectFlag, _global, ɵɵdefineInjectable as __defineInjectable, ɵɵdefineInjector as __defineInjector, ɵɵinject as __inject, ɵɵinvalidFactoryDep as __invalidFactoryDep, resolveForwardRef, newArray, EMPTY_OBJ, assertString, assertNotEqual, FLAGS, assertEqual, isInCheckNoChangesMode, PREORDER_HOOK_FLAGS, assertFirstCreatePass, assertDefined, throwError, assertNumber, assertGreaterThan, HEADER_OFFSET, DECLARATION_VIEW, NG_FACTORY_DEF, isForwardRef, getFactoryDef, assertIndexInRange, assertTNodeForLView, enterDI, runInInjectorProfilerContext, getCurrentTNode, getLView, emitInjectorToCreateInstanceEvent, emitInstanceCreatedByInjectorEvent, throwProviderNotFoundError, leaveDI, assertNodeInjector, stringifyForError, cyclicDependencyErrorWithDetails, cyclicDependencyError, setInjectorProfilerContext, setInjectImplementation, assertDirectiveDef, NG_ELEMENT_ID, convertToBitFlags, isRootView, T_HOST, TVIEW, injectRootLimpMode, isComponentDef, EMBEDDED_VIEW_INJECTOR, INJECTOR$1 as INJECTOR, DECLARATION_COMPONENT_VIEW, isComponentHost, RuntimeError, NG_PROV_DEF, getClosureSafeProperty, getNativeByTNode, flatten, arrayEquals, ID, isLView, assertDomNode, unwrapRNode, getComponentLViewByIndex, CONTEXT, EMPTY_ARRAY, assertLView, HOST, CHILD_HEAD, NEXT, isLContainer, getLViewParent, Injector, CLEANUP, getComponentDef, getDirectiveDef, InjectionToken, inject, DOCUMENT as DOCUMENT$1, ENVIRONMENT_INITIALIZER, formatRuntimeError, isInSkipHydrationBlock as isInSkipHydrationBlock$1, HYDRATION, isContentQueryHost, setCurrentQueryIndex, isDirectiveHost, XSS_SECURITY_URL, RENDERER, renderStringify, getSelectedTNode, ENVIRONMENT, makeEnvironmentProviders, resetPreOrderHookFlags, PARENT, CHILD_TAIL, assertSame, assertFirstUpdatePass, getSelectedIndex, getTView, assertIndexInDeclRange, setSelectedIndex, NgZone, ChangeDetectionScheduler, ErrorHandler, AFTER_RENDER_SEQUENCES_TO_ADD, markAncestorsForTraversal, assertNotInReactiveContext, assertInInjectionContext, DestroyRef, ViewContext, EnvironmentInjector, assertLContainer, MOVED_VIEWS, isDestroyed, REACTIVE_TEMPLATE_CONSUMER, DECLARATION_LCONTAINER, QUERIES, assertNotReactive, ON_DESTROY_HOOKS, assertFunction, EFFECTS, assertProjectionSlots, NATIVE, ANIMATIONS, assertParentView, CONTAINER_HEADER_OFFSET, assertNotSame, setCurrentDirectiveIndex, setCurrentTNode, getElementDepthCount, increaseElementDepthCount, wasLastNodeCreated, isCurrentTNodeParent, setCurrentTNodeAsNotParent, assertHasParent, INTERNAL_APPLICATION_ERROR_HANDLER, stringify, getCurrentDirectiveIndex, unwrapLView, isCreationMode, enterView, leaveView, markViewForRefresh, setIsRefreshingViews, isExhaustiveCheckNoChanges, requiresRefreshOrTraversal, setIsInCheckNoChangesMode, CheckNoChangesMode, setBindingIndex, EFFECTS_TO_SCHEDULE, viewAttachedToChangeDetector, setBindingRootForHostBindings, isRefreshingViews, removeFromArray, addToArray, updateAncestorTraversalFlagsOnAttach, storeLViewOnDestroy, VIEW_REFS, assertGreaterThanOrEqual, isInI18nBlock, assertTNodeForTView, getCurrentParentTNode, getCurrentTNodePlaceholderOk, assertTNode, assertTIcu, assertNumberInRange, DEHYDRATED_VIEWS, getNgModuleDef, getPipeDef as getPipeDef$1, getNgModuleDefOrThrow, isStandalone, concatStringsWithSpace, assertInjectImplementationNotEqual, emitInjectEvent, getConstant, assertLessThan, getOrCreateTViewCleanup, getOrCreateLViewCleanup, debugStringifyTypeForError, assertNotDefined, nextBindingIndex, getDirectiveDefOrThrow, getTNode, assertComponentType, SVG_NAMESPACE, MATH_ML_NAMESPACE, viewAttachedToContainer, storeCleanupWithContext, signal, createInjectorWithoutInjectorInstances, R3Injector, getNullInjector, internalImportProvidersFrom, initNgDevMode, fillProperties, getBindingsEnabled, lastNodeWasCreated, removeLViewOnDestroy, walkUpViews, getNativeByIndex, assertElement, arrayInsert2, arraySplice, setInjectorProfiler, EffectRefImpl, NullInjector, INJECTOR_DEF_TYPES, walkProviderTree, getInjectorDef, deepForEach, isTypeProvider, isInInjectionContext, runInInjectionContext, ZONELESS_ENABLED, EffectScheduler, PendingTasksInternal, PendingTasks, assertTNodeCreationIndex, isSkipHydrationRootTNode, leaveSkipHydrationBlock, decreaseElementDepthCount, getNamespace, enterSkipHydrationBlock, getCurrentDirectiveDef, assertIndexInExpandoRange, getBindingIndex, assertOneOf, setInI18nBlock, nextContextImpl, getCurrentQueryIndex, getContextLView, load, keyValueArrayIndexOf, keyValueArraySet, keyValueArrayGet, incrementBindingIndex, store, getBindingRoot, providerToFactory, emitProviderConfiguredEvent, isClassProvider, NG_COMP_DEF, ɵɵresetView as __resetView, ɵɵnamespaceHTML as __namespaceHTML, ɵɵnamespaceMathML as __namespaceMathML, ɵɵnamespaceSVG as __namespaceSVG, ɵɵenableBindings as __enableBindings, ɵɵdisableBindings as __disableBindings, ɵɵrestoreView as __restoreView, forwardRef, NG_MOD_DEF, NG_INJ_DEF, NG_DIR_DEF, NG_PIPE_DEF, angularZoneInstanceIdProperty, SCHEDULE_IN_ROOT_ZONE, PROVIDED_ZONELESS, NoopNgZone, scheduleCallbackWithMicrotask, scheduleCallbackWithRafRace, getNativeByTNodeOrNull } from './_effect-chunk2.mjs';
7
+ import { attachInjectFlag, _global, ɵɵdefineInjectable as __defineInjectable, ɵɵdefineInjector as __defineInjector, ɵɵinject as __inject, ɵɵinvalidFactoryDep as __invalidFactoryDep, resolveForwardRef, newArray, EMPTY_OBJ, assertString, assertNotEqual, FLAGS, assertEqual, isInCheckNoChangesMode, PREORDER_HOOK_FLAGS, assertFirstCreatePass, assertDefined, throwError, assertNumber, assertGreaterThan, HEADER_OFFSET, DECLARATION_VIEW, NG_FACTORY_DEF, isForwardRef, getFactoryDef, assertIndexInRange, assertTNodeForLView, enterDI, runInInjectorProfilerContext, getCurrentTNode, getLView, emitInjectorToCreateInstanceEvent, emitInstanceCreatedByInjectorEvent, throwProviderNotFoundError, leaveDI, assertNodeInjector, stringifyForError, cyclicDependencyErrorWithDetails, cyclicDependencyError, setInjectorProfilerContext, setInjectImplementation, assertDirectiveDef, NG_ELEMENT_ID, convertToBitFlags, isRootView, T_HOST, TVIEW, injectRootLimpMode, isComponentDef, EMBEDDED_VIEW_INJECTOR, INJECTOR$1 as INJECTOR, DECLARATION_COMPONENT_VIEW, isComponentHost, RuntimeError, NG_PROV_DEF, getClosureSafeProperty, getNativeByTNode, flatten, arrayEquals, ID, isLView, assertDomNode, unwrapRNode, getComponentLViewByIndex, CONTEXT, EMPTY_ARRAY, assertLView, HOST, CHILD_HEAD, NEXT, isLContainer, getLViewParent, Injector, CLEANUP, getComponentDef, getDirectiveDef, InjectionToken, inject, DOCUMENT as DOCUMENT$1, ENVIRONMENT_INITIALIZER, formatRuntimeError, isInSkipHydrationBlock as isInSkipHydrationBlock$1, HYDRATION, isContentQueryHost, setCurrentQueryIndex, isDirectiveHost, XSS_SECURITY_URL, RENDERER, renderStringify, getSelectedTNode, ENVIRONMENT, makeEnvironmentProviders, resetPreOrderHookFlags, PARENT, CHILD_TAIL, assertSame, assertFirstUpdatePass, getSelectedIndex, getTView, assertIndexInDeclRange, setSelectedIndex, NgZone, ChangeDetectionScheduler, ErrorHandler, AFTER_RENDER_SEQUENCES_TO_ADD, markAncestorsForTraversal, assertNotInReactiveContext, assertInInjectionContext, DestroyRef, ViewContext, EnvironmentInjector, ANIMATIONS, INJECTOR as INJECTOR$1, CONTAINER_HEADER_OFFSET, assertLContainer, MOVED_VIEWS, isDestroyed, REACTIVE_TEMPLATE_CONSUMER, DECLARATION_LCONTAINER, QUERIES, assertNotReactive, ON_DESTROY_HOOKS, assertFunction, EFFECTS, assertProjectionSlots, NATIVE, assertParentView, assertNotSame, setCurrentDirectiveIndex, setCurrentTNode, getElementDepthCount, increaseElementDepthCount, wasLastNodeCreated, isCurrentTNodeParent, setCurrentTNodeAsNotParent, assertHasParent, INTERNAL_APPLICATION_ERROR_HANDLER, stringify, getCurrentDirectiveIndex, unwrapLView, isCreationMode, enterView, leaveView, markViewForRefresh, setIsRefreshingViews, isExhaustiveCheckNoChanges, requiresRefreshOrTraversal, setIsInCheckNoChangesMode, CheckNoChangesMode, setBindingIndex, EFFECTS_TO_SCHEDULE, viewAttachedToChangeDetector, setBindingRootForHostBindings, isRefreshingViews, removeFromArray, addToArray, updateAncestorTraversalFlagsOnAttach, storeLViewOnDestroy, VIEW_REFS, assertGreaterThanOrEqual, isInI18nBlock, assertTNodeForTView, getCurrentParentTNode, getCurrentTNodePlaceholderOk, assertTNode, assertTIcu, assertNumberInRange, DEHYDRATED_VIEWS, getNgModuleDef, getPipeDef as getPipeDef$1, getNgModuleDefOrThrow, isStandalone, concatStringsWithSpace, assertInjectImplementationNotEqual, emitInjectEvent, getConstant, assertLessThan, getOrCreateTViewCleanup, getOrCreateLViewCleanup, debugStringifyTypeForError, assertNotDefined, nextBindingIndex, getDirectiveDefOrThrow, getTNode, assertComponentType, SVG_NAMESPACE, MATH_ML_NAMESPACE, viewAttachedToContainer, storeCleanupWithContext, signal, createInjectorWithoutInjectorInstances, R3Injector, getNullInjector, internalImportProvidersFrom, initNgDevMode, fillProperties, getBindingsEnabled, lastNodeWasCreated, removeLViewOnDestroy, walkUpViews, getNativeByIndex, assertElement, arrayInsert2, arraySplice, setInjectorProfiler, EffectRefImpl, NullInjector, INJECTOR_DEF_TYPES, walkProviderTree, getInjectorDef, deepForEach, isTypeProvider, isInInjectionContext, runInInjectionContext, ZONELESS_ENABLED, EffectScheduler, PendingTasksInternal, PendingTasks, assertTNodeCreationIndex, isSkipHydrationRootTNode, leaveSkipHydrationBlock, decreaseElementDepthCount, getNamespace, enterSkipHydrationBlock, getCurrentDirectiveDef, assertIndexInExpandoRange, getBindingIndex, assertOneOf, setInI18nBlock, nextContextImpl, getCurrentQueryIndex, getContextLView, load, keyValueArrayIndexOf, keyValueArraySet, keyValueArrayGet, incrementBindingIndex, store, getBindingRoot, providerToFactory, emitProviderConfiguredEvent, isClassProvider, NG_COMP_DEF, ɵɵresetView as __resetView, ɵɵnamespaceHTML as __namespaceHTML, ɵɵnamespaceMathML as __namespaceMathML, ɵɵnamespaceSVG as __namespaceSVG, ɵɵenableBindings as __enableBindings, ɵɵdisableBindings as __disableBindings, ɵɵrestoreView as __restoreView, forwardRef, NG_MOD_DEF, NG_INJ_DEF, NG_DIR_DEF, NG_PIPE_DEF, angularZoneInstanceIdProperty, SCHEDULE_IN_ROOT_ZONE, PROVIDED_ZONELESS, NoopNgZone, scheduleCallbackWithMicrotask, scheduleCallbackWithRafRace, getNativeByTNodeOrNull } from './_effect-chunk2.mjs';
8
8
  import { setActiveConsumer, SIGNAL, consumerDestroy, REACTIVE_NODE, consumerPollProducersForChange, consumerBeforeComputation, getActiveConsumer, consumerAfterComputation, createComputed, setThrowInvalidWriteToSignalError } from './_effect-chunk.mjs';
9
9
  import { Subject, Subscription } from 'rxjs';
10
10
  import { setActiveConsumer as setActiveConsumer$1 } from '@angular/core/primitives/signals';
@@ -1141,7 +1141,7 @@ function lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundVa
1141
1141
  if (!parentTNode) {
1142
1142
  const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];
1143
1143
  if (embeddedViewInjector) {
1144
- const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);
1144
+ const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags & ~4);
1145
1145
  if (embeddedViewInjectorValue !== NOT_FOUND) {
1146
1146
  return embeddedViewInjectorValue;
1147
1147
  }
@@ -4304,11 +4304,14 @@ const NOOP_AFTER_RENDER_REF = {
4304
4304
 
4305
4305
  const ANIMATION_QUEUE = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'AnimationQueue' : '', {
4306
4306
  factory: () => {
4307
+ const injector = inject(EnvironmentInjector);
4308
+ const queue = new Set();
4309
+ injector.onDestroy(() => queue.clear());
4307
4310
  return {
4308
- queue: new Set(),
4311
+ queue,
4309
4312
  isScheduled: false,
4310
4313
  scheduler: null,
4311
- injector: inject(EnvironmentInjector)
4314
+ injector
4312
4315
  };
4313
4316
  }
4314
4317
  });
@@ -4376,6 +4379,138 @@ function maybeQueueEnterAnimation(parentLView, parent, tNode, injector) {
4376
4379
  queueEnterAnimations(injector, enterAnimations);
4377
4380
  }
4378
4381
  }
4382
+ function runLeaveAnimationsWithCallback(lView, tNode, injector, callback) {
4383
+ try {
4384
+ injector.get(INJECTOR$1);
4385
+ } catch {
4386
+ return callback(false);
4387
+ }
4388
+ const animations = lView?.[ANIMATIONS];
4389
+ if (animations?.enter?.has(tNode.index)) {
4390
+ removeAnimationsFromQueue(injector, animations.enter.get(tNode.index).animateFns);
4391
+ }
4392
+ const nodesWithExitAnimations = aggregateDescendantAnimations(lView, tNode, animations);
4393
+ if (nodesWithExitAnimations.size === 0) {
4394
+ let hasNestedAnimations = false;
4395
+ if (lView) {
4396
+ const nestedPromises = [];
4397
+ collectNestedViewAnimations(lView, tNode, nestedPromises);
4398
+ hasNestedAnimations = nestedPromises.length > 0;
4399
+ }
4400
+ if (!hasNestedAnimations) {
4401
+ return callback(false);
4402
+ }
4403
+ }
4404
+ if (lView) allLeavingAnimations.add(lView[ID]);
4405
+ addToAnimationQueue(injector, () => executeLeaveAnimations(lView, tNode, animations || undefined, nodesWithExitAnimations, callback), animations || undefined);
4406
+ }
4407
+ function aggregateDescendantAnimations(lView, tNode, animations) {
4408
+ const nodesWithExitAnimations = new Map();
4409
+ const leaveAnimations = animations?.leave;
4410
+ if (leaveAnimations && leaveAnimations.has(tNode.index)) {
4411
+ nodesWithExitAnimations.set(tNode.index, leaveAnimations.get(tNode.index));
4412
+ }
4413
+ if (lView && leaveAnimations) {
4414
+ for (const [index, animationData] of leaveAnimations) {
4415
+ if (nodesWithExitAnimations.has(index)) continue;
4416
+ const nestedTNode = lView[TVIEW].data[index];
4417
+ let parent = nestedTNode.parent;
4418
+ while (parent) {
4419
+ if (parent === tNode) {
4420
+ nodesWithExitAnimations.set(index, animationData);
4421
+ break;
4422
+ }
4423
+ parent = parent.parent;
4424
+ }
4425
+ }
4426
+ }
4427
+ return nodesWithExitAnimations;
4428
+ }
4429
+ function executeLeaveAnimations(lView, tNode, animations, nodesWithExitAnimations, callback) {
4430
+ const runningAnimations = [];
4431
+ if (animations && animations.leave) {
4432
+ for (const [index] of nodesWithExitAnimations) {
4433
+ if (!animations.leave.has(index)) continue;
4434
+ const currentAnimationData = animations.leave.get(index);
4435
+ for (const animationFn of currentAnimationData.animateFns) {
4436
+ const {
4437
+ promise
4438
+ } = animationFn();
4439
+ runningAnimations.push(promise);
4440
+ }
4441
+ animations.detachedLeaveAnimationFns = undefined;
4442
+ }
4443
+ }
4444
+ if (lView) {
4445
+ collectNestedViewAnimations(lView, tNode, runningAnimations);
4446
+ }
4447
+ if (runningAnimations.length > 0) {
4448
+ const currentAnimations = animations || lView?.[ANIMATIONS];
4449
+ if (currentAnimations) {
4450
+ const prevRunning = currentAnimations.running;
4451
+ if (prevRunning) {
4452
+ runningAnimations.push(prevRunning);
4453
+ }
4454
+ currentAnimations.running = Promise.allSettled(runningAnimations);
4455
+ runAfterLeaveAnimations(lView, currentAnimations.running, callback);
4456
+ } else {
4457
+ Promise.allSettled(runningAnimations).then(() => {
4458
+ if (lView) allLeavingAnimations.delete(lView[ID]);
4459
+ callback(true);
4460
+ });
4461
+ }
4462
+ } else {
4463
+ if (lView) allLeavingAnimations.delete(lView[ID]);
4464
+ callback(false);
4465
+ }
4466
+ }
4467
+ function collectNestedViewAnimations(lView, tNode, collectedPromises) {
4468
+ if (isComponentHost(tNode)) {
4469
+ const componentView = getComponentLViewByIndex(tNode.index, lView);
4470
+ collectAllViewLeaveAnimations(componentView, collectedPromises);
4471
+ } else if (tNode.type & 12) {
4472
+ const lContainer = lView[tNode.index];
4473
+ if (isLContainer(lContainer)) {
4474
+ for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
4475
+ const subView = lContainer[i];
4476
+ collectAllViewLeaveAnimations(subView, collectedPromises);
4477
+ }
4478
+ }
4479
+ }
4480
+ let child = tNode.child;
4481
+ while (child) {
4482
+ collectNestedViewAnimations(lView, child, collectedPromises);
4483
+ child = child.next;
4484
+ }
4485
+ }
4486
+ function collectAllViewLeaveAnimations(view, collectedPromises) {
4487
+ const animations = view[ANIMATIONS];
4488
+ if (animations && animations.leave) {
4489
+ for (const animationData of animations.leave.values()) {
4490
+ for (const animationFn of animationData.animateFns) {
4491
+ const {
4492
+ promise
4493
+ } = animationFn();
4494
+ collectedPromises.push(promise);
4495
+ }
4496
+ }
4497
+ }
4498
+ let child = view[TVIEW].firstChild;
4499
+ while (child) {
4500
+ collectNestedViewAnimations(view, child, collectedPromises);
4501
+ child = child.next;
4502
+ }
4503
+ }
4504
+ function runAfterLeaveAnimations(lView, runningAnimations, callback) {
4505
+ runningAnimations.then(() => {
4506
+ if (lView[ANIMATIONS]?.running === runningAnimations) {
4507
+ lView[ANIMATIONS].running = undefined;
4508
+ allLeavingAnimations.delete(lView[ID]);
4509
+ }
4510
+ callback(true);
4511
+ });
4512
+ }
4513
+
4379
4514
  function applyToElementOrContainer(action, renderer, injector, parent, lNodeToHandle, tNode, beforeNode, parentLView) {
4380
4515
  if (lNodeToHandle != null) {
4381
4516
  let lContainer;
@@ -4502,48 +4637,6 @@ function cleanUpView(tView, lView) {
4502
4637
  setActiveConsumer(prevConsumer);
4503
4638
  }
4504
4639
  }
4505
- function runLeaveAnimationsWithCallback(lView, tNode, injector, callback) {
4506
- const animations = lView?.[ANIMATIONS];
4507
- if (animations?.enter?.has(tNode.index)) {
4508
- removeAnimationsFromQueue(injector, animations.enter.get(tNode.index).animateFns);
4509
- }
4510
- if (animations == null || animations.leave == undefined || !animations.leave.has(tNode.index)) return callback(false);
4511
- if (lView) allLeavingAnimations.add(lView[ID]);
4512
- addToAnimationQueue(injector, () => {
4513
- if (animations.leave && animations.leave.has(tNode.index)) {
4514
- const leaveAnimationMap = animations.leave;
4515
- const leaveAnimations = leaveAnimationMap.get(tNode.index);
4516
- const runningAnimations = [];
4517
- if (leaveAnimations) {
4518
- for (let index = 0; index < leaveAnimations.animateFns.length; index++) {
4519
- const animationFn = leaveAnimations.animateFns[index];
4520
- const {
4521
- promise
4522
- } = animationFn();
4523
- runningAnimations.push(promise);
4524
- }
4525
- animations.detachedLeaveAnimationFns = undefined;
4526
- }
4527
- animations.running = Promise.allSettled(runningAnimations);
4528
- runAfterLeaveAnimations(lView, callback);
4529
- } else {
4530
- if (lView) allLeavingAnimations.delete(lView[ID]);
4531
- callback(false);
4532
- }
4533
- }, animations);
4534
- }
4535
- function runAfterLeaveAnimations(lView, callback) {
4536
- const runningAnimations = lView[ANIMATIONS]?.running;
4537
- if (runningAnimations) {
4538
- runningAnimations.then(() => {
4539
- lView[ANIMATIONS].running = undefined;
4540
- allLeavingAnimations.delete(lView[ID]);
4541
- callback(true);
4542
- });
4543
- return;
4544
- }
4545
- callback(false);
4546
- }
4547
4640
  function processCleanups(tView, lView) {
4548
4641
  ngDevMode && assertNotReactive(processCleanups.name);
4549
4642
  const tCleanup = tView.cleanup;
@@ -8459,7 +8552,7 @@ class ComponentFactory extends ComponentFactory$1 {
8459
8552
  }
8460
8553
  }
8461
8554
  function createRootTView(rootSelectorOrNode, componentDef, componentBindings, directives) {
8462
- const tAttributes = rootSelectorOrNode ? ['ng-version', '21.2.0-next.2'] : extractAttrsAndClassesFromSelector(componentDef.selectors[0]);
8555
+ const tAttributes = rootSelectorOrNode ? ['ng-version', '21.2.0-next.3'] : extractAttrsAndClassesFromSelector(componentDef.selectors[0]);
8463
8556
  let creationBindings = null;
8464
8557
  let updateBindings = null;
8465
8558
  let varsToAllocate = 0;
@@ -13213,16 +13306,16 @@ function ɵɵanimateEnter(value) {
13213
13306
  }
13214
13307
  const tNode = getCurrentTNode();
13215
13308
  cancelLeavingNodes(tNode, lView);
13216
- addAnimationToLView(getLViewEnterAnimations(lView), tNode, () => runEnterAnimation(lView, tNode, value));
13309
+ const ngZone = lView[INJECTOR].get(NgZone);
13310
+ addAnimationToLView(getLViewEnterAnimations(lView), tNode, () => runEnterAnimation(lView, tNode, value, ngZone));
13217
13311
  initializeAnimationQueueScheduler(lView[INJECTOR]);
13218
13312
  queueEnterAnimations(lView[INJECTOR], getLViewEnterAnimations(lView));
13219
13313
  return ɵɵanimateEnter;
13220
13314
  }
13221
- function runEnterAnimation(lView, tNode, value) {
13315
+ function runEnterAnimation(lView, tNode, value, ngZone) {
13222
13316
  const nativeElement = getNativeByTNode(tNode, lView);
13223
13317
  ngDevMode && assertElementNodes(nativeElement, 'animate.enter');
13224
13318
  const renderer = lView[RENDERER];
13225
- const ngZone = lView[INJECTOR].get(NgZone);
13226
13319
  const activeClasses = getClassListFromValue(value);
13227
13320
  const cleanupFns = [];
13228
13321
  const handleEnterAnimationStart = event => {
@@ -13307,11 +13400,12 @@ function ɵɵanimateLeave(value) {
13307
13400
  }
13308
13401
  const tNode = getCurrentTNode();
13309
13402
  cancelLeavingNodes(tNode, lView);
13310
- addAnimationToLView(getLViewLeaveAnimations(lView), tNode, () => runLeaveAnimations(lView, tNode, value));
13403
+ const ngZone = lView[INJECTOR].get(NgZone);
13404
+ addAnimationToLView(getLViewLeaveAnimations(lView), tNode, () => runLeaveAnimations(lView, tNode, value, ngZone));
13311
13405
  initializeAnimationQueueScheduler(lView[INJECTOR]);
13312
13406
  return ɵɵanimateLeave;
13313
13407
  }
13314
- function runLeaveAnimations(lView, tNode, value) {
13408
+ function runLeaveAnimations(lView, tNode, value, ngZone) {
13315
13409
  const {
13316
13410
  promise,
13317
13411
  resolve
@@ -13319,7 +13413,6 @@ function runLeaveAnimations(lView, tNode, value) {
13319
13413
  const nativeElement = getNativeByTNode(tNode, lView);
13320
13414
  ngDevMode && assertElementNodes(nativeElement, 'animate.leave');
13321
13415
  const renderer = lView[RENDERER];
13322
- const ngZone = lView[INJECTOR].get(NgZone);
13323
13416
  allLeavingAnimations.add(lView[ID]);
13324
13417
  (getLViewLeaveAnimations(lView).get(tNode.index).resolvers ??= []).push(resolve);
13325
13418
  const activeClasses = getClassListFromValue(value);
@@ -13381,11 +13474,13 @@ function ɵɵanimateLeaveListener(value) {
13381
13474
  const tNode = getCurrentTNode();
13382
13475
  cancelLeavingNodes(tNode, lView);
13383
13476
  allLeavingAnimations.add(lView[ID]);
13384
- addAnimationToLView(getLViewLeaveAnimations(lView), tNode, () => runLeaveAnimationFunction(lView, tNode, value));
13477
+ const ngZone = lView[INJECTOR].get(NgZone);
13478
+ const maxAnimationTimeout = lView[INJECTOR].get(MAX_ANIMATION_TIMEOUT);
13479
+ addAnimationToLView(getLViewLeaveAnimations(lView), tNode, () => runLeaveAnimationFunction(lView, tNode, value, ngZone, maxAnimationTimeout));
13385
13480
  initializeAnimationQueueScheduler(lView[INJECTOR]);
13386
13481
  return ɵɵanimateLeaveListener;
13387
13482
  }
13388
- function runLeaveAnimationFunction(lView, tNode, value) {
13483
+ function runLeaveAnimationFunction(lView, tNode, value, ngZone, maxAnimationTimeout) {
13389
13484
  const {
13390
13485
  promise,
13391
13486
  resolve
@@ -13395,8 +13490,6 @@ function runLeaveAnimationFunction(lView, tNode, value) {
13395
13490
  const cleanupFns = [];
13396
13491
  const renderer = lView[RENDERER];
13397
13492
  const animationsDisabled = areAnimationsDisabled(lView);
13398
- const ngZone = lView[INJECTOR].get(NgZone);
13399
- const maxAnimationTimeout = lView[INJECTOR].get(MAX_ANIMATION_TIMEOUT);
13400
13493
  (getLViewLeaveAnimations(lView).get(tNode.index).resolvers ??= []).push(resolve);
13401
13494
  const resolvers = getLViewLeaveAnimations(lView).get(tNode.index)?.resolvers;
13402
13495
  if (animationsDisabled) {