@angular/core 18.0.0-rc.0 → 18.0.0-rc.1
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/esm2022/primitives/event-dispatch/index.mjs +2 -2
- package/esm2022/primitives/event-dispatch/src/action_resolver.mjs +234 -0
- package/esm2022/primitives/event-dispatch/src/base_dispatcher.mjs +6 -8
- package/esm2022/primitives/event-dispatch/src/custom_events.mjs +40 -1
- package/esm2022/primitives/event-dispatch/src/dispatcher.mjs +22 -15
- package/esm2022/primitives/event-dispatch/src/earlyeventcontract.mjs +14 -8
- package/esm2022/primitives/event-dispatch/src/event_contract_defines.mjs +1 -14
- package/esm2022/primitives/event-dispatch/src/eventcontract.mjs +23 -344
- package/esm2022/primitives/event-dispatch/src/register_events.mjs +29 -10
- package/esm2022/src/application/application_ref.mjs +6 -3
- package/esm2022/src/application/create_application.mjs +3 -3
- package/esm2022/src/change_detection/scheduling/exhaustive_check_no_changes.mjs +150 -0
- package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +17 -3
- package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +5 -5
- package/esm2022/src/core.mjs +2 -1
- package/esm2022/src/core_private_export.mjs +2 -1
- package/esm2022/src/defer/instructions.mjs +20 -12
- package/esm2022/src/defer/interfaces.mjs +1 -3
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/hydration/event_replay.mjs +23 -3
- package/esm2022/src/platform/platform_ref.mjs +8 -1
- package/esm2022/src/render3/after_render_hooks.mjs +4 -2
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/instructions/change_detection.mjs +13 -10
- package/esm2022/src/render3/instructions/listener.mjs +12 -1
- package/esm2022/src/render3/state.mjs +14 -4
- package/esm2022/src/render3/view_ref.mjs +3 -2
- package/esm2022/src/util/callback_scheduler.mjs +12 -26
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/src/zone/ng_zone.mjs +9 -23
- package/esm2022/testing/src/component_fixture.mjs +1 -3
- package/esm2022/testing/src/defer.mjs +1 -2
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed_compiler.mjs +3 -4
- package/event-dispatch-contract.min.js +1 -1
- package/fesm2022/core.mjs +752 -574
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/event-dispatch.mjs +315 -369
- package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +3 -7
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +34 -4
- package/package.json +1 -1
- package/primitives/event-dispatch/index.d.ts +41 -44
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/migrations/http-providers/bundle.js +66 -44
- package/schematics/migrations/http-providers/bundle.js.map +2 -2
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +39 -9
- package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +2 -2
- package/schematics/ng-generate/control-flow-migration/bundle.js +39 -9
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +2 -2
- package/schematics/ng-generate/standalone-migration/bundle.js +48 -18
- package/schematics/ng-generate/standalone-migration/bundle.js.map +2 -2
- package/testing/index.d.ts +1 -4
package/fesm2022/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.0.0-rc.
|
|
2
|
+
* @license Angular v18.0.0-rc.1
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -4397,6 +4397,12 @@ const instructionState = {
|
|
|
4397
4397
|
bindingsEnabled: true,
|
|
4398
4398
|
skipHydrationRootTNode: null,
|
|
4399
4399
|
};
|
|
4400
|
+
var CheckNoChangesMode;
|
|
4401
|
+
(function (CheckNoChangesMode) {
|
|
4402
|
+
CheckNoChangesMode[CheckNoChangesMode["Off"] = 0] = "Off";
|
|
4403
|
+
CheckNoChangesMode[CheckNoChangesMode["Exhaustive"] = 1] = "Exhaustive";
|
|
4404
|
+
CheckNoChangesMode[CheckNoChangesMode["OnlyDirtyViews"] = 2] = "OnlyDirtyViews";
|
|
4405
|
+
})(CheckNoChangesMode || (CheckNoChangesMode = {}));
|
|
4400
4406
|
/**
|
|
4401
4407
|
* In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.
|
|
4402
4408
|
*
|
|
@@ -4405,7 +4411,7 @@ const instructionState = {
|
|
|
4405
4411
|
* The `checkNoChanges` function is invoked only in ngDevMode=true and verifies that no unintended
|
|
4406
4412
|
* changes exist in the change detector or its children.
|
|
4407
4413
|
*/
|
|
4408
|
-
let
|
|
4414
|
+
let _checkNoChangesMode = 0; /* CheckNoChangesMode.Off */
|
|
4409
4415
|
/**
|
|
4410
4416
|
* Flag used to indicate that we are in the middle running change detection on a view
|
|
4411
4417
|
*
|
|
@@ -4576,11 +4582,15 @@ function getContextLView() {
|
|
|
4576
4582
|
}
|
|
4577
4583
|
function isInCheckNoChangesMode() {
|
|
4578
4584
|
!ngDevMode && throwError('Must never be called in production mode');
|
|
4579
|
-
return
|
|
4585
|
+
return _checkNoChangesMode !== CheckNoChangesMode.Off;
|
|
4586
|
+
}
|
|
4587
|
+
function isExhaustiveCheckNoChanges() {
|
|
4588
|
+
!ngDevMode && throwError('Must never be called in production mode');
|
|
4589
|
+
return _checkNoChangesMode === CheckNoChangesMode.Exhaustive;
|
|
4580
4590
|
}
|
|
4581
4591
|
function setIsInCheckNoChangesMode(mode) {
|
|
4582
4592
|
!ngDevMode && throwError('Must never be called in production mode');
|
|
4583
|
-
|
|
4593
|
+
_checkNoChangesMode = mode;
|
|
4584
4594
|
}
|
|
4585
4595
|
function isRefreshingViews() {
|
|
4586
4596
|
return _isRefreshingViews;
|
|
@@ -12941,13 +12951,13 @@ function detectChangesInViewWhileDirty(lView, mode) {
|
|
|
12941
12951
|
setIsRefreshingViews(lastIsRefreshingViewsValue);
|
|
12942
12952
|
}
|
|
12943
12953
|
}
|
|
12944
|
-
function checkNoChangesInternal(lView, notifyErrorHandler = true) {
|
|
12945
|
-
setIsInCheckNoChangesMode(
|
|
12954
|
+
function checkNoChangesInternal(lView, mode, notifyErrorHandler = true) {
|
|
12955
|
+
setIsInCheckNoChangesMode(mode);
|
|
12946
12956
|
try {
|
|
12947
12957
|
detectChangesInternal(lView, notifyErrorHandler);
|
|
12948
12958
|
}
|
|
12949
12959
|
finally {
|
|
12950
|
-
setIsInCheckNoChangesMode(
|
|
12960
|
+
setIsInCheckNoChangesMode(CheckNoChangesMode.Off);
|
|
12951
12961
|
}
|
|
12952
12962
|
}
|
|
12953
12963
|
/**
|
|
@@ -13085,11 +13095,13 @@ function refreshView(tView, lView, templateFn, context) {
|
|
|
13085
13095
|
}
|
|
13086
13096
|
}
|
|
13087
13097
|
catch (e) {
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13098
|
+
if (!isInCheckNoChangesPass) {
|
|
13099
|
+
// If refreshing a view causes an error, we need to remark the ancestors as needing traversal
|
|
13100
|
+
// because the error might have caused a situation where views below the current location are
|
|
13101
|
+
// dirty but will be unreachable because the "has dirty children" flag in the ancestors has been
|
|
13102
|
+
// cleared during change detection and we failed to run to completion.
|
|
13103
|
+
markAncestorsForTraversal(lView);
|
|
13104
|
+
}
|
|
13093
13105
|
throw e;
|
|
13094
13106
|
}
|
|
13095
13107
|
finally {
|
|
@@ -13198,6 +13210,7 @@ function detectChangesInView(lView, mode) {
|
|
|
13198
13210
|
shouldRefreshView ||= !!(flags & 1024 /* LViewFlags.RefreshView */);
|
|
13199
13211
|
// Refresh views when they have a dirty reactive consumer, regardless of mode.
|
|
13200
13212
|
shouldRefreshView ||= !!(consumer?.dirty && consumerPollProducersForChange$1(consumer));
|
|
13213
|
+
shouldRefreshView ||= !!(ngDevMode && isExhaustiveCheckNoChanges());
|
|
13201
13214
|
// Mark the Flags and `ReactiveNode` as not dirty before refreshing the component, so that they
|
|
13202
13215
|
// can be re-dirtied during the refresh process.
|
|
13203
13216
|
if (consumer) {
|
|
@@ -13519,7 +13532,7 @@ class ViewRef$1 {
|
|
|
13519
13532
|
*/
|
|
13520
13533
|
checkNoChanges() {
|
|
13521
13534
|
if (ngDevMode) {
|
|
13522
|
-
checkNoChangesInternal(this._lView, this.notifyErrorHandler);
|
|
13535
|
+
checkNoChangesInternal(this._lView, CheckNoChangesMode.OnlyDirtyViews, this.notifyErrorHandler);
|
|
13523
13536
|
}
|
|
13524
13537
|
}
|
|
13525
13538
|
attachToViewContainerRef() {
|
|
@@ -15324,6 +15337,514 @@ function performanceMarkFeature(feature) {
|
|
|
15324
15337
|
performance?.mark?.('mark_feature_usage', { detail: { feature } });
|
|
15325
15338
|
}
|
|
15326
15339
|
|
|
15340
|
+
/**
|
|
15341
|
+
* Gets a scheduling function that runs the callback after the first of setTimeout and
|
|
15342
|
+
* requestAnimationFrame resolves.
|
|
15343
|
+
*
|
|
15344
|
+
* - `requestAnimationFrame` ensures that change detection runs ahead of a browser repaint.
|
|
15345
|
+
* This ensures that the create and update passes of a change detection always happen
|
|
15346
|
+
* in the same frame.
|
|
15347
|
+
* - When the browser is resource-starved, `rAF` can execute _before_ a `setTimeout` because
|
|
15348
|
+
* rendering is a very high priority process. This means that `setTimeout` cannot guarantee
|
|
15349
|
+
* same-frame create and update pass, when `setTimeout` is used to schedule the update phase.
|
|
15350
|
+
* - While `rAF` gives us the desirable same-frame updates, it has two limitations that
|
|
15351
|
+
* prevent it from being used alone. First, it does not run in background tabs, which would
|
|
15352
|
+
* prevent Angular from initializing an application when opened in a new tab (for example).
|
|
15353
|
+
* Second, repeated calls to requestAnimationFrame will execute at the refresh rate of the
|
|
15354
|
+
* hardware (~16ms for a 60Hz display). This would cause significant slowdown of tests that
|
|
15355
|
+
* are written with several updates and asserts in the form of "update; await stable; assert;".
|
|
15356
|
+
* - Both `setTimeout` and `rAF` are able to "coalesce" several events from a single user
|
|
15357
|
+
* interaction into a single change detection. Importantly, this reduces view tree traversals when
|
|
15358
|
+
* compared to an alternative timing mechanism like `queueMicrotask`, where change detection would
|
|
15359
|
+
* then be interleaves between each event.
|
|
15360
|
+
*
|
|
15361
|
+
* By running change detection after the first of `setTimeout` and `rAF` to execute, we get the
|
|
15362
|
+
* best of both worlds.
|
|
15363
|
+
*
|
|
15364
|
+
* @returns a function to cancel the scheduled callback
|
|
15365
|
+
*/
|
|
15366
|
+
function scheduleCallbackWithRafRace(callback) {
|
|
15367
|
+
let executeCallback = true;
|
|
15368
|
+
setTimeout(() => {
|
|
15369
|
+
if (!executeCallback) {
|
|
15370
|
+
return;
|
|
15371
|
+
}
|
|
15372
|
+
executeCallback = false;
|
|
15373
|
+
callback();
|
|
15374
|
+
});
|
|
15375
|
+
if (typeof _global['requestAnimationFrame'] === 'function') {
|
|
15376
|
+
_global['requestAnimationFrame'](() => {
|
|
15377
|
+
if (!executeCallback) {
|
|
15378
|
+
return;
|
|
15379
|
+
}
|
|
15380
|
+
executeCallback = false;
|
|
15381
|
+
callback();
|
|
15382
|
+
});
|
|
15383
|
+
}
|
|
15384
|
+
return () => {
|
|
15385
|
+
executeCallback = false;
|
|
15386
|
+
};
|
|
15387
|
+
}
|
|
15388
|
+
function scheduleCallbackWithMicrotask(callback) {
|
|
15389
|
+
let executeCallback = true;
|
|
15390
|
+
queueMicrotask(() => {
|
|
15391
|
+
if (executeCallback) {
|
|
15392
|
+
callback();
|
|
15393
|
+
}
|
|
15394
|
+
});
|
|
15395
|
+
return () => {
|
|
15396
|
+
executeCallback = false;
|
|
15397
|
+
};
|
|
15398
|
+
}
|
|
15399
|
+
|
|
15400
|
+
function noop(...args) {
|
|
15401
|
+
// Do nothing.
|
|
15402
|
+
}
|
|
15403
|
+
|
|
15404
|
+
class AsyncStackTaggingZoneSpec {
|
|
15405
|
+
constructor(namePrefix, consoleAsyncStackTaggingImpl = console) {
|
|
15406
|
+
this.name = 'asyncStackTagging for ' + namePrefix;
|
|
15407
|
+
this.createTask = consoleAsyncStackTaggingImpl?.createTask ?? (() => null);
|
|
15408
|
+
}
|
|
15409
|
+
onScheduleTask(delegate, _current, target, task) {
|
|
15410
|
+
task.consoleTask = this.createTask(`Zone - ${task.source || task.type}`);
|
|
15411
|
+
return delegate.scheduleTask(target, task);
|
|
15412
|
+
}
|
|
15413
|
+
onInvokeTask(delegate, _currentZone, targetZone, task, applyThis, applyArgs) {
|
|
15414
|
+
let ret;
|
|
15415
|
+
if (task.consoleTask) {
|
|
15416
|
+
ret = task.consoleTask.run(() => delegate.invokeTask(targetZone, task, applyThis, applyArgs));
|
|
15417
|
+
}
|
|
15418
|
+
else {
|
|
15419
|
+
ret = delegate.invokeTask(targetZone, task, applyThis, applyArgs);
|
|
15420
|
+
}
|
|
15421
|
+
return ret;
|
|
15422
|
+
}
|
|
15423
|
+
}
|
|
15424
|
+
|
|
15425
|
+
/**
|
|
15426
|
+
* An injectable service for executing work inside or outside of the Angular zone.
|
|
15427
|
+
*
|
|
15428
|
+
* The most common use of this service is to optimize performance when starting a work consisting of
|
|
15429
|
+
* one or more asynchronous tasks that don't require UI updates or error handling to be handled by
|
|
15430
|
+
* Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks
|
|
15431
|
+
* can reenter the Angular zone via {@link #run}.
|
|
15432
|
+
*
|
|
15433
|
+
* <!-- TODO: add/fix links to:
|
|
15434
|
+
* - docs explaining zones and the use of zones in Angular and change-detection
|
|
15435
|
+
* - link to runOutsideAngular/run (throughout this file!)
|
|
15436
|
+
* -->
|
|
15437
|
+
*
|
|
15438
|
+
* @usageNotes
|
|
15439
|
+
* ### Example
|
|
15440
|
+
*
|
|
15441
|
+
* ```
|
|
15442
|
+
* import {Component, NgZone} from '@angular/core';
|
|
15443
|
+
* import {NgIf} from '@angular/common';
|
|
15444
|
+
*
|
|
15445
|
+
* @Component({
|
|
15446
|
+
* selector: 'ng-zone-demo',
|
|
15447
|
+
* template: `
|
|
15448
|
+
* <h2>Demo: NgZone</h2>
|
|
15449
|
+
*
|
|
15450
|
+
* <p>Progress: {{progress}}%</p>
|
|
15451
|
+
* <p *ngIf="progress >= 100">Done processing {{label}} of Angular zone!</p>
|
|
15452
|
+
*
|
|
15453
|
+
* <button (click)="processWithinAngularZone()">Process within Angular zone</button>
|
|
15454
|
+
* <button (click)="processOutsideOfAngularZone()">Process outside of Angular zone</button>
|
|
15455
|
+
* `,
|
|
15456
|
+
* })
|
|
15457
|
+
* export class NgZoneDemo {
|
|
15458
|
+
* progress: number = 0;
|
|
15459
|
+
* label: string;
|
|
15460
|
+
*
|
|
15461
|
+
* constructor(private _ngZone: NgZone) {}
|
|
15462
|
+
*
|
|
15463
|
+
* // Loop inside the Angular zone
|
|
15464
|
+
* // so the UI DOES refresh after each setTimeout cycle
|
|
15465
|
+
* processWithinAngularZone() {
|
|
15466
|
+
* this.label = 'inside';
|
|
15467
|
+
* this.progress = 0;
|
|
15468
|
+
* this._increaseProgress(() => console.log('Inside Done!'));
|
|
15469
|
+
* }
|
|
15470
|
+
*
|
|
15471
|
+
* // Loop outside of the Angular zone
|
|
15472
|
+
* // so the UI DOES NOT refresh after each setTimeout cycle
|
|
15473
|
+
* processOutsideOfAngularZone() {
|
|
15474
|
+
* this.label = 'outside';
|
|
15475
|
+
* this.progress = 0;
|
|
15476
|
+
* this._ngZone.runOutsideAngular(() => {
|
|
15477
|
+
* this._increaseProgress(() => {
|
|
15478
|
+
* // reenter the Angular zone and display done
|
|
15479
|
+
* this._ngZone.run(() => { console.log('Outside Done!'); });
|
|
15480
|
+
* });
|
|
15481
|
+
* });
|
|
15482
|
+
* }
|
|
15483
|
+
*
|
|
15484
|
+
* _increaseProgress(doneCallback: () => void) {
|
|
15485
|
+
* this.progress += 1;
|
|
15486
|
+
* console.log(`Current progress: ${this.progress}%`);
|
|
15487
|
+
*
|
|
15488
|
+
* if (this.progress < 100) {
|
|
15489
|
+
* window.setTimeout(() => this._increaseProgress(doneCallback), 10);
|
|
15490
|
+
* } else {
|
|
15491
|
+
* doneCallback();
|
|
15492
|
+
* }
|
|
15493
|
+
* }
|
|
15494
|
+
* }
|
|
15495
|
+
* ```
|
|
15496
|
+
*
|
|
15497
|
+
* @publicApi
|
|
15498
|
+
*/
|
|
15499
|
+
class NgZone {
|
|
15500
|
+
constructor({ enableLongStackTrace = false, shouldCoalesceEventChangeDetection = false, shouldCoalesceRunChangeDetection = false, }) {
|
|
15501
|
+
this.hasPendingMacrotasks = false;
|
|
15502
|
+
this.hasPendingMicrotasks = false;
|
|
15503
|
+
/**
|
|
15504
|
+
* Whether there are no outstanding microtasks or macrotasks.
|
|
15505
|
+
*/
|
|
15506
|
+
this.isStable = true;
|
|
15507
|
+
/**
|
|
15508
|
+
* Notifies when code enters Angular Zone. This gets fired first on VM Turn.
|
|
15509
|
+
*/
|
|
15510
|
+
this.onUnstable = new EventEmitter(false);
|
|
15511
|
+
/**
|
|
15512
|
+
* Notifies when there is no more microtasks enqueued in the current VM Turn.
|
|
15513
|
+
* This is a hint for Angular to do change detection, which may enqueue more microtasks.
|
|
15514
|
+
* For this reason this event can fire multiple times per VM Turn.
|
|
15515
|
+
*/
|
|
15516
|
+
this.onMicrotaskEmpty = new EventEmitter(false);
|
|
15517
|
+
/**
|
|
15518
|
+
* Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
|
|
15519
|
+
* implies we are about to relinquish VM turn.
|
|
15520
|
+
* This event gets called just once.
|
|
15521
|
+
*/
|
|
15522
|
+
this.onStable = new EventEmitter(false);
|
|
15523
|
+
/**
|
|
15524
|
+
* Notifies that an error has been delivered.
|
|
15525
|
+
*/
|
|
15526
|
+
this.onError = new EventEmitter(false);
|
|
15527
|
+
if (typeof Zone == 'undefined') {
|
|
15528
|
+
throw new RuntimeError(908 /* RuntimeErrorCode.MISSING_ZONEJS */, ngDevMode && `In this configuration Angular requires Zone.js`);
|
|
15529
|
+
}
|
|
15530
|
+
Zone.assertZonePatched();
|
|
15531
|
+
const self = this;
|
|
15532
|
+
self._nesting = 0;
|
|
15533
|
+
self._outer = self._inner = Zone.current;
|
|
15534
|
+
// AsyncStackTaggingZoneSpec provides `linked stack traces` to show
|
|
15535
|
+
// where the async operation is scheduled. For more details, refer
|
|
15536
|
+
// to this article, https://developer.chrome.com/blog/devtools-better-angular-debugging/
|
|
15537
|
+
// And we only import this AsyncStackTaggingZoneSpec in development mode,
|
|
15538
|
+
// in the production mode, the AsyncStackTaggingZoneSpec will be tree shaken away.
|
|
15539
|
+
if (ngDevMode) {
|
|
15540
|
+
self._inner = self._inner.fork(new AsyncStackTaggingZoneSpec('Angular'));
|
|
15541
|
+
}
|
|
15542
|
+
if (Zone['TaskTrackingZoneSpec']) {
|
|
15543
|
+
self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']());
|
|
15544
|
+
}
|
|
15545
|
+
if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {
|
|
15546
|
+
self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);
|
|
15547
|
+
}
|
|
15548
|
+
// if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be
|
|
15549
|
+
// coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped.
|
|
15550
|
+
self.shouldCoalesceEventChangeDetection =
|
|
15551
|
+
!shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;
|
|
15552
|
+
self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;
|
|
15553
|
+
self.callbackScheduled = false;
|
|
15554
|
+
forkInnerZoneWithAngularBehavior(self);
|
|
15555
|
+
}
|
|
15556
|
+
/**
|
|
15557
|
+
This method checks whether the method call happens within an Angular Zone instance.
|
|
15558
|
+
*/
|
|
15559
|
+
static isInAngularZone() {
|
|
15560
|
+
// Zone needs to be checked, because this method might be called even when NoopNgZone is used.
|
|
15561
|
+
return typeof Zone !== 'undefined' && Zone.current.get('isAngularZone') === true;
|
|
15562
|
+
}
|
|
15563
|
+
/**
|
|
15564
|
+
Assures that the method is called within the Angular Zone, otherwise throws an error.
|
|
15565
|
+
*/
|
|
15566
|
+
static assertInAngularZone() {
|
|
15567
|
+
if (!NgZone.isInAngularZone()) {
|
|
15568
|
+
throw new RuntimeError(909 /* RuntimeErrorCode.UNEXPECTED_ZONE_STATE */, ngDevMode && 'Expected to be in Angular Zone, but it is not!');
|
|
15569
|
+
}
|
|
15570
|
+
}
|
|
15571
|
+
/**
|
|
15572
|
+
Assures that the method is called outside of the Angular Zone, otherwise throws an error.
|
|
15573
|
+
*/
|
|
15574
|
+
static assertNotInAngularZone() {
|
|
15575
|
+
if (NgZone.isInAngularZone()) {
|
|
15576
|
+
throw new RuntimeError(909 /* RuntimeErrorCode.UNEXPECTED_ZONE_STATE */, ngDevMode && 'Expected to not be in Angular Zone, but it is!');
|
|
15577
|
+
}
|
|
15578
|
+
}
|
|
15579
|
+
/**
|
|
15580
|
+
* Executes the `fn` function synchronously within the Angular zone and returns value returned by
|
|
15581
|
+
* the function.
|
|
15582
|
+
*
|
|
15583
|
+
* Running functions via `run` allows you to reenter Angular zone from a task that was executed
|
|
15584
|
+
* outside of the Angular zone (typically started via {@link #runOutsideAngular}).
|
|
15585
|
+
*
|
|
15586
|
+
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
|
15587
|
+
* within the Angular zone.
|
|
15588
|
+
*
|
|
15589
|
+
* If a synchronous error happens it will be rethrown and not reported via `onError`.
|
|
15590
|
+
*/
|
|
15591
|
+
run(fn, applyThis, applyArgs) {
|
|
15592
|
+
return this._inner.run(fn, applyThis, applyArgs);
|
|
15593
|
+
}
|
|
15594
|
+
/**
|
|
15595
|
+
* Executes the `fn` function synchronously within the Angular zone as a task and returns value
|
|
15596
|
+
* returned by the function.
|
|
15597
|
+
*
|
|
15598
|
+
* Running functions via `run` allows you to reenter Angular zone from a task that was executed
|
|
15599
|
+
* outside of the Angular zone (typically started via {@link #runOutsideAngular}).
|
|
15600
|
+
*
|
|
15601
|
+
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
|
15602
|
+
* within the Angular zone.
|
|
15603
|
+
*
|
|
15604
|
+
* If a synchronous error happens it will be rethrown and not reported via `onError`.
|
|
15605
|
+
*/
|
|
15606
|
+
runTask(fn, applyThis, applyArgs, name) {
|
|
15607
|
+
const zone = this._inner;
|
|
15608
|
+
const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);
|
|
15609
|
+
try {
|
|
15610
|
+
return zone.runTask(task, applyThis, applyArgs);
|
|
15611
|
+
}
|
|
15612
|
+
finally {
|
|
15613
|
+
zone.cancelTask(task);
|
|
15614
|
+
}
|
|
15615
|
+
}
|
|
15616
|
+
/**
|
|
15617
|
+
* Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
|
|
15618
|
+
* rethrown.
|
|
15619
|
+
*/
|
|
15620
|
+
runGuarded(fn, applyThis, applyArgs) {
|
|
15621
|
+
return this._inner.runGuarded(fn, applyThis, applyArgs);
|
|
15622
|
+
}
|
|
15623
|
+
/**
|
|
15624
|
+
* Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
|
|
15625
|
+
* the function.
|
|
15626
|
+
*
|
|
15627
|
+
* Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
|
|
15628
|
+
* work that
|
|
15629
|
+
* doesn't trigger Angular change-detection or is subject to Angular's error handling.
|
|
15630
|
+
*
|
|
15631
|
+
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
|
15632
|
+
* outside of the Angular zone.
|
|
15633
|
+
*
|
|
15634
|
+
* Use {@link #run} to reenter the Angular zone and do work that updates the application model.
|
|
15635
|
+
*/
|
|
15636
|
+
runOutsideAngular(fn) {
|
|
15637
|
+
return this._outer.run(fn);
|
|
15638
|
+
}
|
|
15639
|
+
}
|
|
15640
|
+
const EMPTY_PAYLOAD = {};
|
|
15641
|
+
function checkStable(zone) {
|
|
15642
|
+
// TODO: @JiaLiPassion, should check zone.isCheckStableRunning to prevent
|
|
15643
|
+
// re-entry. The case is:
|
|
15644
|
+
//
|
|
15645
|
+
// @Component({...})
|
|
15646
|
+
// export class AppComponent {
|
|
15647
|
+
// constructor(private ngZone: NgZone) {
|
|
15648
|
+
// this.ngZone.onStable.subscribe(() => {
|
|
15649
|
+
// this.ngZone.run(() => console.log('stable'););
|
|
15650
|
+
// });
|
|
15651
|
+
// }
|
|
15652
|
+
//
|
|
15653
|
+
// The onStable subscriber run another function inside ngZone
|
|
15654
|
+
// which causes `checkStable()` re-entry.
|
|
15655
|
+
// But this fix causes some issues in g3, so this fix will be
|
|
15656
|
+
// launched in another PR.
|
|
15657
|
+
if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {
|
|
15658
|
+
try {
|
|
15659
|
+
zone._nesting++;
|
|
15660
|
+
zone.onMicrotaskEmpty.emit(null);
|
|
15661
|
+
}
|
|
15662
|
+
finally {
|
|
15663
|
+
zone._nesting--;
|
|
15664
|
+
if (!zone.hasPendingMicrotasks) {
|
|
15665
|
+
try {
|
|
15666
|
+
zone.runOutsideAngular(() => zone.onStable.emit(null));
|
|
15667
|
+
}
|
|
15668
|
+
finally {
|
|
15669
|
+
zone.isStable = true;
|
|
15670
|
+
}
|
|
15671
|
+
}
|
|
15672
|
+
}
|
|
15673
|
+
}
|
|
15674
|
+
}
|
|
15675
|
+
function delayChangeDetectionForEvents(zone) {
|
|
15676
|
+
/**
|
|
15677
|
+
* We also need to check _nesting here
|
|
15678
|
+
* Consider the following case with shouldCoalesceRunChangeDetection = true
|
|
15679
|
+
*
|
|
15680
|
+
* ngZone.run(() => {});
|
|
15681
|
+
* ngZone.run(() => {});
|
|
15682
|
+
*
|
|
15683
|
+
* We want the two `ngZone.run()` only trigger one change detection
|
|
15684
|
+
* when shouldCoalesceRunChangeDetection is true.
|
|
15685
|
+
* And because in this case, change detection run in async way(requestAnimationFrame),
|
|
15686
|
+
* so we also need to check the _nesting here to prevent multiple
|
|
15687
|
+
* change detections.
|
|
15688
|
+
*/
|
|
15689
|
+
if (zone.isCheckStableRunning || zone.callbackScheduled) {
|
|
15690
|
+
return;
|
|
15691
|
+
}
|
|
15692
|
+
zone.callbackScheduled = true;
|
|
15693
|
+
Zone.root.run(() => {
|
|
15694
|
+
scheduleCallbackWithRafRace(() => {
|
|
15695
|
+
zone.callbackScheduled = false;
|
|
15696
|
+
updateMicroTaskStatus(zone);
|
|
15697
|
+
zone.isCheckStableRunning = true;
|
|
15698
|
+
checkStable(zone);
|
|
15699
|
+
zone.isCheckStableRunning = false;
|
|
15700
|
+
});
|
|
15701
|
+
});
|
|
15702
|
+
updateMicroTaskStatus(zone);
|
|
15703
|
+
}
|
|
15704
|
+
function forkInnerZoneWithAngularBehavior(zone) {
|
|
15705
|
+
const delayChangeDetectionForEventsDelegate = () => {
|
|
15706
|
+
delayChangeDetectionForEvents(zone);
|
|
15707
|
+
};
|
|
15708
|
+
zone._inner = zone._inner.fork({
|
|
15709
|
+
name: 'angular',
|
|
15710
|
+
properties: { 'isAngularZone': true },
|
|
15711
|
+
onInvokeTask: (delegate, current, target, task, applyThis, applyArgs) => {
|
|
15712
|
+
// Prevent triggering change detection when the flag is detected.
|
|
15713
|
+
if (shouldBeIgnoredByZone(applyArgs)) {
|
|
15714
|
+
return delegate.invokeTask(target, task, applyThis, applyArgs);
|
|
15715
|
+
}
|
|
15716
|
+
try {
|
|
15717
|
+
onEnter(zone);
|
|
15718
|
+
return delegate.invokeTask(target, task, applyThis, applyArgs);
|
|
15719
|
+
}
|
|
15720
|
+
finally {
|
|
15721
|
+
if ((zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') ||
|
|
15722
|
+
zone.shouldCoalesceRunChangeDetection) {
|
|
15723
|
+
delayChangeDetectionForEventsDelegate();
|
|
15724
|
+
}
|
|
15725
|
+
onLeave(zone);
|
|
15726
|
+
}
|
|
15727
|
+
},
|
|
15728
|
+
onInvoke: (delegate, current, target, callback, applyThis, applyArgs, source) => {
|
|
15729
|
+
try {
|
|
15730
|
+
onEnter(zone);
|
|
15731
|
+
return delegate.invoke(target, callback, applyThis, applyArgs, source);
|
|
15732
|
+
}
|
|
15733
|
+
finally {
|
|
15734
|
+
if (zone.shouldCoalesceRunChangeDetection &&
|
|
15735
|
+
// Do not delay change detection when the task is the scheduler's tick.
|
|
15736
|
+
// We need to synchronously trigger the stability logic so that the
|
|
15737
|
+
// zone-based scheduler can prevent a duplicate ApplicationRef.tick
|
|
15738
|
+
// by first checking if the scheduler tick is running. This does seem a bit roundabout,
|
|
15739
|
+
// but we _do_ still want to trigger all the correct events when we exit the zone.run
|
|
15740
|
+
// (`onMicrotaskEmpty` and `onStable` _should_ emit; developers can have code which
|
|
15741
|
+
// relies on these events happening after change detection runs).
|
|
15742
|
+
// Note: `zone.callbackScheduled` is already in delayChangeDetectionForEventsDelegate
|
|
15743
|
+
// but is added here as well to prevent reads of applyArgs when not necessary
|
|
15744
|
+
!zone.callbackScheduled &&
|
|
15745
|
+
!isSchedulerTick(applyArgs)) {
|
|
15746
|
+
delayChangeDetectionForEventsDelegate();
|
|
15747
|
+
}
|
|
15748
|
+
onLeave(zone);
|
|
15749
|
+
}
|
|
15750
|
+
},
|
|
15751
|
+
onHasTask: (delegate, current, target, hasTaskState) => {
|
|
15752
|
+
delegate.hasTask(target, hasTaskState);
|
|
15753
|
+
if (current === target) {
|
|
15754
|
+
// We are only interested in hasTask events which originate from our zone
|
|
15755
|
+
// (A child hasTask event is not interesting to us)
|
|
15756
|
+
if (hasTaskState.change == 'microTask') {
|
|
15757
|
+
zone._hasPendingMicrotasks = hasTaskState.microTask;
|
|
15758
|
+
updateMicroTaskStatus(zone);
|
|
15759
|
+
checkStable(zone);
|
|
15760
|
+
}
|
|
15761
|
+
else if (hasTaskState.change == 'macroTask') {
|
|
15762
|
+
zone.hasPendingMacrotasks = hasTaskState.macroTask;
|
|
15763
|
+
}
|
|
15764
|
+
}
|
|
15765
|
+
},
|
|
15766
|
+
onHandleError: (delegate, current, target, error) => {
|
|
15767
|
+
delegate.handleError(target, error);
|
|
15768
|
+
zone.runOutsideAngular(() => zone.onError.emit(error));
|
|
15769
|
+
return false;
|
|
15770
|
+
},
|
|
15771
|
+
});
|
|
15772
|
+
}
|
|
15773
|
+
function updateMicroTaskStatus(zone) {
|
|
15774
|
+
if (zone._hasPendingMicrotasks ||
|
|
15775
|
+
((zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) &&
|
|
15776
|
+
zone.callbackScheduled === true)) {
|
|
15777
|
+
zone.hasPendingMicrotasks = true;
|
|
15778
|
+
}
|
|
15779
|
+
else {
|
|
15780
|
+
zone.hasPendingMicrotasks = false;
|
|
15781
|
+
}
|
|
15782
|
+
}
|
|
15783
|
+
function onEnter(zone) {
|
|
15784
|
+
zone._nesting++;
|
|
15785
|
+
if (zone.isStable) {
|
|
15786
|
+
zone.isStable = false;
|
|
15787
|
+
zone.onUnstable.emit(null);
|
|
15788
|
+
}
|
|
15789
|
+
}
|
|
15790
|
+
function onLeave(zone) {
|
|
15791
|
+
zone._nesting--;
|
|
15792
|
+
checkStable(zone);
|
|
15793
|
+
}
|
|
15794
|
+
/**
|
|
15795
|
+
* Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls
|
|
15796
|
+
* to framework to perform rendering.
|
|
15797
|
+
*/
|
|
15798
|
+
class NoopNgZone {
|
|
15799
|
+
constructor() {
|
|
15800
|
+
this.hasPendingMicrotasks = false;
|
|
15801
|
+
this.hasPendingMacrotasks = false;
|
|
15802
|
+
this.isStable = true;
|
|
15803
|
+
this.onUnstable = new EventEmitter();
|
|
15804
|
+
this.onMicrotaskEmpty = new EventEmitter();
|
|
15805
|
+
this.onStable = new EventEmitter();
|
|
15806
|
+
this.onError = new EventEmitter();
|
|
15807
|
+
}
|
|
15808
|
+
run(fn, applyThis, applyArgs) {
|
|
15809
|
+
return fn.apply(applyThis, applyArgs);
|
|
15810
|
+
}
|
|
15811
|
+
runGuarded(fn, applyThis, applyArgs) {
|
|
15812
|
+
return fn.apply(applyThis, applyArgs);
|
|
15813
|
+
}
|
|
15814
|
+
runOutsideAngular(fn) {
|
|
15815
|
+
return fn();
|
|
15816
|
+
}
|
|
15817
|
+
runTask(fn, applyThis, applyArgs, name) {
|
|
15818
|
+
return fn.apply(applyThis, applyArgs);
|
|
15819
|
+
}
|
|
15820
|
+
}
|
|
15821
|
+
function shouldBeIgnoredByZone(applyArgs) {
|
|
15822
|
+
return hasApplyArgsData(applyArgs, '__ignore_ng_zone__');
|
|
15823
|
+
}
|
|
15824
|
+
function isSchedulerTick(applyArgs) {
|
|
15825
|
+
return hasApplyArgsData(applyArgs, '__scheduler_tick__');
|
|
15826
|
+
}
|
|
15827
|
+
function hasApplyArgsData(applyArgs, key) {
|
|
15828
|
+
if (!Array.isArray(applyArgs)) {
|
|
15829
|
+
return false;
|
|
15830
|
+
}
|
|
15831
|
+
// We should only ever get 1 arg passed through to invokeTask.
|
|
15832
|
+
// Short circuit here incase that behavior changes.
|
|
15833
|
+
if (applyArgs.length !== 1) {
|
|
15834
|
+
return false;
|
|
15835
|
+
}
|
|
15836
|
+
return applyArgs[0]?.data?.[key] === true;
|
|
15837
|
+
}
|
|
15838
|
+
function getNgZone(ngZoneToUse = 'zone.js', options) {
|
|
15839
|
+
if (ngZoneToUse === 'noop') {
|
|
15840
|
+
return new NoopNgZone();
|
|
15841
|
+
}
|
|
15842
|
+
if (ngZoneToUse === 'zone.js') {
|
|
15843
|
+
return new NgZone(options);
|
|
15844
|
+
}
|
|
15845
|
+
return ngZoneToUse;
|
|
15846
|
+
}
|
|
15847
|
+
|
|
15327
15848
|
/**
|
|
15328
15849
|
* The phase to run an `afterRender` or `afterNextRender` callback in.
|
|
15329
15850
|
*
|
|
@@ -15566,13 +16087,14 @@ class AfterRenderCallback {
|
|
|
15566
16087
|
constructor(phase, callbackFn) {
|
|
15567
16088
|
this.phase = phase;
|
|
15568
16089
|
this.callbackFn = callbackFn;
|
|
16090
|
+
this.zone = inject(NgZone);
|
|
15569
16091
|
this.errorHandler = inject(ErrorHandler, { optional: true });
|
|
15570
16092
|
// Registering a callback will notify the scheduler.
|
|
15571
16093
|
inject(ChangeDetectionScheduler, { optional: true })?.notify(6 /* NotificationSource.NewRenderHook */);
|
|
15572
16094
|
}
|
|
15573
16095
|
invoke() {
|
|
15574
16096
|
try {
|
|
15575
|
-
this.callbackFn
|
|
16097
|
+
this.zone.runOutsideAngular(this.callbackFn);
|
|
15576
16098
|
}
|
|
15577
16099
|
catch (err) {
|
|
15578
16100
|
this.errorHandler?.handleError(err);
|
|
@@ -16366,7 +16888,7 @@ function createRootComponent(componentView, rootComponentDef, rootDirectives, ho
|
|
|
16366
16888
|
function setRootNodeAttributes(hostRenderer, componentDef, hostRNode, rootSelectorOrNode) {
|
|
16367
16889
|
if (rootSelectorOrNode) {
|
|
16368
16890
|
// The placeholder will be replaced with the actual version at build time.
|
|
16369
|
-
setUpAttributes(hostRenderer, hostRNode, ['ng-version', '18.0.0-rc.
|
|
16891
|
+
setUpAttributes(hostRenderer, hostRNode, ['ng-version', '18.0.0-rc.1']);
|
|
16370
16892
|
}
|
|
16371
16893
|
else {
|
|
16372
16894
|
// If host element is created as a part of this function call (i.e. `rootSelectorOrNode`
|
|
@@ -18991,7 +19513,6 @@ const LOADING_AFTER_SLOT = 1;
|
|
|
18991
19513
|
* Describes the current state of this defer block instance.
|
|
18992
19514
|
*
|
|
18993
19515
|
* @publicApi
|
|
18994
|
-
* @developerPreview
|
|
18995
19516
|
*/
|
|
18996
19517
|
var DeferBlockState;
|
|
18997
19518
|
(function (DeferBlockState) {
|
|
@@ -19028,7 +19549,6 @@ const PREFETCH_TRIGGER_CLEANUP_FNS = 5;
|
|
|
19028
19549
|
/**
|
|
19029
19550
|
* Options for configuring defer blocks behavior.
|
|
19030
19551
|
* @publicApi
|
|
19031
|
-
* @developerPreview
|
|
19032
19552
|
*/
|
|
19033
19553
|
var DeferBlockBehavior;
|
|
19034
19554
|
(function (DeferBlockBehavior) {
|
|
@@ -19083,541 +19603,6 @@ function invokeAllTriggerCleanupFns(lDetails) {
|
|
|
19083
19603
|
invokeTriggerCleanupFns(0 /* TriggerType.Regular */, lDetails);
|
|
19084
19604
|
}
|
|
19085
19605
|
|
|
19086
|
-
/**
|
|
19087
|
-
* Gets a scheduling function that runs the callback after the first of setTimeout and
|
|
19088
|
-
* requestAnimationFrame resolves.
|
|
19089
|
-
*
|
|
19090
|
-
* - `requestAnimationFrame` ensures that change detection runs ahead of a browser repaint.
|
|
19091
|
-
* This ensures that the create and update passes of a change detection always happen
|
|
19092
|
-
* in the same frame.
|
|
19093
|
-
* - When the browser is resource-starved, `rAF` can execute _before_ a `setTimeout` because
|
|
19094
|
-
* rendering is a very high priority process. This means that `setTimeout` cannot guarantee
|
|
19095
|
-
* same-frame create and update pass, when `setTimeout` is used to schedule the update phase.
|
|
19096
|
-
* - While `rAF` gives us the desirable same-frame updates, it has two limitations that
|
|
19097
|
-
* prevent it from being used alone. First, it does not run in background tabs, which would
|
|
19098
|
-
* prevent Angular from initializing an application when opened in a new tab (for example).
|
|
19099
|
-
* Second, repeated calls to requestAnimationFrame will execute at the refresh rate of the
|
|
19100
|
-
* hardware (~16ms for a 60Hz display). This would cause significant slowdown of tests that
|
|
19101
|
-
* are written with several updates and asserts in the form of "update; await stable; assert;".
|
|
19102
|
-
* - Both `setTimeout` and `rAF` are able to "coalesce" several events from a single user
|
|
19103
|
-
* interaction into a single change detection. Importantly, this reduces view tree traversals when
|
|
19104
|
-
* compared to an alternative timing mechanism like `queueMicrotask`, where change detection would
|
|
19105
|
-
* then be interleaves between each event.
|
|
19106
|
-
*
|
|
19107
|
-
* By running change detection after the first of `setTimeout` and `rAF` to execute, we get the
|
|
19108
|
-
* best of both worlds.
|
|
19109
|
-
*
|
|
19110
|
-
* @returns a function to cancel the scheduled callback
|
|
19111
|
-
*/
|
|
19112
|
-
function scheduleCallbackWithRafRace(callback, useNativeTimers = true) {
|
|
19113
|
-
// Note: the `scheduleCallback` is used in the `NgZone` class, but we cannot use the
|
|
19114
|
-
// `inject` function. The `NgZone` instance may be created manually, and thus the injection
|
|
19115
|
-
// context will be unavailable. This might be enough to check whether `requestAnimationFrame` is
|
|
19116
|
-
// available because otherwise, we'll fall back to `setTimeout`.
|
|
19117
|
-
const hasRequestAnimationFrame = typeof _global['requestAnimationFrame'] === 'function';
|
|
19118
|
-
let nativeRequestAnimationFrame = hasRequestAnimationFrame
|
|
19119
|
-
? _global['requestAnimationFrame']
|
|
19120
|
-
: null;
|
|
19121
|
-
let nativeSetTimeout = _global['setTimeout'];
|
|
19122
|
-
if (typeof Zone !== 'undefined' && useNativeTimers) {
|
|
19123
|
-
if (hasRequestAnimationFrame) {
|
|
19124
|
-
nativeRequestAnimationFrame =
|
|
19125
|
-
_global[Zone.__symbol__('requestAnimationFrame')] ?? nativeRequestAnimationFrame;
|
|
19126
|
-
}
|
|
19127
|
-
nativeSetTimeout = _global[Zone.__symbol__('setTimeout')] ?? nativeSetTimeout;
|
|
19128
|
-
}
|
|
19129
|
-
let executeCallback = true;
|
|
19130
|
-
nativeSetTimeout(() => {
|
|
19131
|
-
if (!executeCallback) {
|
|
19132
|
-
return;
|
|
19133
|
-
}
|
|
19134
|
-
executeCallback = false;
|
|
19135
|
-
callback();
|
|
19136
|
-
});
|
|
19137
|
-
nativeRequestAnimationFrame?.(() => {
|
|
19138
|
-
if (!executeCallback) {
|
|
19139
|
-
return;
|
|
19140
|
-
}
|
|
19141
|
-
executeCallback = false;
|
|
19142
|
-
callback();
|
|
19143
|
-
});
|
|
19144
|
-
return () => {
|
|
19145
|
-
executeCallback = false;
|
|
19146
|
-
};
|
|
19147
|
-
}
|
|
19148
|
-
function scheduleCallbackWithMicrotask(callback) {
|
|
19149
|
-
let executeCallback = true;
|
|
19150
|
-
queueMicrotask(() => {
|
|
19151
|
-
if (executeCallback) {
|
|
19152
|
-
callback();
|
|
19153
|
-
}
|
|
19154
|
-
});
|
|
19155
|
-
return () => {
|
|
19156
|
-
executeCallback = false;
|
|
19157
|
-
};
|
|
19158
|
-
}
|
|
19159
|
-
|
|
19160
|
-
function noop(...args) {
|
|
19161
|
-
// Do nothing.
|
|
19162
|
-
}
|
|
19163
|
-
|
|
19164
|
-
class AsyncStackTaggingZoneSpec {
|
|
19165
|
-
constructor(namePrefix, consoleAsyncStackTaggingImpl = console) {
|
|
19166
|
-
this.name = 'asyncStackTagging for ' + namePrefix;
|
|
19167
|
-
this.createTask = consoleAsyncStackTaggingImpl?.createTask ?? (() => null);
|
|
19168
|
-
}
|
|
19169
|
-
onScheduleTask(delegate, _current, target, task) {
|
|
19170
|
-
task.consoleTask = this.createTask(`Zone - ${task.source || task.type}`);
|
|
19171
|
-
return delegate.scheduleTask(target, task);
|
|
19172
|
-
}
|
|
19173
|
-
onInvokeTask(delegate, _currentZone, targetZone, task, applyThis, applyArgs) {
|
|
19174
|
-
let ret;
|
|
19175
|
-
if (task.consoleTask) {
|
|
19176
|
-
ret = task.consoleTask.run(() => delegate.invokeTask(targetZone, task, applyThis, applyArgs));
|
|
19177
|
-
}
|
|
19178
|
-
else {
|
|
19179
|
-
ret = delegate.invokeTask(targetZone, task, applyThis, applyArgs);
|
|
19180
|
-
}
|
|
19181
|
-
return ret;
|
|
19182
|
-
}
|
|
19183
|
-
}
|
|
19184
|
-
|
|
19185
|
-
/**
|
|
19186
|
-
* An injectable service for executing work inside or outside of the Angular zone.
|
|
19187
|
-
*
|
|
19188
|
-
* The most common use of this service is to optimize performance when starting a work consisting of
|
|
19189
|
-
* one or more asynchronous tasks that don't require UI updates or error handling to be handled by
|
|
19190
|
-
* Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks
|
|
19191
|
-
* can reenter the Angular zone via {@link #run}.
|
|
19192
|
-
*
|
|
19193
|
-
* <!-- TODO: add/fix links to:
|
|
19194
|
-
* - docs explaining zones and the use of zones in Angular and change-detection
|
|
19195
|
-
* - link to runOutsideAngular/run (throughout this file!)
|
|
19196
|
-
* -->
|
|
19197
|
-
*
|
|
19198
|
-
* @usageNotes
|
|
19199
|
-
* ### Example
|
|
19200
|
-
*
|
|
19201
|
-
* ```
|
|
19202
|
-
* import {Component, NgZone} from '@angular/core';
|
|
19203
|
-
* import {NgIf} from '@angular/common';
|
|
19204
|
-
*
|
|
19205
|
-
* @Component({
|
|
19206
|
-
* selector: 'ng-zone-demo',
|
|
19207
|
-
* template: `
|
|
19208
|
-
* <h2>Demo: NgZone</h2>
|
|
19209
|
-
*
|
|
19210
|
-
* <p>Progress: {{progress}}%</p>
|
|
19211
|
-
* <p *ngIf="progress >= 100">Done processing {{label}} of Angular zone!</p>
|
|
19212
|
-
*
|
|
19213
|
-
* <button (click)="processWithinAngularZone()">Process within Angular zone</button>
|
|
19214
|
-
* <button (click)="processOutsideOfAngularZone()">Process outside of Angular zone</button>
|
|
19215
|
-
* `,
|
|
19216
|
-
* })
|
|
19217
|
-
* export class NgZoneDemo {
|
|
19218
|
-
* progress: number = 0;
|
|
19219
|
-
* label: string;
|
|
19220
|
-
*
|
|
19221
|
-
* constructor(private _ngZone: NgZone) {}
|
|
19222
|
-
*
|
|
19223
|
-
* // Loop inside the Angular zone
|
|
19224
|
-
* // so the UI DOES refresh after each setTimeout cycle
|
|
19225
|
-
* processWithinAngularZone() {
|
|
19226
|
-
* this.label = 'inside';
|
|
19227
|
-
* this.progress = 0;
|
|
19228
|
-
* this._increaseProgress(() => console.log('Inside Done!'));
|
|
19229
|
-
* }
|
|
19230
|
-
*
|
|
19231
|
-
* // Loop outside of the Angular zone
|
|
19232
|
-
* // so the UI DOES NOT refresh after each setTimeout cycle
|
|
19233
|
-
* processOutsideOfAngularZone() {
|
|
19234
|
-
* this.label = 'outside';
|
|
19235
|
-
* this.progress = 0;
|
|
19236
|
-
* this._ngZone.runOutsideAngular(() => {
|
|
19237
|
-
* this._increaseProgress(() => {
|
|
19238
|
-
* // reenter the Angular zone and display done
|
|
19239
|
-
* this._ngZone.run(() => { console.log('Outside Done!'); });
|
|
19240
|
-
* });
|
|
19241
|
-
* });
|
|
19242
|
-
* }
|
|
19243
|
-
*
|
|
19244
|
-
* _increaseProgress(doneCallback: () => void) {
|
|
19245
|
-
* this.progress += 1;
|
|
19246
|
-
* console.log(`Current progress: ${this.progress}%`);
|
|
19247
|
-
*
|
|
19248
|
-
* if (this.progress < 100) {
|
|
19249
|
-
* window.setTimeout(() => this._increaseProgress(doneCallback), 10);
|
|
19250
|
-
* } else {
|
|
19251
|
-
* doneCallback();
|
|
19252
|
-
* }
|
|
19253
|
-
* }
|
|
19254
|
-
* }
|
|
19255
|
-
* ```
|
|
19256
|
-
*
|
|
19257
|
-
* @publicApi
|
|
19258
|
-
*/
|
|
19259
|
-
class NgZone {
|
|
19260
|
-
constructor({ enableLongStackTrace = false, shouldCoalesceEventChangeDetection = false, shouldCoalesceRunChangeDetection = false, }) {
|
|
19261
|
-
this.hasPendingMacrotasks = false;
|
|
19262
|
-
this.hasPendingMicrotasks = false;
|
|
19263
|
-
/**
|
|
19264
|
-
* Whether there are no outstanding microtasks or macrotasks.
|
|
19265
|
-
*/
|
|
19266
|
-
this.isStable = true;
|
|
19267
|
-
/**
|
|
19268
|
-
* Notifies when code enters Angular Zone. This gets fired first on VM Turn.
|
|
19269
|
-
*/
|
|
19270
|
-
this.onUnstable = new EventEmitter(false);
|
|
19271
|
-
/**
|
|
19272
|
-
* Notifies when there is no more microtasks enqueued in the current VM Turn.
|
|
19273
|
-
* This is a hint for Angular to do change detection, which may enqueue more microtasks.
|
|
19274
|
-
* For this reason this event can fire multiple times per VM Turn.
|
|
19275
|
-
*/
|
|
19276
|
-
this.onMicrotaskEmpty = new EventEmitter(false);
|
|
19277
|
-
/**
|
|
19278
|
-
* Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which
|
|
19279
|
-
* implies we are about to relinquish VM turn.
|
|
19280
|
-
* This event gets called just once.
|
|
19281
|
-
*/
|
|
19282
|
-
this.onStable = new EventEmitter(false);
|
|
19283
|
-
/**
|
|
19284
|
-
* Notifies that an error has been delivered.
|
|
19285
|
-
*/
|
|
19286
|
-
this.onError = new EventEmitter(false);
|
|
19287
|
-
if (typeof Zone == 'undefined') {
|
|
19288
|
-
throw new RuntimeError(908 /* RuntimeErrorCode.MISSING_ZONEJS */, ngDevMode && `In this configuration Angular requires Zone.js`);
|
|
19289
|
-
}
|
|
19290
|
-
Zone.assertZonePatched();
|
|
19291
|
-
const self = this;
|
|
19292
|
-
self._nesting = 0;
|
|
19293
|
-
self._outer = self._inner = Zone.current;
|
|
19294
|
-
// AsyncStackTaggingZoneSpec provides `linked stack traces` to show
|
|
19295
|
-
// where the async operation is scheduled. For more details, refer
|
|
19296
|
-
// to this article, https://developer.chrome.com/blog/devtools-better-angular-debugging/
|
|
19297
|
-
// And we only import this AsyncStackTaggingZoneSpec in development mode,
|
|
19298
|
-
// in the production mode, the AsyncStackTaggingZoneSpec will be tree shaken away.
|
|
19299
|
-
if (ngDevMode) {
|
|
19300
|
-
self._inner = self._inner.fork(new AsyncStackTaggingZoneSpec('Angular'));
|
|
19301
|
-
}
|
|
19302
|
-
if (Zone['TaskTrackingZoneSpec']) {
|
|
19303
|
-
self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']());
|
|
19304
|
-
}
|
|
19305
|
-
if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {
|
|
19306
|
-
self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);
|
|
19307
|
-
}
|
|
19308
|
-
// if shouldCoalesceRunChangeDetection is true, all tasks including event tasks will be
|
|
19309
|
-
// coalesced, so shouldCoalesceEventChangeDetection option is not necessary and can be skipped.
|
|
19310
|
-
self.shouldCoalesceEventChangeDetection =
|
|
19311
|
-
!shouldCoalesceRunChangeDetection && shouldCoalesceEventChangeDetection;
|
|
19312
|
-
self.shouldCoalesceRunChangeDetection = shouldCoalesceRunChangeDetection;
|
|
19313
|
-
self.callbackScheduled = false;
|
|
19314
|
-
self.scheduleCallback = scheduleCallbackWithRafRace;
|
|
19315
|
-
forkInnerZoneWithAngularBehavior(self);
|
|
19316
|
-
}
|
|
19317
|
-
/**
|
|
19318
|
-
This method checks whether the method call happens within an Angular Zone instance.
|
|
19319
|
-
*/
|
|
19320
|
-
static isInAngularZone() {
|
|
19321
|
-
// Zone needs to be checked, because this method might be called even when NoopNgZone is used.
|
|
19322
|
-
return typeof Zone !== 'undefined' && Zone.current.get('isAngularZone') === true;
|
|
19323
|
-
}
|
|
19324
|
-
/**
|
|
19325
|
-
Assures that the method is called within the Angular Zone, otherwise throws an error.
|
|
19326
|
-
*/
|
|
19327
|
-
static assertInAngularZone() {
|
|
19328
|
-
if (!NgZone.isInAngularZone()) {
|
|
19329
|
-
throw new RuntimeError(909 /* RuntimeErrorCode.UNEXPECTED_ZONE_STATE */, ngDevMode && 'Expected to be in Angular Zone, but it is not!');
|
|
19330
|
-
}
|
|
19331
|
-
}
|
|
19332
|
-
/**
|
|
19333
|
-
Assures that the method is called outside of the Angular Zone, otherwise throws an error.
|
|
19334
|
-
*/
|
|
19335
|
-
static assertNotInAngularZone() {
|
|
19336
|
-
if (NgZone.isInAngularZone()) {
|
|
19337
|
-
throw new RuntimeError(909 /* RuntimeErrorCode.UNEXPECTED_ZONE_STATE */, ngDevMode && 'Expected to not be in Angular Zone, but it is!');
|
|
19338
|
-
}
|
|
19339
|
-
}
|
|
19340
|
-
/**
|
|
19341
|
-
* Executes the `fn` function synchronously within the Angular zone and returns value returned by
|
|
19342
|
-
* the function.
|
|
19343
|
-
*
|
|
19344
|
-
* Running functions via `run` allows you to reenter Angular zone from a task that was executed
|
|
19345
|
-
* outside of the Angular zone (typically started via {@link #runOutsideAngular}).
|
|
19346
|
-
*
|
|
19347
|
-
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
|
19348
|
-
* within the Angular zone.
|
|
19349
|
-
*
|
|
19350
|
-
* If a synchronous error happens it will be rethrown and not reported via `onError`.
|
|
19351
|
-
*/
|
|
19352
|
-
run(fn, applyThis, applyArgs) {
|
|
19353
|
-
return this._inner.run(fn, applyThis, applyArgs);
|
|
19354
|
-
}
|
|
19355
|
-
/**
|
|
19356
|
-
* Executes the `fn` function synchronously within the Angular zone as a task and returns value
|
|
19357
|
-
* returned by the function.
|
|
19358
|
-
*
|
|
19359
|
-
* Running functions via `run` allows you to reenter Angular zone from a task that was executed
|
|
19360
|
-
* outside of the Angular zone (typically started via {@link #runOutsideAngular}).
|
|
19361
|
-
*
|
|
19362
|
-
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
|
19363
|
-
* within the Angular zone.
|
|
19364
|
-
*
|
|
19365
|
-
* If a synchronous error happens it will be rethrown and not reported via `onError`.
|
|
19366
|
-
*/
|
|
19367
|
-
runTask(fn, applyThis, applyArgs, name) {
|
|
19368
|
-
const zone = this._inner;
|
|
19369
|
-
const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);
|
|
19370
|
-
try {
|
|
19371
|
-
return zone.runTask(task, applyThis, applyArgs);
|
|
19372
|
-
}
|
|
19373
|
-
finally {
|
|
19374
|
-
zone.cancelTask(task);
|
|
19375
|
-
}
|
|
19376
|
-
}
|
|
19377
|
-
/**
|
|
19378
|
-
* Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not
|
|
19379
|
-
* rethrown.
|
|
19380
|
-
*/
|
|
19381
|
-
runGuarded(fn, applyThis, applyArgs) {
|
|
19382
|
-
return this._inner.runGuarded(fn, applyThis, applyArgs);
|
|
19383
|
-
}
|
|
19384
|
-
/**
|
|
19385
|
-
* Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
|
|
19386
|
-
* the function.
|
|
19387
|
-
*
|
|
19388
|
-
* Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do
|
|
19389
|
-
* work that
|
|
19390
|
-
* doesn't trigger Angular change-detection or is subject to Angular's error handling.
|
|
19391
|
-
*
|
|
19392
|
-
* Any future tasks or microtasks scheduled from within this function will continue executing from
|
|
19393
|
-
* outside of the Angular zone.
|
|
19394
|
-
*
|
|
19395
|
-
* Use {@link #run} to reenter the Angular zone and do work that updates the application model.
|
|
19396
|
-
*/
|
|
19397
|
-
runOutsideAngular(fn) {
|
|
19398
|
-
return this._outer.run(fn);
|
|
19399
|
-
}
|
|
19400
|
-
}
|
|
19401
|
-
const EMPTY_PAYLOAD = {};
|
|
19402
|
-
function checkStable(zone) {
|
|
19403
|
-
// TODO: @JiaLiPassion, should check zone.isCheckStableRunning to prevent
|
|
19404
|
-
// re-entry. The case is:
|
|
19405
|
-
//
|
|
19406
|
-
// @Component({...})
|
|
19407
|
-
// export class AppComponent {
|
|
19408
|
-
// constructor(private ngZone: NgZone) {
|
|
19409
|
-
// this.ngZone.onStable.subscribe(() => {
|
|
19410
|
-
// this.ngZone.run(() => console.log('stable'););
|
|
19411
|
-
// });
|
|
19412
|
-
// }
|
|
19413
|
-
//
|
|
19414
|
-
// The onStable subscriber run another function inside ngZone
|
|
19415
|
-
// which causes `checkStable()` re-entry.
|
|
19416
|
-
// But this fix causes some issues in g3, so this fix will be
|
|
19417
|
-
// launched in another PR.
|
|
19418
|
-
if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {
|
|
19419
|
-
try {
|
|
19420
|
-
zone._nesting++;
|
|
19421
|
-
zone.onMicrotaskEmpty.emit(null);
|
|
19422
|
-
}
|
|
19423
|
-
finally {
|
|
19424
|
-
zone._nesting--;
|
|
19425
|
-
if (!zone.hasPendingMicrotasks) {
|
|
19426
|
-
try {
|
|
19427
|
-
zone.runOutsideAngular(() => zone.onStable.emit(null));
|
|
19428
|
-
}
|
|
19429
|
-
finally {
|
|
19430
|
-
zone.isStable = true;
|
|
19431
|
-
}
|
|
19432
|
-
}
|
|
19433
|
-
}
|
|
19434
|
-
}
|
|
19435
|
-
}
|
|
19436
|
-
function delayChangeDetectionForEvents(zone) {
|
|
19437
|
-
/**
|
|
19438
|
-
* We also need to check _nesting here
|
|
19439
|
-
* Consider the following case with shouldCoalesceRunChangeDetection = true
|
|
19440
|
-
*
|
|
19441
|
-
* ngZone.run(() => {});
|
|
19442
|
-
* ngZone.run(() => {});
|
|
19443
|
-
*
|
|
19444
|
-
* We want the two `ngZone.run()` only trigger one change detection
|
|
19445
|
-
* when shouldCoalesceRunChangeDetection is true.
|
|
19446
|
-
* And because in this case, change detection run in async way(requestAnimationFrame),
|
|
19447
|
-
* so we also need to check the _nesting here to prevent multiple
|
|
19448
|
-
* change detections.
|
|
19449
|
-
*/
|
|
19450
|
-
if (zone.isCheckStableRunning || zone.callbackScheduled) {
|
|
19451
|
-
return;
|
|
19452
|
-
}
|
|
19453
|
-
zone.callbackScheduled = true;
|
|
19454
|
-
zone.scheduleCallback.call(_global, () => {
|
|
19455
|
-
// This is a work around for https://github.com/angular/angular/issues/36839.
|
|
19456
|
-
// The core issue is that when event coalescing is enabled it is possible for microtasks
|
|
19457
|
-
// to get flushed too early (As is the case with `Promise.then`) between the
|
|
19458
|
-
// coalescing eventTasks.
|
|
19459
|
-
//
|
|
19460
|
-
// To workaround this we schedule a "fake" eventTask before we process the
|
|
19461
|
-
// coalescing eventTasks. The benefit of this is that the "fake" container eventTask
|
|
19462
|
-
// will prevent the microtasks queue from getting drained in between the coalescing
|
|
19463
|
-
// eventTask execution.
|
|
19464
|
-
if (!zone.fakeTopEventTask) {
|
|
19465
|
-
zone.fakeTopEventTask = Zone.root.scheduleEventTask('fakeTopEventTask', () => {
|
|
19466
|
-
zone.callbackScheduled = false;
|
|
19467
|
-
updateMicroTaskStatus(zone);
|
|
19468
|
-
zone.isCheckStableRunning = true;
|
|
19469
|
-
checkStable(zone);
|
|
19470
|
-
zone.isCheckStableRunning = false;
|
|
19471
|
-
}, undefined, () => { }, () => { });
|
|
19472
|
-
}
|
|
19473
|
-
zone.fakeTopEventTask.invoke();
|
|
19474
|
-
});
|
|
19475
|
-
updateMicroTaskStatus(zone);
|
|
19476
|
-
}
|
|
19477
|
-
function forkInnerZoneWithAngularBehavior(zone) {
|
|
19478
|
-
const delayChangeDetectionForEventsDelegate = () => {
|
|
19479
|
-
delayChangeDetectionForEvents(zone);
|
|
19480
|
-
};
|
|
19481
|
-
zone._inner = zone._inner.fork({
|
|
19482
|
-
name: 'angular',
|
|
19483
|
-
properties: { 'isAngularZone': true },
|
|
19484
|
-
onInvokeTask: (delegate, current, target, task, applyThis, applyArgs) => {
|
|
19485
|
-
// Prevent triggering change detection when the flag is detected.
|
|
19486
|
-
if (shouldBeIgnoredByZone(applyArgs)) {
|
|
19487
|
-
return delegate.invokeTask(target, task, applyThis, applyArgs);
|
|
19488
|
-
}
|
|
19489
|
-
try {
|
|
19490
|
-
onEnter(zone);
|
|
19491
|
-
return delegate.invokeTask(target, task, applyThis, applyArgs);
|
|
19492
|
-
}
|
|
19493
|
-
finally {
|
|
19494
|
-
if ((zone.shouldCoalesceEventChangeDetection && task.type === 'eventTask') ||
|
|
19495
|
-
zone.shouldCoalesceRunChangeDetection) {
|
|
19496
|
-
delayChangeDetectionForEventsDelegate();
|
|
19497
|
-
}
|
|
19498
|
-
onLeave(zone);
|
|
19499
|
-
}
|
|
19500
|
-
},
|
|
19501
|
-
onInvoke: (delegate, current, target, callback, applyThis, applyArgs, source) => {
|
|
19502
|
-
try {
|
|
19503
|
-
onEnter(zone);
|
|
19504
|
-
return delegate.invoke(target, callback, applyThis, applyArgs, source);
|
|
19505
|
-
}
|
|
19506
|
-
finally {
|
|
19507
|
-
if (zone.shouldCoalesceRunChangeDetection &&
|
|
19508
|
-
// Do not delay change detection when the task is the scheduler's tick.
|
|
19509
|
-
// We need to synchronously trigger the stability logic so that the
|
|
19510
|
-
// zone-based scheduler can prevent a duplicate ApplicationRef.tick
|
|
19511
|
-
// by first checking if the scheduler tick is running. This does seem a bit roundabout,
|
|
19512
|
-
// but we _do_ still want to trigger all the correct events when we exit the zone.run
|
|
19513
|
-
// (`onMicrotaskEmpty` and `onStable` _should_ emit; developers can have code which
|
|
19514
|
-
// relies on these events happening after change detection runs).
|
|
19515
|
-
// Note: `zone.callbackScheduled` is already in delayChangeDetectionForEventsDelegate
|
|
19516
|
-
// but is added here as well to prevent reads of applyArgs when not necessary
|
|
19517
|
-
!zone.callbackScheduled &&
|
|
19518
|
-
!isSchedulerTick(applyArgs)) {
|
|
19519
|
-
delayChangeDetectionForEventsDelegate();
|
|
19520
|
-
}
|
|
19521
|
-
onLeave(zone);
|
|
19522
|
-
}
|
|
19523
|
-
},
|
|
19524
|
-
onHasTask: (delegate, current, target, hasTaskState) => {
|
|
19525
|
-
delegate.hasTask(target, hasTaskState);
|
|
19526
|
-
if (current === target) {
|
|
19527
|
-
// We are only interested in hasTask events which originate from our zone
|
|
19528
|
-
// (A child hasTask event is not interesting to us)
|
|
19529
|
-
if (hasTaskState.change == 'microTask') {
|
|
19530
|
-
zone._hasPendingMicrotasks = hasTaskState.microTask;
|
|
19531
|
-
updateMicroTaskStatus(zone);
|
|
19532
|
-
checkStable(zone);
|
|
19533
|
-
}
|
|
19534
|
-
else if (hasTaskState.change == 'macroTask') {
|
|
19535
|
-
zone.hasPendingMacrotasks = hasTaskState.macroTask;
|
|
19536
|
-
}
|
|
19537
|
-
}
|
|
19538
|
-
},
|
|
19539
|
-
onHandleError: (delegate, current, target, error) => {
|
|
19540
|
-
delegate.handleError(target, error);
|
|
19541
|
-
zone.runOutsideAngular(() => zone.onError.emit(error));
|
|
19542
|
-
return false;
|
|
19543
|
-
},
|
|
19544
|
-
});
|
|
19545
|
-
}
|
|
19546
|
-
function updateMicroTaskStatus(zone) {
|
|
19547
|
-
if (zone._hasPendingMicrotasks ||
|
|
19548
|
-
((zone.shouldCoalesceEventChangeDetection || zone.shouldCoalesceRunChangeDetection) &&
|
|
19549
|
-
zone.callbackScheduled === true)) {
|
|
19550
|
-
zone.hasPendingMicrotasks = true;
|
|
19551
|
-
}
|
|
19552
|
-
else {
|
|
19553
|
-
zone.hasPendingMicrotasks = false;
|
|
19554
|
-
}
|
|
19555
|
-
}
|
|
19556
|
-
function onEnter(zone) {
|
|
19557
|
-
zone._nesting++;
|
|
19558
|
-
if (zone.isStable) {
|
|
19559
|
-
zone.isStable = false;
|
|
19560
|
-
zone.onUnstable.emit(null);
|
|
19561
|
-
}
|
|
19562
|
-
}
|
|
19563
|
-
function onLeave(zone) {
|
|
19564
|
-
zone._nesting--;
|
|
19565
|
-
checkStable(zone);
|
|
19566
|
-
}
|
|
19567
|
-
/**
|
|
19568
|
-
* Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls
|
|
19569
|
-
* to framework to perform rendering.
|
|
19570
|
-
*/
|
|
19571
|
-
class NoopNgZone {
|
|
19572
|
-
constructor() {
|
|
19573
|
-
this.hasPendingMicrotasks = false;
|
|
19574
|
-
this.hasPendingMacrotasks = false;
|
|
19575
|
-
this.isStable = true;
|
|
19576
|
-
this.onUnstable = new EventEmitter();
|
|
19577
|
-
this.onMicrotaskEmpty = new EventEmitter();
|
|
19578
|
-
this.onStable = new EventEmitter();
|
|
19579
|
-
this.onError = new EventEmitter();
|
|
19580
|
-
}
|
|
19581
|
-
run(fn, applyThis, applyArgs) {
|
|
19582
|
-
return fn.apply(applyThis, applyArgs);
|
|
19583
|
-
}
|
|
19584
|
-
runGuarded(fn, applyThis, applyArgs) {
|
|
19585
|
-
return fn.apply(applyThis, applyArgs);
|
|
19586
|
-
}
|
|
19587
|
-
runOutsideAngular(fn) {
|
|
19588
|
-
return fn();
|
|
19589
|
-
}
|
|
19590
|
-
runTask(fn, applyThis, applyArgs, name) {
|
|
19591
|
-
return fn.apply(applyThis, applyArgs);
|
|
19592
|
-
}
|
|
19593
|
-
}
|
|
19594
|
-
function shouldBeIgnoredByZone(applyArgs) {
|
|
19595
|
-
return hasApplyArgsData(applyArgs, '__ignore_ng_zone__');
|
|
19596
|
-
}
|
|
19597
|
-
function isSchedulerTick(applyArgs) {
|
|
19598
|
-
return hasApplyArgsData(applyArgs, '__scheduler_tick__');
|
|
19599
|
-
}
|
|
19600
|
-
function hasApplyArgsData(applyArgs, key) {
|
|
19601
|
-
if (!Array.isArray(applyArgs)) {
|
|
19602
|
-
return false;
|
|
19603
|
-
}
|
|
19604
|
-
// We should only ever get 1 arg passed through to invokeTask.
|
|
19605
|
-
// Short circuit here incase that behavior changes.
|
|
19606
|
-
if (applyArgs.length !== 1) {
|
|
19607
|
-
return false;
|
|
19608
|
-
}
|
|
19609
|
-
return applyArgs[0]?.data?.[key] === true;
|
|
19610
|
-
}
|
|
19611
|
-
function getNgZone(ngZoneToUse = 'zone.js', options) {
|
|
19612
|
-
if (ngZoneToUse === 'noop') {
|
|
19613
|
-
return new NoopNgZone();
|
|
19614
|
-
}
|
|
19615
|
-
if (ngZoneToUse === 'zone.js') {
|
|
19616
|
-
return new NgZone(options);
|
|
19617
|
-
}
|
|
19618
|
-
return ngZoneToUse;
|
|
19619
|
-
}
|
|
19620
|
-
|
|
19621
19606
|
// Public API for Zone
|
|
19622
19607
|
|
|
19623
19608
|
/**
|
|
@@ -20584,9 +20569,13 @@ function scheduleDelayedTrigger(scheduleFn) {
|
|
|
20584
20569
|
const lView = getLView();
|
|
20585
20570
|
const tNode = getCurrentTNode();
|
|
20586
20571
|
renderPlaceholder(lView, tNode);
|
|
20587
|
-
|
|
20588
|
-
|
|
20589
|
-
|
|
20572
|
+
// Only trigger the scheduled trigger on the browser
|
|
20573
|
+
// since we don't want to delay the server response.
|
|
20574
|
+
if (isPlatformBrowser(lView[INJECTOR])) {
|
|
20575
|
+
const cleanupFn = scheduleFn(() => triggerDeferBlock(lView, tNode), lView);
|
|
20576
|
+
const lDetails = getLDeferBlockDetails(lView, tNode);
|
|
20577
|
+
storeTriggerCleanupFn(0 /* TriggerType.Regular */, lDetails, cleanupFn);
|
|
20578
|
+
}
|
|
20590
20579
|
}
|
|
20591
20580
|
/**
|
|
20592
20581
|
* Schedules prefetching for `on idle` and `on timer` triggers.
|
|
@@ -20595,14 +20584,18 @@ function scheduleDelayedTrigger(scheduleFn) {
|
|
|
20595
20584
|
*/
|
|
20596
20585
|
function scheduleDelayedPrefetching(scheduleFn) {
|
|
20597
20586
|
const lView = getLView();
|
|
20598
|
-
|
|
20599
|
-
|
|
20600
|
-
|
|
20601
|
-
|
|
20602
|
-
const
|
|
20603
|
-
const
|
|
20604
|
-
|
|
20605
|
-
|
|
20587
|
+
// Only trigger the scheduled trigger on the browser
|
|
20588
|
+
// since we don't want to delay the server response.
|
|
20589
|
+
if (isPlatformBrowser(lView[INJECTOR])) {
|
|
20590
|
+
const tNode = getCurrentTNode();
|
|
20591
|
+
const tView = lView[TVIEW];
|
|
20592
|
+
const tDetails = getTDeferBlockDetails(tView, tNode);
|
|
20593
|
+
if (tDetails.loadingState === DeferDependenciesLoadingState.NOT_STARTED) {
|
|
20594
|
+
const lDetails = getLDeferBlockDetails(lView, tNode);
|
|
20595
|
+
const prefetch = () => triggerPrefetching(tDetails, lView, tNode);
|
|
20596
|
+
const cleanupFn = scheduleFn(prefetch, lView);
|
|
20597
|
+
storeTriggerCleanupFn(1 /* TriggerType.Prefetch */, lDetails, cleanupFn);
|
|
20598
|
+
}
|
|
20606
20599
|
}
|
|
20607
20600
|
}
|
|
20608
20601
|
/**
|
|
@@ -26373,6 +26366,16 @@ function ɵɵi18nPostprocess(message, replacements = {}) {
|
|
|
26373
26366
|
return i18nPostprocess(message, replacements);
|
|
26374
26367
|
}
|
|
26375
26368
|
|
|
26369
|
+
/**
|
|
26370
|
+
* Contains a reference to a function that disables event replay feature
|
|
26371
|
+
* for server-side rendered applications. This function is overridden with
|
|
26372
|
+
* an actual implementation when the event replay feature is enabled via
|
|
26373
|
+
* `withEventReplay()` call.
|
|
26374
|
+
*/
|
|
26375
|
+
let disableEventReplayFn = (el) => { };
|
|
26376
|
+
function setDisableEventReplayImpl(fn) {
|
|
26377
|
+
disableEventReplayFn = fn;
|
|
26378
|
+
}
|
|
26376
26379
|
/**
|
|
26377
26380
|
* Adds an event listener to the current node.
|
|
26378
26381
|
*
|
|
@@ -26477,6 +26480,7 @@ function listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn,
|
|
|
26477
26480
|
const idxOrTargetGetter = eventTargetResolver
|
|
26478
26481
|
? (_lView) => eventTargetResolver(unwrapRNode(_lView[tNode.index]))
|
|
26479
26482
|
: tNode.index;
|
|
26483
|
+
disableEventReplayFn(native);
|
|
26480
26484
|
// In order to match current behavior, native DOM event listeners must be added for all
|
|
26481
26485
|
// events (including outputs).
|
|
26482
26486
|
// There might be cases where multiple directives on the same element try to register an event
|
|
@@ -30796,7 +30800,7 @@ class Version {
|
|
|
30796
30800
|
/**
|
|
30797
30801
|
* @publicApi
|
|
30798
30802
|
*/
|
|
30799
|
-
const VERSION = new Version('18.0.0-rc.
|
|
30803
|
+
const VERSION = new Version('18.0.0-rc.1');
|
|
30800
30804
|
|
|
30801
30805
|
class Console {
|
|
30802
30806
|
log(message) {
|
|
@@ -32335,6 +32339,7 @@ class ApplicationRef {
|
|
|
32335
32339
|
this.isStable = inject(PendingTasks).hasPendingTasks.pipe(map((pending) => !pending));
|
|
32336
32340
|
this._injector = inject(EnvironmentInjector);
|
|
32337
32341
|
}
|
|
32342
|
+
/** @internal */
|
|
32338
32343
|
get allViews() {
|
|
32339
32344
|
return [...this.externalTestViews.keys(), ...this._views];
|
|
32340
32345
|
}
|
|
@@ -32477,8 +32482,10 @@ class ApplicationRef {
|
|
|
32477
32482
|
let runs = 0;
|
|
32478
32483
|
const afterRenderEffectManager = this.afterRenderEffectManager;
|
|
32479
32484
|
while (runs < MAXIMUM_REFRESH_RERUNS) {
|
|
32480
|
-
|
|
32481
|
-
|
|
32485
|
+
const isFirstPass = runs === 0;
|
|
32486
|
+
// Some notifications to run a `tick` will only trigger render hooks. so we skip refreshing views the first time through.
|
|
32487
|
+
// After the we execute render hooks in the first pass, we loop while views are marked dirty and should refresh them.
|
|
32488
|
+
if (refreshViews || !isFirstPass) {
|
|
32482
32489
|
this.beforeRender.next(isFirstPass);
|
|
32483
32490
|
for (let { _lView, notifyErrorHandler } of this._views) {
|
|
32484
32491
|
detectChangesInViewIfRequired(_lView, notifyErrorHandler, isFirstPass, this.zonelessEnabled);
|
|
@@ -32826,9 +32833,9 @@ class ChangeDetectionSchedulerImpl {
|
|
|
32826
32833
|
this.subscriptions = new Subscription();
|
|
32827
32834
|
this.cancelScheduledCallback = null;
|
|
32828
32835
|
this.shouldRefreshViews = false;
|
|
32829
|
-
this.pendingRenderTaskId = null;
|
|
32830
32836
|
this.useMicrotaskScheduler = false;
|
|
32831
32837
|
this.runningTick = false;
|
|
32838
|
+
this.pendingRenderTaskId = null;
|
|
32832
32839
|
this.subscriptions.add(this.appRef.afterTick.subscribe(() => {
|
|
32833
32840
|
// If the scheduler isn't running a tick but the application ticked, that means
|
|
32834
32841
|
// someone called ApplicationRef.tick manually. In this case, we should cancel
|
|
@@ -32906,13 +32913,13 @@ class ChangeDetectionSchedulerImpl {
|
|
|
32906
32913
|
Zone.root.run(() => {
|
|
32907
32914
|
this.cancelScheduledCallback = scheduleCallback(() => {
|
|
32908
32915
|
this.tick(this.shouldRefreshViews);
|
|
32909
|
-
}
|
|
32916
|
+
});
|
|
32910
32917
|
});
|
|
32911
32918
|
}
|
|
32912
32919
|
else {
|
|
32913
32920
|
this.cancelScheduledCallback = scheduleCallback(() => {
|
|
32914
32921
|
this.tick(this.shouldRefreshViews);
|
|
32915
|
-
}
|
|
32922
|
+
});
|
|
32916
32923
|
}
|
|
32917
32924
|
}
|
|
32918
32925
|
shouldScheduleTick() {
|
|
@@ -32925,7 +32932,7 @@ class ChangeDetectionSchedulerImpl {
|
|
|
32925
32932
|
}
|
|
32926
32933
|
// If we're inside the zone don't bother with scheduler. Zone will stabilize
|
|
32927
32934
|
// eventually and run change detection.
|
|
32928
|
-
if (this.zoneIsDefined && NgZone.isInAngularZone()) {
|
|
32935
|
+
if (!this.zonelessEnabled && this.zoneIsDefined && NgZone.isInAngularZone()) {
|
|
32929
32936
|
return false;
|
|
32930
32937
|
}
|
|
32931
32938
|
return true;
|
|
@@ -33053,6 +33060,7 @@ class NgZoneChangeDetectionScheduler {
|
|
|
33053
33060
|
this.zone = inject(NgZone);
|
|
33054
33061
|
this.changeDetectionScheduler = inject(ChangeDetectionScheduler, { optional: true });
|
|
33055
33062
|
this.applicationRef = inject(ApplicationRef);
|
|
33063
|
+
this.zonelessEnabled = inject(ZONELESS_ENABLED);
|
|
33056
33064
|
}
|
|
33057
33065
|
initialize() {
|
|
33058
33066
|
if (this._onMicrotaskEmptySubscription) {
|
|
@@ -33088,6 +33096,7 @@ class NgZoneChangeDetectionScheduler {
|
|
|
33088
33096
|
*/
|
|
33089
33097
|
const PROVIDED_NG_ZONE = new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'provideZoneChangeDetection token' : '');
|
|
33090
33098
|
function internalProvideZoneChangeDetection({ ngZoneFactory, ignoreChangesOutsideZone, }) {
|
|
33099
|
+
ngZoneFactory ??= () => new NgZone(getNgZoneOptions());
|
|
33091
33100
|
return [
|
|
33092
33101
|
{ provide: NgZone, useFactory: ngZoneFactory },
|
|
33093
33102
|
{
|
|
@@ -33165,7 +33174,7 @@ function provideZoneChangeDetection(options) {
|
|
|
33165
33174
|
});
|
|
33166
33175
|
return makeEnvironmentProviders([
|
|
33167
33176
|
typeof ngDevMode === 'undefined' || ngDevMode
|
|
33168
|
-
? { provide: PROVIDED_NG_ZONE, useValue: true }
|
|
33177
|
+
? [{ provide: PROVIDED_NG_ZONE, useValue: true }, bothZoneAndZonelessErrorCheckProvider]
|
|
33169
33178
|
: [],
|
|
33170
33179
|
zoneProviders,
|
|
33171
33180
|
]);
|
|
@@ -33226,6 +33235,18 @@ class ZoneStablePendingTask {
|
|
|
33226
33235
|
type: Injectable,
|
|
33227
33236
|
args: [{ providedIn: 'root' }]
|
|
33228
33237
|
}], null, null); })();
|
|
33238
|
+
const bothZoneAndZonelessErrorCheckProvider = {
|
|
33239
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
33240
|
+
multi: true,
|
|
33241
|
+
useFactory: () => {
|
|
33242
|
+
const providedZoneless = inject(ZONELESS_ENABLED, { optional: true });
|
|
33243
|
+
if (providedZoneless) {
|
|
33244
|
+
throw new RuntimeError(408 /* RuntimeErrorCode.PROVIDED_BOTH_ZONE_AND_ZONELESS */, 'Invalid change detection configuration: ' +
|
|
33245
|
+
'provideZoneChangeDetection and provideExperimentalZonelessChangeDetection cannot be used together.');
|
|
33246
|
+
}
|
|
33247
|
+
return () => { };
|
|
33248
|
+
},
|
|
33249
|
+
};
|
|
33229
33250
|
|
|
33230
33251
|
/**
|
|
33231
33252
|
* Work out the locale from the potential global properties.
|
|
@@ -33451,6 +33472,12 @@ class PlatformRef {
|
|
|
33451
33472
|
moduleRef.injector.get(PROVIDED_NG_ZONE, null) !== null) {
|
|
33452
33473
|
throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, '`bootstrapModule` does not support `provideZoneChangeDetection`. Use `BootstrapOptions` instead.');
|
|
33453
33474
|
}
|
|
33475
|
+
if ((typeof ngDevMode === 'undefined' || ngDevMode) &&
|
|
33476
|
+
moduleRef.injector.get(ZONELESS_ENABLED, null) &&
|
|
33477
|
+
options?.ngZone !== 'noop') {
|
|
33478
|
+
throw new RuntimeError(408 /* RuntimeErrorCode.PROVIDED_BOTH_ZONE_AND_ZONELESS */, 'Invalid change detection configuration: ' +
|
|
33479
|
+
"`ngZone: 'noop'` must be set in `BootstrapOptions` with provideExperimentalZonelessChangeDetection.");
|
|
33480
|
+
}
|
|
33454
33481
|
const exceptionHandler = moduleRef.injector.get(ErrorHandler, null);
|
|
33455
33482
|
if ((typeof ngDevMode === 'undefined' || ngDevMode) && exceptionHandler === null) {
|
|
33456
33483
|
throw new RuntimeError(402 /* RuntimeErrorCode.MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP */, 'No ErrorHandler. Is platform module (BrowserModule) included?');
|
|
@@ -33684,6 +33711,138 @@ function runPlatformInitializers(injector) {
|
|
|
33684
33711
|
inits?.forEach((init) => init());
|
|
33685
33712
|
}
|
|
33686
33713
|
|
|
33714
|
+
/**
|
|
33715
|
+
* Used to periodically verify no expressions have changed after they were checked.
|
|
33716
|
+
*
|
|
33717
|
+
* @param options Used to configure when the check will execute.
|
|
33718
|
+
* - `interval` will periodically run exhaustive `checkNoChanges` on application views
|
|
33719
|
+
* - `useNgZoneOnStable` will us ZoneJS to determine when change detection might have run
|
|
33720
|
+
* in an application using ZoneJS to drive change detection. When the `NgZone.onStable` would
|
|
33721
|
+
* have emit, all views attached to the `ApplicationRef` are checked for changes.
|
|
33722
|
+
* - 'exhaustive' means that all views attached to `ApplicationRef` and all the descendants of those views will be
|
|
33723
|
+
* checked for changes (excluding those subtrees which are detached via `ChangeDetectorRef.detach()`).
|
|
33724
|
+
* This is useful because the check that runs after regular change detection does not work for components using `ChangeDetectionStrategy.OnPush`.
|
|
33725
|
+
* This check is will surface any existing errors hidden by `OnPush` components. By default, this check is exhaustive
|
|
33726
|
+
* and will always check all views, regardless of their "dirty" state and `ChangeDetectionStrategy`.
|
|
33727
|
+
*
|
|
33728
|
+
* When the `useNgZoneOnStable` option is `true`, this function will provide its own `NgZone` implementation and needs
|
|
33729
|
+
* to come after any other `NgZone` provider, including `provideZoneChangeDetection()` and `provideExperimentalZonelessChangeDetection()`.
|
|
33730
|
+
*
|
|
33731
|
+
* @experimental
|
|
33732
|
+
* @publicApi
|
|
33733
|
+
*/
|
|
33734
|
+
function provideExperimentalCheckNoChangesForDebug(options) {
|
|
33735
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
33736
|
+
if (options.interval === undefined && !options.useNgZoneOnStable) {
|
|
33737
|
+
throw new Error('Must provide one of `useNgZoneOnStable` or `interval`');
|
|
33738
|
+
}
|
|
33739
|
+
const checkNoChangesMode = options?.exhaustive === false
|
|
33740
|
+
? CheckNoChangesMode.OnlyDirtyViews
|
|
33741
|
+
: CheckNoChangesMode.Exhaustive;
|
|
33742
|
+
return makeEnvironmentProviders([
|
|
33743
|
+
options?.useNgZoneOnStable
|
|
33744
|
+
? { provide: NgZone, useFactory: () => new DebugNgZoneForCheckNoChanges(checkNoChangesMode) }
|
|
33745
|
+
: [],
|
|
33746
|
+
options?.interval !== undefined
|
|
33747
|
+
? exhaustiveCheckNoChangesInterval(options.interval, checkNoChangesMode)
|
|
33748
|
+
: [],
|
|
33749
|
+
{
|
|
33750
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
33751
|
+
multi: true,
|
|
33752
|
+
useValue: () => {
|
|
33753
|
+
if (options?.useNgZoneOnStable &&
|
|
33754
|
+
!(inject(NgZone) instanceof DebugNgZoneForCheckNoChanges)) {
|
|
33755
|
+
throw new Error('`provideCheckNoChangesForDebug` with `useNgZoneOnStable` must be after any other provider for `NgZone`.');
|
|
33756
|
+
}
|
|
33757
|
+
},
|
|
33758
|
+
},
|
|
33759
|
+
]);
|
|
33760
|
+
}
|
|
33761
|
+
else {
|
|
33762
|
+
return makeEnvironmentProviders([]);
|
|
33763
|
+
}
|
|
33764
|
+
}
|
|
33765
|
+
class DebugNgZoneForCheckNoChanges extends NgZone {
|
|
33766
|
+
constructor(checkNoChangesMode) {
|
|
33767
|
+
const zonelessEnabled = inject(ZONELESS_ENABLED);
|
|
33768
|
+
// Use coalsecing to ensure we aren't ever running this check synchronously
|
|
33769
|
+
super({
|
|
33770
|
+
shouldCoalesceEventChangeDetection: true,
|
|
33771
|
+
shouldCoalesceRunChangeDetection: zonelessEnabled,
|
|
33772
|
+
});
|
|
33773
|
+
this.checkNoChangesMode = checkNoChangesMode;
|
|
33774
|
+
this.injector = inject(EnvironmentInjector);
|
|
33775
|
+
if (zonelessEnabled) {
|
|
33776
|
+
// prevent emits to ensure code doesn't rely on these
|
|
33777
|
+
this.onMicrotaskEmpty.emit = () => { };
|
|
33778
|
+
this.onStable.emit = () => {
|
|
33779
|
+
this.scheduler ||= this.injector.get(ChangeDetectionSchedulerImpl);
|
|
33780
|
+
if (this.scheduler.pendingRenderTaskId || this.scheduler.runningTick) {
|
|
33781
|
+
return;
|
|
33782
|
+
}
|
|
33783
|
+
this.checkApplicationViews();
|
|
33784
|
+
};
|
|
33785
|
+
this.onUnstable.emit = () => { };
|
|
33786
|
+
}
|
|
33787
|
+
else {
|
|
33788
|
+
this.runOutsideAngular(() => {
|
|
33789
|
+
this.onStable.subscribe(() => {
|
|
33790
|
+
this.checkApplicationViews();
|
|
33791
|
+
});
|
|
33792
|
+
});
|
|
33793
|
+
}
|
|
33794
|
+
}
|
|
33795
|
+
checkApplicationViews() {
|
|
33796
|
+
this.applicationRef ||= this.injector.get(ApplicationRef);
|
|
33797
|
+
for (const view of this.applicationRef.allViews) {
|
|
33798
|
+
try {
|
|
33799
|
+
checkNoChangesInternal(view._lView, this.checkNoChangesMode, view.notifyErrorHandler);
|
|
33800
|
+
}
|
|
33801
|
+
catch (e) {
|
|
33802
|
+
this.errorHandler ||= this.injector.get(ErrorHandler);
|
|
33803
|
+
this.errorHandler.handleError(e);
|
|
33804
|
+
}
|
|
33805
|
+
}
|
|
33806
|
+
}
|
|
33807
|
+
}
|
|
33808
|
+
function exhaustiveCheckNoChangesInterval(interval, checkNoChangesMode) {
|
|
33809
|
+
return {
|
|
33810
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
33811
|
+
multi: true,
|
|
33812
|
+
useFactory: () => {
|
|
33813
|
+
const applicationRef = inject(ApplicationRef);
|
|
33814
|
+
const errorHandler = inject(ErrorHandler);
|
|
33815
|
+
const scheduler = inject(ChangeDetectionSchedulerImpl);
|
|
33816
|
+
const ngZone = inject(NgZone);
|
|
33817
|
+
return () => {
|
|
33818
|
+
function scheduleCheckNoChanges() {
|
|
33819
|
+
ngZone.runOutsideAngular(() => {
|
|
33820
|
+
setTimeout(() => {
|
|
33821
|
+
if (applicationRef.destroyed) {
|
|
33822
|
+
return;
|
|
33823
|
+
}
|
|
33824
|
+
if (scheduler.pendingRenderTaskId || scheduler.runningTick) {
|
|
33825
|
+
scheduleCheckNoChanges();
|
|
33826
|
+
return;
|
|
33827
|
+
}
|
|
33828
|
+
for (const view of applicationRef.allViews) {
|
|
33829
|
+
try {
|
|
33830
|
+
checkNoChangesInternal(view._lView, checkNoChangesMode, view.notifyErrorHandler);
|
|
33831
|
+
}
|
|
33832
|
+
catch (e) {
|
|
33833
|
+
errorHandler.handleError(e);
|
|
33834
|
+
}
|
|
33835
|
+
}
|
|
33836
|
+
scheduleCheckNoChanges();
|
|
33837
|
+
}, interval);
|
|
33838
|
+
});
|
|
33839
|
+
}
|
|
33840
|
+
scheduleCheckNoChanges();
|
|
33841
|
+
};
|
|
33842
|
+
},
|
|
33843
|
+
};
|
|
33844
|
+
}
|
|
33845
|
+
|
|
33687
33846
|
/**
|
|
33688
33847
|
* Returns whether Angular is in development mode.
|
|
33689
33848
|
*
|
|
@@ -36279,7 +36438,7 @@ function internalCreateApplication(config) {
|
|
|
36279
36438
|
const platformInjector = createOrReusePlatformInjector(platformProviders);
|
|
36280
36439
|
// Create root application injector based on a set of providers configured at the platform
|
|
36281
36440
|
// bootstrap level as well as providers passed to the bootstrap call by a user.
|
|
36282
|
-
const allAppProviders = [
|
|
36441
|
+
const allAppProviders = [internalProvideZoneChangeDetection({}), ...(appProviders || [])];
|
|
36283
36442
|
const adapter = new EnvironmentNgModuleRefAdapter({
|
|
36284
36443
|
providers: allAppProviders,
|
|
36285
36444
|
parent: platformInjector,
|
|
@@ -36375,6 +36534,8 @@ function getDeferBlocks(lView, deferBlocks) {
|
|
|
36375
36534
|
|
|
36376
36535
|
const EVENT_REPLAY_ENABLED_DEFAULT = false;
|
|
36377
36536
|
const CONTRACT_PROPERTY = 'ngContracts';
|
|
36537
|
+
const JSACTION_ATTRIBUTE = 'jsaction';
|
|
36538
|
+
const removeJsactionQueue = [];
|
|
36378
36539
|
/**
|
|
36379
36540
|
* Returns a set of providers required to setup support for event replay.
|
|
36380
36541
|
* Requires hydration to be enabled separately.
|
|
@@ -36385,6 +36546,19 @@ function withEventReplay() {
|
|
|
36385
36546
|
provide: IS_EVENT_REPLAY_ENABLED,
|
|
36386
36547
|
useValue: true,
|
|
36387
36548
|
},
|
|
36549
|
+
{
|
|
36550
|
+
provide: ENVIRONMENT_INITIALIZER,
|
|
36551
|
+
useValue: () => {
|
|
36552
|
+
setDisableEventReplayImpl((el) => {
|
|
36553
|
+
if (el.hasAttribute(JSACTION_ATTRIBUTE)) {
|
|
36554
|
+
// We don't immediately remove the attribute here because
|
|
36555
|
+
// we need it for replay that happens after hydration.
|
|
36556
|
+
removeJsactionQueue.push(el);
|
|
36557
|
+
}
|
|
36558
|
+
});
|
|
36559
|
+
},
|
|
36560
|
+
multi: true,
|
|
36561
|
+
},
|
|
36388
36562
|
{
|
|
36389
36563
|
provide: APP_BOOTSTRAP_LISTENER,
|
|
36390
36564
|
useFactory: () => {
|
|
@@ -36406,6 +36580,10 @@ function withEventReplay() {
|
|
|
36406
36580
|
setEventReplayer(dispatcher);
|
|
36407
36581
|
// Event replay is kicked off as a side-effect of executing this function.
|
|
36408
36582
|
registerDispatcher(eventContract, dispatcher);
|
|
36583
|
+
for (const el of removeJsactionQueue) {
|
|
36584
|
+
el.removeAttribute(JSACTION_ATTRIBUTE);
|
|
36585
|
+
}
|
|
36586
|
+
removeJsactionQueue.length = 0;
|
|
36409
36587
|
}
|
|
36410
36588
|
});
|
|
36411
36589
|
};
|
|
@@ -36460,7 +36638,7 @@ function setJSActionAttribute(tNode, rNode, nativeElementToEvents) {
|
|
|
36460
36638
|
const events = nativeElementToEvents.get(nativeElement) ?? [];
|
|
36461
36639
|
const parts = events.map((event) => `${event}:`);
|
|
36462
36640
|
if (parts.length > 0) {
|
|
36463
|
-
nativeElement.setAttribute(
|
|
36641
|
+
nativeElement.setAttribute(JSACTION_ATTRIBUTE, parts.join(';'));
|
|
36464
36642
|
}
|
|
36465
36643
|
}
|
|
36466
36644
|
}
|
|
@@ -37853,5 +38031,5 @@ if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
|
37853
38031
|
* Generated bundle index. Do not edit.
|
|
37854
38032
|
*/
|
|
37855
38033
|
|
|
37856
|
-
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, ExperimentalPendingTasks, 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, Pipe, PlatformRef, Query, QueryList, Renderer2, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, TransferState, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, afterNextRender, afterRender, 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, makeEnvironmentProviders, makeStateKey, mergeApplicationConfig, model, numberAttribute, output, platformCore, provideExperimentalZonelessChangeDetection, provideZoneChangeDetection, reflectComponentType, resolveForwardRef, runInInjectionContext, setTestabilityGetter, signal, untracked, viewChild, viewChildren, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, AfterRenderEventManager as ɵAfterRenderEventManager, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ChangeDetectionScheduler as ɵChangeDetectionScheduler, 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, 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, IS_HYDRATION_DOM_REUSE_ENABLED as ɵIS_HYDRATION_DOM_REUSE_ENABLED, LContext as ɵLContext, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, 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, PendingTasks as ɵPendingTasks, 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, 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, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, formatRuntimeError as ɵformatRuntimeError, generateStandaloneInDeclarationsError as ɵgenerateStandaloneInDeclarationsError, getAsyncClassMetadataFn as ɵgetAsyncClassMetadataFn, getDebugNode as ɵgetDebugNode, getDeferBlocks 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, internalAfterNextRender as ɵinternalAfterNextRender, internalCreateApplication as ɵinternalCreateApplication, isBoundToModule as ɵisBoundToModule, isComponentDefPendingResolution as ɵisComponentDefPendingResolution, isEnvironmentProviders as ɵisEnvironmentProviders, isInjectable as ɵisInjectable, isNgModule as ɵisNgModule, isPromise as ɵisPromise, isSubscribable as ɵisSubscribable, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, performanceMarkFeature as ɵperformanceMarkFeature, queueStateUpdate as ɵqueueStateUpdate, 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, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, triggerResourceLoading as ɵtriggerResourceLoading, truncateMiddle as ɵtruncateMiddle, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵunwrapWritableSignal, whenStable as ɵwhenStable, withDomHydration as ɵwithDomHydration, withEventReplay as ɵwithEventReplay, withI18nSupport as ɵwithI18nSupport, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵInputTransformsFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵStandaloneFeature, ɵɵadvance, ɵɵ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, ɵɵdefer, ɵɵdeferEnableTimerScheduling, ɵɵ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, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵrepeater, ɵɵrepeaterCreate, ɵɵrepeaterTrackByIdentity, ɵɵrepeaterTrackByIndex, ɵɵresetView, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵ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 };
|
|
38034
|
+
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, ExperimentalPendingTasks, 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, Pipe, PlatformRef, Query, QueryList, Renderer2, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, TransferState, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef, afterNextRender, afterRender, 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, makeEnvironmentProviders, makeStateKey, mergeApplicationConfig, model, numberAttribute, output, platformCore, provideExperimentalCheckNoChangesForDebug, provideExperimentalZonelessChangeDetection, provideZoneChangeDetection, reflectComponentType, resolveForwardRef, runInInjectionContext, setTestabilityGetter, signal, untracked, viewChild, viewChildren, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, AfterRenderEventManager as ɵAfterRenderEventManager, CONTAINER_HEADER_OFFSET as ɵCONTAINER_HEADER_OFFSET, ChangeDetectionScheduler as ɵChangeDetectionScheduler, 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, 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, IS_HYDRATION_DOM_REUSE_ENABLED as ɵIS_HYDRATION_DOM_REUSE_ENABLED, LContext as ɵLContext, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, 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, PendingTasks as ɵPendingTasks, 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, 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, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, formatRuntimeError as ɵformatRuntimeError, generateStandaloneInDeclarationsError as ɵgenerateStandaloneInDeclarationsError, getAsyncClassMetadataFn as ɵgetAsyncClassMetadataFn, getDebugNode as ɵgetDebugNode, getDeferBlocks 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, internalAfterNextRender as ɵinternalAfterNextRender, 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, noSideEffects as ɵnoSideEffects, patchComponentDefWithScope as ɵpatchComponentDefWithScope, performanceMarkFeature as ɵperformanceMarkFeature, queueStateUpdate as ɵqueueStateUpdate, 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, store as ɵstore, stringify as ɵstringify, transitiveScopesFor as ɵtransitiveScopesFor, triggerResourceLoading as ɵtriggerResourceLoading, truncateMiddle as ɵtruncateMiddle, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapSafeValue as ɵunwrapSafeValue, ɵunwrapWritableSignal, whenStable as ɵwhenStable, withDomHydration as ɵwithDomHydration, withEventReplay as ɵwithEventReplay, withI18nSupport as ɵwithI18nSupport, ɵɵCopyDefinitionFeature, FactoryTarget as ɵɵFactoryTarget, ɵɵHostDirectivesFeature, ɵɵInheritDefinitionFeature, ɵɵInputTransformsFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵStandaloneFeature, ɵɵadvance, ɵɵ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, ɵɵdefer, ɵɵdeferEnableTimerScheduling, ɵɵ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, ɵɵreference, registerNgModuleType as ɵɵregisterNgModuleType, ɵɵrepeater, ɵɵrepeaterCreate, ɵɵrepeaterTrackByIdentity, ɵɵrepeaterTrackByIndex, ɵɵresetView, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵ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 };
|
|
37857
38035
|
//# sourceMappingURL=core.mjs.map
|