@angular/core 21.2.0-next.3 → 21.2.0-rc.0
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/_attribute-chunk.mjs +1 -1
- package/fesm2022/_attribute-chunk.mjs.map +1 -1
- package/fesm2022/_debug_node-chunk.mjs +184 -178
- package/fesm2022/_debug_node-chunk.mjs.map +1 -1
- package/fesm2022/_effect-chunk.mjs +1 -1
- package/fesm2022/_effect-chunk.mjs.map +1 -1
- package/fesm2022/_effect-chunk2.mjs +2 -2
- package/fesm2022/_effect-chunk2.mjs.map +1 -1
- package/fesm2022/_not_found-chunk.mjs +1 -1
- package/fesm2022/_not_found-chunk.mjs.map +1 -1
- package/fesm2022/_resource-chunk.mjs +1 -1
- package/fesm2022/_resource-chunk.mjs.map +1 -1
- package/fesm2022/_untracked-chunk.mjs +1 -1
- package/fesm2022/_untracked-chunk.mjs.map +1 -1
- package/fesm2022/_weak_ref-chunk.mjs +1 -1
- package/fesm2022/_weak_ref-chunk.mjs.map +1 -1
- package/fesm2022/core.mjs +3 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives-di.mjs +1 -1
- package/fesm2022/primitives-di.mjs.map +1 -1
- package/fesm2022/primitives-event-dispatch.mjs +1 -1
- package/fesm2022/primitives-event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives-signals.mjs +1 -1
- package/fesm2022/primitives-signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/fesm2022/testing.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +1 -1
- package/schematics/bundles/application-config-core.cjs +1 -1
- package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
- package/schematics/bundles/bootstrap-options-migration.cjs +1 -1
- package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
- package/schematics/bundles/common-to-standalone-migration.cjs +1 -1
- package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
- package/schematics/bundles/control-flow-migration.cjs +1 -1
- package/schematics/bundles/imports-CVmcbVA9.cjs +1 -1
- package/schematics/bundles/index-BtLcQH8g.cjs +1 -1
- package/schematics/bundles/inject-migration.cjs +1 -1
- package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
- package/schematics/bundles/migrate_ts_type_references-MWoZx-Cb.cjs +1 -1
- package/schematics/bundles/ng_component_template-BOuKAnQd.cjs +1 -1
- package/schematics/bundles/ng_decorators-DYy6II6x.cjs +1 -1
- package/schematics/bundles/ngclass-to-class-migration.cjs +1 -1
- package/schematics/bundles/ngstyle-to-style-migration.cjs +1 -1
- package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +1 -1
- package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
- package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
- package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
- package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +1 -1
- package/schematics/bundles/router-current-navigation.cjs +1 -1
- package/schematics/bundles/router-last-successful-navigation.cjs +1 -1
- package/schematics/bundles/router-testing-module-migration.cjs +1 -1
- package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
- package/schematics/bundles/signal-input-migration.cjs +1 -1
- package/schematics/bundles/signal-queries-migration.cjs +1 -1
- package/schematics/bundles/signals.cjs +1 -1
- package/schematics/bundles/standalone-migration.cjs +1 -1
- package/schematics/bundles/symbol-DZeHSR-V.cjs +1 -1
- package/types/_api-chunk.d.ts +1 -1
- package/types/_chrome_dev_tools_performance-chunk.d.ts +1 -1
- package/types/_discovery-chunk.d.ts +8 -8
- package/types/_effect-chunk.d.ts +1 -1
- package/types/_event_dispatcher-chunk.d.ts +1 -1
- package/types/_formatter-chunk.d.ts +1 -1
- package/types/_weak_ref-chunk.d.ts +1 -1
- package/types/core.d.ts +2 -2
- package/types/primitives-di.d.ts +1 -1
- package/types/primitives-event-dispatch.d.ts +1 -1
- package/types/primitives-signals.d.ts +1 -1
- package/types/rxjs-interop.d.ts +1 -1
- package/types/testing.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_attribute-chunk.mjs","sources":["../../../../../
|
|
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,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.2.0-
|
|
2
|
+
* @license Angular v21.2.0-rc.0
|
|
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,
|
|
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, stringify, ANIMATIONS, NgZone, ChangeDetectionScheduler, ErrorHandler, AFTER_RENDER_SEQUENCES_TO_ADD, markAncestorsForTraversal, assertNotInReactiveContext, assertInInjectionContext, DestroyRef, ViewContext, EnvironmentInjector, 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, 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';
|
|
@@ -1443,8 +1443,8 @@ function isI18nInSkipHydrationBlock(parentTNode) {
|
|
|
1443
1443
|
var ChangeDetectionStrategy;
|
|
1444
1444
|
(function (ChangeDetectionStrategy) {
|
|
1445
1445
|
ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush";
|
|
1446
|
-
ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
|
|
1447
1446
|
ChangeDetectionStrategy[ChangeDetectionStrategy["Eager"] = 1] = "Eager";
|
|
1447
|
+
ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
|
|
1448
1448
|
})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));
|
|
1449
1449
|
|
|
1450
1450
|
const TRACKED_LVIEWS = new Map();
|
|
@@ -1813,7 +1813,7 @@ function getDirectiveMetadata$1(directiveOrComponentInstance) {
|
|
|
1813
1813
|
inputs,
|
|
1814
1814
|
outputs: componentDef.outputs,
|
|
1815
1815
|
encapsulation: componentDef.encapsulation,
|
|
1816
|
-
changeDetection: componentDef.onPush ? ChangeDetectionStrategy.OnPush : ChangeDetectionStrategy.
|
|
1816
|
+
changeDetection: componentDef.onPush ? ChangeDetectionStrategy.OnPush : ChangeDetectionStrategy.Eager
|
|
1817
1817
|
};
|
|
1818
1818
|
}
|
|
1819
1819
|
const directiveDef = getDirectiveDef(constructor);
|
|
@@ -3994,6 +3994,163 @@ function ensureIcuContainerVisitorLoaded(loader) {
|
|
|
3994
3994
|
}
|
|
3995
3995
|
}
|
|
3996
3996
|
|
|
3997
|
+
const ANIMATIONS_DISABLED = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'AnimationsDisabled' : '', {
|
|
3998
|
+
factory: () => false
|
|
3999
|
+
});
|
|
4000
|
+
const MAX_ANIMATION_TIMEOUT = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'MaxAnimationTimeout' : '', {
|
|
4001
|
+
factory: () => MAX_ANIMATION_TIMEOUT_DEFAULT
|
|
4002
|
+
});
|
|
4003
|
+
const MAX_ANIMATION_TIMEOUT_DEFAULT = 4000;
|
|
4004
|
+
|
|
4005
|
+
const DEFAULT_ANIMATIONS_DISABLED = false;
|
|
4006
|
+
const areAnimationSupported = (typeof ngServerMode === 'undefined' || !ngServerMode) && typeof document !== 'undefined' && typeof document?.documentElement?.getAnimations === 'function';
|
|
4007
|
+
function areAnimationsDisabled(lView) {
|
|
4008
|
+
const injector = lView[INJECTOR];
|
|
4009
|
+
return injector.get(ANIMATIONS_DISABLED, DEFAULT_ANIMATIONS_DISABLED);
|
|
4010
|
+
}
|
|
4011
|
+
function assertAnimationTypes(value, instruction) {
|
|
4012
|
+
if (value == null || typeof value !== 'string' && typeof value !== 'function') {
|
|
4013
|
+
throw new RuntimeError(650, `'${instruction}' value must be a string of CSS classes or an animation function, got ${stringify(value)}`);
|
|
4014
|
+
}
|
|
4015
|
+
}
|
|
4016
|
+
function assertElementNodes(nativeElement, instruction) {
|
|
4017
|
+
if (nativeElement.nodeType !== Node.ELEMENT_NODE) {
|
|
4018
|
+
throw new RuntimeError(650, `'${instruction}' can only be used on an element node, got ${stringify(nativeElement.nodeType)}`);
|
|
4019
|
+
}
|
|
4020
|
+
}
|
|
4021
|
+
function trackEnterClasses(el, classList, cleanupFns) {
|
|
4022
|
+
const elementData = enterClassMap.get(el);
|
|
4023
|
+
if (elementData) {
|
|
4024
|
+
for (const klass of classList) {
|
|
4025
|
+
elementData.classList.push(klass);
|
|
4026
|
+
}
|
|
4027
|
+
for (const fn of cleanupFns) {
|
|
4028
|
+
elementData.cleanupFns.push(fn);
|
|
4029
|
+
}
|
|
4030
|
+
} else {
|
|
4031
|
+
enterClassMap.set(el, {
|
|
4032
|
+
classList,
|
|
4033
|
+
cleanupFns
|
|
4034
|
+
});
|
|
4035
|
+
}
|
|
4036
|
+
}
|
|
4037
|
+
function cleanupEnterClassData(element) {
|
|
4038
|
+
const elementData = enterClassMap.get(element);
|
|
4039
|
+
if (elementData) {
|
|
4040
|
+
for (const fn of elementData.cleanupFns) {
|
|
4041
|
+
fn();
|
|
4042
|
+
}
|
|
4043
|
+
enterClassMap.delete(element);
|
|
4044
|
+
}
|
|
4045
|
+
longestAnimations.delete(element);
|
|
4046
|
+
}
|
|
4047
|
+
const noOpAnimationComplete = () => {};
|
|
4048
|
+
const enterClassMap = new WeakMap();
|
|
4049
|
+
const longestAnimations = new WeakMap();
|
|
4050
|
+
const leavingNodes = new WeakMap();
|
|
4051
|
+
function clearLeavingNodes(tNode, el) {
|
|
4052
|
+
const nodes = leavingNodes.get(tNode);
|
|
4053
|
+
if (nodes && nodes.length > 0) {
|
|
4054
|
+
const ix = nodes.findIndex(node => node === el);
|
|
4055
|
+
if (ix > -1) nodes.splice(ix, 1);
|
|
4056
|
+
}
|
|
4057
|
+
if (nodes?.length === 0) {
|
|
4058
|
+
leavingNodes.delete(tNode);
|
|
4059
|
+
}
|
|
4060
|
+
}
|
|
4061
|
+
function cancelLeavingNodes(tNode, newElement) {
|
|
4062
|
+
const nodes = leavingNodes.get(tNode);
|
|
4063
|
+
if (!nodes || nodes.length === 0) return;
|
|
4064
|
+
const newParent = newElement.parentNode;
|
|
4065
|
+
const prevSibling = newElement.previousSibling;
|
|
4066
|
+
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
4067
|
+
const leavingEl = nodes[i];
|
|
4068
|
+
const leavingParent = leavingEl.parentNode;
|
|
4069
|
+
if (prevSibling && leavingEl === prevSibling || leavingParent && newParent && leavingParent !== newParent) {
|
|
4070
|
+
nodes.splice(i, 1);
|
|
4071
|
+
leavingEl.dispatchEvent(new CustomEvent('animationend', {
|
|
4072
|
+
detail: {
|
|
4073
|
+
cancel: true
|
|
4074
|
+
}
|
|
4075
|
+
}));
|
|
4076
|
+
leavingEl.parentNode?.removeChild(leavingEl);
|
|
4077
|
+
}
|
|
4078
|
+
}
|
|
4079
|
+
}
|
|
4080
|
+
function trackLeavingNodes(tNode, el) {
|
|
4081
|
+
const nodes = leavingNodes.get(tNode);
|
|
4082
|
+
if (nodes) {
|
|
4083
|
+
if (!nodes.includes(el)) {
|
|
4084
|
+
nodes.push(el);
|
|
4085
|
+
}
|
|
4086
|
+
} else {
|
|
4087
|
+
leavingNodes.set(tNode, [el]);
|
|
4088
|
+
}
|
|
4089
|
+
}
|
|
4090
|
+
function getLViewEnterAnimations(lView) {
|
|
4091
|
+
const animationData = lView[ANIMATIONS] ??= {};
|
|
4092
|
+
return animationData.enter ??= new Map();
|
|
4093
|
+
}
|
|
4094
|
+
function getLViewLeaveAnimations(lView) {
|
|
4095
|
+
const animationData = lView[ANIMATIONS] ??= {};
|
|
4096
|
+
return animationData.leave ??= new Map();
|
|
4097
|
+
}
|
|
4098
|
+
function getClassListFromValue(value) {
|
|
4099
|
+
const classes = typeof value === 'function' ? value() : value;
|
|
4100
|
+
let classList = Array.isArray(classes) ? classes : null;
|
|
4101
|
+
if (typeof classes === 'string') {
|
|
4102
|
+
classList = classes.trim().split(/\s+/).filter(k => k);
|
|
4103
|
+
}
|
|
4104
|
+
return classList;
|
|
4105
|
+
}
|
|
4106
|
+
function cancelAnimationsIfRunning(element, renderer) {
|
|
4107
|
+
if (!areAnimationSupported) return;
|
|
4108
|
+
const elementData = enterClassMap.get(element);
|
|
4109
|
+
if (elementData && elementData.classList.length > 0 && elementHasClassList(element, elementData.classList)) {
|
|
4110
|
+
for (const klass of elementData.classList) {
|
|
4111
|
+
renderer.removeClass(element, klass);
|
|
4112
|
+
}
|
|
4113
|
+
}
|
|
4114
|
+
cleanupEnterClassData(element);
|
|
4115
|
+
}
|
|
4116
|
+
function elementHasClassList(element, classList) {
|
|
4117
|
+
for (const className of classList) {
|
|
4118
|
+
if (element.classList.contains(className)) return true;
|
|
4119
|
+
}
|
|
4120
|
+
return false;
|
|
4121
|
+
}
|
|
4122
|
+
function isLongestAnimation(event, nativeElement) {
|
|
4123
|
+
const longestAnimation = longestAnimations.get(nativeElement);
|
|
4124
|
+
if (longestAnimation === undefined) return true;
|
|
4125
|
+
return nativeElement === event.target && (longestAnimation.animationName !== undefined && event.animationName === longestAnimation.animationName || longestAnimation.propertyName !== undefined && event.propertyName === longestAnimation.propertyName);
|
|
4126
|
+
}
|
|
4127
|
+
function addAnimationToLView(animations, tNode, fn) {
|
|
4128
|
+
const nodeAnimations = animations.get(tNode.index) ?? {
|
|
4129
|
+
animateFns: []
|
|
4130
|
+
};
|
|
4131
|
+
nodeAnimations.animateFns.push(fn);
|
|
4132
|
+
animations.set(tNode.index, nodeAnimations);
|
|
4133
|
+
}
|
|
4134
|
+
function cleanupAfterLeaveAnimations(resolvers, cleanupFns) {
|
|
4135
|
+
if (resolvers) {
|
|
4136
|
+
for (const fn of resolvers) {
|
|
4137
|
+
fn();
|
|
4138
|
+
}
|
|
4139
|
+
}
|
|
4140
|
+
for (const fn of cleanupFns) {
|
|
4141
|
+
fn();
|
|
4142
|
+
}
|
|
4143
|
+
}
|
|
4144
|
+
function clearLViewNodeAnimationResolvers(lView, tNode) {
|
|
4145
|
+
const nodeAnimations = getLViewLeaveAnimations(lView).get(tNode.index);
|
|
4146
|
+
if (nodeAnimations) nodeAnimations.resolvers = undefined;
|
|
4147
|
+
}
|
|
4148
|
+
function leaveAnimationFunctionCleanup(lView, tNode, nativeElement, resolvers, cleanupFns) {
|
|
4149
|
+
clearLeavingNodes(tNode, nativeElement);
|
|
4150
|
+
cleanupAfterLeaveAnimations(resolvers, cleanupFns);
|
|
4151
|
+
clearLViewNodeAnimationResolvers(lView, tNode);
|
|
4152
|
+
}
|
|
4153
|
+
|
|
3997
4154
|
function parseCssTimeUnitsToMs(value) {
|
|
3998
4155
|
if (!value) return 0;
|
|
3999
4156
|
const multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;
|
|
@@ -4362,16 +4519,6 @@ function queueEnterAnimations(injector, enterAnimations) {
|
|
|
4362
4519
|
addToAnimationQueue(injector, nodeAnimations.animateFns);
|
|
4363
4520
|
}
|
|
4364
4521
|
}
|
|
4365
|
-
function removeAnimationsFromQueue(injector, animationFns) {
|
|
4366
|
-
const animationQueue = injector.get(ANIMATION_QUEUE);
|
|
4367
|
-
if (Array.isArray(animationFns)) {
|
|
4368
|
-
for (const animateFn of animationFns) {
|
|
4369
|
-
animationQueue.queue.delete(animateFn);
|
|
4370
|
-
}
|
|
4371
|
-
} else {
|
|
4372
|
-
animationQueue.queue.delete(animationFns);
|
|
4373
|
-
}
|
|
4374
|
-
}
|
|
4375
4522
|
|
|
4376
4523
|
function maybeQueueEnterAnimation(parentLView, parent, tNode, injector) {
|
|
4377
4524
|
const enterAnimations = parentLView?.[ANIMATIONS]?.enter;
|
|
@@ -4386,9 +4533,6 @@ function runLeaveAnimationsWithCallback(lView, tNode, injector, callback) {
|
|
|
4386
4533
|
return callback(false);
|
|
4387
4534
|
}
|
|
4388
4535
|
const animations = lView?.[ANIMATIONS];
|
|
4389
|
-
if (animations?.enter?.has(tNode.index)) {
|
|
4390
|
-
removeAnimationsFromQueue(injector, animations.enter.get(tNode.index).animateFns);
|
|
4391
|
-
}
|
|
4392
4536
|
const nodesWithExitAnimations = aggregateDescendantAnimations(lView, tNode, animations);
|
|
4393
4537
|
if (nodesWithExitAnimations.size === 0) {
|
|
4394
4538
|
let hasNestedAnimations = false;
|
|
@@ -4533,7 +4677,11 @@ function applyToElementOrContainer(action, renderer, injector, parent, lNodeToHa
|
|
|
4533
4677
|
} else if (action === 1 && parent !== null) {
|
|
4534
4678
|
maybeQueueEnterAnimation(parentLView, parent, tNode, injector);
|
|
4535
4679
|
nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);
|
|
4680
|
+
cancelLeavingNodes(tNode, rNode);
|
|
4536
4681
|
} else if (action === 2) {
|
|
4682
|
+
if (parentLView?.[ANIMATIONS]?.leave?.has(tNode.index)) {
|
|
4683
|
+
trackLeavingNodes(tNode, rNode);
|
|
4684
|
+
}
|
|
4537
4685
|
runLeaveAnimationsWithCallback(parentLView, tNode, injector, nodeHasLeaveAnimations => {
|
|
4538
4686
|
nativeRemoveNode(renderer, rNode, isComponent, nodeHasLeaveAnimations);
|
|
4539
4687
|
});
|
|
@@ -8254,13 +8402,25 @@ class ControlDirectiveHostImpl {
|
|
|
8254
8402
|
}
|
|
8255
8403
|
setInputOnDirectives(inputName, value) {
|
|
8256
8404
|
const directiveIndices = this.tNode.inputs?.[inputName];
|
|
8257
|
-
|
|
8405
|
+
const hostDirectiveInputs = this.tNode.hostDirectiveInputs?.[inputName];
|
|
8406
|
+
if (!directiveIndices && !hostDirectiveInputs) {
|
|
8258
8407
|
return false;
|
|
8259
8408
|
}
|
|
8260
|
-
|
|
8261
|
-
const
|
|
8262
|
-
|
|
8263
|
-
|
|
8409
|
+
if (directiveIndices) {
|
|
8410
|
+
for (const index of directiveIndices) {
|
|
8411
|
+
const directiveDef = this.tView.data[index];
|
|
8412
|
+
const directive = this.lView[index];
|
|
8413
|
+
writeToDirectiveInput(directiveDef, directive, inputName, value);
|
|
8414
|
+
}
|
|
8415
|
+
}
|
|
8416
|
+
if (hostDirectiveInputs) {
|
|
8417
|
+
for (let i = 0; i < hostDirectiveInputs.length; i += 2) {
|
|
8418
|
+
const index = hostDirectiveInputs[i];
|
|
8419
|
+
const internalName = hostDirectiveInputs[i + 1];
|
|
8420
|
+
const directiveDef = this.tView.data[index];
|
|
8421
|
+
const directive = this.lView[index];
|
|
8422
|
+
writeToDirectiveInput(directiveDef, directive, internalName, value);
|
|
8423
|
+
}
|
|
8264
8424
|
}
|
|
8265
8425
|
return true;
|
|
8266
8426
|
}
|
|
@@ -8552,7 +8712,7 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
8552
8712
|
}
|
|
8553
8713
|
}
|
|
8554
8714
|
function createRootTView(rootSelectorOrNode, componentDef, componentBindings, directives) {
|
|
8555
|
-
const tAttributes = rootSelectorOrNode ? ['ng-version', '21.2.0-
|
|
8715
|
+
const tAttributes = rootSelectorOrNode ? ['ng-version', '21.2.0-rc.0'] : extractAttrsAndClassesFromSelector(componentDef.selectors[0]);
|
|
8556
8716
|
let creationBindings = null;
|
|
8557
8717
|
let updateBindings = null;
|
|
8558
8718
|
let varsToAllocate = 0;
|
|
@@ -13144,156 +13304,6 @@ function ɵɵattribute(name, value, sanitizer, namespace) {
|
|
|
13144
13304
|
return ɵɵattribute;
|
|
13145
13305
|
}
|
|
13146
13306
|
|
|
13147
|
-
const ANIMATIONS_DISABLED = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'AnimationsDisabled' : '', {
|
|
13148
|
-
factory: () => false
|
|
13149
|
-
});
|
|
13150
|
-
const MAX_ANIMATION_TIMEOUT = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'MaxAnimationTimeout' : '', {
|
|
13151
|
-
factory: () => MAX_ANIMATION_TIMEOUT_DEFAULT
|
|
13152
|
-
});
|
|
13153
|
-
const MAX_ANIMATION_TIMEOUT_DEFAULT = 4000;
|
|
13154
|
-
|
|
13155
|
-
const DEFAULT_ANIMATIONS_DISABLED = false;
|
|
13156
|
-
const areAnimationSupported = (typeof ngServerMode === 'undefined' || !ngServerMode) && typeof document !== 'undefined' && typeof document?.documentElement?.getAnimations === 'function';
|
|
13157
|
-
function areAnimationsDisabled(lView) {
|
|
13158
|
-
const injector = lView[INJECTOR];
|
|
13159
|
-
return injector.get(ANIMATIONS_DISABLED, DEFAULT_ANIMATIONS_DISABLED);
|
|
13160
|
-
}
|
|
13161
|
-
function assertAnimationTypes(value, instruction) {
|
|
13162
|
-
if (value == null || typeof value !== 'string' && typeof value !== 'function') {
|
|
13163
|
-
throw new RuntimeError(650, `'${instruction}' value must be a string of CSS classes or an animation function, got ${stringify(value)}`);
|
|
13164
|
-
}
|
|
13165
|
-
}
|
|
13166
|
-
function assertElementNodes(nativeElement, instruction) {
|
|
13167
|
-
if (nativeElement.nodeType !== Node.ELEMENT_NODE) {
|
|
13168
|
-
throw new RuntimeError(650, `'${instruction}' can only be used on an element node, got ${stringify(nativeElement.nodeType)}`);
|
|
13169
|
-
}
|
|
13170
|
-
}
|
|
13171
|
-
function trackEnterClasses(el, classList, cleanupFns) {
|
|
13172
|
-
const elementData = enterClassMap.get(el);
|
|
13173
|
-
if (elementData) {
|
|
13174
|
-
for (const klass of classList) {
|
|
13175
|
-
elementData.classList.push(klass);
|
|
13176
|
-
}
|
|
13177
|
-
for (const fn of cleanupFns) {
|
|
13178
|
-
elementData.cleanupFns.push(fn);
|
|
13179
|
-
}
|
|
13180
|
-
} else {
|
|
13181
|
-
enterClassMap.set(el, {
|
|
13182
|
-
classList,
|
|
13183
|
-
cleanupFns
|
|
13184
|
-
});
|
|
13185
|
-
}
|
|
13186
|
-
}
|
|
13187
|
-
function cleanupEnterClassData(element) {
|
|
13188
|
-
const elementData = enterClassMap.get(element);
|
|
13189
|
-
if (elementData) {
|
|
13190
|
-
for (const fn of elementData.cleanupFns) {
|
|
13191
|
-
fn();
|
|
13192
|
-
}
|
|
13193
|
-
enterClassMap.delete(element);
|
|
13194
|
-
}
|
|
13195
|
-
longestAnimations.delete(element);
|
|
13196
|
-
}
|
|
13197
|
-
const noOpAnimationComplete = () => {};
|
|
13198
|
-
const enterClassMap = new WeakMap();
|
|
13199
|
-
const longestAnimations = new WeakMap();
|
|
13200
|
-
const leavingNodes = new WeakMap();
|
|
13201
|
-
function clearLeavingNodes(tNode, el) {
|
|
13202
|
-
const nodes = leavingNodes.get(tNode);
|
|
13203
|
-
if (nodes && nodes.length > 0) {
|
|
13204
|
-
const ix = nodes.findIndex(node => node === el);
|
|
13205
|
-
if (ix > -1) nodes.splice(ix, 1);
|
|
13206
|
-
}
|
|
13207
|
-
if (nodes?.length === 0) {
|
|
13208
|
-
leavingNodes.delete(tNode);
|
|
13209
|
-
}
|
|
13210
|
-
}
|
|
13211
|
-
function cancelLeavingNodes(tNode, lView) {
|
|
13212
|
-
const leavingEl = leavingNodes.get(tNode)?.shift();
|
|
13213
|
-
const lContainer = lView[DECLARATION_LCONTAINER];
|
|
13214
|
-
if (lContainer) {
|
|
13215
|
-
const beforeNode = getBeforeNodeForView(tNode.index, lContainer);
|
|
13216
|
-
const previousNode = beforeNode?.previousSibling;
|
|
13217
|
-
if (leavingEl && previousNode && leavingEl === previousNode) {
|
|
13218
|
-
leavingEl.dispatchEvent(new CustomEvent('animationend', {
|
|
13219
|
-
detail: {
|
|
13220
|
-
cancel: true
|
|
13221
|
-
}
|
|
13222
|
-
}));
|
|
13223
|
-
}
|
|
13224
|
-
}
|
|
13225
|
-
}
|
|
13226
|
-
function trackLeavingNodes(tNode, el) {
|
|
13227
|
-
if (leavingNodes.has(tNode)) {
|
|
13228
|
-
leavingNodes.get(tNode)?.push(el);
|
|
13229
|
-
} else {
|
|
13230
|
-
leavingNodes.set(tNode, [el]);
|
|
13231
|
-
}
|
|
13232
|
-
}
|
|
13233
|
-
function getLViewEnterAnimations(lView) {
|
|
13234
|
-
const animationData = lView[ANIMATIONS] ??= {};
|
|
13235
|
-
return animationData.enter ??= new Map();
|
|
13236
|
-
}
|
|
13237
|
-
function getLViewLeaveAnimations(lView) {
|
|
13238
|
-
const animationData = lView[ANIMATIONS] ??= {};
|
|
13239
|
-
return animationData.leave ??= new Map();
|
|
13240
|
-
}
|
|
13241
|
-
function getClassListFromValue(value) {
|
|
13242
|
-
const classes = typeof value === 'function' ? value() : value;
|
|
13243
|
-
let classList = Array.isArray(classes) ? classes : null;
|
|
13244
|
-
if (typeof classes === 'string') {
|
|
13245
|
-
classList = classes.trim().split(/\s+/).filter(k => k);
|
|
13246
|
-
}
|
|
13247
|
-
return classList;
|
|
13248
|
-
}
|
|
13249
|
-
function cancelAnimationsIfRunning(element, renderer) {
|
|
13250
|
-
if (!areAnimationSupported) return;
|
|
13251
|
-
const elementData = enterClassMap.get(element);
|
|
13252
|
-
if (elementData && elementData.classList.length > 0 && elementHasClassList(element, elementData.classList)) {
|
|
13253
|
-
for (const klass of elementData.classList) {
|
|
13254
|
-
renderer.removeClass(element, klass);
|
|
13255
|
-
}
|
|
13256
|
-
}
|
|
13257
|
-
cleanupEnterClassData(element);
|
|
13258
|
-
}
|
|
13259
|
-
function elementHasClassList(element, classList) {
|
|
13260
|
-
for (const className of classList) {
|
|
13261
|
-
if (element.classList.contains(className)) return true;
|
|
13262
|
-
}
|
|
13263
|
-
return false;
|
|
13264
|
-
}
|
|
13265
|
-
function isLongestAnimation(event, nativeElement) {
|
|
13266
|
-
const longestAnimation = longestAnimations.get(nativeElement);
|
|
13267
|
-
if (longestAnimation === undefined) return true;
|
|
13268
|
-
return nativeElement === event.target && (longestAnimation.animationName !== undefined && event.animationName === longestAnimation.animationName || longestAnimation.propertyName !== undefined && event.propertyName === longestAnimation.propertyName);
|
|
13269
|
-
}
|
|
13270
|
-
function addAnimationToLView(animations, tNode, fn) {
|
|
13271
|
-
const nodeAnimations = animations.get(tNode.index) ?? {
|
|
13272
|
-
animateFns: []
|
|
13273
|
-
};
|
|
13274
|
-
nodeAnimations.animateFns.push(fn);
|
|
13275
|
-
animations.set(tNode.index, nodeAnimations);
|
|
13276
|
-
}
|
|
13277
|
-
function cleanupAfterLeaveAnimations(resolvers, cleanupFns) {
|
|
13278
|
-
if (resolvers) {
|
|
13279
|
-
for (const fn of resolvers) {
|
|
13280
|
-
fn();
|
|
13281
|
-
}
|
|
13282
|
-
}
|
|
13283
|
-
for (const fn of cleanupFns) {
|
|
13284
|
-
fn();
|
|
13285
|
-
}
|
|
13286
|
-
}
|
|
13287
|
-
function clearLViewNodeAnimationResolvers(lView, tNode) {
|
|
13288
|
-
const nodeAnimations = getLViewLeaveAnimations(lView).get(tNode.index);
|
|
13289
|
-
if (nodeAnimations) nodeAnimations.resolvers = undefined;
|
|
13290
|
-
}
|
|
13291
|
-
function leaveAnimationFunctionCleanup(lView, tNode, nativeElement, resolvers, cleanupFns) {
|
|
13292
|
-
clearLeavingNodes(tNode, nativeElement);
|
|
13293
|
-
cleanupAfterLeaveAnimations(resolvers, cleanupFns);
|
|
13294
|
-
clearLViewNodeAnimationResolvers(lView, tNode);
|
|
13295
|
-
}
|
|
13296
|
-
|
|
13297
13307
|
function ɵɵanimateEnter(value) {
|
|
13298
13308
|
performanceMarkFeature('NgAnimateEnter');
|
|
13299
13309
|
if (typeof ngServerMode !== 'undefined' && ngServerMode || !areAnimationSupported) {
|
|
@@ -13305,7 +13315,6 @@ function ɵɵanimateEnter(value) {
|
|
|
13305
13315
|
return ɵɵanimateEnter;
|
|
13306
13316
|
}
|
|
13307
13317
|
const tNode = getCurrentTNode();
|
|
13308
|
-
cancelLeavingNodes(tNode, lView);
|
|
13309
13318
|
const ngZone = lView[INJECTOR].get(NgZone);
|
|
13310
13319
|
addAnimationToLView(getLViewEnterAnimations(lView), tNode, () => runEnterAnimation(lView, tNode, value, ngZone));
|
|
13311
13320
|
initializeAnimationQueueScheduler(lView[INJECTOR]);
|
|
@@ -13373,7 +13382,6 @@ function ɵɵanimateEnterListener(value) {
|
|
|
13373
13382
|
return ɵɵanimateEnterListener;
|
|
13374
13383
|
}
|
|
13375
13384
|
const tNode = getCurrentTNode();
|
|
13376
|
-
cancelLeavingNodes(tNode, lView);
|
|
13377
13385
|
addAnimationToLView(getLViewEnterAnimations(lView), tNode, () => runEnterAnimationFunction(lView, tNode, value));
|
|
13378
13386
|
initializeAnimationQueueScheduler(lView[INJECTOR]);
|
|
13379
13387
|
queueEnterAnimations(lView[INJECTOR], getLViewEnterAnimations(lView));
|
|
@@ -13399,7 +13407,6 @@ function ɵɵanimateLeave(value) {
|
|
|
13399
13407
|
return ɵɵanimateLeave;
|
|
13400
13408
|
}
|
|
13401
13409
|
const tNode = getCurrentTNode();
|
|
13402
|
-
cancelLeavingNodes(tNode, lView);
|
|
13403
13410
|
const ngZone = lView[INJECTOR].get(NgZone);
|
|
13404
13411
|
addAnimationToLView(getLViewLeaveAnimations(lView), tNode, () => runLeaveAnimations(lView, tNode, value, ngZone));
|
|
13405
13412
|
initializeAnimationQueueScheduler(lView[INJECTOR]);
|
|
@@ -13472,7 +13479,6 @@ function ɵɵanimateLeaveListener(value) {
|
|
|
13472
13479
|
ngDevMode && assertAnimationTypes(value, 'animate.leave');
|
|
13473
13480
|
const lView = getLView();
|
|
13474
13481
|
const tNode = getCurrentTNode();
|
|
13475
|
-
cancelLeavingNodes(tNode, lView);
|
|
13476
13482
|
allLeavingAnimations.add(lView[ID]);
|
|
13477
13483
|
const ngZone = lView[INJECTOR].get(NgZone);
|
|
13478
13484
|
const maxAnimationTimeout = lView[INJECTOR].get(MAX_ANIMATION_TIMEOUT);
|
|
@@ -17903,7 +17909,7 @@ function getPipeMetadata(type, meta) {
|
|
|
17903
17909
|
|
|
17904
17910
|
const Directive = makeDecorator('Directive', (dir = {}) => dir, undefined, undefined, (type, meta) => compileDirective(type, meta));
|
|
17905
17911
|
const Component = makeDecorator('Component', (c = {}) => ({
|
|
17906
|
-
changeDetection: ChangeDetectionStrategy.
|
|
17912
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
17907
17913
|
...c
|
|
17908
17914
|
}), Directive, undefined, (type, meta) => compileComponent(type, meta));
|
|
17909
17915
|
const Pipe = makeDecorator('Pipe', p => ({
|