@angular/core 19.2.0-next.2 → 19.2.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/core.mjs +1094 -1064
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +1 -1
- package/fesm2022/primitives/signals.mjs +5 -5
- package/fesm2022/primitives/signals.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +5 -5
- package/index.d.ts +92 -44
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +1 -1
- package/primitives/signals/index.d.ts +2 -2
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/bundles/apply_import_manager-a930fcf1.js +71 -0
- package/schematics/bundles/{checker-9af84be9.js → checker-2eecc677.js} +101 -63
- package/schematics/bundles/cleanup-unused-imports.js +17 -16
- package/schematics/bundles/{compiler_host-dbff2781.js → compiler_host-c280a924.js} +2 -2
- package/schematics/bundles/control-flow-migration.js +10 -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-23b503a4.js → index-24a2ad1e.js} +9 -9
- package/schematics/bundles/{index-93e324de.js → index-3891dd55.js} +4 -4
- package/schematics/bundles/inject-migration.js +10 -9
- package/schematics/bundles/{leading_space-6e7a8ec6.js → leading_space-d190b83b.js} +1 -1
- package/schematics/bundles/{migrate_ts_type_references-c6615b87.js → migrate_ts_type_references-71b3a951.js} +21 -21
- package/schematics/bundles/{nodes-88c2157f.js → ng_decorators-e699c081.js} +2 -15
- package/schematics/bundles/nodes-a535b2be.js +27 -0
- package/schematics/bundles/output-migration.js +22 -21
- package/schematics/bundles/pending-tasks.js +5 -5
- package/schematics/bundles/{program-66386e72.js → program-24da9092.js} +113 -54
- package/schematics/bundles/{apply_import_manager-d8ea426b.js → project_paths-b073c4d6.js} +3 -57
- package/schematics/bundles/{project_tsconfig_paths-6c9cde78.js → project_tsconfig_paths-e9ccccbf.js} +1 -1
- package/schematics/bundles/property_name-7c8433f5.js +31 -0
- package/schematics/bundles/provide-initializer.js +5 -5
- package/schematics/bundles/route-lazy-loading.js +9 -13
- package/schematics/bundles/self-closing-tags-migration.js +448 -0
- package/schematics/bundles/signal-input-migration.js +22 -21
- package/schematics/bundles/signal-queries-migration.js +28 -27
- package/schematics/bundles/signals.js +9 -8
- package/schematics/bundles/standalone-migration.js +14 -13
- package/schematics/collection.json +6 -0
- package/schematics/ng-generate/self-closing-tags-migration/schema.json +14 -0
- package/testing/index.d.ts +1 -1
package/fesm2022/core.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.2.0-
|
|
2
|
+
* @license Angular v19.2.0-rc.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, createWatch as createWatch$1, isInNotificationPhase as isInNotificationPhase$1, createLinkedSignal as createLinkedSignal$1, linkedSignalSetFn as linkedSignalSetFn$1, linkedSignalUpdateFn as linkedSignalUpdateFn$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';
|
|
@@ -350,23 +350,21 @@ function stringify(token) {
|
|
|
350
350
|
return token;
|
|
351
351
|
}
|
|
352
352
|
if (Array.isArray(token)) {
|
|
353
|
-
return
|
|
353
|
+
return `[${token.map(stringify).join(', ')}]`;
|
|
354
354
|
}
|
|
355
355
|
if (token == null) {
|
|
356
356
|
return '' + token;
|
|
357
357
|
}
|
|
358
|
-
|
|
359
|
-
|
|
358
|
+
const name = token.overriddenName || token.name;
|
|
359
|
+
if (name) {
|
|
360
|
+
return `${name}`;
|
|
360
361
|
}
|
|
361
|
-
|
|
362
|
-
|
|
362
|
+
const result = token.toString();
|
|
363
|
+
if (result == null) {
|
|
364
|
+
return '' + result;
|
|
363
365
|
}
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
return '' + res;
|
|
367
|
-
}
|
|
368
|
-
const newLineIndex = res.indexOf('\n');
|
|
369
|
-
return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
|
|
366
|
+
const newLineIndex = result.indexOf('\n');
|
|
367
|
+
return newLineIndex >= 0 ? result.slice(0, newLineIndex) : result;
|
|
370
368
|
}
|
|
371
369
|
/**
|
|
372
370
|
* Concatenates two strings with separator, allocating new strings only when necessary.
|
|
@@ -377,13 +375,11 @@ function stringify(token) {
|
|
|
377
375
|
* @returns concatenated string.
|
|
378
376
|
*/
|
|
379
377
|
function concatStringsWithSpace(before, after) {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
? before
|
|
386
|
-
: before + ' ' + after;
|
|
378
|
+
if (!before)
|
|
379
|
+
return after || '';
|
|
380
|
+
if (!after)
|
|
381
|
+
return before;
|
|
382
|
+
return `${before} ${after}`;
|
|
387
383
|
}
|
|
388
384
|
/**
|
|
389
385
|
* Ellipses the string in the middle when longer than the max length
|
|
@@ -2902,6 +2898,7 @@ const ON_DESTROY_HOOKS = 21;
|
|
|
2902
2898
|
const EFFECTS_TO_SCHEDULE = 22;
|
|
2903
2899
|
const EFFECTS = 23;
|
|
2904
2900
|
const REACTIVE_TEMPLATE_CONSUMER = 24;
|
|
2901
|
+
const AFTER_RENDER_SEQUENCES_TO_ADD = 25;
|
|
2905
2902
|
/**
|
|
2906
2903
|
* Size of LView's header. Necessary to adjust for it when setting slots.
|
|
2907
2904
|
*
|
|
@@ -2909,7 +2906,7 @@ const REACTIVE_TEMPLATE_CONSUMER = 24;
|
|
|
2909
2906
|
* instruction index into `LView` index. All other indexes should be in the `LView` index space and
|
|
2910
2907
|
* there should be no need to refer to `HEADER_OFFSET` anywhere else.
|
|
2911
2908
|
*/
|
|
2912
|
-
const HEADER_OFFSET =
|
|
2909
|
+
const HEADER_OFFSET = 26;
|
|
2913
2910
|
|
|
2914
2911
|
/**
|
|
2915
2912
|
* Special location which allows easy identification of type. If we have an array which was
|
|
@@ -3419,7 +3416,7 @@ function requiresRefreshOrTraversal(lView) {
|
|
|
3419
3416
|
* parents above.
|
|
3420
3417
|
*/
|
|
3421
3418
|
function updateAncestorTraversalFlagsOnAttach(lView) {
|
|
3422
|
-
lView[ENVIRONMENT].changeDetectionScheduler?.notify(
|
|
3419
|
+
lView[ENVIRONMENT].changeDetectionScheduler?.notify(8 /* NotificationSource.ViewAttached */);
|
|
3423
3420
|
if (lView[FLAGS] & 64 /* LViewFlags.Dirty */) {
|
|
3424
3421
|
lView[FLAGS] |= 1024 /* LViewFlags.RefreshView */;
|
|
3425
3422
|
}
|
|
@@ -6162,7 +6159,7 @@ class PendingTasks {
|
|
|
6162
6159
|
return;
|
|
6163
6160
|
}
|
|
6164
6161
|
// Notifying the scheduler will hold application stability open until the next tick.
|
|
6165
|
-
this.scheduler.notify(
|
|
6162
|
+
this.scheduler.notify(11 /* NotificationSource.PendingTaskRemoved */);
|
|
6166
6163
|
this.internalPendingTasks.remove(taskId);
|
|
6167
6164
|
};
|
|
6168
6165
|
}
|
|
@@ -8249,23 +8246,12 @@ function assertDomElement(value) {
|
|
|
8249
8246
|
function extractInputDebugMetadata(inputs) {
|
|
8250
8247
|
const res = {};
|
|
8251
8248
|
for (const key in inputs) {
|
|
8252
|
-
if (
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
continue;
|
|
8258
|
-
}
|
|
8259
|
-
let minifiedName;
|
|
8260
|
-
if (Array.isArray(value)) {
|
|
8261
|
-
minifiedName = value[0];
|
|
8262
|
-
// flags are not used for now.
|
|
8263
|
-
// TODO: Consider exposing flag information in discovery.
|
|
8264
|
-
}
|
|
8265
|
-
else {
|
|
8266
|
-
minifiedName = value;
|
|
8249
|
+
if (inputs.hasOwnProperty(key)) {
|
|
8250
|
+
const value = inputs[key];
|
|
8251
|
+
if (value !== undefined) {
|
|
8252
|
+
res[key] = value[0];
|
|
8253
|
+
}
|
|
8267
8254
|
}
|
|
8268
|
-
res[key] = minifiedName;
|
|
8269
8255
|
}
|
|
8270
8256
|
return res;
|
|
8271
8257
|
}
|
|
@@ -8656,6 +8642,23 @@ function assertNotInReactiveContext(debugFn, extraContext) {
|
|
|
8656
8642
|
}
|
|
8657
8643
|
}
|
|
8658
8644
|
|
|
8645
|
+
class ViewContext {
|
|
8646
|
+
view;
|
|
8647
|
+
node;
|
|
8648
|
+
constructor(view, node) {
|
|
8649
|
+
this.view = view;
|
|
8650
|
+
this.node = node;
|
|
8651
|
+
}
|
|
8652
|
+
/**
|
|
8653
|
+
* @internal
|
|
8654
|
+
* @nocollapse
|
|
8655
|
+
*/
|
|
8656
|
+
static __NG_ELEMENT_ID__ = injectViewContext;
|
|
8657
|
+
}
|
|
8658
|
+
function injectViewContext() {
|
|
8659
|
+
return new ViewContext(getLView(), getCurrentTNode());
|
|
8660
|
+
}
|
|
8661
|
+
|
|
8659
8662
|
/**
|
|
8660
8663
|
* The phase to run an `afterRender` or `afterNextRender` callback in.
|
|
8661
8664
|
*
|
|
@@ -8794,7 +8797,7 @@ class AfterRenderImpl {
|
|
|
8794
8797
|
this.sequences.add(sequence);
|
|
8795
8798
|
}
|
|
8796
8799
|
if (this.deferredRegistrations.size > 0) {
|
|
8797
|
-
this.scheduler.notify(
|
|
8800
|
+
this.scheduler.notify(7 /* NotificationSource.RenderHook */);
|
|
8798
8801
|
}
|
|
8799
8802
|
this.deferredRegistrations.clear();
|
|
8800
8803
|
if (hasSequencesToExecute) {
|
|
@@ -8802,16 +8805,27 @@ class AfterRenderImpl {
|
|
|
8802
8805
|
}
|
|
8803
8806
|
}
|
|
8804
8807
|
register(sequence) {
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
//
|
|
8808
|
-
|
|
8809
|
-
|
|
8808
|
+
const { view } = sequence;
|
|
8809
|
+
if (view !== undefined) {
|
|
8810
|
+
// Delay adding it to the manager, add it to the view instead.
|
|
8811
|
+
(view[AFTER_RENDER_SEQUENCES_TO_ADD] ??= []).push(sequence);
|
|
8812
|
+
// Mark the view for traversal to ensure we eventually schedule the afterNextRender.
|
|
8813
|
+
markAncestorsForTraversal(view);
|
|
8814
|
+
view[FLAGS] |= 8192 /* LViewFlags.HasChildViewsToRefresh */;
|
|
8815
|
+
}
|
|
8816
|
+
else if (!this.executing) {
|
|
8817
|
+
this.addSequence(sequence);
|
|
8810
8818
|
}
|
|
8811
8819
|
else {
|
|
8812
8820
|
this.deferredRegistrations.add(sequence);
|
|
8813
8821
|
}
|
|
8814
8822
|
}
|
|
8823
|
+
addSequence(sequence) {
|
|
8824
|
+
this.sequences.add(sequence);
|
|
8825
|
+
// Trigger an `ApplicationRef.tick()` if one is not already pending/running, because we have a
|
|
8826
|
+
// new render hook that needs to run.
|
|
8827
|
+
this.scheduler.notify(7 /* NotificationSource.RenderHook */);
|
|
8828
|
+
}
|
|
8815
8829
|
unregister(sequence) {
|
|
8816
8830
|
if (this.executing && this.sequences.has(sequence)) {
|
|
8817
8831
|
// We can't remove an `AfterRenderSequence` in the middle of iteration.
|
|
@@ -8841,6 +8855,7 @@ class AfterRenderImpl {
|
|
|
8841
8855
|
class AfterRenderSequence {
|
|
8842
8856
|
impl;
|
|
8843
8857
|
hooks;
|
|
8858
|
+
view;
|
|
8844
8859
|
once;
|
|
8845
8860
|
snapshot;
|
|
8846
8861
|
/**
|
|
@@ -8854,9 +8869,10 @@ class AfterRenderSequence {
|
|
|
8854
8869
|
*/
|
|
8855
8870
|
pipelinedValue = undefined;
|
|
8856
8871
|
unregisterOnDestroy;
|
|
8857
|
-
constructor(impl, hooks, once, destroyRef, snapshot = null) {
|
|
8872
|
+
constructor(impl, hooks, view, once, destroyRef, snapshot = null) {
|
|
8858
8873
|
this.impl = impl;
|
|
8859
8874
|
this.hooks = hooks;
|
|
8875
|
+
this.view = view;
|
|
8860
8876
|
this.once = once;
|
|
8861
8877
|
this.snapshot = snapshot;
|
|
8862
8878
|
this.unregisterOnDestroy = destroyRef?.onDestroy(() => this.destroy());
|
|
@@ -8874,6 +8890,10 @@ class AfterRenderSequence {
|
|
|
8874
8890
|
destroy() {
|
|
8875
8891
|
this.impl.unregister(this);
|
|
8876
8892
|
this.unregisterOnDestroy?.();
|
|
8893
|
+
const scheduled = this.view?.[AFTER_RENDER_SEQUENCES_TO_ADD];
|
|
8894
|
+
if (scheduled) {
|
|
8895
|
+
this.view[AFTER_RENDER_SEQUENCES_TO_ADD] = scheduled.filter((s) => s !== this);
|
|
8896
|
+
}
|
|
8877
8897
|
}
|
|
8878
8898
|
}
|
|
8879
8899
|
|
|
@@ -8924,7 +8944,8 @@ function afterRenderImpl(callbackOrSpec, injector, options, once) {
|
|
|
8924
8944
|
const tracing = injector.get(TracingService, null, { optional: true });
|
|
8925
8945
|
const hooks = options?.phase ?? AfterRenderPhase.MixedReadWrite;
|
|
8926
8946
|
const destroyRef = options?.manualCleanup !== true ? injector.get(DestroyRef) : null;
|
|
8927
|
-
const
|
|
8947
|
+
const viewContext = injector.get(ViewContext, null, { optional: true });
|
|
8948
|
+
const sequence = new AfterRenderSequence(manager.impl, getHooks(callbackOrSpec, hooks), viewContext?.view, once, destroyRef, tracing?.snapshot(null));
|
|
8928
8949
|
manager.impl.register(sequence);
|
|
8929
8950
|
return sequence;
|
|
8930
8951
|
}
|
|
@@ -9396,9 +9417,11 @@ function getTriggerElement(triggerLView, triggerIndex) {
|
|
|
9396
9417
|
function registerDomTrigger(initialLView, tNode, triggerIndex, walkUpTimes, registerFn, callback, type) {
|
|
9397
9418
|
const injector = initialLView[INJECTOR];
|
|
9398
9419
|
const zone = injector.get(NgZone);
|
|
9420
|
+
let poll;
|
|
9399
9421
|
function pollDomTrigger() {
|
|
9400
9422
|
// If the initial view was destroyed, we don't need to do anything.
|
|
9401
9423
|
if (isDestroyed(initialLView)) {
|
|
9424
|
+
poll.destroy();
|
|
9402
9425
|
return;
|
|
9403
9426
|
}
|
|
9404
9427
|
const lDetails = getLDeferBlockDetails(initialLView, tNode);
|
|
@@ -9406,14 +9429,16 @@ function registerDomTrigger(initialLView, tNode, triggerIndex, walkUpTimes, regi
|
|
|
9406
9429
|
// If the block was loaded before the trigger was resolved, we don't need to do anything.
|
|
9407
9430
|
if (renderedState !== DeferBlockInternalState.Initial &&
|
|
9408
9431
|
renderedState !== DeferBlockState.Placeholder) {
|
|
9432
|
+
poll.destroy();
|
|
9409
9433
|
return;
|
|
9410
9434
|
}
|
|
9411
9435
|
const triggerLView = getTriggerLView(initialLView, tNode, walkUpTimes);
|
|
9412
9436
|
// Keep polling until we resolve the trigger's LView.
|
|
9413
9437
|
if (!triggerLView) {
|
|
9414
|
-
|
|
9438
|
+
// Keep polling.
|
|
9415
9439
|
return;
|
|
9416
9440
|
}
|
|
9441
|
+
poll.destroy();
|
|
9417
9442
|
// It's possible that the trigger's view was destroyed before we resolved the trigger element.
|
|
9418
9443
|
if (isDestroyed(triggerLView)) {
|
|
9419
9444
|
return;
|
|
@@ -9440,7 +9465,7 @@ function registerDomTrigger(initialLView, tNode, triggerIndex, walkUpTimes, regi
|
|
|
9440
9465
|
storeTriggerCleanupFn(type, lDetails, cleanup);
|
|
9441
9466
|
}
|
|
9442
9467
|
// Begin polling for the trigger.
|
|
9443
|
-
|
|
9468
|
+
poll = afterRender({ read: pollDomTrigger }, { injector });
|
|
9444
9469
|
}
|
|
9445
9470
|
|
|
9446
9471
|
const DEFER_BLOCK_SSR_ID_ATTRIBUTE = 'ngb';
|
|
@@ -12204,6 +12229,206 @@ function setupStaticAttributes(renderer, element, tNode) {
|
|
|
12204
12229
|
}
|
|
12205
12230
|
}
|
|
12206
12231
|
|
|
12232
|
+
/**
|
|
12233
|
+
* Creates a TView instance
|
|
12234
|
+
*
|
|
12235
|
+
* @param type Type of `TView`.
|
|
12236
|
+
* @param declTNode Declaration location of this `TView`.
|
|
12237
|
+
* @param templateFn Template function
|
|
12238
|
+
* @param decls The number of nodes, local refs, and pipes in this template
|
|
12239
|
+
* @param directives Registry of directives for this view
|
|
12240
|
+
* @param pipes Registry of pipes for this view
|
|
12241
|
+
* @param viewQuery View queries for this view
|
|
12242
|
+
* @param schemas Schemas for this view
|
|
12243
|
+
* @param consts Constants for this view
|
|
12244
|
+
*/
|
|
12245
|
+
function createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory, ssrId) {
|
|
12246
|
+
ngDevMode && ngDevMode.tView++;
|
|
12247
|
+
const bindingStartIndex = HEADER_OFFSET + decls;
|
|
12248
|
+
// This length does not yet contain host bindings from child directives because at this point,
|
|
12249
|
+
// we don't know which directives are active on this template. As soon as a directive is matched
|
|
12250
|
+
// that has a host binding, we will update the blueprint with that def's hostVars count.
|
|
12251
|
+
const initialViewLength = bindingStartIndex + vars;
|
|
12252
|
+
const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
|
|
12253
|
+
const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;
|
|
12254
|
+
const tView = (blueprint[TVIEW] = {
|
|
12255
|
+
type: type,
|
|
12256
|
+
blueprint: blueprint,
|
|
12257
|
+
template: templateFn,
|
|
12258
|
+
queries: null,
|
|
12259
|
+
viewQuery: viewQuery,
|
|
12260
|
+
declTNode: declTNode,
|
|
12261
|
+
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
12262
|
+
bindingStartIndex: bindingStartIndex,
|
|
12263
|
+
expandoStartIndex: initialViewLength,
|
|
12264
|
+
hostBindingOpCodes: null,
|
|
12265
|
+
firstCreatePass: true,
|
|
12266
|
+
firstUpdatePass: true,
|
|
12267
|
+
staticViewQueries: false,
|
|
12268
|
+
staticContentQueries: false,
|
|
12269
|
+
preOrderHooks: null,
|
|
12270
|
+
preOrderCheckHooks: null,
|
|
12271
|
+
contentHooks: null,
|
|
12272
|
+
contentCheckHooks: null,
|
|
12273
|
+
viewHooks: null,
|
|
12274
|
+
viewCheckHooks: null,
|
|
12275
|
+
destroyHooks: null,
|
|
12276
|
+
cleanup: null,
|
|
12277
|
+
contentQueries: null,
|
|
12278
|
+
components: null,
|
|
12279
|
+
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
12280
|
+
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
12281
|
+
firstChild: null,
|
|
12282
|
+
schemas: schemas,
|
|
12283
|
+
consts: consts,
|
|
12284
|
+
incompleteFirstPass: false,
|
|
12285
|
+
ssrId,
|
|
12286
|
+
});
|
|
12287
|
+
if (ngDevMode) {
|
|
12288
|
+
// For performance reasons it is important that the tView retains the same shape during runtime.
|
|
12289
|
+
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
12290
|
+
// prevent class transitions.
|
|
12291
|
+
Object.seal(tView);
|
|
12292
|
+
}
|
|
12293
|
+
return tView;
|
|
12294
|
+
}
|
|
12295
|
+
function createViewBlueprint(bindingStartIndex, initialViewLength) {
|
|
12296
|
+
const blueprint = [];
|
|
12297
|
+
for (let i = 0; i < initialViewLength; i++) {
|
|
12298
|
+
blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);
|
|
12299
|
+
}
|
|
12300
|
+
return blueprint;
|
|
12301
|
+
}
|
|
12302
|
+
/**
|
|
12303
|
+
* Gets TView from a template function or creates a new TView
|
|
12304
|
+
* if it doesn't already exist.
|
|
12305
|
+
*
|
|
12306
|
+
* @param def ComponentDef
|
|
12307
|
+
* @returns TView
|
|
12308
|
+
*/
|
|
12309
|
+
function getOrCreateComponentTView(def) {
|
|
12310
|
+
const tView = def.tView;
|
|
12311
|
+
// Create a TView if there isn't one, or recreate it if the first create pass didn't
|
|
12312
|
+
// complete successfully since we can't know for sure whether it's in a usable shape.
|
|
12313
|
+
if (tView === null || tView.incompleteFirstPass) {
|
|
12314
|
+
// Declaration node here is null since this function is called when we dynamically create a
|
|
12315
|
+
// component and hence there is no declaration.
|
|
12316
|
+
const declTNode = null;
|
|
12317
|
+
return (def.tView = createTView(1 /* TViewType.Component */, declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts, def.id));
|
|
12318
|
+
}
|
|
12319
|
+
return tView;
|
|
12320
|
+
}
|
|
12321
|
+
function createLView(parentLView, tView, context, flags, host, tHostNode, environment, renderer, injector, embeddedViewInjector, hydrationInfo) {
|
|
12322
|
+
const lView = tView.blueprint.slice();
|
|
12323
|
+
lView[HOST] = host;
|
|
12324
|
+
lView[FLAGS] =
|
|
12325
|
+
flags |
|
|
12326
|
+
4 /* LViewFlags.CreationMode */ |
|
|
12327
|
+
128 /* LViewFlags.Attached */ |
|
|
12328
|
+
8 /* LViewFlags.FirstLViewPass */ |
|
|
12329
|
+
64 /* LViewFlags.Dirty */ |
|
|
12330
|
+
1024 /* LViewFlags.RefreshView */;
|
|
12331
|
+
if (embeddedViewInjector !== null ||
|
|
12332
|
+
(parentLView && parentLView[FLAGS] & 2048 /* LViewFlags.HasEmbeddedViewInjector */)) {
|
|
12333
|
+
lView[FLAGS] |= 2048 /* LViewFlags.HasEmbeddedViewInjector */;
|
|
12334
|
+
}
|
|
12335
|
+
resetPreOrderHookFlags(lView);
|
|
12336
|
+
ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);
|
|
12337
|
+
lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;
|
|
12338
|
+
lView[CONTEXT] = context;
|
|
12339
|
+
lView[ENVIRONMENT] = (environment || (parentLView && parentLView[ENVIRONMENT]));
|
|
12340
|
+
ngDevMode && assertDefined(lView[ENVIRONMENT], 'LViewEnvironment is required');
|
|
12341
|
+
lView[RENDERER] = (renderer || (parentLView && parentLView[RENDERER]));
|
|
12342
|
+
ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');
|
|
12343
|
+
lView[INJECTOR] = injector || (parentLView && parentLView[INJECTOR]) || null;
|
|
12344
|
+
lView[T_HOST] = tHostNode;
|
|
12345
|
+
lView[ID] = getUniqueLViewId();
|
|
12346
|
+
lView[HYDRATION] = hydrationInfo;
|
|
12347
|
+
lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector;
|
|
12348
|
+
ngDevMode &&
|
|
12349
|
+
assertEqual(tView.type == 2 /* TViewType.Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
|
|
12350
|
+
lView[DECLARATION_COMPONENT_VIEW] =
|
|
12351
|
+
tView.type == 2 /* TViewType.Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;
|
|
12352
|
+
return lView;
|
|
12353
|
+
}
|
|
12354
|
+
function createComponentLView(lView, hostTNode, def) {
|
|
12355
|
+
const native = getNativeByTNode(hostTNode, lView);
|
|
12356
|
+
const tView = getOrCreateComponentTView(def);
|
|
12357
|
+
// Only component views should be added to the view tree directly. Embedded views are
|
|
12358
|
+
// accessed through their containers because they may be removed / re-added later.
|
|
12359
|
+
const rendererFactory = lView[ENVIRONMENT].rendererFactory;
|
|
12360
|
+
const componentView = addToEndOfViewTree(lView, createLView(lView, tView, null, getInitialLViewFlagsFromDef(def), native, hostTNode, null, rendererFactory.createRenderer(native, def), null, null, null));
|
|
12361
|
+
// Component view will always be created before any injected LContainers,
|
|
12362
|
+
// so this is a regular element, wrap it with the component view
|
|
12363
|
+
return (lView[hostTNode.index] = componentView);
|
|
12364
|
+
}
|
|
12365
|
+
/**
|
|
12366
|
+
* Gets the initial set of LView flags based on the component definition that the LView represents.
|
|
12367
|
+
* @param def Component definition from which to determine the flags.
|
|
12368
|
+
*/
|
|
12369
|
+
function getInitialLViewFlagsFromDef(def) {
|
|
12370
|
+
let flags = 16 /* LViewFlags.CheckAlways */;
|
|
12371
|
+
if (def.signals) {
|
|
12372
|
+
flags = 4096 /* LViewFlags.SignalView */;
|
|
12373
|
+
}
|
|
12374
|
+
else if (def.onPush) {
|
|
12375
|
+
flags = 64 /* LViewFlags.Dirty */;
|
|
12376
|
+
}
|
|
12377
|
+
return flags;
|
|
12378
|
+
}
|
|
12379
|
+
/**
|
|
12380
|
+
* When elements are created dynamically after a view blueprint is created (e.g. through
|
|
12381
|
+
* i18nApply()), we need to adjust the blueprint for future template passes.
|
|
12382
|
+
*
|
|
12383
|
+
* @param tView `TView` associated with `LView`
|
|
12384
|
+
* @param lView The `LView` containing the blueprint to adjust
|
|
12385
|
+
* @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0
|
|
12386
|
+
* @param initialValue Initial value to store in blueprint
|
|
12387
|
+
*/
|
|
12388
|
+
function allocExpando(tView, lView, numSlotsToAlloc, initialValue) {
|
|
12389
|
+
if (numSlotsToAlloc === 0)
|
|
12390
|
+
return -1;
|
|
12391
|
+
if (ngDevMode) {
|
|
12392
|
+
assertFirstCreatePass(tView);
|
|
12393
|
+
assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');
|
|
12394
|
+
assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');
|
|
12395
|
+
assertEqual(tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');
|
|
12396
|
+
assertFirstUpdatePass(tView);
|
|
12397
|
+
}
|
|
12398
|
+
const allocIdx = lView.length;
|
|
12399
|
+
for (let i = 0; i < numSlotsToAlloc; i++) {
|
|
12400
|
+
lView.push(initialValue);
|
|
12401
|
+
tView.blueprint.push(initialValue);
|
|
12402
|
+
tView.data.push(null);
|
|
12403
|
+
}
|
|
12404
|
+
return allocIdx;
|
|
12405
|
+
}
|
|
12406
|
+
/**
|
|
12407
|
+
* Adds LView or LContainer to the end of the current view tree.
|
|
12408
|
+
*
|
|
12409
|
+
* This structure will be used to traverse through nested views to remove listeners
|
|
12410
|
+
* and call onDestroy callbacks.
|
|
12411
|
+
*
|
|
12412
|
+
* @param lView The view where LView or LContainer should be added
|
|
12413
|
+
* @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header
|
|
12414
|
+
* @param lViewOrLContainer The LView or LContainer to add to the view tree
|
|
12415
|
+
* @returns The state passed in
|
|
12416
|
+
*/
|
|
12417
|
+
function addToEndOfViewTree(lView, lViewOrLContainer) {
|
|
12418
|
+
// TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer
|
|
12419
|
+
// to the end of the queue, which means if the developer retrieves the LContainers from RNodes out
|
|
12420
|
+
// of order, the change detection will run out of order, as the act of retrieving the the
|
|
12421
|
+
// LContainer from the RNode is what adds it to the queue.
|
|
12422
|
+
if (lView[CHILD_HEAD]) {
|
|
12423
|
+
lView[CHILD_TAIL][NEXT] = lViewOrLContainer;
|
|
12424
|
+
}
|
|
12425
|
+
else {
|
|
12426
|
+
lView[CHILD_HEAD] = lViewOrLContainer;
|
|
12427
|
+
}
|
|
12428
|
+
lView[CHILD_TAIL] = lViewOrLContainer;
|
|
12429
|
+
return lViewOrLContainer;
|
|
12430
|
+
}
|
|
12431
|
+
|
|
12207
12432
|
/**
|
|
12208
12433
|
* Advances to an element for later binding instructions.
|
|
12209
12434
|
*
|
|
@@ -12265,9 +12490,21 @@ var InputFlags;
|
|
|
12265
12490
|
InputFlags[InputFlags["HasDecoratorInputTransform"] = 2] = "HasDecoratorInputTransform";
|
|
12266
12491
|
})(InputFlags || (InputFlags = {}));
|
|
12267
12492
|
|
|
12268
|
-
function writeToDirectiveInput(def, instance, publicName,
|
|
12493
|
+
function writeToDirectiveInput(def, instance, publicName, value) {
|
|
12269
12494
|
const prevConsumer = setActiveConsumer$1(null);
|
|
12270
12495
|
try {
|
|
12496
|
+
if (ngDevMode) {
|
|
12497
|
+
if (!def.inputs.hasOwnProperty(publicName)) {
|
|
12498
|
+
throw new Error(`ASSERTION ERROR: Directive ${def.type.name} does not have an input with a public name of "${publicName}"`);
|
|
12499
|
+
}
|
|
12500
|
+
// Usually we resolve the directive instance using `LView[someIndex]` before writing to an
|
|
12501
|
+
// input, however if the read happens to early, the `LView[someIndex]` might actually be a
|
|
12502
|
+
// `NodeInjectorFactory`. Check for this specific case here since it can break in subtle ways.
|
|
12503
|
+
if (isFactory(instance)) {
|
|
12504
|
+
throw new Error(`ASSERTION ERROR: Cannot write input to factory for type ${def.type.name}. Directive has not been created yet.`);
|
|
12505
|
+
}
|
|
12506
|
+
}
|
|
12507
|
+
const [privateName, flags, transform] = def.inputs[publicName];
|
|
12271
12508
|
// If we know we are dealing with a signal input, we cache its reference
|
|
12272
12509
|
// in a tree-shakable way. The input signal node can then be used for
|
|
12273
12510
|
// value transform execution or actual value updates without introducing
|
|
@@ -12282,9 +12519,9 @@ function writeToDirectiveInput(def, instance, publicName, privateName, flags, va
|
|
|
12282
12519
|
if (inputSignalNode !== null && inputSignalNode.transformFn !== undefined) {
|
|
12283
12520
|
value = inputSignalNode.transformFn(value);
|
|
12284
12521
|
}
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
value =
|
|
12522
|
+
else if (transform !== null) {
|
|
12523
|
+
// If there is a decorator input transform, run it.
|
|
12524
|
+
value = transform.call(instance, value);
|
|
12288
12525
|
}
|
|
12289
12526
|
if (def.setInput !== null) {
|
|
12290
12527
|
def.setInput(instance, inputSignalNode, value, publicName, privateName);
|
|
@@ -12298,39 +12535,6 @@ function writeToDirectiveInput(def, instance, publicName, privateName, flags, va
|
|
|
12298
12535
|
}
|
|
12299
12536
|
}
|
|
12300
12537
|
|
|
12301
|
-
function createLView(parentLView, tView, context, flags, host, tHostNode, environment, renderer, injector, embeddedViewInjector, hydrationInfo) {
|
|
12302
|
-
const lView = tView.blueprint.slice();
|
|
12303
|
-
lView[HOST] = host;
|
|
12304
|
-
lView[FLAGS] =
|
|
12305
|
-
flags |
|
|
12306
|
-
4 /* LViewFlags.CreationMode */ |
|
|
12307
|
-
128 /* LViewFlags.Attached */ |
|
|
12308
|
-
8 /* LViewFlags.FirstLViewPass */ |
|
|
12309
|
-
64 /* LViewFlags.Dirty */ |
|
|
12310
|
-
1024 /* LViewFlags.RefreshView */;
|
|
12311
|
-
if (embeddedViewInjector !== null ||
|
|
12312
|
-
(parentLView && parentLView[FLAGS] & 2048 /* LViewFlags.HasEmbeddedViewInjector */)) {
|
|
12313
|
-
lView[FLAGS] |= 2048 /* LViewFlags.HasEmbeddedViewInjector */;
|
|
12314
|
-
}
|
|
12315
|
-
resetPreOrderHookFlags(lView);
|
|
12316
|
-
ngDevMode && tView.declTNode && parentLView && assertTNodeForLView(tView.declTNode, parentLView);
|
|
12317
|
-
lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;
|
|
12318
|
-
lView[CONTEXT] = context;
|
|
12319
|
-
lView[ENVIRONMENT] = (environment || (parentLView && parentLView[ENVIRONMENT]));
|
|
12320
|
-
ngDevMode && assertDefined(lView[ENVIRONMENT], 'LViewEnvironment is required');
|
|
12321
|
-
lView[RENDERER] = (renderer || (parentLView && parentLView[RENDERER]));
|
|
12322
|
-
ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');
|
|
12323
|
-
lView[INJECTOR] = injector || (parentLView && parentLView[INJECTOR]) || null;
|
|
12324
|
-
lView[T_HOST] = tHostNode;
|
|
12325
|
-
lView[ID] = getUniqueLViewId();
|
|
12326
|
-
lView[HYDRATION] = hydrationInfo;
|
|
12327
|
-
lView[EMBEDDED_VIEW_INJECTOR] = embeddedViewInjector;
|
|
12328
|
-
ngDevMode &&
|
|
12329
|
-
assertEqual(tView.type == 2 /* TViewType.Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');
|
|
12330
|
-
lView[DECLARATION_COMPONENT_VIEW] =
|
|
12331
|
-
tView.type == 2 /* TViewType.Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;
|
|
12332
|
-
return lView;
|
|
12333
|
-
}
|
|
12334
12538
|
function executeTemplate(tView, lView, templateFn, rf, context) {
|
|
12335
12539
|
const prevSelectedIndex = getSelectedIndex();
|
|
12336
12540
|
const isUpdatePhase = rf & 2 /* RenderFlags.Update */;
|
|
@@ -12390,95 +12594,6 @@ function saveResolvedLocalsInData(viewData, tNode, localRefExtractor = getNative
|
|
|
12390
12594
|
}
|
|
12391
12595
|
}
|
|
12392
12596
|
}
|
|
12393
|
-
/**
|
|
12394
|
-
* Gets TView from a template function or creates a new TView
|
|
12395
|
-
* if it doesn't already exist.
|
|
12396
|
-
*
|
|
12397
|
-
* @param def ComponentDef
|
|
12398
|
-
* @returns TView
|
|
12399
|
-
*/
|
|
12400
|
-
function getOrCreateComponentTView(def) {
|
|
12401
|
-
const tView = def.tView;
|
|
12402
|
-
// Create a TView if there isn't one, or recreate it if the first create pass didn't
|
|
12403
|
-
// complete successfully since we can't know for sure whether it's in a usable shape.
|
|
12404
|
-
if (tView === null || tView.incompleteFirstPass) {
|
|
12405
|
-
// Declaration node here is null since this function is called when we dynamically create a
|
|
12406
|
-
// component and hence there is no declaration.
|
|
12407
|
-
const declTNode = null;
|
|
12408
|
-
return (def.tView = createTView(1 /* TViewType.Component */, declTNode, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts, def.id));
|
|
12409
|
-
}
|
|
12410
|
-
return tView;
|
|
12411
|
-
}
|
|
12412
|
-
/**
|
|
12413
|
-
* Creates a TView instance
|
|
12414
|
-
*
|
|
12415
|
-
* @param type Type of `TView`.
|
|
12416
|
-
* @param declTNode Declaration location of this `TView`.
|
|
12417
|
-
* @param templateFn Template function
|
|
12418
|
-
* @param decls The number of nodes, local refs, and pipes in this template
|
|
12419
|
-
* @param directives Registry of directives for this view
|
|
12420
|
-
* @param pipes Registry of pipes for this view
|
|
12421
|
-
* @param viewQuery View queries for this view
|
|
12422
|
-
* @param schemas Schemas for this view
|
|
12423
|
-
* @param consts Constants for this view
|
|
12424
|
-
*/
|
|
12425
|
-
function createTView(type, declTNode, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory, ssrId) {
|
|
12426
|
-
ngDevMode && ngDevMode.tView++;
|
|
12427
|
-
const bindingStartIndex = HEADER_OFFSET + decls;
|
|
12428
|
-
// This length does not yet contain host bindings from child directives because at this point,
|
|
12429
|
-
// we don't know which directives are active on this template. As soon as a directive is matched
|
|
12430
|
-
// that has a host binding, we will update the blueprint with that def's hostVars count.
|
|
12431
|
-
const initialViewLength = bindingStartIndex + vars;
|
|
12432
|
-
const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);
|
|
12433
|
-
const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;
|
|
12434
|
-
const tView = (blueprint[TVIEW] = {
|
|
12435
|
-
type: type,
|
|
12436
|
-
blueprint: blueprint,
|
|
12437
|
-
template: templateFn,
|
|
12438
|
-
queries: null,
|
|
12439
|
-
viewQuery: viewQuery,
|
|
12440
|
-
declTNode: declTNode,
|
|
12441
|
-
data: blueprint.slice().fill(null, bindingStartIndex),
|
|
12442
|
-
bindingStartIndex: bindingStartIndex,
|
|
12443
|
-
expandoStartIndex: initialViewLength,
|
|
12444
|
-
hostBindingOpCodes: null,
|
|
12445
|
-
firstCreatePass: true,
|
|
12446
|
-
firstUpdatePass: true,
|
|
12447
|
-
staticViewQueries: false,
|
|
12448
|
-
staticContentQueries: false,
|
|
12449
|
-
preOrderHooks: null,
|
|
12450
|
-
preOrderCheckHooks: null,
|
|
12451
|
-
contentHooks: null,
|
|
12452
|
-
contentCheckHooks: null,
|
|
12453
|
-
viewHooks: null,
|
|
12454
|
-
viewCheckHooks: null,
|
|
12455
|
-
destroyHooks: null,
|
|
12456
|
-
cleanup: null,
|
|
12457
|
-
contentQueries: null,
|
|
12458
|
-
components: null,
|
|
12459
|
-
directiveRegistry: typeof directives === 'function' ? directives() : directives,
|
|
12460
|
-
pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,
|
|
12461
|
-
firstChild: null,
|
|
12462
|
-
schemas: schemas,
|
|
12463
|
-
consts: consts,
|
|
12464
|
-
incompleteFirstPass: false,
|
|
12465
|
-
ssrId,
|
|
12466
|
-
});
|
|
12467
|
-
if (ngDevMode) {
|
|
12468
|
-
// For performance reasons it is important that the tView retains the same shape during runtime.
|
|
12469
|
-
// (To make sure that all of the code is monomorphic.) For this reason we seal the object to
|
|
12470
|
-
// prevent class transitions.
|
|
12471
|
-
Object.seal(tView);
|
|
12472
|
-
}
|
|
12473
|
-
return tView;
|
|
12474
|
-
}
|
|
12475
|
-
function createViewBlueprint(bindingStartIndex, initialViewLength) {
|
|
12476
|
-
const blueprint = [];
|
|
12477
|
-
for (let i = 0; i < initialViewLength; i++) {
|
|
12478
|
-
blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);
|
|
12479
|
-
}
|
|
12480
|
-
return blueprint;
|
|
12481
|
-
}
|
|
12482
12597
|
/**
|
|
12483
12598
|
* Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.
|
|
12484
12599
|
*
|
|
@@ -12570,7 +12685,6 @@ function mapPropName(name) {
|
|
|
12570
12685
|
}
|
|
12571
12686
|
function elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, nativeOnly) {
|
|
12572
12687
|
ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');
|
|
12573
|
-
const element = getNativeByTNode(tNode, lView);
|
|
12574
12688
|
let inputData = tNode.inputs;
|
|
12575
12689
|
let dataValue;
|
|
12576
12690
|
if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {
|
|
@@ -12578,10 +12692,11 @@ function elementPropertyInternal(tView, tNode, lView, propName, value, renderer,
|
|
|
12578
12692
|
if (isComponentHost(tNode))
|
|
12579
12693
|
markDirtyIfOnPush(lView, tNode.index);
|
|
12580
12694
|
if (ngDevMode) {
|
|
12581
|
-
setNgReflectProperties(lView,
|
|
12695
|
+
setNgReflectProperties(lView, tView, tNode, dataValue, value);
|
|
12582
12696
|
}
|
|
12583
12697
|
}
|
|
12584
12698
|
else if (tNode.type & 3 /* TNodeType.AnyRNode */) {
|
|
12699
|
+
const element = getNativeByTNode(tNode, lView);
|
|
12585
12700
|
propName = mapPropName(propName);
|
|
12586
12701
|
if (ngDevMode) {
|
|
12587
12702
|
validateAgainstEventProperties(propName);
|
|
@@ -12611,11 +12726,12 @@ function markDirtyIfOnPush(lView, viewIndex) {
|
|
|
12611
12726
|
childComponentLView[FLAGS] |= 64 /* LViewFlags.Dirty */;
|
|
12612
12727
|
}
|
|
12613
12728
|
}
|
|
12614
|
-
function setNgReflectProperty(lView,
|
|
12729
|
+
function setNgReflectProperty(lView, tNode, attrName, value) {
|
|
12730
|
+
const element = getNativeByTNode(tNode, lView);
|
|
12615
12731
|
const renderer = lView[RENDERER];
|
|
12616
12732
|
attrName = normalizeDebugBindingName(attrName);
|
|
12617
12733
|
const debugValue = normalizeDebugBindingValue(value);
|
|
12618
|
-
if (type & 3 /* TNodeType.AnyRNode */) {
|
|
12734
|
+
if (tNode.type & 3 /* TNodeType.AnyRNode */) {
|
|
12619
12735
|
if (value == null) {
|
|
12620
12736
|
renderer.removeAttribute(element, attrName);
|
|
12621
12737
|
}
|
|
@@ -12628,18 +12744,14 @@ function setNgReflectProperty(lView, element, type, attrName, value) {
|
|
|
12628
12744
|
renderer.setValue(element, textContent);
|
|
12629
12745
|
}
|
|
12630
12746
|
}
|
|
12631
|
-
function setNgReflectProperties(lView,
|
|
12632
|
-
if (type & (3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */)) {
|
|
12633
|
-
|
|
12634
|
-
|
|
12635
|
-
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
* we want to set the reflected property with the privateName: dataValue[i+1]
|
|
12640
|
-
*/
|
|
12641
|
-
for (let i = 0; i < dataValue.length; i += 3) {
|
|
12642
|
-
setNgReflectProperty(lView, element, type, dataValue[i + 1], value);
|
|
12747
|
+
function setNgReflectProperties(lView, tView, tNode, inputConfig, value) {
|
|
12748
|
+
if (tNode.type & (3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */)) {
|
|
12749
|
+
// Note: we set the private name of the input as the reflected property, not the public one.
|
|
12750
|
+
for (let i = 0; i < inputConfig.length; i += 2) {
|
|
12751
|
+
const index = inputConfig[i];
|
|
12752
|
+
const lookupName = inputConfig[i + 1];
|
|
12753
|
+
const def = tView.data[index];
|
|
12754
|
+
setNgReflectProperty(lView, tNode, def.inputs[lookupName][0], value);
|
|
12643
12755
|
}
|
|
12644
12756
|
}
|
|
12645
12757
|
}
|
|
@@ -12736,31 +12848,6 @@ function findDirectiveDefMatches(tView, tNode) {
|
|
|
12736
12848
|
}
|
|
12737
12849
|
return matches;
|
|
12738
12850
|
}
|
|
12739
|
-
/**
|
|
12740
|
-
* Gets the initial set of LView flags based on the component definition that the LView represents.
|
|
12741
|
-
* @param def Component definition from which to determine the flags.
|
|
12742
|
-
*/
|
|
12743
|
-
function getInitialLViewFlagsFromDef(def) {
|
|
12744
|
-
let flags = 16 /* LViewFlags.CheckAlways */;
|
|
12745
|
-
if (def.signals) {
|
|
12746
|
-
flags = 4096 /* LViewFlags.SignalView */;
|
|
12747
|
-
}
|
|
12748
|
-
else if (def.onPush) {
|
|
12749
|
-
flags = 64 /* LViewFlags.Dirty */;
|
|
12750
|
-
}
|
|
12751
|
-
return flags;
|
|
12752
|
-
}
|
|
12753
|
-
function createComponentLView(lView, hostTNode, def) {
|
|
12754
|
-
const native = getNativeByTNode(hostTNode, lView);
|
|
12755
|
-
const tView = getOrCreateComponentTView(def);
|
|
12756
|
-
// Only component views should be added to the view tree directly. Embedded views are
|
|
12757
|
-
// accessed through their containers because they may be removed / re-added later.
|
|
12758
|
-
const rendererFactory = lView[ENVIRONMENT].rendererFactory;
|
|
12759
|
-
const componentView = addToEndOfViewTree(lView, createLView(lView, tView, null, getInitialLViewFlagsFromDef(def), native, hostTNode, null, rendererFactory.createRenderer(native, def), null, null, null));
|
|
12760
|
-
// Component view will always be created before any injected LContainers,
|
|
12761
|
-
// so this is a regular element, wrap it with the component view
|
|
12762
|
-
return (lView[hostTNode.index] = componentView);
|
|
12763
|
-
}
|
|
12764
12851
|
function elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) {
|
|
12765
12852
|
if (ngDevMode) {
|
|
12766
12853
|
assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');
|
|
@@ -12794,75 +12881,16 @@ function setElementAttribute(renderer, element, namespace, tagName, name, value,
|
|
|
12794
12881
|
function setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) {
|
|
12795
12882
|
const initialInputs = initialInputData[directiveIndex];
|
|
12796
12883
|
if (initialInputs !== null) {
|
|
12797
|
-
for (let i = 0; i < initialInputs.length;) {
|
|
12798
|
-
const
|
|
12799
|
-
const
|
|
12800
|
-
|
|
12801
|
-
const value = initialInputs[i++];
|
|
12802
|
-
writeToDirectiveInput(def, instance, publicName, privateName, flags, value);
|
|
12884
|
+
for (let i = 0; i < initialInputs.length; i += 2) {
|
|
12885
|
+
const lookupName = initialInputs[i];
|
|
12886
|
+
const value = initialInputs[i + 1];
|
|
12887
|
+
writeToDirectiveInput(def, instance, lookupName, value);
|
|
12803
12888
|
if (ngDevMode) {
|
|
12804
|
-
|
|
12805
|
-
setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);
|
|
12889
|
+
setNgReflectProperty(lView, tNode, def.inputs[lookupName][0], value);
|
|
12806
12890
|
}
|
|
12807
12891
|
}
|
|
12808
12892
|
}
|
|
12809
12893
|
}
|
|
12810
|
-
//////////////////////////
|
|
12811
|
-
//// ViewContainer & View
|
|
12812
|
-
//////////////////////////
|
|
12813
|
-
/**
|
|
12814
|
-
* Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
|
|
12815
|
-
*
|
|
12816
|
-
* @param hostNative The host element for the LContainer
|
|
12817
|
-
* @param hostTNode The host TNode for the LContainer
|
|
12818
|
-
* @param currentView The parent view of the LContainer
|
|
12819
|
-
* @param native The native comment element
|
|
12820
|
-
* @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case
|
|
12821
|
-
* @returns LContainer
|
|
12822
|
-
*/
|
|
12823
|
-
function createLContainer(hostNative, currentView, native, tNode) {
|
|
12824
|
-
ngDevMode && assertLView(currentView);
|
|
12825
|
-
const lContainer = [
|
|
12826
|
-
hostNative, // host native
|
|
12827
|
-
true, // Boolean `true` in this position signifies that this is an `LContainer`
|
|
12828
|
-
0, // flags
|
|
12829
|
-
currentView, // parent
|
|
12830
|
-
null, // next
|
|
12831
|
-
tNode, // t_host
|
|
12832
|
-
null, // dehydrated views
|
|
12833
|
-
native, // native,
|
|
12834
|
-
null, // view refs
|
|
12835
|
-
null, // moved views
|
|
12836
|
-
];
|
|
12837
|
-
ngDevMode &&
|
|
12838
|
-
assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');
|
|
12839
|
-
return lContainer;
|
|
12840
|
-
}
|
|
12841
|
-
/**
|
|
12842
|
-
* Adds LView or LContainer to the end of the current view tree.
|
|
12843
|
-
*
|
|
12844
|
-
* This structure will be used to traverse through nested views to remove listeners
|
|
12845
|
-
* and call onDestroy callbacks.
|
|
12846
|
-
*
|
|
12847
|
-
* @param lView The view where LView or LContainer should be added
|
|
12848
|
-
* @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header
|
|
12849
|
-
* @param lViewOrLContainer The LView or LContainer to add to the view tree
|
|
12850
|
-
* @returns The state passed in
|
|
12851
|
-
*/
|
|
12852
|
-
function addToEndOfViewTree(lView, lViewOrLContainer) {
|
|
12853
|
-
// TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer
|
|
12854
|
-
// to the end of the queue, which means if the developer retrieves the LContainers from RNodes out
|
|
12855
|
-
// of order, the change detection will run out of order, as the act of retrieving the the
|
|
12856
|
-
// LContainer from the RNode is what adds it to the queue.
|
|
12857
|
-
if (lView[CHILD_HEAD]) {
|
|
12858
|
-
lView[CHILD_TAIL][NEXT] = lViewOrLContainer;
|
|
12859
|
-
}
|
|
12860
|
-
else {
|
|
12861
|
-
lView[CHILD_HEAD] = lViewOrLContainer;
|
|
12862
|
-
}
|
|
12863
|
-
lView[CHILD_TAIL] = lViewOrLContainer;
|
|
12864
|
-
return lViewOrLContainer;
|
|
12865
|
-
}
|
|
12866
12894
|
///////////////////////////////
|
|
12867
12895
|
//// Bindings & interpolations
|
|
12868
12896
|
///////////////////////////////
|
|
@@ -12936,14 +12964,13 @@ function handleError(lView, error) {
|
|
|
12936
12964
|
* @param value Value to set.
|
|
12937
12965
|
*/
|
|
12938
12966
|
function setInputsForProperty(tView, lView, inputs, publicName, value) {
|
|
12939
|
-
for (let i = 0; i < inputs.length;) {
|
|
12940
|
-
const index = inputs[i
|
|
12941
|
-
const privateName = inputs[i++];
|
|
12942
|
-
const flags = inputs[i++];
|
|
12943
|
-
const instance = lView[index];
|
|
12967
|
+
for (let i = 0; i < inputs.length; i += 2) {
|
|
12968
|
+
const index = inputs[i];
|
|
12944
12969
|
ngDevMode && assertIndexInRange(lView, index);
|
|
12970
|
+
const privateName = inputs[i + 1];
|
|
12971
|
+
const instance = lView[index];
|
|
12945
12972
|
const def = tView.data[index];
|
|
12946
|
-
writeToDirectiveInput(def, instance,
|
|
12973
|
+
writeToDirectiveInput(def, instance, privateName, value);
|
|
12947
12974
|
}
|
|
12948
12975
|
}
|
|
12949
12976
|
|
|
@@ -13065,24 +13092,41 @@ function renderChildComponents(hostLView, components) {
|
|
|
13065
13092
|
}
|
|
13066
13093
|
}
|
|
13067
13094
|
|
|
13095
|
+
function createAndRenderEmbeddedLView(declarationLView, templateTNode, context, options) {
|
|
13096
|
+
const prevConsumer = setActiveConsumer$1(null);
|
|
13097
|
+
try {
|
|
13098
|
+
const embeddedTView = templateTNode.tView;
|
|
13099
|
+
ngDevMode && assertDefined(embeddedTView, 'TView must be defined for a template node.');
|
|
13100
|
+
ngDevMode && assertTNodeForLView(templateTNode, declarationLView);
|
|
13101
|
+
// Embedded views follow the change detection strategy of the view they're declared in.
|
|
13102
|
+
const isSignalView = declarationLView[FLAGS] & 4096 /* LViewFlags.SignalView */;
|
|
13103
|
+
const viewFlags = isSignalView ? 4096 /* LViewFlags.SignalView */ : 16 /* LViewFlags.CheckAlways */;
|
|
13104
|
+
const embeddedLView = createLView(declarationLView, embeddedTView, context, viewFlags, null, templateTNode, null, null, options?.injector ?? null, options?.embeddedViewInjector ?? null, options?.dehydratedView ?? null);
|
|
13105
|
+
const declarationLContainer = declarationLView[templateTNode.index];
|
|
13106
|
+
ngDevMode && assertLContainer(declarationLContainer);
|
|
13107
|
+
embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;
|
|
13108
|
+
const declarationViewLQueries = declarationLView[QUERIES];
|
|
13109
|
+
if (declarationViewLQueries !== null) {
|
|
13110
|
+
embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);
|
|
13111
|
+
}
|
|
13112
|
+
// execute creation mode of a view
|
|
13113
|
+
renderView(embeddedTView, embeddedLView, context);
|
|
13114
|
+
return embeddedLView;
|
|
13115
|
+
}
|
|
13116
|
+
finally {
|
|
13117
|
+
setActiveConsumer$1(prevConsumer);
|
|
13118
|
+
}
|
|
13119
|
+
}
|
|
13068
13120
|
/**
|
|
13069
|
-
*
|
|
13070
|
-
*
|
|
13121
|
+
* Returns whether an elements that belong to a view should be
|
|
13122
|
+
* inserted into the DOM. For client-only cases, DOM elements are
|
|
13123
|
+
* always inserted. For hydration cases, we check whether serialized
|
|
13124
|
+
* info is available for a view and the view is not in a "skip hydration"
|
|
13125
|
+
* block (in which case view contents was re-created, thus needing insertion).
|
|
13071
13126
|
*/
|
|
13072
|
-
|
|
13073
|
-
(
|
|
13074
|
-
|
|
13075
|
-
// `node_manipulation.ts` Currently doing the import cause resolution order to change and fails
|
|
13076
|
-
// the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.
|
|
13077
|
-
/**
|
|
13078
|
-
* Marks a style as important.
|
|
13079
|
-
*/
|
|
13080
|
-
RendererStyleFlags2[RendererStyleFlags2["Important"] = 1] = "Important";
|
|
13081
|
-
/**
|
|
13082
|
-
* Marks a style as using dash case naming (this-is-dash-case).
|
|
13083
|
-
*/
|
|
13084
|
-
RendererStyleFlags2[RendererStyleFlags2["DashCase"] = 2] = "DashCase";
|
|
13085
|
-
})(RendererStyleFlags2 || (RendererStyleFlags2 = {}));
|
|
13127
|
+
function shouldAddViewToDom(tNode, dehydratedView) {
|
|
13128
|
+
return (!dehydratedView || dehydratedView.firstChild === null || hasInSkipHydrationBlockFlag(tNode));
|
|
13129
|
+
}
|
|
13086
13130
|
|
|
13087
13131
|
let _icuContainerIterate;
|
|
13088
13132
|
/**
|
|
@@ -13105,6 +13149,25 @@ function ensureIcuContainerVisitorLoaded(loader) {
|
|
|
13105
13149
|
}
|
|
13106
13150
|
}
|
|
13107
13151
|
|
|
13152
|
+
/**
|
|
13153
|
+
* Flags for renderer-specific style modifiers.
|
|
13154
|
+
* @publicApi
|
|
13155
|
+
*/
|
|
13156
|
+
var RendererStyleFlags2;
|
|
13157
|
+
(function (RendererStyleFlags2) {
|
|
13158
|
+
// TODO(misko): This needs to be refactored into a separate file so that it can be imported from
|
|
13159
|
+
// `node_manipulation.ts` Currently doing the import cause resolution order to change and fails
|
|
13160
|
+
// the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.
|
|
13161
|
+
/**
|
|
13162
|
+
* Marks a style as important.
|
|
13163
|
+
*/
|
|
13164
|
+
RendererStyleFlags2[RendererStyleFlags2["Important"] = 1] = "Important";
|
|
13165
|
+
/**
|
|
13166
|
+
* Marks a style as using dash case naming (this-is-dash-case).
|
|
13167
|
+
*/
|
|
13168
|
+
RendererStyleFlags2[RendererStyleFlags2["DashCase"] = 2] = "DashCase";
|
|
13169
|
+
})(RendererStyleFlags2 || (RendererStyleFlags2 = {}));
|
|
13170
|
+
|
|
13108
13171
|
/**
|
|
13109
13172
|
* Checks whether a TNode is considered detached, i.e. not present in the
|
|
13110
13173
|
* translated i18n template. We should not attempt hydration for such nodes
|
|
@@ -13205,7 +13268,7 @@ function detachViewFromDOM(tView, lView) {
|
|
|
13205
13268
|
// When we remove a view from the DOM, we need to rerun afterRender hooks
|
|
13206
13269
|
// We don't necessarily needs to run change detection. DOM removal only requires
|
|
13207
13270
|
// change detection if animations are enabled (this notification is handled by animations).
|
|
13208
|
-
lView[ENVIRONMENT].changeDetectionScheduler?.notify(
|
|
13271
|
+
lView[ENVIRONMENT].changeDetectionScheduler?.notify(9 /* NotificationSource.ViewDetachedFromDOM */);
|
|
13209
13272
|
applyView(tView, lView, lView[RENDERER], 2 /* WalkTNodeTreeAction.Detach */, null, null);
|
|
13210
13273
|
}
|
|
13211
13274
|
/**
|
|
@@ -13259,83 +13322,6 @@ function destroyViewTree(rootView) {
|
|
|
13259
13322
|
lViewOrLContainer = next;
|
|
13260
13323
|
}
|
|
13261
13324
|
}
|
|
13262
|
-
/**
|
|
13263
|
-
* Inserts a view into a container.
|
|
13264
|
-
*
|
|
13265
|
-
* This adds the view to the container's array of active views in the correct
|
|
13266
|
-
* position. It also adds the view's elements to the DOM if the container isn't a
|
|
13267
|
-
* root node of another view (in that case, the view's elements will be added when
|
|
13268
|
-
* the container's parent view is added later).
|
|
13269
|
-
*
|
|
13270
|
-
* @param tView The `TView' of the `LView` to insert
|
|
13271
|
-
* @param lView The view to insert
|
|
13272
|
-
* @param lContainer The container into which the view should be inserted
|
|
13273
|
-
* @param index Which index in the container to insert the child view into
|
|
13274
|
-
*/
|
|
13275
|
-
function insertView(tView, lView, lContainer, index) {
|
|
13276
|
-
ngDevMode && assertLView(lView);
|
|
13277
|
-
ngDevMode && assertLContainer(lContainer);
|
|
13278
|
-
const indexInContainer = CONTAINER_HEADER_OFFSET + index;
|
|
13279
|
-
const containerLength = lContainer.length;
|
|
13280
|
-
if (index > 0) {
|
|
13281
|
-
// This is a new view, we need to add it to the children.
|
|
13282
|
-
lContainer[indexInContainer - 1][NEXT] = lView;
|
|
13283
|
-
}
|
|
13284
|
-
if (index < containerLength - CONTAINER_HEADER_OFFSET) {
|
|
13285
|
-
lView[NEXT] = lContainer[indexInContainer];
|
|
13286
|
-
addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);
|
|
13287
|
-
}
|
|
13288
|
-
else {
|
|
13289
|
-
lContainer.push(lView);
|
|
13290
|
-
lView[NEXT] = null;
|
|
13291
|
-
}
|
|
13292
|
-
lView[PARENT] = lContainer;
|
|
13293
|
-
// track views where declaration and insertion points are different
|
|
13294
|
-
const declarationLContainer = lView[DECLARATION_LCONTAINER];
|
|
13295
|
-
if (declarationLContainer !== null && lContainer !== declarationLContainer) {
|
|
13296
|
-
trackMovedView(declarationLContainer, lView);
|
|
13297
|
-
}
|
|
13298
|
-
// notify query that a new view has been added
|
|
13299
|
-
const lQueries = lView[QUERIES];
|
|
13300
|
-
if (lQueries !== null) {
|
|
13301
|
-
lQueries.insertView(tView);
|
|
13302
|
-
}
|
|
13303
|
-
updateAncestorTraversalFlagsOnAttach(lView);
|
|
13304
|
-
// Sets the attached flag
|
|
13305
|
-
lView[FLAGS] |= 128 /* LViewFlags.Attached */;
|
|
13306
|
-
}
|
|
13307
|
-
/**
|
|
13308
|
-
* Track views created from the declaration container (TemplateRef) and inserted into a
|
|
13309
|
-
* different LContainer or attached directly to ApplicationRef.
|
|
13310
|
-
*/
|
|
13311
|
-
function trackMovedView(declarationContainer, lView) {
|
|
13312
|
-
ngDevMode && assertDefined(lView, 'LView required');
|
|
13313
|
-
ngDevMode && assertLContainer(declarationContainer);
|
|
13314
|
-
const movedViews = declarationContainer[MOVED_VIEWS];
|
|
13315
|
-
const parent = lView[PARENT];
|
|
13316
|
-
ngDevMode && assertDefined(parent, 'missing parent');
|
|
13317
|
-
if (isLView(parent)) {
|
|
13318
|
-
declarationContainer[FLAGS] |= 2 /* LContainerFlags.HasTransplantedViews */;
|
|
13319
|
-
}
|
|
13320
|
-
else {
|
|
13321
|
-
const insertedComponentLView = parent[PARENT][DECLARATION_COMPONENT_VIEW];
|
|
13322
|
-
ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');
|
|
13323
|
-
const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];
|
|
13324
|
-
ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');
|
|
13325
|
-
if (declaredComponentLView !== insertedComponentLView) {
|
|
13326
|
-
// At this point the declaration-component is not same as insertion-component; this means that
|
|
13327
|
-
// this is a transplanted view. Mark the declared lView as having transplanted views so that
|
|
13328
|
-
// those views can participate in CD.
|
|
13329
|
-
declarationContainer[FLAGS] |= 2 /* LContainerFlags.HasTransplantedViews */;
|
|
13330
|
-
}
|
|
13331
|
-
}
|
|
13332
|
-
if (movedViews === null) {
|
|
13333
|
-
declarationContainer[MOVED_VIEWS] = [lView];
|
|
13334
|
-
}
|
|
13335
|
-
else {
|
|
13336
|
-
movedViews.push(lView);
|
|
13337
|
-
}
|
|
13338
|
-
}
|
|
13339
13325
|
function detachMovedView(declarationContainer, lView) {
|
|
13340
13326
|
ngDevMode && assertLContainer(declarationContainer);
|
|
13341
13327
|
ngDevMode &&
|
|
@@ -13344,43 +13330,6 @@ function detachMovedView(declarationContainer, lView) {
|
|
|
13344
13330
|
const declarationViewIndex = movedViews.indexOf(lView);
|
|
13345
13331
|
movedViews.splice(declarationViewIndex, 1);
|
|
13346
13332
|
}
|
|
13347
|
-
/**
|
|
13348
|
-
* Detaches a view from a container.
|
|
13349
|
-
*
|
|
13350
|
-
* This method removes the view from the container's array of active views. It also
|
|
13351
|
-
* removes the view's elements from the DOM.
|
|
13352
|
-
*
|
|
13353
|
-
* @param lContainer The container from which to detach a view
|
|
13354
|
-
* @param removeIndex The index of the view to detach
|
|
13355
|
-
* @returns Detached LView instance.
|
|
13356
|
-
*/
|
|
13357
|
-
function detachView(lContainer, removeIndex) {
|
|
13358
|
-
if (lContainer.length <= CONTAINER_HEADER_OFFSET)
|
|
13359
|
-
return;
|
|
13360
|
-
const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;
|
|
13361
|
-
const viewToDetach = lContainer[indexInContainer];
|
|
13362
|
-
if (viewToDetach) {
|
|
13363
|
-
const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];
|
|
13364
|
-
if (declarationLContainer !== null && declarationLContainer !== lContainer) {
|
|
13365
|
-
detachMovedView(declarationLContainer, viewToDetach);
|
|
13366
|
-
}
|
|
13367
|
-
if (removeIndex > 0) {
|
|
13368
|
-
lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];
|
|
13369
|
-
}
|
|
13370
|
-
const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);
|
|
13371
|
-
removeViewFromDOM(viewToDetach[TVIEW], viewToDetach);
|
|
13372
|
-
// notify query that a view has been removed
|
|
13373
|
-
const lQueries = removedLView[QUERIES];
|
|
13374
|
-
if (lQueries !== null) {
|
|
13375
|
-
lQueries.detachView(removedLView[TVIEW]);
|
|
13376
|
-
}
|
|
13377
|
-
viewToDetach[PARENT] = null;
|
|
13378
|
-
viewToDetach[NEXT] = null;
|
|
13379
|
-
// Unsets the attached flag
|
|
13380
|
-
viewToDetach[FLAGS] &= ~128 /* LViewFlags.Attached */;
|
|
13381
|
-
}
|
|
13382
|
-
return viewToDetach;
|
|
13383
|
-
}
|
|
13384
13333
|
/**
|
|
13385
13334
|
* A standalone function which destroys an LView,
|
|
13386
13335
|
* conducting clean up (e.g. removing listeners, calling onDestroys).
|
|
@@ -13947,80 +13896,6 @@ function applyStyling(renderer, isClassBased, rNode, prop, value) {
|
|
|
13947
13896
|
}
|
|
13948
13897
|
}
|
|
13949
13898
|
|
|
13950
|
-
function createAndRenderEmbeddedLView(declarationLView, templateTNode, context, options) {
|
|
13951
|
-
const prevConsumer = setActiveConsumer$1(null);
|
|
13952
|
-
try {
|
|
13953
|
-
const embeddedTView = templateTNode.tView;
|
|
13954
|
-
ngDevMode && assertDefined(embeddedTView, 'TView must be defined for a template node.');
|
|
13955
|
-
ngDevMode && assertTNodeForLView(templateTNode, declarationLView);
|
|
13956
|
-
// Embedded views follow the change detection strategy of the view they're declared in.
|
|
13957
|
-
const isSignalView = declarationLView[FLAGS] & 4096 /* LViewFlags.SignalView */;
|
|
13958
|
-
const viewFlags = isSignalView ? 4096 /* LViewFlags.SignalView */ : 16 /* LViewFlags.CheckAlways */;
|
|
13959
|
-
const embeddedLView = createLView(declarationLView, embeddedTView, context, viewFlags, null, templateTNode, null, null, options?.injector ?? null, options?.embeddedViewInjector ?? null, options?.dehydratedView ?? null);
|
|
13960
|
-
const declarationLContainer = declarationLView[templateTNode.index];
|
|
13961
|
-
ngDevMode && assertLContainer(declarationLContainer);
|
|
13962
|
-
embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;
|
|
13963
|
-
const declarationViewLQueries = declarationLView[QUERIES];
|
|
13964
|
-
if (declarationViewLQueries !== null) {
|
|
13965
|
-
embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);
|
|
13966
|
-
}
|
|
13967
|
-
// execute creation mode of a view
|
|
13968
|
-
renderView(embeddedTView, embeddedLView, context);
|
|
13969
|
-
return embeddedLView;
|
|
13970
|
-
}
|
|
13971
|
-
finally {
|
|
13972
|
-
setActiveConsumer$1(prevConsumer);
|
|
13973
|
-
}
|
|
13974
|
-
}
|
|
13975
|
-
function getLViewFromLContainer(lContainer, index) {
|
|
13976
|
-
const adjustedIndex = CONTAINER_HEADER_OFFSET + index;
|
|
13977
|
-
// avoid reading past the array boundaries
|
|
13978
|
-
if (adjustedIndex < lContainer.length) {
|
|
13979
|
-
const lView = lContainer[adjustedIndex];
|
|
13980
|
-
ngDevMode && assertLView(lView);
|
|
13981
|
-
return lView;
|
|
13982
|
-
}
|
|
13983
|
-
return undefined;
|
|
13984
|
-
}
|
|
13985
|
-
/**
|
|
13986
|
-
* Returns whether an elements that belong to a view should be
|
|
13987
|
-
* inserted into the DOM. For client-only cases, DOM elements are
|
|
13988
|
-
* always inserted. For hydration cases, we check whether serialized
|
|
13989
|
-
* info is available for a view and the view is not in a "skip hydration"
|
|
13990
|
-
* block (in which case view contents was re-created, thus needing insertion).
|
|
13991
|
-
*/
|
|
13992
|
-
function shouldAddViewToDom(tNode, dehydratedView) {
|
|
13993
|
-
return (!dehydratedView || dehydratedView.firstChild === null || hasInSkipHydrationBlockFlag(tNode));
|
|
13994
|
-
}
|
|
13995
|
-
function addLViewToLContainer(lContainer, lView, index, addToDOM = true) {
|
|
13996
|
-
const tView = lView[TVIEW];
|
|
13997
|
-
// Insert into the view tree so the new view can be change-detected
|
|
13998
|
-
insertView(tView, lView, lContainer, index);
|
|
13999
|
-
// Insert elements that belong to this view into the DOM tree
|
|
14000
|
-
if (addToDOM) {
|
|
14001
|
-
const beforeNode = getBeforeNodeForView(index, lContainer);
|
|
14002
|
-
const renderer = lView[RENDERER];
|
|
14003
|
-
const parentRNode = renderer.parentNode(lContainer[NATIVE]);
|
|
14004
|
-
if (parentRNode !== null) {
|
|
14005
|
-
addViewToDOM(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);
|
|
14006
|
-
}
|
|
14007
|
-
}
|
|
14008
|
-
// When in hydration mode, reset the pointer to the first child in
|
|
14009
|
-
// the dehydrated view. This indicates that the view was hydrated and
|
|
14010
|
-
// further attaching/detaching should work with this view as normal.
|
|
14011
|
-
const hydrationInfo = lView[HYDRATION];
|
|
14012
|
-
if (hydrationInfo !== null && hydrationInfo.firstChild !== null) {
|
|
14013
|
-
hydrationInfo.firstChild = null;
|
|
14014
|
-
}
|
|
14015
|
-
}
|
|
14016
|
-
function removeLViewFromLContainer(lContainer, index) {
|
|
14017
|
-
const lView = detachView(lContainer, index);
|
|
14018
|
-
if (lView !== undefined) {
|
|
14019
|
-
destroyLView(lView[TVIEW], lView);
|
|
14020
|
-
}
|
|
14021
|
-
return lView;
|
|
14022
|
-
}
|
|
14023
|
-
|
|
14024
13899
|
function collectNativeNodes(tView, lView, tNode, result, isProjection = false) {
|
|
14025
13900
|
while (tNode !== null) {
|
|
14026
13901
|
// Let declarations don't have corresponding DOM nodes so we skip over them.
|
|
@@ -14095,6 +13970,15 @@ function collectNativeNodesInLContainer(lContainer, result) {
|
|
|
14095
13970
|
}
|
|
14096
13971
|
}
|
|
14097
13972
|
|
|
13973
|
+
function addAfterRenderSequencesForView(lView) {
|
|
13974
|
+
if (lView[AFTER_RENDER_SEQUENCES_TO_ADD] !== null) {
|
|
13975
|
+
for (const sequence of lView[AFTER_RENDER_SEQUENCES_TO_ADD]) {
|
|
13976
|
+
sequence.impl.addSequence(sequence);
|
|
13977
|
+
}
|
|
13978
|
+
lView[AFTER_RENDER_SEQUENCES_TO_ADD].length = 0;
|
|
13979
|
+
}
|
|
13980
|
+
}
|
|
13981
|
+
|
|
14098
13982
|
let freeConsumers = [];
|
|
14099
13983
|
/**
|
|
14100
13984
|
* Create a new template consumer pointing at the specified LView.
|
|
@@ -14440,6 +14324,7 @@ function refreshView(tView, lView, templateFn, context) {
|
|
|
14440
14324
|
// no changes cycle, the component would be not be dirty for the next update pass. This would
|
|
14441
14325
|
// be different in production mode where the component dirty state is not reset.
|
|
14442
14326
|
if (!isInCheckNoChangesPass) {
|
|
14327
|
+
addAfterRenderSequencesForView(lView);
|
|
14443
14328
|
lView[FLAGS] &= ~(64 /* LViewFlags.Dirty */ | 8 /* LViewFlags.FirstLViewPass */);
|
|
14444
14329
|
}
|
|
14445
14330
|
}
|
|
@@ -14557,12 +14442,17 @@ function detectChangesInView(lView, mode) {
|
|
|
14557
14442
|
refreshView(tView, lView, tView.template, lView[CONTEXT]);
|
|
14558
14443
|
}
|
|
14559
14444
|
else if (flags & 8192 /* LViewFlags.HasChildViewsToRefresh */) {
|
|
14560
|
-
|
|
14445
|
+
if (!isInCheckNoChangesPass) {
|
|
14446
|
+
runEffectsInView(lView);
|
|
14447
|
+
}
|
|
14561
14448
|
detectChangesInEmbeddedViews(lView, 1 /* ChangeDetectionMode.Targeted */);
|
|
14562
14449
|
const components = tView.components;
|
|
14563
14450
|
if (components !== null) {
|
|
14564
14451
|
detectChangesInChildComponents(lView, components, 1 /* ChangeDetectionMode.Targeted */);
|
|
14565
14452
|
}
|
|
14453
|
+
if (!isInCheckNoChangesPass) {
|
|
14454
|
+
addAfterRenderSequencesForView(lView);
|
|
14455
|
+
}
|
|
14566
14456
|
}
|
|
14567
14457
|
}
|
|
14568
14458
|
/** Refreshes child components in the current view (update mode). */
|
|
@@ -14644,6 +14534,187 @@ function markViewDirty(lView, source) {
|
|
|
14644
14534
|
return null;
|
|
14645
14535
|
}
|
|
14646
14536
|
|
|
14537
|
+
/**
|
|
14538
|
+
* Creates a LContainer, either from a container instruction, or for a ViewContainerRef.
|
|
14539
|
+
*
|
|
14540
|
+
* @param hostNative The host element for the LContainer
|
|
14541
|
+
* @param hostTNode The host TNode for the LContainer
|
|
14542
|
+
* @param currentView The parent view of the LContainer
|
|
14543
|
+
* @param native The native comment element
|
|
14544
|
+
* @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case
|
|
14545
|
+
* @returns LContainer
|
|
14546
|
+
*/
|
|
14547
|
+
function createLContainer(hostNative, currentView, native, tNode) {
|
|
14548
|
+
ngDevMode && assertLView(currentView);
|
|
14549
|
+
const lContainer = [
|
|
14550
|
+
hostNative, // host native
|
|
14551
|
+
true, // Boolean `true` in this position signifies that this is an `LContainer`
|
|
14552
|
+
0, // flags
|
|
14553
|
+
currentView, // parent
|
|
14554
|
+
null, // next
|
|
14555
|
+
tNode, // t_host
|
|
14556
|
+
null, // dehydrated views
|
|
14557
|
+
native, // native,
|
|
14558
|
+
null, // view refs
|
|
14559
|
+
null, // moved views
|
|
14560
|
+
];
|
|
14561
|
+
ngDevMode &&
|
|
14562
|
+
assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');
|
|
14563
|
+
return lContainer;
|
|
14564
|
+
}
|
|
14565
|
+
function getLViewFromLContainer(lContainer, index) {
|
|
14566
|
+
const adjustedIndex = CONTAINER_HEADER_OFFSET + index;
|
|
14567
|
+
// avoid reading past the array boundaries
|
|
14568
|
+
if (adjustedIndex < lContainer.length) {
|
|
14569
|
+
const lView = lContainer[adjustedIndex];
|
|
14570
|
+
ngDevMode && assertLView(lView);
|
|
14571
|
+
return lView;
|
|
14572
|
+
}
|
|
14573
|
+
return undefined;
|
|
14574
|
+
}
|
|
14575
|
+
function addLViewToLContainer(lContainer, lView, index, addToDOM = true) {
|
|
14576
|
+
const tView = lView[TVIEW];
|
|
14577
|
+
// Insert into the view tree so the new view can be change-detected
|
|
14578
|
+
insertView(tView, lView, lContainer, index);
|
|
14579
|
+
// Insert elements that belong to this view into the DOM tree
|
|
14580
|
+
if (addToDOM) {
|
|
14581
|
+
const beforeNode = getBeforeNodeForView(index, lContainer);
|
|
14582
|
+
const renderer = lView[RENDERER];
|
|
14583
|
+
const parentRNode = renderer.parentNode(lContainer[NATIVE]);
|
|
14584
|
+
if (parentRNode !== null) {
|
|
14585
|
+
addViewToDOM(tView, lContainer[T_HOST], renderer, lView, parentRNode, beforeNode);
|
|
14586
|
+
}
|
|
14587
|
+
}
|
|
14588
|
+
// When in hydration mode, reset the pointer to the first child in
|
|
14589
|
+
// the dehydrated view. This indicates that the view was hydrated and
|
|
14590
|
+
// further attaching/detaching should work with this view as normal.
|
|
14591
|
+
const hydrationInfo = lView[HYDRATION];
|
|
14592
|
+
if (hydrationInfo !== null && hydrationInfo.firstChild !== null) {
|
|
14593
|
+
hydrationInfo.firstChild = null;
|
|
14594
|
+
}
|
|
14595
|
+
}
|
|
14596
|
+
function removeLViewFromLContainer(lContainer, index) {
|
|
14597
|
+
const lView = detachView(lContainer, index);
|
|
14598
|
+
if (lView !== undefined) {
|
|
14599
|
+
destroyLView(lView[TVIEW], lView);
|
|
14600
|
+
}
|
|
14601
|
+
return lView;
|
|
14602
|
+
}
|
|
14603
|
+
/**
|
|
14604
|
+
* Detaches a view from a container.
|
|
14605
|
+
*
|
|
14606
|
+
* This method removes the view from the container's array of active views. It also
|
|
14607
|
+
* removes the view's elements from the DOM.
|
|
14608
|
+
*
|
|
14609
|
+
* @param lContainer The container from which to detach a view
|
|
14610
|
+
* @param removeIndex The index of the view to detach
|
|
14611
|
+
* @returns Detached LView instance.
|
|
14612
|
+
*/
|
|
14613
|
+
function detachView(lContainer, removeIndex) {
|
|
14614
|
+
if (lContainer.length <= CONTAINER_HEADER_OFFSET)
|
|
14615
|
+
return;
|
|
14616
|
+
const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;
|
|
14617
|
+
const viewToDetach = lContainer[indexInContainer];
|
|
14618
|
+
if (viewToDetach) {
|
|
14619
|
+
const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];
|
|
14620
|
+
if (declarationLContainer !== null && declarationLContainer !== lContainer) {
|
|
14621
|
+
detachMovedView(declarationLContainer, viewToDetach);
|
|
14622
|
+
}
|
|
14623
|
+
if (removeIndex > 0) {
|
|
14624
|
+
lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];
|
|
14625
|
+
}
|
|
14626
|
+
const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);
|
|
14627
|
+
removeViewFromDOM(viewToDetach[TVIEW], viewToDetach);
|
|
14628
|
+
// notify query that a view has been removed
|
|
14629
|
+
const lQueries = removedLView[QUERIES];
|
|
14630
|
+
if (lQueries !== null) {
|
|
14631
|
+
lQueries.detachView(removedLView[TVIEW]);
|
|
14632
|
+
}
|
|
14633
|
+
viewToDetach[PARENT] = null;
|
|
14634
|
+
viewToDetach[NEXT] = null;
|
|
14635
|
+
// Unsets the attached flag
|
|
14636
|
+
viewToDetach[FLAGS] &= ~128 /* LViewFlags.Attached */;
|
|
14637
|
+
}
|
|
14638
|
+
return viewToDetach;
|
|
14639
|
+
}
|
|
14640
|
+
/**
|
|
14641
|
+
* Inserts a view into a container.
|
|
14642
|
+
*
|
|
14643
|
+
* This adds the view to the container's array of active views in the correct
|
|
14644
|
+
* position. It also adds the view's elements to the DOM if the container isn't a
|
|
14645
|
+
* root node of another view (in that case, the view's elements will be added when
|
|
14646
|
+
* the container's parent view is added later).
|
|
14647
|
+
*
|
|
14648
|
+
* @param tView The `TView' of the `LView` to insert
|
|
14649
|
+
* @param lView The view to insert
|
|
14650
|
+
* @param lContainer The container into which the view should be inserted
|
|
14651
|
+
* @param index Which index in the container to insert the child view into
|
|
14652
|
+
*/
|
|
14653
|
+
function insertView(tView, lView, lContainer, index) {
|
|
14654
|
+
ngDevMode && assertLView(lView);
|
|
14655
|
+
ngDevMode && assertLContainer(lContainer);
|
|
14656
|
+
const indexInContainer = CONTAINER_HEADER_OFFSET + index;
|
|
14657
|
+
const containerLength = lContainer.length;
|
|
14658
|
+
if (index > 0) {
|
|
14659
|
+
// This is a new view, we need to add it to the children.
|
|
14660
|
+
lContainer[indexInContainer - 1][NEXT] = lView;
|
|
14661
|
+
}
|
|
14662
|
+
if (index < containerLength - CONTAINER_HEADER_OFFSET) {
|
|
14663
|
+
lView[NEXT] = lContainer[indexInContainer];
|
|
14664
|
+
addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);
|
|
14665
|
+
}
|
|
14666
|
+
else {
|
|
14667
|
+
lContainer.push(lView);
|
|
14668
|
+
lView[NEXT] = null;
|
|
14669
|
+
}
|
|
14670
|
+
lView[PARENT] = lContainer;
|
|
14671
|
+
// track views where declaration and insertion points are different
|
|
14672
|
+
const declarationLContainer = lView[DECLARATION_LCONTAINER];
|
|
14673
|
+
if (declarationLContainer !== null && lContainer !== declarationLContainer) {
|
|
14674
|
+
trackMovedView(declarationLContainer, lView);
|
|
14675
|
+
}
|
|
14676
|
+
// notify query that a new view has been added
|
|
14677
|
+
const lQueries = lView[QUERIES];
|
|
14678
|
+
if (lQueries !== null) {
|
|
14679
|
+
lQueries.insertView(tView);
|
|
14680
|
+
}
|
|
14681
|
+
updateAncestorTraversalFlagsOnAttach(lView);
|
|
14682
|
+
// Sets the attached flag
|
|
14683
|
+
lView[FLAGS] |= 128 /* LViewFlags.Attached */;
|
|
14684
|
+
}
|
|
14685
|
+
/**
|
|
14686
|
+
* Track views created from the declaration container (TemplateRef) and inserted into a
|
|
14687
|
+
* different LContainer or attached directly to ApplicationRef.
|
|
14688
|
+
*/
|
|
14689
|
+
function trackMovedView(declarationContainer, lView) {
|
|
14690
|
+
ngDevMode && assertDefined(lView, 'LView required');
|
|
14691
|
+
ngDevMode && assertLContainer(declarationContainer);
|
|
14692
|
+
const movedViews = declarationContainer[MOVED_VIEWS];
|
|
14693
|
+
const parent = lView[PARENT];
|
|
14694
|
+
ngDevMode && assertDefined(parent, 'missing parent');
|
|
14695
|
+
if (isLView(parent)) {
|
|
14696
|
+
declarationContainer[FLAGS] |= 2 /* LContainerFlags.HasTransplantedViews */;
|
|
14697
|
+
}
|
|
14698
|
+
else {
|
|
14699
|
+
const insertedComponentLView = parent[PARENT][DECLARATION_COMPONENT_VIEW];
|
|
14700
|
+
ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');
|
|
14701
|
+
const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];
|
|
14702
|
+
ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');
|
|
14703
|
+
if (declaredComponentLView !== insertedComponentLView) {
|
|
14704
|
+
// At this point the declaration-component is not same as insertion-component; this means that
|
|
14705
|
+
// this is a transplanted view. Mark the declared lView as having transplanted views so that
|
|
14706
|
+
// those views can participate in CD.
|
|
14707
|
+
declarationContainer[FLAGS] |= 2 /* LContainerFlags.HasTransplantedViews */;
|
|
14708
|
+
}
|
|
14709
|
+
}
|
|
14710
|
+
if (movedViews === null) {
|
|
14711
|
+
declarationContainer[MOVED_VIEWS] = [lView];
|
|
14712
|
+
}
|
|
14713
|
+
else {
|
|
14714
|
+
movedViews.push(lView);
|
|
14715
|
+
}
|
|
14716
|
+
}
|
|
14717
|
+
|
|
14647
14718
|
class ViewRef$1 {
|
|
14648
14719
|
_lView;
|
|
14649
14720
|
_cdRefInjectingView;
|
|
@@ -17378,34 +17449,6 @@ function ɵɵinvalidFactory() {
|
|
|
17378
17449
|
throw new Error(msg);
|
|
17379
17450
|
}
|
|
17380
17451
|
|
|
17381
|
-
/**
|
|
17382
|
-
* When elements are created dynamically after a view blueprint is created (e.g. through
|
|
17383
|
-
* i18nApply()), we need to adjust the blueprint for future template passes.
|
|
17384
|
-
*
|
|
17385
|
-
* @param tView `TView` associated with `LView`
|
|
17386
|
-
* @param lView The `LView` containing the blueprint to adjust
|
|
17387
|
-
* @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0
|
|
17388
|
-
* @param initialValue Initial value to store in blueprint
|
|
17389
|
-
*/
|
|
17390
|
-
function allocExpando(tView, lView, numSlotsToAlloc, initialValue) {
|
|
17391
|
-
if (numSlotsToAlloc === 0)
|
|
17392
|
-
return -1;
|
|
17393
|
-
if (ngDevMode) {
|
|
17394
|
-
assertFirstCreatePass(tView);
|
|
17395
|
-
assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');
|
|
17396
|
-
assertEqual(tView.data.length, lView.length, 'Expecting LView to be same size as TView');
|
|
17397
|
-
assertEqual(tView.data.length, tView.blueprint.length, 'Expecting Blueprint to be same size as TView');
|
|
17398
|
-
assertFirstUpdatePass(tView);
|
|
17399
|
-
}
|
|
17400
|
-
const allocIdx = lView.length;
|
|
17401
|
-
for (let i = 0; i < numSlotsToAlloc; i++) {
|
|
17402
|
-
lView.push(initialValue);
|
|
17403
|
-
tView.blueprint.push(initialValue);
|
|
17404
|
-
tView.data.push(null);
|
|
17405
|
-
}
|
|
17406
|
-
return allocIdx;
|
|
17407
|
-
}
|
|
17408
|
-
|
|
17409
17452
|
/**
|
|
17410
17453
|
* Resolve the matched directives on a node.
|
|
17411
17454
|
*/
|
|
@@ -17588,17 +17631,6 @@ function captureNodeBindings(mode, aliasMap, directiveIndex, bindingsResult, hos
|
|
|
17588
17631
|
continue;
|
|
17589
17632
|
}
|
|
17590
17633
|
bindingsResult ??= {};
|
|
17591
|
-
let internalName;
|
|
17592
|
-
let inputFlags = InputFlags.None;
|
|
17593
|
-
// For inputs, the value might be an array capturing additional
|
|
17594
|
-
// input flags.
|
|
17595
|
-
if (Array.isArray(value)) {
|
|
17596
|
-
internalName = value[0];
|
|
17597
|
-
inputFlags = value[1];
|
|
17598
|
-
}
|
|
17599
|
-
else {
|
|
17600
|
-
internalName = value;
|
|
17601
|
-
}
|
|
17602
17634
|
// If there are no host directive mappings, we want to remap using the alias map from the
|
|
17603
17635
|
// definition itself. If there is an alias map, it has two functions:
|
|
17604
17636
|
// 1. It serves as an allowlist of bindings that are exposed by the host directives. Only the
|
|
@@ -17615,24 +17647,20 @@ function captureNodeBindings(mode, aliasMap, directiveIndex, bindingsResult, hos
|
|
|
17615
17647
|
finalPublicName = hostDirectiveAliasMap[publicName];
|
|
17616
17648
|
}
|
|
17617
17649
|
if (mode === 0 /* CaptureNodeBindingMode.Inputs */) {
|
|
17618
|
-
addPropertyBinding(bindingsResult, directiveIndex, finalPublicName,
|
|
17650
|
+
addPropertyBinding(bindingsResult, directiveIndex, finalPublicName, publicName);
|
|
17619
17651
|
}
|
|
17620
17652
|
else {
|
|
17621
|
-
addPropertyBinding(bindingsResult, directiveIndex, finalPublicName,
|
|
17653
|
+
addPropertyBinding(bindingsResult, directiveIndex, finalPublicName, value);
|
|
17622
17654
|
}
|
|
17623
17655
|
}
|
|
17624
17656
|
return bindingsResult;
|
|
17625
17657
|
}
|
|
17626
|
-
function addPropertyBinding(bindings, directiveIndex, publicName,
|
|
17627
|
-
let values;
|
|
17658
|
+
function addPropertyBinding(bindings, directiveIndex, publicName, lookupName) {
|
|
17628
17659
|
if (bindings.hasOwnProperty(publicName)) {
|
|
17629
|
-
|
|
17660
|
+
bindings[publicName].push(directiveIndex, lookupName);
|
|
17630
17661
|
}
|
|
17631
17662
|
else {
|
|
17632
|
-
|
|
17633
|
-
}
|
|
17634
|
-
if (inputFlags !== undefined) {
|
|
17635
|
-
values.push(inputFlags);
|
|
17663
|
+
bindings[publicName] = [directiveIndex, lookupName];
|
|
17636
17664
|
}
|
|
17637
17665
|
}
|
|
17638
17666
|
/**
|
|
@@ -17669,15 +17697,14 @@ function generateInitialInputs(inputs, directiveIndex, attrs) {
|
|
|
17669
17697
|
if (typeof attrName === 'number')
|
|
17670
17698
|
break;
|
|
17671
17699
|
if (inputs.hasOwnProperty(attrName)) {
|
|
17672
|
-
if (inputsToStore === null)
|
|
17673
|
-
inputsToStore = [];
|
|
17674
17700
|
// Find the input's public name from the input store. Note that we can be found easier
|
|
17675
17701
|
// through the directive def, but we want to do it using the inputs store so that it can
|
|
17676
17702
|
// account for host directive aliases.
|
|
17677
17703
|
const inputConfig = inputs[attrName];
|
|
17678
|
-
for (let j = 0; j < inputConfig.length; j +=
|
|
17704
|
+
for (let j = 0; j < inputConfig.length; j += 2) {
|
|
17679
17705
|
if (inputConfig[j] === directiveIndex) {
|
|
17680
|
-
inputsToStore
|
|
17706
|
+
inputsToStore ??= [];
|
|
17707
|
+
inputsToStore.push(inputConfig[j + 1], attrs[i + 1]);
|
|
17681
17708
|
// A directive can't have multiple inputs with the same name so we can break here.
|
|
17682
17709
|
break;
|
|
17683
17710
|
}
|
|
@@ -17846,34 +17873,22 @@ class ComponentFactoryResolver extends ComponentFactoryResolver$1 {
|
|
|
17846
17873
|
return new ComponentFactory(componentDef, this.ngModule);
|
|
17847
17874
|
}
|
|
17848
17875
|
}
|
|
17849
|
-
function
|
|
17850
|
-
|
|
17851
|
-
|
|
17852
|
-
|
|
17853
|
-
|
|
17854
|
-
|
|
17855
|
-
|
|
17856
|
-
|
|
17857
|
-
|
|
17858
|
-
|
|
17859
|
-
const isArray = Array.isArray(value);
|
|
17860
|
-
const propName = isArray ? value[0] : value;
|
|
17861
|
-
const flags = isArray ? value[1] : InputFlags.None;
|
|
17862
|
-
if (isInputMap) {
|
|
17863
|
-
array.push({
|
|
17864
|
-
propName: propName,
|
|
17865
|
-
templateName: publicName,
|
|
17866
|
-
isSignal: (flags & InputFlags.SignalBased) !== 0,
|
|
17867
|
-
});
|
|
17868
|
-
}
|
|
17869
|
-
else {
|
|
17870
|
-
array.push({
|
|
17871
|
-
propName: propName,
|
|
17872
|
-
templateName: publicName,
|
|
17873
|
-
});
|
|
17876
|
+
function toInputRefArray(map) {
|
|
17877
|
+
return Object.keys(map).map((name) => {
|
|
17878
|
+
const [propName, flags, transform] = map[name];
|
|
17879
|
+
const inputData = {
|
|
17880
|
+
propName: propName,
|
|
17881
|
+
templateName: name,
|
|
17882
|
+
isSignal: (flags & InputFlags.SignalBased) !== 0,
|
|
17883
|
+
};
|
|
17884
|
+
if (transform) {
|
|
17885
|
+
inputData.transform = transform;
|
|
17874
17886
|
}
|
|
17875
|
-
|
|
17876
|
-
|
|
17887
|
+
return inputData;
|
|
17888
|
+
});
|
|
17889
|
+
}
|
|
17890
|
+
function toOutputRefArray(map) {
|
|
17891
|
+
return Object.keys(map).map((name) => ({ propName: map[name], templateName: name }));
|
|
17877
17892
|
}
|
|
17878
17893
|
function verifyNotAnOrphanComponent(componentDef) {
|
|
17879
17894
|
// TODO(pk): create assert that verifies ngDevMode
|
|
@@ -17932,20 +17947,10 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
17932
17947
|
ngContentSelectors;
|
|
17933
17948
|
isBoundToModule;
|
|
17934
17949
|
get inputs() {
|
|
17935
|
-
|
|
17936
|
-
const inputTransforms = componentDef.inputTransforms;
|
|
17937
|
-
const refArray = toRefArray(componentDef.inputs, true);
|
|
17938
|
-
if (inputTransforms !== null) {
|
|
17939
|
-
for (const input of refArray) {
|
|
17940
|
-
if (inputTransforms.hasOwnProperty(input.propName)) {
|
|
17941
|
-
input.transform = inputTransforms[input.propName];
|
|
17942
|
-
}
|
|
17943
|
-
}
|
|
17944
|
-
}
|
|
17945
|
-
return refArray;
|
|
17950
|
+
return toInputRefArray(this.componentDef.inputs);
|
|
17946
17951
|
}
|
|
17947
17952
|
get outputs() {
|
|
17948
|
-
return
|
|
17953
|
+
return toOutputRefArray(this.componentDef.outputs);
|
|
17949
17954
|
}
|
|
17950
17955
|
/**
|
|
17951
17956
|
* @param componentDef The component definition.
|
|
@@ -17967,7 +17972,7 @@ class ComponentFactory extends ComponentFactory$1 {
|
|
|
17967
17972
|
const cmpDef = this.componentDef;
|
|
17968
17973
|
ngDevMode && verifyNotAnOrphanComponent(cmpDef);
|
|
17969
17974
|
const tAttributes = rootSelectorOrNode
|
|
17970
|
-
? ['ng-version', '19.2.0-
|
|
17975
|
+
? ['ng-version', '19.2.0-rc.0']
|
|
17971
17976
|
: // Extract attributes and classes from the first selector only to match VE behavior.
|
|
17972
17977
|
extractAttrsAndClassesFromSelector(this.componentDef.selectors[0]);
|
|
17973
17978
|
// Create the root view. Uses empty TView and ContentTemplate.
|
|
@@ -19840,7 +19845,74 @@ function ɵɵdefineNgModule(def) {
|
|
|
19840
19845
|
return res;
|
|
19841
19846
|
});
|
|
19842
19847
|
}
|
|
19843
|
-
|
|
19848
|
+
/**
|
|
19849
|
+
* Converts binding objects from the `DirectiveDefinition` into more efficient
|
|
19850
|
+
* lookup dictionaries that are optimized for the framework runtime.
|
|
19851
|
+
*
|
|
19852
|
+
* This function converts inputs or output directive information into new objects
|
|
19853
|
+
* where the public name conveniently maps to the minified internal field name.
|
|
19854
|
+
*
|
|
19855
|
+
* For inputs, the input flags are additionally persisted into the new data structure,
|
|
19856
|
+
* so that those can be quickly retrieved when needed.
|
|
19857
|
+
*
|
|
19858
|
+
* e.g. for
|
|
19859
|
+
*
|
|
19860
|
+
* ```ts
|
|
19861
|
+
* class Comp {
|
|
19862
|
+
* @Input()
|
|
19863
|
+
* propName1: string;
|
|
19864
|
+
*
|
|
19865
|
+
* @Input('publicName2')
|
|
19866
|
+
* declaredPropName2: number;
|
|
19867
|
+
*
|
|
19868
|
+
* inputSignal = input(3);
|
|
19869
|
+
* }
|
|
19870
|
+
* ```
|
|
19871
|
+
*
|
|
19872
|
+
* will be serialized as
|
|
19873
|
+
*
|
|
19874
|
+
* ```ts
|
|
19875
|
+
* {
|
|
19876
|
+
* propName1: 'propName1',
|
|
19877
|
+
* declaredPropName2: ['publicName2', 'declaredPropName2'],
|
|
19878
|
+
* inputSignal: [InputFlags.SignalBased, 'inputSignal'],
|
|
19879
|
+
* }
|
|
19880
|
+
* ```
|
|
19881
|
+
*
|
|
19882
|
+
* which is than translated by the minifier as:
|
|
19883
|
+
*
|
|
19884
|
+
* ```ts
|
|
19885
|
+
* {
|
|
19886
|
+
* minifiedPropName1: 'propName1',
|
|
19887
|
+
* minifiedPropName2: ['publicName2', 'declaredPropName2'],
|
|
19888
|
+
* minifiedInputSignal: [InputFlags.SignalBased, 'inputSignal'],
|
|
19889
|
+
* }
|
|
19890
|
+
* ```
|
|
19891
|
+
*
|
|
19892
|
+
* becomes: (public name => minifiedName + isSignal if needed)
|
|
19893
|
+
*
|
|
19894
|
+
* ```ts
|
|
19895
|
+
* {
|
|
19896
|
+
* 'propName1': 'minifiedPropName1',
|
|
19897
|
+
* 'publicName2': 'minifiedPropName2',
|
|
19898
|
+
* 'inputSignal': ['minifiedInputSignal', InputFlags.SignalBased],
|
|
19899
|
+
* }
|
|
19900
|
+
* ```
|
|
19901
|
+
*
|
|
19902
|
+
* Optionally the function can take `declaredInputs` which will result
|
|
19903
|
+
* in: (public name => declared name)
|
|
19904
|
+
*
|
|
19905
|
+
* ```ts
|
|
19906
|
+
* {
|
|
19907
|
+
* 'propName1': 'propName1',
|
|
19908
|
+
* 'publicName2': 'declaredPropName2',
|
|
19909
|
+
* 'inputSignal': 'inputSignal',
|
|
19910
|
+
* }
|
|
19911
|
+
* ```
|
|
19912
|
+
*
|
|
19913
|
+
|
|
19914
|
+
*/
|
|
19915
|
+
function parseAndConvertInputsForDefinition(obj, declaredInputs) {
|
|
19844
19916
|
if (obj == null)
|
|
19845
19917
|
return EMPTY_OBJ;
|
|
19846
19918
|
const newLookup = {};
|
|
@@ -19849,26 +19921,33 @@ function parseAndConvertBindingsForDefinition(obj, declaredInputs) {
|
|
|
19849
19921
|
const value = obj[minifiedKey];
|
|
19850
19922
|
let publicName;
|
|
19851
19923
|
let declaredName;
|
|
19852
|
-
let inputFlags
|
|
19924
|
+
let inputFlags;
|
|
19925
|
+
let transform;
|
|
19853
19926
|
if (Array.isArray(value)) {
|
|
19854
19927
|
inputFlags = value[0];
|
|
19855
19928
|
publicName = value[1];
|
|
19856
19929
|
declaredName = value[2] ?? publicName; // declared name might not be set to save bytes.
|
|
19930
|
+
transform = value[3] || null;
|
|
19857
19931
|
}
|
|
19858
19932
|
else {
|
|
19859
19933
|
publicName = value;
|
|
19860
19934
|
declaredName = value;
|
|
19935
|
+
inputFlags = InputFlags.None;
|
|
19936
|
+
transform = null;
|
|
19861
19937
|
}
|
|
19862
|
-
|
|
19863
|
-
|
|
19864
|
-
|
|
19865
|
-
|
|
19866
|
-
|
|
19867
|
-
|
|
19868
|
-
|
|
19869
|
-
|
|
19870
|
-
|
|
19871
|
-
|
|
19938
|
+
newLookup[publicName] = [minifiedKey, inputFlags, transform];
|
|
19939
|
+
declaredInputs[publicName] = declaredName;
|
|
19940
|
+
}
|
|
19941
|
+
}
|
|
19942
|
+
return newLookup;
|
|
19943
|
+
}
|
|
19944
|
+
function parseAndConvertOutputsForDefinition(obj) {
|
|
19945
|
+
if (obj == null)
|
|
19946
|
+
return EMPTY_OBJ;
|
|
19947
|
+
const newLookup = {};
|
|
19948
|
+
for (const minifiedKey in obj) {
|
|
19949
|
+
if (obj.hasOwnProperty(minifiedKey)) {
|
|
19950
|
+
newLookup[obj[minifiedKey]] = minifiedKey;
|
|
19872
19951
|
}
|
|
19873
19952
|
}
|
|
19874
19953
|
return newLookup;
|
|
@@ -19933,7 +20012,6 @@ function getNgDirectiveDef(directiveDefinition) {
|
|
|
19933
20012
|
hostAttrs: directiveDefinition.hostAttrs || null,
|
|
19934
20013
|
contentQueries: directiveDefinition.contentQueries || null,
|
|
19935
20014
|
declaredInputs: declaredInputs,
|
|
19936
|
-
inputTransforms: null,
|
|
19937
20015
|
inputConfig: directiveDefinition.inputs || EMPTY_OBJ,
|
|
19938
20016
|
exportAs: directiveDefinition.exportAs || null,
|
|
19939
20017
|
standalone: directiveDefinition.standalone ?? true,
|
|
@@ -19944,8 +20022,8 @@ function getNgDirectiveDef(directiveDefinition) {
|
|
|
19944
20022
|
setInput: null,
|
|
19945
20023
|
findHostDirectiveDefs: null,
|
|
19946
20024
|
hostDirectives: null,
|
|
19947
|
-
inputs:
|
|
19948
|
-
outputs:
|
|
20025
|
+
inputs: parseAndConvertInputsForDefinition(directiveDefinition.inputs, declaredInputs),
|
|
20026
|
+
outputs: parseAndConvertOutputsForDefinition(directiveDefinition.outputs),
|
|
19949
20027
|
debugInfo: null,
|
|
19950
20028
|
};
|
|
19951
20029
|
}
|
|
@@ -20074,7 +20152,6 @@ function ɵɵInheritDefinitionFeature(definition) {
|
|
|
20074
20152
|
// would've justified object creation. Unwrap them if necessary.
|
|
20075
20153
|
const writeableDef = definition;
|
|
20076
20154
|
writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);
|
|
20077
|
-
writeableDef.inputTransforms = maybeUnwrapEmpty(definition.inputTransforms);
|
|
20078
20155
|
writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);
|
|
20079
20156
|
writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);
|
|
20080
20157
|
// Merge hostBindings
|
|
@@ -20131,23 +20208,9 @@ function mergeInputsWithTransforms(target, source) {
|
|
|
20131
20208
|
continue;
|
|
20132
20209
|
}
|
|
20133
20210
|
const value = source.inputs[key];
|
|
20134
|
-
if (value
|
|
20135
|
-
|
|
20136
|
-
|
|
20137
|
-
target.inputs[key] = value;
|
|
20138
|
-
target.declaredInputs[key] = source.declaredInputs[key];
|
|
20139
|
-
// If the input is inherited, and we have a transform for it, we also inherit it.
|
|
20140
|
-
// Note that transforms should not be inherited if the input has its own metadata
|
|
20141
|
-
// in the `source` directive itself already (i.e. the input is re-declared/overridden).
|
|
20142
|
-
if (source.inputTransforms !== null) {
|
|
20143
|
-
// Note: transforms are stored with their minified names.
|
|
20144
|
-
// Perf: only access the minified name when there are source transforms.
|
|
20145
|
-
const minifiedName = Array.isArray(value) ? value[0] : value;
|
|
20146
|
-
if (!source.inputTransforms.hasOwnProperty(minifiedName)) {
|
|
20147
|
-
continue;
|
|
20148
|
-
}
|
|
20149
|
-
target.inputTransforms ??= {};
|
|
20150
|
-
target.inputTransforms[minifiedName] = source.inputTransforms[minifiedName];
|
|
20211
|
+
if (value !== undefined) {
|
|
20212
|
+
target.inputs[key] = value;
|
|
20213
|
+
target.declaredInputs[key] = source.declaredInputs[key];
|
|
20151
20214
|
}
|
|
20152
20215
|
}
|
|
20153
20216
|
}
|
|
@@ -20461,30 +20524,6 @@ function validateMappings(bindingType, def, hostDirectiveBindings) {
|
|
|
20461
20524
|
}
|
|
20462
20525
|
}
|
|
20463
20526
|
|
|
20464
|
-
/**
|
|
20465
|
-
* Decorates the directive definition with support for input transform functions.
|
|
20466
|
-
*
|
|
20467
|
-
* If the directive uses inheritance, the feature should be included before the
|
|
20468
|
-
* `InheritDefinitionFeature` to ensure that the `inputTransforms` field is populated.
|
|
20469
|
-
*
|
|
20470
|
-
* @codeGenApi
|
|
20471
|
-
*/
|
|
20472
|
-
function ɵɵInputTransformsFeature(definition) {
|
|
20473
|
-
const inputs = definition.inputConfig;
|
|
20474
|
-
const inputTransforms = {};
|
|
20475
|
-
for (const minifiedKey in inputs) {
|
|
20476
|
-
if (inputs.hasOwnProperty(minifiedKey)) {
|
|
20477
|
-
// Note: the private names are used for the keys, rather than the public ones, because public
|
|
20478
|
-
// names can be re-aliased in host directives which would invalidate the lookup.
|
|
20479
|
-
const value = inputs[minifiedKey];
|
|
20480
|
-
if (Array.isArray(value) && value[3]) {
|
|
20481
|
-
inputTransforms[minifiedKey] = value[3];
|
|
20482
|
-
}
|
|
20483
|
-
}
|
|
20484
|
-
}
|
|
20485
|
-
definition.inputTransforms = inputTransforms;
|
|
20486
|
-
}
|
|
20487
|
-
|
|
20488
20527
|
function isIterable(obj) {
|
|
20489
20528
|
return obj !== null && typeof obj === 'object' && obj[Symbol.iterator] !== undefined;
|
|
20490
20529
|
}
|
|
@@ -23415,12 +23454,6 @@ class ApplicationRef {
|
|
|
23415
23454
|
* @internal
|
|
23416
23455
|
*/
|
|
23417
23456
|
dirtyFlags = 0 /* ApplicationRefDirtyFlags.None */;
|
|
23418
|
-
/**
|
|
23419
|
-
* Like `dirtyFlags` but don't cause `tick()` to loop.
|
|
23420
|
-
*
|
|
23421
|
-
* @internal
|
|
23422
|
-
*/
|
|
23423
|
-
deferredDirtyFlags = 0 /* ApplicationRefDirtyFlags.None */;
|
|
23424
23457
|
/**
|
|
23425
23458
|
* Most recent snapshot from the `TracingService`, if any.
|
|
23426
23459
|
*
|
|
@@ -23634,9 +23667,6 @@ class ApplicationRef {
|
|
|
23634
23667
|
if (this._rendererFactory === null && !this._injector.destroyed) {
|
|
23635
23668
|
this._rendererFactory = this._injector.get(RendererFactory2, null, { optional: true });
|
|
23636
23669
|
}
|
|
23637
|
-
// When beginning synchronization, all deferred dirtiness becomes active dirtiness.
|
|
23638
|
-
this.dirtyFlags |= this.deferredDirtyFlags;
|
|
23639
|
-
this.deferredDirtyFlags = 0 /* ApplicationRefDirtyFlags.None */;
|
|
23640
23670
|
let runs = 0;
|
|
23641
23671
|
while (this.dirtyFlags !== 0 /* ApplicationRefDirtyFlags.None */ && runs++ < MAXIMUM_REFRESH_RERUNS) {
|
|
23642
23672
|
profiler(14 /* ProfilerEvent.ChangeDetectionSyncStart */);
|
|
@@ -23654,9 +23684,6 @@ class ApplicationRef {
|
|
|
23654
23684
|
* Perform a single synchronization pass.
|
|
23655
23685
|
*/
|
|
23656
23686
|
synchronizeOnce() {
|
|
23657
|
-
// If we happened to loop, deferred dirtiness can be processed as active dirtiness again.
|
|
23658
|
-
this.dirtyFlags |= this.deferredDirtyFlags;
|
|
23659
|
-
this.deferredDirtyFlags = 0 /* ApplicationRefDirtyFlags.None */;
|
|
23660
23687
|
// First, process any dirty root effects.
|
|
23661
23688
|
if (this.dirtyFlags & 16 /* ApplicationRefDirtyFlags.RootEffects */) {
|
|
23662
23689
|
this.dirtyFlags &= ~16 /* ApplicationRefDirtyFlags.RootEffects */;
|
|
@@ -33333,9 +33360,13 @@ function ɵsetClassDebugInfo(type, debugInfo) {
|
|
|
33333
33360
|
* @param applyMetadata Callback that will apply a new set of metadata on the `type` when invoked.
|
|
33334
33361
|
* @param environment Syntehtic namespace imports that need to be passed along to the callback.
|
|
33335
33362
|
* @param locals Local symbols from the source location that have to be exposed to the callback.
|
|
33363
|
+
* @param importMeta `import.meta` from the call site of the replacement function. Optional since
|
|
33364
|
+
* it isn't used internally.
|
|
33365
|
+
* @param id ID to the class being replaced. **Not** the same as the component definition ID.
|
|
33366
|
+
* Optional since the ID might not be available internally.
|
|
33336
33367
|
* @codeGenApi
|
|
33337
33368
|
*/
|
|
33338
|
-
function ɵɵreplaceMetadata(type, applyMetadata, namespaces, locals) {
|
|
33369
|
+
function ɵɵreplaceMetadata(type, applyMetadata, namespaces, locals, importMeta = null, id = null) {
|
|
33339
33370
|
ngDevMode && assertComponentDef(type);
|
|
33340
33371
|
const currentDef = getComponentDef(type);
|
|
33341
33372
|
// The reason `applyMetadata` is a callback that is invoked (almost) immediately is because
|
|
@@ -33357,7 +33388,7 @@ function ɵɵreplaceMetadata(type, applyMetadata, namespaces, locals) {
|
|
|
33357
33388
|
// Note: we have the additional check, because `IsRoot` can also indicate
|
|
33358
33389
|
// a component created through something like `createComponent`.
|
|
33359
33390
|
if (isRootView(root) && root[PARENT] === null) {
|
|
33360
|
-
recreateMatchingLViews(newDef, oldDef, root);
|
|
33391
|
+
recreateMatchingLViews(importMeta, id, newDef, oldDef, root);
|
|
33361
33392
|
}
|
|
33362
33393
|
}
|
|
33363
33394
|
}
|
|
@@ -33393,10 +33424,12 @@ function mergeWithExistingDefinition(currentDef, newDef) {
|
|
|
33393
33424
|
}
|
|
33394
33425
|
/**
|
|
33395
33426
|
* Finds all LViews matching a specific component definition and recreates them.
|
|
33427
|
+
* @param importMeta `import.meta` information.
|
|
33428
|
+
* @param id HMR ID of the component.
|
|
33396
33429
|
* @param oldDef Component definition to search for.
|
|
33397
33430
|
* @param rootLView View from which to start the search.
|
|
33398
33431
|
*/
|
|
33399
|
-
function recreateMatchingLViews(newDef, oldDef, rootLView) {
|
|
33432
|
+
function recreateMatchingLViews(importMeta, id, newDef, oldDef, rootLView) {
|
|
33400
33433
|
ngDevMode &&
|
|
33401
33434
|
assertDefined(oldDef.tView, 'Expected a component definition that has been instantiated at least once');
|
|
33402
33435
|
const tView = rootLView[TVIEW];
|
|
@@ -33404,7 +33437,7 @@ function recreateMatchingLViews(newDef, oldDef, rootLView) {
|
|
|
33404
33437
|
// produce false positives when using inheritance.
|
|
33405
33438
|
if (tView === oldDef.tView) {
|
|
33406
33439
|
ngDevMode && assertComponentDef(oldDef.type);
|
|
33407
|
-
recreateLView(newDef, oldDef, rootLView);
|
|
33440
|
+
recreateLView(importMeta, id, newDef, oldDef, rootLView);
|
|
33408
33441
|
return;
|
|
33409
33442
|
}
|
|
33410
33443
|
for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {
|
|
@@ -33412,14 +33445,14 @@ function recreateMatchingLViews(newDef, oldDef, rootLView) {
|
|
|
33412
33445
|
if (isLContainer(current)) {
|
|
33413
33446
|
// The host can be an LView if a component is injecting `ViewContainerRef`.
|
|
33414
33447
|
if (isLView(current[HOST])) {
|
|
33415
|
-
recreateMatchingLViews(newDef, oldDef, current[HOST]);
|
|
33448
|
+
recreateMatchingLViews(importMeta, id, newDef, oldDef, current[HOST]);
|
|
33416
33449
|
}
|
|
33417
33450
|
for (let j = CONTAINER_HEADER_OFFSET; j < current.length; j++) {
|
|
33418
|
-
recreateMatchingLViews(newDef, oldDef, current[j]);
|
|
33451
|
+
recreateMatchingLViews(importMeta, id, newDef, oldDef, current[j]);
|
|
33419
33452
|
}
|
|
33420
33453
|
}
|
|
33421
33454
|
else if (isLView(current)) {
|
|
33422
|
-
recreateMatchingLViews(newDef, oldDef, current);
|
|
33455
|
+
recreateMatchingLViews(importMeta, id, newDef, oldDef, current);
|
|
33423
33456
|
}
|
|
33424
33457
|
}
|
|
33425
33458
|
}
|
|
@@ -33438,11 +33471,13 @@ function clearRendererCache(factory, def) {
|
|
|
33438
33471
|
}
|
|
33439
33472
|
/**
|
|
33440
33473
|
* Recreates an LView in-place from a new component definition.
|
|
33474
|
+
* @param importMeta `import.meta` information.
|
|
33475
|
+
* @param id HMR ID for the component.
|
|
33441
33476
|
* @param newDef Definition from which to recreate the view.
|
|
33442
33477
|
* @param oldDef Previous component definition being swapped out.
|
|
33443
33478
|
* @param lView View to be recreated.
|
|
33444
33479
|
*/
|
|
33445
|
-
function recreateLView(newDef, oldDef, lView) {
|
|
33480
|
+
function recreateLView(importMeta, id, newDef, oldDef, lView) {
|
|
33446
33481
|
const instance = lView[CONTEXT];
|
|
33447
33482
|
let host = lView[HOST];
|
|
33448
33483
|
// In theory the parent can also be an LContainer, but it appears like that's
|
|
@@ -33494,10 +33529,29 @@ function recreateLView(newDef, oldDef, lView) {
|
|
|
33494
33529
|
};
|
|
33495
33530
|
// The callback isn't guaranteed to be inside the Zone so we need to bring it in ourselves.
|
|
33496
33531
|
if (zone === null) {
|
|
33497
|
-
recreate
|
|
33532
|
+
executeWithInvalidateFallback(importMeta, id, recreate);
|
|
33498
33533
|
}
|
|
33499
33534
|
else {
|
|
33500
|
-
zone.run(recreate);
|
|
33535
|
+
zone.run(() => executeWithInvalidateFallback(importMeta, id, recreate));
|
|
33536
|
+
}
|
|
33537
|
+
}
|
|
33538
|
+
/**
|
|
33539
|
+
* Runs an HMR-related function and falls back to
|
|
33540
|
+
* invalidating the HMR data if it throws an error.
|
|
33541
|
+
*/
|
|
33542
|
+
function executeWithInvalidateFallback(importMeta, id, callback) {
|
|
33543
|
+
try {
|
|
33544
|
+
callback();
|
|
33545
|
+
}
|
|
33546
|
+
catch (e) {
|
|
33547
|
+
const errorMessage = e.message;
|
|
33548
|
+
// If we have all the necessary information and APIs to send off the invalidation
|
|
33549
|
+
// request, send it before rethrowing so the dev server can decide what to do.
|
|
33550
|
+
if (id !== null && errorMessage) {
|
|
33551
|
+
importMeta?.hot?.send?.('angular:invalidate', { id, message: errorMessage, error: true });
|
|
33552
|
+
}
|
|
33553
|
+
// Throw the error in case the page doesn't get refreshed.
|
|
33554
|
+
throw e;
|
|
33501
33555
|
}
|
|
33502
33556
|
}
|
|
33503
33557
|
/**
|
|
@@ -33586,7 +33640,6 @@ const angularCoreEnv = (() => ({
|
|
|
33586
33640
|
'ɵɵProvidersFeature': ɵɵProvidersFeature,
|
|
33587
33641
|
'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,
|
|
33588
33642
|
'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,
|
|
33589
|
-
'ɵɵInputTransformsFeature': ɵɵInputTransformsFeature,
|
|
33590
33643
|
'ɵɵExternalStylesFeature': ɵɵExternalStylesFeature,
|
|
33591
33644
|
'ɵɵnextContext': ɵɵnextContext,
|
|
33592
33645
|
'ɵɵnamespaceHTML': ɵɵnamespaceHTML,
|
|
@@ -34925,7 +34978,7 @@ class Version {
|
|
|
34925
34978
|
/**
|
|
34926
34979
|
* @publicApi
|
|
34927
34980
|
*/
|
|
34928
|
-
const VERSION = new Version('19.2.0-
|
|
34981
|
+
const VERSION = new Version('19.2.0-rc.0');
|
|
34929
34982
|
|
|
34930
34983
|
/**
|
|
34931
34984
|
* Combination of NgModuleFactory and ComponentFactories.
|
|
@@ -35335,13 +35388,6 @@ class ChangeDetectionSchedulerImpl {
|
|
|
35335
35388
|
this.appRef.dirtyFlags |= 4 /* ApplicationRefDirtyFlags.ViewTreeCheck */;
|
|
35336
35389
|
break;
|
|
35337
35390
|
}
|
|
35338
|
-
case 8 /* NotificationSource.DeferredRenderHook */: {
|
|
35339
|
-
// Render hooks are "deferred" when they're triggered from other render hooks. Using the
|
|
35340
|
-
// deferred dirty flags ensures that adding new hooks doesn't automatically trigger a loop
|
|
35341
|
-
// inside tick().
|
|
35342
|
-
this.appRef.deferredDirtyFlags |= 8 /* ApplicationRefDirtyFlags.AfterRender */;
|
|
35343
|
-
break;
|
|
35344
|
-
}
|
|
35345
35391
|
case 6 /* NotificationSource.CustomElement */: {
|
|
35346
35392
|
// We use `ViewTreeTraversal` to ensure we refresh the element even if this is triggered
|
|
35347
35393
|
// during CD. In practice this is a no-op since the elements code also calls via a
|
|
@@ -35350,7 +35396,7 @@ class ChangeDetectionSchedulerImpl {
|
|
|
35350
35396
|
force = true;
|
|
35351
35397
|
break;
|
|
35352
35398
|
}
|
|
35353
|
-
case
|
|
35399
|
+
case 12 /* NotificationSource.RootEffect */: {
|
|
35354
35400
|
this.appRef.dirtyFlags |= 16 /* ApplicationRefDirtyFlags.RootEffects */;
|
|
35355
35401
|
// Root effects still force a CD, even if the scheduler is disabled. This ensures that
|
|
35356
35402
|
// effects always run, even when triggered from outside the zone when the scheduler is
|
|
@@ -35358,7 +35404,7 @@ class ChangeDetectionSchedulerImpl {
|
|
|
35358
35404
|
force = true;
|
|
35359
35405
|
break;
|
|
35360
35406
|
}
|
|
35361
|
-
case
|
|
35407
|
+
case 13 /* NotificationSource.ViewEffect */: {
|
|
35362
35408
|
// This is technically a no-op, since view effects will also send a
|
|
35363
35409
|
// `MarkAncestorsForTraversal` notification. Still, we set this for logical consistency.
|
|
35364
35410
|
this.appRef.dirtyFlags |= 2 /* ApplicationRefDirtyFlags.ViewTreeTraversal */;
|
|
@@ -35368,7 +35414,7 @@ class ChangeDetectionSchedulerImpl {
|
|
|
35368
35414
|
force = true;
|
|
35369
35415
|
break;
|
|
35370
35416
|
}
|
|
35371
|
-
case
|
|
35417
|
+
case 11 /* NotificationSource.PendingTaskRemoved */: {
|
|
35372
35418
|
// Removing a pending task via the public API forces a scheduled tick, ensuring that
|
|
35373
35419
|
// stability is async and delayed until there was at least an opportunity to run
|
|
35374
35420
|
// application synchronization. This prevents some footguns when working with the
|
|
@@ -35377,10 +35423,10 @@ class ChangeDetectionSchedulerImpl {
|
|
|
35377
35423
|
force = true;
|
|
35378
35424
|
break;
|
|
35379
35425
|
}
|
|
35380
|
-
case
|
|
35381
|
-
case
|
|
35426
|
+
case 9 /* NotificationSource.ViewDetachedFromDOM */:
|
|
35427
|
+
case 8 /* NotificationSource.ViewAttached */:
|
|
35382
35428
|
case 7 /* NotificationSource.RenderHook */:
|
|
35383
|
-
case
|
|
35429
|
+
case 10 /* NotificationSource.AsyncAnimationsLoaded */:
|
|
35384
35430
|
default: {
|
|
35385
35431
|
// These notifications only schedule a tick but do not change whether we should refresh
|
|
35386
35432
|
// views. Instead, we only need to run render hooks unless another notification from the
|
|
@@ -38779,8 +38825,8 @@ function defaultThrowError() {
|
|
|
38779
38825
|
throw new Error();
|
|
38780
38826
|
}
|
|
38781
38827
|
let throwInvalidWriteToSignalErrorFn = defaultThrowError;
|
|
38782
|
-
function throwInvalidWriteToSignalError() {
|
|
38783
|
-
throwInvalidWriteToSignalErrorFn();
|
|
38828
|
+
function throwInvalidWriteToSignalError(node) {
|
|
38829
|
+
throwInvalidWriteToSignalErrorFn(node);
|
|
38784
38830
|
}
|
|
38785
38831
|
function setThrowInvalidWriteToSignalError(fn) {
|
|
38786
38832
|
throwInvalidWriteToSignalErrorFn = fn;
|
|
@@ -38817,7 +38863,7 @@ function signalGetFn() {
|
|
|
38817
38863
|
}
|
|
38818
38864
|
function signalSetFn(node, newValue) {
|
|
38819
38865
|
if (!producerUpdatesAllowed()) {
|
|
38820
|
-
throwInvalidWriteToSignalError();
|
|
38866
|
+
throwInvalidWriteToSignalError(node);
|
|
38821
38867
|
}
|
|
38822
38868
|
if (!node.equal(node.value, newValue)) {
|
|
38823
38869
|
node.value = newValue;
|
|
@@ -38826,7 +38872,7 @@ function signalSetFn(node, newValue) {
|
|
|
38826
38872
|
}
|
|
38827
38873
|
function signalUpdateFn(node, updater) {
|
|
38828
38874
|
if (!producerUpdatesAllowed()) {
|
|
38829
|
-
throwInvalidWriteToSignalError();
|
|
38875
|
+
throwInvalidWriteToSignalError(node);
|
|
38830
38876
|
}
|
|
38831
38877
|
signalSetFn(node, updater(node.value));
|
|
38832
38878
|
}
|
|
@@ -40362,176 +40408,21 @@ function disableProfiling() {
|
|
|
40362
40408
|
enablePerfLogging = false;
|
|
40363
40409
|
}
|
|
40364
40410
|
|
|
40365
|
-
/*!
|
|
40366
|
-
* @license
|
|
40367
|
-
* Copyright Google LLC All Rights Reserved.
|
|
40368
|
-
*
|
|
40369
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
40370
|
-
* found in the LICENSE file at https://angular.dev/license
|
|
40371
|
-
*/
|
|
40372
40411
|
/**
|
|
40373
|
-
*
|
|
40374
|
-
*
|
|
40375
|
-
* consumer of the function is responsible for resolving the minified name to its original name.
|
|
40376
|
-
* @param node Node from which to start the search.
|
|
40412
|
+
* Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function
|
|
40413
|
+
* can, optionally, return a value.
|
|
40377
40414
|
*/
|
|
40378
|
-
function
|
|
40379
|
-
|
|
40380
|
-
|
|
40381
|
-
|
|
40382
|
-
|
|
40383
|
-
|
|
40384
|
-
const current = lView[i];
|
|
40385
|
-
if ((!isLView(current) && !isLContainer(current)) || current[HOST] !== currentNode) {
|
|
40386
|
-
continue;
|
|
40387
|
-
}
|
|
40388
|
-
const tView = lView[TVIEW];
|
|
40389
|
-
const tNode = getTNode(tView, i);
|
|
40390
|
-
if (isComponentHost(tNode)) {
|
|
40391
|
-
const def = tView.data[tNode.directiveStart + tNode.componentOffset];
|
|
40392
|
-
const name = def.debugInfo?.className || def.type.name;
|
|
40393
|
-
// Note: the name may be an empty string if the class name is
|
|
40394
|
-
// dropped due to minification. In such cases keep going up the tree.
|
|
40395
|
-
if (name) {
|
|
40396
|
-
return name;
|
|
40397
|
-
}
|
|
40398
|
-
else {
|
|
40399
|
-
break;
|
|
40400
|
-
}
|
|
40401
|
-
}
|
|
40402
|
-
}
|
|
40403
|
-
}
|
|
40404
|
-
currentNode = currentNode.parentNode;
|
|
40415
|
+
function untracked(nonReactiveReadsFn) {
|
|
40416
|
+
const prevConsumer = setActiveConsumer$1(null);
|
|
40417
|
+
// We are not trying to catch any particular errors here, just making sure that the consumers
|
|
40418
|
+
// stack is restored in case of errors.
|
|
40419
|
+
try {
|
|
40420
|
+
return nonReactiveReadsFn();
|
|
40405
40421
|
}
|
|
40406
|
-
|
|
40407
|
-
|
|
40408
|
-
|
|
40409
|
-
/**
|
|
40410
|
-
* Compiles a partial directive declaration object into a full directive definition object.
|
|
40411
|
-
*
|
|
40412
|
-
* @codeGenApi
|
|
40413
|
-
*/
|
|
40414
|
-
function ɵɵngDeclareDirective(decl) {
|
|
40415
|
-
const compiler = getCompilerFacade({
|
|
40416
|
-
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
40417
|
-
kind: 'directive',
|
|
40418
|
-
type: decl.type,
|
|
40419
|
-
});
|
|
40420
|
-
return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
|
|
40421
|
-
}
|
|
40422
|
-
/**
|
|
40423
|
-
* Evaluates the class metadata declaration.
|
|
40424
|
-
*
|
|
40425
|
-
* @codeGenApi
|
|
40426
|
-
*/
|
|
40427
|
-
function ɵɵngDeclareClassMetadata(decl) {
|
|
40428
|
-
setClassMetadata(decl.type, decl.decorators, decl.ctorParameters ?? null, decl.propDecorators ?? null);
|
|
40429
|
-
}
|
|
40430
|
-
/**
|
|
40431
|
-
* Evaluates the class metadata of a component that contains deferred blocks.
|
|
40432
|
-
*
|
|
40433
|
-
* @codeGenApi
|
|
40434
|
-
*/
|
|
40435
|
-
function ɵɵngDeclareClassMetadataAsync(decl) {
|
|
40436
|
-
setClassMetadataAsync(decl.type, decl.resolveDeferredDeps, (...types) => {
|
|
40437
|
-
const meta = decl.resolveMetadata(...types);
|
|
40438
|
-
setClassMetadata(decl.type, meta.decorators, meta.ctorParameters, meta.propDecorators);
|
|
40439
|
-
});
|
|
40440
|
-
}
|
|
40441
|
-
/**
|
|
40442
|
-
* Compiles a partial component declaration object into a full component definition object.
|
|
40443
|
-
*
|
|
40444
|
-
* @codeGenApi
|
|
40445
|
-
*/
|
|
40446
|
-
function ɵɵngDeclareComponent(decl) {
|
|
40447
|
-
const compiler = getCompilerFacade({
|
|
40448
|
-
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
40449
|
-
kind: 'component',
|
|
40450
|
-
type: decl.type,
|
|
40451
|
-
});
|
|
40452
|
-
return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);
|
|
40453
|
-
}
|
|
40454
|
-
/**
|
|
40455
|
-
* Compiles a partial pipe declaration object into a full pipe definition object.
|
|
40456
|
-
*
|
|
40457
|
-
* @codeGenApi
|
|
40458
|
-
*/
|
|
40459
|
-
function ɵɵngDeclareFactory(decl) {
|
|
40460
|
-
const compiler = getCompilerFacade({
|
|
40461
|
-
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
40462
|
-
kind: getFactoryKind(decl.target),
|
|
40463
|
-
type: decl.type,
|
|
40464
|
-
});
|
|
40465
|
-
return compiler.compileFactoryDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
|
|
40466
|
-
}
|
|
40467
|
-
function getFactoryKind(target) {
|
|
40468
|
-
switch (target) {
|
|
40469
|
-
case FactoryTarget.Directive:
|
|
40470
|
-
return 'directive';
|
|
40471
|
-
case FactoryTarget.Component:
|
|
40472
|
-
return 'component';
|
|
40473
|
-
case FactoryTarget.Injectable:
|
|
40474
|
-
return 'injectable';
|
|
40475
|
-
case FactoryTarget.Pipe:
|
|
40476
|
-
return 'pipe';
|
|
40477
|
-
case FactoryTarget.NgModule:
|
|
40478
|
-
return 'NgModule';
|
|
40422
|
+
finally {
|
|
40423
|
+
setActiveConsumer$1(prevConsumer);
|
|
40479
40424
|
}
|
|
40480
40425
|
}
|
|
40481
|
-
/**
|
|
40482
|
-
* Compiles a partial injectable declaration object into a full injectable definition object.
|
|
40483
|
-
*
|
|
40484
|
-
* @codeGenApi
|
|
40485
|
-
*/
|
|
40486
|
-
function ɵɵngDeclareInjectable(decl) {
|
|
40487
|
-
const compiler = getCompilerFacade({
|
|
40488
|
-
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
40489
|
-
kind: 'injectable',
|
|
40490
|
-
type: decl.type,
|
|
40491
|
-
});
|
|
40492
|
-
return compiler.compileInjectableDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);
|
|
40493
|
-
}
|
|
40494
|
-
/**
|
|
40495
|
-
* Compiles a partial injector declaration object into a full injector definition object.
|
|
40496
|
-
*
|
|
40497
|
-
* @codeGenApi
|
|
40498
|
-
*/
|
|
40499
|
-
function ɵɵngDeclareInjector(decl) {
|
|
40500
|
-
const compiler = getCompilerFacade({
|
|
40501
|
-
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
40502
|
-
kind: 'NgModule',
|
|
40503
|
-
type: decl.type,
|
|
40504
|
-
});
|
|
40505
|
-
return compiler.compileInjectorDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl);
|
|
40506
|
-
}
|
|
40507
|
-
/**
|
|
40508
|
-
* Compiles a partial NgModule declaration object into a full NgModule definition object.
|
|
40509
|
-
*
|
|
40510
|
-
* @codeGenApi
|
|
40511
|
-
*/
|
|
40512
|
-
function ɵɵngDeclareNgModule(decl) {
|
|
40513
|
-
const compiler = getCompilerFacade({
|
|
40514
|
-
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
40515
|
-
kind: 'NgModule',
|
|
40516
|
-
type: decl.type,
|
|
40517
|
-
});
|
|
40518
|
-
return compiler.compileNgModuleDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl);
|
|
40519
|
-
}
|
|
40520
|
-
/**
|
|
40521
|
-
* Compiles a partial pipe declaration object into a full pipe definition object.
|
|
40522
|
-
*
|
|
40523
|
-
* @codeGenApi
|
|
40524
|
-
*/
|
|
40525
|
-
function ɵɵngDeclarePipe(decl) {
|
|
40526
|
-
const compiler = getCompilerFacade({
|
|
40527
|
-
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
40528
|
-
kind: 'pipe',
|
|
40529
|
-
type: decl.type,
|
|
40530
|
-
});
|
|
40531
|
-
return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);
|
|
40532
|
-
}
|
|
40533
|
-
|
|
40534
|
-
// we reexport these symbols just so that they are retained during the dead code elimination
|
|
40535
40426
|
|
|
40536
40427
|
/**
|
|
40537
40428
|
* Create a computed `Signal` which derives a reactive value from an expression.
|
|
@@ -40549,63 +40440,6 @@ function computed(computation, options) {
|
|
|
40549
40440
|
return getter;
|
|
40550
40441
|
}
|
|
40551
40442
|
|
|
40552
|
-
const identityFn = (v) => v;
|
|
40553
|
-
function linkedSignal(optionsOrComputation, options) {
|
|
40554
|
-
performanceMarkFeature('NgSignals');
|
|
40555
|
-
if (typeof optionsOrComputation === 'function') {
|
|
40556
|
-
const getter = createLinkedSignal$1(optionsOrComputation, (identityFn), options?.equal);
|
|
40557
|
-
return upgradeLinkedSignalGetter(getter);
|
|
40558
|
-
}
|
|
40559
|
-
else {
|
|
40560
|
-
const getter = createLinkedSignal$1(optionsOrComputation.source, optionsOrComputation.computation, optionsOrComputation.equal);
|
|
40561
|
-
return upgradeLinkedSignalGetter(getter);
|
|
40562
|
-
}
|
|
40563
|
-
}
|
|
40564
|
-
function upgradeLinkedSignalGetter(getter) {
|
|
40565
|
-
if (ngDevMode) {
|
|
40566
|
-
getter.toString = () => `[LinkedSignal: ${getter()}]`;
|
|
40567
|
-
}
|
|
40568
|
-
const node = getter[SIGNAL$1];
|
|
40569
|
-
const upgradedGetter = getter;
|
|
40570
|
-
upgradedGetter.set = (newValue) => linkedSignalSetFn$1(node, newValue);
|
|
40571
|
-
upgradedGetter.update = (updateFn) => linkedSignalUpdateFn$1(node, updateFn);
|
|
40572
|
-
upgradedGetter.asReadonly = signalAsReadonlyFn.bind(getter);
|
|
40573
|
-
return upgradedGetter;
|
|
40574
|
-
}
|
|
40575
|
-
|
|
40576
|
-
/**
|
|
40577
|
-
* Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function
|
|
40578
|
-
* can, optionally, return a value.
|
|
40579
|
-
*/
|
|
40580
|
-
function untracked(nonReactiveReadsFn) {
|
|
40581
|
-
const prevConsumer = setActiveConsumer$1(null);
|
|
40582
|
-
// We are not trying to catch any particular errors here, just making sure that the consumers
|
|
40583
|
-
// stack is restored in case of errors.
|
|
40584
|
-
try {
|
|
40585
|
-
return nonReactiveReadsFn();
|
|
40586
|
-
}
|
|
40587
|
-
finally {
|
|
40588
|
-
setActiveConsumer$1(prevConsumer);
|
|
40589
|
-
}
|
|
40590
|
-
}
|
|
40591
|
-
|
|
40592
|
-
class ViewContext {
|
|
40593
|
-
view;
|
|
40594
|
-
node;
|
|
40595
|
-
constructor(view, node) {
|
|
40596
|
-
this.view = view;
|
|
40597
|
-
this.node = node;
|
|
40598
|
-
}
|
|
40599
|
-
/**
|
|
40600
|
-
* @internal
|
|
40601
|
-
* @nocollapse
|
|
40602
|
-
*/
|
|
40603
|
-
static __NG_ELEMENT_ID__ = injectViewContext;
|
|
40604
|
-
}
|
|
40605
|
-
function injectViewContext() {
|
|
40606
|
-
return new ViewContext(getLView(), getCurrentTNode());
|
|
40607
|
-
}
|
|
40608
|
-
|
|
40609
40443
|
/**
|
|
40610
40444
|
* Controls whether effects use the legacy `microtaskEffect` by default.
|
|
40611
40445
|
*/
|
|
@@ -40873,7 +40707,7 @@ const ROOT_EFFECT_NODE =
|
|
|
40873
40707
|
...BASE_EFFECT_NODE,
|
|
40874
40708
|
consumerMarkedDirty() {
|
|
40875
40709
|
this.scheduler.schedule(this);
|
|
40876
|
-
this.notifier.notify(
|
|
40710
|
+
this.notifier.notify(12 /* NotificationSource.RootEffect */);
|
|
40877
40711
|
},
|
|
40878
40712
|
destroy() {
|
|
40879
40713
|
consumerDestroy$1(this);
|
|
@@ -40888,7 +40722,7 @@ const VIEW_EFFECT_NODE =
|
|
|
40888
40722
|
consumerMarkedDirty() {
|
|
40889
40723
|
this.view[FLAGS] |= 8192 /* LViewFlags.HasChildViewsToRefresh */;
|
|
40890
40724
|
markAncestorsForTraversal(this.view);
|
|
40891
|
-
this.notifier.notify(
|
|
40725
|
+
this.notifier.notify(13 /* NotificationSource.ViewEffect */);
|
|
40892
40726
|
},
|
|
40893
40727
|
destroy() {
|
|
40894
40728
|
consumerDestroy$1(this);
|
|
@@ -40915,166 +40749,10 @@ function createRootEffect(fn, scheduler, notifier) {
|
|
|
40915
40749
|
node.notifier = notifier;
|
|
40916
40750
|
node.zone = typeof Zone !== 'undefined' ? Zone.current : null;
|
|
40917
40751
|
node.scheduler.schedule(node);
|
|
40918
|
-
node.notifier.notify(
|
|
40752
|
+
node.notifier.notify(12 /* NotificationSource.RootEffect */);
|
|
40919
40753
|
return node;
|
|
40920
40754
|
}
|
|
40921
40755
|
|
|
40922
|
-
const NOT_SET = Symbol('NOT_SET');
|
|
40923
|
-
const EMPTY_CLEANUP_SET = new Set();
|
|
40924
|
-
const AFTER_RENDER_PHASE_EFFECT_NODE = /* @__PURE__ */ (() => ({
|
|
40925
|
-
...SIGNAL_NODE$1,
|
|
40926
|
-
consumerIsAlwaysLive: true,
|
|
40927
|
-
consumerAllowSignalWrites: true,
|
|
40928
|
-
value: NOT_SET,
|
|
40929
|
-
cleanup: null,
|
|
40930
|
-
/** Called when the effect becomes dirty */
|
|
40931
|
-
consumerMarkedDirty() {
|
|
40932
|
-
if (this.sequence.impl.executing) {
|
|
40933
|
-
// If hooks are in the middle of executing, then it matters whether this node has yet been
|
|
40934
|
-
// executed within its sequence. If not, then we don't want to notify the scheduler since
|
|
40935
|
-
// this node will be reached naturally.
|
|
40936
|
-
if (this.sequence.lastPhase === null || this.sequence.lastPhase < this.phase) {
|
|
40937
|
-
return;
|
|
40938
|
-
}
|
|
40939
|
-
// If during the execution of a later phase an earlier phase became dirty, then we should not
|
|
40940
|
-
// run any further phases until the earlier one reruns.
|
|
40941
|
-
this.sequence.erroredOrDestroyed = true;
|
|
40942
|
-
}
|
|
40943
|
-
// Either hooks are not running, or we're marking a node dirty that has already run within its
|
|
40944
|
-
// sequence.
|
|
40945
|
-
this.sequence.scheduler.notify(7 /* NotificationSource.RenderHook */);
|
|
40946
|
-
},
|
|
40947
|
-
phaseFn(previousValue) {
|
|
40948
|
-
this.sequence.lastPhase = this.phase;
|
|
40949
|
-
if (!this.dirty) {
|
|
40950
|
-
return this.signal;
|
|
40951
|
-
}
|
|
40952
|
-
this.dirty = false;
|
|
40953
|
-
if (this.value !== NOT_SET && !consumerPollProducersForChange$1(this)) {
|
|
40954
|
-
// None of our producers report a change since the last time they were read, so no
|
|
40955
|
-
// recomputation of our value is necessary.
|
|
40956
|
-
return this.signal;
|
|
40957
|
-
}
|
|
40958
|
-
// Run any needed cleanup functions.
|
|
40959
|
-
try {
|
|
40960
|
-
for (const cleanupFn of this.cleanup ?? EMPTY_CLEANUP_SET) {
|
|
40961
|
-
cleanupFn();
|
|
40962
|
-
}
|
|
40963
|
-
}
|
|
40964
|
-
finally {
|
|
40965
|
-
// Even if a cleanup function errors, ensure it's cleared.
|
|
40966
|
-
this.cleanup?.clear();
|
|
40967
|
-
}
|
|
40968
|
-
// Prepare to call the user's effect callback. If there was a previous phase, then it gave us
|
|
40969
|
-
// its value as a `Signal`, otherwise `previousValue` will be `undefined`.
|
|
40970
|
-
const args = [];
|
|
40971
|
-
if (previousValue !== undefined) {
|
|
40972
|
-
args.push(previousValue);
|
|
40973
|
-
}
|
|
40974
|
-
args.push(this.registerCleanupFn);
|
|
40975
|
-
// Call the user's callback in our reactive context.
|
|
40976
|
-
const prevConsumer = consumerBeforeComputation$1(this);
|
|
40977
|
-
let newValue;
|
|
40978
|
-
try {
|
|
40979
|
-
newValue = this.userFn.apply(null, args);
|
|
40980
|
-
}
|
|
40981
|
-
finally {
|
|
40982
|
-
consumerAfterComputation$1(this, prevConsumer);
|
|
40983
|
-
}
|
|
40984
|
-
if (this.value === NOT_SET || !this.equal(this.value, newValue)) {
|
|
40985
|
-
this.value = newValue;
|
|
40986
|
-
this.version++;
|
|
40987
|
-
}
|
|
40988
|
-
return this.signal;
|
|
40989
|
-
},
|
|
40990
|
-
}))();
|
|
40991
|
-
/**
|
|
40992
|
-
* An `AfterRenderSequence` that manages an `afterRenderEffect`'s phase effects.
|
|
40993
|
-
*/
|
|
40994
|
-
class AfterRenderEffectSequence extends AfterRenderSequence {
|
|
40995
|
-
scheduler;
|
|
40996
|
-
/**
|
|
40997
|
-
* While this sequence is executing, this tracks the last phase which was called by the
|
|
40998
|
-
* `afterRender` machinery.
|
|
40999
|
-
*
|
|
41000
|
-
* When a phase effect is marked dirty, this is used to determine whether it's already run or not.
|
|
41001
|
-
*/
|
|
41002
|
-
lastPhase = null;
|
|
41003
|
-
/**
|
|
41004
|
-
* The reactive nodes for each phase, if a phase effect is defined for that phase.
|
|
41005
|
-
*
|
|
41006
|
-
* These are initialized to `undefined` but set in the constructor.
|
|
41007
|
-
*/
|
|
41008
|
-
nodes = [undefined, undefined, undefined, undefined];
|
|
41009
|
-
constructor(impl, effectHooks, scheduler, destroyRef, snapshot = null) {
|
|
41010
|
-
// Note that we also initialize the underlying `AfterRenderSequence` hooks to `undefined` and
|
|
41011
|
-
// populate them as we create reactive nodes below.
|
|
41012
|
-
super(impl, [undefined, undefined, undefined, undefined], false, destroyRef, snapshot);
|
|
41013
|
-
this.scheduler = scheduler;
|
|
41014
|
-
// Setup a reactive node for each phase.
|
|
41015
|
-
for (const phase of AFTER_RENDER_PHASES) {
|
|
41016
|
-
const effectHook = effectHooks[phase];
|
|
41017
|
-
if (effectHook === undefined) {
|
|
41018
|
-
continue;
|
|
41019
|
-
}
|
|
41020
|
-
const node = Object.create(AFTER_RENDER_PHASE_EFFECT_NODE);
|
|
41021
|
-
node.sequence = this;
|
|
41022
|
-
node.phase = phase;
|
|
41023
|
-
node.userFn = effectHook;
|
|
41024
|
-
node.dirty = true;
|
|
41025
|
-
node.signal = (() => {
|
|
41026
|
-
producerAccessed$1(node);
|
|
41027
|
-
return node.value;
|
|
41028
|
-
});
|
|
41029
|
-
node.signal[SIGNAL$1] = node;
|
|
41030
|
-
node.registerCleanupFn = (fn) => (node.cleanup ??= new Set()).add(fn);
|
|
41031
|
-
this.nodes[phase] = node;
|
|
41032
|
-
// Install the upstream hook which runs the `phaseFn` for this phase.
|
|
41033
|
-
this.hooks[phase] = (value) => node.phaseFn(value);
|
|
41034
|
-
}
|
|
41035
|
-
}
|
|
41036
|
-
afterRun() {
|
|
41037
|
-
super.afterRun();
|
|
41038
|
-
// We're done running this sequence, so reset `lastPhase`.
|
|
41039
|
-
this.lastPhase = null;
|
|
41040
|
-
}
|
|
41041
|
-
destroy() {
|
|
41042
|
-
super.destroy();
|
|
41043
|
-
// Run the cleanup functions for each node.
|
|
41044
|
-
for (const node of this.nodes) {
|
|
41045
|
-
for (const fn of node?.cleanup ?? EMPTY_CLEANUP_SET) {
|
|
41046
|
-
fn();
|
|
41047
|
-
}
|
|
41048
|
-
}
|
|
41049
|
-
}
|
|
41050
|
-
}
|
|
41051
|
-
/**
|
|
41052
|
-
* @experimental
|
|
41053
|
-
*/
|
|
41054
|
-
function afterRenderEffect(callbackOrSpec, options) {
|
|
41055
|
-
ngDevMode &&
|
|
41056
|
-
assertNotInReactiveContext(afterRenderEffect, 'Call `afterRenderEffect` outside of a reactive context. For example, create the render ' +
|
|
41057
|
-
'effect inside the component constructor`.');
|
|
41058
|
-
!options?.injector && assertInInjectionContext(afterRenderEffect);
|
|
41059
|
-
if (typeof ngServerMode !== 'undefined' && ngServerMode) {
|
|
41060
|
-
return NOOP_AFTER_RENDER_REF;
|
|
41061
|
-
}
|
|
41062
|
-
const injector = options?.injector ?? inject(Injector);
|
|
41063
|
-
const scheduler = injector.get(ChangeDetectionScheduler);
|
|
41064
|
-
const manager = injector.get(AfterRenderManager);
|
|
41065
|
-
const tracing = injector.get(TracingService, null, { optional: true });
|
|
41066
|
-
manager.impl ??= injector.get(AfterRenderImpl);
|
|
41067
|
-
let spec = callbackOrSpec;
|
|
41068
|
-
if (typeof spec === 'function') {
|
|
41069
|
-
spec = { mixedReadWrite: callbackOrSpec };
|
|
41070
|
-
}
|
|
41071
|
-
const sequence = new AfterRenderEffectSequence(manager.impl, [spec.earlyRead, spec.write, spec.mixedReadWrite, spec.read], scheduler, injector.get(DestroyRef), tracing?.snapshot(null));
|
|
41072
|
-
manager.impl.register(sequence);
|
|
41073
|
-
return sequence;
|
|
41074
|
-
}
|
|
41075
|
-
|
|
41076
|
-
// This file exists to allow the set of reactivity exports to be modified in g3, as these APIs are
|
|
41077
|
-
|
|
41078
40756
|
/**
|
|
41079
40757
|
* Status of a `Resource`.
|
|
41080
40758
|
*
|
|
@@ -41116,6 +40794,30 @@ var ResourceStatus;
|
|
|
41116
40794
|
ResourceStatus[ResourceStatus["Local"] = 5] = "Local";
|
|
41117
40795
|
})(ResourceStatus || (ResourceStatus = {}));
|
|
41118
40796
|
|
|
40797
|
+
const identityFn = (v) => v;
|
|
40798
|
+
function linkedSignal(optionsOrComputation, options) {
|
|
40799
|
+
performanceMarkFeature('NgSignals');
|
|
40800
|
+
if (typeof optionsOrComputation === 'function') {
|
|
40801
|
+
const getter = createLinkedSignal$1(optionsOrComputation, (identityFn), options?.equal);
|
|
40802
|
+
return upgradeLinkedSignalGetter(getter);
|
|
40803
|
+
}
|
|
40804
|
+
else {
|
|
40805
|
+
const getter = createLinkedSignal$1(optionsOrComputation.source, optionsOrComputation.computation, optionsOrComputation.equal);
|
|
40806
|
+
return upgradeLinkedSignalGetter(getter);
|
|
40807
|
+
}
|
|
40808
|
+
}
|
|
40809
|
+
function upgradeLinkedSignalGetter(getter) {
|
|
40810
|
+
if (ngDevMode) {
|
|
40811
|
+
getter.toString = () => `[LinkedSignal: ${getter()}]`;
|
|
40812
|
+
}
|
|
40813
|
+
const node = getter[SIGNAL$1];
|
|
40814
|
+
const upgradedGetter = getter;
|
|
40815
|
+
upgradedGetter.set = (newValue) => linkedSignalSetFn$1(node, newValue);
|
|
40816
|
+
upgradedGetter.update = (updateFn) => linkedSignalUpdateFn$1(node, updateFn);
|
|
40817
|
+
upgradedGetter.asReadonly = signalAsReadonlyFn.bind(getter);
|
|
40818
|
+
return upgradedGetter;
|
|
40819
|
+
}
|
|
40820
|
+
|
|
41119
40821
|
function resource(options) {
|
|
41120
40822
|
options?.injector || assertInInjectionContext(resource);
|
|
41121
40823
|
const request = (options.request ?? (() => null));
|
|
@@ -41384,6 +41086,334 @@ function isResolved(state) {
|
|
|
41384
41086
|
return state.error === undefined;
|
|
41385
41087
|
}
|
|
41386
41088
|
|
|
41089
|
+
/*!
|
|
41090
|
+
* @license
|
|
41091
|
+
* Copyright Google LLC All Rights Reserved.
|
|
41092
|
+
*
|
|
41093
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
41094
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
41095
|
+
*/
|
|
41096
|
+
/**
|
|
41097
|
+
* Gets the class name of the closest component to a node.
|
|
41098
|
+
* Warning! this function will return minified names if the name of the component is minified. The
|
|
41099
|
+
* consumer of the function is responsible for resolving the minified name to its original name.
|
|
41100
|
+
* @param node Node from which to start the search.
|
|
41101
|
+
*/
|
|
41102
|
+
function getClosestComponentName(node) {
|
|
41103
|
+
let currentNode = node;
|
|
41104
|
+
while (currentNode) {
|
|
41105
|
+
const lView = readPatchedLView(currentNode);
|
|
41106
|
+
if (lView !== null) {
|
|
41107
|
+
for (let i = HEADER_OFFSET; i < lView.length; i++) {
|
|
41108
|
+
const current = lView[i];
|
|
41109
|
+
if ((!isLView(current) && !isLContainer(current)) || current[HOST] !== currentNode) {
|
|
41110
|
+
continue;
|
|
41111
|
+
}
|
|
41112
|
+
const tView = lView[TVIEW];
|
|
41113
|
+
const tNode = getTNode(tView, i);
|
|
41114
|
+
if (isComponentHost(tNode)) {
|
|
41115
|
+
const def = tView.data[tNode.directiveStart + tNode.componentOffset];
|
|
41116
|
+
const name = def.debugInfo?.className || def.type.name;
|
|
41117
|
+
// Note: the name may be an empty string if the class name is
|
|
41118
|
+
// dropped due to minification. In such cases keep going up the tree.
|
|
41119
|
+
if (name) {
|
|
41120
|
+
return name;
|
|
41121
|
+
}
|
|
41122
|
+
else {
|
|
41123
|
+
break;
|
|
41124
|
+
}
|
|
41125
|
+
}
|
|
41126
|
+
}
|
|
41127
|
+
}
|
|
41128
|
+
currentNode = currentNode.parentNode;
|
|
41129
|
+
}
|
|
41130
|
+
return null;
|
|
41131
|
+
}
|
|
41132
|
+
|
|
41133
|
+
/**
|
|
41134
|
+
* Compiles a partial directive declaration object into a full directive definition object.
|
|
41135
|
+
*
|
|
41136
|
+
* @codeGenApi
|
|
41137
|
+
*/
|
|
41138
|
+
function ɵɵngDeclareDirective(decl) {
|
|
41139
|
+
const compiler = getCompilerFacade({
|
|
41140
|
+
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
41141
|
+
kind: 'directive',
|
|
41142
|
+
type: decl.type,
|
|
41143
|
+
});
|
|
41144
|
+
return compiler.compileDirectiveDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
|
|
41145
|
+
}
|
|
41146
|
+
/**
|
|
41147
|
+
* Evaluates the class metadata declaration.
|
|
41148
|
+
*
|
|
41149
|
+
* @codeGenApi
|
|
41150
|
+
*/
|
|
41151
|
+
function ɵɵngDeclareClassMetadata(decl) {
|
|
41152
|
+
setClassMetadata(decl.type, decl.decorators, decl.ctorParameters ?? null, decl.propDecorators ?? null);
|
|
41153
|
+
}
|
|
41154
|
+
/**
|
|
41155
|
+
* Evaluates the class metadata of a component that contains deferred blocks.
|
|
41156
|
+
*
|
|
41157
|
+
* @codeGenApi
|
|
41158
|
+
*/
|
|
41159
|
+
function ɵɵngDeclareClassMetadataAsync(decl) {
|
|
41160
|
+
setClassMetadataAsync(decl.type, decl.resolveDeferredDeps, (...types) => {
|
|
41161
|
+
const meta = decl.resolveMetadata(...types);
|
|
41162
|
+
setClassMetadata(decl.type, meta.decorators, meta.ctorParameters, meta.propDecorators);
|
|
41163
|
+
});
|
|
41164
|
+
}
|
|
41165
|
+
/**
|
|
41166
|
+
* Compiles a partial component declaration object into a full component definition object.
|
|
41167
|
+
*
|
|
41168
|
+
* @codeGenApi
|
|
41169
|
+
*/
|
|
41170
|
+
function ɵɵngDeclareComponent(decl) {
|
|
41171
|
+
const compiler = getCompilerFacade({
|
|
41172
|
+
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
41173
|
+
kind: 'component',
|
|
41174
|
+
type: decl.type,
|
|
41175
|
+
});
|
|
41176
|
+
return compiler.compileComponentDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵcmp.js`, decl);
|
|
41177
|
+
}
|
|
41178
|
+
/**
|
|
41179
|
+
* Compiles a partial pipe declaration object into a full pipe definition object.
|
|
41180
|
+
*
|
|
41181
|
+
* @codeGenApi
|
|
41182
|
+
*/
|
|
41183
|
+
function ɵɵngDeclareFactory(decl) {
|
|
41184
|
+
const compiler = getCompilerFacade({
|
|
41185
|
+
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
41186
|
+
kind: getFactoryKind(decl.target),
|
|
41187
|
+
type: decl.type,
|
|
41188
|
+
});
|
|
41189
|
+
return compiler.compileFactoryDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵfac.js`, decl);
|
|
41190
|
+
}
|
|
41191
|
+
function getFactoryKind(target) {
|
|
41192
|
+
switch (target) {
|
|
41193
|
+
case FactoryTarget.Directive:
|
|
41194
|
+
return 'directive';
|
|
41195
|
+
case FactoryTarget.Component:
|
|
41196
|
+
return 'component';
|
|
41197
|
+
case FactoryTarget.Injectable:
|
|
41198
|
+
return 'injectable';
|
|
41199
|
+
case FactoryTarget.Pipe:
|
|
41200
|
+
return 'pipe';
|
|
41201
|
+
case FactoryTarget.NgModule:
|
|
41202
|
+
return 'NgModule';
|
|
41203
|
+
}
|
|
41204
|
+
}
|
|
41205
|
+
/**
|
|
41206
|
+
* Compiles a partial injectable declaration object into a full injectable definition object.
|
|
41207
|
+
*
|
|
41208
|
+
* @codeGenApi
|
|
41209
|
+
*/
|
|
41210
|
+
function ɵɵngDeclareInjectable(decl) {
|
|
41211
|
+
const compiler = getCompilerFacade({
|
|
41212
|
+
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
41213
|
+
kind: 'injectable',
|
|
41214
|
+
type: decl.type,
|
|
41215
|
+
});
|
|
41216
|
+
return compiler.compileInjectableDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵprov.js`, decl);
|
|
41217
|
+
}
|
|
41218
|
+
/**
|
|
41219
|
+
* Compiles a partial injector declaration object into a full injector definition object.
|
|
41220
|
+
*
|
|
41221
|
+
* @codeGenApi
|
|
41222
|
+
*/
|
|
41223
|
+
function ɵɵngDeclareInjector(decl) {
|
|
41224
|
+
const compiler = getCompilerFacade({
|
|
41225
|
+
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
41226
|
+
kind: 'NgModule',
|
|
41227
|
+
type: decl.type,
|
|
41228
|
+
});
|
|
41229
|
+
return compiler.compileInjectorDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵinj.js`, decl);
|
|
41230
|
+
}
|
|
41231
|
+
/**
|
|
41232
|
+
* Compiles a partial NgModule declaration object into a full NgModule definition object.
|
|
41233
|
+
*
|
|
41234
|
+
* @codeGenApi
|
|
41235
|
+
*/
|
|
41236
|
+
function ɵɵngDeclareNgModule(decl) {
|
|
41237
|
+
const compiler = getCompilerFacade({
|
|
41238
|
+
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
41239
|
+
kind: 'NgModule',
|
|
41240
|
+
type: decl.type,
|
|
41241
|
+
});
|
|
41242
|
+
return compiler.compileNgModuleDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵmod.js`, decl);
|
|
41243
|
+
}
|
|
41244
|
+
/**
|
|
41245
|
+
* Compiles a partial pipe declaration object into a full pipe definition object.
|
|
41246
|
+
*
|
|
41247
|
+
* @codeGenApi
|
|
41248
|
+
*/
|
|
41249
|
+
function ɵɵngDeclarePipe(decl) {
|
|
41250
|
+
const compiler = getCompilerFacade({
|
|
41251
|
+
usage: 1 /* JitCompilerUsage.PartialDeclaration */,
|
|
41252
|
+
kind: 'pipe',
|
|
41253
|
+
type: decl.type,
|
|
41254
|
+
});
|
|
41255
|
+
return compiler.compilePipeDeclaration(angularCoreEnv, `ng:///${decl.type.name}/ɵpipe.js`, decl);
|
|
41256
|
+
}
|
|
41257
|
+
|
|
41258
|
+
// we reexport these symbols just so that they are retained during the dead code elimination
|
|
41259
|
+
|
|
41260
|
+
const NOT_SET = Symbol('NOT_SET');
|
|
41261
|
+
const EMPTY_CLEANUP_SET = new Set();
|
|
41262
|
+
const AFTER_RENDER_PHASE_EFFECT_NODE = /* @__PURE__ */ (() => ({
|
|
41263
|
+
...SIGNAL_NODE$1,
|
|
41264
|
+
consumerIsAlwaysLive: true,
|
|
41265
|
+
consumerAllowSignalWrites: true,
|
|
41266
|
+
value: NOT_SET,
|
|
41267
|
+
cleanup: null,
|
|
41268
|
+
/** Called when the effect becomes dirty */
|
|
41269
|
+
consumerMarkedDirty() {
|
|
41270
|
+
if (this.sequence.impl.executing) {
|
|
41271
|
+
// If hooks are in the middle of executing, then it matters whether this node has yet been
|
|
41272
|
+
// executed within its sequence. If not, then we don't want to notify the scheduler since
|
|
41273
|
+
// this node will be reached naturally.
|
|
41274
|
+
if (this.sequence.lastPhase === null || this.sequence.lastPhase < this.phase) {
|
|
41275
|
+
return;
|
|
41276
|
+
}
|
|
41277
|
+
// If during the execution of a later phase an earlier phase became dirty, then we should not
|
|
41278
|
+
// run any further phases until the earlier one reruns.
|
|
41279
|
+
this.sequence.erroredOrDestroyed = true;
|
|
41280
|
+
}
|
|
41281
|
+
// Either hooks are not running, or we're marking a node dirty that has already run within its
|
|
41282
|
+
// sequence.
|
|
41283
|
+
this.sequence.scheduler.notify(7 /* NotificationSource.RenderHook */);
|
|
41284
|
+
},
|
|
41285
|
+
phaseFn(previousValue) {
|
|
41286
|
+
this.sequence.lastPhase = this.phase;
|
|
41287
|
+
if (!this.dirty) {
|
|
41288
|
+
return this.signal;
|
|
41289
|
+
}
|
|
41290
|
+
this.dirty = false;
|
|
41291
|
+
if (this.value !== NOT_SET && !consumerPollProducersForChange$1(this)) {
|
|
41292
|
+
// None of our producers report a change since the last time they were read, so no
|
|
41293
|
+
// recomputation of our value is necessary.
|
|
41294
|
+
return this.signal;
|
|
41295
|
+
}
|
|
41296
|
+
// Run any needed cleanup functions.
|
|
41297
|
+
try {
|
|
41298
|
+
for (const cleanupFn of this.cleanup ?? EMPTY_CLEANUP_SET) {
|
|
41299
|
+
cleanupFn();
|
|
41300
|
+
}
|
|
41301
|
+
}
|
|
41302
|
+
finally {
|
|
41303
|
+
// Even if a cleanup function errors, ensure it's cleared.
|
|
41304
|
+
this.cleanup?.clear();
|
|
41305
|
+
}
|
|
41306
|
+
// Prepare to call the user's effect callback. If there was a previous phase, then it gave us
|
|
41307
|
+
// its value as a `Signal`, otherwise `previousValue` will be `undefined`.
|
|
41308
|
+
const args = [];
|
|
41309
|
+
if (previousValue !== undefined) {
|
|
41310
|
+
args.push(previousValue);
|
|
41311
|
+
}
|
|
41312
|
+
args.push(this.registerCleanupFn);
|
|
41313
|
+
// Call the user's callback in our reactive context.
|
|
41314
|
+
const prevConsumer = consumerBeforeComputation$1(this);
|
|
41315
|
+
let newValue;
|
|
41316
|
+
try {
|
|
41317
|
+
newValue = this.userFn.apply(null, args);
|
|
41318
|
+
}
|
|
41319
|
+
finally {
|
|
41320
|
+
consumerAfterComputation$1(this, prevConsumer);
|
|
41321
|
+
}
|
|
41322
|
+
if (this.value === NOT_SET || !this.equal(this.value, newValue)) {
|
|
41323
|
+
this.value = newValue;
|
|
41324
|
+
this.version++;
|
|
41325
|
+
}
|
|
41326
|
+
return this.signal;
|
|
41327
|
+
},
|
|
41328
|
+
}))();
|
|
41329
|
+
/**
|
|
41330
|
+
* An `AfterRenderSequence` that manages an `afterRenderEffect`'s phase effects.
|
|
41331
|
+
*/
|
|
41332
|
+
class AfterRenderEffectSequence extends AfterRenderSequence {
|
|
41333
|
+
scheduler;
|
|
41334
|
+
/**
|
|
41335
|
+
* While this sequence is executing, this tracks the last phase which was called by the
|
|
41336
|
+
* `afterRender` machinery.
|
|
41337
|
+
*
|
|
41338
|
+
* When a phase effect is marked dirty, this is used to determine whether it's already run or not.
|
|
41339
|
+
*/
|
|
41340
|
+
lastPhase = null;
|
|
41341
|
+
/**
|
|
41342
|
+
* The reactive nodes for each phase, if a phase effect is defined for that phase.
|
|
41343
|
+
*
|
|
41344
|
+
* These are initialized to `undefined` but set in the constructor.
|
|
41345
|
+
*/
|
|
41346
|
+
nodes = [undefined, undefined, undefined, undefined];
|
|
41347
|
+
constructor(impl, effectHooks, view, scheduler, destroyRef, snapshot = null) {
|
|
41348
|
+
// Note that we also initialize the underlying `AfterRenderSequence` hooks to `undefined` and
|
|
41349
|
+
// populate them as we create reactive nodes below.
|
|
41350
|
+
super(impl, [undefined, undefined, undefined, undefined], view, false, destroyRef, snapshot);
|
|
41351
|
+
this.scheduler = scheduler;
|
|
41352
|
+
// Setup a reactive node for each phase.
|
|
41353
|
+
for (const phase of AFTER_RENDER_PHASES) {
|
|
41354
|
+
const effectHook = effectHooks[phase];
|
|
41355
|
+
if (effectHook === undefined) {
|
|
41356
|
+
continue;
|
|
41357
|
+
}
|
|
41358
|
+
const node = Object.create(AFTER_RENDER_PHASE_EFFECT_NODE);
|
|
41359
|
+
node.sequence = this;
|
|
41360
|
+
node.phase = phase;
|
|
41361
|
+
node.userFn = effectHook;
|
|
41362
|
+
node.dirty = true;
|
|
41363
|
+
node.signal = (() => {
|
|
41364
|
+
producerAccessed$1(node);
|
|
41365
|
+
return node.value;
|
|
41366
|
+
});
|
|
41367
|
+
node.signal[SIGNAL$1] = node;
|
|
41368
|
+
node.registerCleanupFn = (fn) => (node.cleanup ??= new Set()).add(fn);
|
|
41369
|
+
this.nodes[phase] = node;
|
|
41370
|
+
// Install the upstream hook which runs the `phaseFn` for this phase.
|
|
41371
|
+
this.hooks[phase] = (value) => node.phaseFn(value);
|
|
41372
|
+
}
|
|
41373
|
+
}
|
|
41374
|
+
afterRun() {
|
|
41375
|
+
super.afterRun();
|
|
41376
|
+
// We're done running this sequence, so reset `lastPhase`.
|
|
41377
|
+
this.lastPhase = null;
|
|
41378
|
+
}
|
|
41379
|
+
destroy() {
|
|
41380
|
+
super.destroy();
|
|
41381
|
+
// Run the cleanup functions for each node.
|
|
41382
|
+
for (const node of this.nodes) {
|
|
41383
|
+
for (const fn of node?.cleanup ?? EMPTY_CLEANUP_SET) {
|
|
41384
|
+
fn();
|
|
41385
|
+
}
|
|
41386
|
+
}
|
|
41387
|
+
}
|
|
41388
|
+
}
|
|
41389
|
+
/**
|
|
41390
|
+
* @experimental
|
|
41391
|
+
*/
|
|
41392
|
+
function afterRenderEffect(callbackOrSpec, options) {
|
|
41393
|
+
ngDevMode &&
|
|
41394
|
+
assertNotInReactiveContext(afterRenderEffect, 'Call `afterRenderEffect` outside of a reactive context. For example, create the render ' +
|
|
41395
|
+
'effect inside the component constructor`.');
|
|
41396
|
+
!options?.injector && assertInInjectionContext(afterRenderEffect);
|
|
41397
|
+
if (typeof ngServerMode !== 'undefined' && ngServerMode) {
|
|
41398
|
+
return NOOP_AFTER_RENDER_REF;
|
|
41399
|
+
}
|
|
41400
|
+
const injector = options?.injector ?? inject(Injector);
|
|
41401
|
+
const scheduler = injector.get(ChangeDetectionScheduler);
|
|
41402
|
+
const manager = injector.get(AfterRenderManager);
|
|
41403
|
+
const tracing = injector.get(TracingService, null, { optional: true });
|
|
41404
|
+
manager.impl ??= injector.get(AfterRenderImpl);
|
|
41405
|
+
let spec = callbackOrSpec;
|
|
41406
|
+
if (typeof spec === 'function') {
|
|
41407
|
+
spec = { mixedReadWrite: callbackOrSpec };
|
|
41408
|
+
}
|
|
41409
|
+
const viewContext = injector.get(ViewContext, null, { optional: true });
|
|
41410
|
+
const sequence = new AfterRenderEffectSequence(manager.impl, [spec.earlyRead, spec.write, spec.mixedReadWrite, spec.read], viewContext?.view, scheduler, injector.get(DestroyRef), tracing?.snapshot(null));
|
|
41411
|
+
manager.impl.register(sequence);
|
|
41412
|
+
return sequence;
|
|
41413
|
+
}
|
|
41414
|
+
|
|
41415
|
+
// This file exists to allow the set of reactivity exports to be modified in g3, as these APIs are
|
|
41416
|
+
|
|
41387
41417
|
/**
|
|
41388
41418
|
* Creates a `ComponentRef` instance based on provided component type and a set of options.
|
|
41389
41419
|
*
|
|
@@ -41630,5 +41660,5 @@ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
|
41630
41660
|
* Generated bundle index. Do not edit.
|
|
41631
41661
|
*/
|
|
41632
41662
|
|
|
41633
|
-
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 };
|
|
41663
|
+
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, ResourceImpl as ɵResourceImpl, 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, ɵɵ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 };
|
|
41634
41664
|
//# sourceMappingURL=core.mjs.map
|