@angular/core 16.1.0-next.0 → 16.1.0-next.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.
Files changed (39) hide show
  1. package/esm2022/src/change_detection/change_detector_ref.mjs +2 -2
  2. package/esm2022/src/compiler/compiler_facade_interface.mjs +1 -1
  3. package/esm2022/src/core_private_export.mjs +1 -2
  4. package/esm2022/src/core_render3_private_export.mjs +2 -2
  5. package/esm2022/src/di/forward_ref.mjs +29 -2
  6. package/esm2022/src/di/r3_injector.mjs +6 -3
  7. package/esm2022/src/errors.mjs +1 -1
  8. package/esm2022/src/hydration/api.mjs +31 -3
  9. package/esm2022/src/i18n/locale_data_api.mjs +2 -2
  10. package/esm2022/src/interface/lifecycle_hooks.mjs +1 -1
  11. package/esm2022/src/render3/bindings.mjs +2 -2
  12. package/esm2022/src/render3/component.mjs +4 -4
  13. package/esm2022/src/render3/definition.mjs +6 -6
  14. package/esm2022/src/render3/di.mjs +5 -2
  15. package/esm2022/src/render3/errors.mjs +24 -3
  16. package/esm2022/src/render3/features/host_directives_feature.mjs +2 -2
  17. package/esm2022/src/render3/features/input_transforms_feature.mjs +13 -0
  18. package/esm2022/src/render3/index.mjs +3 -2
  19. package/esm2022/src/render3/instructions/listener.mjs +1 -3
  20. package/esm2022/src/render3/jit/environment.mjs +2 -1
  21. package/esm2022/src/render3/jit/module.mjs +11 -11
  22. package/esm2022/src/render3/node_manipulation.mjs +4 -2
  23. package/esm2022/src/signals/src/api.mjs +5 -3
  24. package/esm2022/src/transfer_state.mjs +7 -23
  25. package/esm2022/src/version.mjs +1 -1
  26. package/esm2022/testing/src/logger.mjs +3 -3
  27. package/esm2022/testing/src/test_bed_common.mjs +1 -1
  28. package/fesm2022/core.mjs +133 -60
  29. package/fesm2022/core.mjs.map +1 -1
  30. package/fesm2022/rxjs-interop.mjs +5 -3
  31. package/fesm2022/rxjs-interop.mjs.map +1 -1
  32. package/fesm2022/testing.mjs +99 -53
  33. package/fesm2022/testing.mjs.map +1 -1
  34. package/index.d.ts +56 -18
  35. package/package.json +1 -1
  36. package/rxjs-interop/index.d.ts +1 -1
  37. package/schematics/ng-generate/standalone-migration/bundle.js +362 -60
  38. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  39. package/testing/index.d.ts +5 -5
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v16.1.0-next.0
2
+ * @license Angular v16.1.0-next.2
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. See [live demo](https://plnkr.co/edit/GC512b?p=preview).
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 at https://angular.io/guide/standalone-components#environment-injectors.
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 at
1809
- * https://angular.io/guide/hierarchical-dependency-injection#elementinjector.
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.
@@ -3428,9 +3429,36 @@ declare const FLAGS = 2;
3428
3429
  * DI is declared, but not yet defined. It is also used when the `token` which we use when creating
3429
3430
  * a query is not yet defined.
3430
3431
  *
3432
+ * `forwardRef` is also used to break circularities in standalone components imports.
3433
+ *
3431
3434
  * @usageNotes
3432
- * ### Example
3435
+ * ### Circular dependency example
3433
3436
  * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
3437
+ *
3438
+ * ### Circular standalone reference import example
3439
+ * ```ts
3440
+ * @Component({
3441
+ * standalone: true,
3442
+ * imports: [ChildComponent],
3443
+ * selector: 'app-parent',
3444
+ * template: `<app-child [hideParent]="hideParent"></app-child>`,
3445
+ * })
3446
+ * export class ParentComponent {
3447
+ * @Input() hideParent: boolean;
3448
+ * }
3449
+ *
3450
+ *
3451
+ * @Component({
3452
+ * standalone: true,
3453
+ * imports: [CommonModule, forwardRef(() => ParentComponent)],
3454
+ * selector: 'app-child',
3455
+ * template: `<app-parent *ngIf="!hideParent"></app-parent>`,
3456
+ * })
3457
+ * export class ChildComponent {
3458
+ * @Input() hideParent: boolean;
3459
+ * }
3460
+ * ```
3461
+ *
3434
3462
  * @publicApi
3435
3463
  */
3436
3464
  export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
@@ -4662,6 +4690,8 @@ export declare interface InputDecorator {
4662
4690
  new (arg?: string | Input): any;
4663
4691
  }
4664
4692
 
4693
+ declare type InputTransformFunction = any;
4694
+
4665
4695
  /**
4666
4696
  * See `TNode.insertBeforeIndex`
4667
4697
  */
@@ -4689,14 +4719,16 @@ declare interface InternalViewRef extends ViewRef {
4689
4719
  export declare function isDevMode(): boolean;
4690
4720
 
4691
4721
  /**
4692
- * Checks if the given `value` function is a reactive `Signal`.
4722
+ * Checks if the given `value` is a reactive `Signal`.
4723
+ *
4724
+ * @developerPreview
4693
4725
  */
4694
- export declare function isSignal(value: Function): value is Signal<unknown>;
4726
+ export declare function isSignal(value: unknown): value is Signal<unknown>;
4695
4727
 
4696
4728
  /**
4697
4729
  * Checks whether a given Component, Directive or Pipe is marked as standalone.
4698
4730
  * This will return false if passed anything other than a Component, Directive, or Pipe class
4699
- * See this guide for additional information: https://angular.io/guide/standalone-components
4731
+ * See [this guide](/guide/standalone-components) for additional information:
4700
4732
  *
4701
4733
  * @param type A reference to a Component, Directive or Pipe.
4702
4734
  * @publicApi
@@ -6794,7 +6826,11 @@ declare interface R3DeclareDirectiveFacade {
6794
6826
  selector?: string;
6795
6827
  type: Type_2;
6796
6828
  inputs?: {
6797
- [classPropertyName: string]: string | [string, string];
6829
+ [classPropertyName: string]: string | [
6830
+ bindingPropertyName: string,
6831
+ classPropertyName: string,
6832
+ transformFunction?: InputTransformFunction
6833
+ ];
6798
6834
  };
6799
6835
  outputs?: {
6800
6836
  [classPropertyName: string]: string;
@@ -7554,6 +7590,7 @@ declare const enum RuntimeErrorCode {
7554
7590
  UNSUPPORTED_PROJECTION_DOM_NODES = -503,
7555
7591
  INVALID_SKIP_HYDRATION_HOST = -504,
7556
7592
  MISSING_HYDRATION_ANNOTATIONS = -505,
7593
+ HYDRATION_STABLE_TIMEDOUT = -506,
7557
7594
  SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT = 600,
7558
7595
  REQUIRE_SYNC_WITHOUT_SYNC_EMIT = 601,
7559
7596
  INVALID_I18N_STRUCTURE = 700,
@@ -7875,6 +7912,7 @@ export declare interface SkipSelfDecorator {
7875
7912
  new (): SkipSelf;
7876
7913
  }
7877
7914
 
7915
+
7878
7916
  /**
7879
7917
  * A type-safe key to use with `TransferState`.
7880
7918
  *
@@ -10701,9 +10739,6 @@ export declare interface ɵDirectiveType<T> extends Type<T> {
10701
10739
  */
10702
10740
  export declare const ɵENABLED_SSR_FEATURES: InjectionToken<Set<string>>;
10703
10741
 
10704
-
10705
- export declare function ɵescapeTransferStateContent(text: string): string;
10706
-
10707
10742
  /**
10708
10743
  * Index of each type of locale data from the extra locale data array
10709
10744
  */
@@ -10822,7 +10857,7 @@ export declare function ɵgetLocaleCurrencyCode(locale: string): string | null;
10822
10857
  * @param locale A locale code for the locale format rules to use.
10823
10858
  * @returns The plural function for the locale.
10824
10859
  * @see `NgPlural`
10825
- * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n-overview)
10860
+ * @see [Internationalization (i18n) Guide](/guide/i18n-overview)
10826
10861
  */
10827
10862
  export declare function ɵgetLocalePluralCase(locale: string): (value: number) => number;
10828
10863
 
@@ -11571,8 +11606,6 @@ export declare const ɵTESTABILITY_GETTER: InjectionToken<GetTestability>;
11571
11606
  */
11572
11607
  export declare function ɵtransitiveScopesFor<T>(type: Type<T>): ɵNgModuleTransitiveScopes;
11573
11608
 
11574
- export declare function ɵunescapeTransferStateContent(text: string): string;
11575
-
11576
11609
  /**
11577
11610
  * Helper function to remove all the locale data from `LOCALE_DATA`.
11578
11611
  */
@@ -13076,6 +13109,11 @@ export declare interface ɵɵInjectorDef<T> {
13076
13109
  imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];
13077
13110
  }
13078
13111
 
13112
+ /**
13113
+ * @codeGenApi
13114
+ */
13115
+ export declare function ɵɵInputTransformsFeature(definition: ɵDirectiveDef<any> | ɵComponentDef<any>): void;
13116
+
13079
13117
  /**
13080
13118
  * Throws an error indicating that a factory function could not be generated by the compiler for a
13081
13119
  * particular class.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "16.1.0-next.0",
3
+ "version": "16.1.0-next.2",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v16.1.0-next.0
2
+ * @license Angular v16.1.0-next.2
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */