@angular/core 16.0.1 → 16.0.3
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/src/change_detection/change_detector_ref.mjs +2 -2
- package/esm2022/src/core_private_export.mjs +1 -2
- package/esm2022/src/di/forward_ref.mjs +29 -2
- package/esm2022/src/di/r3_injector.mjs +6 -3
- package/esm2022/src/errors.mjs +1 -1
- package/esm2022/src/hydration/api.mjs +31 -3
- package/esm2022/src/i18n/locale_data_api.mjs +2 -2
- package/esm2022/src/interface/lifecycle_hooks.mjs +1 -1
- package/esm2022/src/render3/bindings.mjs +2 -2
- package/esm2022/src/render3/component.mjs +4 -4
- package/esm2022/src/render3/definition.mjs +6 -6
- package/esm2022/src/render3/di.mjs +5 -2
- package/esm2022/src/render3/errors.mjs +24 -3
- package/esm2022/src/render3/features/host_directives_feature.mjs +2 -2
- package/esm2022/src/render3/instructions/listener.mjs +1 -3
- package/esm2022/src/render3/jit/module.mjs +11 -11
- package/esm2022/src/render3/node_manipulation.mjs +4 -2
- package/esm2022/src/signals/src/api.mjs +5 -3
- package/esm2022/src/transfer_state.mjs +7 -23
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/test_bed_common.mjs +1 -1
- package/fesm2022/core.mjs +126 -60
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +5 -3
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +92 -53
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +44 -17
- package/package.json +1 -1
- package/rxjs-interop/index.d.ts +1 -1
- package/schematics/ng-generate/standalone-migration/bundle.js +10 -10
- package/schematics/ng-generate/standalone-migration/bundle.js.map +2 -2
- package/testing/index.d.ts +5 -5
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.0.
|
|
2
|
+
* @license Angular v16.0.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -25,7 +25,8 @@ export declare interface AbstractType<T> extends Function {
|
|
|
25
25
|
/**
|
|
26
26
|
* @description
|
|
27
27
|
* A lifecycle hook that is called after the default change detector has
|
|
28
|
-
* completed checking all content of a directive.
|
|
28
|
+
* completed checking all content of a directive. It will run after the content
|
|
29
|
+
* has been checked and most of the time it's during a change detection cycle.
|
|
29
30
|
*
|
|
30
31
|
* @see `AfterViewChecked`
|
|
31
32
|
* @see [Lifecycle hooks guide](guide/lifecycle-hooks)
|
|
@@ -50,7 +51,7 @@ export declare interface AfterContentChecked {
|
|
|
50
51
|
/**
|
|
51
52
|
* @description
|
|
52
53
|
* A lifecycle hook that is called after Angular has fully initialized
|
|
53
|
-
* all content of a directive.
|
|
54
|
+
* all content of a directive. It will run only once when the projected content is initialized.
|
|
54
55
|
* Define an `ngAfterContentInit()` method to handle any additional initialization tasks.
|
|
55
56
|
*
|
|
56
57
|
* @see `OnInit`
|
|
@@ -710,7 +711,7 @@ declare type ChangeDetectionStrategy_2 = number;
|
|
|
710
711
|
*
|
|
711
712
|
* The following example sets the `OnPush` change-detection strategy for a component
|
|
712
713
|
* (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check
|
|
713
|
-
* after an interval.
|
|
714
|
+
* after an interval.
|
|
714
715
|
*
|
|
715
716
|
* <code-example path="core/ts/change_detect/change-detection.ts"
|
|
716
717
|
* region="mark-for-check"></code-example>
|
|
@@ -1801,12 +1802,12 @@ declare const CONTEXT = 8;
|
|
|
1801
1802
|
* @param component Component class reference.
|
|
1802
1803
|
* @param options Set of options to use:
|
|
1803
1804
|
* * `environmentInjector`: An `EnvironmentInjector` instance to be used for the component, see
|
|
1804
|
-
* additional info about it
|
|
1805
|
+
* additional info about it [here](/guide/standalone-components#environment-injectors).
|
|
1805
1806
|
* * `hostElement` (optional): A DOM node that should act as a host node for the component. If not
|
|
1806
1807
|
* provided, Angular creates one based on the tag name used in the component selector (and falls
|
|
1807
1808
|
* back to using `div` if selector doesn't have tag name info).
|
|
1808
|
-
* * `elementInjector` (optional): An `ElementInjector` instance, see additional info about it
|
|
1809
|
-
*
|
|
1809
|
+
* * `elementInjector` (optional): An `ElementInjector` instance, see additional info about it
|
|
1810
|
+
* [here](/guide/hierarchical-dependency-injection#elementinjector).
|
|
1810
1811
|
* * `projectableNodes` (optional): A list of DOM nodes that should be projected through
|
|
1811
1812
|
* [`<ng-content>`](api/core/ng-content) of the new component instance.
|
|
1812
1813
|
* @returns ComponentRef instance that represents a given Component.
|
|
@@ -3424,9 +3425,36 @@ declare const FLAGS = 2;
|
|
|
3424
3425
|
* DI is declared, but not yet defined. It is also used when the `token` which we use when creating
|
|
3425
3426
|
* a query is not yet defined.
|
|
3426
3427
|
*
|
|
3428
|
+
* `forwardRef` is also used to break circularities in standalone components imports.
|
|
3429
|
+
*
|
|
3427
3430
|
* @usageNotes
|
|
3428
|
-
* ###
|
|
3431
|
+
* ### Circular dependency example
|
|
3429
3432
|
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
|
|
3433
|
+
*
|
|
3434
|
+
* ### Circular standalone reference import example
|
|
3435
|
+
* ```ts
|
|
3436
|
+
* @Component({
|
|
3437
|
+
* standalone: true,
|
|
3438
|
+
* imports: [ChildComponent],
|
|
3439
|
+
* selector: 'app-parent',
|
|
3440
|
+
* template: `<app-child [hideParent]="hideParent"></app-child>`,
|
|
3441
|
+
* })
|
|
3442
|
+
* export class ParentComponent {
|
|
3443
|
+
* @Input() hideParent: boolean;
|
|
3444
|
+
* }
|
|
3445
|
+
*
|
|
3446
|
+
*
|
|
3447
|
+
* @Component({
|
|
3448
|
+
* standalone: true,
|
|
3449
|
+
* imports: [CommonModule, forwardRef(() => ParentComponent)],
|
|
3450
|
+
* selector: 'app-child',
|
|
3451
|
+
* template: `<app-parent *ngIf="!hideParent"></app-parent>`,
|
|
3452
|
+
* })
|
|
3453
|
+
* export class ChildComponent {
|
|
3454
|
+
* @Input() hideParent: boolean;
|
|
3455
|
+
* }
|
|
3456
|
+
* ```
|
|
3457
|
+
*
|
|
3430
3458
|
* @publicApi
|
|
3431
3459
|
*/
|
|
3432
3460
|
export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
|
|
@@ -4685,14 +4713,16 @@ declare interface InternalViewRef extends ViewRef {
|
|
|
4685
4713
|
export declare function isDevMode(): boolean;
|
|
4686
4714
|
|
|
4687
4715
|
/**
|
|
4688
|
-
* Checks if the given `value`
|
|
4716
|
+
* Checks if the given `value` is a reactive `Signal`.
|
|
4717
|
+
*
|
|
4718
|
+
* @developerPreview
|
|
4689
4719
|
*/
|
|
4690
|
-
export declare function isSignal(value:
|
|
4720
|
+
export declare function isSignal(value: unknown): value is Signal<unknown>;
|
|
4691
4721
|
|
|
4692
4722
|
/**
|
|
4693
4723
|
* Checks whether a given Component, Directive or Pipe is marked as standalone.
|
|
4694
4724
|
* This will return false if passed anything other than a Component, Directive, or Pipe class
|
|
4695
|
-
* See this guide for additional information:
|
|
4725
|
+
* See [this guide](/guide/standalone-components) for additional information:
|
|
4696
4726
|
*
|
|
4697
4727
|
* @param type A reference to a Component, Directive or Pipe.
|
|
4698
4728
|
* @publicApi
|
|
@@ -7547,6 +7577,7 @@ declare const enum RuntimeErrorCode {
|
|
|
7547
7577
|
UNSUPPORTED_PROJECTION_DOM_NODES = -503,
|
|
7548
7578
|
INVALID_SKIP_HYDRATION_HOST = -504,
|
|
7549
7579
|
MISSING_HYDRATION_ANNOTATIONS = -505,
|
|
7580
|
+
HYDRATION_STABLE_TIMEDOUT = -506,
|
|
7550
7581
|
SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT = 600,
|
|
7551
7582
|
REQUIRE_SYNC_WITHOUT_SYNC_EMIT = 601,
|
|
7552
7583
|
INVALID_I18N_STRUCTURE = 700,
|
|
@@ -7868,6 +7899,7 @@ export declare interface SkipSelfDecorator {
|
|
|
7868
7899
|
new (): SkipSelf;
|
|
7869
7900
|
}
|
|
7870
7901
|
|
|
7902
|
+
|
|
7871
7903
|
/**
|
|
7872
7904
|
* A type-safe key to use with `TransferState`.
|
|
7873
7905
|
*
|
|
@@ -10688,9 +10720,6 @@ export declare interface ɵDirectiveType<T> extends Type<T> {
|
|
|
10688
10720
|
*/
|
|
10689
10721
|
export declare const ɵENABLED_SSR_FEATURES: InjectionToken<Set<string>>;
|
|
10690
10722
|
|
|
10691
|
-
|
|
10692
|
-
export declare function ɵescapeTransferStateContent(text: string): string;
|
|
10693
|
-
|
|
10694
10723
|
/**
|
|
10695
10724
|
* Index of each type of locale data from the extra locale data array
|
|
10696
10725
|
*/
|
|
@@ -10809,7 +10838,7 @@ export declare function ɵgetLocaleCurrencyCode(locale: string): string | null;
|
|
|
10809
10838
|
* @param locale A locale code for the locale format rules to use.
|
|
10810
10839
|
* @returns The plural function for the locale.
|
|
10811
10840
|
* @see `NgPlural`
|
|
10812
|
-
* @see [Internationalization (i18n) Guide](
|
|
10841
|
+
* @see [Internationalization (i18n) Guide](/guide/i18n-overview)
|
|
10813
10842
|
*/
|
|
10814
10843
|
export declare function ɵgetLocalePluralCase(locale: string): (value: number) => number;
|
|
10815
10844
|
|
|
@@ -11558,8 +11587,6 @@ export declare const ɵTESTABILITY_GETTER: InjectionToken<GetTestability>;
|
|
|
11558
11587
|
*/
|
|
11559
11588
|
export declare function ɵtransitiveScopesFor<T>(type: Type<T>): ɵNgModuleTransitiveScopes;
|
|
11560
11589
|
|
|
11561
|
-
export declare function ɵunescapeTransferStateContent(text: string): string;
|
|
11562
|
-
|
|
11563
11590
|
/**
|
|
11564
11591
|
* Helper function to remove all the locale data from `LOCALE_DATA`.
|
|
11565
11592
|
*/
|
package/package.json
CHANGED
package/rxjs-interop/index.d.ts
CHANGED
|
@@ -18543,7 +18543,7 @@ function publishFacade(global2) {
|
|
|
18543
18543
|
}
|
|
18544
18544
|
|
|
18545
18545
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
|
|
18546
|
-
var VERSION2 = new Version("16.0.
|
|
18546
|
+
var VERSION2 = new Version("16.0.3");
|
|
18547
18547
|
|
|
18548
18548
|
// bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
|
|
18549
18549
|
var _I18N_ATTR = "i18n";
|
|
@@ -19862,7 +19862,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION = "12.0.0";
|
|
|
19862
19862
|
function compileDeclareClassMetadata(metadata) {
|
|
19863
19863
|
const definitionMap = new DefinitionMap();
|
|
19864
19864
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
19865
|
-
definitionMap.set("version", literal("16.0.
|
|
19865
|
+
definitionMap.set("version", literal("16.0.3"));
|
|
19866
19866
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
19867
19867
|
definitionMap.set("type", metadata.type);
|
|
19868
19868
|
definitionMap.set("decorators", metadata.decorators);
|
|
@@ -19931,7 +19931,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
19931
19931
|
var _a2;
|
|
19932
19932
|
const definitionMap = new DefinitionMap();
|
|
19933
19933
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION2));
|
|
19934
|
-
definitionMap.set("version", literal("16.0.
|
|
19934
|
+
definitionMap.set("version", literal("16.0.3"));
|
|
19935
19935
|
definitionMap.set("type", meta.type.value);
|
|
19936
19936
|
if (meta.isStandalone) {
|
|
19937
19937
|
definitionMap.set("isStandalone", literal(meta.isStandalone));
|
|
@@ -20113,7 +20113,7 @@ var MINIMUM_PARTIAL_LINKER_VERSION3 = "12.0.0";
|
|
|
20113
20113
|
function compileDeclareFactoryFunction(meta) {
|
|
20114
20114
|
const definitionMap = new DefinitionMap();
|
|
20115
20115
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION3));
|
|
20116
|
-
definitionMap.set("version", literal("16.0.
|
|
20116
|
+
definitionMap.set("version", literal("16.0.3"));
|
|
20117
20117
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
20118
20118
|
definitionMap.set("type", meta.type.value);
|
|
20119
20119
|
definitionMap.set("deps", compileDependencies(meta.deps));
|
|
@@ -20136,7 +20136,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
20136
20136
|
function createInjectableDefinitionMap(meta) {
|
|
20137
20137
|
const definitionMap = new DefinitionMap();
|
|
20138
20138
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION4));
|
|
20139
|
-
definitionMap.set("version", literal("16.0.
|
|
20139
|
+
definitionMap.set("version", literal("16.0.3"));
|
|
20140
20140
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
20141
20141
|
definitionMap.set("type", meta.type.value);
|
|
20142
20142
|
if (meta.providedIn !== void 0) {
|
|
@@ -20174,7 +20174,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
20174
20174
|
function createInjectorDefinitionMap(meta) {
|
|
20175
20175
|
const definitionMap = new DefinitionMap();
|
|
20176
20176
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION5));
|
|
20177
|
-
definitionMap.set("version", literal("16.0.
|
|
20177
|
+
definitionMap.set("version", literal("16.0.3"));
|
|
20178
20178
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
20179
20179
|
definitionMap.set("type", meta.type.value);
|
|
20180
20180
|
definitionMap.set("providers", meta.providers);
|
|
@@ -20195,7 +20195,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
|
|
|
20195
20195
|
function createNgModuleDefinitionMap(meta) {
|
|
20196
20196
|
const definitionMap = new DefinitionMap();
|
|
20197
20197
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION6));
|
|
20198
|
-
definitionMap.set("version", literal("16.0.
|
|
20198
|
+
definitionMap.set("version", literal("16.0.3"));
|
|
20199
20199
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
20200
20200
|
definitionMap.set("type", meta.type.value);
|
|
20201
20201
|
if (meta.bootstrap.length > 0) {
|
|
@@ -20230,7 +20230,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
20230
20230
|
function createPipeDefinitionMap(meta) {
|
|
20231
20231
|
const definitionMap = new DefinitionMap();
|
|
20232
20232
|
definitionMap.set("minVersion", literal(MINIMUM_PARTIAL_LINKER_VERSION7));
|
|
20233
|
-
definitionMap.set("version", literal("16.0.
|
|
20233
|
+
definitionMap.set("version", literal("16.0.3"));
|
|
20234
20234
|
definitionMap.set("ngImport", importExpr(Identifiers.core));
|
|
20235
20235
|
definitionMap.set("type", meta.type.value);
|
|
20236
20236
|
if (meta.isStandalone) {
|
|
@@ -20247,7 +20247,7 @@ function createPipeDefinitionMap(meta) {
|
|
|
20247
20247
|
publishFacade(_global);
|
|
20248
20248
|
|
|
20249
20249
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version.mjs
|
|
20250
|
-
var VERSION3 = new Version("16.0.
|
|
20250
|
+
var VERSION3 = new Version("16.0.3");
|
|
20251
20251
|
|
|
20252
20252
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
20253
20253
|
var EmitFlags;
|
|
@@ -25492,7 +25492,7 @@ var TraitCompiler = class {
|
|
|
25492
25492
|
}
|
|
25493
25493
|
resolve() {
|
|
25494
25494
|
var _a2, _b;
|
|
25495
|
-
const classes =
|
|
25495
|
+
const classes = this.classes.keys();
|
|
25496
25496
|
for (const clazz of classes) {
|
|
25497
25497
|
const record = this.classes.get(clazz);
|
|
25498
25498
|
for (let trait of record.traits) {
|