@angular/core 18.0.0-next.2 → 18.0.0-next.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/rxjs-interop/src/to_signal.mjs +2 -2
- package/esm2022/src/application/application_init.mjs +2 -2
- package/esm2022/src/application/application_ref.mjs +10 -15
- package/esm2022/src/application/application_tokens.mjs +3 -3
- package/esm2022/src/change_detection/scheduling/ng_zone_scheduling.mjs +20 -3
- package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +7 -6
- package/esm2022/src/core_private_export.mjs +3 -3
- package/esm2022/src/defer/instructions.mjs +2 -2
- package/esm2022/src/di/interface/provider.mjs +1 -1
- package/esm2022/src/di/metadata.mjs +1 -1
- package/esm2022/src/hydration/annotate.mjs +35 -49
- package/esm2022/src/hydration/api.mjs +36 -13
- package/esm2022/src/hydration/cleanup.mjs +4 -18
- package/esm2022/src/hydration/i18n.mjs +378 -0
- package/esm2022/src/hydration/interfaces.mjs +2 -1
- package/esm2022/src/hydration/node_lookup_utils.mjs +24 -10
- package/esm2022/src/hydration/utils.mjs +61 -2
- package/esm2022/src/linker/component_factory.mjs +1 -1
- package/esm2022/src/linker/view_container_ref.mjs +2 -2
- package/esm2022/src/linker/view_ref.mjs +4 -4
- package/esm2022/src/metadata/directives.mjs +1 -1
- package/esm2022/src/metadata/ng_module.mjs +1 -1
- package/esm2022/src/render3/component_ref.mjs +1 -1
- package/esm2022/src/render3/i18n/i18n_apply.mjs +28 -6
- package/esm2022/src/render3/i18n/i18n_parse.mjs +2 -5
- package/esm2022/src/render3/i18n/i18n_util.mjs +6 -1
- package/esm2022/src/render3/instructions/i18n.mjs +3 -1
- package/esm2022/src/render3/util/injector_discovery_utils.mjs +12 -8
- package/esm2022/src/render3/util/view_utils.mjs +4 -14
- package/esm2022/src/util/callback_scheduler.mjs +23 -33
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/src/zone/ng_zone.mjs +3 -3
- package/esm2022/testing/src/component_fixture.mjs +2 -2
- package/esm2022/testing/src/fake_async.mjs +6 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/private_export.mjs +9 -0
- package/esm2022/testing/src/test_hooks.mjs +3 -3
- package/esm2022/testing/src/testing.mjs +3 -2
- package/fesm2022/core.mjs +1124 -688
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives/signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +2 -2
- package/fesm2022/rxjs-interop.mjs.map +1 -1
- package/fesm2022/testing.mjs +41 -36
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +80 -33
- package/package.json +1 -1
- package/primitives/signals/index.d.ts +1 -1
- package/rxjs-interop/index.d.ts +2 -2
- package/schematics/migrations/block-template-entities/bundle.js +157 -157
- package/schematics/migrations/block-template-entities/bundle.js.map +1 -1
- package/schematics/migrations/compiler-options/bundle.js +13 -13
- package/schematics/migrations/invalid-two-way-bindings/bundle.js +158 -158
- package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +1 -1
- package/schematics/migrations/transfer-state/bundle.js +13 -13
- package/schematics/ng-generate/control-flow-migration/bundle.js +189 -177
- package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
- package/schematics/ng-generate/standalone-migration/bundle.js +450 -467
- package/schematics/ng-generate/standalone-migration/bundle.js.map +2 -2
- package/testing/index.d.ts +7 -1
- package/esm2022/src/change_detection/flags.mjs +0 -17
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.0.0-next.
|
|
2
|
+
* @license Angular v18.0.0-next.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -339,7 +339,7 @@ export declare interface AfterViewInit {
|
|
|
339
339
|
export declare const ANIMATION_MODULE_TYPE: InjectionToken<"NoopAnimations" | "BrowserAnimations">;
|
|
340
340
|
|
|
341
341
|
/**
|
|
342
|
-
* A
|
|
342
|
+
* A DI token that provides a set of callbacks to
|
|
343
343
|
* be called for every component that is bootstrapped.
|
|
344
344
|
*
|
|
345
345
|
* Each callback must take a `ComponentRef` instance and return nothing.
|
|
@@ -351,7 +351,7 @@ export declare const ANIMATION_MODULE_TYPE: InjectionToken<"NoopAnimations" | "B
|
|
|
351
351
|
export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<readonly ((compRef: ComponentRef<any>) => void)[]>;
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
|
-
* A
|
|
354
|
+
* A DI token representing a string ID, used
|
|
355
355
|
* primarily for prefixing application attributes and CSS styles when
|
|
356
356
|
* {@link ViewEncapsulation#Emulated} is being used.
|
|
357
357
|
*
|
|
@@ -383,7 +383,7 @@ export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<readonly ((compRef:
|
|
|
383
383
|
export declare const APP_ID: InjectionToken<string>;
|
|
384
384
|
|
|
385
385
|
/**
|
|
386
|
-
* A
|
|
386
|
+
* A DI token that you can use to provide
|
|
387
387
|
* one or more initialization functions.
|
|
388
388
|
*
|
|
389
389
|
* The provided functions are injected at application startup and executed during
|
|
@@ -644,6 +644,7 @@ export declare class ApplicationRef {
|
|
|
644
644
|
private _destroyListeners;
|
|
645
645
|
private readonly internalErrorHandler;
|
|
646
646
|
private readonly afterRenderEffectManager;
|
|
647
|
+
private readonly zonelessEnabled;
|
|
647
648
|
private externalTestViews;
|
|
648
649
|
private beforeRender;
|
|
649
650
|
private afterTick;
|
|
@@ -1767,11 +1768,11 @@ export declare abstract class ComponentRef<C> {
|
|
|
1767
1768
|
*/
|
|
1768
1769
|
abstract setInput(name: string, value: unknown): void;
|
|
1769
1770
|
/**
|
|
1770
|
-
* The host or anchor
|
|
1771
|
+
* The host or anchor element for this component instance.
|
|
1771
1772
|
*/
|
|
1772
1773
|
abstract get location(): ElementRef;
|
|
1773
1774
|
/**
|
|
1774
|
-
* The
|
|
1775
|
+
* The dependency injector for this component instance.
|
|
1775
1776
|
*/
|
|
1776
1777
|
abstract get injector(): Injector;
|
|
1777
1778
|
/**
|
|
@@ -1779,7 +1780,7 @@ export declare abstract class ComponentRef<C> {
|
|
|
1779
1780
|
*/
|
|
1780
1781
|
abstract get instance(): C;
|
|
1781
1782
|
/**
|
|
1782
|
-
* The
|
|
1783
|
+
* The host view defined by the template
|
|
1783
1784
|
* for this component instance.
|
|
1784
1785
|
*/
|
|
1785
1786
|
abstract get hostView(): ViewRef;
|
|
@@ -2670,6 +2671,23 @@ declare interface DehydratedContainerView extends DehydratedView {
|
|
|
2670
2671
|
data: Readonly<SerializedContainerView>;
|
|
2671
2672
|
}
|
|
2672
2673
|
|
|
2674
|
+
/**
|
|
2675
|
+
* An object that contains information about a dehydrated ICU case,
|
|
2676
|
+
* to facilitate cleaning up ICU cases that were active during
|
|
2677
|
+
* server-side rendering, but not during hydration.
|
|
2678
|
+
*/
|
|
2679
|
+
declare interface DehydratedIcuData {
|
|
2680
|
+
/**
|
|
2681
|
+
* The case index that this data represents.
|
|
2682
|
+
*/
|
|
2683
|
+
case: number;
|
|
2684
|
+
/**
|
|
2685
|
+
* A reference back to the AST for the ICU node. This allows the
|
|
2686
|
+
* AST to be used to clean up dehydrated nodes.
|
|
2687
|
+
*/
|
|
2688
|
+
node: I18nICUNode;
|
|
2689
|
+
}
|
|
2690
|
+
|
|
2673
2691
|
/**
|
|
2674
2692
|
* An object that contains hydration-related information serialized
|
|
2675
2693
|
* on the server, as well as the necessary references to segments of
|
|
@@ -2714,11 +2732,19 @@ declare interface DehydratedView {
|
|
|
2714
2732
|
* A mapping from a view to the first child to begin claiming nodes.
|
|
2715
2733
|
*
|
|
2716
2734
|
* This mapping is generated by an i18n block, and is the source of
|
|
2717
|
-
* truth for the nodes inside of it.
|
|
2718
|
-
* the node is removed from the map. The remaining entries indicate
|
|
2719
|
-
* dehydrated nodes that need to be cleaned up.
|
|
2735
|
+
* truth for the nodes inside of it.
|
|
2720
2736
|
*/
|
|
2721
|
-
i18nNodes?: Map<number, RNode>;
|
|
2737
|
+
i18nNodes?: Map<number, RNode | null>;
|
|
2738
|
+
/**
|
|
2739
|
+
* A mapping from the index of an ICU node to dehydrated data for it.
|
|
2740
|
+
*
|
|
2741
|
+
* This information is used during the hydration process on the client.
|
|
2742
|
+
* ICU cases that were active during server-side rendering will be added
|
|
2743
|
+
* to the map. The hydration logic will "claim" matching cases, removing
|
|
2744
|
+
* them from the map. The remaining entries are "unclaimed", and will be
|
|
2745
|
+
* removed from the DOM during hydration cleanup.
|
|
2746
|
+
*/
|
|
2747
|
+
dehydratedIcuData?: Map<number, DehydratedIcuData>;
|
|
2722
2748
|
}
|
|
2723
2749
|
|
|
2724
2750
|
/**
|
|
@@ -3004,9 +3030,9 @@ export declare interface Directive {
|
|
|
3004
3030
|
*/
|
|
3005
3031
|
outputs?: string[];
|
|
3006
3032
|
/**
|
|
3007
|
-
* Configures the
|
|
3008
|
-
* directive or component with a
|
|
3009
|
-
* that maps to a
|
|
3033
|
+
* Configures the injector of this
|
|
3034
|
+
* directive or component with a token
|
|
3035
|
+
* that maps to a provider of a dependency.
|
|
3010
3036
|
*/
|
|
3011
3037
|
providers?: Provider[];
|
|
3012
3038
|
/**
|
|
@@ -3574,8 +3600,8 @@ export declare class ElementRef<T = any> {
|
|
|
3574
3600
|
declare const EMBEDDED_VIEW_INJECTOR = 20;
|
|
3575
3601
|
|
|
3576
3602
|
/**
|
|
3577
|
-
* Represents an Angular
|
|
3578
|
-
* An
|
|
3603
|
+
* Represents an Angular view in a view container.
|
|
3604
|
+
* An embedded view can be referenced from a component
|
|
3579
3605
|
* other than the hosting component whose template defines it, or it can be defined
|
|
3580
3606
|
* independently by a `TemplateRef`.
|
|
3581
3607
|
*
|
|
@@ -4686,6 +4712,8 @@ declare namespace i0 {
|
|
|
4686
4712
|
}
|
|
4687
4713
|
}
|
|
4688
4714
|
|
|
4715
|
+
declare const I18N_DATA = "l";
|
|
4716
|
+
|
|
4689
4717
|
/**
|
|
4690
4718
|
* Array storing OpCode for dynamically creating `i18n` translation DOM elements.
|
|
4691
4719
|
*
|
|
@@ -5062,7 +5090,7 @@ declare type InitialInputs = (string | ɵɵInputFlags)[];
|
|
|
5062
5090
|
*/
|
|
5063
5091
|
export declare interface Inject {
|
|
5064
5092
|
/**
|
|
5065
|
-
* A
|
|
5093
|
+
* A DI token that maps to the dependency to be injected.
|
|
5066
5094
|
*/
|
|
5067
5095
|
token: any;
|
|
5068
5096
|
}
|
|
@@ -6920,8 +6948,8 @@ export declare class ModuleWithComponentFactories<T> {
|
|
|
6920
6948
|
}
|
|
6921
6949
|
|
|
6922
6950
|
/**
|
|
6923
|
-
* A wrapper around an NgModule that associates it with
|
|
6924
|
-
*
|
|
6951
|
+
* A wrapper around an NgModule that associates it with providers
|
|
6952
|
+
* Usage without a generic type is deprecated.
|
|
6925
6953
|
*
|
|
6926
6954
|
* @see [Deprecations](guide/deprecations#modulewithproviders-type-without-a-generic)
|
|
6927
6955
|
*
|
|
@@ -7008,7 +7036,7 @@ export declare interface NgModule {
|
|
|
7008
7036
|
*/
|
|
7009
7037
|
providers?: Array<Provider | EnvironmentProviders>;
|
|
7010
7038
|
/**
|
|
7011
|
-
* The set of components, directives, and pipes (
|
|
7039
|
+
* The set of components, directives, and pipes (declarables
|
|
7012
7040
|
* that belong to this module.
|
|
7013
7041
|
*
|
|
7014
7042
|
* @usageNotes
|
|
@@ -7035,7 +7063,7 @@ export declare interface NgModule {
|
|
|
7035
7063
|
*/
|
|
7036
7064
|
declarations?: Array<Type<any> | any[]>;
|
|
7037
7065
|
/**
|
|
7038
|
-
* The set of NgModules whose exported
|
|
7066
|
+
* The set of NgModules whose exported declarables
|
|
7039
7067
|
* are available to templates in this module.
|
|
7040
7068
|
*
|
|
7041
7069
|
* @usageNotes
|
|
@@ -7804,7 +7832,7 @@ export declare interface OutputRefSubscription {
|
|
|
7804
7832
|
}
|
|
7805
7833
|
|
|
7806
7834
|
/**
|
|
7807
|
-
* A
|
|
7835
|
+
* A DI token that indicates the root directory of
|
|
7808
7836
|
* the application
|
|
7809
7837
|
* @publicApi
|
|
7810
7838
|
* @deprecated
|
|
@@ -7821,7 +7849,7 @@ declare const PARENT = 3;
|
|
|
7821
7849
|
export declare interface Pipe {
|
|
7822
7850
|
/**
|
|
7823
7851
|
* The pipe name to use in template bindings.
|
|
7824
|
-
* Typically uses
|
|
7852
|
+
* Typically uses lowerCamelCase
|
|
7825
7853
|
* because the name cannot contain hyphens.
|
|
7826
7854
|
*/
|
|
7827
7855
|
name: string;
|
|
@@ -9155,6 +9183,13 @@ declare interface SerializedView {
|
|
|
9155
9183
|
* logic for such nodes and instead use a regular "creation mode".
|
|
9156
9184
|
*/
|
|
9157
9185
|
[DISCONNECTED_NODES]?: number[];
|
|
9186
|
+
/**
|
|
9187
|
+
* Serialized information about i18n blocks in a template.
|
|
9188
|
+
* Key-value pairs where a key is an index of the corresponding
|
|
9189
|
+
* i18n entry within an LView, and the value is a list of
|
|
9190
|
+
* active ICU cases.
|
|
9191
|
+
*/
|
|
9192
|
+
[I18N_DATA]?: Record<number, number[]>;
|
|
9158
9193
|
}
|
|
9159
9194
|
|
|
9160
9195
|
/**
|
|
@@ -11356,7 +11391,7 @@ export declare interface ViewChildrenDecorator {
|
|
|
11356
11391
|
* (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
|
|
11357
11392
|
*
|
|
11358
11393
|
* A view container instance can contain other view containers,
|
|
11359
|
-
* creating a
|
|
11394
|
+
* creating a view hierarchy.
|
|
11360
11395
|
*
|
|
11361
11396
|
* @usageNotes
|
|
11362
11397
|
*
|
|
@@ -11413,7 +11448,7 @@ export declare abstract class ViewContainerRef {
|
|
|
11413
11448
|
*/
|
|
11414
11449
|
abstract get element(): ElementRef;
|
|
11415
11450
|
/**
|
|
11416
|
-
* The
|
|
11451
|
+
* The dependency injector for this view container.
|
|
11417
11452
|
*/
|
|
11418
11453
|
abstract get injector(): Injector;
|
|
11419
11454
|
/** @deprecated No replacement */
|
|
@@ -11595,7 +11630,7 @@ declare enum ViewEncapsulation_2 {
|
|
|
11595
11630
|
declare type ViewQueriesFunction<T> = <U extends T>(rf: ɵRenderFlags, ctx: U) => void;
|
|
11596
11631
|
|
|
11597
11632
|
/**
|
|
11598
|
-
* Represents an Angular
|
|
11633
|
+
* Represents an Angular view.
|
|
11599
11634
|
*
|
|
11600
11635
|
* @see {@link ChangeDetectorRef#usage-notes Change detection usage}
|
|
11601
11636
|
*
|
|
@@ -12231,7 +12266,7 @@ export declare enum ɵDeferBlockState {
|
|
|
12231
12266
|
/** The deps tracker to be used in the current Angular app in dev mode. */
|
|
12232
12267
|
export declare const ɵdepsTracker: DepsTracker;
|
|
12233
12268
|
|
|
12234
|
-
export declare function ɵdetectChangesInViewIfRequired(lView: LView, isFirstPass: boolean,
|
|
12269
|
+
export declare function ɵdetectChangesInViewIfRequired(lView: LView, notifyErrorHandler: boolean, isFirstPass: boolean, zonelessEnabled: boolean): void;
|
|
12235
12270
|
|
|
12236
12271
|
|
|
12237
12272
|
export declare function ɵdevModeEqual(a: any, b: any): boolean;
|
|
@@ -12490,9 +12525,6 @@ export declare function ɵgetDeferBlocks(lView: LView, deferBlocks: ɵDeferBlock
|
|
|
12490
12525
|
*/
|
|
12491
12526
|
export declare function ɵgetDirectives(node: Node): {}[];
|
|
12492
12527
|
|
|
12493
|
-
|
|
12494
|
-
export declare function ɵgetEnsureDirtyViewsAreAlwaysReachable(): boolean;
|
|
12495
|
-
|
|
12496
12528
|
/**
|
|
12497
12529
|
* Retrieves the host element of a component or directive instance.
|
|
12498
12530
|
* The host element is the DOM element that matched the selector of the directive.
|
|
@@ -13460,6 +13492,23 @@ export declare interface ɵSafeUrl extends ɵSafeValue {
|
|
|
13460
13492
|
export declare interface ɵSafeValue {
|
|
13461
13493
|
}
|
|
13462
13494
|
|
|
13495
|
+
/**
|
|
13496
|
+
* Configures change detection scheduling when using ZoneJS.
|
|
13497
|
+
*/
|
|
13498
|
+
export declare enum ɵSchedulingMode {
|
|
13499
|
+
/**
|
|
13500
|
+
* Change detection will run when the `NgZone.onMicrotaskEmpty` observable emits.
|
|
13501
|
+
* Change detection will also be scheduled to run whenever Angular is notified
|
|
13502
|
+
* of a change. This includes calling `ChangeDetectorRef.markForCheck`,
|
|
13503
|
+
* setting a `signal` value, and attaching a view.
|
|
13504
|
+
*/
|
|
13505
|
+
Hybrid = 0,
|
|
13506
|
+
/**
|
|
13507
|
+
* Change detection will only run when the `NgZone.onMicrotaskEmpty` observable emits.
|
|
13508
|
+
*/
|
|
13509
|
+
NgZoneOnly = 1
|
|
13510
|
+
}
|
|
13511
|
+
|
|
13463
13512
|
/**
|
|
13464
13513
|
* Control whether the NgModule registration system enforces that each NgModule type registered has
|
|
13465
13514
|
* a unique id.
|
|
@@ -13514,8 +13563,6 @@ export declare function ɵsetCurrentInjector(injector: Injector | null | undefin
|
|
|
13514
13563
|
*/
|
|
13515
13564
|
export declare function ɵsetDocument(document: Document | undefined): void;
|
|
13516
13565
|
|
|
13517
|
-
export declare function ɵsetEnsureDirtyViewsAreAlwaysReachable(v: boolean): void;
|
|
13518
|
-
|
|
13519
13566
|
export declare function ɵsetInjectorProfilerContext(context: ɵInjectorProfilerContext): ɵInjectorProfilerContext;
|
|
13520
13567
|
|
|
13521
13568
|
|
|
@@ -13870,7 +13917,7 @@ export declare function ɵwithDomHydration(): EnvironmentProviders;
|
|
|
13870
13917
|
* Returns a set of providers required to setup support for i18n hydration.
|
|
13871
13918
|
* Requires hydration to be enabled separately.
|
|
13872
13919
|
*/
|
|
13873
|
-
export declare function ɵ
|
|
13920
|
+
export declare function ɵwithI18nSupport(): Provider[];
|
|
13874
13921
|
|
|
13875
13922
|
/**
|
|
13876
13923
|
* Returns a writable type version of type.
|
package/package.json
CHANGED
package/rxjs-interop/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.0.0-next.
|
|
2
|
+
* @license Angular v18.0.0-next.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -140,7 +140,7 @@ export declare interface ToSignalOptions {
|
|
|
140
140
|
injector?: Injector;
|
|
141
141
|
/**
|
|
142
142
|
* Whether the subscription should be automatically cleaned up (via `DestroyRef`) when
|
|
143
|
-
* `
|
|
143
|
+
* `toSignal`'s creation context is destroyed.
|
|
144
144
|
*
|
|
145
145
|
* If manual cleanup is enabled, then `DestroyRef` is not used, and the subscription will persist
|
|
146
146
|
* until the `Observable` itself completes.
|