@angular/core 16.1.0 → 16.1.2
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/rxjs-interop/src/to_signal.mjs +1 -1
- package/esm2022/src/application_init.mjs +2 -2
- package/esm2022/src/application_tokens.mjs +2 -2
- package/esm2022/src/change_detection/change_detector_ref.mjs +1 -1
- package/esm2022/src/change_detection/differs/default_iterable_differ.mjs +2 -1
- package/esm2022/src/di/forward_ref.mjs +2 -2
- package/esm2022/src/di/injector.mjs +2 -2
- package/esm2022/src/di/interface/provider.mjs +1 -1
- package/esm2022/src/di/metadata.mjs +1 -1
- package/esm2022/src/i18n/locale_data_api.mjs +2 -2
- package/esm2022/src/interface/lifecycle_hooks.mjs +1 -1
- package/esm2022/src/interface/simple_change.mjs +2 -2
- package/esm2022/src/linker/template_ref.mjs +2 -2
- package/esm2022/src/linker/view_container_ref.mjs +3 -3
- package/esm2022/src/linker/view_ref.mjs +2 -2
- package/esm2022/src/metadata/di.mjs +5 -5
- package/esm2022/src/metadata/schema.mjs +1 -1
- package/esm2022/src/render/api.mjs +8 -1
- package/esm2022/src/render3/view_ref.mjs +6 -6
- package/esm2022/src/testability/testability.mjs +3 -4
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/src/zone/ng_zone.mjs +2 -3
- package/esm2022/testing/src/component_fixture.mjs +2 -5
- package/esm2022/testing/src/logger.mjs +3 -3
- package/fesm2022/core.mjs +32 -37
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +23 -19
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +50 -49
- package/package.json +1 -1
- package/rxjs-interop/index.d.ts +6 -5
- package/schematics/migrations/guard-and-resolve-interfaces/bundle.js +13 -13
- package/schematics/migrations/remove-module-id/bundle.js +14 -14
- package/schematics/ng-generate/standalone-migration/bundle.js +403 -392
- package/schematics/ng-generate/standalone-migration/bundle.js.map +3 -3
- package/testing/index.d.ts +1 -1
- package/esm2022/src/util/microtask.mjs +0 -20
|
@@ -25,10 +25,10 @@ export class Log {
|
|
|
25
25
|
result() {
|
|
26
26
|
return this.logItems.join('; ');
|
|
27
27
|
}
|
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.
|
|
29
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.
|
|
28
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: Log, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
29
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: Log }); }
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: Log, decorators: [{
|
|
32
32
|
type: Injectable
|
|
33
33
|
}], ctorParameters: function () { return []; } });
|
|
34
34
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY29yZS90ZXN0aW5nL3NyYy9sb2dnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLGVBQWUsQ0FBQzs7QUFHekMsTUFBTSxPQUFPLEdBQUc7SUFHZDtRQUNFLElBQUksQ0FBQyxRQUFRLEdBQUcsRUFBRSxDQUFDO0lBQ3JCLENBQUM7SUFFRCxHQUFHLEN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JdGVtcy5wdXNoKHZhbHVlKTtcbiAgfVxuXG4gIGZuKHZhbHVlOiBUKSB7XG4gICAgcmV0dXJuICgpID0+IHtcbiAgICAgIHRoaXMubG9nSXRlbXMucHVzaCh2YWx1ZSk7XG4gICAgfTtcbiAgfVxuXG4gIGNsZWFyKCk6IHZvaWQge1xuICAgIHRoaXMubG9nSXRlbXMgPSBbXTtcbiAgfVxuXG4gIHJlc3VsdCgpOiBzdHJpbmcge1xuICAgIHJldHVybiB0aGlzLmxvZ0l0ZW1zLmpvaW4oJzsgJyk7XG4gIH1cbn1cbiJdfQ==
|
package/fesm2022/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.1.
|
|
2
|
+
* @license Angular v16.1.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -123,7 +123,7 @@ function forwardRef(forwardRefFn) {
|
|
|
123
123
|
*
|
|
124
124
|
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
|
|
125
125
|
*
|
|
126
|
-
* @see
|
|
126
|
+
* @see {@link forwardRef}
|
|
127
127
|
* @publicApi
|
|
128
128
|
*/
|
|
129
129
|
function resolveForwardRef(type) {
|
|
@@ -2766,7 +2766,7 @@ class Watch extends ReactiveNode {
|
|
|
2766
2766
|
* property on a directive instance. Passed as a value in a
|
|
2767
2767
|
* {@link SimpleChanges} object to the `ngOnChanges` hook.
|
|
2768
2768
|
*
|
|
2769
|
-
* @see
|
|
2769
|
+
* @see {@link OnChanges}
|
|
2770
2770
|
*
|
|
2771
2771
|
* @publicApi
|
|
2772
2772
|
*/
|
|
@@ -4989,10 +4989,10 @@ const emitDistinctChangesOnlyDefaultValue = true;
|
|
|
4989
4989
|
/**
|
|
4990
4990
|
* Base class for query metadata.
|
|
4991
4991
|
*
|
|
4992
|
-
* @see
|
|
4993
|
-
* @see
|
|
4994
|
-
* @see
|
|
4995
|
-
* @see
|
|
4992
|
+
* @see {@link ContentChildren}.
|
|
4993
|
+
* @see {@link ContentChild}.
|
|
4994
|
+
* @see {@link ViewChildren}.
|
|
4995
|
+
* @see {@link ViewChild}.
|
|
4996
4996
|
*
|
|
4997
4997
|
* @publicApi
|
|
4998
4998
|
*/
|
|
@@ -9436,7 +9436,7 @@ function forEachSingleProvider(providers, fn) {
|
|
|
9436
9436
|
/**
|
|
9437
9437
|
* A [DI token](guide/glossary#di-token "DI token definition") representing a string ID, used
|
|
9438
9438
|
* primarily for prefixing application attributes and CSS styles when
|
|
9439
|
-
* {@link ViewEncapsulation#Emulated
|
|
9439
|
+
* {@link ViewEncapsulation#Emulated} is being used.
|
|
9440
9440
|
*
|
|
9441
9441
|
* The token is needed in cases when multiple applications are bootstrapped on a page
|
|
9442
9442
|
* (for example, using `bootstrapApplication` calls). In this case, ensure that those applications
|
|
@@ -10036,6 +10036,13 @@ class RendererFactory2 {
|
|
|
10036
10036
|
* @publicApi
|
|
10037
10037
|
*/
|
|
10038
10038
|
class Renderer2 {
|
|
10039
|
+
constructor() {
|
|
10040
|
+
/**
|
|
10041
|
+
* If null or undefined, the view engine won't call it.
|
|
10042
|
+
* This is used as a performance optimization for production mode.
|
|
10043
|
+
*/
|
|
10044
|
+
this.destroyNode = null;
|
|
10045
|
+
}
|
|
10039
10046
|
/**
|
|
10040
10047
|
* @internal
|
|
10041
10048
|
* @nocollapse
|
|
@@ -10082,7 +10089,7 @@ class Version {
|
|
|
10082
10089
|
/**
|
|
10083
10090
|
* @publicApi
|
|
10084
10091
|
*/
|
|
10085
|
-
const VERSION = new Version('16.1.
|
|
10092
|
+
const VERSION = new Version('16.1.2');
|
|
10086
10093
|
|
|
10087
10094
|
// This default value is when checking the hierarchy for a token.
|
|
10088
10095
|
//
|
|
@@ -10680,7 +10687,7 @@ function createInjectorWithoutInjectorInstances(defType, parent = null, addition
|
|
|
10680
10687
|
* dependencies of various types with [injection tokens](guide/glossary#di-token).
|
|
10681
10688
|
*
|
|
10682
10689
|
* @see ["DI Providers"](guide/dependency-injection-providers).
|
|
10683
|
-
* @see
|
|
10690
|
+
* @see {@link StaticProvider}
|
|
10684
10691
|
*
|
|
10685
10692
|
* @usageNotes
|
|
10686
10693
|
*
|
|
@@ -12713,7 +12720,7 @@ class ViewRef$1 {
|
|
|
12713
12720
|
/**
|
|
12714
12721
|
* Marks a view and all of its ancestors dirty.
|
|
12715
12722
|
*
|
|
12716
|
-
* This can be used to ensure an {@link ChangeDetectionStrategy#OnPush
|
|
12723
|
+
* This can be used to ensure an {@link ChangeDetectionStrategy#OnPush} component is
|
|
12717
12724
|
* checked when it needs to be re-rendered but the two normal triggers haven't marked it
|
|
12718
12725
|
* dirty (i.e. inputs haven't changed and events haven't fired in the view).
|
|
12719
12726
|
*
|
|
@@ -12749,7 +12756,7 @@ class ViewRef$1 {
|
|
|
12749
12756
|
*
|
|
12750
12757
|
* Detached views will not be checked during change detection runs until they are
|
|
12751
12758
|
* re-attached, even if they are dirty. `detach` can be used in combination with
|
|
12752
|
-
* {@link ChangeDetectorRef#detectChanges
|
|
12759
|
+
* {@link ChangeDetectorRef#detectChanges} to implement local change
|
|
12753
12760
|
* detection checks.
|
|
12754
12761
|
*
|
|
12755
12762
|
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
@@ -12804,7 +12811,7 @@ class ViewRef$1 {
|
|
|
12804
12811
|
* Re-attaches a view to the change detection tree.
|
|
12805
12812
|
*
|
|
12806
12813
|
* This can be used to re-attach views that were previously detached from the tree
|
|
12807
|
-
* using {@link ChangeDetectorRef#detach
|
|
12814
|
+
* using {@link ChangeDetectorRef#detach}. Views are attached to the tree by default.
|
|
12808
12815
|
*
|
|
12809
12816
|
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
12810
12817
|
*
|
|
@@ -12862,7 +12869,7 @@ class ViewRef$1 {
|
|
|
12862
12869
|
/**
|
|
12863
12870
|
* Checks the view and its children.
|
|
12864
12871
|
*
|
|
12865
|
-
* This can also be used in combination with {@link ChangeDetectorRef#detach
|
|
12872
|
+
* This can also be used in combination with {@link ChangeDetectorRef#detach} to implement
|
|
12866
12873
|
* local change detection checks.
|
|
12867
12874
|
*
|
|
12868
12875
|
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
@@ -12878,7 +12885,7 @@ class ViewRef$1 {
|
|
|
12878
12885
|
* We can do that by detaching the component's change detector and doing a local change detection
|
|
12879
12886
|
* check every five seconds.
|
|
12880
12887
|
*
|
|
12881
|
-
* See {@link ChangeDetectorRef#detach
|
|
12888
|
+
* See {@link ChangeDetectorRef#detach} for more information.
|
|
12882
12889
|
*/
|
|
12883
12890
|
detectChanges() {
|
|
12884
12891
|
detectChangesInternal(this._lView[TVIEW], this._lView, this.context);
|
|
@@ -19327,7 +19334,7 @@ function getLocaleCurrencyCode(locale) {
|
|
|
19327
19334
|
* for a given locale.
|
|
19328
19335
|
* @param locale A locale code for the locale format rules to use.
|
|
19329
19336
|
* @returns The plural function for the locale.
|
|
19330
|
-
* @see
|
|
19337
|
+
* @see {@link NgPlural}
|
|
19331
19338
|
* @see [Internationalization (i18n) Guide](/guide/i18n-overview)
|
|
19332
19339
|
*/
|
|
19333
19340
|
function getLocalePluralCase(locale) {
|
|
@@ -22930,7 +22937,7 @@ class QueryList {
|
|
|
22930
22937
|
* You can also use a `Query` to find a `TemplateRef` associated with
|
|
22931
22938
|
* a component or a directive.
|
|
22932
22939
|
*
|
|
22933
|
-
* @see
|
|
22940
|
+
* @see {@link ViewContainerRef}
|
|
22934
22941
|
* @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)
|
|
22935
22942
|
*
|
|
22936
22943
|
* @publicApi
|
|
@@ -23170,8 +23177,8 @@ function findMatchingDehydratedView(lContainer, template) {
|
|
|
23170
23177
|
* A view container instance can contain other view containers,
|
|
23171
23178
|
* creating a [view hierarchy](guide/glossary#view-hierarchy).
|
|
23172
23179
|
*
|
|
23173
|
-
* @see
|
|
23174
|
-
* @see
|
|
23180
|
+
* @see {@link ComponentRef}
|
|
23181
|
+
* @see {@link EmbeddedViewRef}
|
|
23175
23182
|
*
|
|
23176
23183
|
* @publicApi
|
|
23177
23184
|
*/
|
|
@@ -25354,7 +25361,7 @@ const ITS_JUST_ANGULAR = true;
|
|
|
25354
25361
|
* The function is executed during the application bootstrap process,
|
|
25355
25362
|
* and the needed data is available on startup.
|
|
25356
25363
|
*
|
|
25357
|
-
* @see
|
|
25364
|
+
* @see {@link ApplicationInitStatus}
|
|
25358
25365
|
*
|
|
25359
25366
|
* @usageNotes
|
|
25360
25367
|
*
|
|
@@ -25891,19 +25898,6 @@ function publishGlobalUtil(name, fn) {
|
|
|
25891
25898
|
}
|
|
25892
25899
|
}
|
|
25893
25900
|
|
|
25894
|
-
const promise = (() => Promise.resolve(0))();
|
|
25895
|
-
function scheduleMicroTask(fn) {
|
|
25896
|
-
if (typeof Zone === 'undefined') {
|
|
25897
|
-
// use promise to schedule microTask instead of use Zone
|
|
25898
|
-
promise.then(() => {
|
|
25899
|
-
fn && fn.apply(null, null);
|
|
25900
|
-
});
|
|
25901
|
-
}
|
|
25902
|
-
else {
|
|
25903
|
-
Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
|
|
25904
|
-
}
|
|
25905
|
-
}
|
|
25906
|
-
|
|
25907
25901
|
function noop(...args) {
|
|
25908
25902
|
// Do nothing.
|
|
25909
25903
|
}
|
|
@@ -26364,7 +26358,7 @@ function isStableFactory() {
|
|
|
26364
26358
|
NgZone.assertNotInAngularZone();
|
|
26365
26359
|
// Check whether there are no pending macro/micro tasks in the next tick
|
|
26366
26360
|
// to allow for NgZone to update the state.
|
|
26367
|
-
|
|
26361
|
+
queueMicrotask(() => {
|
|
26368
26362
|
if (!_stable && !zone.hasPendingMacrotasks && !zone.hasPendingMicrotasks) {
|
|
26369
26363
|
_stable = true;
|
|
26370
26364
|
observer.next(true);
|
|
@@ -26461,7 +26455,7 @@ class Testability {
|
|
|
26461
26455
|
this._ngZone.onStable.subscribe({
|
|
26462
26456
|
next: () => {
|
|
26463
26457
|
NgZone.assertNotInAngularZone();
|
|
26464
|
-
|
|
26458
|
+
queueMicrotask(() => {
|
|
26465
26459
|
this._isZoneStable = true;
|
|
26466
26460
|
this._runCallbacksIfReady();
|
|
26467
26461
|
});
|
|
@@ -26499,7 +26493,7 @@ class Testability {
|
|
|
26499
26493
|
_runCallbacksIfReady() {
|
|
26500
26494
|
if (this.isStable()) {
|
|
26501
26495
|
// Schedules the call backs in a new frame so that it is always async.
|
|
26502
|
-
|
|
26496
|
+
queueMicrotask(() => {
|
|
26503
26497
|
while (this._callbacks.length !== 0) {
|
|
26504
26498
|
let cb = this._callbacks.pop();
|
|
26505
26499
|
clearTimeout(cb.timeoutId);
|
|
@@ -27782,7 +27776,7 @@ class ViewRef extends ChangeDetectorRef {
|
|
|
27782
27776
|
* a view cannot. Change the structure of elements by inserting, moving, or
|
|
27783
27777
|
* removing nested views in a view container.
|
|
27784
27778
|
*
|
|
27785
|
-
* @see
|
|
27779
|
+
* @see {@link ViewContainerRef}
|
|
27786
27780
|
*
|
|
27787
27781
|
* @usageNotes
|
|
27788
27782
|
*
|
|
@@ -28580,6 +28574,7 @@ class DefaultIterableDiffer {
|
|
|
28580
28574
|
this.length = index;
|
|
28581
28575
|
}
|
|
28582
28576
|
this._truncate(record);
|
|
28577
|
+
// @ts-expect-error overwriting a readonly member
|
|
28583
28578
|
this.collection = collection;
|
|
28584
28579
|
return this.isDirty;
|
|
28585
28580
|
}
|