@angular/core 16.0.0-next.5 → 16.0.0-next.6
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/index.mjs +9 -0
- package/esm2022/rxjs-interop/public_api.mjs +15 -0
- package/esm2022/rxjs-interop/rxjs-interop.mjs +5 -0
- package/esm2022/rxjs-interop/src/from_observable.mjs +46 -0
- package/esm2022/rxjs-interop/src/from_signal.mjs +36 -0
- package/esm2022/rxjs-interop/src/index.mjs +11 -0
- package/esm2022/rxjs-interop/src/take_until_destroyed.mjs +33 -0
- package/esm2022/src/application_ref.mjs +78 -17
- package/esm2022/src/core.mjs +2 -2
- package/esm2022/src/core_private_export.mjs +2 -2
- package/esm2022/src/core_reactivity_export_internal.mjs +1 -1
- package/esm2022/src/errors.mjs +3 -2
- package/esm2022/src/hydration/api.mjs +35 -2
- package/esm2022/src/hydration/cleanup.mjs +11 -19
- package/esm2022/src/linker/component_factory.mjs +1 -1
- package/esm2022/src/linker/template_ref.mjs +2 -2
- package/esm2022/src/linker/view_container_ref.mjs +2 -2
- package/esm2022/src/linker/view_ref.mjs +2 -2
- package/esm2022/src/render3/component_ref.mjs +13 -6
- package/esm2022/src/render3/instructions/element.mjs +2 -1
- package/esm2022/src/render3/instructions/element_container.mjs +1 -2
- package/esm2022/src/render3/instructions/shared.mjs +13 -10
- package/esm2022/src/render3/interfaces/view.mjs +16 -17
- package/esm2022/src/render3/ng_module_ref.mjs +9 -7
- package/esm2022/src/render3/reactive_lview_consumer.mjs +2 -1
- package/esm2022/src/render3/reactivity/effect.mjs +55 -45
- package/esm2022/src/sanitization/sanitization.mjs +3 -3
- package/esm2022/src/signals/index.mjs +2 -1
- package/esm2022/src/signals/src/api.mjs +1 -2
- package/esm2022/src/signals/src/computed.mjs +2 -1
- package/esm2022/src/signals/src/errors.mjs +18 -0
- package/esm2022/src/signals/src/graph.mjs +32 -8
- package/esm2022/src/signals/src/signal.mjs +12 -1
- package/esm2022/src/signals/src/watch.mjs +3 -2
- package/esm2022/src/util/ng_dev_mode.mjs +2 -1
- package/esm2022/src/version.mjs +1 -1
- package/esm2022/testing/src/logger.mjs +3 -3
- package/esm2022/testing/src/ng_zone_mock.mjs +3 -3
- package/esm2022/testing/src/test_bed_compiler.mjs +3 -4
- package/fesm2022/core.mjs +1077 -926
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/rxjs-interop.mjs +104 -0
- package/fesm2022/rxjs-interop.mjs.map +1 -0
- package/fesm2022/testing.mjs +524 -69
- package/fesm2022/testing.mjs.map +1 -1
- package/index.d.ts +142 -41
- package/package.json +7 -1
- package/rxjs-interop/index.d.ts +95 -0
- 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 +319 -319
- package/schematics/ng-generate/standalone-migration/bundle.js.map +1 -1
- package/testing/index.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v16.0.0-next.
|
|
2
|
+
* @license Angular v16.0.0-next.6
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -786,9 +786,9 @@ export declare abstract class ChangeDetectorRef {
|
|
|
786
786
|
declare interface ChangeDetectorRefInterface extends ChangeDetectorRef {
|
|
787
787
|
}
|
|
788
788
|
|
|
789
|
-
declare const CHILD_HEAD =
|
|
789
|
+
declare const CHILD_HEAD = 12;
|
|
790
790
|
|
|
791
|
-
declare const CHILD_TAIL =
|
|
791
|
+
declare const CHILD_TAIL = 13;
|
|
792
792
|
|
|
793
793
|
/**
|
|
794
794
|
* Configures the `Injector` to return an instance of `useClass` for a token.
|
|
@@ -1467,7 +1467,7 @@ export declare abstract class ComponentRef<C> {
|
|
|
1467
1467
|
*/
|
|
1468
1468
|
abstract get instance(): C;
|
|
1469
1469
|
/**
|
|
1470
|
-
* The [host view](guide/glossary#view-
|
|
1470
|
+
* The [host view](guide/glossary#view-hierarchy) defined by the template
|
|
1471
1471
|
* for this component instance.
|
|
1472
1472
|
*/
|
|
1473
1473
|
abstract get hostView(): ViewRef;
|
|
@@ -1843,6 +1843,13 @@ export declare interface CreateEffectOptions {
|
|
|
1843
1843
|
* with the current `DestroyRef`.
|
|
1844
1844
|
*/
|
|
1845
1845
|
manualCleanup?: boolean;
|
|
1846
|
+
/**
|
|
1847
|
+
* Whether the `effect` should allow writing to signals.
|
|
1848
|
+
*
|
|
1849
|
+
* Using effects to synchronize data by writing to signals can lead to confusing and potentially
|
|
1850
|
+
* incorrect behavior, and should be enabled only when necessary.
|
|
1851
|
+
*/
|
|
1852
|
+
allowSignalWrites?: boolean;
|
|
1846
1853
|
}
|
|
1847
1854
|
|
|
1848
1855
|
/**
|
|
@@ -2151,23 +2158,11 @@ export declare class DebugNode {
|
|
|
2151
2158
|
get providerTokens(): any[];
|
|
2152
2159
|
}
|
|
2153
2160
|
|
|
2154
|
-
declare const DECLARATION_COMPONENT_VIEW =
|
|
2161
|
+
declare const DECLARATION_COMPONENT_VIEW = 15;
|
|
2155
2162
|
|
|
2156
|
-
declare const DECLARATION_LCONTAINER =
|
|
2163
|
+
declare const DECLARATION_LCONTAINER = 16;
|
|
2157
2164
|
|
|
2158
|
-
declare const DECLARATION_VIEW =
|
|
2159
|
-
|
|
2160
|
-
/**
|
|
2161
|
-
* Makes `T` read-only at the property level.
|
|
2162
|
-
*
|
|
2163
|
-
* Objects have their properties mapped to `DeepReadonly` types and arrays are converted to
|
|
2164
|
-
* `ReadonlyArray`s of `DeepReadonly` values.
|
|
2165
|
-
*
|
|
2166
|
-
* @developerPreview
|
|
2167
|
-
*/
|
|
2168
|
-
export declare type DeepReadonly<T> = T extends (infer R)[] ? ReadonlyArray<DeepReadonly<R>> : (T extends Function ? T : (T extends object ? {
|
|
2169
|
-
readonly [P in keyof T]: DeepReadonly<T[P]>;
|
|
2170
|
-
} : T));
|
|
2165
|
+
declare const DECLARATION_VIEW = 14;
|
|
2171
2166
|
|
|
2172
2167
|
/**
|
|
2173
2168
|
* Provide this token to set the default currency code your application uses for
|
|
@@ -2942,6 +2937,19 @@ export declare function effect(effectFn: () => EffectCleanupFn | void, options?:
|
|
|
2942
2937
|
*/
|
|
2943
2938
|
export declare type EffectCleanupFn = () => void;
|
|
2944
2939
|
|
|
2940
|
+
/**
|
|
2941
|
+
* Tracks all effects registered within a given application and runs them via `flush`.
|
|
2942
|
+
*/
|
|
2943
|
+
declare class EffectManager {
|
|
2944
|
+
private all;
|
|
2945
|
+
private queue;
|
|
2946
|
+
create(effectFn: () => void, destroyRef: DestroyRef | null, allowSignalWrites: boolean): EffectRef;
|
|
2947
|
+
flush(): void;
|
|
2948
|
+
get isQueueEmpty(): boolean;
|
|
2949
|
+
/** @nocollapse */
|
|
2950
|
+
static ɵprov: unknown;
|
|
2951
|
+
}
|
|
2952
|
+
|
|
2945
2953
|
/**
|
|
2946
2954
|
* A global reactive effect, which can be manually destroyed.
|
|
2947
2955
|
*
|
|
@@ -3009,11 +3017,11 @@ export declare class ElementRef<T = any> {
|
|
|
3009
3017
|
constructor(nativeElement: T);
|
|
3010
3018
|
}
|
|
3011
3019
|
|
|
3012
|
-
declare const EMBEDDED_VIEW_INJECTOR =
|
|
3020
|
+
declare const EMBEDDED_VIEW_INJECTOR = 20;
|
|
3013
3021
|
|
|
3014
3022
|
/**
|
|
3015
3023
|
* Represents an Angular [view](guide/glossary#view) in a view container.
|
|
3016
|
-
* An [embedded view](guide/glossary#view-
|
|
3024
|
+
* An [embedded view](guide/glossary#view-hierarchy) can be referenced from a component
|
|
3017
3025
|
* other than the hosting component whose template defines it, or it can be defined
|
|
3018
3026
|
* independently by a `TemplateRef`.
|
|
3019
3027
|
*
|
|
@@ -3091,6 +3099,8 @@ export declare abstract class EmbeddedViewRef<C> extends ViewRef {
|
|
|
3091
3099
|
*/
|
|
3092
3100
|
export declare function enableProdMode(): void;
|
|
3093
3101
|
|
|
3102
|
+
declare const ENVIRONMENT = 10;
|
|
3103
|
+
|
|
3094
3104
|
/**
|
|
3095
3105
|
* A multi-provider token for initialization functions that will run upon construction of an
|
|
3096
3106
|
* environment injector.
|
|
@@ -3818,7 +3828,7 @@ export declare interface HostListenerDecorator {
|
|
|
3818
3828
|
new (eventName: string, args?: string[]): any;
|
|
3819
3829
|
}
|
|
3820
3830
|
|
|
3821
|
-
declare const HYDRATION =
|
|
3831
|
+
declare const HYDRATION = 22;
|
|
3822
3832
|
|
|
3823
3833
|
declare namespace i0 {
|
|
3824
3834
|
export {
|
|
@@ -4041,7 +4051,7 @@ declare const enum IcuType {
|
|
|
4041
4051
|
plural = 1
|
|
4042
4052
|
}
|
|
4043
4053
|
|
|
4044
|
-
declare const ID =
|
|
4054
|
+
declare const ID = 19;
|
|
4045
4055
|
|
|
4046
4056
|
/**
|
|
4047
4057
|
* Providers that were imported from NgModules via the `importProvidersFrom` function.
|
|
@@ -5238,12 +5248,12 @@ declare interface LView<T = unknown> extends Array<any> {
|
|
|
5238
5248
|
[CONTEXT]: T;
|
|
5239
5249
|
/** An optional Module Injector to be used as fall back after Element Injectors are consulted. */
|
|
5240
5250
|
readonly [INJECTOR_2]: Injector | null;
|
|
5241
|
-
/**
|
|
5242
|
-
|
|
5251
|
+
/**
|
|
5252
|
+
* Contextual data that is shared across multiple instances of `LView` in the same application.
|
|
5253
|
+
*/
|
|
5254
|
+
[ENVIRONMENT]: LViewEnvironment;
|
|
5243
5255
|
/** Renderer to be used for this view. */
|
|
5244
5256
|
[RENDERER]: Renderer;
|
|
5245
|
-
/** An optional custom sanitizer. */
|
|
5246
|
-
[SANITIZER]: Sanitizer | null;
|
|
5247
5257
|
/**
|
|
5248
5258
|
* Reference to the first LView or LContainer beneath this LView in
|
|
5249
5259
|
* the hierarchy.
|
|
@@ -5402,6 +5412,18 @@ declare interface LView<T = unknown> extends Array<any> {
|
|
|
5402
5412
|
[REACTIVE_HOST_BINDING_CONSUMER]: ReactiveLViewConsumer | null;
|
|
5403
5413
|
}
|
|
5404
5414
|
|
|
5415
|
+
/**
|
|
5416
|
+
* Contextual data that is shared across multiple instances of `LView` in the same application.
|
|
5417
|
+
*/
|
|
5418
|
+
declare interface LViewEnvironment {
|
|
5419
|
+
/** Factory to be used for creating Renderer. */
|
|
5420
|
+
rendererFactory: RendererFactory;
|
|
5421
|
+
/** An optional custom sanitizer. */
|
|
5422
|
+
sanitizer: Sanitizer | null;
|
|
5423
|
+
/** Container for reactivity system `effect`s. */
|
|
5424
|
+
effectManager: EffectManager | null;
|
|
5425
|
+
}
|
|
5426
|
+
|
|
5405
5427
|
/** Flags associated with an LView (saved in LView[FLAGS]) */
|
|
5406
5428
|
declare const enum LViewFlags {
|
|
5407
5429
|
/** The state of the init phase on the first 2 bits */
|
|
@@ -5967,6 +5989,57 @@ export declare class NgZone {
|
|
|
5967
5989
|
runOutsideAngular<T>(fn: (...args: any[]) => T): T;
|
|
5968
5990
|
}
|
|
5969
5991
|
|
|
5992
|
+
/**
|
|
5993
|
+
* Used to configure event and run coalescing with `provideZoneChangeDetection`.
|
|
5994
|
+
*
|
|
5995
|
+
* @publicApi
|
|
5996
|
+
*
|
|
5997
|
+
* @see provideZoneChangeDetection
|
|
5998
|
+
*/
|
|
5999
|
+
export declare interface NgZoneOptions {
|
|
6000
|
+
/**
|
|
6001
|
+
* Optionally specify coalescing event change detections or not.
|
|
6002
|
+
* Consider the following case.
|
|
6003
|
+
*
|
|
6004
|
+
* ```
|
|
6005
|
+
* <div (click)="doSomething()">
|
|
6006
|
+
* <button (click)="doSomethingElse()"></button>
|
|
6007
|
+
* </div>
|
|
6008
|
+
* ```
|
|
6009
|
+
*
|
|
6010
|
+
* When button is clicked, because of the event bubbling, both
|
|
6011
|
+
* event handlers will be called and 2 change detections will be
|
|
6012
|
+
* triggered. We can coalesce such kind of events to only trigger
|
|
6013
|
+
* change detection only once.
|
|
6014
|
+
*
|
|
6015
|
+
* By default, this option will be false. So the events will not be
|
|
6016
|
+
* coalesced and the change detection will be triggered multiple times.
|
|
6017
|
+
* And if this option be set to true, the change detection will be
|
|
6018
|
+
* triggered async by scheduling a animation frame. So in the case above,
|
|
6019
|
+
* the change detection will only be triggered once.
|
|
6020
|
+
*/
|
|
6021
|
+
eventCoalescing?: boolean;
|
|
6022
|
+
/**
|
|
6023
|
+
* Optionally specify if `NgZone#run()` method invocations should be coalesced
|
|
6024
|
+
* into a single change detection.
|
|
6025
|
+
*
|
|
6026
|
+
* Consider the following case.
|
|
6027
|
+
* ```
|
|
6028
|
+
* for (let i = 0; i < 10; i ++) {
|
|
6029
|
+
* ngZone.run(() => {
|
|
6030
|
+
* // do something
|
|
6031
|
+
* });
|
|
6032
|
+
* }
|
|
6033
|
+
* ```
|
|
6034
|
+
*
|
|
6035
|
+
* This case triggers the change detection multiple times.
|
|
6036
|
+
* With ngZoneRunCoalescing options, all change detections in an event loop trigger only once.
|
|
6037
|
+
* In addition, the change detection executes in requestAnimation.
|
|
6038
|
+
*
|
|
6039
|
+
*/
|
|
6040
|
+
runCoalescing?: boolean;
|
|
6041
|
+
}
|
|
6042
|
+
|
|
5970
6043
|
/**
|
|
5971
6044
|
* Defines a schema that allows any property on any element.
|
|
5972
6045
|
*
|
|
@@ -5982,7 +6055,7 @@ declare const NODES = "n";
|
|
|
5982
6055
|
|
|
5983
6056
|
declare const NUM_ROOT_NODES = "r";
|
|
5984
6057
|
|
|
5985
|
-
declare const ON_DESTROY_HOOKS =
|
|
6058
|
+
declare const ON_DESTROY_HOOKS = 21;
|
|
5986
6059
|
|
|
5987
6060
|
/**
|
|
5988
6061
|
* @description
|
|
@@ -6391,7 +6464,7 @@ export declare interface Predicate<T> {
|
|
|
6391
6464
|
(value: T): boolean;
|
|
6392
6465
|
}
|
|
6393
6466
|
|
|
6394
|
-
declare const PREORDER_HOOK_FLAGS =
|
|
6467
|
+
declare const PREORDER_HOOK_FLAGS = 17;
|
|
6395
6468
|
|
|
6396
6469
|
/** More flags associated with an LView (saved in LView[PREORDER_HOOK_FLAGS]) */
|
|
6397
6470
|
declare const enum PreOrderHookFlags {
|
|
@@ -6467,6 +6540,28 @@ export declare type Provider = TypeProvider | ValueProvider | ClassProvider | Co
|
|
|
6467
6540
|
*/
|
|
6468
6541
|
export declare type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToken<T>;
|
|
6469
6542
|
|
|
6543
|
+
/**
|
|
6544
|
+
* Provides `NgZone`-based change detection for the application bootstrapped using
|
|
6545
|
+
* `bootstrapApplication`.
|
|
6546
|
+
*
|
|
6547
|
+
* `NgZone` is already provided in applications by default. This provider allows you to configure
|
|
6548
|
+
* options like `eventCoalescing` in the `NgZone`.
|
|
6549
|
+
* This provider is not available for `platformBrowser().bootstrapModule`, which uses
|
|
6550
|
+
* `BootstrapOptions` instead.
|
|
6551
|
+
*
|
|
6552
|
+
* @usageNotes
|
|
6553
|
+
* ```typescript=
|
|
6554
|
+
* bootstrapApplication(MyApp, {providers: [
|
|
6555
|
+
* provideZoneChangeDetection({eventCoalescing: true}),
|
|
6556
|
+
* ]});
|
|
6557
|
+
* ```
|
|
6558
|
+
*
|
|
6559
|
+
* @publicApi
|
|
6560
|
+
* @see bootstrapApplication
|
|
6561
|
+
* @see NgZoneOptions
|
|
6562
|
+
*/
|
|
6563
|
+
export declare function provideZoneChangeDetection(options?: NgZoneOptions): EnvironmentProviders;
|
|
6564
|
+
|
|
6470
6565
|
/**
|
|
6471
6566
|
* Testability API.
|
|
6472
6567
|
* `declare` keyword causes tsickle to generate externs, so these methods are
|
|
@@ -6479,7 +6574,7 @@ declare interface PublicTestability {
|
|
|
6479
6574
|
findProviders(using: any, provider: string, exactMatch: boolean): any[];
|
|
6480
6575
|
}
|
|
6481
6576
|
|
|
6482
|
-
declare const QUERIES =
|
|
6577
|
+
declare const QUERIES = 18;
|
|
6483
6578
|
|
|
6484
6579
|
/**
|
|
6485
6580
|
* Type of the Query metadata.
|
|
@@ -6840,11 +6935,12 @@ declare interface RDomTokenList {
|
|
|
6840
6935
|
remove(token: string): void;
|
|
6841
6936
|
}
|
|
6842
6937
|
|
|
6843
|
-
declare const REACTIVE_HOST_BINDING_CONSUMER =
|
|
6938
|
+
declare const REACTIVE_HOST_BINDING_CONSUMER = 24;
|
|
6844
6939
|
|
|
6845
|
-
declare const REACTIVE_TEMPLATE_CONSUMER =
|
|
6940
|
+
declare const REACTIVE_TEMPLATE_CONSUMER = 23;
|
|
6846
6941
|
|
|
6847
6942
|
declare class ReactiveLViewConsumer extends ReactiveNode {
|
|
6943
|
+
protected consumerAllowSignalWrites: boolean;
|
|
6848
6944
|
private _lView;
|
|
6849
6945
|
set lView(lView: LView);
|
|
6850
6946
|
protected onConsumerDependencyMayHaveChanged(): void;
|
|
@@ -6908,6 +7004,10 @@ declare abstract class ReactiveNode {
|
|
|
6908
7004
|
* semantically changes.
|
|
6909
7005
|
*/
|
|
6910
7006
|
protected valueVersion: number;
|
|
7007
|
+
/**
|
|
7008
|
+
* Whether signal writes should be allowed while this `ReactiveNode` is the current consumer.
|
|
7009
|
+
*/
|
|
7010
|
+
protected abstract readonly consumerAllowSignalWrites: boolean;
|
|
6911
7011
|
/**
|
|
6912
7012
|
* Called for consumers whenever one of their dependencies notifies that it might have a new
|
|
6913
7013
|
* value.
|
|
@@ -6938,6 +7038,11 @@ declare abstract class ReactiveNode {
|
|
|
6938
7038
|
* Whether this consumer currently has any producers registered.
|
|
6939
7039
|
*/
|
|
6940
7040
|
protected get hasProducers(): boolean;
|
|
7041
|
+
/**
|
|
7042
|
+
* Whether this `ReactiveNode` in its producer capacity is currently allowed to initiate updates,
|
|
7043
|
+
* based on the current consumer context.
|
|
7044
|
+
*/
|
|
7045
|
+
protected get producerUpdatesAllowed(): boolean;
|
|
6941
7046
|
/**
|
|
6942
7047
|
* Checks if a `Producer` has a current value which is different than the value
|
|
6943
7048
|
* last seen at a specific version by a `Consumer` which recorded a dependency on
|
|
@@ -7504,8 +7609,6 @@ export declare abstract class Renderer2 {
|
|
|
7504
7609
|
abstract listen(target: 'window' | 'document' | 'body' | any, eventName: string, callback: (event: any) => boolean | void): () => void;
|
|
7505
7610
|
}
|
|
7506
7611
|
|
|
7507
|
-
declare const RENDERER_FACTORY = 10;
|
|
7508
|
-
|
|
7509
7612
|
declare interface RendererFactory {
|
|
7510
7613
|
createRenderer(hostElement: RElement | null, rendererType: RendererType2 | null): Renderer;
|
|
7511
7614
|
begin?(): void;
|
|
@@ -7772,6 +7875,7 @@ declare const enum RuntimeErrorCode {
|
|
|
7772
7875
|
UNSUPPORTED_PROJECTION_DOM_NODES = 503,
|
|
7773
7876
|
INVALID_SKIP_HYDRATION_HOST = 504,
|
|
7774
7877
|
HYDRATION_I18N_NOT_YET_SUPPORTED = 518,
|
|
7878
|
+
SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT = 600,
|
|
7775
7879
|
INVALID_I18N_STRUCTURE = 700,
|
|
7776
7880
|
MISSING_LOCALE_DATA = 701,
|
|
7777
7881
|
IMPORT_PROVIDERS_FROM_STANDALONE = 800,
|
|
@@ -7788,8 +7892,6 @@ declare const enum RuntimeErrorCode {
|
|
|
7788
7892
|
UNSAFE_IFRAME_ATTRS = -910
|
|
7789
7893
|
}
|
|
7790
7894
|
|
|
7791
|
-
declare const SANITIZER = 12;
|
|
7792
|
-
|
|
7793
7895
|
/**
|
|
7794
7896
|
* Sanitizer is used by the views to sanitize potentially dangerous values.
|
|
7795
7897
|
*
|
|
@@ -8001,7 +8103,7 @@ declare const SIGNAL: unique symbol;
|
|
|
8001
8103
|
*
|
|
8002
8104
|
* @developerPreview
|
|
8003
8105
|
*/
|
|
8004
|
-
export declare type Signal<T> = (() =>
|
|
8106
|
+
export declare type Signal<T> = (() => T) & {
|
|
8005
8107
|
[SIGNAL]: unknown;
|
|
8006
8108
|
};
|
|
8007
8109
|
|
|
@@ -10041,7 +10143,7 @@ export declare interface ViewChildrenDecorator {
|
|
|
10041
10143
|
* (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).
|
|
10042
10144
|
*
|
|
10043
10145
|
* A view container instance can contain other view containers,
|
|
10044
|
-
* creating a [view hierarchy](guide/glossary#view-
|
|
10146
|
+
* creating a [view hierarchy](guide/glossary#view-hierarchy).
|
|
10045
10147
|
*
|
|
10046
10148
|
* @see `ComponentRef`
|
|
10047
10149
|
* @see `EmbeddedViewRef`
|
|
@@ -11503,8 +11605,6 @@ export declare const enum ɵProfilerEvent {
|
|
|
11503
11605
|
*/
|
|
11504
11606
|
export declare function ɵprovideHydrationSupport(): EnvironmentProviders;
|
|
11505
11607
|
|
|
11506
|
-
export declare function ɵprovideNgZoneChangeDetection(ngZone: NgZone): StaticProvider[];
|
|
11507
|
-
|
|
11508
11608
|
/**
|
|
11509
11609
|
* Publishes a collection of default debug tools onto`window.ng`.
|
|
11510
11610
|
*
|
|
@@ -11675,7 +11775,8 @@ export declare function ɵresolveComponentResources(resourceResolver: (url: stri
|
|
|
11675
11775
|
*
|
|
11676
11776
|
* Note: the `message` argument contains a descriptive error message as a string in development
|
|
11677
11777
|
* mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the
|
|
11678
|
-
* `message` argument becomes `false`, thus we account for it in the typings and the runtime
|
|
11778
|
+
* `message` argument becomes `false`, thus we account for it in the typings and the runtime
|
|
11779
|
+
* logic.
|
|
11679
11780
|
*/
|
|
11680
11781
|
export declare class ɵRuntimeError<T extends number = RuntimeErrorCode> extends Error {
|
|
11681
11782
|
code: T;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/core",
|
|
3
|
-
"version": "16.0.0-next.
|
|
3
|
+
"version": "16.0.0-next.6",
|
|
4
4
|
"description": "Angular - the core framework",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,6 +20,12 @@
|
|
|
20
20
|
"esm": "./esm2022/core.mjs",
|
|
21
21
|
"default": "./fesm2022/core.mjs"
|
|
22
22
|
},
|
|
23
|
+
"./rxjs-interop": {
|
|
24
|
+
"types": "./rxjs-interop/index.d.ts",
|
|
25
|
+
"esm2022": "./esm2022/rxjs-interop/rxjs-interop.mjs",
|
|
26
|
+
"esm": "./esm2022/rxjs-interop/rxjs-interop.mjs",
|
|
27
|
+
"default": "./fesm2022/rxjs-interop.mjs"
|
|
28
|
+
},
|
|
23
29
|
"./testing": {
|
|
24
30
|
"types": "./testing/index.d.ts",
|
|
25
31
|
"esm2022": "./esm2022/testing/testing.mjs",
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Angular v16.0.0-next.6
|
|
3
|
+
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
|
+
* License: MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
import { DestroyRef } from '@angular/core';
|
|
9
|
+
import { Injector } from '@angular/core';
|
|
10
|
+
import { MonoTypeOperatorFunction } from 'rxjs';
|
|
11
|
+
import { Observable } from 'rxjs';
|
|
12
|
+
import { Signal } from '@angular/core';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get the current value of an `Observable` as a reactive `Signal`.
|
|
16
|
+
*
|
|
17
|
+
* `fromObservable` returns a `Signal` which provides synchronous reactive access to values produced
|
|
18
|
+
* by the given `Observable`, by subscribing to that `Observable`. The returned `Signal` will always
|
|
19
|
+
* have the most recent value emitted by the subscription, and will throw an error if the
|
|
20
|
+
* `Observable` errors.
|
|
21
|
+
*
|
|
22
|
+
* The subscription will last for the lifetime of the current injection context. That is, if
|
|
23
|
+
* `fromObservable` is called from a component context, the subscription will be cleaned up when the
|
|
24
|
+
* component is destroyed. When called outside of a component, the current `EnvironmentInjector`'s
|
|
25
|
+
* lifetime will be used (which is typically the lifetime of the application itself).
|
|
26
|
+
*
|
|
27
|
+
* If the `Observable` does not produce a value before the `Signal` is read, the `Signal` will throw
|
|
28
|
+
* an error. To avoid this, use a synchronous `Observable` (potentially created with the `startWith`
|
|
29
|
+
* operator) or pass an initial value to `fromObservable` as the second argument.
|
|
30
|
+
*
|
|
31
|
+
* `fromObservable` must be called in an injection context.
|
|
32
|
+
*/
|
|
33
|
+
export declare function fromObservable<T>(source: Observable<T>): Signal<T>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get the current value of an `Observable` as a reactive `Signal`.
|
|
37
|
+
*
|
|
38
|
+
* `fromObservable` returns a `Signal` which provides synchronous reactive access to values produced
|
|
39
|
+
* by the given `Observable`, by subscribing to that `Observable`. The returned `Signal` will always
|
|
40
|
+
* have the most recent value emitted by the subscription, and will throw an error if the
|
|
41
|
+
* `Observable` errors.
|
|
42
|
+
*
|
|
43
|
+
* The subscription will last for the lifetime of the current injection context. That is, if
|
|
44
|
+
* `fromObservable` is called from a component context, the subscription will be cleaned up when the
|
|
45
|
+
* component is destroyed. When called outside of a component, the current `EnvironmentInjector`'s
|
|
46
|
+
* lifetime will be used (which is typically the lifetime of the application itself).
|
|
47
|
+
*
|
|
48
|
+
* Before the `Observable` emits its first value, the `Signal` will return the configured
|
|
49
|
+
* `initialValue`. If the `Observable` is known to produce a value before the `Signal` will be read,
|
|
50
|
+
* `initialValue` does not need to be passed.
|
|
51
|
+
*
|
|
52
|
+
* `fromObservable` must be called in an injection context.
|
|
53
|
+
*
|
|
54
|
+
* @developerPreview
|
|
55
|
+
*/
|
|
56
|
+
export declare function fromObservable<T, U extends T | null | undefined>(source: Observable<T>, initialValue: U): Signal<T | U>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Exposes the value of an Angular `Signal` as an RxJS `Observable`.
|
|
60
|
+
*
|
|
61
|
+
* The signal's value will be propagated into the `Observable`'s subscribers using an `effect`.
|
|
62
|
+
*
|
|
63
|
+
* `fromSignal` must be called in an injection context.
|
|
64
|
+
*
|
|
65
|
+
* @developerPreview
|
|
66
|
+
*/
|
|
67
|
+
export declare function fromSignal<T>(source: Signal<T>, options?: FromSignalOptions): Observable<T>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Options for `fromSignal`.
|
|
71
|
+
*
|
|
72
|
+
* @developerPreview
|
|
73
|
+
*/
|
|
74
|
+
export declare interface FromSignalOptions {
|
|
75
|
+
/**
|
|
76
|
+
* The `Injector` to use when creating the effect.
|
|
77
|
+
*
|
|
78
|
+
* If this isn't specified, the current injection context will be used.
|
|
79
|
+
*/
|
|
80
|
+
injector?: Injector;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Operator which completes the Observable when the calling context (component, directive, service,
|
|
85
|
+
* etc) is destroyed.
|
|
86
|
+
*
|
|
87
|
+
* @param destroyRef optionally, the `DestroyRef` representing the current context. This can be
|
|
88
|
+
* passed explicitly to use `takeUntilDestroyed` outside of an injection context. Otherwise, the
|
|
89
|
+
* current `DestroyRef` is injected.
|
|
90
|
+
*
|
|
91
|
+
* @developerPreview
|
|
92
|
+
*/
|
|
93
|
+
export declare function takeUntilDestroyed<T>(destroyRef?: DestroyRef): MonoTypeOperatorFunction<T>;
|
|
94
|
+
|
|
95
|
+
export { }
|
|
@@ -60,7 +60,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
// bazel-out/
|
|
63
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/migrations/guard-and-resolve-interfaces/index.mjs
|
|
64
64
|
var guard_and_resolve_interfaces_exports = {};
|
|
65
65
|
__export(guard_and_resolve_interfaces_exports, {
|
|
66
66
|
default: () => guard_and_resolve_interfaces_default
|
|
@@ -69,7 +69,7 @@ module.exports = __toCommonJS(guard_and_resolve_interfaces_exports);
|
|
|
69
69
|
var import_schematics = require("@angular-devkit/schematics");
|
|
70
70
|
var import_path3 = require("path");
|
|
71
71
|
|
|
72
|
-
// bazel-out/
|
|
72
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/utils/project_tsconfig_paths.mjs
|
|
73
73
|
var import_core = require("@angular-devkit/core");
|
|
74
74
|
function getProjectTsConfigPaths(tree) {
|
|
75
75
|
return __async(this, null, function* () {
|
|
@@ -149,11 +149,11 @@ function getWorkspace(tree) {
|
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
// bazel-out/
|
|
152
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
153
153
|
var import_path = require("path");
|
|
154
154
|
var import_typescript2 = __toESM(require("typescript"), 1);
|
|
155
155
|
|
|
156
|
-
// bazel-out/
|
|
156
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/utils/typescript/parse_tsconfig.mjs
|
|
157
157
|
var path = __toESM(require("path"), 1);
|
|
158
158
|
var import_typescript = __toESM(require("typescript"), 1);
|
|
159
159
|
function parseTsconfigFile(tsconfigPath, basePath) {
|
|
@@ -170,7 +170,7 @@ function parseTsconfigFile(tsconfigPath, basePath) {
|
|
|
170
170
|
return import_typescript.default.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
// bazel-out/
|
|
173
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/utils/typescript/compiler_host.mjs
|
|
174
174
|
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
|
|
175
175
|
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles);
|
|
176
176
|
return import_typescript2.default.createProgram(rootNames, options, host);
|
|
@@ -203,13 +203,13 @@ function canMigrateFile(basePath, sourceFile, program) {
|
|
|
203
203
|
return !(0, import_path.relative)(basePath, sourceFile.fileName).startsWith("..");
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
// bazel-out/
|
|
206
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/migrations/guard-and-resolve-interfaces/util.mjs
|
|
207
207
|
var import_typescript7 = __toESM(require("typescript"), 1);
|
|
208
208
|
|
|
209
|
-
// bazel-out/
|
|
209
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
|
|
210
210
|
var import_typescript4 = __toESM(require("typescript"), 1);
|
|
211
211
|
|
|
212
|
-
// bazel-out/
|
|
212
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/utils/import_manager.mjs
|
|
213
213
|
var import_path2 = require("path");
|
|
214
214
|
var import_typescript3 = __toESM(require("typescript"), 1);
|
|
215
215
|
var ImportManager = class {
|
|
@@ -393,7 +393,7 @@ ${text}`;
|
|
|
393
393
|
}
|
|
394
394
|
};
|
|
395
395
|
|
|
396
|
-
// bazel-out/
|
|
396
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/utils/change_tracker.mjs
|
|
397
397
|
var ChangeTracker = class {
|
|
398
398
|
constructor(_printer, _importRemapper) {
|
|
399
399
|
__publicField(this, "_printer");
|
|
@@ -449,7 +449,7 @@ function normalizePath(path2) {
|
|
|
449
449
|
return path2.replace(/\\/g, "/");
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
-
// bazel-out/
|
|
452
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/utils/typescript/imports.mjs
|
|
453
453
|
var import_typescript5 = __toESM(require("typescript"), 1);
|
|
454
454
|
function getImportOfIdentifier(typeChecker, node) {
|
|
455
455
|
const symbol = typeChecker.getSymbolAtLocation(node);
|
|
@@ -521,7 +521,7 @@ function findImportSpecifier(nodes, specifierName) {
|
|
|
521
521
|
});
|
|
522
522
|
}
|
|
523
523
|
|
|
524
|
-
// bazel-out/
|
|
524
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/utils/typescript/nodes.mjs
|
|
525
525
|
var import_typescript6 = __toESM(require("typescript"), 1);
|
|
526
526
|
function closestNode(node, predicate) {
|
|
527
527
|
let current = node.parent;
|
|
@@ -534,7 +534,7 @@ function closestNode(node, predicate) {
|
|
|
534
534
|
return null;
|
|
535
535
|
}
|
|
536
536
|
|
|
537
|
-
// bazel-out/
|
|
537
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/migrations/guard-and-resolve-interfaces/util.mjs
|
|
538
538
|
var deprecatedInterfaces = /* @__PURE__ */ new Set(["CanLoad", "CanMatch", "CanActivate", "CanDeactivate", "CanActivateChild", "Resolve"]);
|
|
539
539
|
var routerModule = "@angular/router";
|
|
540
540
|
function migrateFile(sourceFile, typeChecker, rewriteFn) {
|
|
@@ -647,7 +647,7 @@ function visitTypeReference(typeReference, typeChecker, changeTracker, sourceFil
|
|
|
647
647
|
import_typescript7.default.forEachChild(typeReference, visitTypeReferenceChildren);
|
|
648
648
|
}
|
|
649
649
|
|
|
650
|
-
// bazel-out/
|
|
650
|
+
// bazel-out/darwin-fastbuild/bin/packages/core/schematics/migrations/guard-and-resolve-interfaces/index.mjs
|
|
651
651
|
function guard_and_resolve_interfaces_default() {
|
|
652
652
|
return (tree) => __async(this, null, function* () {
|
|
653
653
|
const { buildPaths, testPaths } = yield getProjectTsConfigPaths(tree);
|