@angular/core 19.1.4 → 19.2.0-next.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/core.mjs +556 -318
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -2
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +28 -17
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +4 -4
- package/index.d.ts +82 -30
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +3 -3
- package/schematics/bundles/{apply_import_manager-3ba5d1bb.js → apply_import_manager-deecd687.js} +3 -3
- package/schematics/bundles/{checker-ca858016.js → checker-78667e44.js} +389 -96
- package/schematics/bundles/cleanup-unused-imports.js +6 -6
- package/schematics/bundles/{compiler_host-c26ed2d0.js → compiler_host-38c8eab2.js} +2 -2
- package/schematics/bundles/control-flow-migration.js +3 -3
- package/schematics/bundles/explicit-standalone-flag.js +5 -5
- package/schematics/bundles/{imports-31a38653.js → imports-abe29092.js} +1 -1
- package/schematics/bundles/{index-aa0e0065.js → index-6713e562.js} +4 -4
- package/schematics/bundles/{index-761b9f6f.js → index-de135c2f.js} +4 -4
- package/schematics/bundles/inject-migration.js +6 -6
- package/schematics/bundles/{leading_space-6e7a8ec6.js → leading_space-d190b83b.js} +1 -1
- package/schematics/bundles/{migrate_ts_type_references-c6d4443c.js → migrate_ts_type_references-e6411f51.js} +6 -6
- package/schematics/bundles/{nodes-88c2157f.js → nodes-a9f0b985.js} +2 -2
- package/schematics/bundles/output-migration.js +6 -6
- package/schematics/bundles/pending-tasks.js +5 -5
- package/schematics/bundles/{program-8e222816.js → program-b0d98952.js} +11 -11
- package/schematics/bundles/{project_tsconfig_paths-6c9cde78.js → project_tsconfig_paths-e9ccccbf.js} +1 -1
- package/schematics/bundles/provide-initializer.js +5 -5
- package/schematics/bundles/route-lazy-loading.js +4 -4
- package/schematics/bundles/signal-input-migration.js +8 -8
- package/schematics/bundles/signal-queries-migration.js +8 -8
- package/schematics/bundles/signals.js +8 -8
- package/schematics/bundles/standalone-migration.js +8 -8
- package/testing/index.d.ts +1 -1
package/fesm2022/core.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.
|
|
2
|
+
* @license Angular v19.2.0-next.0
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { SIGNAL_NODE as SIGNAL_NODE$1, signalSetFn as signalSetFn$1, producerAccessed as producerAccessed$1, SIGNAL as SIGNAL$1, getActiveConsumer as getActiveConsumer$1, setActiveConsumer as setActiveConsumer$1, createSignal as createSignal$1, signalUpdateFn as signalUpdateFn$1, consumerDestroy as consumerDestroy$1, REACTIVE_NODE as REACTIVE_NODE$1, consumerBeforeComputation as consumerBeforeComputation$1, consumerAfterComputation as consumerAfterComputation$1, consumerPollProducersForChange as consumerPollProducersForChange$1, createComputed as createComputed$1, setThrowInvalidWriteToSignalError as setThrowInvalidWriteToSignalError$1,
|
|
7
|
+
import { SIGNAL_NODE as SIGNAL_NODE$1, signalSetFn as signalSetFn$1, producerAccessed as producerAccessed$1, SIGNAL as SIGNAL$1, getActiveConsumer as getActiveConsumer$1, setActiveConsumer as setActiveConsumer$1, createSignal as createSignal$1, signalUpdateFn as signalUpdateFn$1, consumerDestroy as consumerDestroy$1, REACTIVE_NODE as REACTIVE_NODE$1, consumerBeforeComputation as consumerBeforeComputation$1, consumerAfterComputation as consumerAfterComputation$1, consumerPollProducersForChange as consumerPollProducersForChange$1, createComputed as createComputed$1, setThrowInvalidWriteToSignalError as setThrowInvalidWriteToSignalError$1, producerUpdateValueVersion as producerUpdateValueVersion$1, producerMarkClean as producerMarkClean$1, defaultEquals as defaultEquals$1, createWatch as createWatch$1, isInNotificationPhase as isInNotificationPhase$1 } from '@angular/core/primitives/signals';
|
|
8
8
|
export { SIGNAL as ɵSIGNAL } from '@angular/core/primitives/signals';
|
|
9
9
|
import { BehaviorSubject, Subject, Subscription } from 'rxjs';
|
|
10
10
|
import { Attribute as Attribute$1, clearAppScopedEarlyEventContract, EventContract, EventContractContainer, getAppScopedQueuedEventInfos, EventDispatcher, registerDispatcher, isEarlyEventType, isCaptureEventType, EventPhase } from '@angular/core/primitives/event-dispatch';
|
|
@@ -2963,7 +2963,6 @@ function isComponentDef(def) {
|
|
|
2963
2963
|
return !!def.template;
|
|
2964
2964
|
}
|
|
2965
2965
|
function isRootView(target) {
|
|
2966
|
-
// Determines whether a given LView is marked as a root view.
|
|
2967
2966
|
return (target[FLAGS] & 512 /* LViewFlags.IsRoot */) !== 0;
|
|
2968
2967
|
}
|
|
2969
2968
|
function isProjectionTNode(tNode) {
|
|
@@ -3244,7 +3243,7 @@ const setProfiler = (profiler) => {
|
|
|
3244
3243
|
* execution context
|
|
3245
3244
|
* @returns
|
|
3246
3245
|
*/
|
|
3247
|
-
const profiler = function (event, instance, hookOrListener) {
|
|
3246
|
+
const profiler = function (event, instance = null, hookOrListener) {
|
|
3248
3247
|
if (profilerCallback != null /* both `null` and `undefined` */) {
|
|
3249
3248
|
profilerCallback(event, instance, hookOrListener);
|
|
3250
3249
|
}
|
|
@@ -5618,7 +5617,7 @@ function lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundVa
|
|
|
5618
5617
|
while (currentTNode !== null &&
|
|
5619
5618
|
currentLView !== null &&
|
|
5620
5619
|
currentLView[FLAGS] & 2048 /* LViewFlags.HasEmbeddedViewInjector */ &&
|
|
5621
|
-
!
|
|
5620
|
+
!(currentLView[FLAGS] & 512 /* LViewFlags.IsRoot */)) {
|
|
5622
5621
|
ngDevMode && assertTNodeForLView(currentTNode, currentLView);
|
|
5623
5622
|
// Note that this lookup on the node injector is using the `Self` flag, because
|
|
5624
5623
|
// we don't want the node injector to look at any parent injectors since we
|
|
@@ -7800,7 +7799,8 @@ function getDirectivesAtNodeIndex(nodeIndex, lView) {
|
|
|
7800
7799
|
}
|
|
7801
7800
|
function getComponentAtNodeIndex(nodeIndex, lView) {
|
|
7802
7801
|
const tNode = lView[TVIEW].data[nodeIndex];
|
|
7803
|
-
|
|
7802
|
+
const { directiveStart, componentOffset } = tNode;
|
|
7803
|
+
return componentOffset > -1 ? lView[directiveStart + componentOffset] : null;
|
|
7804
7804
|
}
|
|
7805
7805
|
/**
|
|
7806
7806
|
* Returns a map of local references (local reference name => element or directive instance) that
|
|
@@ -7829,7 +7829,7 @@ function discoverLocalRefs(lView, nodeIndex) {
|
|
|
7829
7829
|
function getRootView(componentOrLView) {
|
|
7830
7830
|
ngDevMode && assertDefined(componentOrLView, 'component');
|
|
7831
7831
|
let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);
|
|
7832
|
-
while (lView && !
|
|
7832
|
+
while (lView && !(lView[FLAGS] & 512 /* LViewFlags.IsRoot */)) {
|
|
7833
7833
|
lView = getLViewParent(lView);
|
|
7834
7834
|
}
|
|
7835
7835
|
ngDevMode && assertLView(lView);
|
|
@@ -7947,7 +7947,7 @@ function getOwningComponent(elementOrDir) {
|
|
|
7947
7947
|
while (lView[TVIEW].type === 2 /* TViewType.Embedded */ && (parent = getLViewParent(lView))) {
|
|
7948
7948
|
lView = parent;
|
|
7949
7949
|
}
|
|
7950
|
-
return
|
|
7950
|
+
return lView[FLAGS] & 512 /* LViewFlags.IsRoot */ ? null : lView[CONTEXT];
|
|
7951
7951
|
}
|
|
7952
7952
|
/**
|
|
7953
7953
|
* Retrieves all root components associated with a DOM element, directive or component instance.
|
|
@@ -8756,6 +8756,10 @@ class AfterRenderImpl {
|
|
|
8756
8756
|
* might be scheduled.
|
|
8757
8757
|
*/
|
|
8758
8758
|
execute() {
|
|
8759
|
+
const hasSequencesToExecute = this.sequences.size > 0;
|
|
8760
|
+
if (hasSequencesToExecute) {
|
|
8761
|
+
profiler(16 /* ProfilerEvent.AfterRenderHooksStart */);
|
|
8762
|
+
}
|
|
8759
8763
|
this.executing = true;
|
|
8760
8764
|
for (const phase of AFTER_RENDER_PHASES) {
|
|
8761
8765
|
for (const sequence of this.sequences) {
|
|
@@ -8763,7 +8767,11 @@ class AfterRenderImpl {
|
|
|
8763
8767
|
continue;
|
|
8764
8768
|
}
|
|
8765
8769
|
try {
|
|
8766
|
-
sequence.pipelinedValue = this.ngZone.runOutsideAngular(() => this.maybeTrace(() =>
|
|
8770
|
+
sequence.pipelinedValue = this.ngZone.runOutsideAngular(() => this.maybeTrace(() => {
|
|
8771
|
+
const hookFn = sequence.hooks[phase];
|
|
8772
|
+
const value = hookFn(sequence.pipelinedValue);
|
|
8773
|
+
return value;
|
|
8774
|
+
}, sequence.snapshot));
|
|
8767
8775
|
}
|
|
8768
8776
|
catch (err) {
|
|
8769
8777
|
sequence.erroredOrDestroyed = true;
|
|
@@ -8789,6 +8797,9 @@ class AfterRenderImpl {
|
|
|
8789
8797
|
this.scheduler.notify(8 /* NotificationSource.DeferredRenderHook */);
|
|
8790
8798
|
}
|
|
8791
8799
|
this.deferredRegistrations.clear();
|
|
8800
|
+
if (hasSequencesToExecute) {
|
|
8801
|
+
profiler(17 /* ProfilerEvent.AfterRenderHooksEnd */);
|
|
8802
|
+
}
|
|
8792
8803
|
}
|
|
8793
8804
|
register(sequence) {
|
|
8794
8805
|
if (!this.executing) {
|
|
@@ -12076,131 +12087,12 @@ function extractAttrsAndClassesFromSelector(selector) {
|
|
|
12076
12087
|
}
|
|
12077
12088
|
i++;
|
|
12078
12089
|
}
|
|
12079
|
-
|
|
12080
|
-
attrs.push(1 /* AttributeMarker.Classes */, ...classes);
|
|
12081
|
-
}
|
|
12082
|
-
return attrs;
|
|
12090
|
+
return { attrs, classes };
|
|
12083
12091
|
}
|
|
12084
12092
|
|
|
12085
12093
|
/** A special value which designates that a value has not changed. */
|
|
12086
12094
|
const NO_CHANGE = typeof ngDevMode === 'undefined' || ngDevMode ? { __brand__: 'NO_CHANGE' } : {};
|
|
12087
12095
|
|
|
12088
|
-
function createTextNode(renderer, value) {
|
|
12089
|
-
ngDevMode && ngDevMode.rendererCreateTextNode++;
|
|
12090
|
-
ngDevMode && ngDevMode.rendererSetText++;
|
|
12091
|
-
return renderer.createText(value);
|
|
12092
|
-
}
|
|
12093
|
-
function updateTextNode(renderer, rNode, value) {
|
|
12094
|
-
ngDevMode && ngDevMode.rendererSetText++;
|
|
12095
|
-
renderer.setValue(rNode, value);
|
|
12096
|
-
}
|
|
12097
|
-
function createCommentNode(renderer, value) {
|
|
12098
|
-
ngDevMode && ngDevMode.rendererCreateComment++;
|
|
12099
|
-
return renderer.createComment(escapeCommentText(value));
|
|
12100
|
-
}
|
|
12101
|
-
/**
|
|
12102
|
-
* Creates a native element from a tag name, using a renderer.
|
|
12103
|
-
* @param renderer A renderer to use
|
|
12104
|
-
* @param name the tag name
|
|
12105
|
-
* @param namespace Optional namespace for element.
|
|
12106
|
-
* @returns the element created
|
|
12107
|
-
*/
|
|
12108
|
-
function createElementNode(renderer, name, namespace) {
|
|
12109
|
-
ngDevMode && ngDevMode.rendererCreateElement++;
|
|
12110
|
-
return renderer.createElement(name, namespace);
|
|
12111
|
-
}
|
|
12112
|
-
/**
|
|
12113
|
-
* Inserts a native node before another native node for a given parent.
|
|
12114
|
-
* This is a utility function that can be used when native nodes were determined.
|
|
12115
|
-
*/
|
|
12116
|
-
function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {
|
|
12117
|
-
ngDevMode && ngDevMode.rendererInsertBefore++;
|
|
12118
|
-
renderer.insertBefore(parent, child, beforeNode, isMove);
|
|
12119
|
-
}
|
|
12120
|
-
function nativeAppendChild(renderer, parent, child) {
|
|
12121
|
-
ngDevMode && ngDevMode.rendererAppendChild++;
|
|
12122
|
-
ngDevMode && assertDefined(parent, 'parent node must be defined');
|
|
12123
|
-
renderer.appendChild(parent, child);
|
|
12124
|
-
}
|
|
12125
|
-
function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {
|
|
12126
|
-
if (beforeNode !== null) {
|
|
12127
|
-
nativeInsertBefore(renderer, parent, child, beforeNode, isMove);
|
|
12128
|
-
}
|
|
12129
|
-
else {
|
|
12130
|
-
nativeAppendChild(renderer, parent, child);
|
|
12131
|
-
}
|
|
12132
|
-
}
|
|
12133
|
-
/**
|
|
12134
|
-
* Removes a native node itself using a given renderer. To remove the node we are looking up its
|
|
12135
|
-
* parent from the native tree as not all platforms / browsers support the equivalent of
|
|
12136
|
-
* node.remove().
|
|
12137
|
-
*
|
|
12138
|
-
* @param renderer A renderer to be used
|
|
12139
|
-
* @param rNode The native node that should be removed
|
|
12140
|
-
* @param isHostElement A flag indicating if a node to be removed is a host of a component.
|
|
12141
|
-
*/
|
|
12142
|
-
function nativeRemoveNode(renderer, rNode, isHostElement) {
|
|
12143
|
-
ngDevMode && ngDevMode.rendererRemoveNode++;
|
|
12144
|
-
renderer.removeChild(null, rNode, isHostElement);
|
|
12145
|
-
}
|
|
12146
|
-
/**
|
|
12147
|
-
* Clears the contents of a given RElement.
|
|
12148
|
-
*
|
|
12149
|
-
* @param rElement the native RElement to be cleared
|
|
12150
|
-
*/
|
|
12151
|
-
function clearElementContents(rElement) {
|
|
12152
|
-
rElement.textContent = '';
|
|
12153
|
-
}
|
|
12154
|
-
/**
|
|
12155
|
-
* Write `cssText` to `RElement`.
|
|
12156
|
-
*
|
|
12157
|
-
* This function does direct write without any reconciliation. Used for writing initial values, so
|
|
12158
|
-
* that static styling values do not pull in the style parser.
|
|
12159
|
-
*
|
|
12160
|
-
* @param renderer Renderer to use
|
|
12161
|
-
* @param element The element which needs to be updated.
|
|
12162
|
-
* @param newValue The new class list to write.
|
|
12163
|
-
*/
|
|
12164
|
-
function writeDirectStyle(renderer, element, newValue) {
|
|
12165
|
-
ngDevMode && assertString(newValue, "'newValue' should be a string");
|
|
12166
|
-
renderer.setAttribute(element, 'style', newValue);
|
|
12167
|
-
ngDevMode && ngDevMode.rendererSetStyle++;
|
|
12168
|
-
}
|
|
12169
|
-
/**
|
|
12170
|
-
* Write `className` to `RElement`.
|
|
12171
|
-
*
|
|
12172
|
-
* This function does direct write without any reconciliation. Used for writing initial values, so
|
|
12173
|
-
* that static styling values do not pull in the style parser.
|
|
12174
|
-
*
|
|
12175
|
-
* @param renderer Renderer to use
|
|
12176
|
-
* @param element The element which needs to be updated.
|
|
12177
|
-
* @param newValue The new class list to write.
|
|
12178
|
-
*/
|
|
12179
|
-
function writeDirectClass(renderer, element, newValue) {
|
|
12180
|
-
ngDevMode && assertString(newValue, "'newValue' should be a string");
|
|
12181
|
-
if (newValue === '') {
|
|
12182
|
-
// There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.
|
|
12183
|
-
renderer.removeAttribute(element, 'class');
|
|
12184
|
-
}
|
|
12185
|
-
else {
|
|
12186
|
-
renderer.setAttribute(element, 'class', newValue);
|
|
12187
|
-
}
|
|
12188
|
-
ngDevMode && ngDevMode.rendererSetClassName++;
|
|
12189
|
-
}
|
|
12190
|
-
/** Sets up the static DOM attributes on an `RNode`. */
|
|
12191
|
-
function setupStaticAttributes(renderer, element, tNode) {
|
|
12192
|
-
const { mergedAttrs, classes, styles } = tNode;
|
|
12193
|
-
if (mergedAttrs !== null) {
|
|
12194
|
-
setUpAttributes(renderer, element, mergedAttrs);
|
|
12195
|
-
}
|
|
12196
|
-
if (classes !== null) {
|
|
12197
|
-
writeDirectClass(renderer, element, classes);
|
|
12198
|
-
}
|
|
12199
|
-
if (styles !== null) {
|
|
12200
|
-
writeDirectStyle(renderer, element, styles);
|
|
12201
|
-
}
|
|
12202
|
-
}
|
|
12203
|
-
|
|
12204
12096
|
/**
|
|
12205
12097
|
* Advances to an element for later binding instructions.
|
|
12206
12098
|
*
|
|
@@ -12320,6 +12212,122 @@ function writeToDirectiveInput(def, instance, publicName, privateName, flags, va
|
|
|
12320
12212
|
}
|
|
12321
12213
|
}
|
|
12322
12214
|
|
|
12215
|
+
function createTextNode(renderer, value) {
|
|
12216
|
+
ngDevMode && ngDevMode.rendererCreateTextNode++;
|
|
12217
|
+
ngDevMode && ngDevMode.rendererSetText++;
|
|
12218
|
+
return renderer.createText(value);
|
|
12219
|
+
}
|
|
12220
|
+
function updateTextNode(renderer, rNode, value) {
|
|
12221
|
+
ngDevMode && ngDevMode.rendererSetText++;
|
|
12222
|
+
renderer.setValue(rNode, value);
|
|
12223
|
+
}
|
|
12224
|
+
function createCommentNode(renderer, value) {
|
|
12225
|
+
ngDevMode && ngDevMode.rendererCreateComment++;
|
|
12226
|
+
return renderer.createComment(escapeCommentText(value));
|
|
12227
|
+
}
|
|
12228
|
+
/**
|
|
12229
|
+
* Creates a native element from a tag name, using a renderer.
|
|
12230
|
+
* @param renderer A renderer to use
|
|
12231
|
+
* @param name the tag name
|
|
12232
|
+
* @param namespace Optional namespace for element.
|
|
12233
|
+
* @returns the element created
|
|
12234
|
+
*/
|
|
12235
|
+
function createElementNode(renderer, name, namespace) {
|
|
12236
|
+
ngDevMode && ngDevMode.rendererCreateElement++;
|
|
12237
|
+
return renderer.createElement(name, namespace);
|
|
12238
|
+
}
|
|
12239
|
+
/**
|
|
12240
|
+
* Inserts a native node before another native node for a given parent.
|
|
12241
|
+
* This is a utility function that can be used when native nodes were determined.
|
|
12242
|
+
*/
|
|
12243
|
+
function nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {
|
|
12244
|
+
ngDevMode && ngDevMode.rendererInsertBefore++;
|
|
12245
|
+
renderer.insertBefore(parent, child, beforeNode, isMove);
|
|
12246
|
+
}
|
|
12247
|
+
function nativeAppendChild(renderer, parent, child) {
|
|
12248
|
+
ngDevMode && ngDevMode.rendererAppendChild++;
|
|
12249
|
+
ngDevMode && assertDefined(parent, 'parent node must be defined');
|
|
12250
|
+
renderer.appendChild(parent, child);
|
|
12251
|
+
}
|
|
12252
|
+
function nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {
|
|
12253
|
+
if (beforeNode !== null) {
|
|
12254
|
+
nativeInsertBefore(renderer, parent, child, beforeNode, isMove);
|
|
12255
|
+
}
|
|
12256
|
+
else {
|
|
12257
|
+
nativeAppendChild(renderer, parent, child);
|
|
12258
|
+
}
|
|
12259
|
+
}
|
|
12260
|
+
/**
|
|
12261
|
+
* Removes a native node itself using a given renderer. To remove the node we are looking up its
|
|
12262
|
+
* parent from the native tree as not all platforms / browsers support the equivalent of
|
|
12263
|
+
* node.remove().
|
|
12264
|
+
*
|
|
12265
|
+
* @param renderer A renderer to be used
|
|
12266
|
+
* @param rNode The native node that should be removed
|
|
12267
|
+
* @param isHostElement A flag indicating if a node to be removed is a host of a component.
|
|
12268
|
+
*/
|
|
12269
|
+
function nativeRemoveNode(renderer, rNode, isHostElement) {
|
|
12270
|
+
ngDevMode && ngDevMode.rendererRemoveNode++;
|
|
12271
|
+
renderer.removeChild(null, rNode, isHostElement);
|
|
12272
|
+
}
|
|
12273
|
+
/**
|
|
12274
|
+
* Clears the contents of a given RElement.
|
|
12275
|
+
*
|
|
12276
|
+
* @param rElement the native RElement to be cleared
|
|
12277
|
+
*/
|
|
12278
|
+
function clearElementContents(rElement) {
|
|
12279
|
+
rElement.textContent = '';
|
|
12280
|
+
}
|
|
12281
|
+
/**
|
|
12282
|
+
* Write `cssText` to `RElement`.
|
|
12283
|
+
*
|
|
12284
|
+
* This function does direct write without any reconciliation. Used for writing initial values, so
|
|
12285
|
+
* that static styling values do not pull in the style parser.
|
|
12286
|
+
*
|
|
12287
|
+
* @param renderer Renderer to use
|
|
12288
|
+
* @param element The element which needs to be updated.
|
|
12289
|
+
* @param newValue The new class list to write.
|
|
12290
|
+
*/
|
|
12291
|
+
function writeDirectStyle(renderer, element, newValue) {
|
|
12292
|
+
ngDevMode && assertString(newValue, "'newValue' should be a string");
|
|
12293
|
+
renderer.setAttribute(element, 'style', newValue);
|
|
12294
|
+
ngDevMode && ngDevMode.rendererSetStyle++;
|
|
12295
|
+
}
|
|
12296
|
+
/**
|
|
12297
|
+
* Write `className` to `RElement`.
|
|
12298
|
+
*
|
|
12299
|
+
* This function does direct write without any reconciliation. Used for writing initial values, so
|
|
12300
|
+
* that static styling values do not pull in the style parser.
|
|
12301
|
+
*
|
|
12302
|
+
* @param renderer Renderer to use
|
|
12303
|
+
* @param element The element which needs to be updated.
|
|
12304
|
+
* @param newValue The new class list to write.
|
|
12305
|
+
*/
|
|
12306
|
+
function writeDirectClass(renderer, element, newValue) {
|
|
12307
|
+
ngDevMode && assertString(newValue, "'newValue' should be a string");
|
|
12308
|
+
if (newValue === '') {
|
|
12309
|
+
// There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.
|
|
12310
|
+
renderer.removeAttribute(element, 'class');
|
|
12311
|
+
}
|
|
12312
|
+
else {
|
|
12313
|
+
renderer.setAttribute(element, 'class', newValue);
|
|
12314
|
+
}
|
|
12315
|
+
ngDevMode && ngDevMode.rendererSetClassName++;
|
|
12316
|
+
}
|
|
12317
|
+
/** Sets up the static DOM attributes on an `RNode`. */
|
|
12318
|
+
function setupStaticAttributes(renderer, element, tNode) {
|
|
12319
|
+
const { mergedAttrs, classes, styles } = tNode;
|
|
12320
|
+
if (mergedAttrs !== null) {
|
|
12321
|
+
setUpAttributes(renderer, element, mergedAttrs);
|
|
12322
|
+
}
|
|
12323
|
+
if (classes !== null) {
|
|
12324
|
+
writeDirectClass(renderer, element, classes);
|
|
12325
|
+
}
|
|
12326
|
+
if (styles !== null) {
|
|
12327
|
+
writeDirectStyle(renderer, element, styles);
|
|
12328
|
+
}
|
|
12329
|
+
}
|
|
12330
|
+
|
|
12323
12331
|
function createLView(parentLView, tView, context, flags, host, tHostNode, environment, renderer, injector, embeddedViewInjector, hydrationInfo) {
|
|
12324
12332
|
const lView = tView.blueprint.slice();
|
|
12325
12333
|
lView[HOST] = host;
|
|
@@ -12408,17 +12416,10 @@ function executeTemplate(tView, lView, templateFn, rf, context) {
|
|
|
12408
12416
|
/**
|
|
12409
12417
|
* Creates directive instances.
|
|
12410
12418
|
*/
|
|
12411
|
-
function
|
|
12419
|
+
function createDirectivesInstances(tView, lView, tNode) {
|
|
12412
12420
|
if (!getBindingsEnabled())
|
|
12413
12421
|
return;
|
|
12414
|
-
|
|
12415
|
-
createDirectivesInstances(tView, lView, tNode);
|
|
12416
|
-
}
|
|
12417
|
-
/**
|
|
12418
|
-
* Creates directive instances.
|
|
12419
|
-
*/
|
|
12420
|
-
function createDirectivesInstances(tView, lView, tNode) {
|
|
12421
|
-
instantiateAllDirectives(tView, lView, tNode);
|
|
12422
|
+
instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));
|
|
12422
12423
|
if ((tNode.flags & 64 /* TNodeFlags.hasHostBindings */) === 64 /* TNodeFlags.hasHostBindings */) {
|
|
12423
12424
|
invokeDirectivesHostBindings(tView, lView, tNode);
|
|
12424
12425
|
}
|
|
@@ -12802,9 +12803,16 @@ function resolveDirectives(tView, lView, tNode, localRefs) {
|
|
|
12802
12803
|
ngDevMode && assertFirstCreatePass(tView);
|
|
12803
12804
|
if (getBindingsEnabled()) {
|
|
12804
12805
|
const exportsMap = localRefs === null ? null : { '': -1 };
|
|
12805
|
-
const
|
|
12806
|
-
|
|
12807
|
-
|
|
12806
|
+
const matchResult = findDirectiveDefMatches(tView, tNode);
|
|
12807
|
+
let directiveDefs;
|
|
12808
|
+
let hostDirectiveDefs;
|
|
12809
|
+
if (matchResult === null) {
|
|
12810
|
+
directiveDefs = hostDirectiveDefs = null;
|
|
12811
|
+
}
|
|
12812
|
+
else {
|
|
12813
|
+
[directiveDefs, hostDirectiveDefs] = matchResult;
|
|
12814
|
+
}
|
|
12815
|
+
if (directiveDefs !== null) {
|
|
12808
12816
|
initializeDirectives(tView, lView, tNode, directiveDefs, exportsMap, hostDirectiveDefs);
|
|
12809
12817
|
}
|
|
12810
12818
|
if (exportsMap)
|
|
@@ -12916,18 +12924,19 @@ function lastSelectedElementIdx(hostBindingOpCodes) {
|
|
|
12916
12924
|
/**
|
|
12917
12925
|
* Instantiate all the directives that were previously resolved on the current node.
|
|
12918
12926
|
*/
|
|
12919
|
-
function instantiateAllDirectives(tView, lView, tNode) {
|
|
12927
|
+
function instantiateAllDirectives(tView, lView, tNode, native) {
|
|
12920
12928
|
const start = tNode.directiveStart;
|
|
12921
12929
|
const end = tNode.directiveEnd;
|
|
12922
12930
|
// The component view needs to be created before creating the node injector
|
|
12923
12931
|
// since it is used to inject some special symbols like `ChangeDetectorRef`.
|
|
12924
12932
|
if (isComponentHost(tNode)) {
|
|
12925
12933
|
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */);
|
|
12926
|
-
|
|
12934
|
+
addComponentLogic(lView, tNode, tView.data[start + tNode.componentOffset]);
|
|
12927
12935
|
}
|
|
12928
12936
|
if (!tView.firstCreatePass) {
|
|
12929
12937
|
getOrCreateNodeInjectorForNode(tNode, lView);
|
|
12930
12938
|
}
|
|
12939
|
+
attachPatchData(native, lView);
|
|
12931
12940
|
const initialInputs = tNode.initialInputs;
|
|
12932
12941
|
for (let i = start; i < end; i++) {
|
|
12933
12942
|
const def = tView.data[i];
|
|
@@ -12983,63 +12992,60 @@ function findDirectiveDefMatches(tView, tNode) {
|
|
|
12983
12992
|
ngDevMode && assertTNodeType(tNode, 3 /* TNodeType.AnyRNode */ | 12 /* TNodeType.AnyContainer */);
|
|
12984
12993
|
const registry = tView.directiveRegistry;
|
|
12985
12994
|
let matches = null;
|
|
12995
|
+
let hostDirectiveDefs = null;
|
|
12986
12996
|
if (registry) {
|
|
12987
12997
|
for (let i = 0; i < registry.length; i++) {
|
|
12988
12998
|
const def = registry[i];
|
|
12989
12999
|
if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {
|
|
12990
|
-
matches
|
|
13000
|
+
matches || (matches = []);
|
|
12991
13001
|
if (isComponentDef(def)) {
|
|
12992
13002
|
if (ngDevMode) {
|
|
12993
13003
|
assertTNodeType(tNode, 2 /* TNodeType.Element */, `"${tNode.value}" tags cannot be used as component hosts. ` +
|
|
12994
13004
|
`Please use a different tag to activate the ${stringify(def.type)} component.`);
|
|
12995
|
-
if (
|
|
13005
|
+
if (isComponentHost(tNode)) {
|
|
12996
13006
|
throwMultipleComponentError(tNode, matches.find(isComponentDef).type, def.type);
|
|
12997
13007
|
}
|
|
12998
13008
|
}
|
|
12999
|
-
matches
|
|
13009
|
+
// Components are inserted at the front of the matches array so that their lifecycle
|
|
13010
|
+
// hooks run before any directive lifecycle hooks. This appears to be for ViewEngine
|
|
13011
|
+
// compatibility. This logic doesn't make sense with host directives, because it
|
|
13012
|
+
// would allow the host directives to undo any overrides the host may have made.
|
|
13013
|
+
// To handle this case, the host directives of components are inserted at the beginning
|
|
13014
|
+
// of the array, followed by the component. As such, the insertion order is as follows:
|
|
13015
|
+
// 1. Host directives belonging to the selector-matched component.
|
|
13016
|
+
// 2. Selector-matched component.
|
|
13017
|
+
// 3. Host directives belonging to selector-matched directives.
|
|
13018
|
+
// 4. Selector-matched directives.
|
|
13019
|
+
if (def.findHostDirectiveDefs !== null) {
|
|
13020
|
+
const hostDirectiveMatches = [];
|
|
13021
|
+
hostDirectiveDefs = hostDirectiveDefs || new Map();
|
|
13022
|
+
def.findHostDirectiveDefs(def, hostDirectiveMatches, hostDirectiveDefs);
|
|
13023
|
+
// Add all host directives declared on this component, followed by the component itself.
|
|
13024
|
+
// Host directives should execute first so the host has a chance to override changes
|
|
13025
|
+
// to the DOM made by them.
|
|
13026
|
+
matches.unshift(...hostDirectiveMatches, def);
|
|
13027
|
+
// Component is offset starting from the beginning of the host directives array.
|
|
13028
|
+
const componentOffset = hostDirectiveMatches.length;
|
|
13029
|
+
markAsComponentHost(tView, tNode, componentOffset);
|
|
13030
|
+
}
|
|
13031
|
+
else {
|
|
13032
|
+
// No host directives on this component, just add the
|
|
13033
|
+
// component def to the beginning of the matches.
|
|
13034
|
+
matches.unshift(def);
|
|
13035
|
+
markAsComponentHost(tView, tNode, 0);
|
|
13036
|
+
}
|
|
13000
13037
|
}
|
|
13001
13038
|
else {
|
|
13039
|
+
// Append any host directives to the matches first.
|
|
13040
|
+
hostDirectiveDefs = hostDirectiveDefs || new Map();
|
|
13041
|
+
def.findHostDirectiveDefs?.(def, matches, hostDirectiveDefs);
|
|
13002
13042
|
matches.push(def);
|
|
13003
13043
|
}
|
|
13004
13044
|
}
|
|
13005
13045
|
}
|
|
13006
13046
|
}
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
function resolveHostDirectives(tView, tNode, matches) {
|
|
13010
|
-
const allDirectiveDefs = [];
|
|
13011
|
-
let hostDirectiveDefs = null;
|
|
13012
|
-
for (const def of matches) {
|
|
13013
|
-
if (def.findHostDirectiveDefs !== null) {
|
|
13014
|
-
// TODO(pk): probably could return matches instead of taking in an array to fill in?
|
|
13015
|
-
hostDirectiveDefs ??= new Map();
|
|
13016
|
-
// Components are inserted at the front of the matches array so that their lifecycle
|
|
13017
|
-
// hooks run before any directive lifecycle hooks. This appears to be for ViewEngine
|
|
13018
|
-
// compatibility. This logic doesn't make sense with host directives, because it
|
|
13019
|
-
// would allow the host directives to undo any overrides the host may have made.
|
|
13020
|
-
// To handle this case, the host directives of components are inserted at the beginning
|
|
13021
|
-
// of the array, followed by the component. As such, the insertion order is as follows:
|
|
13022
|
-
// 1. Host directives belonging to the selector-matched component.
|
|
13023
|
-
// 2. Selector-matched component.
|
|
13024
|
-
// 3. Host directives belonging to selector-matched directives.
|
|
13025
|
-
// 4. Selector-matched directives.
|
|
13026
|
-
def.findHostDirectiveDefs(def, allDirectiveDefs, hostDirectiveDefs);
|
|
13027
|
-
}
|
|
13028
|
-
if (isComponentDef(def)) {
|
|
13029
|
-
allDirectiveDefs.push(def);
|
|
13030
|
-
markAsComponentHost(tView, tNode, allDirectiveDefs.length - 1);
|
|
13031
|
-
}
|
|
13032
|
-
}
|
|
13033
|
-
if (isComponentHost(tNode)) {
|
|
13034
|
-
allDirectiveDefs.push(...matches.slice(1));
|
|
13035
|
-
}
|
|
13036
|
-
else {
|
|
13037
|
-
allDirectiveDefs.push(...matches);
|
|
13038
|
-
}
|
|
13039
|
-
if (ngDevMode) {
|
|
13040
|
-
assertNoDuplicateDirectives(allDirectiveDefs);
|
|
13041
|
-
}
|
|
13042
|
-
return [allDirectiveDefs, hostDirectiveDefs];
|
|
13047
|
+
ngDevMode && matches !== null && assertNoDuplicateDirectives(matches);
|
|
13048
|
+
return matches === null ? null : [matches, hostDirectiveDefs];
|
|
13043
13049
|
}
|
|
13044
13050
|
/**
|
|
13045
13051
|
* Marks a given TNode as a component's host. This consists of:
|
|
@@ -13135,7 +13141,7 @@ function getInitialLViewFlagsFromDef(def) {
|
|
|
13135
13141
|
}
|
|
13136
13142
|
return flags;
|
|
13137
13143
|
}
|
|
13138
|
-
function
|
|
13144
|
+
function addComponentLogic(lView, hostTNode, def) {
|
|
13139
13145
|
const native = getNativeByTNode(hostTNode, lView);
|
|
13140
13146
|
const tView = getOrCreateComponentTView(def);
|
|
13141
13147
|
// Only component views should be added to the view tree directly. Embedded views are
|
|
@@ -13144,7 +13150,7 @@ function createComponentLView(lView, hostTNode, def) {
|
|
|
13144
13150
|
const componentView = addToEndOfViewTree(lView, createLView(lView, tView, null, getInitialLViewFlagsFromDef(def), native, hostTNode, null, rendererFactory.createRenderer(native, def), null, null, null));
|
|
13145
13151
|
// Component view will always be created before any injected LContainers,
|
|
13146
13152
|
// so this is a regular element, wrap it with the component view
|
|
13147
|
-
|
|
13153
|
+
lView[hostTNode.index] = componentView;
|
|
13148
13154
|
}
|
|
13149
13155
|
function elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) {
|
|
13150
13156
|
if (ngDevMode) {
|
|
@@ -13394,7 +13400,9 @@ function renderComponent(hostLView, componentHostIdx) {
|
|
|
13394
13400
|
if (hostRNode !== null && componentView[HYDRATION] === null) {
|
|
13395
13401
|
componentView[HYDRATION] = retrieveHydrationInfo(hostRNode, componentView[INJECTOR]);
|
|
13396
13402
|
}
|
|
13403
|
+
profiler(18 /* ProfilerEvent.ComponentStart */);
|
|
13397
13404
|
renderView(componentTView, componentView, componentView[CONTEXT]);
|
|
13405
|
+
profiler(19 /* ProfilerEvent.ComponentEnd */, componentView[CONTEXT]);
|
|
13398
13406
|
}
|
|
13399
13407
|
/**
|
|
13400
13408
|
* Syncs an LView instance with its blueprint if they have gotten out of sync.
|
|
@@ -13540,15 +13548,6 @@ function ensureIcuContainerVisitorLoaded(loader) {
|
|
|
13540
13548
|
}
|
|
13541
13549
|
}
|
|
13542
13550
|
|
|
13543
|
-
/**
|
|
13544
|
-
* Checks whether a TNode is considered detached, i.e. not present in the
|
|
13545
|
-
* translated i18n template. We should not attempt hydration for such nodes
|
|
13546
|
-
* and instead, use a regular "creation mode".
|
|
13547
|
-
*/
|
|
13548
|
-
function isDetachedByI18n(tNode) {
|
|
13549
|
-
return (tNode.flags & 32 /* TNodeFlags.isDetached */) === 32 /* TNodeFlags.isDetached */;
|
|
13550
|
-
}
|
|
13551
|
-
|
|
13552
13551
|
/**
|
|
13553
13552
|
* NOTE: for performance reasons, the possible actions are inlined within the function instead of
|
|
13554
13553
|
* being passed as an argument.
|
|
@@ -14025,9 +14024,10 @@ function getClosestRElement(tView, tNode, lView) {
|
|
|
14025
14024
|
}
|
|
14026
14025
|
else {
|
|
14027
14026
|
ngDevMode && assertTNodeType(parentTNode, 3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */);
|
|
14028
|
-
|
|
14027
|
+
const { componentOffset } = parentTNode;
|
|
14028
|
+
if (componentOffset > -1) {
|
|
14029
14029
|
ngDevMode && assertTNodeForLView(parentTNode, lView);
|
|
14030
|
-
const { encapsulation } = tView.data[parentTNode.directiveStart +
|
|
14030
|
+
const { encapsulation } = tView.data[parentTNode.directiveStart + componentOffset];
|
|
14031
14031
|
// We've got a parent which is an element in the current view. We just need to verify if the
|
|
14032
14032
|
// parent element is not a component. Component's content nodes are not inserted immediately
|
|
14033
14033
|
// because they will be projected, and so doing insert at this point would be wasteful.
|
|
@@ -14218,7 +14218,7 @@ function applyNodes(renderer, action, tNode, lView, parentRElement, beforeNode,
|
|
|
14218
14218
|
tNode.flags |= 2 /* TNodeFlags.isProjected */;
|
|
14219
14219
|
}
|
|
14220
14220
|
}
|
|
14221
|
-
if (
|
|
14221
|
+
if ((tNode.flags & 32 /* TNodeFlags.isDetached */) !== 32 /* TNodeFlags.isDetached */) {
|
|
14222
14222
|
if (tNodeType & 8 /* TNodeType.ElementContainer */) {
|
|
14223
14223
|
applyNodes(renderer, action, tNode.child, lView, parentRElement, beforeNode, false);
|
|
14224
14224
|
applyToElementOrContainer(action, renderer, parentRElement, rawSlotValue, beforeNode);
|
|
@@ -14935,8 +14935,10 @@ function markTransplantedViewsForRefresh(lView) {
|
|
|
14935
14935
|
*/
|
|
14936
14936
|
function detectChangesInComponent(hostLView, componentHostIdx, mode) {
|
|
14937
14937
|
ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');
|
|
14938
|
+
profiler(18 /* ProfilerEvent.ComponentStart */);
|
|
14938
14939
|
const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);
|
|
14939
14940
|
detectChangesInViewIfAttached(componentView, mode);
|
|
14941
|
+
profiler(19 /* ProfilerEvent.ComponentEnd */, componentView[CONTEXT]);
|
|
14940
14942
|
}
|
|
14941
14943
|
/**
|
|
14942
14944
|
* Visits a view as part of change detection traversal.
|
|
@@ -17826,6 +17828,15 @@ function getNamespace(elementName) {
|
|
|
17826
17828
|
const name = elementName.toLowerCase();
|
|
17827
17829
|
return name === 'svg' ? SVG_NAMESPACE : name === 'math' ? MATH_ML_NAMESPACE : null;
|
|
17828
17830
|
}
|
|
17831
|
+
// TODO(pk): change the extractAttrsAndClassesFromSelector so it returns TAttributes already?
|
|
17832
|
+
function getRootTAttributesFromSelector(selector) {
|
|
17833
|
+
const { attrs, classes } = extractAttrsAndClassesFromSelector(selector);
|
|
17834
|
+
const tAtts = attrs;
|
|
17835
|
+
if (classes.length) {
|
|
17836
|
+
tAtts.push(1 /* AttributeMarker.Classes */, ...classes);
|
|
17837
|
+
}
|
|
17838
|
+
return tAtts;
|
|
17839
|
+
}
|
|
17829
17840
|
/**
|
|
17830
17841
|
* ComponentFactory interface implementation.
|
|
17831
17842
|
*/
|
|
@@ -17862,10 +17873,13 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
17862
17873
|
this.ngModule = ngModule;
|
|
17863
17874
|
this.componentType = componentDef.type;
|
|
17864
17875
|
this.selector = stringifyCSSSelectorList(componentDef.selectors);
|
|
17865
|
-
this.ngContentSelectors = componentDef.ngContentSelectors
|
|
17876
|
+
this.ngContentSelectors = componentDef.ngContentSelectors
|
|
17877
|
+
? componentDef.ngContentSelectors
|
|
17878
|
+
: [];
|
|
17866
17879
|
this.isBoundToModule = !!ngModule;
|
|
17867
17880
|
}
|
|
17868
17881
|
create(injector, projectableNodes, rootSelectorOrNode, environmentInjector) {
|
|
17882
|
+
profiler(22 /* ProfilerEvent.DynamicComponentStart */);
|
|
17869
17883
|
const prevConsumer = setActiveConsumer$1(null);
|
|
17870
17884
|
try {
|
|
17871
17885
|
// Check if the component is orphan
|
|
@@ -17931,20 +17945,30 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
17931
17945
|
// `createRootComponentView` and `createRootComponent` both read global state. Fixing those
|
|
17932
17946
|
// issues would allow us to drop this.
|
|
17933
17947
|
enterView(rootLView);
|
|
17948
|
+
let component;
|
|
17934
17949
|
let componentView = null;
|
|
17935
17950
|
try {
|
|
17951
|
+
const rootComponentDef = this.componentDef;
|
|
17952
|
+
let rootDirectives;
|
|
17953
|
+
let hostDirectiveDefs = null;
|
|
17954
|
+
if (rootComponentDef.findHostDirectiveDefs) {
|
|
17955
|
+
rootDirectives = [];
|
|
17956
|
+
hostDirectiveDefs = new Map();
|
|
17957
|
+
rootComponentDef.findHostDirectiveDefs(rootComponentDef, rootDirectives, hostDirectiveDefs);
|
|
17958
|
+
rootDirectives.push(rootComponentDef);
|
|
17959
|
+
ngDevMode && assertNoDuplicateDirectives(rootDirectives);
|
|
17960
|
+
}
|
|
17961
|
+
else {
|
|
17962
|
+
rootDirectives = [rootComponentDef];
|
|
17963
|
+
}
|
|
17936
17964
|
// If host dom element is created (instead of being provided as part of the dynamic component creation), also apply attributes and classes extracted from component selector.
|
|
17937
17965
|
const tAttributes = rootSelectorOrNode
|
|
17938
|
-
? ['ng-version', '19.
|
|
17966
|
+
? ['ng-version', '19.2.0-next.0']
|
|
17939
17967
|
: // Extract attributes and classes from the first selector only to match VE behavior.
|
|
17940
|
-
|
|
17968
|
+
getRootTAttributesFromSelector(this.componentDef.selectors[0]);
|
|
17941
17969
|
// TODO: this logic is shared with the element instruction first create pass
|
|
17942
17970
|
const hostTNode = getOrCreateTNode(rootTView, HEADER_OFFSET, 2 /* TNodeType.Element */, '#host', tAttributes);
|
|
17943
|
-
const
|
|
17944
|
-
this.componentDef,
|
|
17945
|
-
]);
|
|
17946
|
-
initializeDirectives(rootTView, rootLView, hostTNode, directiveDefs, {}, hostDirectiveDefs);
|
|
17947
|
-
for (const def of directiveDefs) {
|
|
17971
|
+
for (const def of rootDirectives) {
|
|
17948
17972
|
hostTNode.mergedAttrs = mergeHostAttrs(hostTNode.mergedAttrs, def.hostAttrs);
|
|
17949
17973
|
}
|
|
17950
17974
|
hostTNode.mergedAttrs = mergeHostAttrs(hostTNode.mergedAttrs, tAttributes);
|
|
@@ -17954,19 +17978,14 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
17954
17978
|
// tests so that this check can be removed.
|
|
17955
17979
|
if (hostRNode) {
|
|
17956
17980
|
setupStaticAttributes(hostRenderer, hostRNode, hostTNode);
|
|
17957
|
-
attachPatchData(hostRNode, rootLView);
|
|
17958
17981
|
}
|
|
17982
|
+
componentView = createRootComponentView(hostTNode, hostRNode, rootComponentDef, rootDirectives, rootLView, environment);
|
|
17959
17983
|
if (projectableNodes !== undefined) {
|
|
17960
17984
|
projectNodes(hostTNode, this.ngContentSelectors, projectableNodes);
|
|
17961
17985
|
}
|
|
17962
|
-
// TODO
|
|
17963
|
-
|
|
17964
|
-
|
|
17965
|
-
// TODO(pk): code / logic duplication with the elementEnd and similar instructions
|
|
17966
|
-
registerPostOrderHooks(rootTView, hostTNode);
|
|
17967
|
-
componentView = getComponentLViewByIndex(hostTNode.index, rootLView);
|
|
17968
|
-
// TODO(pk): why do we need this logic?
|
|
17969
|
-
rootLView[CONTEXT] = componentView[CONTEXT];
|
|
17986
|
+
// TODO: should LifecycleHooksFeature and other host features be generated by the compiler
|
|
17987
|
+
// and executed here? Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref
|
|
17988
|
+
component = createRootComponent(componentView, rootComponentDef, rootDirectives, hostDirectiveDefs, rootLView, [LifecycleHooksFeature]);
|
|
17970
17989
|
renderView(rootTView, rootLView, null);
|
|
17971
17990
|
}
|
|
17972
17991
|
catch (e) {
|
|
@@ -17979,9 +17998,11 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
17979
17998
|
throw e;
|
|
17980
17999
|
}
|
|
17981
18000
|
finally {
|
|
18001
|
+
profiler(23 /* ProfilerEvent.DynamicComponentEnd */);
|
|
17982
18002
|
leaveView();
|
|
17983
18003
|
}
|
|
17984
|
-
|
|
18004
|
+
const hostTNode = getTNode(rootTView, HEADER_OFFSET);
|
|
18005
|
+
return new ComponentRef(this.componentType, component, createElementRef(hostTNode, rootLView), rootLView, hostTNode);
|
|
17985
18006
|
}
|
|
17986
18007
|
finally {
|
|
17987
18008
|
setActiveConsumer$1(prevConsumer);
|
|
@@ -17997,20 +18018,20 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
17997
18018
|
*
|
|
17998
18019
|
*/
|
|
17999
18020
|
class ComponentRef extends ComponentRef$1 {
|
|
18021
|
+
location;
|
|
18000
18022
|
_rootLView;
|
|
18023
|
+
_tNode;
|
|
18001
18024
|
instance;
|
|
18002
18025
|
hostView;
|
|
18003
18026
|
changeDetectorRef;
|
|
18004
18027
|
componentType;
|
|
18005
|
-
location;
|
|
18006
18028
|
previousInputValues = null;
|
|
18007
|
-
_tNode
|
|
18008
|
-
constructor(componentType, _rootLView) {
|
|
18029
|
+
constructor(componentType, instance, location, _rootLView, _tNode) {
|
|
18009
18030
|
super();
|
|
18031
|
+
this.location = location;
|
|
18010
18032
|
this._rootLView = _rootLView;
|
|
18011
|
-
this._tNode =
|
|
18012
|
-
this.
|
|
18013
|
-
this.instance = getComponentLViewByIndex(this._tNode.index, _rootLView)[CONTEXT];
|
|
18033
|
+
this._tNode = _tNode;
|
|
18034
|
+
this.instance = instance;
|
|
18014
18035
|
this.hostView = this.changeDetectorRef = new ViewRef$1(_rootLView, undefined /* _cdRefInjectingView */, false /* notifyErrorHandler */);
|
|
18015
18036
|
this.componentType = componentType;
|
|
18016
18037
|
}
|
|
@@ -18050,6 +18071,70 @@ class ComponentRef extends ComponentRef$1 {
|
|
|
18050
18071
|
this.hostView.onDestroy(callback);
|
|
18051
18072
|
}
|
|
18052
18073
|
}
|
|
18074
|
+
/**
|
|
18075
|
+
* Creates the root component view and the root component node.
|
|
18076
|
+
*
|
|
18077
|
+
* @param hostRNode Render host element.
|
|
18078
|
+
* @param rootComponentDef ComponentDef
|
|
18079
|
+
* @param rootView The parent view where the host node is stored
|
|
18080
|
+
* @param rendererFactory Factory to be used for creating child renderers.
|
|
18081
|
+
* @param hostRenderer The current renderer
|
|
18082
|
+
* @param sanitizer The sanitizer, if provided
|
|
18083
|
+
*
|
|
18084
|
+
* @returns Component view created
|
|
18085
|
+
*/
|
|
18086
|
+
function createRootComponentView(tNode, hostRNode, rootComponentDef, rootDirectives, rootView, environment) {
|
|
18087
|
+
const tView = rootView[TVIEW];
|
|
18088
|
+
// Hydration info is on the host element and needs to be retrieved
|
|
18089
|
+
// and passed to the component LView.
|
|
18090
|
+
let hydrationInfo = null;
|
|
18091
|
+
if (hostRNode !== null) {
|
|
18092
|
+
hydrationInfo = retrieveHydrationInfo(hostRNode, rootView[INJECTOR]);
|
|
18093
|
+
}
|
|
18094
|
+
const viewRenderer = environment.rendererFactory.createRenderer(hostRNode, rootComponentDef);
|
|
18095
|
+
const componentView = createLView(rootView, getOrCreateComponentTView(rootComponentDef), null, getInitialLViewFlagsFromDef(rootComponentDef), rootView[tNode.index], tNode, environment, viewRenderer, null, null, hydrationInfo);
|
|
18096
|
+
if (tView.firstCreatePass) {
|
|
18097
|
+
markAsComponentHost(tView, tNode, rootDirectives.length - 1);
|
|
18098
|
+
}
|
|
18099
|
+
addToEndOfViewTree(rootView, componentView);
|
|
18100
|
+
// Store component view at node index, with node as the HOST
|
|
18101
|
+
return (rootView[tNode.index] = componentView);
|
|
18102
|
+
}
|
|
18103
|
+
/**
|
|
18104
|
+
* Creates a root component and sets it up with features and host bindings.Shared by
|
|
18105
|
+
* renderComponent() and ViewContainerRef.createComponent().
|
|
18106
|
+
*/
|
|
18107
|
+
function createRootComponent(componentView, rootComponentDef, rootDirectives, hostDirectiveDefs, rootLView, hostFeatures) {
|
|
18108
|
+
const rootTNode = getCurrentTNode();
|
|
18109
|
+
ngDevMode && assertDefined(rootTNode, 'tNode should have been already created');
|
|
18110
|
+
const tView = rootLView[TVIEW];
|
|
18111
|
+
const native = getNativeByTNode(rootTNode, rootLView);
|
|
18112
|
+
initializeDirectives(tView, rootLView, rootTNode, rootDirectives, null, hostDirectiveDefs);
|
|
18113
|
+
for (let i = 0; i < rootDirectives.length; i++) {
|
|
18114
|
+
const directiveIndex = rootTNode.directiveStart + i;
|
|
18115
|
+
const directiveInstance = getNodeInjectable(rootLView, tView, directiveIndex, rootTNode);
|
|
18116
|
+
attachPatchData(directiveInstance, rootLView);
|
|
18117
|
+
}
|
|
18118
|
+
invokeDirectivesHostBindings(tView, rootLView, rootTNode);
|
|
18119
|
+
if (native) {
|
|
18120
|
+
attachPatchData(native, rootLView);
|
|
18121
|
+
}
|
|
18122
|
+
// We're guaranteed for the `componentOffset` to be positive here
|
|
18123
|
+
// since a root component always matches a component def.
|
|
18124
|
+
ngDevMode &&
|
|
18125
|
+
assertGreaterThan(rootTNode.componentOffset, -1, 'componentOffset must be great than -1');
|
|
18126
|
+
const component = getNodeInjectable(rootLView, tView, rootTNode.directiveStart + rootTNode.componentOffset, rootTNode);
|
|
18127
|
+
componentView[CONTEXT] = rootLView[CONTEXT] = component;
|
|
18128
|
+
if (hostFeatures !== null) {
|
|
18129
|
+
for (const feature of hostFeatures) {
|
|
18130
|
+
feature(component, rootComponentDef);
|
|
18131
|
+
}
|
|
18132
|
+
}
|
|
18133
|
+
// We want to generate an empty QueryList for root content queries for backwards
|
|
18134
|
+
// compatibility with ViewEngine.
|
|
18135
|
+
executeContentQueries(tView, rootTNode, rootLView);
|
|
18136
|
+
return component;
|
|
18137
|
+
}
|
|
18053
18138
|
/** Projects the `projectableNodes` that were specified when creating a root component. */
|
|
18054
18139
|
function projectNodes(tNode, ngContentSelectors, projectableNodes) {
|
|
18055
18140
|
const projection = (tNode.projection = []);
|
|
@@ -18063,6 +18148,24 @@ function projectNodes(tNode, ngContentSelectors, projectableNodes) {
|
|
|
18063
18148
|
projection.push(nodesforSlot != null && nodesforSlot.length ? Array.from(nodesforSlot) : null);
|
|
18064
18149
|
}
|
|
18065
18150
|
}
|
|
18151
|
+
/**
|
|
18152
|
+
* Used to enable lifecycle hooks on the root component.
|
|
18153
|
+
*
|
|
18154
|
+
* Include this feature when calling `renderComponent` if the root component
|
|
18155
|
+
* you are rendering has lifecycle hooks defined. Otherwise, the hooks won't
|
|
18156
|
+
* be called properly.
|
|
18157
|
+
*
|
|
18158
|
+
* Example:
|
|
18159
|
+
*
|
|
18160
|
+
* ```ts
|
|
18161
|
+
* renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});
|
|
18162
|
+
* ```
|
|
18163
|
+
*/
|
|
18164
|
+
function LifecycleHooksFeature() {
|
|
18165
|
+
const tNode = getCurrentTNode();
|
|
18166
|
+
ngDevMode && assertDefined(tNode, 'TNode is required');
|
|
18167
|
+
registerPostOrderHooks(getLView()[TVIEW], tNode);
|
|
18168
|
+
}
|
|
18066
18169
|
|
|
18067
18170
|
/**
|
|
18068
18171
|
* Represents a container where one or more views can be attached to a component.
|
|
@@ -20572,6 +20675,15 @@ function bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {
|
|
|
20572
20675
|
return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;
|
|
20573
20676
|
}
|
|
20574
20677
|
|
|
20678
|
+
/**
|
|
20679
|
+
* Checks whether a TNode is considered detached, i.e. not present in the
|
|
20680
|
+
* translated i18n template. We should not attempt hydration for such nodes
|
|
20681
|
+
* and instead, use a regular "creation mode".
|
|
20682
|
+
*/
|
|
20683
|
+
function isDetachedByI18n(tNode) {
|
|
20684
|
+
return (tNode.flags & 32 /* TNodeFlags.isDetached */) === 32 /* TNodeFlags.isDetached */;
|
|
20685
|
+
}
|
|
20686
|
+
|
|
20575
20687
|
function templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrs, localRefsIndex) {
|
|
20576
20688
|
ngDevMode && assertFirstCreatePass(tView);
|
|
20577
20689
|
ngDevMode && ngDevMode.firstCreatePass++;
|
|
@@ -20621,7 +20733,7 @@ function declareTemplate(declarationLView, declarationTView, index, templateFn,
|
|
|
20621
20733
|
// In client-only mode, this function is a noop.
|
|
20622
20734
|
populateDehydratedViewsInLContainer(lContainer, tNode, declarationLView);
|
|
20623
20735
|
if (isDirectiveHost(tNode)) {
|
|
20624
|
-
|
|
20736
|
+
createDirectivesInstances(declarationTView, declarationLView, tNode);
|
|
20625
20737
|
}
|
|
20626
20738
|
if (localRefsIndex != null) {
|
|
20627
20739
|
saveResolvedLocalsInData(declarationLView, tNode, localRefExtractor);
|
|
@@ -21163,6 +21275,7 @@ function findMatchingDehydratedViewForDeferBlock(lContainer, lDetails) {
|
|
|
21163
21275
|
* Applies changes to the DOM to reflect a given state.
|
|
21164
21276
|
*/
|
|
21165
21277
|
function applyDeferBlockState(newState, lDetails, lContainer, tNode, hostLView) {
|
|
21278
|
+
profiler(20 /* ProfilerEvent.DeferBlockStateStart */);
|
|
21166
21279
|
const stateTmplIndex = getTemplateIndexForState(newState, hostLView, tNode);
|
|
21167
21280
|
if (stateTmplIndex !== null) {
|
|
21168
21281
|
lDetails[DEFER_BLOCK_STATE] = newState;
|
|
@@ -21211,6 +21324,7 @@ function applyDeferBlockState(newState, lDetails, lContainer, tNode, hostLView)
|
|
|
21211
21324
|
lDetails[ON_COMPLETE_FNS] = null;
|
|
21212
21325
|
}
|
|
21213
21326
|
}
|
|
21327
|
+
profiler(21 /* ProfilerEvent.DeferBlockStateEnd */);
|
|
21214
21328
|
}
|
|
21215
21329
|
/**
|
|
21216
21330
|
* Extends the `applyDeferBlockState` with timer-based scheduling.
|
|
@@ -23496,6 +23610,7 @@ class ApplicationRef {
|
|
|
23496
23610
|
* {@example core/ts/platform/platform.ts region='domNode'}
|
|
23497
23611
|
*/
|
|
23498
23612
|
bootstrap(componentOrFactory, rootSelectorOrNode) {
|
|
23613
|
+
profiler(10 /* ProfilerEvent.BootstrapComponentStart */);
|
|
23499
23614
|
(typeof ngDevMode === 'undefined' || ngDevMode) && warnIfDestroyed(this._destroyed);
|
|
23500
23615
|
const isComponentFactory = componentOrFactory instanceof ComponentFactory$1;
|
|
23501
23616
|
const initStatus = this._injector.get(ApplicationInitStatus);
|
|
@@ -23536,6 +23651,7 @@ class ApplicationRef {
|
|
|
23536
23651
|
const _console = this._injector.get(Console);
|
|
23537
23652
|
_console.log(`Angular is running in development mode.`);
|
|
23538
23653
|
}
|
|
23654
|
+
profiler(11 /* ProfilerEvent.BootstrapComponentEnd */, compRef);
|
|
23539
23655
|
return compRef;
|
|
23540
23656
|
}
|
|
23541
23657
|
/**
|
|
@@ -23556,6 +23672,7 @@ class ApplicationRef {
|
|
|
23556
23672
|
}
|
|
23557
23673
|
/** @internal */
|
|
23558
23674
|
_tick = () => {
|
|
23675
|
+
profiler(12 /* ProfilerEvent.ChangeDetectionStart */);
|
|
23559
23676
|
if (this.tracingSnapshot !== null) {
|
|
23560
23677
|
const snapshot = this.tracingSnapshot;
|
|
23561
23678
|
this.tracingSnapshot = null;
|
|
@@ -23588,6 +23705,7 @@ class ApplicationRef {
|
|
|
23588
23705
|
this._runningTick = false;
|
|
23589
23706
|
setActiveConsumer$1(prevConsumer);
|
|
23590
23707
|
this.afterTick.next();
|
|
23708
|
+
profiler(13 /* ProfilerEvent.ChangeDetectionEnd */);
|
|
23591
23709
|
}
|
|
23592
23710
|
};
|
|
23593
23711
|
/**
|
|
@@ -23603,7 +23721,9 @@ class ApplicationRef {
|
|
|
23603
23721
|
this.deferredDirtyFlags = 0 /* ApplicationRefDirtyFlags.None */;
|
|
23604
23722
|
let runs = 0;
|
|
23605
23723
|
while (this.dirtyFlags !== 0 /* ApplicationRefDirtyFlags.None */ && runs++ < MAXIMUM_REFRESH_RERUNS) {
|
|
23724
|
+
profiler(14 /* ProfilerEvent.ChangeDetectionSyncStart */);
|
|
23606
23725
|
this.synchronizeOnce();
|
|
23726
|
+
profiler(15 /* ProfilerEvent.ChangeDetectionSyncEnd */);
|
|
23607
23727
|
}
|
|
23608
23728
|
if ((typeof ngDevMode === 'undefined' || ngDevMode) && runs >= MAXIMUM_REFRESH_RERUNS) {
|
|
23609
23729
|
throw new RuntimeError(103 /* RuntimeErrorCode.INFINITE_CHANGE_DETECTION */, ngDevMode &&
|
|
@@ -28019,7 +28139,7 @@ function ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {
|
|
|
28019
28139
|
}
|
|
28020
28140
|
increaseElementDepthCount();
|
|
28021
28141
|
if (hasDirectives) {
|
|
28022
|
-
|
|
28142
|
+
createDirectivesInstances(tView, lView, tNode);
|
|
28023
28143
|
executeContentQueries(tView, tNode, lView);
|
|
28024
28144
|
}
|
|
28025
28145
|
if (localRefsIndex !== null) {
|
|
@@ -28190,7 +28310,7 @@ function ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {
|
|
|
28190
28310
|
}
|
|
28191
28311
|
attachPatchData(comment, lView);
|
|
28192
28312
|
if (isDirectiveHost(tNode)) {
|
|
28193
|
-
|
|
28313
|
+
createDirectivesInstances(tView, lView, tNode);
|
|
28194
28314
|
executeContentQueries(tView, tNode, lView);
|
|
28195
28315
|
}
|
|
28196
28316
|
if (localRefsIndex != null) {
|
|
@@ -30370,7 +30490,7 @@ function wrapListener(tNode, lView, context, listenerFn) {
|
|
|
30370
30490
|
}
|
|
30371
30491
|
// In order to be backwards compatible with View Engine, events on component host nodes
|
|
30372
30492
|
// must also mark the component view itself dirty (i.e. the view that it owns).
|
|
30373
|
-
const startView =
|
|
30493
|
+
const startView = tNode.componentOffset > -1 ? getComponentLViewByIndex(tNode.index, lView) : lView;
|
|
30374
30494
|
markViewDirty(startView, 5 /* NotificationSource.Listener */);
|
|
30375
30495
|
let result = executeListenerWithErrorHandling(lView, context, listenerFn, e);
|
|
30376
30496
|
// A just-invoked listener function might have coalesced listeners so we need to check for
|
|
@@ -30534,7 +30654,8 @@ function ɵɵprojection(nodeIndex, selectorIndex = 0, attrs, fallbackTemplateFn,
|
|
|
30534
30654
|
if (isEmpty && fallbackIndex !== null) {
|
|
30535
30655
|
insertFallbackContent(lView, tView, fallbackIndex);
|
|
30536
30656
|
}
|
|
30537
|
-
else if (isNodeCreationMode &&
|
|
30657
|
+
else if (isNodeCreationMode &&
|
|
30658
|
+
(tProjectionNode.flags & 32 /* TNodeFlags.isDetached */) !== 32 /* TNodeFlags.isDetached */) {
|
|
30538
30659
|
// re-distribution of projectable nodes is stored on a component's view level
|
|
30539
30660
|
applyProjection(tView, lView, tProjectionNode);
|
|
30540
30661
|
}
|
|
@@ -33335,7 +33456,7 @@ function ɵɵreplaceMetadata(type, applyMetadata, namespaces, locals) {
|
|
|
33335
33456
|
for (const root of trackedViews) {
|
|
33336
33457
|
// Note: we have the additional check, because `IsRoot` can also indicate
|
|
33337
33458
|
// a component created through something like `createComponent`.
|
|
33338
|
-
if (
|
|
33459
|
+
if (root[FLAGS] & 512 /* LViewFlags.IsRoot */ && root[PARENT] === null) {
|
|
33339
33460
|
recreateMatchingLViews(newDef, oldDef, root);
|
|
33340
33461
|
}
|
|
33341
33462
|
}
|
|
@@ -33362,10 +33483,6 @@ function mergeWithExistingDefinition(currentDef, newDef) {
|
|
|
33362
33483
|
// Preserve the old `setInput` function, because it has some state.
|
|
33363
33484
|
// This is fine, because the component instance is preserved as well.
|
|
33364
33485
|
setInput: clone.setInput,
|
|
33365
|
-
// Externally this is redundant since we redeclare the definition using the original type.
|
|
33366
|
-
// Internally we may receive a definition with an alternate, but identical, type so we have
|
|
33367
|
-
// to ensure that the original one is preserved.
|
|
33368
|
-
type: clone.type,
|
|
33369
33486
|
});
|
|
33370
33487
|
ngDevMode && assertEqual(replacement, currentDef, 'Expected definition to be merged in place');
|
|
33371
33488
|
return { newDef: replacement, oldDef: clone };
|
|
@@ -34904,7 +35021,7 @@ class Version {
|
|
|
34904
35021
|
/**
|
|
34905
35022
|
* @publicApi
|
|
34906
35023
|
*/
|
|
34907
|
-
const VERSION = new Version('19.
|
|
35024
|
+
const VERSION = new Version('19.2.0-next.0');
|
|
34908
35025
|
|
|
34909
35026
|
/**
|
|
34910
35027
|
* Combination of NgModuleFactory and ComponentFactories.
|
|
@@ -38655,7 +38772,7 @@ function createComputed(computation) {
|
|
|
38655
38772
|
producerUpdateValueVersion(node);
|
|
38656
38773
|
// Record that someone looked at this signal.
|
|
38657
38774
|
producerAccessed(node);
|
|
38658
|
-
if (node.value === ERRORED) {
|
|
38775
|
+
if (node.value === ERRORED$1) {
|
|
38659
38776
|
throw node.error;
|
|
38660
38777
|
}
|
|
38661
38778
|
return node.value;
|
|
@@ -38667,26 +38784,26 @@ function createComputed(computation) {
|
|
|
38667
38784
|
* A dedicated symbol used before a computed value has been calculated for the first time.
|
|
38668
38785
|
* Explicitly typed as `any` so we can use it as signal's value.
|
|
38669
38786
|
*/
|
|
38670
|
-
const UNSET = /* @__PURE__ */ Symbol('UNSET');
|
|
38787
|
+
const UNSET$1 = /* @__PURE__ */ Symbol('UNSET');
|
|
38671
38788
|
/**
|
|
38672
38789
|
* A dedicated symbol used in place of a computed signal value to indicate that a given computation
|
|
38673
38790
|
* is in progress. Used to detect cycles in computation chains.
|
|
38674
38791
|
* Explicitly typed as `any` so we can use it as signal's value.
|
|
38675
38792
|
*/
|
|
38676
|
-
const COMPUTING = /* @__PURE__ */ Symbol('COMPUTING');
|
|
38793
|
+
const COMPUTING$1 = /* @__PURE__ */ Symbol('COMPUTING');
|
|
38677
38794
|
/**
|
|
38678
38795
|
* A dedicated symbol used in place of a computed signal value to indicate that a given computation
|
|
38679
38796
|
* failed. The thrown error is cached until the computation gets dirty again.
|
|
38680
38797
|
* Explicitly typed as `any` so we can use it as signal's value.
|
|
38681
38798
|
*/
|
|
38682
|
-
const ERRORED = /* @__PURE__ */ Symbol('ERRORED');
|
|
38799
|
+
const ERRORED$1 = /* @__PURE__ */ Symbol('ERRORED');
|
|
38683
38800
|
// Note: Using an IIFE here to ensure that the spread assignment is not considered
|
|
38684
38801
|
// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.
|
|
38685
38802
|
// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.
|
|
38686
38803
|
const COMPUTED_NODE = /* @__PURE__ */ (() => {
|
|
38687
38804
|
return {
|
|
38688
38805
|
...REACTIVE_NODE,
|
|
38689
|
-
value: UNSET,
|
|
38806
|
+
value: UNSET$1,
|
|
38690
38807
|
dirty: true,
|
|
38691
38808
|
error: null,
|
|
38692
38809
|
equal: defaultEquals,
|
|
@@ -38694,15 +38811,15 @@ const COMPUTED_NODE = /* @__PURE__ */ (() => {
|
|
|
38694
38811
|
producerMustRecompute(node) {
|
|
38695
38812
|
// Force a recomputation if there's no current value, or if the current value is in the
|
|
38696
38813
|
// process of being calculated (which should throw an error).
|
|
38697
|
-
return node.value === UNSET || node.value === COMPUTING;
|
|
38814
|
+
return node.value === UNSET$1 || node.value === COMPUTING$1;
|
|
38698
38815
|
},
|
|
38699
38816
|
producerRecomputeValue(node) {
|
|
38700
|
-
if (node.value === COMPUTING) {
|
|
38817
|
+
if (node.value === COMPUTING$1) {
|
|
38701
38818
|
// Our computation somehow led to a cyclic read of itself.
|
|
38702
38819
|
throw new Error('Detected cycle in computations.');
|
|
38703
38820
|
}
|
|
38704
38821
|
const oldValue = node.value;
|
|
38705
|
-
node.value = COMPUTING;
|
|
38822
|
+
node.value = COMPUTING$1;
|
|
38706
38823
|
const prevConsumer = consumerBeforeComputation(node);
|
|
38707
38824
|
let newValue;
|
|
38708
38825
|
let wasEqual = false;
|
|
@@ -38712,13 +38829,13 @@ const COMPUTED_NODE = /* @__PURE__ */ (() => {
|
|
|
38712
38829
|
// to track any reactive reads inside `equal`.
|
|
38713
38830
|
setActiveConsumer(null);
|
|
38714
38831
|
wasEqual =
|
|
38715
|
-
oldValue !== UNSET &&
|
|
38716
|
-
oldValue !== ERRORED &&
|
|
38717
|
-
newValue !== ERRORED &&
|
|
38832
|
+
oldValue !== UNSET$1 &&
|
|
38833
|
+
oldValue !== ERRORED$1 &&
|
|
38834
|
+
newValue !== ERRORED$1 &&
|
|
38718
38835
|
node.equal(oldValue, newValue);
|
|
38719
38836
|
}
|
|
38720
38837
|
catch (err) {
|
|
38721
|
-
newValue = ERRORED;
|
|
38838
|
+
newValue = ERRORED$1;
|
|
38722
38839
|
node.error = err;
|
|
38723
38840
|
}
|
|
38724
38841
|
finally {
|
|
@@ -38812,8 +38929,8 @@ function signalValueChanged(node) {
|
|
|
38812
38929
|
postSignalSetFn?.();
|
|
38813
38930
|
}
|
|
38814
38931
|
|
|
38815
|
-
function createLinkedSignal(sourceFn, computationFn, equalityFn) {
|
|
38816
|
-
const node = Object.create(LINKED_SIGNAL_NODE);
|
|
38932
|
+
function createLinkedSignal$1(sourceFn, computationFn, equalityFn) {
|
|
38933
|
+
const node = Object.create(LINKED_SIGNAL_NODE$1);
|
|
38817
38934
|
node.source = sourceFn;
|
|
38818
38935
|
node.computation = computationFn;
|
|
38819
38936
|
if (equalityFn != undefined) {
|
|
@@ -38824,7 +38941,7 @@ function createLinkedSignal(sourceFn, computationFn, equalityFn) {
|
|
|
38824
38941
|
producerUpdateValueVersion(node);
|
|
38825
38942
|
// Record that someone looked at this signal.
|
|
38826
38943
|
producerAccessed(node);
|
|
38827
|
-
if (node.value === ERRORED) {
|
|
38944
|
+
if (node.value === ERRORED$1) {
|
|
38828
38945
|
throw node.error;
|
|
38829
38946
|
}
|
|
38830
38947
|
return node.value;
|
|
@@ -38846,30 +38963,30 @@ function linkedSignalUpdateFn(node, updater) {
|
|
|
38846
38963
|
// Note: Using an IIFE here to ensure that the spread assignment is not considered
|
|
38847
38964
|
// a side-effect, ending up preserving `LINKED_SIGNAL_NODE` and `REACTIVE_NODE`.
|
|
38848
38965
|
// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.
|
|
38849
|
-
const LINKED_SIGNAL_NODE = /* @__PURE__ */ (() => {
|
|
38966
|
+
const LINKED_SIGNAL_NODE$1 = /* @__PURE__ */ (() => {
|
|
38850
38967
|
return {
|
|
38851
38968
|
...REACTIVE_NODE,
|
|
38852
|
-
value: UNSET,
|
|
38969
|
+
value: UNSET$1,
|
|
38853
38970
|
dirty: true,
|
|
38854
38971
|
error: null,
|
|
38855
38972
|
equal: defaultEquals,
|
|
38856
38973
|
producerMustRecompute(node) {
|
|
38857
38974
|
// Force a recomputation if there's no current value, or if the current value is in the
|
|
38858
38975
|
// process of being calculated (which should throw an error).
|
|
38859
|
-
return node.value === UNSET || node.value === COMPUTING;
|
|
38976
|
+
return node.value === UNSET$1 || node.value === COMPUTING$1;
|
|
38860
38977
|
},
|
|
38861
38978
|
producerRecomputeValue(node) {
|
|
38862
|
-
if (node.value === COMPUTING) {
|
|
38979
|
+
if (node.value === COMPUTING$1) {
|
|
38863
38980
|
// Our computation somehow led to a cyclic read of itself.
|
|
38864
38981
|
throw new Error('Detected cycle in computations.');
|
|
38865
38982
|
}
|
|
38866
38983
|
const oldValue = node.value;
|
|
38867
|
-
node.value = COMPUTING;
|
|
38984
|
+
node.value = COMPUTING$1;
|
|
38868
38985
|
const prevConsumer = consumerBeforeComputation(node);
|
|
38869
38986
|
let newValue;
|
|
38870
38987
|
try {
|
|
38871
38988
|
const newSourceValue = node.source();
|
|
38872
|
-
const prev = oldValue === UNSET || oldValue === ERRORED
|
|
38989
|
+
const prev = oldValue === UNSET$1 || oldValue === ERRORED$1
|
|
38873
38990
|
? undefined
|
|
38874
38991
|
: {
|
|
38875
38992
|
source: node.sourceValue,
|
|
@@ -38879,13 +38996,13 @@ const LINKED_SIGNAL_NODE = /* @__PURE__ */ (() => {
|
|
|
38879
38996
|
node.sourceValue = newSourceValue;
|
|
38880
38997
|
}
|
|
38881
38998
|
catch (err) {
|
|
38882
|
-
newValue = ERRORED;
|
|
38999
|
+
newValue = ERRORED$1;
|
|
38883
39000
|
node.error = err;
|
|
38884
39001
|
}
|
|
38885
39002
|
finally {
|
|
38886
39003
|
consumerAfterComputation(node, prevConsumer);
|
|
38887
39004
|
}
|
|
38888
|
-
if (oldValue !== UNSET && newValue !== ERRORED && node.equal(oldValue, newValue)) {
|
|
39005
|
+
if (oldValue !== UNSET$1 && newValue !== ERRORED$1 && node.equal(oldValue, newValue)) {
|
|
38889
39006
|
// No change to `valueVersion` - old and new values are
|
|
38890
39007
|
// semantically equivalent.
|
|
38891
39008
|
node.value = oldValue;
|
|
@@ -38987,6 +39104,7 @@ function setAlternateWeakRefImpl(impl) {
|
|
|
38987
39104
|
* @returns A promise that returns an `ApplicationRef` instance once resolved.
|
|
38988
39105
|
*/
|
|
38989
39106
|
function internalCreateApplication(config) {
|
|
39107
|
+
profiler(8 /* ProfilerEvent.BootstrapApplicationStart */);
|
|
38990
39108
|
try {
|
|
38991
39109
|
const { rootComponent, appProviders, platformProviders } = config;
|
|
38992
39110
|
if ((typeof ngDevMode === 'undefined' || ngDevMode) && rootComponent !== undefined) {
|
|
@@ -39017,6 +39135,9 @@ function internalCreateApplication(config) {
|
|
|
39017
39135
|
catch (e) {
|
|
39018
39136
|
return Promise.reject(e);
|
|
39019
39137
|
}
|
|
39138
|
+
finally {
|
|
39139
|
+
profiler(9 /* ProfilerEvent.BootstrapApplicationEnd */);
|
|
39140
|
+
}
|
|
39020
39141
|
}
|
|
39021
39142
|
|
|
39022
39143
|
/** Apps in which we've enabled event replay.
|
|
@@ -39981,12 +40102,12 @@ function printHydrationStats(injector) {
|
|
|
39981
40102
|
/**
|
|
39982
40103
|
* Returns a Promise that is resolved when an application becomes stable.
|
|
39983
40104
|
*/
|
|
39984
|
-
function whenStableWithTimeout(appRef) {
|
|
40105
|
+
function whenStableWithTimeout(appRef, injector) {
|
|
39985
40106
|
const whenStablePromise = appRef.whenStable();
|
|
39986
40107
|
if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
39987
40108
|
const timeoutTime = APPLICATION_IS_STABLE_TIMEOUT;
|
|
39988
|
-
const console =
|
|
39989
|
-
const ngZone =
|
|
40109
|
+
const console = injector.get(Console);
|
|
40110
|
+
const ngZone = injector.get(NgZone);
|
|
39990
40111
|
// The following call should not and does not prevent the app to become stable
|
|
39991
40112
|
// We cannot use RxJS timer here because the app would remain unstable.
|
|
39992
40113
|
// This also avoids an extra change detection cycle.
|
|
@@ -40084,6 +40205,7 @@ function withDomHydration() {
|
|
|
40084
40205
|
useFactory: () => {
|
|
40085
40206
|
if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
|
|
40086
40207
|
const appRef = inject(ApplicationRef);
|
|
40208
|
+
const injector = inject(Injector);
|
|
40087
40209
|
return () => {
|
|
40088
40210
|
// Wait until an app becomes stable and cleanup all views that
|
|
40089
40211
|
// were not claimed during the application bootstrap process.
|
|
@@ -40092,20 +40214,11 @@ function withDomHydration() {
|
|
|
40092
40214
|
//
|
|
40093
40215
|
// Note: the cleanup task *MUST* be scheduled within the Angular zone in Zone apps
|
|
40094
40216
|
// to ensure that change detection is properly run afterward.
|
|
40095
|
-
whenStableWithTimeout(appRef).then(() => {
|
|
40096
|
-
// Note: we have to check whether the application is destroyed before
|
|
40097
|
-
// performing other operations with the `injector`.
|
|
40098
|
-
// The application may be destroyed **before** it becomes stable, so when
|
|
40099
|
-
// the `whenStableWithTimeout` resolves, the injector might already be in
|
|
40100
|
-
// a destroyed state. Thus, calling `injector.get` would throw an error
|
|
40101
|
-
// indicating that the injector has already been destroyed.
|
|
40102
|
-
if (appRef.destroyed) {
|
|
40103
|
-
return;
|
|
40104
|
-
}
|
|
40217
|
+
whenStableWithTimeout(appRef, injector).then(() => {
|
|
40105
40218
|
cleanupDehydratedViews(appRef);
|
|
40106
40219
|
if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
40107
|
-
countBlocksSkippedByHydration(
|
|
40108
|
-
printHydrationStats(
|
|
40220
|
+
countBlocksSkippedByHydration(injector);
|
|
40221
|
+
printHydrationStats(injector);
|
|
40109
40222
|
}
|
|
40110
40223
|
});
|
|
40111
40224
|
};
|
|
@@ -40507,28 +40620,123 @@ function computed(computation, options) {
|
|
|
40507
40620
|
}
|
|
40508
40621
|
|
|
40509
40622
|
const identityFn = (v) => v;
|
|
40623
|
+
/**
|
|
40624
|
+
* Create a linked signal which represents state that is (re)set from a linked reactive expression.
|
|
40625
|
+
*/
|
|
40626
|
+
function createLinkedSignal(node) {
|
|
40627
|
+
const linkedSignalGetter = () => {
|
|
40628
|
+
// Check if the value needs updating before returning it.
|
|
40629
|
+
producerUpdateValueVersion$1(node);
|
|
40630
|
+
// Record that someone looked at this signal.
|
|
40631
|
+
producerAccessed$1(node);
|
|
40632
|
+
if (node.value === ERRORED) {
|
|
40633
|
+
throw node.error;
|
|
40634
|
+
}
|
|
40635
|
+
return node.value;
|
|
40636
|
+
};
|
|
40637
|
+
const getter = linkedSignalGetter;
|
|
40638
|
+
getter[SIGNAL$1] = node;
|
|
40639
|
+
if (ngDevMode) {
|
|
40640
|
+
getter.toString = () => `[LinkedSignal: ${getter()}]`;
|
|
40641
|
+
}
|
|
40642
|
+
getter.set = (newValue) => {
|
|
40643
|
+
producerUpdateValueVersion$1(node);
|
|
40644
|
+
signalSetFn$1(node, newValue);
|
|
40645
|
+
producerMarkClean$1(node);
|
|
40646
|
+
};
|
|
40647
|
+
getter.update = (updateFn) => {
|
|
40648
|
+
producerUpdateValueVersion$1(node);
|
|
40649
|
+
signalUpdateFn$1(node, updateFn);
|
|
40650
|
+
producerMarkClean$1(node);
|
|
40651
|
+
};
|
|
40652
|
+
getter.asReadonly = signalAsReadonlyFn.bind(getter);
|
|
40653
|
+
return getter;
|
|
40654
|
+
}
|
|
40510
40655
|
function linkedSignal(optionsOrComputation, options) {
|
|
40511
40656
|
performanceMarkFeature('NgSignals');
|
|
40512
|
-
|
|
40513
|
-
|
|
40514
|
-
|
|
40515
|
-
|
|
40516
|
-
|
|
40517
|
-
const getter = createLinkedSignal$1(optionsOrComputation.source, optionsOrComputation.computation, optionsOrComputation.equal);
|
|
40518
|
-
return upgradeLinkedSignalGetter(getter);
|
|
40657
|
+
const isShorthand = typeof optionsOrComputation === 'function';
|
|
40658
|
+
const node = Object.create(LINKED_SIGNAL_NODE);
|
|
40659
|
+
node.source = isShorthand ? optionsOrComputation : optionsOrComputation.source;
|
|
40660
|
+
if (!isShorthand) {
|
|
40661
|
+
node.computation = optionsOrComputation.computation;
|
|
40519
40662
|
}
|
|
40520
|
-
|
|
40521
|
-
|
|
40522
|
-
|
|
40523
|
-
getter.toString = () => `[LinkedSignal: ${getter()}]`;
|
|
40663
|
+
const equal = isShorthand ? options?.equal : optionsOrComputation.equal;
|
|
40664
|
+
if (equal) {
|
|
40665
|
+
node.equal = equal;
|
|
40524
40666
|
}
|
|
40525
|
-
|
|
40526
|
-
const upgradedGetter = getter;
|
|
40527
|
-
upgradedGetter.set = (newValue) => linkedSignalSetFn$1(node, newValue);
|
|
40528
|
-
upgradedGetter.update = (updateFn) => linkedSignalUpdateFn$1(node, updateFn);
|
|
40529
|
-
upgradedGetter.asReadonly = signalAsReadonlyFn.bind(getter);
|
|
40530
|
-
return upgradedGetter;
|
|
40667
|
+
return createLinkedSignal(node);
|
|
40531
40668
|
}
|
|
40669
|
+
/**
|
|
40670
|
+
* A dedicated symbol used before a state value has been set / calculated for the first time.
|
|
40671
|
+
* Explicitly typed as `any` so we can use it as signal's value.
|
|
40672
|
+
*/
|
|
40673
|
+
const UNSET = /* @__PURE__ */ Symbol('UNSET');
|
|
40674
|
+
/**
|
|
40675
|
+
* A dedicated symbol used in place of a linked signal value to indicate that a given computation
|
|
40676
|
+
* is in progress. Used to detect cycles in computation chains.
|
|
40677
|
+
* Explicitly typed as `any` so we can use it as signal's value.
|
|
40678
|
+
*/
|
|
40679
|
+
const COMPUTING = /* @__PURE__ */ Symbol('COMPUTING');
|
|
40680
|
+
/**
|
|
40681
|
+
* A dedicated symbol used in place of a linked signal value to indicate that a given computation
|
|
40682
|
+
* failed. The thrown error is cached until the computation gets dirty again or the state is set.
|
|
40683
|
+
* Explicitly typed as `any` so we can use it as signal's value.
|
|
40684
|
+
*/
|
|
40685
|
+
const ERRORED = /* @__PURE__ */ Symbol('ERRORED');
|
|
40686
|
+
// Note: Using an IIFE here to ensure that the spread assignment is not considered
|
|
40687
|
+
// a side-effect, ending up preserving `LINKED_SIGNAL_NODE` and `REACTIVE_NODE`.
|
|
40688
|
+
// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.
|
|
40689
|
+
const LINKED_SIGNAL_NODE = /* @__PURE__ */ (() => {
|
|
40690
|
+
return {
|
|
40691
|
+
...REACTIVE_NODE$1,
|
|
40692
|
+
value: UNSET,
|
|
40693
|
+
dirty: true,
|
|
40694
|
+
error: null,
|
|
40695
|
+
equal: defaultEquals$1,
|
|
40696
|
+
computation: identityFn,
|
|
40697
|
+
producerMustRecompute(node) {
|
|
40698
|
+
// Force a recomputation if there's no current value, or if the current value is in the
|
|
40699
|
+
// process of being calculated (which should throw an error).
|
|
40700
|
+
return node.value === UNSET || node.value === COMPUTING;
|
|
40701
|
+
},
|
|
40702
|
+
producerRecomputeValue(node) {
|
|
40703
|
+
if (node.value === COMPUTING) {
|
|
40704
|
+
// Our computation somehow led to a cyclic read of itself.
|
|
40705
|
+
throw new Error('Detected cycle in computations.');
|
|
40706
|
+
}
|
|
40707
|
+
const oldValue = node.value;
|
|
40708
|
+
node.value = COMPUTING;
|
|
40709
|
+
const prevConsumer = consumerBeforeComputation$1(node);
|
|
40710
|
+
let newValue;
|
|
40711
|
+
try {
|
|
40712
|
+
const newSourceValue = node.source();
|
|
40713
|
+
const prev = oldValue === UNSET || oldValue === ERRORED
|
|
40714
|
+
? undefined
|
|
40715
|
+
: {
|
|
40716
|
+
source: node.sourceValue,
|
|
40717
|
+
value: oldValue,
|
|
40718
|
+
};
|
|
40719
|
+
newValue = node.computation(newSourceValue, prev);
|
|
40720
|
+
node.sourceValue = newSourceValue;
|
|
40721
|
+
}
|
|
40722
|
+
catch (err) {
|
|
40723
|
+
newValue = ERRORED;
|
|
40724
|
+
node.error = err;
|
|
40725
|
+
}
|
|
40726
|
+
finally {
|
|
40727
|
+
consumerAfterComputation$1(node, prevConsumer);
|
|
40728
|
+
}
|
|
40729
|
+
if (oldValue !== UNSET && newValue !== ERRORED && node.equal(oldValue, newValue)) {
|
|
40730
|
+
// No change to `valueVersion` - old and new values are
|
|
40731
|
+
// semantically equivalent.
|
|
40732
|
+
node.value = oldValue;
|
|
40733
|
+
return;
|
|
40734
|
+
}
|
|
40735
|
+
node.value = newValue;
|
|
40736
|
+
node.version++;
|
|
40737
|
+
},
|
|
40738
|
+
};
|
|
40739
|
+
})();
|
|
40532
40740
|
|
|
40533
40741
|
/**
|
|
40534
40742
|
* Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function
|
|
@@ -41086,7 +41294,7 @@ var ResourceStatus;
|
|
|
41086
41294
|
function resource(options) {
|
|
41087
41295
|
options?.injector || assertInInjectionContext(resource);
|
|
41088
41296
|
const request = (options.request ?? (() => null));
|
|
41089
|
-
return new ResourceImpl(request, options
|
|
41297
|
+
return new ResourceImpl(request, getLoader(options), undefined, options.equal ? wrapEqualityFn(options.equal) : undefined, options.injector ?? inject(Injector));
|
|
41090
41298
|
}
|
|
41091
41299
|
/**
|
|
41092
41300
|
* Base class which implements `.value` as a `WritableSignal` by delegating `.set` and `.update`.
|
|
@@ -41132,9 +41340,13 @@ class ResourceImpl extends BaseWritableResource {
|
|
|
41132
41340
|
resolvePendingTask = undefined;
|
|
41133
41341
|
destroyed = false;
|
|
41134
41342
|
constructor(request, loaderFn, defaultValue, equal, injector) {
|
|
41343
|
+
super(
|
|
41135
41344
|
// Feed a computed signal for the value to `BaseWritableResource`, which will upgrade it to a
|
|
41136
41345
|
// `WritableSignal` that delegates to `ResourceImpl.set`.
|
|
41137
|
-
|
|
41346
|
+
computed(() => {
|
|
41347
|
+
const stream = this.state()?.stream?.();
|
|
41348
|
+
return stream && isResolved(stream) ? stream.value : this.defaultValue;
|
|
41349
|
+
}, { equal }));
|
|
41138
41350
|
this.loaderFn = loaderFn;
|
|
41139
41351
|
this.defaultValue = defaultValue;
|
|
41140
41352
|
this.equal = equal;
|
|
@@ -41163,13 +41375,10 @@ class ResourceImpl extends BaseWritableResource {
|
|
|
41163
41375
|
status,
|
|
41164
41376
|
// When the state of the resource changes due to the request, remember the previous status
|
|
41165
41377
|
// for the loader to consider.
|
|
41166
|
-
previousStatus: previous?.value
|
|
41378
|
+
previousStatus: computeStatusOfState(previous?.value),
|
|
41167
41379
|
// In `Reloading` state, we keep the previous value if there is one, since the identity of
|
|
41168
41380
|
// the request hasn't changed. Otherwise, we switch back to the default value.
|
|
41169
|
-
|
|
41170
|
-
? previous.value.value
|
|
41171
|
-
: this.defaultValue,
|
|
41172
|
-
error: undefined,
|
|
41381
|
+
stream: previous && status === ResourceStatus.Reloading ? previous.value.stream : undefined,
|
|
41173
41382
|
}),
|
|
41174
41383
|
});
|
|
41175
41384
|
this.effectRef = effect(this.loadEffect.bind(this), {
|
|
@@ -41179,8 +41388,16 @@ class ResourceImpl extends BaseWritableResource {
|
|
|
41179
41388
|
// Cancel any pending request when the resource itself is destroyed.
|
|
41180
41389
|
injector.get(DestroyRef).onDestroy(() => this.destroy());
|
|
41181
41390
|
}
|
|
41182
|
-
status = computed(() =>
|
|
41183
|
-
|
|
41391
|
+
status = computed(() => {
|
|
41392
|
+
if (this.state().status !== ResourceStatus.Resolved) {
|
|
41393
|
+
return this.state().status;
|
|
41394
|
+
}
|
|
41395
|
+
return isResolved(this.state().stream()) ? ResourceStatus.Resolved : ResourceStatus.Error;
|
|
41396
|
+
});
|
|
41397
|
+
error = computed(() => {
|
|
41398
|
+
const stream = this.state().stream?.();
|
|
41399
|
+
return stream && !isResolved(stream) ? stream.error : undefined;
|
|
41400
|
+
});
|
|
41184
41401
|
/**
|
|
41185
41402
|
* Called either directly via `WritableResource.set` or via `.value.set()`.
|
|
41186
41403
|
*/
|
|
@@ -41188,16 +41405,15 @@ class ResourceImpl extends BaseWritableResource {
|
|
|
41188
41405
|
if (this.destroyed) {
|
|
41189
41406
|
return;
|
|
41190
41407
|
}
|
|
41191
|
-
const
|
|
41192
|
-
if (this.equal ? this.equal(
|
|
41408
|
+
const current = untracked(this.value);
|
|
41409
|
+
if (this.equal ? this.equal(current, value) : current === value) {
|
|
41193
41410
|
return;
|
|
41194
41411
|
}
|
|
41195
41412
|
// Enter Local state with the user-defined value.
|
|
41196
41413
|
this.state.set({
|
|
41197
41414
|
status: ResourceStatus.Local,
|
|
41198
41415
|
previousStatus: ResourceStatus.Local,
|
|
41199
|
-
value,
|
|
41200
|
-
error: undefined,
|
|
41416
|
+
stream: signal({ value }),
|
|
41201
41417
|
});
|
|
41202
41418
|
// We're departing from whatever state the resource was in previously, so cancel any in-progress
|
|
41203
41419
|
// loading operations.
|
|
@@ -41223,8 +41439,7 @@ class ResourceImpl extends BaseWritableResource {
|
|
|
41223
41439
|
this.state.set({
|
|
41224
41440
|
status: ResourceStatus.Idle,
|
|
41225
41441
|
previousStatus: ResourceStatus.Idle,
|
|
41226
|
-
|
|
41227
|
-
error: undefined,
|
|
41442
|
+
stream: undefined,
|
|
41228
41443
|
});
|
|
41229
41444
|
}
|
|
41230
41445
|
async loadEffect() {
|
|
@@ -41257,49 +41472,43 @@ class ResourceImpl extends BaseWritableResource {
|
|
|
41257
41472
|
// After the loading operation is cancelled, `this.resolvePendingTask` no longer represents this
|
|
41258
41473
|
// particular task, but this `await` may eventually resolve/reject. Thus, when we cancel in
|
|
41259
41474
|
// response to (1) below, we need to cancel the locally saved task.
|
|
41260
|
-
|
|
41475
|
+
let resolvePendingTask = (this.resolvePendingTask =
|
|
41476
|
+
this.pendingTasks.add());
|
|
41261
41477
|
const { signal: abortSignal } = (this.pendingController = new AbortController());
|
|
41262
41478
|
try {
|
|
41263
41479
|
// The actual loading is run through `untracked` - only the request side of `resource` is
|
|
41264
41480
|
// reactive. This avoids any confusion with signals tracking or not tracking depending on
|
|
41265
41481
|
// which side of the `await` they are.
|
|
41266
|
-
const
|
|
41267
|
-
abortSignal,
|
|
41482
|
+
const stream = await untracked(() => this.loaderFn({
|
|
41268
41483
|
request: request,
|
|
41484
|
+
abortSignal,
|
|
41269
41485
|
previous: {
|
|
41270
41486
|
status: previousStatus,
|
|
41271
41487
|
},
|
|
41272
41488
|
}));
|
|
41273
41489
|
if (abortSignal.aborted) {
|
|
41274
|
-
// This load operation was cancelled.
|
|
41275
41490
|
return;
|
|
41276
41491
|
}
|
|
41277
|
-
// Success :)
|
|
41278
41492
|
this.state.set({
|
|
41279
41493
|
status: ResourceStatus.Resolved,
|
|
41280
41494
|
previousStatus: ResourceStatus.Resolved,
|
|
41281
|
-
|
|
41282
|
-
error: undefined,
|
|
41495
|
+
stream,
|
|
41283
41496
|
});
|
|
41284
41497
|
}
|
|
41285
41498
|
catch (err) {
|
|
41286
41499
|
if (abortSignal.aborted) {
|
|
41287
|
-
// This load operation was cancelled.
|
|
41288
41500
|
return;
|
|
41289
41501
|
}
|
|
41290
|
-
// Fail :(
|
|
41291
41502
|
this.state.set({
|
|
41292
|
-
status: ResourceStatus.
|
|
41503
|
+
status: ResourceStatus.Resolved,
|
|
41293
41504
|
previousStatus: ResourceStatus.Error,
|
|
41294
|
-
|
|
41295
|
-
error: err,
|
|
41505
|
+
stream: signal({ error: err }),
|
|
41296
41506
|
});
|
|
41297
41507
|
}
|
|
41298
41508
|
finally {
|
|
41299
|
-
// Resolve the pending task now that
|
|
41300
|
-
resolvePendingTask();
|
|
41301
|
-
|
|
41302
|
-
this.pendingController = undefined;
|
|
41509
|
+
// Resolve the pending task now that the resource has a value.
|
|
41510
|
+
resolvePendingTask?.();
|
|
41511
|
+
resolvePendingTask = undefined;
|
|
41303
41512
|
}
|
|
41304
41513
|
}
|
|
41305
41514
|
abortInProgressLoad() {
|
|
@@ -41316,6 +41525,35 @@ class ResourceImpl extends BaseWritableResource {
|
|
|
41316
41525
|
function wrapEqualityFn(equal) {
|
|
41317
41526
|
return (a, b) => (a === undefined || b === undefined ? a === b : equal(a, b));
|
|
41318
41527
|
}
|
|
41528
|
+
function getLoader(options) {
|
|
41529
|
+
if (isStreamingResourceOptions(options)) {
|
|
41530
|
+
return options.stream;
|
|
41531
|
+
}
|
|
41532
|
+
return async (params) => {
|
|
41533
|
+
try {
|
|
41534
|
+
return signal({ value: await options.loader(params) });
|
|
41535
|
+
}
|
|
41536
|
+
catch (err) {
|
|
41537
|
+
return signal({ error: err });
|
|
41538
|
+
}
|
|
41539
|
+
};
|
|
41540
|
+
}
|
|
41541
|
+
function isStreamingResourceOptions(options) {
|
|
41542
|
+
return !!options.stream;
|
|
41543
|
+
}
|
|
41544
|
+
function computeStatusOfState(state) {
|
|
41545
|
+
switch (state?.status) {
|
|
41546
|
+
case undefined:
|
|
41547
|
+
return ResourceStatus.Idle;
|
|
41548
|
+
case ResourceStatus.Resolved:
|
|
41549
|
+
return isResolved(untracked(state.stream)) ? ResourceStatus.Resolved : ResourceStatus.Error;
|
|
41550
|
+
default:
|
|
41551
|
+
return state.status;
|
|
41552
|
+
}
|
|
41553
|
+
}
|
|
41554
|
+
function isResolved(state) {
|
|
41555
|
+
return state.error === undefined;
|
|
41556
|
+
}
|
|
41319
41557
|
|
|
41320
41558
|
/**
|
|
41321
41559
|
* Creates a `ComponentRef` instance based on provided component type and a set of options.
|
|
@@ -41563,5 +41801,5 @@ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
|
41563
41801
|
* Generated bundle index. Do not edit.
|
|
41564
41802
|
*/
|
|
41565
41803
|
|
|
41566
|
-
export { ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, AfterRenderPhase, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CSP_NONCE, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, DestroyRef, Directive, ENVIRONMENT_INITIALIZER, ElementRef, EmbeddedViewRef, EnvironmentInjector, ErrorHandler, EventEmitter, HOST_TAG_NAME, Host, HostAttributeToken, HostBinding, HostListener, INJECTOR$1 as INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, NgProbeToken, NgZone, Optional, Output, OutputEmitterRef, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, PendingTasks, Pipe, PlatformRef, Query, QueryList, REQUEST, REQUEST_CONTEXT, RESPONSE_INIT, Renderer2, RendererFactory2, RendererStyleFlags2, ResourceStatus, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, TransferState, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation, ViewRef, afterNextRender, afterRender, afterRenderEffect, asNativeElements, assertInInjectionContext, assertNotInReactiveContext, assertPlatform, booleanAttribute, computed, contentChild, contentChildren, createComponent, createEnvironmentInjector, createNgModule, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, effect, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, importProvidersFrom, inject, input, isDevMode, isSignal, isStandalone, linkedSignal, makeEnvironmentProviders, makeStateKey, mergeApplicationConfig, model, numberAttribute, output, platformCore, provideAppInitializer, provideEnvironmentInitializer, provideExperimentalCheckNoChangesForDebug, provideExperimentalZonelessChangeDetection, providePlatformInitializer, provideZoneChangeDetection, reflectComponentType, resolveForwardRef, resource, runInInjectionContext, setTestabilityGetter, signal, untracked, viewChild, viewChildren, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, AfterRenderManager as ɵAfterRenderManager, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ChangeDetectionScheduler as ɵChangeDetectionScheduler, ChangeDetectionSchedulerImpl as ɵChangeDetectionSchedulerImpl, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, DEFER_BLOCK_CONFIG as ɵDEFER_BLOCK_CONFIG, DEFER_BLOCK_DEPENDENCY_INTERCEPTOR as ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR, DeferBlockBehavior as ɵDeferBlockBehavior, DeferBlockState as ɵDeferBlockState, ENABLE_ROOT_COMPONENT_BOOTSTRAP as ɵENABLE_ROOT_COMPONENT_BOOTSTRAP, EffectScheduler as ɵEffectScheduler, IMAGE_CONFIG as ɵIMAGE_CONFIG, IMAGE_CONFIG_DEFAULTS as ɵIMAGE_CONFIG_DEFAULTS, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, ɵINPUT_SIGNAL_BRAND_WRITE_TYPE, INTERNAL_APPLICATION_ERROR_HANDLER as ɵINTERNAL_APPLICATION_ERROR_HANDLER, IS_HYDRATION_DOM_REUSE_ENABLED as ɵIS_HYDRATION_DOM_REUSE_ENABLED, IS_INCREMENTAL_HYDRATION_ENABLED as ɵIS_INCREMENTAL_HYDRATION_ENABLED, JSACTION_EVENT_CONTRACT as ɵJSACTION_EVENT_CONTRACT, LContext as ɵLContext, LocaleDataIndex as ɵLocaleDataIndex, MicrotaskEffectScheduler as ɵMicrotaskEffectScheduler, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, PERFORMANCE_MARK_PREFIX as ɵPERFORMANCE_MARK_PREFIX, PROVIDED_NG_ZONE as ɵPROVIDED_NG_ZONE, PendingTasksInternal as ɵPendingTasksInternal, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, SSR_CONTENT_INTEGRITY_MARKER as ɵSSR_CONTENT_INTEGRITY_MARKER, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, TracingAction as ɵTracingAction, TracingService as ɵTracingService, USE_RUNTIME_DEPS_TRACKER_FOR_JIT as ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT, ViewRef$1 as ɵViewRef, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, ZONELESS_ENABLED as ɵZONELESS_ENABLED, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, annotateForHydration as ɵannotateForHydration, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, depsTracker as ɵdepsTracker, detectChangesInViewIfRequired as ɵdetectChangesInViewIfRequired, devModeEqual as ɵdevModeEqual, disableProfiling as ɵdisableProfiling, enableProfiling as ɵenableProfiling, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, formatRuntimeError as ɵformatRuntimeError, generateStandaloneInDeclarationsError as ɵgenerateStandaloneInDeclarationsError, getAsyncClassMetadataFn as ɵgetAsyncClassMetadataFn, getClosestComponentName as ɵgetClosestComponentName, getDebugNode as ɵgetDebugNode, getDeferBlocks$1 as ɵgetDeferBlocks, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getOutputDestroyRef as ɵgetOutputDestroyRef, getSanitizationBypassType as ɵgetSanitizationBypassType, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalCreateApplication as ɵinternalCreateApplication, internalProvideZoneChangeDetection as ɵinternalProvideZoneChangeDetection, isBoundToModule as ɵisBoundToModule, isComponentDefPendingResolution as ɵisComponentDefPendingResolution, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, isNgModule as ɵisNgModule, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, microtaskEffect as ɵmicrotaskEffect, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, performanceMarkFeature as ɵperformanceMarkFeature, publishExternalGlobalUtil as ɵpublishExternalGlobalUtil, readHydrationInfo as ɵreadHydrationInfo, registerLocaleData as ɵregisterLocaleData, renderDeferBlockState as ɵrenderDeferBlockState, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, restoreComponentResolutionQueue as ɵrestoreComponentResolutionQueue, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setAlternateWeakRefImpl as ɵsetAlternateWeakRefImpl, ɵsetClassDebugInfo, setClassMetadata as ɵsetClassMetadata, setClassMetadataAsync as ɵsetClassMetadataAsync, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setInjectorProfilerContext as ɵsetInjectorProfilerContext, setLocaleId as ɵsetLocaleId, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, startMeasuring as ɵstartMeasuring, stopMeasuring as ɵstopMeasuring, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, triggerResourceLoading as ɵtriggerResourceLoading, truncateMiddle as ɵtruncateMiddle, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵunwrapWritableSignal, withDomHydration as ɵwithDomHydration, withEventReplay as ɵwithEventReplay, withI18nSupport as ɵwithI18nSupport, withIncrementalHydration as ɵwithIncrementalHydration, ɵɵCopyDefinitionFeature, ɵɵExternalStylesFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵInputTransformsFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattachSourceLocations, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcomponentInstance, ɵɵconditional, ɵɵcontentQuery, ɵɵcontentQuerySignal, ɵɵdeclareLet, ɵɵdefer, ɵɵdeferEnableTimerScheduling, ɵɵdeferHydrateNever, ɵɵdeferHydrateOnHover, ɵɵdeferHydrateOnIdle, ɵɵdeferHydrateOnImmediate, ɵɵdeferHydrateOnInteraction, ɵɵdeferHydrateOnTimer, ɵɵdeferHydrateOnViewport, ɵɵdeferHydrateWhen, ɵɵdeferOnHover, ɵɵdeferOnIdle, ɵɵdeferOnImmediate, ɵɵdeferOnInteraction, ɵɵdeferOnTimer, ɵɵdeferOnViewport, ɵɵdeferPrefetchOnHover, ɵɵdeferPrefetchOnIdle, ɵɵdeferPrefetchOnImmediate, ɵɵdeferPrefetchOnInteraction, ɵɵdeferPrefetchOnTimer, ɵɵdeferPrefetchOnViewport, ɵɵdeferPrefetchWhen, ɵɵdeferWhen, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetComponentDepsFactory, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareClassMetadataAsync, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryAdvance, ɵɵqueryRefresh, ɵɵreadContextLet, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵrepeater, ɵɵrepeaterCreate, ɵɵrepeaterTrackByIdentity, ɵɵrepeaterTrackByIndex, ɵɵreplaceMetadata, ɵɵresetView, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstoreLet, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵtwoWayBindingSet, ɵɵtwoWayListener, ɵɵtwoWayProperty, ɵɵvalidateIframeAttribute, ɵɵviewQuery, ɵɵviewQuerySignal };
|
|
41804
|
+
export { ANIMATION_MODULE_TYPE, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, AfterRenderPhase, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CSP_NONCE, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory$1 as ComponentFactory, ComponentFactoryResolver$1 as ComponentFactoryResolver, ComponentRef$1 as ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, DestroyRef, Directive, ENVIRONMENT_INITIALIZER, ElementRef, EmbeddedViewRef, EnvironmentInjector, ErrorHandler, EventEmitter, HOST_TAG_NAME, Host, HostAttributeToken, HostBinding, HostListener, INJECTOR$1 as INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory$1 as NgModuleFactory, NgModuleRef$1 as NgModuleRef, NgProbeToken, NgZone, Optional, Output, OutputEmitterRef, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, PendingTasks, Pipe, PlatformRef, Query, QueryList, REQUEST, REQUEST_CONTEXT, RESPONSE_INIT, Renderer2, RendererFactory2, RendererStyleFlags2, ResourceStatus, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, TransferState, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation, ViewRef, afterNextRender, afterRender, afterRenderEffect, asNativeElements, assertInInjectionContext, assertNotInReactiveContext, assertPlatform, booleanAttribute, computed, contentChild, contentChildren, createComponent, createEnvironmentInjector, createNgModule, createNgModuleRef, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, effect, enableProdMode, forwardRef, getDebugNode, getModuleFactory, getNgModuleById, getPlatform, importProvidersFrom, inject, input, isDevMode, isSignal, isStandalone, linkedSignal, makeEnvironmentProviders, makeStateKey, mergeApplicationConfig, model, numberAttribute, output, platformCore, provideAppInitializer, provideEnvironmentInitializer, provideExperimentalCheckNoChangesForDebug, provideExperimentalZonelessChangeDetection, providePlatformInitializer, provideZoneChangeDetection, reflectComponentType, resolveForwardRef, resource, runInInjectionContext, setTestabilityGetter, signal, untracked, viewChild, viewChildren, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, AfterRenderManager as ɵAfterRenderManager, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ChangeDetectionScheduler as ɵChangeDetectionScheduler, ChangeDetectionSchedulerImpl as ɵChangeDetectionSchedulerImpl, ComponentFactory$1 as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, DEFER_BLOCK_CONFIG as ɵDEFER_BLOCK_CONFIG, DEFER_BLOCK_DEPENDENCY_INTERCEPTOR as ɵDEFER_BLOCK_DEPENDENCY_INTERCEPTOR, DeferBlockBehavior as ɵDeferBlockBehavior, DeferBlockState as ɵDeferBlockState, ENABLE_ROOT_COMPONENT_BOOTSTRAP as ɵENABLE_ROOT_COMPONENT_BOOTSTRAP, EffectScheduler as ɵEffectScheduler, IMAGE_CONFIG as ɵIMAGE_CONFIG, IMAGE_CONFIG_DEFAULTS as ɵIMAGE_CONFIG_DEFAULTS, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, ɵINPUT_SIGNAL_BRAND_WRITE_TYPE, INTERNAL_APPLICATION_ERROR_HANDLER as ɵINTERNAL_APPLICATION_ERROR_HANDLER, IS_HYDRATION_DOM_REUSE_ENABLED as ɵIS_HYDRATION_DOM_REUSE_ENABLED, IS_INCREMENTAL_HYDRATION_ENABLED as ɵIS_INCREMENTAL_HYDRATION_ENABLED, JSACTION_EVENT_CONTRACT as ɵJSACTION_EVENT_CONTRACT, LContext as ɵLContext, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, MicrotaskEffectScheduler as ɵMicrotaskEffectScheduler, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, PERFORMANCE_MARK_PREFIX as ɵPERFORMANCE_MARK_PREFIX, PROVIDED_NG_ZONE as ɵPROVIDED_NG_ZONE, PendingTasksInternal as ɵPendingTasksInternal, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory as ɵRender3ComponentFactory, ComponentRef as ɵRender3ComponentRef, NgModuleRef as ɵRender3NgModuleRef, RuntimeError as ɵRuntimeError, SSR_CONTENT_INTEGRITY_MARKER as ɵSSR_CONTENT_INTEGRITY_MARKER, TESTABILITY as ɵTESTABILITY, TESTABILITY_GETTER as ɵTESTABILITY_GETTER, TracingAction as ɵTracingAction, TracingService as ɵTracingService, USE_RUNTIME_DEPS_TRACKER_FOR_JIT as ɵUSE_RUNTIME_DEPS_TRACKER_FOR_JIT, ViewRef$1 as ɵViewRef, XSS_SECURITY_URL as ɵXSS_SECURITY_URL, ZONELESS_ENABLED as ɵZONELESS_ENABLED, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, annotateForHydration as ɵannotateForHydration, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory as ɵcompileNgModuleFactory, compilePipe as ɵcompilePipe, convertToBitFlags as ɵconvertToBitFlags, createInjector as ɵcreateInjector, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, depsTracker as ɵdepsTracker, detectChangesInViewIfRequired as ɵdetectChangesInViewIfRequired, devModeEqual as ɵdevModeEqual, disableProfiling as ɵdisableProfiling, enableProfiling as ɵenableProfiling, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, formatRuntimeError as ɵformatRuntimeError, generateStandaloneInDeclarationsError as ɵgenerateStandaloneInDeclarationsError, getAsyncClassMetadataFn as ɵgetAsyncClassMetadataFn, getClosestComponentName as ɵgetClosestComponentName, getDebugNode as ɵgetDebugNode, getDeferBlocks$1 as ɵgetDeferBlocks, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getOutputDestroyRef as ɵgetOutputDestroyRef, getSanitizationBypassType as ɵgetSanitizationBypassType, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, _global as ɵglobal, injectChangeDetectorRef as ɵinjectChangeDetectorRef, internalCreateApplication as ɵinternalCreateApplication, internalProvideZoneChangeDetection as ɵinternalProvideZoneChangeDetection, isBoundToModule as ɵisBoundToModule, isComponentDefPendingResolution as ɵisComponentDefPendingResolution, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, isNgModule as ɵisNgModule, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, microtaskEffect as ɵmicrotaskEffect, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, performanceMarkFeature as ɵperformanceMarkFeature, publishExternalGlobalUtil as ɵpublishExternalGlobalUtil, readHydrationInfo as ɵreadHydrationInfo, registerLocaleData as ɵregisterLocaleData, renderDeferBlockState as ɵrenderDeferBlockState, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, restoreComponentResolutionQueue as ɵrestoreComponentResolutionQueue, setAllowDuplicateNgModuleIdsForTest as ɵsetAllowDuplicateNgModuleIdsForTest, setAlternateWeakRefImpl as ɵsetAlternateWeakRefImpl, ɵsetClassDebugInfo, setClassMetadata as ɵsetClassMetadata, setClassMetadataAsync as ɵsetClassMetadataAsync, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setInjectorProfilerContext as ɵsetInjectorProfilerContext, setLocaleId as ɵsetLocaleId, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, startMeasuring as ɵstartMeasuring, stopMeasuring as ɵstopMeasuring, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, triggerResourceLoading as ɵtriggerResourceLoading, truncateMiddle as ɵtruncateMiddle, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵunwrapWritableSignal, withDomHydration as ɵwithDomHydration, withEventReplay as ɵwithEventReplay, withI18nSupport as ɵwithI18nSupport, withIncrementalHydration as ɵwithIncrementalHydration, ɵɵCopyDefinitionFeature, ɵɵExternalStylesFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵInputTransformsFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattachSourceLocations, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcomponentInstance, ɵɵconditional, ɵɵcontentQuery, ɵɵcontentQuerySignal, ɵɵdeclareLet, ɵɵdefer, ɵɵdeferEnableTimerScheduling, ɵɵdeferHydrateNever, ɵɵdeferHydrateOnHover, ɵɵdeferHydrateOnIdle, ɵɵdeferHydrateOnImmediate, ɵɵdeferHydrateOnInteraction, ɵɵdeferHydrateOnTimer, ɵɵdeferHydrateOnViewport, ɵɵdeferHydrateWhen, ɵɵdeferOnHover, ɵɵdeferOnIdle, ɵɵdeferOnImmediate, ɵɵdeferOnInteraction, ɵɵdeferOnTimer, ɵɵdeferOnViewport, ɵɵdeferPrefetchOnHover, ɵɵdeferPrefetchOnIdle, ɵɵdeferPrefetchOnImmediate, ɵɵdeferPrefetchOnInteraction, ɵɵdeferPrefetchOnTimer, ɵɵdeferPrefetchOnViewport, ɵɵdeferPrefetchWhen, ɵɵdeferWhen, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetComponentDepsFactory, ɵɵgetCurrentView, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵngDeclareClassMetadata, ɵɵngDeclareClassMetadataAsync, ɵɵngDeclareComponent, ɵɵngDeclareDirective, ɵɵngDeclareFactory, ɵɵngDeclareInjectable, ɵɵngDeclareInjector, ɵɵngDeclareNgModule, ɵɵngDeclarePipe, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryAdvance, ɵɵqueryRefresh, ɵɵreadContextLet, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵrepeater, ɵɵrepeaterCreate, ɵɵrepeaterTrackByIdentity, ɵɵrepeaterTrackByIndex, ɵɵreplaceMetadata, ɵɵresetView, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstoreLet, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵtrustConstantHtml, ɵɵtrustConstantResourceUrl, ɵɵtwoWayBindingSet, ɵɵtwoWayListener, ɵɵtwoWayProperty, ɵɵvalidateIframeAttribute, ɵɵviewQuery, ɵɵviewQuerySignal };
|
|
41567
41805
|
//# sourceMappingURL=core.mjs.map
|