@angular/core 16.0.0-next.0 → 16.0.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.
- package/esm2020/src/application_config.mjs +21 -0
- package/esm2020/src/application_init.mjs +23 -31
- package/esm2020/src/application_module.mjs +3 -2
- package/esm2020/src/application_ref.mjs +35 -33
- package/esm2020/src/application_tokens.mjs +2 -13
- package/esm2020/src/change_detection/change_detection.mjs +2 -2
- package/esm2020/src/change_detection/change_detector_ref.mjs +3 -2
- package/esm2020/src/change_detection/constants.mjs +1 -49
- package/esm2020/src/change_detection/differs/iterable_differs.mjs +3 -2
- package/esm2020/src/change_detection/differs/keyvalue_differs.mjs +3 -2
- package/esm2020/src/console.mjs +3 -2
- package/esm2020/src/core.mjs +4 -3
- package/esm2020/src/core_private_export.mjs +6 -7
- package/esm2020/src/core_render3_private_export.mjs +3 -1
- package/esm2020/src/debug/debug_node.mjs +1 -5
- package/esm2020/src/di/injector.mjs +3 -2
- package/esm2020/src/di/r3_injector.mjs +5 -1
- package/esm2020/src/di/reflective_injector.mjs +3 -2
- package/esm2020/src/hydration/annotate.mjs +140 -0
- package/esm2020/src/hydration/api.mjs +120 -0
- package/esm2020/src/hydration/error_handling.mjs +29 -0
- package/esm2020/src/hydration/interfaces.mjs +10 -0
- package/esm2020/src/hydration/node_lookup_utils.mjs +75 -0
- package/esm2020/src/hydration/skip_hydration.mjs +34 -0
- package/esm2020/src/hydration/tokens.mjs +25 -0
- package/esm2020/src/hydration/utils.mjs +131 -0
- package/esm2020/src/linker/compiler.mjs +3 -2
- package/esm2020/src/linker/component_factory_resolver.mjs +3 -2
- package/esm2020/src/linker/destroy_ref.mjs +41 -0
- package/esm2020/src/linker/element_ref.mjs +3 -2
- package/esm2020/src/linker/query_list.mjs +6 -7
- package/esm2020/src/linker/template_ref.mjs +6 -5
- package/esm2020/src/linker/view_container_ref.mjs +3 -2
- package/esm2020/src/linker.mjs +2 -1
- package/esm2020/src/render/api.mjs +3 -2
- package/esm2020/src/render3/component_ref.mjs +16 -9
- package/esm2020/src/render3/features/standalone_feature.mjs +1 -1
- package/esm2020/src/render3/fields.mjs +10 -1
- package/esm2020/src/render3/hooks.mjs +3 -2
- package/esm2020/src/render3/i18n/i18n_util.mjs +3 -3
- package/esm2020/src/render3/instructions/element.mjs +56 -13
- package/esm2020/src/render3/instructions/element_container.mjs +54 -9
- package/esm2020/src/render3/instructions/listener.mjs +3 -3
- package/esm2020/src/render3/instructions/shared.mjs +40 -24
- package/esm2020/src/render3/instructions/template.mjs +2 -2
- package/esm2020/src/render3/instructions/text.mjs +36 -5
- package/esm2020/src/render3/interfaces/definition.mjs +1 -1
- package/esm2020/src/render3/interfaces/node.mjs +1 -1
- package/esm2020/src/render3/interfaces/renderer_dom.mjs +1 -1
- package/esm2020/src/render3/interfaces/view.mjs +4 -2
- package/esm2020/src/render3/jit/directive.mjs +1 -2
- package/esm2020/src/render3/node_manipulation.mjs +25 -14
- package/esm2020/src/render3/state.mjs +45 -1
- package/esm2020/src/render3/util/view_utils.mjs +11 -2
- package/esm2020/src/render3/view_ref.mjs +4 -3
- package/esm2020/src/sanitization/sanitizer.mjs +3 -2
- package/esm2020/src/testability/testability.mjs +5 -3
- package/esm2020/src/transfer_state.mjs +153 -0
- package/esm2020/src/util/iterable.mjs +6 -7
- package/esm2020/src/util/lang.mjs +1 -11
- package/esm2020/src/util/ng_dev_mode.mjs +3 -1
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +6 -5
- package/esm2020/testing/src/ng_zone_mock.mjs +6 -5
- package/esm2020/testing/src/test_bed.mjs +3 -2
- package/fesm2015/core.mjs +1076 -297
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +747 -159
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +1066 -295
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +741 -159
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +290 -87
- package/package.json +3 -3
- package/schematics/migrations/router-link-with-href/bundle.js.map +2 -2
- package/schematics/ng-generate/standalone-migration/bundle.js +1044 -1024
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
- package/esm2020/src/util/symbol.mjs +0 -30
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.2
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -273,20 +273,31 @@ export declare const APP_INITIALIZER: InjectionToken<readonly (() => Observable<
|
|
|
273
273
|
|
|
274
274
|
declare function _appIdRandomProviderFactory(): string;
|
|
275
275
|
|
|
276
|
+
/**
|
|
277
|
+
* Set of config options available during the application bootstrap operation.
|
|
278
|
+
*
|
|
279
|
+
* @publicApi
|
|
280
|
+
*/
|
|
281
|
+
export declare interface ApplicationConfig {
|
|
282
|
+
/**
|
|
283
|
+
* List of providers that should be available to the root component and all its children.
|
|
284
|
+
*/
|
|
285
|
+
providers: Array<Provider | EnvironmentProviders>;
|
|
286
|
+
}
|
|
287
|
+
|
|
276
288
|
/**
|
|
277
289
|
* A class that reflects the state of running {@link APP_INITIALIZER} functions.
|
|
278
290
|
*
|
|
279
291
|
* @publicApi
|
|
280
292
|
*/
|
|
281
293
|
export declare class ApplicationInitStatus {
|
|
282
|
-
private readonly appInits;
|
|
283
294
|
private resolve;
|
|
284
295
|
private reject;
|
|
285
296
|
private initialized;
|
|
286
|
-
readonly donePromise: Promise<any>;
|
|
287
297
|
readonly done = false;
|
|
288
|
-
|
|
289
|
-
|
|
298
|
+
readonly donePromise: Promise<any>;
|
|
299
|
+
private readonly appInits;
|
|
300
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationInitStatus, never>;
|
|
290
301
|
static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationInitStatus>;
|
|
291
302
|
}
|
|
292
303
|
|
|
@@ -401,7 +412,6 @@ export declare class ApplicationRef {
|
|
|
401
412
|
private _zone;
|
|
402
413
|
private _injector;
|
|
403
414
|
private _exceptionHandler;
|
|
404
|
-
private _views;
|
|
405
415
|
private _runningTick;
|
|
406
416
|
private _stable;
|
|
407
417
|
private _onMicrotaskEmptySubscription;
|
|
@@ -2174,6 +2184,46 @@ export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, Iter
|
|
|
2174
2184
|
*/
|
|
2175
2185
|
export declare const defineInjectable: typeof ɵɵdefineInjectable;
|
|
2176
2186
|
|
|
2187
|
+
/**
|
|
2188
|
+
* Represents a hydration-related element container structure
|
|
2189
|
+
* at runtime, which includes a reference to a first node in
|
|
2190
|
+
* a DOM segment that corresponds to a given element container.
|
|
2191
|
+
*/
|
|
2192
|
+
declare interface DehydratedElementContainer {
|
|
2193
|
+
/**
|
|
2194
|
+
* A reference to the first child in a DOM segment associated
|
|
2195
|
+
* with a first child in a given <ng-container>.
|
|
2196
|
+
*/
|
|
2197
|
+
firstChild: RNode | null;
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
/**
|
|
2201
|
+
* An object that contains hydration-related information serialized
|
|
2202
|
+
* on the server, as well as the necessary references to segments of
|
|
2203
|
+
* the DOM, to facilitate the hydration process for a given hydration
|
|
2204
|
+
* boundary on the client.
|
|
2205
|
+
*/
|
|
2206
|
+
declare interface DehydratedView {
|
|
2207
|
+
/**
|
|
2208
|
+
* The readonly hydration annotation data.
|
|
2209
|
+
*/
|
|
2210
|
+
data: Readonly<SerializedView>;
|
|
2211
|
+
/**
|
|
2212
|
+
* A reference to the first child in a DOM segment associated
|
|
2213
|
+
* with a given hydration boundary.
|
|
2214
|
+
*/
|
|
2215
|
+
firstChild: RNode | null;
|
|
2216
|
+
/**
|
|
2217
|
+
* Collection of <ng-container>s in a given view,
|
|
2218
|
+
* used as a set of pointers to first children in each
|
|
2219
|
+
* <ng-container>, so that those pointers are reused by
|
|
2220
|
+
* subsequent instructions.
|
|
2221
|
+
*/
|
|
2222
|
+
ngContainers?: {
|
|
2223
|
+
[index: number]: DehydratedElementContainer;
|
|
2224
|
+
};
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2177
2227
|
declare type DependencyTypeList = (ɵDirectiveType<any> | ɵComponentType<any> | PipeType<any> | Type<any>)[];
|
|
2178
2228
|
|
|
2179
2229
|
/**
|
|
@@ -2204,6 +2254,20 @@ declare type DestroyHookData = (HookEntry | HookData)[];
|
|
|
2204
2254
|
*/
|
|
2205
2255
|
export declare function destroyPlatform(): void;
|
|
2206
2256
|
|
|
2257
|
+
|
|
2258
|
+
/**
|
|
2259
|
+
* `DestroyRef` lets you set callbacks to run for any cleanup or destruction behavior.
|
|
2260
|
+
* The scope of this destruction depends on where `DestroyRef` is injected. If `DestroyRef`
|
|
2261
|
+
* is injected in a component or directive, the callbacks run when that component or
|
|
2262
|
+
* directive is destroyed. Otherwise the callbacks run when a corresponding injector is destroyed.
|
|
2263
|
+
*/
|
|
2264
|
+
export declare abstract class DestroyRef {
|
|
2265
|
+
/**
|
|
2266
|
+
* Registers a destroy callback in a given lifecycle scope.
|
|
2267
|
+
*/
|
|
2268
|
+
abstract onDestroy(callback: () => void): void;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2207
2271
|
/**
|
|
2208
2272
|
* Directive decorator and metadata.
|
|
2209
2273
|
*
|
|
@@ -2677,6 +2741,8 @@ export declare interface Effect {
|
|
|
2677
2741
|
*/
|
|
2678
2742
|
export declare function effect(effectFn: () => void): Effect;
|
|
2679
2743
|
|
|
2744
|
+
declare const ELEMENT_CONTAINERS = "e";
|
|
2745
|
+
|
|
2680
2746
|
/**
|
|
2681
2747
|
* Marks that the next string is an element name.
|
|
2682
2748
|
*
|
|
@@ -3534,6 +3600,8 @@ export declare interface HostListenerDecorator {
|
|
|
3534
3600
|
new (eventName: string, args?: string[]): any;
|
|
3535
3601
|
}
|
|
3536
3602
|
|
|
3603
|
+
declare const HYDRATION = 23;
|
|
3604
|
+
|
|
3537
3605
|
declare namespace i0 {
|
|
3538
3606
|
export {
|
|
3539
3607
|
ɵɵinject,
|
|
@@ -5073,11 +5141,21 @@ declare interface LView<T = unknown> extends Array<any> {
|
|
|
5073
5141
|
[TRANSPLANTED_VIEWS_TO_REFRESH]: number;
|
|
5074
5142
|
/** Unique ID of the view. Used for `__ngContext__` lookups in the `LView` registry. */
|
|
5075
5143
|
[ID]: number;
|
|
5144
|
+
/**
|
|
5145
|
+
* A container related to hydration annotation information that's associated with this LView.
|
|
5146
|
+
*/
|
|
5147
|
+
[HYDRATION]: DehydratedView | null;
|
|
5076
5148
|
/**
|
|
5077
5149
|
* Optional injector assigned to embedded views that takes
|
|
5078
5150
|
* precedence over the element and module injectors.
|
|
5079
5151
|
*/
|
|
5080
5152
|
readonly [EMBEDDED_VIEW_INJECTOR]: Injector | null;
|
|
5153
|
+
/**
|
|
5154
|
+
* A collection of callbacks functions that are executed when a given LView is destroyed. Those
|
|
5155
|
+
* are user defined, LView-specific destroy callbacks that don't have any corresponding TView
|
|
5156
|
+
* entries.
|
|
5157
|
+
*/
|
|
5158
|
+
[ON_DESTROY_HOOKS]: Array<() => void> | null;
|
|
5081
5159
|
}
|
|
5082
5160
|
|
|
5083
5161
|
/** Flags associated with an LView (saved in LView[FLAGS]) */
|
|
@@ -5133,6 +5211,16 @@ declare const enum LViewFlags {
|
|
|
5133
5211
|
*/
|
|
5134
5212
|
export declare function makeEnvironmentProviders(providers: (Provider | EnvironmentProviders)[]): EnvironmentProviders;
|
|
5135
5213
|
|
|
5214
|
+
/**
|
|
5215
|
+
* Merge multiple application configurations from left to right.
|
|
5216
|
+
*
|
|
5217
|
+
* @param configs Two or more configurations to be merged.
|
|
5218
|
+
* @returns A merged [ApplicationConfig](api/core/ApplicationConfig).
|
|
5219
|
+
*
|
|
5220
|
+
* @publicApi
|
|
5221
|
+
*/
|
|
5222
|
+
export declare function mergeApplicationConfig(...configs: ApplicationConfig[]): ApplicationConfig;
|
|
5223
|
+
|
|
5136
5224
|
/**
|
|
5137
5225
|
* Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
|
|
5138
5226
|
* that the compiler should use in case of missing translations:
|
|
@@ -5643,6 +5731,8 @@ export declare class NgZone {
|
|
|
5643
5731
|
*/
|
|
5644
5732
|
export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
|
|
5645
5733
|
|
|
5734
|
+
declare const ON_DESTROY_HOOKS = 22;
|
|
5735
|
+
|
|
5646
5736
|
/**
|
|
5647
5737
|
* @description
|
|
5648
5738
|
* A lifecycle hook that is called when any data-bound property of a directive changes.
|
|
@@ -6897,11 +6987,13 @@ export declare class ReflectiveKey {
|
|
|
6897
6987
|
* listeners on Element.
|
|
6898
6988
|
*/
|
|
6899
6989
|
declare interface RElement extends RNode {
|
|
6990
|
+
firstChild: RNode | null;
|
|
6900
6991
|
style: RCssStyleDeclaration;
|
|
6901
6992
|
classList: RDomTokenList;
|
|
6902
6993
|
className: string;
|
|
6903
6994
|
tagName: string;
|
|
6904
6995
|
textContent: string | null;
|
|
6996
|
+
getAttribute(name: string): string | null;
|
|
6905
6997
|
setAttribute(name: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
|
|
6906
6998
|
removeAttribute(name: string): void;
|
|
6907
6999
|
setAttributeNS(namespaceURI: string, qualifiedName: string, value: string | TrustedHTML | TrustedScript | TrustedScriptURL): void;
|
|
@@ -7495,6 +7587,29 @@ export declare interface SelfDecorator {
|
|
|
7495
7587
|
new (): Self;
|
|
7496
7588
|
}
|
|
7497
7589
|
|
|
7590
|
+
/**
|
|
7591
|
+
* Represents element containers within this view, stored as key-value pairs
|
|
7592
|
+
* where key is an index of a container in an LView (also used in the
|
|
7593
|
+
* `elementContainerStart` instruction), the value is the number of root nodes
|
|
7594
|
+
* in this container. This information is needed to locate an anchor comment
|
|
7595
|
+
* node that goes after all container nodes.
|
|
7596
|
+
*/
|
|
7597
|
+
declare interface SerializedElementContainers {
|
|
7598
|
+
[key: number]: number;
|
|
7599
|
+
}
|
|
7600
|
+
|
|
7601
|
+
/**
|
|
7602
|
+
* Serialized data structure that contains relevant hydration
|
|
7603
|
+
* annotation information that describes a given hydration boundary
|
|
7604
|
+
* (e.g. a component).
|
|
7605
|
+
*/
|
|
7606
|
+
declare interface SerializedView {
|
|
7607
|
+
/**
|
|
7608
|
+
* Serialized information about <ng-container>s.
|
|
7609
|
+
*/
|
|
7610
|
+
[ELEMENT_CONTAINERS]?: SerializedElementContainers;
|
|
7611
|
+
}
|
|
7612
|
+
|
|
7498
7613
|
/**
|
|
7499
7614
|
* A `Signal` with a value that can be mutated via a setter interface.
|
|
7500
7615
|
*
|
|
@@ -7739,7 +7854,7 @@ declare interface TContainerNode extends TNode {
|
|
|
7739
7854
|
* - They are dynamically created
|
|
7740
7855
|
*/
|
|
7741
7856
|
parent: TElementNode | TElementContainerNode | null;
|
|
7742
|
-
|
|
7857
|
+
tView: TView | null;
|
|
7743
7858
|
projection: null;
|
|
7744
7859
|
value: null;
|
|
7745
7860
|
}
|
|
@@ -7779,7 +7894,7 @@ declare interface TElementContainerNode extends TNode {
|
|
|
7779
7894
|
index: number;
|
|
7780
7895
|
child: TElementNode | TTextNode | TContainerNode | TElementContainerNode | TProjectionNode | null;
|
|
7781
7896
|
parent: TElementNode | TElementContainerNode | null;
|
|
7782
|
-
|
|
7897
|
+
tView: null;
|
|
7783
7898
|
projection: null;
|
|
7784
7899
|
}
|
|
7785
7900
|
|
|
@@ -7794,7 +7909,7 @@ declare interface TElementNode extends TNode {
|
|
|
7794
7909
|
* retrieved using viewData[HOST_NODE]).
|
|
7795
7910
|
*/
|
|
7796
7911
|
parent: TElementNode | TElementContainerNode | null;
|
|
7797
|
-
|
|
7912
|
+
tView: null;
|
|
7798
7913
|
/**
|
|
7799
7914
|
* If this is a component TNode with projection, this will be an array of projected
|
|
7800
7915
|
* TNodes or native nodes (see TNode.projection for more info). If it's a regular element node
|
|
@@ -8232,31 +8347,24 @@ declare interface TNode {
|
|
|
8232
8347
|
*/
|
|
8233
8348
|
outputs: PropertyAliases | null;
|
|
8234
8349
|
/**
|
|
8235
|
-
* The TView
|
|
8236
|
-
*
|
|
8237
|
-
* If this TNode corresponds to an LContainer with inline views, the container will
|
|
8238
|
-
* need to store separate static data for each of its view blocks (TView[]). Otherwise,
|
|
8239
|
-
* nodes in inline views with the same index as nodes in their parent views will overwrite
|
|
8240
|
-
* each other, as they are in the same template.
|
|
8241
|
-
*
|
|
8242
|
-
* Each index in this array corresponds to the static data for a certain
|
|
8243
|
-
* view. So if you had V(0) and V(1) in a container, you might have:
|
|
8244
|
-
*
|
|
8245
|
-
* [
|
|
8246
|
-
* [{tagName: 'div', attrs: ...}, null], // V(0) TView
|
|
8247
|
-
* [{tagName: 'button', attrs ...}, null] // V(1) TView
|
|
8350
|
+
* The TView attached to this node.
|
|
8248
8351
|
*
|
|
8249
8352
|
* If this TNode corresponds to an LContainer with a template (e.g. structural
|
|
8250
8353
|
* directive), the template's TView will be stored here.
|
|
8251
8354
|
*
|
|
8252
|
-
* If this TNode corresponds to an element,
|
|
8355
|
+
* If this TNode corresponds to an element, tView will be `null`.
|
|
8253
8356
|
*/
|
|
8254
|
-
|
|
8357
|
+
tView: TView | null;
|
|
8255
8358
|
/**
|
|
8256
8359
|
* The next sibling node. Necessary so we can propagate through the root nodes of a view
|
|
8257
8360
|
* to insert them or remove them from the DOM.
|
|
8258
8361
|
*/
|
|
8259
8362
|
next: TNode | null;
|
|
8363
|
+
/**
|
|
8364
|
+
* The previous sibling node.
|
|
8365
|
+
* This simplifies operations when we need a pointer to the previous node.
|
|
8366
|
+
*/
|
|
8367
|
+
prev: TNode | null;
|
|
8260
8368
|
/**
|
|
8261
8369
|
* The next projected sibling. Since in Angular content projection works on the node-by-node
|
|
8262
8370
|
* basis the act of projecting nodes might change nodes relationship at the insertion point
|
|
@@ -8547,7 +8655,7 @@ declare interface TProjectionNode extends TNode {
|
|
|
8547
8655
|
* retrieved using LView.node).
|
|
8548
8656
|
*/
|
|
8549
8657
|
parent: TElementNode | TElementContainerNode | null;
|
|
8550
|
-
|
|
8658
|
+
tView: null;
|
|
8551
8659
|
/** Index of the projection node. (See TNode.projection for more info.) */
|
|
8552
8660
|
projection: number;
|
|
8553
8661
|
value: null;
|
|
@@ -8938,7 +9046,7 @@ declare interface TTextNode extends TNode {
|
|
|
8938
9046
|
* retrieved using LView.node).
|
|
8939
9047
|
*/
|
|
8940
9048
|
parent: TElementNode | TElementContainerNode | null;
|
|
8941
|
-
|
|
9049
|
+
tView: null;
|
|
8942
9050
|
projection: null;
|
|
8943
9051
|
}
|
|
8944
9052
|
|
|
@@ -9789,6 +9897,15 @@ export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBy
|
|
|
9789
9897
|
|
|
9790
9898
|
export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBypassType): boolean;
|
|
9791
9899
|
|
|
9900
|
+
/**
|
|
9901
|
+
* Annotates all components bootstrapped in a given ApplicationRef
|
|
9902
|
+
* with info needed for hydration.
|
|
9903
|
+
*
|
|
9904
|
+
* @param appRef An instance of an ApplicationRef.
|
|
9905
|
+
* @param doc A reference to the current Document instance.
|
|
9906
|
+
*/
|
|
9907
|
+
export declare function ɵannotateForHydration(appRef: ApplicationRef, doc: Document): void;
|
|
9908
|
+
|
|
9792
9909
|
/**
|
|
9793
9910
|
* Providers that generate a random `APP_ID_TOKEN`.
|
|
9794
9911
|
* @publicApi
|
|
@@ -9991,43 +10108,6 @@ export declare const enum ɵBypassType {
|
|
|
9991
10108
|
Style = "Style"
|
|
9992
10109
|
}
|
|
9993
10110
|
|
|
9994
|
-
/**
|
|
9995
|
-
* Defines the possible states of the default change detector.
|
|
9996
|
-
* @see `ChangeDetectorRef`
|
|
9997
|
-
*/
|
|
9998
|
-
export declare enum ɵChangeDetectorStatus {
|
|
9999
|
-
/**
|
|
10000
|
-
* A state in which, after calling `detectChanges()`, the change detector
|
|
10001
|
-
* state becomes `Checked`, and must be explicitly invoked or reactivated.
|
|
10002
|
-
*/
|
|
10003
|
-
CheckOnce = 0,
|
|
10004
|
-
/**
|
|
10005
|
-
* A state in which change detection is skipped until the change detector mode
|
|
10006
|
-
* becomes `CheckOnce`.
|
|
10007
|
-
*/
|
|
10008
|
-
Checked = 1,
|
|
10009
|
-
/**
|
|
10010
|
-
* A state in which change detection continues automatically until explicitly
|
|
10011
|
-
* deactivated.
|
|
10012
|
-
*/
|
|
10013
|
-
CheckAlways = 2,
|
|
10014
|
-
/**
|
|
10015
|
-
* A state in which a change detector sub tree is not a part of the main tree and
|
|
10016
|
-
* should be skipped.
|
|
10017
|
-
*/
|
|
10018
|
-
Detached = 3,
|
|
10019
|
-
/**
|
|
10020
|
-
* Indicates that the change detector encountered an error checking a binding
|
|
10021
|
-
* or calling a directive lifecycle method and is now in an inconsistent state. Change
|
|
10022
|
-
* detectors in this state do not detect changes.
|
|
10023
|
-
*/
|
|
10024
|
-
Errored = 4,
|
|
10025
|
-
/**
|
|
10026
|
-
* Indicates that the change detector has been destroyed.
|
|
10027
|
-
*/
|
|
10028
|
-
Destroyed = 5
|
|
10029
|
-
}
|
|
10030
|
-
|
|
10031
10111
|
export declare function ɵclearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component>;
|
|
10032
10112
|
|
|
10033
10113
|
|
|
@@ -10384,6 +10464,9 @@ export declare interface ɵDirectiveType<T> extends Type<T> {
|
|
|
10384
10464
|
ɵfac: unknown;
|
|
10385
10465
|
}
|
|
10386
10466
|
|
|
10467
|
+
|
|
10468
|
+
export declare function ɵescapeTransferStateContent(text: string): string;
|
|
10469
|
+
|
|
10387
10470
|
/**
|
|
10388
10471
|
* Index of each type of locale data from the extra locale data array
|
|
10389
10472
|
*/
|
|
@@ -10415,7 +10498,12 @@ export declare function ɵflushModuleScopingQueueAsMuchAsPossible(): void;
|
|
|
10415
10498
|
*/
|
|
10416
10499
|
export declare function ɵformatRuntimeError<T extends number = RuntimeErrorCode>(code: T, message: null | false | string): string;
|
|
10417
10500
|
|
|
10418
|
-
|
|
10501
|
+
/**
|
|
10502
|
+
* The following getter methods retrieve the definition from the type. Currently the retrieval
|
|
10503
|
+
* honors inheritance, but in the future we may change the rule to require that definitions are
|
|
10504
|
+
* explicit. This would require some sort of migration strategy.
|
|
10505
|
+
*/
|
|
10506
|
+
export declare function ɵgetComponentDef<T>(type: any): ɵComponentDef<T> | null;
|
|
10419
10507
|
|
|
10420
10508
|
/**
|
|
10421
10509
|
* Retrieves directive instances associated with a given DOM node. Does not include
|
|
@@ -10560,33 +10648,20 @@ export declare interface ɵInternalEnvironmentProviders extends EnvironmentProvi
|
|
|
10560
10648
|
ɵfromNgModule?: true;
|
|
10561
10649
|
}
|
|
10562
10650
|
|
|
10563
|
-
export declare function ɵisBoundToModule<C>(cf: ComponentFactory<C>): boolean;
|
|
10564
|
-
|
|
10565
10651
|
/**
|
|
10566
|
-
*
|
|
10567
|
-
* @param changeDetectionStrategy The strategy to check.
|
|
10568
|
-
* @returns True if the given strategy is the current default, false otherwise.
|
|
10569
|
-
* @see `ChangeDetectorStatus`
|
|
10570
|
-
* @see `ChangeDetectorRef`
|
|
10652
|
+
* Internal token that specifies whether hydration is enabled.
|
|
10571
10653
|
*/
|
|
10572
|
-
export declare
|
|
10654
|
+
export declare const ɵIS_HYDRATION_FEATURE_ENABLED: InjectionToken<boolean>;
|
|
10655
|
+
|
|
10656
|
+
export declare function ɵisBoundToModule<C>(cf: ComponentFactory<C>): boolean;
|
|
10573
10657
|
|
|
10574
10658
|
export declare function ɵisEnvironmentProviders(value: Provider | EnvironmentProviders | ɵInternalEnvironmentProviders): value is ɵInternalEnvironmentProviders;
|
|
10575
10659
|
|
|
10576
10660
|
export declare function ɵisInjectable(type: any): boolean;
|
|
10577
10661
|
|
|
10578
|
-
export declare function
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
* Determine if the argument is an Observable
|
|
10582
|
-
*
|
|
10583
|
-
* Strictly this tests that the `obj` is `Subscribable`, since `Observable`
|
|
10584
|
-
* types need additional methods, such as `lift()`. But it is adequate for our
|
|
10585
|
-
* needs since within the Angular framework code we only ever need to use the
|
|
10586
|
-
* `subscribe()` method, and RxJS has mechanisms to wrap `Subscribable` objects
|
|
10587
|
-
* into `Observable` as needed.
|
|
10588
|
-
*/
|
|
10589
|
-
export declare const ɵisObservable: (obj: any | Observable<any>) => obj is Observable<any>;
|
|
10662
|
+
export declare function ɵisNgModule<T>(value: Type<T>): value is Type<T> & {
|
|
10663
|
+
ɵmod: ɵNgModuleDef<T>;
|
|
10664
|
+
};
|
|
10590
10665
|
|
|
10591
10666
|
/**
|
|
10592
10667
|
* Determine if the argument is shaped like a Promise
|
|
@@ -10596,9 +10671,7 @@ export declare function ɵisPromise<T = any>(obj: any): obj is Promise<T>;
|
|
|
10596
10671
|
/**
|
|
10597
10672
|
* Determine if the argument is a Subscribable
|
|
10598
10673
|
*/
|
|
10599
|
-
export declare function ɵisSubscribable(obj: any | Subscribable<
|
|
10600
|
-
|
|
10601
|
-
export declare const ɵivyEnabled = true;
|
|
10674
|
+
export declare function ɵisSubscribable<T>(obj: any | Subscribable<T>): obj is Subscribable<T>;
|
|
10602
10675
|
|
|
10603
10676
|
/**
|
|
10604
10677
|
* The internal view context which is specific to a given DOM element, directive or
|
|
@@ -10707,6 +10780,22 @@ export declare function ɵmakeDecorator<T>(name: string, props?: (...args: any[]
|
|
|
10707
10780
|
(...args: any[]): (cls: any) => any;
|
|
10708
10781
|
};
|
|
10709
10782
|
|
|
10783
|
+
/**
|
|
10784
|
+
* Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.
|
|
10785
|
+
*
|
|
10786
|
+
* Example:
|
|
10787
|
+
*
|
|
10788
|
+
* ```
|
|
10789
|
+
* const COUNTER_KEY = makeStateKey<number>('counter');
|
|
10790
|
+
* let value = 10;
|
|
10791
|
+
*
|
|
10792
|
+
* transferState.set(COUNTER_KEY, value);
|
|
10793
|
+
* ```
|
|
10794
|
+
*
|
|
10795
|
+
* @publicApi
|
|
10796
|
+
*/
|
|
10797
|
+
export declare function ɵmakeStateKey<T = void>(key: string): ɵStateKey<T>;
|
|
10798
|
+
|
|
10710
10799
|
|
|
10711
10800
|
export declare const ɵNG_COMP_DEF: string;
|
|
10712
10801
|
|
|
@@ -10936,6 +11025,50 @@ export declare const enum ɵProfilerEvent {
|
|
|
10936
11025
|
OutputEnd = 7
|
|
10937
11026
|
}
|
|
10938
11027
|
|
|
11028
|
+
/**
|
|
11029
|
+
* Returns a set of providers required to setup hydration support
|
|
11030
|
+
* for an application that is server side rendered.
|
|
11031
|
+
*
|
|
11032
|
+
* ## NgModule-based bootstrap
|
|
11033
|
+
*
|
|
11034
|
+
* You can add the function call to the root AppModule of an application:
|
|
11035
|
+
* ```
|
|
11036
|
+
* import {provideHydrationSupport} from '@angular/core';
|
|
11037
|
+
*
|
|
11038
|
+
* @NgModule({
|
|
11039
|
+
* providers: [
|
|
11040
|
+
* // ... other providers ...
|
|
11041
|
+
* provideHydrationSupport()
|
|
11042
|
+
* ],
|
|
11043
|
+
* declarations: [AppComponent],
|
|
11044
|
+
* bootstrap: [AppComponent]
|
|
11045
|
+
* })
|
|
11046
|
+
* class AppModule {}
|
|
11047
|
+
* ```
|
|
11048
|
+
*
|
|
11049
|
+
* ## Standalone-based bootstrap
|
|
11050
|
+
*
|
|
11051
|
+
* Add the function to the `bootstrapApplication` call:
|
|
11052
|
+
* ```
|
|
11053
|
+
* import {provideHydrationSupport} from '@angular/core';
|
|
11054
|
+
*
|
|
11055
|
+
* bootstrapApplication(RootComponent, {
|
|
11056
|
+
* providers: [
|
|
11057
|
+
* // ... other providers ...
|
|
11058
|
+
* provideHydrationSupport()
|
|
11059
|
+
* ]
|
|
11060
|
+
* });
|
|
11061
|
+
* ```
|
|
11062
|
+
*
|
|
11063
|
+
* The function sets up an internal flag that would be recognized during
|
|
11064
|
+
* the server side rendering time as well, so there is no need to
|
|
11065
|
+
* configure or change anything in NgUniversal to enable the feature.
|
|
11066
|
+
*
|
|
11067
|
+
* @publicApi
|
|
11068
|
+
* @developerPreview
|
|
11069
|
+
*/
|
|
11070
|
+
export declare function ɵprovideHydrationSupport(): EnvironmentProviders;
|
|
11071
|
+
|
|
10939
11072
|
/**
|
|
10940
11073
|
* Publishes a collection of default debug tools onto`window.ng`.
|
|
10941
11074
|
*
|
|
@@ -11218,6 +11351,25 @@ export declare function ɵsetUnknownElementStrictMode(shouldThrow: boolean): voi
|
|
|
11218
11351
|
*/
|
|
11219
11352
|
export declare function ɵsetUnknownPropertyStrictMode(shouldThrow: boolean): void;
|
|
11220
11353
|
|
|
11354
|
+
/**
|
|
11355
|
+
* A type-safe key to use with `TransferState`.
|
|
11356
|
+
*
|
|
11357
|
+
* Example:
|
|
11358
|
+
*
|
|
11359
|
+
* ```
|
|
11360
|
+
* const COUNTER_KEY = makeStateKey<number>('counter');
|
|
11361
|
+
* let value = 10;
|
|
11362
|
+
*
|
|
11363
|
+
* transferState.set(COUNTER_KEY, value);
|
|
11364
|
+
* ```
|
|
11365
|
+
*
|
|
11366
|
+
* @publicApi
|
|
11367
|
+
*/
|
|
11368
|
+
export declare type ɵStateKey<T> = string & {
|
|
11369
|
+
__not_a_string: never;
|
|
11370
|
+
__value_type?: T;
|
|
11371
|
+
};
|
|
11372
|
+
|
|
11221
11373
|
/** Store a value in the `data` at a given `index`. */
|
|
11222
11374
|
export declare function ɵstore<T>(tView: TView, lView: LView, index: number, value: T): void;
|
|
11223
11375
|
|
|
@@ -11240,12 +11392,63 @@ export declare const ɵTESTABILITY: InjectionToken<Testability>;
|
|
|
11240
11392
|
*/
|
|
11241
11393
|
export declare const ɵTESTABILITY_GETTER: InjectionToken<GetTestability>;
|
|
11242
11394
|
|
|
11395
|
+
/**
|
|
11396
|
+
* A key value store that is transferred from the application on the server side to the application
|
|
11397
|
+
* on the client side.
|
|
11398
|
+
*
|
|
11399
|
+
* The `TransferState` is available as an injectable token.
|
|
11400
|
+
* On the client, just inject this token using DI and use it, it will be lazily initialized.
|
|
11401
|
+
* On the server it's already included if `renderApplication` function is used. Otherwise, import
|
|
11402
|
+
* the `ServerTransferStateModule` module to make the `TransferState` available.
|
|
11403
|
+
*
|
|
11404
|
+
* The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only
|
|
11405
|
+
* boolean, number, string, null and non-class objects will be serialized and deserialized in a
|
|
11406
|
+
* non-lossy manner.
|
|
11407
|
+
*
|
|
11408
|
+
* @publicApi
|
|
11409
|
+
*/
|
|
11410
|
+
export declare class ɵTransferState {
|
|
11411
|
+
/** @nocollapse */
|
|
11412
|
+
static ɵprov: unknown;
|
|
11413
|
+
private onSerializeCallbacks;
|
|
11414
|
+
/**
|
|
11415
|
+
* Get the value corresponding to a key. Return `defaultValue` if key is not found.
|
|
11416
|
+
*/
|
|
11417
|
+
get<T>(key: ɵStateKey<T>, defaultValue: T): T;
|
|
11418
|
+
/**
|
|
11419
|
+
* Set the value corresponding to a key.
|
|
11420
|
+
*/
|
|
11421
|
+
set<T>(key: ɵStateKey<T>, value: T): void;
|
|
11422
|
+
/**
|
|
11423
|
+
* Remove a key from the store.
|
|
11424
|
+
*/
|
|
11425
|
+
remove<T>(key: ɵStateKey<T>): void;
|
|
11426
|
+
/**
|
|
11427
|
+
* Test whether a key exists in the store.
|
|
11428
|
+
*/
|
|
11429
|
+
hasKey<T>(key: ɵStateKey<T>): boolean;
|
|
11430
|
+
/**
|
|
11431
|
+
* Indicates whether the state is empty.
|
|
11432
|
+
*/
|
|
11433
|
+
get isEmpty(): boolean;
|
|
11434
|
+
/**
|
|
11435
|
+
* Register a callback to provide the value for a key when `toJson` is called.
|
|
11436
|
+
*/
|
|
11437
|
+
onSerialize<T>(key: ɵStateKey<T>, callback: () => T): void;
|
|
11438
|
+
/**
|
|
11439
|
+
* Serialize the current state of the store to JSON.
|
|
11440
|
+
*/
|
|
11441
|
+
toJson(): string;
|
|
11442
|
+
}
|
|
11443
|
+
|
|
11243
11444
|
/**
|
|
11244
11445
|
* Compute the pair of transitive scopes (compilation scope and exported scope) for a given type
|
|
11245
11446
|
* (either a NgModule or a standalone component / directive / pipe).
|
|
11246
11447
|
*/
|
|
11247
11448
|
export declare function ɵtransitiveScopesFor<T>(type: Type<T>): ɵNgModuleTransitiveScopes;
|
|
11248
11449
|
|
|
11450
|
+
export declare function ɵunescapeTransferStateContent(text: string): string;
|
|
11451
|
+
|
|
11249
11452
|
/**
|
|
11250
11453
|
* Helper function to remove all the locale data from `LOCALE_DATA`.
|
|
11251
11454
|
*/
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/core",
|
|
3
|
-
"version": "16.0.0-next.
|
|
3
|
+
"version": "16.0.0-next.2",
|
|
4
4
|
"description": "Angular - the core framework",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": "^
|
|
8
|
+
"node": "^16.13.0 || >=18.10.0"
|
|
9
9
|
},
|
|
10
10
|
"exports": {
|
|
11
11
|
"./schematics/*": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"rxjs": "^6.5.3 || ^7.4.0",
|
|
39
|
-
"zone.js": "~0.
|
|
39
|
+
"zone.js": "~0.13.0"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|