@angular/core 21.2.3 → 21.2.5
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 +69 -156
- 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 +2 -2
- package/fesm2022/_resource-chunk.mjs.map +1 -1
- package/fesm2022/_untracked-chunk.mjs +9 -5
- 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 +8 -9
- 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 +2 -20
- package/fesm2022/primitives-event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives-signals.mjs +2 -2
- package/fesm2022/primitives-signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +2 -2
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +6 -6
- 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 +14 -6
- 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 +2 -2
- package/types/_chrome_dev_tools_performance-chunk.d.ts +1 -1
- package/types/_discovery-chunk.d.ts +1 -1
- 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 +6 -6
- 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 +2 -2
|
@@ -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,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v21.2.
|
|
2
|
+
* @license Angular v21.2.5
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { attachInjectFlag, _global,
|
|
7
|
+
import { attachInjectFlag, _global, resolveForwardRef, ɵɵinvalidFactoryDep as __invalidFactoryDep, ɵɵinject as __inject, ɵɵdefineInjector as __defineInjector, ɵɵdefineInjectable as __defineInjectable, newArray, assertString, EMPTY_OBJ, assertFirstCreatePass, assertDefined, assertNotEqual, FLAGS, assertEqual, isInCheckNoChangesMode, PREORDER_HOOK_FLAGS, throwError, assertNumber, assertGreaterThan, HEADER_OFFSET, DECLARATION_VIEW, NG_FACTORY_DEF, isForwardRef, getFactoryDef, convertToBitFlags, isRootView, assertTNodeForLView, enterDI, runInInjectorProfilerContext, getCurrentTNode, getLView, emitInjectorToCreateInstanceEvent, emitInstanceCreatedByInjectorEvent, throwProviderNotFoundError, leaveDI, assertNodeInjector, setInjectImplementation, injectRootLimpMode, stringifyForError, cyclicDependencyErrorWithDetails, cyclicDependencyError, setInjectorProfilerContext, assertDirectiveDef, EMBEDDED_VIEW_INJECTOR, T_HOST, NG_ELEMENT_ID, assertIndexInRange, INJECTOR$1 as INJECTOR, TVIEW, isComponentDef, isComponentHost, DECLARATION_COMPONENT_VIEW, RuntimeError, NG_PROV_DEF, getClosureSafeProperty, getNativeByTNode, flatten, arrayEquals, ID, isLView, assertDomNode, EMPTY_ARRAY, getComponentLViewByIndex, CONTEXT, unwrapRNode, assertLView, HOST, getLViewParent, CHILD_HEAD, NEXT, isLContainer, Injector, CLEANUP, getComponentDef, getDirectiveDef, InjectionToken, inject, ENVIRONMENT_INITIALIZER, DOCUMENT as DOCUMENT$1, 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, AFTER_RENDER_SEQUENCES_TO_ADD, markAncestorsForTraversal, NgZone, ChangeDetectionScheduler, ErrorHandler, assertNotInReactiveContext, assertInInjectionContext, DestroyRef, ViewContext, EnvironmentInjector, isDestroyed, assertLContainer, MOVED_VIEWS, assertProjectionSlots, NATIVE, REACTIVE_TEMPLATE_CONSUMER, DECLARATION_LCONTAINER, QUERIES, CONTAINER_HEADER_OFFSET, assertParentView, assertNotReactive, ON_DESTROY_HOOKS, assertFunction, EFFECTS, INTERNAL_APPLICATION_ERROR_HANDLER, assertNotSame, isCurrentTNodeParent, setCurrentTNodeAsNotParent, assertHasParent, setCurrentTNode, getElementDepthCount, increaseElementDepthCount, wasLastNodeCreated, setCurrentDirectiveIndex, getCurrentDirectiveIndex, unwrapLView, enterView, leaveView, isCreationMode, markViewForRefresh, setIsInCheckNoChangesMode, setIsRefreshingViews, isExhaustiveCheckNoChanges, requiresRefreshOrTraversal, setBindingIndex, EFFECTS_TO_SCHEDULE, setBindingRootForHostBindings, viewAttachedToChangeDetector, CheckNoChangesMode, 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, getTNode, getDirectiveDefOrThrow, 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, decreaseElementDepthCount, assertTNodeCreationIndex, getNamespace, enterSkipHydrationBlock, isSkipHydrationRootTNode, leaveSkipHydrationBlock, getCurrentDirectiveDef, assertIndexInExpandoRange, getBindingIndex, assertOneOf, setInI18nBlock, nextContextImpl, getCurrentQueryIndex, getContextLView, load, keyValueArrayIndexOf, incrementBindingIndex, keyValueArrayGet, keyValueArraySet, store, getBindingRoot, providerToFactory, emitProviderConfiguredEvent, isClassProvider, NG_COMP_DEF, forwardRef, ɵɵrestoreView as __restoreView, ɵɵdisableBindings as __disableBindings, ɵɵenableBindings as __enableBindings, ɵɵnamespaceSVG as __namespaceSVG, ɵɵnamespaceMathML as __namespaceMathML, ɵɵnamespaceHTML as __namespaceHTML, ɵɵresetView as __resetView, NG_MOD_DEF, NG_INJ_DEF, NG_DIR_DEF, NG_PIPE_DEF, PROVIDED_ZONELESS, NoopNgZone, angularZoneInstanceIdProperty, scheduleCallbackWithMicrotask, scheduleCallbackWithRafRace, SCHEDULE_IN_ROOT_ZONE, getNativeByTNodeOrNull } from './_effect-chunk2.mjs';
|
|
8
|
+
import { setActiveConsumer as setActiveConsumer$1 } from '@angular/core/primitives/signals';
|
|
8
9
|
import { setActiveConsumer, SIGNAL, consumerDestroy, REACTIVE_NODE, consumerPollProducersForChange, consumerBeforeComputation, getActiveConsumer, consumerAfterComputation, createComputed, setThrowInvalidWriteToSignalError } from './_effect-chunk.mjs';
|
|
9
10
|
import { Subject, Subscription } from 'rxjs';
|
|
10
|
-
import { setActiveConsumer as setActiveConsumer$1 } from '@angular/core/primitives/signals';
|
|
11
11
|
import { map } from 'rxjs/operators';
|
|
12
12
|
import { Attribute as Attribute$1 } from './_attribute-chunk.mjs';
|
|
13
13
|
|
|
@@ -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 & -5);
|
|
1145
1145
|
if (embeddedViewInjectorValue !== NOT_FOUND) {
|
|
1146
1146
|
return embeddedViewInjectorValue;
|
|
1147
1147
|
}
|
|
@@ -3061,6 +3061,7 @@ const HTML_ATTRS = tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border
|
|
|
3061
3061
|
const ARIA_ATTRS = tagSet('aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' + 'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' + 'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' + 'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' + 'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' + 'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' + 'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext');
|
|
3062
3062
|
const VALID_ATTRS = merge(URI_ATTRS, HTML_ATTRS, ARIA_ATTRS);
|
|
3063
3063
|
const SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');
|
|
3064
|
+
const SENSITIVE_ATTRS = merge(URI_ATTRS, tagSet('action,formaction,data,codebase'));
|
|
3064
3065
|
class SanitizingHtmlSerializer {
|
|
3065
3066
|
sanitizedSomething = false;
|
|
3066
3067
|
buf = [];
|
|
@@ -4244,6 +4245,10 @@ function determineLongestAnimationFromElementAnimations(el, animationsMap, anima
|
|
|
4244
4245
|
}
|
|
4245
4246
|
const animDuration = typeof timing?.duration === 'number' ? timing.duration : 0;
|
|
4246
4247
|
let duration = (timing?.delay ?? 0) + animDuration;
|
|
4248
|
+
const playbackRate = animation.playbackRate;
|
|
4249
|
+
if (playbackRate !== undefined && playbackRate !== 0 && playbackRate !== 1) {
|
|
4250
|
+
duration /= Math.abs(playbackRate);
|
|
4251
|
+
}
|
|
4247
4252
|
let propertyName;
|
|
4248
4253
|
let animationName;
|
|
4249
4254
|
if (animation.animationName) {
|
|
@@ -4478,14 +4483,11 @@ const NOOP_AFTER_RENDER_REF = {
|
|
|
4478
4483
|
|
|
4479
4484
|
const ANIMATION_QUEUE = new InjectionToken(typeof ngDevMode !== 'undefined' && ngDevMode ? 'AnimationQueue' : '', {
|
|
4480
4485
|
factory: () => {
|
|
4481
|
-
const injector = inject(EnvironmentInjector);
|
|
4482
|
-
const queue = new Set();
|
|
4483
|
-
injector.onDestroy(() => queue.clear());
|
|
4484
4486
|
return {
|
|
4485
|
-
queue,
|
|
4487
|
+
queue: new Set(),
|
|
4486
4488
|
isScheduled: false,
|
|
4487
4489
|
scheduler: null,
|
|
4488
|
-
injector
|
|
4490
|
+
injector: inject(EnvironmentInjector)
|
|
4489
4491
|
};
|
|
4490
4492
|
}
|
|
4491
4493
|
});
|
|
@@ -4543,135 +4545,6 @@ function maybeQueueEnterAnimation(parentLView, parent, tNode, injector) {
|
|
|
4543
4545
|
queueEnterAnimations(injector, enterAnimations);
|
|
4544
4546
|
}
|
|
4545
4547
|
}
|
|
4546
|
-
function runLeaveAnimationsWithCallback(lView, tNode, injector, callback) {
|
|
4547
|
-
try {
|
|
4548
|
-
injector.get(INJECTOR$1);
|
|
4549
|
-
} catch {
|
|
4550
|
-
return callback(false);
|
|
4551
|
-
}
|
|
4552
|
-
const animations = lView?.[ANIMATIONS];
|
|
4553
|
-
const nodesWithExitAnimations = aggregateDescendantAnimations(lView, tNode, animations);
|
|
4554
|
-
if (nodesWithExitAnimations.size === 0) {
|
|
4555
|
-
let hasNestedAnimations = false;
|
|
4556
|
-
if (lView) {
|
|
4557
|
-
const nestedPromises = [];
|
|
4558
|
-
collectNestedViewAnimations(lView, tNode, nestedPromises);
|
|
4559
|
-
hasNestedAnimations = nestedPromises.length > 0;
|
|
4560
|
-
}
|
|
4561
|
-
if (!hasNestedAnimations) {
|
|
4562
|
-
return callback(false);
|
|
4563
|
-
}
|
|
4564
|
-
}
|
|
4565
|
-
if (lView) allLeavingAnimations.add(lView[ID]);
|
|
4566
|
-
addToAnimationQueue(injector, () => executeLeaveAnimations(lView, tNode, animations || undefined, nodesWithExitAnimations, callback), animations || undefined);
|
|
4567
|
-
}
|
|
4568
|
-
function aggregateDescendantAnimations(lView, tNode, animations) {
|
|
4569
|
-
const nodesWithExitAnimations = new Map();
|
|
4570
|
-
const leaveAnimations = animations?.leave;
|
|
4571
|
-
if (leaveAnimations && leaveAnimations.has(tNode.index)) {
|
|
4572
|
-
nodesWithExitAnimations.set(tNode.index, leaveAnimations.get(tNode.index));
|
|
4573
|
-
}
|
|
4574
|
-
if (lView && leaveAnimations) {
|
|
4575
|
-
for (const [index, animationData] of leaveAnimations) {
|
|
4576
|
-
if (nodesWithExitAnimations.has(index)) continue;
|
|
4577
|
-
const nestedTNode = lView[TVIEW].data[index];
|
|
4578
|
-
let parent = nestedTNode.parent;
|
|
4579
|
-
while (parent) {
|
|
4580
|
-
if (parent === tNode) {
|
|
4581
|
-
nodesWithExitAnimations.set(index, animationData);
|
|
4582
|
-
break;
|
|
4583
|
-
}
|
|
4584
|
-
parent = parent.parent;
|
|
4585
|
-
}
|
|
4586
|
-
}
|
|
4587
|
-
}
|
|
4588
|
-
return nodesWithExitAnimations;
|
|
4589
|
-
}
|
|
4590
|
-
function executeLeaveAnimations(lView, tNode, animations, nodesWithExitAnimations, callback) {
|
|
4591
|
-
const runningAnimations = [];
|
|
4592
|
-
if (animations && animations.leave) {
|
|
4593
|
-
for (const [index] of nodesWithExitAnimations) {
|
|
4594
|
-
if (!animations.leave.has(index)) continue;
|
|
4595
|
-
const currentAnimationData = animations.leave.get(index);
|
|
4596
|
-
for (const animationFn of currentAnimationData.animateFns) {
|
|
4597
|
-
const {
|
|
4598
|
-
promise
|
|
4599
|
-
} = animationFn();
|
|
4600
|
-
runningAnimations.push(promise);
|
|
4601
|
-
}
|
|
4602
|
-
animations.detachedLeaveAnimationFns = undefined;
|
|
4603
|
-
}
|
|
4604
|
-
}
|
|
4605
|
-
if (lView) {
|
|
4606
|
-
collectNestedViewAnimations(lView, tNode, runningAnimations);
|
|
4607
|
-
}
|
|
4608
|
-
if (runningAnimations.length > 0) {
|
|
4609
|
-
const currentAnimations = animations || lView?.[ANIMATIONS];
|
|
4610
|
-
if (currentAnimations) {
|
|
4611
|
-
const prevRunning = currentAnimations.running;
|
|
4612
|
-
if (prevRunning) {
|
|
4613
|
-
runningAnimations.push(prevRunning);
|
|
4614
|
-
}
|
|
4615
|
-
currentAnimations.running = Promise.allSettled(runningAnimations);
|
|
4616
|
-
runAfterLeaveAnimations(lView, currentAnimations.running, callback);
|
|
4617
|
-
} else {
|
|
4618
|
-
Promise.allSettled(runningAnimations).then(() => {
|
|
4619
|
-
if (lView) allLeavingAnimations.delete(lView[ID]);
|
|
4620
|
-
callback(true);
|
|
4621
|
-
});
|
|
4622
|
-
}
|
|
4623
|
-
} else {
|
|
4624
|
-
if (lView) allLeavingAnimations.delete(lView[ID]);
|
|
4625
|
-
callback(false);
|
|
4626
|
-
}
|
|
4627
|
-
}
|
|
4628
|
-
function collectNestedViewAnimations(lView, tNode, collectedPromises) {
|
|
4629
|
-
if (isComponentHost(tNode)) {
|
|
4630
|
-
const componentView = getComponentLViewByIndex(tNode.index, lView);
|
|
4631
|
-
collectAllViewLeaveAnimations(componentView, collectedPromises);
|
|
4632
|
-
} else if (tNode.type & 12) {
|
|
4633
|
-
const lContainer = lView[tNode.index];
|
|
4634
|
-
if (isLContainer(lContainer)) {
|
|
4635
|
-
for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {
|
|
4636
|
-
const subView = lContainer[i];
|
|
4637
|
-
collectAllViewLeaveAnimations(subView, collectedPromises);
|
|
4638
|
-
}
|
|
4639
|
-
}
|
|
4640
|
-
}
|
|
4641
|
-
let child = tNode.child;
|
|
4642
|
-
while (child) {
|
|
4643
|
-
collectNestedViewAnimations(lView, child, collectedPromises);
|
|
4644
|
-
child = child.next;
|
|
4645
|
-
}
|
|
4646
|
-
}
|
|
4647
|
-
function collectAllViewLeaveAnimations(view, collectedPromises) {
|
|
4648
|
-
const animations = view[ANIMATIONS];
|
|
4649
|
-
if (animations && animations.leave) {
|
|
4650
|
-
for (const animationData of animations.leave.values()) {
|
|
4651
|
-
for (const animationFn of animationData.animateFns) {
|
|
4652
|
-
const {
|
|
4653
|
-
promise
|
|
4654
|
-
} = animationFn();
|
|
4655
|
-
collectedPromises.push(promise);
|
|
4656
|
-
}
|
|
4657
|
-
}
|
|
4658
|
-
}
|
|
4659
|
-
let child = view[TVIEW].firstChild;
|
|
4660
|
-
while (child) {
|
|
4661
|
-
collectNestedViewAnimations(view, child, collectedPromises);
|
|
4662
|
-
child = child.next;
|
|
4663
|
-
}
|
|
4664
|
-
}
|
|
4665
|
-
function runAfterLeaveAnimations(lView, runningAnimations, callback) {
|
|
4666
|
-
runningAnimations.then(() => {
|
|
4667
|
-
if (lView[ANIMATIONS]?.running === runningAnimations) {
|
|
4668
|
-
lView[ANIMATIONS].running = undefined;
|
|
4669
|
-
allLeavingAnimations.delete(lView[ID]);
|
|
4670
|
-
}
|
|
4671
|
-
callback(true);
|
|
4672
|
-
});
|
|
4673
|
-
}
|
|
4674
|
-
|
|
4675
4548
|
function applyToElementOrContainer(action, renderer, injector, parent, lNodeToHandle, tNode, beforeNode, parentLView) {
|
|
4676
4549
|
if (lNodeToHandle != null) {
|
|
4677
4550
|
let lContainer;
|
|
@@ -4806,6 +4679,45 @@ function cleanUpView(tView, lView) {
|
|
|
4806
4679
|
setActiveConsumer(prevConsumer);
|
|
4807
4680
|
}
|
|
4808
4681
|
}
|
|
4682
|
+
function runLeaveAnimationsWithCallback(lView, tNode, injector, callback) {
|
|
4683
|
+
const animations = lView?.[ANIMATIONS];
|
|
4684
|
+
if (animations == null || animations.leave == undefined || !animations.leave.has(tNode.index)) return callback(false);
|
|
4685
|
+
if (lView) allLeavingAnimations.add(lView[ID]);
|
|
4686
|
+
addToAnimationQueue(injector, () => {
|
|
4687
|
+
if (animations.leave && animations.leave.has(tNode.index)) {
|
|
4688
|
+
const leaveAnimationMap = animations.leave;
|
|
4689
|
+
const leaveAnimations = leaveAnimationMap.get(tNode.index);
|
|
4690
|
+
const runningAnimations = [];
|
|
4691
|
+
if (leaveAnimations) {
|
|
4692
|
+
for (let index = 0; index < leaveAnimations.animateFns.length; index++) {
|
|
4693
|
+
const animationFn = leaveAnimations.animateFns[index];
|
|
4694
|
+
const {
|
|
4695
|
+
promise
|
|
4696
|
+
} = animationFn();
|
|
4697
|
+
runningAnimations.push(promise);
|
|
4698
|
+
}
|
|
4699
|
+
animations.detachedLeaveAnimationFns = undefined;
|
|
4700
|
+
}
|
|
4701
|
+
animations.running = Promise.allSettled(runningAnimations);
|
|
4702
|
+
runAfterLeaveAnimations(lView, callback);
|
|
4703
|
+
} else {
|
|
4704
|
+
if (lView) allLeavingAnimations.delete(lView[ID]);
|
|
4705
|
+
callback(false);
|
|
4706
|
+
}
|
|
4707
|
+
}, animations);
|
|
4708
|
+
}
|
|
4709
|
+
function runAfterLeaveAnimations(lView, callback) {
|
|
4710
|
+
const runningAnimations = lView[ANIMATIONS]?.running;
|
|
4711
|
+
if (runningAnimations) {
|
|
4712
|
+
runningAnimations.then(() => {
|
|
4713
|
+
lView[ANIMATIONS].running = undefined;
|
|
4714
|
+
allLeavingAnimations.delete(lView[ID]);
|
|
4715
|
+
callback(true);
|
|
4716
|
+
});
|
|
4717
|
+
return;
|
|
4718
|
+
}
|
|
4719
|
+
callback(false);
|
|
4720
|
+
}
|
|
4809
4721
|
function processCleanups(tView, lView) {
|
|
4810
4722
|
ngDevMode && assertNotReactive(processCleanups.name);
|
|
4811
4723
|
const tCleanup = tView.cleanup;
|
|
@@ -5530,7 +5442,7 @@ function renderView(tView, lView, context) {
|
|
|
5530
5442
|
}
|
|
5531
5443
|
throw error;
|
|
5532
5444
|
} finally {
|
|
5533
|
-
lView[FLAGS] &=
|
|
5445
|
+
lView[FLAGS] &= -5;
|
|
5534
5446
|
leaveView();
|
|
5535
5447
|
}
|
|
5536
5448
|
}
|
|
@@ -5916,7 +5828,7 @@ function detectChangesInView(lView, mode) {
|
|
|
5916
5828
|
if (consumer) {
|
|
5917
5829
|
consumer.dirty = false;
|
|
5918
5830
|
}
|
|
5919
|
-
lView[FLAGS] &=
|
|
5831
|
+
lView[FLAGS] &= -9217;
|
|
5920
5832
|
if (shouldRefreshView) {
|
|
5921
5833
|
refreshView(tView, lView, tView.template, lView[CONTEXT]);
|
|
5922
5834
|
} else if (flags & 8192) {
|
|
@@ -6042,7 +5954,7 @@ function detachView(lContainer, removeIndex) {
|
|
|
6042
5954
|
}
|
|
6043
5955
|
viewToDetach[PARENT] = null;
|
|
6044
5956
|
viewToDetach[NEXT] = null;
|
|
6045
|
-
viewToDetach[FLAGS] &=
|
|
5957
|
+
viewToDetach[FLAGS] &= -129;
|
|
6046
5958
|
}
|
|
6047
5959
|
return viewToDetach;
|
|
6048
5960
|
}
|
|
@@ -6149,7 +6061,7 @@ class ViewRef {
|
|
|
6149
6061
|
markViewDirty(this._cdRefInjectingView || this._lView, 4);
|
|
6150
6062
|
}
|
|
6151
6063
|
detach() {
|
|
6152
|
-
this._lView[FLAGS] &=
|
|
6064
|
+
this._lView[FLAGS] &= -129;
|
|
6153
6065
|
}
|
|
6154
6066
|
reattach() {
|
|
6155
6067
|
updateAncestorTraversalFlagsOnAttach(this._lView);
|
|
@@ -8777,7 +8689,7 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
8777
8689
|
}
|
|
8778
8690
|
}
|
|
8779
8691
|
function createRootTView(rootSelectorOrNode, componentDef, componentBindings, directives) {
|
|
8780
|
-
const tAttributes = rootSelectorOrNode ? ['ng-version', '21.2.
|
|
8692
|
+
const tAttributes = rootSelectorOrNode ? ['ng-version', '21.2.5'] : extractAttrsAndClassesFromSelector(componentDef.selectors[0]);
|
|
8781
8693
|
let creationBindings = null;
|
|
8782
8694
|
let updateBindings = null;
|
|
8783
8695
|
let varsToAllocate = 0;
|
|
@@ -12425,13 +12337,13 @@ class ApplicationRef {
|
|
|
12425
12337
|
}
|
|
12426
12338
|
synchronizeOnce() {
|
|
12427
12339
|
if (this.dirtyFlags & 16) {
|
|
12428
|
-
this.dirtyFlags &=
|
|
12340
|
+
this.dirtyFlags &= -17;
|
|
12429
12341
|
this.rootEffectScheduler.flush();
|
|
12430
12342
|
}
|
|
12431
12343
|
let ranDetectChanges = false;
|
|
12432
12344
|
if (this.dirtyFlags & 7) {
|
|
12433
12345
|
const useGlobalCheck = Boolean(this.dirtyFlags & 1);
|
|
12434
|
-
this.dirtyFlags &=
|
|
12346
|
+
this.dirtyFlags &= -8;
|
|
12435
12347
|
this.dirtyFlags |= 8;
|
|
12436
12348
|
for (let {
|
|
12437
12349
|
_lView
|
|
@@ -12443,7 +12355,7 @@ class ApplicationRef {
|
|
|
12443
12355
|
detectChangesInternal(_lView, mode);
|
|
12444
12356
|
ranDetectChanges = true;
|
|
12445
12357
|
}
|
|
12446
|
-
this.dirtyFlags &=
|
|
12358
|
+
this.dirtyFlags &= -5;
|
|
12447
12359
|
this.syncDirtyFlagsWithViews();
|
|
12448
12360
|
if (this.dirtyFlags & (7 | 16)) {
|
|
12449
12361
|
return;
|
|
@@ -12454,7 +12366,7 @@ class ApplicationRef {
|
|
|
12454
12366
|
this._rendererFactory?.end?.();
|
|
12455
12367
|
}
|
|
12456
12368
|
if (this.dirtyFlags & 8) {
|
|
12457
|
-
this.dirtyFlags &=
|
|
12369
|
+
this.dirtyFlags &= -9;
|
|
12458
12370
|
this.afterRenderManager.execute();
|
|
12459
12371
|
}
|
|
12460
12372
|
this.syncDirtyFlagsWithViews();
|
|
@@ -12466,7 +12378,7 @@ class ApplicationRef {
|
|
|
12466
12378
|
this.dirtyFlags |= 2;
|
|
12467
12379
|
return;
|
|
12468
12380
|
} else {
|
|
12469
|
-
this.dirtyFlags &=
|
|
12381
|
+
this.dirtyFlags &= -8;
|
|
12470
12382
|
}
|
|
12471
12383
|
}
|
|
12472
12384
|
attachView(viewRef) {
|
|
@@ -15064,7 +14976,7 @@ function i18nAttributesFirstPass(tView, index, values) {
|
|
|
15064
14976
|
if (ICU_REGEXP.test(message)) {
|
|
15065
14977
|
throw new Error(`ICU expressions are not supported in attributes. Message: "${message}".`);
|
|
15066
14978
|
}
|
|
15067
|
-
generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes),
|
|
14979
|
+
generateBindingUpdateOpCodes(updateOpCodes, message, previousElementIndex, attrName, countBindings(updateOpCodes), SENSITIVE_ATTRS[attrName.toLowerCase()] ? _sanitizeUrl : null);
|
|
15068
14980
|
}
|
|
15069
14981
|
}
|
|
15070
14982
|
tView.data[index] = updateOpCodes;
|
|
@@ -15296,12 +15208,12 @@ function walkIcuTree(ast, tView, tIcu, lView, sharedUpdateOpCodes, create, remov
|
|
|
15296
15208
|
const hasBinding = !!attr.value.match(BINDING_REGEXP);
|
|
15297
15209
|
if (hasBinding) {
|
|
15298
15210
|
if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {
|
|
15299
|
-
generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0,
|
|
15211
|
+
generateBindingUpdateOpCodes(update, attr.value, newIndex, attr.name, 0, SENSITIVE_ATTRS[lowerAttrName] ? _sanitizeUrl : null);
|
|
15300
15212
|
} else {
|
|
15301
15213
|
ngDevMode && console.warn(`WARNING: ignoring unsafe attribute value ` + `${lowerAttrName} on element ${tagName} ` + `(see ${XSS_SECURITY_URL})`);
|
|
15302
15214
|
}
|
|
15303
15215
|
} else if (VALID_ATTRS[lowerAttrName]) {
|
|
15304
|
-
if (
|
|
15216
|
+
if (SENSITIVE_ATTRS[lowerAttrName]) {
|
|
15305
15217
|
if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
15306
15218
|
console.warn(`WARNING: ignoring unsafe attribute ` + `${lowerAttrName} on element ${tagName} ` + `(see ${XSS_SECURITY_URL})`);
|
|
15307
15219
|
}
|
|
@@ -15693,7 +15605,7 @@ function getTStylingRangePrevDuplicate(tStylingRange) {
|
|
|
15693
15605
|
function setTStylingRangePrev(tStylingRange, previous) {
|
|
15694
15606
|
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15695
15607
|
ngDevMode && assertNumberInRange(previous, 0, 32767);
|
|
15696
|
-
return tStylingRange &
|
|
15608
|
+
return tStylingRange & 131071 | previous << 17;
|
|
15697
15609
|
}
|
|
15698
15610
|
function setTStylingRangePrevDuplicate(tStylingRange) {
|
|
15699
15611
|
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
@@ -15706,7 +15618,7 @@ function getTStylingRangeNext(tStylingRange) {
|
|
|
15706
15618
|
function setTStylingRangeNext(tStylingRange, next) {
|
|
15707
15619
|
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
15708
15620
|
ngDevMode && assertNumberInRange(next, 0, 32767);
|
|
15709
|
-
return tStylingRange &
|
|
15621
|
+
return tStylingRange & -131069 | next << 2;
|
|
15710
15622
|
}
|
|
15711
15623
|
function getTStylingRangeNextDuplicate(tStylingRange) {
|
|
15712
15624
|
ngDevMode && assertNumber(tStylingRange, 'expected number');
|
|
@@ -17035,6 +16947,7 @@ function recreateLView(importMeta, id, newDef, oldDef, lView) {
|
|
|
17035
16947
|
const newLView = createLView(parentLView, newTView, instance, getInitialLViewFlagsFromDef(newDef), host, tNode, null, null, null, null, null);
|
|
17036
16948
|
replaceLViewInTree(parentLView, lView, newLView, tNode.index);
|
|
17037
16949
|
destroyLView(lView[TVIEW], lView);
|
|
16950
|
+
cleanupLView(lView);
|
|
17038
16951
|
const rendererFactory = lView[ENVIRONMENT].rendererFactory;
|
|
17039
16952
|
clearRendererCache(rendererFactory, oldDef);
|
|
17040
16953
|
newLView[RENDERER] = rendererFactory.createRenderer(host, newDef);
|
|
@@ -17088,7 +17001,7 @@ function resetProjectionState(tNode) {
|
|
|
17088
17001
|
for (const current of tNode.projection) {
|
|
17089
17002
|
if (isTNodeShape(current)) {
|
|
17090
17003
|
current.projectionNext = null;
|
|
17091
|
-
current.flags &=
|
|
17004
|
+
current.flags &= -3;
|
|
17092
17005
|
}
|
|
17093
17006
|
}
|
|
17094
17007
|
tNode.projection = null;
|
|
@@ -17438,12 +17351,12 @@ function verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRo
|
|
|
17438
17351
|
verifySemanticsOfNgModuleImport(modOrStandaloneCmpt, moduleType);
|
|
17439
17352
|
verifySemanticsOfNgModuleDef(modOrStandaloneCmpt, false, moduleType);
|
|
17440
17353
|
});
|
|
17441
|
-
const exports = maybeUnwrapFn(ngModuleDef.exports);
|
|
17354
|
+
const exports$1 = maybeUnwrapFn(ngModuleDef.exports);
|
|
17442
17355
|
declarations.forEach(verifyDeclarationsHaveDefinitions);
|
|
17443
17356
|
declarations.forEach(verifyDirectivesHaveSelector);
|
|
17444
17357
|
declarations.forEach(declarationType => verifyNotStandalone(declarationType, moduleType));
|
|
17445
17358
|
const combinedDeclarations = [...declarations.map(resolveForwardRef), ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef)];
|
|
17446
|
-
exports.forEach(verifyExportsAreDeclaredOrReExported);
|
|
17359
|
+
exports$1.forEach(verifyExportsAreDeclaredOrReExported);
|
|
17447
17360
|
declarations.forEach(decl => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));
|
|
17448
17361
|
const ngModule = getAnnotation(moduleType, 'NgModule');
|
|
17449
17362
|
if (ngModule) {
|