@angular/core 16.0.0-next.2 → 16.0.0-next.4
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_ref.mjs +95 -87
- package/esm2020/src/application_tokens.mjs +59 -21
- package/esm2020/src/change_detection/change_detector_ref.mjs +4 -4
- package/esm2020/src/compiler/compiler_facade_interface.mjs +1 -1
- package/esm2020/src/core.mjs +2 -2
- package/esm2020/src/core_private_export.mjs +3 -3
- package/esm2020/src/core_reactivity_export_internal.mjs +1 -1
- package/esm2020/src/core_render3_private_export.mjs +1 -2
- package/esm2020/src/di/contextual.mjs +37 -0
- package/esm2020/src/di/index.mjs +2 -1
- package/esm2020/src/di/r3_injector.mjs +8 -1
- package/esm2020/src/errors.mjs +1 -1
- package/esm2020/src/hydration/annotate.mjs +250 -6
- package/esm2020/src/hydration/api.mjs +22 -1
- package/esm2020/src/hydration/cleanup.mjs +101 -0
- package/esm2020/src/hydration/compression.mjs +69 -0
- package/esm2020/src/hydration/error_handling.mjs +362 -12
- package/esm2020/src/hydration/interfaces.mjs +25 -2
- package/esm2020/src/hydration/node_lookup_utils.mjs +217 -17
- package/esm2020/src/hydration/skip_hydration.mjs +16 -1
- package/esm2020/src/hydration/utils.mjs +95 -7
- package/esm2020/src/hydration/views.mjs +84 -0
- package/esm2020/src/linker/destroy_ref.mjs +5 -2
- package/esm2020/src/linker/template_ref.mjs +17 -2
- package/esm2020/src/linker/view_container_ref.mjs +111 -35
- package/esm2020/src/metadata/directives.mjs +8 -3
- package/esm2020/src/render3/component_ref.mjs +2 -2
- package/esm2020/src/render3/definition.mjs +114 -45
- package/esm2020/src/render3/instructions/element.mjs +31 -14
- package/esm2020/src/render3/instructions/element_container.mjs +9 -13
- package/esm2020/src/render3/instructions/element_validation.mjs +2 -2
- package/esm2020/src/render3/instructions/projection.mjs +7 -4
- package/esm2020/src/render3/instructions/shared.mjs +53 -16
- package/esm2020/src/render3/instructions/template.mjs +54 -6
- package/esm2020/src/render3/instructions/text.mjs +6 -6
- package/esm2020/src/render3/interfaces/container.mjs +3 -2
- package/esm2020/src/render3/interfaces/public_definitions.mjs +1 -1
- package/esm2020/src/render3/interfaces/type_checks.mjs +5 -2
- package/esm2020/src/render3/interfaces/view.mjs +1 -1
- package/esm2020/src/render3/jit/module.mjs +3 -2
- package/esm2020/src/render3/ng_module_ref.mjs +9 -5
- package/esm2020/src/render3/node_manipulation.mjs +2 -2
- package/esm2020/src/render3/node_selector_matcher.mjs +17 -5
- package/esm2020/src/render3/util/discovery_utils.mjs +3 -2
- package/esm2020/src/render3/util/view_utils.mjs +12 -1
- package/esm2020/src/render3/view_ref.mjs +1 -1
- package/esm2020/src/signals/index.mjs +2 -1
- package/esm2020/src/signals/src/computed.mjs +3 -3
- package/esm2020/src/signals/src/effect.mjs +1 -3
- package/esm2020/src/signals/src/signal.mjs +3 -3
- package/esm2020/src/signals/src/watch.mjs +3 -3
- package/esm2020/src/signals/src/weak_ref.mjs +18 -2
- package/esm2020/src/util/ng_dev_mode.mjs +3 -1
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/src/zone/ng_zone.mjs +62 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/esm2020/testing/src/test_bed_compiler.mjs +15 -10
- package/fesm2015/core.mjs +3339 -1754
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +2619 -1376
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +3348 -1760
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +2569 -1322
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +564 -682
- package/package.json +1 -1
- package/schematics/migrations/relative-link-resolution/bundle.js +7 -7
- package/schematics/migrations/router-link-with-href/bundle.js +10 -10
- package/schematics/ng-generate/standalone-migration/bundle.js +644 -448
- package/schematics/ng-generate/standalone-migration/bundle.js.map +3 -3
- 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.4
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -187,13 +187,32 @@ export declare const ANIMATION_MODULE_TYPE: InjectionToken<"NoopAnimations" | "B
|
|
|
187
187
|
export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<((compRef: ComponentRef<any>) => void)[]>;
|
|
188
188
|
|
|
189
189
|
/**
|
|
190
|
-
* A [DI token](guide/glossary#di-token "DI token definition") representing a
|
|
190
|
+
* A [DI token](guide/glossary#di-token "DI token definition") representing a string ID, used
|
|
191
191
|
* primarily for prefixing application attributes and CSS styles when
|
|
192
192
|
* {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.
|
|
193
193
|
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
194
|
+
* The token is needed in cases when multiple applications are bootstrapped on a page
|
|
195
|
+
* (for example, using `bootstrapApplication` calls). In this case, ensure that those applications
|
|
196
|
+
* have different `APP_ID` value setup. For example:
|
|
197
|
+
*
|
|
198
|
+
* ```
|
|
199
|
+
* bootstrapApplication(ComponentA, {
|
|
200
|
+
* providers: [
|
|
201
|
+
* { provide: APP_ID, useValue: 'app-a' },
|
|
202
|
+
* // ... other providers ...
|
|
203
|
+
* ]
|
|
204
|
+
* });
|
|
205
|
+
*
|
|
206
|
+
* bootstrapApplication(ComponentB, {
|
|
207
|
+
* providers: [
|
|
208
|
+
* { provide: APP_ID, useValue: 'app-b' },
|
|
209
|
+
* // ... other providers ...
|
|
210
|
+
* ]
|
|
211
|
+
* });
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
214
|
+
* By default, when there is only one application bootstrapped, you don't need to provide the
|
|
215
|
+
* `APP_ID` token (the `ng` will be used as an app ID).
|
|
197
216
|
*
|
|
198
217
|
* @publicApi
|
|
199
218
|
*/
|
|
@@ -271,8 +290,6 @@ export declare const APP_ID: InjectionToken<string>;
|
|
|
271
290
|
*/
|
|
272
291
|
export declare const APP_INITIALIZER: InjectionToken<readonly (() => Observable<unknown> | Promise<unknown> | void)[]>;
|
|
273
292
|
|
|
274
|
-
declare function _appIdRandomProviderFactory(): string;
|
|
275
|
-
|
|
276
293
|
/**
|
|
277
294
|
* Set of config options available during the application bootstrap operation.
|
|
278
295
|
*
|
|
@@ -319,7 +336,6 @@ export declare class ApplicationModule {
|
|
|
319
336
|
* A reference to an Angular application running on a page.
|
|
320
337
|
*
|
|
321
338
|
* @usageNotes
|
|
322
|
-
*
|
|
323
339
|
* {@a is-stable-examples}
|
|
324
340
|
* ### isStable examples and caveats
|
|
325
341
|
*
|
|
@@ -409,14 +425,10 @@ export declare class ApplicationModule {
|
|
|
409
425
|
* @publicApi
|
|
410
426
|
*/
|
|
411
427
|
export declare class ApplicationRef {
|
|
412
|
-
private _zone;
|
|
413
|
-
private _injector;
|
|
414
|
-
private _exceptionHandler;
|
|
415
428
|
private _runningTick;
|
|
416
|
-
private _stable;
|
|
417
|
-
private _onMicrotaskEmptySubscription;
|
|
418
429
|
private _destroyed;
|
|
419
430
|
private _destroyListeners;
|
|
431
|
+
private readonly internalErrorHandler;
|
|
420
432
|
/**
|
|
421
433
|
* Indicates whether this instance was destroyed.
|
|
422
434
|
*/
|
|
@@ -432,10 +444,9 @@ export declare class ApplicationRef {
|
|
|
432
444
|
readonly components: ComponentRef<any>[];
|
|
433
445
|
/**
|
|
434
446
|
* Returns an Observable that indicates when the application is stable or unstable.
|
|
435
|
-
*
|
|
436
|
-
* @see [Usage notes](#is-stable-examples) for examples and caveats when using this API.
|
|
437
447
|
*/
|
|
438
448
|
readonly isStable: Observable<boolean>;
|
|
449
|
+
private readonly _injector;
|
|
439
450
|
/**
|
|
440
451
|
* The `EnvironmentInjector` used to create this application.
|
|
441
452
|
*/
|
|
@@ -802,6 +813,9 @@ export declare abstract class ChangeDetectorRef {
|
|
|
802
813
|
abstract reattach(): void;
|
|
803
814
|
}
|
|
804
815
|
|
|
816
|
+
declare interface ChangeDetectorRefInterface extends ChangeDetectorRef {
|
|
817
|
+
}
|
|
818
|
+
|
|
805
819
|
declare const CHILD_HEAD = 13;
|
|
806
820
|
|
|
807
821
|
declare const CHILD_TAIL = 14;
|
|
@@ -1245,6 +1259,101 @@ declare interface ComponentDefFeature {
|
|
|
1245
1259
|
ngInherit?: true;
|
|
1246
1260
|
}
|
|
1247
1261
|
|
|
1262
|
+
declare interface ComponentDefinition<T> extends Omit<DirectiveDefinition<T>, 'features'> {
|
|
1263
|
+
/**
|
|
1264
|
+
* The number of nodes, local refs, and pipes in this component template.
|
|
1265
|
+
*
|
|
1266
|
+
* Used to calculate the length of this component's LView array, so we
|
|
1267
|
+
* can pre-fill the array and set the binding start index.
|
|
1268
|
+
*/
|
|
1269
|
+
decls: number;
|
|
1270
|
+
/**
|
|
1271
|
+
* The number of bindings in this component template (including pure fn bindings).
|
|
1272
|
+
*
|
|
1273
|
+
* Used to calculate the length of this component's LView array, so we
|
|
1274
|
+
* can pre-fill the array and set the host binding start index.
|
|
1275
|
+
*/
|
|
1276
|
+
vars: number;
|
|
1277
|
+
/**
|
|
1278
|
+
* Template function use for rendering DOM.
|
|
1279
|
+
*
|
|
1280
|
+
* This function has following structure.
|
|
1281
|
+
*
|
|
1282
|
+
* ```
|
|
1283
|
+
* function Template<T>(ctx:T, creationMode: boolean) {
|
|
1284
|
+
* if (creationMode) {
|
|
1285
|
+
* // Contains creation mode instructions.
|
|
1286
|
+
* }
|
|
1287
|
+
* // Contains binding update instructions
|
|
1288
|
+
* }
|
|
1289
|
+
* ```
|
|
1290
|
+
*
|
|
1291
|
+
* Common instructions are:
|
|
1292
|
+
* Creation mode instructions:
|
|
1293
|
+
* - `elementStart`, `elementEnd`
|
|
1294
|
+
* - `text`
|
|
1295
|
+
* - `container`
|
|
1296
|
+
* - `listener`
|
|
1297
|
+
*
|
|
1298
|
+
* Binding update instructions:
|
|
1299
|
+
* - `bind`
|
|
1300
|
+
* - `elementAttribute`
|
|
1301
|
+
* - `elementProperty`
|
|
1302
|
+
* - `elementClass`
|
|
1303
|
+
* - `elementStyle`
|
|
1304
|
+
*
|
|
1305
|
+
*/
|
|
1306
|
+
template: ComponentTemplate<T>;
|
|
1307
|
+
/**
|
|
1308
|
+
* Constants for the nodes in the component's view.
|
|
1309
|
+
* Includes attribute arrays, local definition arrays etc.
|
|
1310
|
+
*/
|
|
1311
|
+
consts?: TConstantsOrFactory;
|
|
1312
|
+
/**
|
|
1313
|
+
* An array of `ngContent[selector]` values that were found in the template.
|
|
1314
|
+
*/
|
|
1315
|
+
ngContentSelectors?: string[];
|
|
1316
|
+
/**
|
|
1317
|
+
* A list of optional features to apply.
|
|
1318
|
+
*
|
|
1319
|
+
* See: {@link NgOnChangesFeature}, {@link ProvidersFeature}
|
|
1320
|
+
*/
|
|
1321
|
+
features?: ComponentDefFeature[];
|
|
1322
|
+
/**
|
|
1323
|
+
* Defines template and style encapsulation options available for Component's {@link Component}.
|
|
1324
|
+
*/
|
|
1325
|
+
encapsulation?: ViewEncapsulation;
|
|
1326
|
+
/**
|
|
1327
|
+
* Defines arbitrary developer-defined data to be stored on a renderer instance.
|
|
1328
|
+
* This is useful for renderers that delegate to other renderers.
|
|
1329
|
+
*
|
|
1330
|
+
* see: animation
|
|
1331
|
+
*/
|
|
1332
|
+
data?: {
|
|
1333
|
+
[kind: string]: any;
|
|
1334
|
+
};
|
|
1335
|
+
/**
|
|
1336
|
+
* A set of styles that the component needs to be present for component to render correctly.
|
|
1337
|
+
*/
|
|
1338
|
+
styles?: string[];
|
|
1339
|
+
/**
|
|
1340
|
+
* The strategy that the default change detector uses to detect changes.
|
|
1341
|
+
* When set, takes effect the next time change detection is triggered.
|
|
1342
|
+
*/
|
|
1343
|
+
changeDetection?: ChangeDetectionStrategy;
|
|
1344
|
+
/**
|
|
1345
|
+
* Registry of directives, components, and pipes that may be found in this component's view.
|
|
1346
|
+
*
|
|
1347
|
+
* This property is either an array of types or a function that returns the array of types. This
|
|
1348
|
+
* function may be necessary to support forward declarations.
|
|
1349
|
+
*/
|
|
1350
|
+
dependencies?: TypeOrFactory<DependencyTypeList>;
|
|
1351
|
+
/**
|
|
1352
|
+
* The set of schemas that declare elements to be allowed in the component's template.
|
|
1353
|
+
*/
|
|
1354
|
+
schemas?: SchemaMetadata[] | null;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1248
1357
|
/**
|
|
1249
1358
|
* Base class for a factory that can create a component dynamically.
|
|
1250
1359
|
* Instantiate a factory for a given type of component with `resolveComponentFactory()`.
|
|
@@ -1482,77 +1591,7 @@ export declare interface ConstructorSansProvider {
|
|
|
1482
1591
|
deps?: any[];
|
|
1483
1592
|
}
|
|
1484
1593
|
|
|
1485
|
-
|
|
1486
|
-
* Represents a reader that can depend on reactive values (`Producer`s) and receive
|
|
1487
|
-
* notifications when those values change.
|
|
1488
|
-
*
|
|
1489
|
-
* `Consumer`s do not wrap the reads they consume themselves, but rather can be set
|
|
1490
|
-
* as the active reader via `setActiveConsumer`.
|
|
1491
|
-
*
|
|
1492
|
-
* The set of dependencies of a `Consumer` is dynamic. Implementers expose a
|
|
1493
|
-
* monotonically increasing `trackingVersion` counter, which increments whenever
|
|
1494
|
-
* the `Consumer` is about to re-run any reactive reads it needs and establish a
|
|
1495
|
-
* new set of dependencies as a result.
|
|
1496
|
-
*
|
|
1497
|
-
* `Producer`s store the last `trackingVersion` they've seen from `Consumer`s which
|
|
1498
|
-
* have read them. This allows a `Producer` to identify whether its record of the
|
|
1499
|
-
* dependency is current or stale, by comparing the `Consumer`'s `trackingVersion`
|
|
1500
|
-
* to the version at which the dependency was established.
|
|
1501
|
-
*/
|
|
1502
|
-
declare interface Consumer {
|
|
1503
|
-
/**
|
|
1504
|
-
* Numeric identifier of this `Producer`.
|
|
1505
|
-
*
|
|
1506
|
-
* May also be used to satisfy the interface for `Producer`.
|
|
1507
|
-
*/
|
|
1508
|
-
readonly id: ConsumerId;
|
|
1509
|
-
/**
|
|
1510
|
-
* A `WeakRef` to this `Consumer` instance.
|
|
1511
|
-
*
|
|
1512
|
-
* An implementer provides this as a cached value to avoid the need to instantiate
|
|
1513
|
-
* multiple `WeakRef` instances for the same `Consumer`.
|
|
1514
|
-
*
|
|
1515
|
-
* May also be used to satisfy the interface for `Producer`.
|
|
1516
|
-
*/
|
|
1517
|
-
readonly ref: WeakRef<Consumer>;
|
|
1518
|
-
/**
|
|
1519
|
-
* A map of `Edge`s to `Producer` dependencies, keyed by the `ProducerId`.
|
|
1520
|
-
*
|
|
1521
|
-
* Used to poll `Producer`s to determine if the `Consumer` has really updated
|
|
1522
|
-
* or not.
|
|
1523
|
-
*/
|
|
1524
|
-
readonly producers: Map<ProducerId, Edge>;
|
|
1525
|
-
/**
|
|
1526
|
-
* Monotonically increasing counter representing a version of this `Consumer`'s
|
|
1527
|
-
* dependencies.
|
|
1528
|
-
*/
|
|
1529
|
-
readonly trackingVersion: number;
|
|
1530
|
-
/**
|
|
1531
|
-
* Called when a `Producer` dependency of this `Consumer` indicates it may
|
|
1532
|
-
* have a new value.
|
|
1533
|
-
*
|
|
1534
|
-
* Notification alone does not mean the `Producer` has definitely produced a
|
|
1535
|
-
* semantically different value, only that it _may_ have changed. Before a
|
|
1536
|
-
* `Consumer` re-runs any computations or side effects, it should use the
|
|
1537
|
-
* `consumerPollValueStatus` method to poll the `Producer`s on which it depends
|
|
1538
|
-
* and determine if any of them have actually updated.
|
|
1539
|
-
*/
|
|
1540
|
-
notify(): void;
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
/**
|
|
1544
|
-
* Identifier for a `Consumer`, which is a branded `number`.
|
|
1545
|
-
*
|
|
1546
|
-
* Note that `ProducerId` and `ConsumerId` are assigned from the same sequence, so the same `number`
|
|
1547
|
-
* will never be used for both.
|
|
1548
|
-
*
|
|
1549
|
-
* Branding provides additional type safety by ensuring that `ProducerId` and `ConsumerId` are
|
|
1550
|
-
* mutually unassignable without a cast. Since several `Map`s are keyed by these IDs, this prevents
|
|
1551
|
-
* `ConsumerId`s from being inadvertently used to look up `Producer`s or vice versa.
|
|
1552
|
-
*/
|
|
1553
|
-
declare type ConsumerId = number & {
|
|
1554
|
-
__consumer: true;
|
|
1555
|
-
};
|
|
1594
|
+
declare const CONTAINERS = "c";
|
|
1556
1595
|
|
|
1557
1596
|
/**
|
|
1558
1597
|
* Type of the ContentChild metadata.
|
|
@@ -1866,6 +1905,15 @@ export declare function createPlatform(injector: Injector): PlatformRef;
|
|
|
1866
1905
|
*/
|
|
1867
1906
|
export declare function createPlatformFactory(parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null, name: string, providers?: StaticProvider[]): (extraProviders?: StaticProvider[]) => PlatformRef;
|
|
1868
1907
|
|
|
1908
|
+
/**
|
|
1909
|
+
* Token used to configure the [Content Security Policy](https://web.dev/strict-csp/) nonce that
|
|
1910
|
+
* Angular will apply when inserting inline styles. If not provided, Angular will look up its value
|
|
1911
|
+
* from the `ngCspNonce` attribute of the application root node.
|
|
1912
|
+
*
|
|
1913
|
+
* @publicApi
|
|
1914
|
+
*/
|
|
1915
|
+
export declare const CSP_NONCE: InjectionToken<string | null>;
|
|
1916
|
+
|
|
1869
1917
|
|
|
1870
1918
|
/**
|
|
1871
1919
|
* Expresses a single CSS Selector.
|
|
@@ -2184,17 +2232,17 @@ export declare class DefaultIterableDiffer<V> implements IterableDiffer<V>, Iter
|
|
|
2184
2232
|
*/
|
|
2185
2233
|
export declare const defineInjectable: typeof ɵɵdefineInjectable;
|
|
2186
2234
|
|
|
2235
|
+
declare const DEHYDRATED_VIEWS = 10;
|
|
2236
|
+
|
|
2187
2237
|
/**
|
|
2188
|
-
*
|
|
2189
|
-
*
|
|
2190
|
-
*
|
|
2238
|
+
* An object that contains hydration-related information serialized
|
|
2239
|
+
* on the server, as well as the necessary references to segments of
|
|
2240
|
+
* the DOM, to facilitate the hydration process for a given view
|
|
2241
|
+
* inside a view container (either an embedded view or a view created
|
|
2242
|
+
* for a component).
|
|
2191
2243
|
*/
|
|
2192
|
-
declare interface
|
|
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;
|
|
2244
|
+
declare interface DehydratedContainerView extends DehydratedView {
|
|
2245
|
+
data: Readonly<SerializedContainerView>;
|
|
2198
2246
|
}
|
|
2199
2247
|
|
|
2200
2248
|
/**
|
|
@@ -2214,14 +2262,24 @@ declare interface DehydratedView {
|
|
|
2214
2262
|
*/
|
|
2215
2263
|
firstChild: RNode | null;
|
|
2216
2264
|
/**
|
|
2217
|
-
*
|
|
2218
|
-
*
|
|
2219
|
-
* <ng-container>, so that those pointers are reused by
|
|
2220
|
-
* subsequent instructions.
|
|
2265
|
+
* Stores references to first nodes in DOM segments that
|
|
2266
|
+
* represent either an <ng-container> or a view container.
|
|
2221
2267
|
*/
|
|
2222
|
-
|
|
2223
|
-
[index: number]:
|
|
2268
|
+
segmentHeads?: {
|
|
2269
|
+
[index: number]: RNode | null;
|
|
2224
2270
|
};
|
|
2271
|
+
/**
|
|
2272
|
+
* An instance of a Set that represents nodes disconnected from
|
|
2273
|
+
* the DOM tree at the serialization time, but otherwise present
|
|
2274
|
+
* in the internal data structures.
|
|
2275
|
+
*
|
|
2276
|
+
* The Set is based on the `SerializedView[DISCONNECTED_NODES]` data
|
|
2277
|
+
* and is needed to have constant-time lookups.
|
|
2278
|
+
*
|
|
2279
|
+
* If the value is `null`, it means that there were no disconnected
|
|
2280
|
+
* nodes detected in this view at serialization time.
|
|
2281
|
+
*/
|
|
2282
|
+
disconnectedNodes?: Set<number> | null;
|
|
2225
2283
|
}
|
|
2226
2284
|
|
|
2227
2285
|
declare type DependencyTypeList = (ɵDirectiveType<any> | ɵComponentType<any> | PipeType<any> | Type<any>)[];
|
|
@@ -2260,12 +2318,27 @@ export declare function destroyPlatform(): void;
|
|
|
2260
2318
|
* The scope of this destruction depends on where `DestroyRef` is injected. If `DestroyRef`
|
|
2261
2319
|
* is injected in a component or directive, the callbacks run when that component or
|
|
2262
2320
|
* directive is destroyed. Otherwise the callbacks run when a corresponding injector is destroyed.
|
|
2321
|
+
*
|
|
2322
|
+
* @publicApi
|
|
2263
2323
|
*/
|
|
2264
2324
|
export declare abstract class DestroyRef {
|
|
2265
2325
|
/**
|
|
2266
|
-
* Registers a destroy callback in a given lifecycle scope.
|
|
2326
|
+
* Registers a destroy callback in a given lifecycle scope. Returns a cleanup function that can
|
|
2327
|
+
* be invoked to unregister the callback.
|
|
2328
|
+
*
|
|
2329
|
+
* @usageNotes
|
|
2330
|
+
* ### Example
|
|
2331
|
+
* ```typescript
|
|
2332
|
+
* const destroyRef = inject(DestroyRef);
|
|
2333
|
+
*
|
|
2334
|
+
* // register a destroy callback
|
|
2335
|
+
* const unregisterFn = destroyRef.onDestroy(() => doSomethingOnDestroy());
|
|
2336
|
+
*
|
|
2337
|
+
* // stop the destroy callback from executing if needed
|
|
2338
|
+
* unregisterFn();
|
|
2339
|
+
* ```
|
|
2267
2340
|
*/
|
|
2268
|
-
abstract onDestroy(callback: () => void): void;
|
|
2341
|
+
abstract onDestroy(callback: () => void): () => void;
|
|
2269
2342
|
}
|
|
2270
2343
|
|
|
2271
2344
|
/**
|
|
@@ -2307,13 +2380,19 @@ export declare interface Directive {
|
|
|
2307
2380
|
* Enumerates the set of data-bound input properties for a directive
|
|
2308
2381
|
*
|
|
2309
2382
|
* Angular automatically updates input properties during change detection.
|
|
2310
|
-
* The `inputs` property
|
|
2311
|
-
*
|
|
2383
|
+
* The `inputs` property accepts either strings or object literals that configure the directive
|
|
2384
|
+
* properties that should be exposed as inputs.
|
|
2312
2385
|
*
|
|
2313
|
-
*
|
|
2314
|
-
*
|
|
2386
|
+
* When an object literal is passed in, the `name` property indicates which property on the
|
|
2387
|
+
* class the input should write to, while the `alias` determines the name under
|
|
2388
|
+
* which the input will be available in template bindings. The `required` property indicates that
|
|
2389
|
+
* the input is required which will trigger a compile-time error if it isn't passed in when the
|
|
2390
|
+
* directive is used.
|
|
2315
2391
|
*
|
|
2316
|
-
* When
|
|
2392
|
+
* When a string is passed into the `inputs` array, it can have a format of `'name'` or
|
|
2393
|
+
* `'name: alias'` where `name` is the property on the class that the directive should write
|
|
2394
|
+
* to, while the `alias` determines the name under which the input will be available in
|
|
2395
|
+
* template bindings. String-based input definitions are assumed to be optional.
|
|
2317
2396
|
*
|
|
2318
2397
|
* @usageNotes
|
|
2319
2398
|
*
|
|
@@ -2322,7 +2401,7 @@ export declare interface Directive {
|
|
|
2322
2401
|
* ```typescript
|
|
2323
2402
|
* @Component({
|
|
2324
2403
|
* selector: 'bank-account',
|
|
2325
|
-
* inputs: ['bankName', 'id: account-id'],
|
|
2404
|
+
* inputs: ['bankName', {name: 'id', alias: 'account-id'}],
|
|
2326
2405
|
* template: `
|
|
2327
2406
|
* Bank Name: {{bankName}}
|
|
2328
2407
|
* Account Id: {{id}}
|
|
@@ -2335,18 +2414,22 @@ export declare interface Directive {
|
|
|
2335
2414
|
* ```
|
|
2336
2415
|
*
|
|
2337
2416
|
*/
|
|
2338
|
-
inputs?:
|
|
2417
|
+
inputs?: ({
|
|
2418
|
+
name: string;
|
|
2419
|
+
alias?: string;
|
|
2420
|
+
required?: boolean;
|
|
2421
|
+
} | string)[];
|
|
2339
2422
|
/**
|
|
2340
2423
|
* Enumerates the set of event-bound output properties.
|
|
2341
2424
|
*
|
|
2342
2425
|
* When an output property emits an event, an event handler attached to that event
|
|
2343
2426
|
* in the template is invoked.
|
|
2344
2427
|
*
|
|
2345
|
-
* The `outputs` property defines a set of `directiveProperty` to `
|
|
2428
|
+
* The `outputs` property defines a set of `directiveProperty` to `alias`
|
|
2346
2429
|
* configuration:
|
|
2347
2430
|
*
|
|
2348
2431
|
* - `directiveProperty` specifies the component property that emits events.
|
|
2349
|
-
* - `
|
|
2432
|
+
* - `alias` specifies the DOM property the event handler is attached to.
|
|
2350
2433
|
*
|
|
2351
2434
|
* @usageNotes
|
|
2352
2435
|
*
|
|
@@ -2612,126 +2695,215 @@ declare interface DirectiveDefFeature {
|
|
|
2612
2695
|
ngInherit?: true;
|
|
2613
2696
|
}
|
|
2614
2697
|
|
|
2615
|
-
declare
|
|
2616
|
-
|
|
2617
|
-
/**
|
|
2618
|
-
* Type used for directiveDefs on component definition.
|
|
2619
|
-
*
|
|
2620
|
-
* The function is necessary to be able to support forward declarations.
|
|
2621
|
-
*/
|
|
2622
|
-
declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDefList;
|
|
2623
|
-
|
|
2624
|
-
/**
|
|
2625
|
-
* @description
|
|
2626
|
-
* Hook for manual bootstrapping of the application instead of using `bootstrap` array in @NgModule
|
|
2627
|
-
* annotation. This hook is invoked only when the `bootstrap` array is empty or not provided.
|
|
2628
|
-
*
|
|
2629
|
-
* Reference to the current application is provided as a parameter.
|
|
2630
|
-
*
|
|
2631
|
-
* See ["Bootstrapping"](guide/bootstrapping) and ["Entry components"](guide/entry-components).
|
|
2632
|
-
*
|
|
2633
|
-
* @usageNotes
|
|
2634
|
-
* The example below uses `ApplicationRef.bootstrap()` to render the
|
|
2635
|
-
* `AppComponent` on the page.
|
|
2636
|
-
*
|
|
2637
|
-
* ```typescript
|
|
2638
|
-
* class AppModule implements DoBootstrap {
|
|
2639
|
-
* ngDoBootstrap(appRef: ApplicationRef) {
|
|
2640
|
-
* appRef.bootstrap(AppComponent); // Or some other component
|
|
2641
|
-
* }
|
|
2642
|
-
* }
|
|
2643
|
-
* ```
|
|
2644
|
-
*
|
|
2645
|
-
* @publicApi
|
|
2646
|
-
*/
|
|
2647
|
-
export declare interface DoBootstrap {
|
|
2648
|
-
ngDoBootstrap(appRef: ApplicationRef): void;
|
|
2649
|
-
}
|
|
2650
|
-
|
|
2651
|
-
/**
|
|
2652
|
-
* A lifecycle hook that invokes a custom change-detection function for a directive,
|
|
2653
|
-
* in addition to the check performed by the default change-detector.
|
|
2654
|
-
*
|
|
2655
|
-
* The default change-detection algorithm looks for differences by comparing
|
|
2656
|
-
* bound-property values by reference across change detection runs. You can use this
|
|
2657
|
-
* hook to check for and respond to changes by some other means.
|
|
2658
|
-
*
|
|
2659
|
-
* When the default change detector detects changes, it invokes `ngOnChanges()` if supplied,
|
|
2660
|
-
* regardless of whether you perform additional change detection.
|
|
2661
|
-
* Typically, you should not use both `DoCheck` and `OnChanges` to respond to
|
|
2662
|
-
* changes on the same input.
|
|
2663
|
-
*
|
|
2664
|
-
* @see `OnChanges`
|
|
2665
|
-
* @see [Lifecycle hooks guide](guide/lifecycle-hooks)
|
|
2666
|
-
*
|
|
2667
|
-
* @usageNotes
|
|
2668
|
-
* The following snippet shows how a component can implement this interface
|
|
2669
|
-
* to invoke it own change-detection cycle.
|
|
2670
|
-
*
|
|
2671
|
-
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'}
|
|
2672
|
-
*
|
|
2673
|
-
* For a more complete example and discussion, see
|
|
2674
|
-
* [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection).
|
|
2675
|
-
*
|
|
2676
|
-
* @publicApi
|
|
2677
|
-
*/
|
|
2678
|
-
export declare interface DoCheck {
|
|
2679
|
-
/**
|
|
2680
|
-
* A callback method that performs change-detection, invoked
|
|
2681
|
-
* after the default change-detector runs.
|
|
2682
|
-
* See `KeyValueDiffers` and `IterableDiffers` for implementing
|
|
2683
|
-
* custom change checking for collections.
|
|
2684
|
-
*
|
|
2685
|
-
*/
|
|
2686
|
-
ngDoCheck(): void;
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
|
-
/**
|
|
2690
|
-
* A bidirectional edge in the producer-consumer dependency graph.
|
|
2691
|
-
*/
|
|
2692
|
-
declare interface Edge {
|
|
2698
|
+
declare interface DirectiveDefinition<T> {
|
|
2693
2699
|
/**
|
|
2694
|
-
*
|
|
2695
|
-
*/
|
|
2696
|
-
readonly consumerRef: WeakRef<Consumer>;
|
|
2697
|
-
/**
|
|
2698
|
-
* Weakly held reference to the `Producer` side of this edge.
|
|
2700
|
+
* Directive type, needed to configure the injector.
|
|
2699
2701
|
*/
|
|
2700
|
-
|
|
2702
|
+
type: Type<T>;
|
|
2703
|
+
/** The selectors that will be used to match nodes to this directive. */
|
|
2704
|
+
selectors?: ɵCssSelectorList;
|
|
2701
2705
|
/**
|
|
2702
|
-
*
|
|
2706
|
+
* A map of input names.
|
|
2703
2707
|
*
|
|
2704
|
-
*
|
|
2705
|
-
* is stale, and needs to be cleaned up.
|
|
2706
|
-
*/
|
|
2707
|
-
atTrackingVersion: number;
|
|
2708
|
-
/**
|
|
2709
|
-
* `valueVersion` of the `Producer` at the time this dependency was last accessed.
|
|
2708
|
+
* The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
|
|
2710
2709
|
*
|
|
2711
|
-
*
|
|
2712
|
-
*
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2710
|
+
* Given:
|
|
2711
|
+
* ```
|
|
2712
|
+
* class MyComponent {
|
|
2713
|
+
* @Input()
|
|
2714
|
+
* publicInput1: string;
|
|
2715
|
+
*
|
|
2716
|
+
* @Input('publicInput2')
|
|
2717
|
+
* declaredInput2: string;
|
|
2718
|
+
* }
|
|
2719
|
+
* ```
|
|
2720
|
+
*
|
|
2721
|
+
* is described as:
|
|
2722
|
+
* ```
|
|
2723
|
+
* {
|
|
2724
|
+
* publicInput1: 'publicInput1',
|
|
2725
|
+
* declaredInput2: ['declaredInput2', 'publicInput2'],
|
|
2726
|
+
* }
|
|
2727
|
+
* ```
|
|
2728
|
+
*
|
|
2729
|
+
* Which the minifier may translate to:
|
|
2730
|
+
* ```
|
|
2731
|
+
* {
|
|
2732
|
+
* minifiedPublicInput1: 'publicInput1',
|
|
2733
|
+
* minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],
|
|
2734
|
+
* }
|
|
2735
|
+
* ```
|
|
2736
|
+
*
|
|
2737
|
+
* This allows the render to re-construct the minified, public, and declared names
|
|
2738
|
+
* of properties.
|
|
2739
|
+
*
|
|
2740
|
+
* NOTE:
|
|
2741
|
+
* - Because declared and public name are usually same we only generate the array
|
|
2742
|
+
* `['declared', 'public']` format when they differ.
|
|
2743
|
+
* - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
|
|
2744
|
+
* inconsistent behavior in that it uses declared names rather than minified or public. For
|
|
2745
|
+
* this reason `NgOnChanges` will be deprecated and removed in future version and this
|
|
2746
|
+
* API will be simplified to be consistent with `output`.
|
|
2747
|
+
*/
|
|
2748
|
+
inputs?: {
|
|
2749
|
+
[P in keyof T]?: string | [string, string];
|
|
2750
|
+
};
|
|
2723
2751
|
/**
|
|
2724
|
-
*
|
|
2752
|
+
* A map of output names.
|
|
2753
|
+
*
|
|
2754
|
+
* The format is in: `{[actualPropertyName: string]:string}`.
|
|
2755
|
+
*
|
|
2756
|
+
* Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
|
|
2757
|
+
*
|
|
2758
|
+
* This allows the render to re-construct the minified and non-minified names
|
|
2759
|
+
* of properties.
|
|
2725
2760
|
*/
|
|
2726
|
-
|
|
2761
|
+
outputs?: {
|
|
2762
|
+
[P in keyof T]?: string;
|
|
2763
|
+
};
|
|
2727
2764
|
/**
|
|
2728
|
-
*
|
|
2765
|
+
* A list of optional features to apply.
|
|
2766
|
+
*
|
|
2767
|
+
* See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}
|
|
2729
2768
|
*/
|
|
2730
|
-
|
|
2769
|
+
features?: DirectiveDefFeature[];
|
|
2770
|
+
/**
|
|
2771
|
+
* Function executed by the parent template to allow child directive to apply host bindings.
|
|
2772
|
+
*/
|
|
2773
|
+
hostBindings?: HostBindingsFunction<T>;
|
|
2774
|
+
/**
|
|
2775
|
+
* The number of bindings in this directive `hostBindings` (including pure fn bindings).
|
|
2776
|
+
*
|
|
2777
|
+
* Used to calculate the length of the component's LView array, so we
|
|
2778
|
+
* can pre-fill the array and set the host binding start index.
|
|
2779
|
+
*/
|
|
2780
|
+
hostVars?: number;
|
|
2781
|
+
/**
|
|
2782
|
+
* Assign static attribute values to a host element.
|
|
2783
|
+
*
|
|
2784
|
+
* This property will assign static attribute values as well as class and style
|
|
2785
|
+
* values to a host element. Since attribute values can consist of different types of values,
|
|
2786
|
+
* the `hostAttrs` array must include the values in the following format:
|
|
2787
|
+
*
|
|
2788
|
+
* attrs = [
|
|
2789
|
+
* // static attributes (like `title`, `name`, `id`...)
|
|
2790
|
+
* attr1, value1, attr2, value,
|
|
2791
|
+
*
|
|
2792
|
+
* // a single namespace value (like `x:id`)
|
|
2793
|
+
* NAMESPACE_MARKER, namespaceUri1, name1, value1,
|
|
2794
|
+
*
|
|
2795
|
+
* // another single namespace value (like `x:name`)
|
|
2796
|
+
* NAMESPACE_MARKER, namespaceUri2, name2, value2,
|
|
2797
|
+
*
|
|
2798
|
+
* // a series of CSS classes that will be applied to the element (no spaces)
|
|
2799
|
+
* CLASSES_MARKER, class1, class2, class3,
|
|
2800
|
+
*
|
|
2801
|
+
* // a series of CSS styles (property + value) that will be applied to the element
|
|
2802
|
+
* STYLES_MARKER, prop1, value1, prop2, value2
|
|
2803
|
+
* ]
|
|
2804
|
+
*
|
|
2805
|
+
* All non-class and non-style attributes must be defined at the start of the list
|
|
2806
|
+
* first before all class and style values are set. When there is a change in value
|
|
2807
|
+
* type (like when classes and styles are introduced) a marker must be used to separate
|
|
2808
|
+
* the entries. The marker values themselves are set via entries found in the
|
|
2809
|
+
* [AttributeMarker] enum.
|
|
2810
|
+
*/
|
|
2811
|
+
hostAttrs?: TAttributes;
|
|
2812
|
+
/**
|
|
2813
|
+
* Function to create instances of content queries associated with a given directive.
|
|
2814
|
+
*/
|
|
2815
|
+
contentQueries?: ContentQueriesFunction<T>;
|
|
2816
|
+
/**
|
|
2817
|
+
* Additional set of instructions specific to view query processing. This could be seen as a
|
|
2818
|
+
* set of instructions to be inserted into the template function.
|
|
2819
|
+
*/
|
|
2820
|
+
viewQuery?: ViewQueriesFunction<T> | null;
|
|
2821
|
+
/**
|
|
2822
|
+
* Defines the name that can be used in the template to assign this directive to a variable.
|
|
2823
|
+
*
|
|
2824
|
+
* See: {@link Directive.exportAs}
|
|
2825
|
+
*/
|
|
2826
|
+
exportAs?: string[];
|
|
2827
|
+
/**
|
|
2828
|
+
* Whether this directive/component is standalone.
|
|
2829
|
+
*/
|
|
2830
|
+
standalone?: boolean;
|
|
2831
|
+
}
|
|
2832
|
+
|
|
2833
|
+
declare type DirectiveDefList = (ɵDirectiveDef<any> | ɵComponentDef<any>)[];
|
|
2834
|
+
|
|
2835
|
+
/**
|
|
2836
|
+
* Type used for directiveDefs on component definition.
|
|
2837
|
+
*
|
|
2838
|
+
* The function is necessary to be able to support forward declarations.
|
|
2839
|
+
*/
|
|
2840
|
+
declare type DirectiveDefListOrFactory = (() => DirectiveDefList) | DirectiveDefList;
|
|
2841
|
+
|
|
2842
|
+
declare const DISCONNECTED_NODES = "d";
|
|
2843
|
+
|
|
2844
|
+
/**
|
|
2845
|
+
* @description
|
|
2846
|
+
* Hook for manual bootstrapping of the application instead of using `bootstrap` array in @NgModule
|
|
2847
|
+
* annotation. This hook is invoked only when the `bootstrap` array is empty or not provided.
|
|
2848
|
+
*
|
|
2849
|
+
* Reference to the current application is provided as a parameter.
|
|
2850
|
+
*
|
|
2851
|
+
* See ["Bootstrapping"](guide/bootstrapping) and ["Entry components"](guide/entry-components).
|
|
2852
|
+
*
|
|
2853
|
+
* @usageNotes
|
|
2854
|
+
* The example below uses `ApplicationRef.bootstrap()` to render the
|
|
2855
|
+
* `AppComponent` on the page.
|
|
2856
|
+
*
|
|
2857
|
+
* ```typescript
|
|
2858
|
+
* class AppModule implements DoBootstrap {
|
|
2859
|
+
* ngDoBootstrap(appRef: ApplicationRef) {
|
|
2860
|
+
* appRef.bootstrap(AppComponent); // Or some other component
|
|
2861
|
+
* }
|
|
2862
|
+
* }
|
|
2863
|
+
* ```
|
|
2864
|
+
*
|
|
2865
|
+
* @publicApi
|
|
2866
|
+
*/
|
|
2867
|
+
export declare interface DoBootstrap {
|
|
2868
|
+
ngDoBootstrap(appRef: ApplicationRef): void;
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2871
|
+
/**
|
|
2872
|
+
* A lifecycle hook that invokes a custom change-detection function for a directive,
|
|
2873
|
+
* in addition to the check performed by the default change-detector.
|
|
2874
|
+
*
|
|
2875
|
+
* The default change-detection algorithm looks for differences by comparing
|
|
2876
|
+
* bound-property values by reference across change detection runs. You can use this
|
|
2877
|
+
* hook to check for and respond to changes by some other means.
|
|
2878
|
+
*
|
|
2879
|
+
* When the default change detector detects changes, it invokes `ngOnChanges()` if supplied,
|
|
2880
|
+
* regardless of whether you perform additional change detection.
|
|
2881
|
+
* Typically, you should not use both `DoCheck` and `OnChanges` to respond to
|
|
2882
|
+
* changes on the same input.
|
|
2883
|
+
*
|
|
2884
|
+
* @see `OnChanges`
|
|
2885
|
+
* @see [Lifecycle hooks guide](guide/lifecycle-hooks)
|
|
2886
|
+
*
|
|
2887
|
+
* @usageNotes
|
|
2888
|
+
* The following snippet shows how a component can implement this interface
|
|
2889
|
+
* to invoke it own change-detection cycle.
|
|
2890
|
+
*
|
|
2891
|
+
* {@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'}
|
|
2892
|
+
*
|
|
2893
|
+
* For a more complete example and discussion, see
|
|
2894
|
+
* [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection).
|
|
2895
|
+
*
|
|
2896
|
+
* @publicApi
|
|
2897
|
+
*/
|
|
2898
|
+
export declare interface DoCheck {
|
|
2731
2899
|
/**
|
|
2732
|
-
*
|
|
2900
|
+
* A callback method that performs change-detection, invoked
|
|
2901
|
+
* after the default change-detector runs.
|
|
2902
|
+
* See `KeyValueDiffers` and `IterableDiffers` for implementing
|
|
2903
|
+
* custom change checking for collections.
|
|
2904
|
+
*
|
|
2733
2905
|
*/
|
|
2734
|
-
|
|
2906
|
+
ngDoCheck(): void;
|
|
2735
2907
|
}
|
|
2736
2908
|
|
|
2737
2909
|
/**
|
|
@@ -2739,8 +2911,25 @@ export declare interface Effect {
|
|
|
2739
2911
|
*
|
|
2740
2912
|
* @developerPreview
|
|
2741
2913
|
*/
|
|
2742
|
-
export declare function effect(effectFn: () => void):
|
|
2914
|
+
export declare function effect(effectFn: () => void): EffectRef;
|
|
2915
|
+
|
|
2916
|
+
|
|
2917
|
+
/**
|
|
2918
|
+
* A global reactive effect, which can be manually destroyed.
|
|
2919
|
+
*
|
|
2920
|
+
* @developerPreview
|
|
2921
|
+
*/
|
|
2922
|
+
export declare interface EffectRef {
|
|
2923
|
+
/**
|
|
2924
|
+
* Shut down the effect, removing it from any upcoming scheduled executions.
|
|
2925
|
+
*/
|
|
2926
|
+
destroy(): void;
|
|
2927
|
+
}
|
|
2743
2928
|
|
|
2929
|
+
/**
|
|
2930
|
+
* Keys within serialized view data structure to represent various
|
|
2931
|
+
* parts. See the `SerializedView` interface below for additional information.
|
|
2932
|
+
*/
|
|
2744
2933
|
declare const ELEMENT_CONTAINERS = "e";
|
|
2745
2934
|
|
|
2746
2935
|
/**
|
|
@@ -2928,6 +3117,7 @@ export declare abstract class EnvironmentInjector implements Injector {
|
|
|
2928
3117
|
*
|
|
2929
3118
|
* @param fn the closure to be run in the context of this injector
|
|
2930
3119
|
* @returns the return value of the function, if any
|
|
3120
|
+
* @deprecated use the standalone function `runInInjectionContext` instead
|
|
2931
3121
|
*/
|
|
2932
3122
|
abstract runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
|
|
2933
3123
|
abstract destroy(): void;
|
|
@@ -4360,7 +4550,11 @@ export declare interface Input {
|
|
|
4360
4550
|
/**
|
|
4361
4551
|
* The name of the DOM property to which the input property is bound.
|
|
4362
4552
|
*/
|
|
4363
|
-
|
|
4553
|
+
alias?: string;
|
|
4554
|
+
/**
|
|
4555
|
+
* Whether the input is required for the directive to function.
|
|
4556
|
+
*/
|
|
4557
|
+
required?: boolean;
|
|
4364
4558
|
}
|
|
4365
4559
|
|
|
4366
4560
|
/**
|
|
@@ -4418,8 +4612,8 @@ export declare interface InputDecorator {
|
|
|
4418
4612
|
*
|
|
4419
4613
|
* @see [Input and Output properties](guide/inputs-outputs)
|
|
4420
4614
|
*/
|
|
4421
|
-
(
|
|
4422
|
-
new (
|
|
4615
|
+
(arg?: string | Input): any;
|
|
4616
|
+
new (arg?: string | Input): any;
|
|
4423
4617
|
}
|
|
4424
4618
|
|
|
4425
4619
|
/**
|
|
@@ -4808,7 +5002,7 @@ declare interface LContainer extends Array<any> {
|
|
|
4808
5002
|
*/
|
|
4809
5003
|
[T_HOST]: TNode;
|
|
4810
5004
|
/** The comment element that serves as an anchor for this LContainer. */
|
|
4811
|
-
|
|
5005
|
+
[NATIVE]: RComment;
|
|
4812
5006
|
/**
|
|
4813
5007
|
* Array of `ViewRef`s used by any `ViewContainerRef`s that point to this container.
|
|
4814
5008
|
*
|
|
@@ -4818,6 +5012,17 @@ declare interface LContainer extends Array<any> {
|
|
|
4818
5012
|
* doing so creates circular dependency.
|
|
4819
5013
|
*/
|
|
4820
5014
|
[VIEW_REFS]: unknown[] | null;
|
|
5015
|
+
/**
|
|
5016
|
+
* Array of dehydrated views within this container.
|
|
5017
|
+
*
|
|
5018
|
+
* This information is used during the hydration process on the client.
|
|
5019
|
+
* The hydration logic tries to find a matching dehydrated view, "claim" it
|
|
5020
|
+
* and use this information to do further matching. After that, this "claimed"
|
|
5021
|
+
* view is removed from the list. The remaining "unclaimed" views are
|
|
5022
|
+
* "garbage-collected" later on, i.e. removed from the DOM once the hydration
|
|
5023
|
+
* logic finishes.
|
|
5024
|
+
*/
|
|
5025
|
+
[DEHYDRATED_VIEWS]: DehydratedContainerView[] | null;
|
|
4821
5026
|
}
|
|
4822
5027
|
|
|
4823
5028
|
/**
|
|
@@ -5281,6 +5486,14 @@ export declare interface ModuleWithProviders<T> {
|
|
|
5281
5486
|
|
|
5282
5487
|
declare const MOVED_VIEWS = 9;
|
|
5283
5488
|
|
|
5489
|
+
declare const MULTIPLIER = "x";
|
|
5490
|
+
|
|
5491
|
+
declare type Mutable<T extends {
|
|
5492
|
+
[x: string]: any;
|
|
5493
|
+
}, K extends string> = {
|
|
5494
|
+
[P in K]: T[P];
|
|
5495
|
+
};
|
|
5496
|
+
|
|
5284
5497
|
declare const NATIVE = 7;
|
|
5285
5498
|
|
|
5286
5499
|
declare const NEXT = 4;
|
|
@@ -5731,6 +5944,10 @@ export declare class NgZone {
|
|
|
5731
5944
|
*/
|
|
5732
5945
|
export declare const NO_ERRORS_SCHEMA: SchemaMetadata;
|
|
5733
5946
|
|
|
5947
|
+
declare const NODES = "n";
|
|
5948
|
+
|
|
5949
|
+
declare const NUM_ROOT_NODES = "r";
|
|
5950
|
+
|
|
5734
5951
|
declare const ON_DESTROY_HOOKS = 22;
|
|
5735
5952
|
|
|
5736
5953
|
/**
|
|
@@ -5869,7 +6086,7 @@ export declare interface Output {
|
|
|
5869
6086
|
/**
|
|
5870
6087
|
* The name of the DOM property to which the output property is bound.
|
|
5871
6088
|
*/
|
|
5872
|
-
|
|
6089
|
+
alias?: string;
|
|
5873
6090
|
}
|
|
5874
6091
|
|
|
5875
6092
|
/**
|
|
@@ -5900,8 +6117,8 @@ export declare interface OutputDecorator {
|
|
|
5900
6117
|
* @see [Input and Output properties](guide/inputs-outputs)
|
|
5901
6118
|
*
|
|
5902
6119
|
*/
|
|
5903
|
-
(
|
|
5904
|
-
new (
|
|
6120
|
+
(alias?: string): any;
|
|
6121
|
+
new (alias?: string): any;
|
|
5905
6122
|
}
|
|
5906
6123
|
|
|
5907
6124
|
/**
|
|
@@ -6163,74 +6380,6 @@ declare const enum PreOrderHookFlags {
|
|
|
6163
6380
|
*/
|
|
6164
6381
|
declare type ProcessProvidersFunction = (providers: Provider[]) => Provider[];
|
|
6165
6382
|
|
|
6166
|
-
/**
|
|
6167
|
-
* Represents a value that can be read reactively, and can notify readers (`Consumer`s)
|
|
6168
|
-
* when it changes.
|
|
6169
|
-
*
|
|
6170
|
-
* Producers maintain a weak reference to any `Consumer`s which may depend on the
|
|
6171
|
-
* producer's value.
|
|
6172
|
-
*
|
|
6173
|
-
* Implementers of `Producer` expose a monotonic `valueVersion` counter, and are responsible
|
|
6174
|
-
* for incrementing this version when their value semantically changes. Some Producers may
|
|
6175
|
-
* produce this value lazily and thus at times need to be polled for potential updates to
|
|
6176
|
-
* their value (and by extension their `valueVersion`). This is accomplished via the
|
|
6177
|
-
* `checkForChangedValue` method for Producers, which should perform whatever calculations
|
|
6178
|
-
* are necessary to ensure `valueVersion` is up to date.
|
|
6179
|
-
*
|
|
6180
|
-
* `Producer`s support two operations:
|
|
6181
|
-
* * `producerNotifyConsumers`
|
|
6182
|
-
* * `producerAccessed`
|
|
6183
|
-
*/
|
|
6184
|
-
declare interface Producer {
|
|
6185
|
-
/**
|
|
6186
|
-
* Numeric identifier of this `Producer`.
|
|
6187
|
-
*
|
|
6188
|
-
* May also be used to satisfy the interface for `Consumer`.
|
|
6189
|
-
*/
|
|
6190
|
-
readonly id: ProducerId;
|
|
6191
|
-
/**
|
|
6192
|
-
* A `WeakRef` to this `Producer` instance.
|
|
6193
|
-
*
|
|
6194
|
-
* An implementer provides this as a cached value to avoid the need to instantiate
|
|
6195
|
-
* multiple `WeakRef` instances for the same `Producer`.
|
|
6196
|
-
*
|
|
6197
|
-
* May also be used to satisfy the interface for `Consumer`.
|
|
6198
|
-
*/
|
|
6199
|
-
readonly ref: WeakRef<Producer>;
|
|
6200
|
-
/**
|
|
6201
|
-
* A map of dependency `Edge`s to `Consumer`s, keyed by the `ConsumerId`.
|
|
6202
|
-
*
|
|
6203
|
-
* Used when the produced value changes to notify interested `Consumer`s.
|
|
6204
|
-
*/
|
|
6205
|
-
readonly consumers: Map<ConsumerId, Edge>;
|
|
6206
|
-
/**
|
|
6207
|
-
* Monotonically increasing counter which increases when the value of this `Producer`
|
|
6208
|
-
* semantically changes.
|
|
6209
|
-
*/
|
|
6210
|
-
readonly valueVersion: number;
|
|
6211
|
-
/**
|
|
6212
|
-
* Ensure that `valueVersion` is up to date for the `Producer`'s value.
|
|
6213
|
-
*
|
|
6214
|
-
* Some `Producer`s may produce values lazily, and thus require polling before their
|
|
6215
|
-
* `valueVersion` can be compared with the version captured during a previous read.
|
|
6216
|
-
*/
|
|
6217
|
-
checkForChangedValue(): void;
|
|
6218
|
-
}
|
|
6219
|
-
|
|
6220
|
-
/**
|
|
6221
|
-
* Identifier for a `Producer`, which is a branded `number`.
|
|
6222
|
-
*
|
|
6223
|
-
* Note that `ProducerId` and `ConsumerId` are assigned from the same sequence, so the same `number`
|
|
6224
|
-
* will never be used for both.
|
|
6225
|
-
*
|
|
6226
|
-
* Branding provides additional type safety by ensuring that `ProducerId` and `ConsumerId` are
|
|
6227
|
-
* mutually unassignable without a cast. Since several `Map`s are keyed by these IDs, this prevents
|
|
6228
|
-
* `ProducerId`s from being inadvertently used to look up `Consumer`s or vice versa.
|
|
6229
|
-
*/
|
|
6230
|
-
declare type ProducerId = number & {
|
|
6231
|
-
__producer: true;
|
|
6232
|
-
};
|
|
6233
|
-
|
|
6234
6383
|
/**
|
|
6235
6384
|
* List of slots for a projection. A slot can be either based on a parsed CSS selector
|
|
6236
6385
|
* which will be used to determine nodes which are projected into that slot.
|
|
@@ -6629,17 +6778,18 @@ declare class R3Injector extends EnvironmentInjector {
|
|
|
6629
6778
|
* hook was found.
|
|
6630
6779
|
*/
|
|
6631
6780
|
destroy(): void;
|
|
6632
|
-
onDestroy(callback: () => void): void;
|
|
6781
|
+
onDestroy(callback: () => void): () => void;
|
|
6633
6782
|
runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
|
|
6634
6783
|
get<T>(token: ProviderToken<T>, notFoundValue?: any, flags?: InjectFlags | InjectOptions): T;
|
|
6635
6784
|
toString(): string;
|
|
6636
|
-
|
|
6785
|
+
assertNotDestroyed(): void;
|
|
6637
6786
|
/**
|
|
6638
6787
|
* Process a `SingleProvider` and add it.
|
|
6639
6788
|
*/
|
|
6640
6789
|
private processProvider;
|
|
6641
6790
|
private hydrate;
|
|
6642
6791
|
private injectableDefInScope;
|
|
6792
|
+
private removeOnDestroy;
|
|
6643
6793
|
}
|
|
6644
6794
|
|
|
6645
6795
|
declare interface RComment extends RNode {
|
|
@@ -7418,6 +7568,20 @@ declare interface RText extends RNode {
|
|
|
7418
7568
|
textContent: string | null;
|
|
7419
7569
|
}
|
|
7420
7570
|
|
|
7571
|
+
/**
|
|
7572
|
+
* Runs the given function in the context of the given `Injector`.
|
|
7573
|
+
*
|
|
7574
|
+
* Within the function's stack frame, `inject` can be used to inject dependencies from the given
|
|
7575
|
+
* `Injector`. Note that `inject` is only usable synchronously, and cannot be used in any
|
|
7576
|
+
* asynchronous callbacks or after any `await` points.
|
|
7577
|
+
*
|
|
7578
|
+
* @param injector the injector which will satisfy calls to `inject` while `fn` is executing
|
|
7579
|
+
* @param fn the closure to be run in the context of `injector`
|
|
7580
|
+
* @returns the return value of the function, if any
|
|
7581
|
+
* @publicApi
|
|
7582
|
+
*/
|
|
7583
|
+
export declare function runInInjectionContext<ReturnT>(injector: Injector, fn: () => ReturnT): ReturnT;
|
|
7584
|
+
|
|
7421
7585
|
|
|
7422
7586
|
/**
|
|
7423
7587
|
* The list of error codes used in runtime code of the `core` package.
|
|
@@ -7456,12 +7620,18 @@ declare const enum RuntimeErrorCode {
|
|
|
7456
7620
|
HOST_DIRECTIVE_CONFLICTING_ALIAS = 312,
|
|
7457
7621
|
MULTIPLE_PLATFORMS = 400,
|
|
7458
7622
|
PLATFORM_NOT_FOUND = 401,
|
|
7459
|
-
|
|
7623
|
+
MISSING_REQUIRED_INJECTABLE_IN_BOOTSTRAP = 402,
|
|
7460
7624
|
BOOTSTRAP_COMPONENTS_NOT_FOUND = -403,
|
|
7461
7625
|
PLATFORM_ALREADY_DESTROYED = 404,
|
|
7462
7626
|
ASYNC_INITIALIZERS_STILL_RUNNING = 405,
|
|
7463
7627
|
APPLICATION_REF_ALREADY_DESTROYED = 406,
|
|
7464
7628
|
RENDERER_NOT_FOUND = 407,
|
|
7629
|
+
HYDRATION_NODE_MISMATCH = 500,
|
|
7630
|
+
HYDRATION_MISSING_SIBLINGS = 501,
|
|
7631
|
+
HYDRATION_MISSING_NODE = 502,
|
|
7632
|
+
UNSUPPORTED_PROJECTION_DOM_NODES = 503,
|
|
7633
|
+
INVALID_SKIP_HYDRATION_HOST = 504,
|
|
7634
|
+
HYDRATION_I18N_NOT_YET_SUPPORTED = 518,
|
|
7465
7635
|
INVALID_I18N_STRUCTURE = 700,
|
|
7466
7636
|
MISSING_LOCALE_DATA = 701,
|
|
7467
7637
|
IMPORT_PROVIDERS_FROM_STANDALONE = 800,
|
|
@@ -7588,8 +7758,36 @@ export declare interface SelfDecorator {
|
|
|
7588
7758
|
}
|
|
7589
7759
|
|
|
7590
7760
|
/**
|
|
7591
|
-
*
|
|
7592
|
-
*
|
|
7761
|
+
* Serialized data structure that contains relevant hydration
|
|
7762
|
+
* annotation information about a view that is a part of a
|
|
7763
|
+
* ViewContainer collection.
|
|
7764
|
+
*/
|
|
7765
|
+
declare interface SerializedContainerView extends SerializedView {
|
|
7766
|
+
/**
|
|
7767
|
+
* Unique id that represents a TView that was used to create
|
|
7768
|
+
* a given instance of a view:
|
|
7769
|
+
* - TViewType.Embedded: a unique id generated during serialization on the server
|
|
7770
|
+
* - TViewType.Component: an id generated based on component properties
|
|
7771
|
+
* (see `getComponentId` function for details)
|
|
7772
|
+
*/
|
|
7773
|
+
[TEMPLATE_ID]: string;
|
|
7774
|
+
/**
|
|
7775
|
+
* Number of root nodes that belong to this view.
|
|
7776
|
+
* This information is needed to effectively traverse the DOM tree
|
|
7777
|
+
* and identify segments that belong to different views.
|
|
7778
|
+
*/
|
|
7779
|
+
[NUM_ROOT_NODES]: number;
|
|
7780
|
+
/**
|
|
7781
|
+
* Number of times this view is repeated.
|
|
7782
|
+
* This is used to avoid serializing and sending the same hydration
|
|
7783
|
+
* information about similar views (for example, produced by *ngFor).
|
|
7784
|
+
*/
|
|
7785
|
+
[MULTIPLIER]?: number;
|
|
7786
|
+
}
|
|
7787
|
+
|
|
7788
|
+
/**
|
|
7789
|
+
* Represents element containers within this view, stored as key-value pairs
|
|
7790
|
+
* where key is an index of a container in an LView (also used in the
|
|
7593
7791
|
* `elementContainerStart` instruction), the value is the number of root nodes
|
|
7594
7792
|
* in this container. This information is needed to locate an anchor comment
|
|
7595
7793
|
* node that goes after all container nodes.
|
|
@@ -7608,6 +7806,36 @@ declare interface SerializedView {
|
|
|
7608
7806
|
* Serialized information about <ng-container>s.
|
|
7609
7807
|
*/
|
|
7610
7808
|
[ELEMENT_CONTAINERS]?: SerializedElementContainers;
|
|
7809
|
+
/**
|
|
7810
|
+
* Serialized information about templates.
|
|
7811
|
+
* Key-value pairs where a key is an index of the corresponding
|
|
7812
|
+
* `template` instruction and the value is a unique id that can
|
|
7813
|
+
* be used during hydration to identify that template.
|
|
7814
|
+
*/
|
|
7815
|
+
[TEMPLATES]?: Record<number, string>;
|
|
7816
|
+
/**
|
|
7817
|
+
* Serialized information about view containers.
|
|
7818
|
+
* Key-value pairs where a key is an index of the corresponding
|
|
7819
|
+
* LContainer entry within an LView, and the value is a list
|
|
7820
|
+
* of serialized information about views within this container.
|
|
7821
|
+
*/
|
|
7822
|
+
[CONTAINERS]?: Record<number, SerializedContainerView[]>;
|
|
7823
|
+
/**
|
|
7824
|
+
* Serialized information about nodes in a template.
|
|
7825
|
+
* Key-value pairs where a key is an index of the corresponding
|
|
7826
|
+
* DOM node in an LView and the value is a path that describes
|
|
7827
|
+
* the location of this node (as a set of navigation instructions).
|
|
7828
|
+
*/
|
|
7829
|
+
[NODES]?: Record<number, string>;
|
|
7830
|
+
/**
|
|
7831
|
+
* A list of ids which represents a set of nodes disconnected
|
|
7832
|
+
* from the DOM tree at the serialization time, but otherwise
|
|
7833
|
+
* present in the internal data structures.
|
|
7834
|
+
*
|
|
7835
|
+
* This information is used to avoid triggering the hydration
|
|
7836
|
+
* logic for such nodes and instead use a regular "creation mode".
|
|
7837
|
+
*/
|
|
7838
|
+
[DISCONNECTED_NODES]?: number[];
|
|
7611
7839
|
}
|
|
7612
7840
|
|
|
7613
7841
|
/**
|
|
@@ -7922,6 +8150,8 @@ declare interface TElementNode extends TNode {
|
|
|
7922
8150
|
value: string;
|
|
7923
8151
|
}
|
|
7924
8152
|
|
|
8153
|
+
declare const TEMPLATE_ID = "i";
|
|
8154
|
+
|
|
7925
8155
|
/**
|
|
7926
8156
|
* Represents an embedded template that can be used to instantiate embedded views.
|
|
7927
8157
|
* To instantiate embedded views based on a template, use the `ViewContainerRef`
|
|
@@ -7963,6 +8193,8 @@ export declare abstract class TemplateRef<C> {
|
|
|
7963
8193
|
abstract createEmbeddedView(context: C, injector?: Injector): EmbeddedViewRef<C>;
|
|
7964
8194
|
}
|
|
7965
8195
|
|
|
8196
|
+
declare const TEMPLATES = "t";
|
|
8197
|
+
|
|
7966
8198
|
/**
|
|
7967
8199
|
* The Testability service provides testing hooks that can be accessed from
|
|
7968
8200
|
* the browser.
|
|
@@ -9277,6 +9509,13 @@ declare interface TView {
|
|
|
9277
9509
|
* view. This means that the view is likely corrupted and we should try to recover it.
|
|
9278
9510
|
*/
|
|
9279
9511
|
incompleteFirstPass: boolean;
|
|
9512
|
+
/**
|
|
9513
|
+
* Unique id of this TView for hydration purposes:
|
|
9514
|
+
* - TViewType.Embedded: a unique id generated during serialization on the server
|
|
9515
|
+
* - TViewType.Component: an id generated based on component properties
|
|
9516
|
+
* (see `getComponentId` function for details)
|
|
9517
|
+
*/
|
|
9518
|
+
ssrId: string | null;
|
|
9280
9519
|
}
|
|
9281
9520
|
|
|
9282
9521
|
/**
|
|
@@ -9815,9 +10054,6 @@ declare enum ViewEncapsulation_2 {
|
|
|
9815
10054
|
ShadowDom = 3
|
|
9816
10055
|
}
|
|
9817
10056
|
|
|
9818
|
-
declare interface viewEngine_ChangeDetectorRef_interface extends ChangeDetectorRef {
|
|
9819
|
-
}
|
|
9820
|
-
|
|
9821
10057
|
/**
|
|
9822
10058
|
* Definition of what a view queries function should look like.
|
|
9823
10059
|
*/
|
|
@@ -9864,8 +10100,6 @@ declare interface WeakRef<T extends object> {
|
|
|
9864
10100
|
deref(): T | undefined;
|
|
9865
10101
|
}
|
|
9866
10102
|
|
|
9867
|
-
declare const WeakRef: WeakRefCtor;
|
|
9868
|
-
|
|
9869
10103
|
declare interface WeakRefCtor {
|
|
9870
10104
|
new <T extends object>(value: T): WeakRef<T>;
|
|
9871
10105
|
}
|
|
@@ -9906,16 +10140,6 @@ export declare function ɵallowSanitizationBypassAndThrow(value: any, type: ɵBy
|
|
|
9906
10140
|
*/
|
|
9907
10141
|
export declare function ɵannotateForHydration(appRef: ApplicationRef, doc: Document): void;
|
|
9908
10142
|
|
|
9909
|
-
/**
|
|
9910
|
-
* Providers that generate a random `APP_ID_TOKEN`.
|
|
9911
|
-
* @publicApi
|
|
9912
|
-
*/
|
|
9913
|
-
export declare const ɵAPP_ID_RANDOM_PROVIDER: {
|
|
9914
|
-
provide: InjectionToken<string>;
|
|
9915
|
-
useFactory: typeof _appIdRandomProviderFactory;
|
|
9916
|
-
deps: any[];
|
|
9917
|
-
};
|
|
9918
|
-
|
|
9919
10143
|
/**
|
|
9920
10144
|
* A set of marker values to be used in the attributes arrays. These markers indicate that some
|
|
9921
10145
|
* items are not regular attributes and the processing should be adapted accordingly.
|
|
@@ -10498,13 +10722,6 @@ export declare function ɵflushModuleScopingQueueAsMuchAsPossible(): void;
|
|
|
10498
10722
|
*/
|
|
10499
10723
|
export declare function ɵformatRuntimeError<T extends number = RuntimeErrorCode>(code: T, message: null | false | string): string;
|
|
10500
10724
|
|
|
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;
|
|
10507
|
-
|
|
10508
10725
|
/**
|
|
10509
10726
|
* Retrieves directive instances associated with a given DOM node. Does not include
|
|
10510
10727
|
* component instances.
|
|
@@ -10896,9 +11113,9 @@ export declare const ɵNO_CHANGE: ɵNO_CHANGE;
|
|
|
10896
11113
|
* to framework to perform rendering.
|
|
10897
11114
|
*/
|
|
10898
11115
|
export declare class ɵNoopNgZone implements NgZone {
|
|
10899
|
-
readonly hasPendingMicrotasks
|
|
10900
|
-
readonly hasPendingMacrotasks
|
|
10901
|
-
readonly isStable
|
|
11116
|
+
readonly hasPendingMicrotasks = false;
|
|
11117
|
+
readonly hasPendingMacrotasks = false;
|
|
11118
|
+
readonly isStable = true;
|
|
10902
11119
|
readonly onUnstable: EventEmitter<any>;
|
|
10903
11120
|
readonly onMicrotaskEmpty: EventEmitter<any>;
|
|
10904
11121
|
readonly onStable: EventEmitter<any>;
|
|
@@ -11069,6 +11286,8 @@ export declare const enum ɵProfilerEvent {
|
|
|
11069
11286
|
*/
|
|
11070
11287
|
export declare function ɵprovideHydrationSupport(): EnvironmentProviders;
|
|
11071
11288
|
|
|
11289
|
+
export declare function ɵprovideNgZoneChangeDetection(ngZone: NgZone): StaticProvider[];
|
|
11290
|
+
|
|
11072
11291
|
/**
|
|
11073
11292
|
* Publishes a collection of default debug tools onto`window.ng`.
|
|
11074
11293
|
*
|
|
@@ -11166,7 +11385,7 @@ export declare class ɵRender3NgModuleRef<T> extends NgModuleRef<T> implements I
|
|
|
11166
11385
|
instance: T;
|
|
11167
11386
|
destroyCbs: (() => void)[] | null;
|
|
11168
11387
|
readonly componentFactoryResolver: ComponentFactoryResolver_2;
|
|
11169
|
-
constructor(ngModuleType: Type<T>, _parent: Injector | null);
|
|
11388
|
+
constructor(ngModuleType: Type<T>, _parent: Injector | null, additionalProviders: StaticProvider[]);
|
|
11170
11389
|
get injector(): EnvironmentInjector;
|
|
11171
11390
|
destroy(): void;
|
|
11172
11391
|
onDestroy(callback: () => void): void;
|
|
@@ -11302,6 +11521,11 @@ export declare interface ɵSafeValue {
|
|
|
11302
11521
|
*/
|
|
11303
11522
|
export declare function ɵsetAllowDuplicateNgModuleIdsForTest(allowDuplicates: boolean): void;
|
|
11304
11523
|
|
|
11524
|
+
/**
|
|
11525
|
+
* Use an alternate implementation of `WeakRef` if a platform implementation isn't available.
|
|
11526
|
+
*/
|
|
11527
|
+
export declare function ɵsetAlternateWeakRefImpl(impl: WeakRefCtor): void;
|
|
11528
|
+
|
|
11305
11529
|
/**
|
|
11306
11530
|
* Adds decorator, constructor, and property metadata to a given type via static metadata fields
|
|
11307
11531
|
* on the type.
|
|
@@ -11458,7 +11682,7 @@ export declare function ɵunwrapSafeValue(value: ɵSafeValue): string;
|
|
|
11458
11682
|
|
|
11459
11683
|
export declare function ɵunwrapSafeValue<T>(value: T): T;
|
|
11460
11684
|
|
|
11461
|
-
export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, InternalViewRef,
|
|
11685
|
+
export declare class ɵViewRef<T> implements EmbeddedViewRef<T>, InternalViewRef, ChangeDetectorRefInterface {
|
|
11462
11686
|
/**
|
|
11463
11687
|
* This represents the `LView` associated with the point where `ChangeDetectorRef` was
|
|
11464
11688
|
* requested.
|
|
@@ -12329,7 +12553,10 @@ export declare function ɵɵclassProp(className: string, value: boolean | undefi
|
|
|
12329
12553
|
* @publicApi
|
|
12330
12554
|
*/
|
|
12331
12555
|
export declare type ɵɵComponentDeclaration<T, Selector extends String, ExportAs extends string[], InputMap extends {
|
|
12332
|
-
[key: string]: string
|
|
12556
|
+
[key: string]: string | {
|
|
12557
|
+
alias: string | null;
|
|
12558
|
+
required: boolean;
|
|
12559
|
+
};
|
|
12333
12560
|
}, OutputMap extends {
|
|
12334
12561
|
[key: string]: string;
|
|
12335
12562
|
}, QueryFields extends string[], NgContentSelectors extends string[], IsStandalone extends boolean = false, HostDirectives = never> = unknown;
|
|
@@ -12372,7 +12599,7 @@ export declare function ɵɵCopyDefinitionFeature(definition: ɵDirectiveDef<any
|
|
|
12372
12599
|
*
|
|
12373
12600
|
* # Example
|
|
12374
12601
|
* ```
|
|
12375
|
-
* class
|
|
12602
|
+
* class MyComponent {
|
|
12376
12603
|
* // Generated by Angular Template Compiler
|
|
12377
12604
|
* // [Symbol] syntax will not be supported by TypeScript until v2.7
|
|
12378
12605
|
* static ɵcmp = defineComponent({
|
|
@@ -12382,230 +12609,7 @@ export declare function ɵɵCopyDefinitionFeature(definition: ɵDirectiveDef<any
|
|
|
12382
12609
|
* ```
|
|
12383
12610
|
* @codeGenApi
|
|
12384
12611
|
*/
|
|
12385
|
-
export declare function ɵɵdefineComponent<T>(componentDefinition:
|
|
12386
|
-
/**
|
|
12387
|
-
* Directive type, needed to configure the injector.
|
|
12388
|
-
*/
|
|
12389
|
-
type: Type<T>;
|
|
12390
|
-
/** The selectors that will be used to match nodes to this component. */
|
|
12391
|
-
selectors?: ɵCssSelectorList;
|
|
12392
|
-
/**
|
|
12393
|
-
* The number of nodes, local refs, and pipes in this component template.
|
|
12394
|
-
*
|
|
12395
|
-
* Used to calculate the length of this component's LView array, so we
|
|
12396
|
-
* can pre-fill the array and set the binding start index.
|
|
12397
|
-
*/
|
|
12398
|
-
decls: number;
|
|
12399
|
-
/**
|
|
12400
|
-
* The number of bindings in this component template (including pure fn bindings).
|
|
12401
|
-
*
|
|
12402
|
-
* Used to calculate the length of this component's LView array, so we
|
|
12403
|
-
* can pre-fill the array and set the host binding start index.
|
|
12404
|
-
*/
|
|
12405
|
-
vars: number;
|
|
12406
|
-
/**
|
|
12407
|
-
* A map of input names.
|
|
12408
|
-
*
|
|
12409
|
-
* The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
|
|
12410
|
-
*
|
|
12411
|
-
* Given:
|
|
12412
|
-
* ```
|
|
12413
|
-
* class MyComponent {
|
|
12414
|
-
* @Input()
|
|
12415
|
-
* publicInput1: string;
|
|
12416
|
-
*
|
|
12417
|
-
* @Input('publicInput2')
|
|
12418
|
-
* declaredInput2: string;
|
|
12419
|
-
* }
|
|
12420
|
-
* ```
|
|
12421
|
-
*
|
|
12422
|
-
* is described as:
|
|
12423
|
-
* ```
|
|
12424
|
-
* {
|
|
12425
|
-
* publicInput1: 'publicInput1',
|
|
12426
|
-
* declaredInput2: ['publicInput2', 'declaredInput2'],
|
|
12427
|
-
* }
|
|
12428
|
-
* ```
|
|
12429
|
-
*
|
|
12430
|
-
* Which the minifier may translate to:
|
|
12431
|
-
* ```
|
|
12432
|
-
* {
|
|
12433
|
-
* minifiedPublicInput1: 'publicInput1',
|
|
12434
|
-
* minifiedDeclaredInput2: ['publicInput2', 'declaredInput2'],
|
|
12435
|
-
* }
|
|
12436
|
-
* ```
|
|
12437
|
-
*
|
|
12438
|
-
* This allows the render to re-construct the minified, public, and declared names
|
|
12439
|
-
* of properties.
|
|
12440
|
-
*
|
|
12441
|
-
* NOTE:
|
|
12442
|
-
* - Because declared and public name are usually same we only generate the array
|
|
12443
|
-
* `['public', 'declared']` format when they differ.
|
|
12444
|
-
* - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
|
|
12445
|
-
* inconsistent behavior in that it uses declared names rather than minified or public. For
|
|
12446
|
-
* this reason `NgOnChanges` will be deprecated and removed in future version and this
|
|
12447
|
-
* API will be simplified to be consistent with `output`.
|
|
12448
|
-
*/
|
|
12449
|
-
inputs?: {
|
|
12450
|
-
[P in keyof T]?: string | [string, string];
|
|
12451
|
-
};
|
|
12452
|
-
/**
|
|
12453
|
-
* A map of output names.
|
|
12454
|
-
*
|
|
12455
|
-
* The format is in: `{[actualPropertyName: string]:string}`.
|
|
12456
|
-
*
|
|
12457
|
-
* Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
|
|
12458
|
-
*
|
|
12459
|
-
* This allows the render to re-construct the minified and non-minified names
|
|
12460
|
-
* of properties.
|
|
12461
|
-
*/
|
|
12462
|
-
outputs?: {
|
|
12463
|
-
[P in keyof T]?: string;
|
|
12464
|
-
};
|
|
12465
|
-
/**
|
|
12466
|
-
* Function executed by the parent template to allow child directive to apply host bindings.
|
|
12467
|
-
*/
|
|
12468
|
-
hostBindings?: HostBindingsFunction<T>;
|
|
12469
|
-
/**
|
|
12470
|
-
* The number of bindings in this directive `hostBindings` (including pure fn bindings).
|
|
12471
|
-
*
|
|
12472
|
-
* Used to calculate the length of the component's LView array, so we
|
|
12473
|
-
* can pre-fill the array and set the host binding start index.
|
|
12474
|
-
*/
|
|
12475
|
-
hostVars?: number;
|
|
12476
|
-
/**
|
|
12477
|
-
* Assign static attribute values to a host element.
|
|
12478
|
-
*
|
|
12479
|
-
* This property will assign static attribute values as well as class and style
|
|
12480
|
-
* values to a host element. Since attribute values can consist of different types of values, the
|
|
12481
|
-
* `hostAttrs` array must include the values in the following format:
|
|
12482
|
-
*
|
|
12483
|
-
* attrs = [
|
|
12484
|
-
* // static attributes (like `title`, `name`, `id`...)
|
|
12485
|
-
* attr1, value1, attr2, value,
|
|
12486
|
-
*
|
|
12487
|
-
* // a single namespace value (like `x:id`)
|
|
12488
|
-
* NAMESPACE_MARKER, namespaceUri1, name1, value1,
|
|
12489
|
-
*
|
|
12490
|
-
* // another single namespace value (like `x:name`)
|
|
12491
|
-
* NAMESPACE_MARKER, namespaceUri2, name2, value2,
|
|
12492
|
-
*
|
|
12493
|
-
* // a series of CSS classes that will be applied to the element (no spaces)
|
|
12494
|
-
* CLASSES_MARKER, class1, class2, class3,
|
|
12495
|
-
*
|
|
12496
|
-
* // a series of CSS styles (property + value) that will be applied to the element
|
|
12497
|
-
* STYLES_MARKER, prop1, value1, prop2, value2
|
|
12498
|
-
* ]
|
|
12499
|
-
*
|
|
12500
|
-
* All non-class and non-style attributes must be defined at the start of the list
|
|
12501
|
-
* first before all class and style values are set. When there is a change in value
|
|
12502
|
-
* type (like when classes and styles are introduced) a marker must be used to separate
|
|
12503
|
-
* the entries. The marker values themselves are set via entries found in the
|
|
12504
|
-
* [AttributeMarker] enum.
|
|
12505
|
-
*/
|
|
12506
|
-
hostAttrs?: TAttributes;
|
|
12507
|
-
/**
|
|
12508
|
-
* Function to create instances of content queries associated with a given directive.
|
|
12509
|
-
*/
|
|
12510
|
-
contentQueries?: ContentQueriesFunction<T>;
|
|
12511
|
-
/**
|
|
12512
|
-
* Defines the name that can be used in the template to assign this directive to a variable.
|
|
12513
|
-
*
|
|
12514
|
-
* See: {@link Directive.exportAs}
|
|
12515
|
-
*/
|
|
12516
|
-
exportAs?: string[];
|
|
12517
|
-
/**
|
|
12518
|
-
* Template function use for rendering DOM.
|
|
12519
|
-
*
|
|
12520
|
-
* This function has following structure.
|
|
12521
|
-
*
|
|
12522
|
-
* ```
|
|
12523
|
-
* function Template<T>(ctx:T, creationMode: boolean) {
|
|
12524
|
-
* if (creationMode) {
|
|
12525
|
-
* // Contains creation mode instructions.
|
|
12526
|
-
* }
|
|
12527
|
-
* // Contains binding update instructions
|
|
12528
|
-
* }
|
|
12529
|
-
* ```
|
|
12530
|
-
*
|
|
12531
|
-
* Common instructions are:
|
|
12532
|
-
* Creation mode instructions:
|
|
12533
|
-
* - `elementStart`, `elementEnd`
|
|
12534
|
-
* - `text`
|
|
12535
|
-
* - `container`
|
|
12536
|
-
* - `listener`
|
|
12537
|
-
*
|
|
12538
|
-
* Binding update instructions:
|
|
12539
|
-
* - `bind`
|
|
12540
|
-
* - `elementAttribute`
|
|
12541
|
-
* - `elementProperty`
|
|
12542
|
-
* - `elementClass`
|
|
12543
|
-
* - `elementStyle`
|
|
12544
|
-
*
|
|
12545
|
-
*/
|
|
12546
|
-
template: ComponentTemplate<T>;
|
|
12547
|
-
/**
|
|
12548
|
-
* Constants for the nodes in the component's view.
|
|
12549
|
-
* Includes attribute arrays, local definition arrays etc.
|
|
12550
|
-
*/
|
|
12551
|
-
consts?: TConstantsOrFactory;
|
|
12552
|
-
/**
|
|
12553
|
-
* An array of `ngContent[selector]` values that were found in the template.
|
|
12554
|
-
*/
|
|
12555
|
-
ngContentSelectors?: string[];
|
|
12556
|
-
/**
|
|
12557
|
-
* Additional set of instructions specific to view query processing. This could be seen as a
|
|
12558
|
-
* set of instruction to be inserted into the template function.
|
|
12559
|
-
*
|
|
12560
|
-
* Query-related instructions need to be pulled out to a specific function as a timing of
|
|
12561
|
-
* execution is different as compared to all other instructions (after change detection hooks but
|
|
12562
|
-
* before view hooks).
|
|
12563
|
-
*/
|
|
12564
|
-
viewQuery?: ViewQueriesFunction<T> | null;
|
|
12565
|
-
/**
|
|
12566
|
-
* A list of optional features to apply.
|
|
12567
|
-
*
|
|
12568
|
-
* See: {@link NgOnChangesFeature}, {@link ProvidersFeature}
|
|
12569
|
-
*/
|
|
12570
|
-
features?: ComponentDefFeature[];
|
|
12571
|
-
/**
|
|
12572
|
-
* Defines template and style encapsulation options available for Component's {@link Component}.
|
|
12573
|
-
*/
|
|
12574
|
-
encapsulation?: ViewEncapsulation;
|
|
12575
|
-
/**
|
|
12576
|
-
* Defines arbitrary developer-defined data to be stored on a renderer instance.
|
|
12577
|
-
* This is useful for renderers that delegate to other renderers.
|
|
12578
|
-
*
|
|
12579
|
-
* see: animation
|
|
12580
|
-
*/
|
|
12581
|
-
data?: {
|
|
12582
|
-
[kind: string]: any;
|
|
12583
|
-
};
|
|
12584
|
-
/**
|
|
12585
|
-
* A set of styles that the component needs to be present for component to render correctly.
|
|
12586
|
-
*/
|
|
12587
|
-
styles?: string[];
|
|
12588
|
-
/**
|
|
12589
|
-
* The strategy that the default change detector uses to detect changes.
|
|
12590
|
-
* When set, takes effect the next time change detection is triggered.
|
|
12591
|
-
*/
|
|
12592
|
-
changeDetection?: ChangeDetectionStrategy;
|
|
12593
|
-
/**
|
|
12594
|
-
* Registry of directives, components, and pipes that may be found in this component's view.
|
|
12595
|
-
*
|
|
12596
|
-
* This property is either an array of types or a function that returns the array of types. This
|
|
12597
|
-
* function may be necessary to support forward declarations.
|
|
12598
|
-
*/
|
|
12599
|
-
dependencies?: TypeOrFactory<DependencyTypeList>;
|
|
12600
|
-
/**
|
|
12601
|
-
* The set of schemas that declare elements to be allowed in the component's template.
|
|
12602
|
-
*/
|
|
12603
|
-
schemas?: SchemaMetadata[] | null;
|
|
12604
|
-
/**
|
|
12605
|
-
* Whether this directive/component is standalone.
|
|
12606
|
-
*/
|
|
12607
|
-
standalone?: boolean;
|
|
12608
|
-
}): unknown;
|
|
12612
|
+
export declare function ɵɵdefineComponent<T>(componentDefinition: ComponentDefinition<T>): Mutable<ɵComponentDef<any>, keyof ɵComponentDef<any>>;
|
|
12609
12613
|
|
|
12610
12614
|
/**
|
|
12611
12615
|
* Create a directive definition object.
|
|
@@ -12623,132 +12627,7 @@ export declare function ɵɵdefineComponent<T>(componentDefinition: {
|
|
|
12623
12627
|
*
|
|
12624
12628
|
* @codeGenApi
|
|
12625
12629
|
*/
|
|
12626
|
-
export declare
|
|
12627
|
-
/**
|
|
12628
|
-
* Directive type, needed to configure the injector.
|
|
12629
|
-
*/
|
|
12630
|
-
type: Type<T>;
|
|
12631
|
-
/** The selectors that will be used to match nodes to this directive. */
|
|
12632
|
-
selectors?: ɵCssSelectorList | undefined;
|
|
12633
|
-
/**
|
|
12634
|
-
* A map of input names.
|
|
12635
|
-
*
|
|
12636
|
-
* The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
|
|
12637
|
-
*
|
|
12638
|
-
* Given:
|
|
12639
|
-
* ```
|
|
12640
|
-
* class MyComponent {
|
|
12641
|
-
* @Input()
|
|
12642
|
-
* publicInput1: string;
|
|
12643
|
-
*
|
|
12644
|
-
* @Input('publicInput2')
|
|
12645
|
-
* declaredInput2: string;
|
|
12646
|
-
* }
|
|
12647
|
-
* ```
|
|
12648
|
-
*
|
|
12649
|
-
* is described as:
|
|
12650
|
-
* ```
|
|
12651
|
-
* {
|
|
12652
|
-
* publicInput1: 'publicInput1',
|
|
12653
|
-
* declaredInput2: ['declaredInput2', 'publicInput2'],
|
|
12654
|
-
* }
|
|
12655
|
-
* ```
|
|
12656
|
-
*
|
|
12657
|
-
* Which the minifier may translate to:
|
|
12658
|
-
* ```
|
|
12659
|
-
* {
|
|
12660
|
-
* minifiedPublicInput1: 'publicInput1',
|
|
12661
|
-
* minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],
|
|
12662
|
-
* }
|
|
12663
|
-
* ```
|
|
12664
|
-
*
|
|
12665
|
-
* This allows the render to re-construct the minified, public, and declared names
|
|
12666
|
-
* of properties.
|
|
12667
|
-
*
|
|
12668
|
-
* NOTE:
|
|
12669
|
-
* - Because declared and public name are usually same we only generate the array
|
|
12670
|
-
* `['declared', 'public']` format when they differ.
|
|
12671
|
-
* - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
|
|
12672
|
-
* inconsistent behavior in that it uses declared names rather than minified or public. For
|
|
12673
|
-
* this reason `NgOnChanges` will be deprecated and removed in future version and this
|
|
12674
|
-
* API will be simplified to be consistent with `output`.
|
|
12675
|
-
*/
|
|
12676
|
-
inputs?: { [P in keyof T]?: string | [string, string] | undefined; } | undefined;
|
|
12677
|
-
/**
|
|
12678
|
-
* A map of output names.
|
|
12679
|
-
*
|
|
12680
|
-
* The format is in: `{[actualPropertyName: string]:string}`.
|
|
12681
|
-
*
|
|
12682
|
-
* Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
|
|
12683
|
-
*
|
|
12684
|
-
* This allows the render to re-construct the minified and non-minified names
|
|
12685
|
-
* of properties.
|
|
12686
|
-
*/
|
|
12687
|
-
outputs?: { [P_1 in keyof T]?: string | undefined; } | undefined;
|
|
12688
|
-
/**
|
|
12689
|
-
* A list of optional features to apply.
|
|
12690
|
-
*
|
|
12691
|
-
* See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}
|
|
12692
|
-
*/
|
|
12693
|
-
features?: DirectiveDefFeature[] | undefined;
|
|
12694
|
-
/**
|
|
12695
|
-
* Function executed by the parent template to allow child directive to apply host bindings.
|
|
12696
|
-
*/
|
|
12697
|
-
hostBindings?: HostBindingsFunction<T> | undefined;
|
|
12698
|
-
/**
|
|
12699
|
-
* The number of bindings in this directive `hostBindings` (including pure fn bindings).
|
|
12700
|
-
*
|
|
12701
|
-
* Used to calculate the length of the component's LView array, so we
|
|
12702
|
-
* can pre-fill the array and set the host binding start index.
|
|
12703
|
-
*/
|
|
12704
|
-
hostVars?: number | undefined;
|
|
12705
|
-
/**
|
|
12706
|
-
* Assign static attribute values to a host element.
|
|
12707
|
-
*
|
|
12708
|
-
* This property will assign static attribute values as well as class and style
|
|
12709
|
-
* values to a host element. Since attribute values can consist of different types of values,
|
|
12710
|
-
* the `hostAttrs` array must include the values in the following format:
|
|
12711
|
-
*
|
|
12712
|
-
* attrs = [
|
|
12713
|
-
* // static attributes (like `title`, `name`, `id`...)
|
|
12714
|
-
* attr1, value1, attr2, value,
|
|
12715
|
-
*
|
|
12716
|
-
* // a single namespace value (like `x:id`)
|
|
12717
|
-
* NAMESPACE_MARKER, namespaceUri1, name1, value1,
|
|
12718
|
-
*
|
|
12719
|
-
* // another single namespace value (like `x:name`)
|
|
12720
|
-
* NAMESPACE_MARKER, namespaceUri2, name2, value2,
|
|
12721
|
-
*
|
|
12722
|
-
* // a series of CSS classes that will be applied to the element (no spaces)
|
|
12723
|
-
* CLASSES_MARKER, class1, class2, class3,
|
|
12724
|
-
*
|
|
12725
|
-
* // a series of CSS styles (property + value) that will be applied to the element
|
|
12726
|
-
* STYLES_MARKER, prop1, value1, prop2, value2
|
|
12727
|
-
* ]
|
|
12728
|
-
*
|
|
12729
|
-
* All non-class and non-style attributes must be defined at the start of the list
|
|
12730
|
-
* first before all class and style values are set. When there is a change in value
|
|
12731
|
-
* type (like when classes and styles are introduced) a marker must be used to separate
|
|
12732
|
-
* the entries. The marker values themselves are set via entries found in the
|
|
12733
|
-
* [AttributeMarker] enum.
|
|
12734
|
-
*/
|
|
12735
|
-
hostAttrs?: TAttributes | undefined;
|
|
12736
|
-
/**
|
|
12737
|
-
* Function to create instances of content queries associated with a given directive.
|
|
12738
|
-
*/
|
|
12739
|
-
contentQueries?: ContentQueriesFunction<T> | undefined;
|
|
12740
|
-
/**
|
|
12741
|
-
* Additional set of instructions specific to view query processing. This could be seen as a
|
|
12742
|
-
* set of instructions to be inserted into the template function.
|
|
12743
|
-
*/
|
|
12744
|
-
viewQuery?: ViewQueriesFunction<T> | null | undefined;
|
|
12745
|
-
/**
|
|
12746
|
-
* Defines the name that can be used in the template to assign this directive to a variable.
|
|
12747
|
-
*
|
|
12748
|
-
* See: {@link Directive.exportAs}
|
|
12749
|
-
*/
|
|
12750
|
-
exportAs?: string[] | undefined;
|
|
12751
|
-
}) => never;
|
|
12630
|
+
export declare function ɵɵdefineDirective<T>(directiveDefinition: DirectiveDefinition<T>): Mutable<ɵDirectiveDef<any>, keyof ɵDirectiveDef<any>>;
|
|
12752
12631
|
|
|
12753
12632
|
/**
|
|
12754
12633
|
* Construct an injectable definition which defines how a token will be constructed by the DI
|
|
@@ -12852,7 +12731,10 @@ export declare function ɵɵdefinePipe<T>(pipeDef: {
|
|
|
12852
12731
|
* @publicApi
|
|
12853
12732
|
*/
|
|
12854
12733
|
export declare type ɵɵDirectiveDeclaration<T, Selector extends string, ExportAs extends string[], InputMap extends {
|
|
12855
|
-
[key: string]: string
|
|
12734
|
+
[key: string]: string | {
|
|
12735
|
+
alias: string | null;
|
|
12736
|
+
required: boolean;
|
|
12737
|
+
};
|
|
12856
12738
|
}, OutputMap extends {
|
|
12857
12739
|
[key: string]: string;
|
|
12858
12740
|
}, QueryFields extends string[], NgContentSelectors extends never = never, IsStandalone extends boolean = false, HostDirectives = never> = unknown;
|