@angular/core 15.2.1 → 15.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/src/application_ref.mjs +14 -3
- package/esm2020/src/application_tokens.mjs +1 -12
- package/esm2020/src/change_detection/change_detection.mjs +2 -2
- package/esm2020/src/change_detection/constants.mjs +1 -49
- package/esm2020/src/core.mjs +3 -3
- package/esm2020/src/core_private_export.mjs +1 -5
- package/esm2020/src/linker/template_ref.mjs +3 -3
- package/esm2020/src/render3/definition.mjs +53 -42
- package/esm2020/src/render3/i18n/i18n_util.mjs +3 -3
- package/esm2020/src/render3/instructions/shared.mjs +2 -2
- package/esm2020/src/render3/instructions/template.mjs +2 -2
- package/esm2020/src/render3/interfaces/node.mjs +1 -1
- package/esm2020/src/render3/interfaces/type_checks.mjs +2 -2
- package/esm2020/src/render3/jit/directive.mjs +1 -2
- package/esm2020/src/render3/util/discovery_utils.mjs +3 -2
- package/esm2020/src/version.mjs +1 -1
- package/esm2020/testing/src/logger.mjs +3 -3
- package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
- package/fesm2015/core.mjs +76 -133
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +62 -116
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +76 -116
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +63 -99
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +248 -422
- 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 +699 -674
- package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
- package/testing/index.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.2.
|
|
2
|
+
* @license Angular v15.2.3
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1235,6 +1235,101 @@ declare interface ComponentDefFeature {
|
|
|
1235
1235
|
ngInherit?: true;
|
|
1236
1236
|
}
|
|
1237
1237
|
|
|
1238
|
+
declare interface ComponentDefinition<T> extends Omit<DirectiveDefinition<T>, 'features'> {
|
|
1239
|
+
/**
|
|
1240
|
+
* The number of nodes, local refs, and pipes in this component template.
|
|
1241
|
+
*
|
|
1242
|
+
* Used to calculate the length of this component's LView array, so we
|
|
1243
|
+
* can pre-fill the array and set the binding start index.
|
|
1244
|
+
*/
|
|
1245
|
+
decls: number;
|
|
1246
|
+
/**
|
|
1247
|
+
* The number of bindings in this component template (including pure fn bindings).
|
|
1248
|
+
*
|
|
1249
|
+
* Used to calculate the length of this component's LView array, so we
|
|
1250
|
+
* can pre-fill the array and set the host binding start index.
|
|
1251
|
+
*/
|
|
1252
|
+
vars: number;
|
|
1253
|
+
/**
|
|
1254
|
+
* Template function use for rendering DOM.
|
|
1255
|
+
*
|
|
1256
|
+
* This function has following structure.
|
|
1257
|
+
*
|
|
1258
|
+
* ```
|
|
1259
|
+
* function Template<T>(ctx:T, creationMode: boolean) {
|
|
1260
|
+
* if (creationMode) {
|
|
1261
|
+
* // Contains creation mode instructions.
|
|
1262
|
+
* }
|
|
1263
|
+
* // Contains binding update instructions
|
|
1264
|
+
* }
|
|
1265
|
+
* ```
|
|
1266
|
+
*
|
|
1267
|
+
* Common instructions are:
|
|
1268
|
+
* Creation mode instructions:
|
|
1269
|
+
* - `elementStart`, `elementEnd`
|
|
1270
|
+
* - `text`
|
|
1271
|
+
* - `container`
|
|
1272
|
+
* - `listener`
|
|
1273
|
+
*
|
|
1274
|
+
* Binding update instructions:
|
|
1275
|
+
* - `bind`
|
|
1276
|
+
* - `elementAttribute`
|
|
1277
|
+
* - `elementProperty`
|
|
1278
|
+
* - `elementClass`
|
|
1279
|
+
* - `elementStyle`
|
|
1280
|
+
*
|
|
1281
|
+
*/
|
|
1282
|
+
template: ComponentTemplate<T>;
|
|
1283
|
+
/**
|
|
1284
|
+
* Constants for the nodes in the component's view.
|
|
1285
|
+
* Includes attribute arrays, local definition arrays etc.
|
|
1286
|
+
*/
|
|
1287
|
+
consts?: TConstantsOrFactory;
|
|
1288
|
+
/**
|
|
1289
|
+
* An array of `ngContent[selector]` values that were found in the template.
|
|
1290
|
+
*/
|
|
1291
|
+
ngContentSelectors?: string[];
|
|
1292
|
+
/**
|
|
1293
|
+
* A list of optional features to apply.
|
|
1294
|
+
*
|
|
1295
|
+
* See: {@link NgOnChangesFeature}, {@link ProvidersFeature}
|
|
1296
|
+
*/
|
|
1297
|
+
features?: ComponentDefFeature[];
|
|
1298
|
+
/**
|
|
1299
|
+
* Defines template and style encapsulation options available for Component's {@link Component}.
|
|
1300
|
+
*/
|
|
1301
|
+
encapsulation?: ViewEncapsulation;
|
|
1302
|
+
/**
|
|
1303
|
+
* Defines arbitrary developer-defined data to be stored on a renderer instance.
|
|
1304
|
+
* This is useful for renderers that delegate to other renderers.
|
|
1305
|
+
*
|
|
1306
|
+
* see: animation
|
|
1307
|
+
*/
|
|
1308
|
+
data?: {
|
|
1309
|
+
[kind: string]: any;
|
|
1310
|
+
};
|
|
1311
|
+
/**
|
|
1312
|
+
* A set of styles that the component needs to be present for component to render correctly.
|
|
1313
|
+
*/
|
|
1314
|
+
styles?: string[];
|
|
1315
|
+
/**
|
|
1316
|
+
* The strategy that the default change detector uses to detect changes.
|
|
1317
|
+
* When set, takes effect the next time change detection is triggered.
|
|
1318
|
+
*/
|
|
1319
|
+
changeDetection?: ChangeDetectionStrategy;
|
|
1320
|
+
/**
|
|
1321
|
+
* Registry of directives, components, and pipes that may be found in this component's view.
|
|
1322
|
+
*
|
|
1323
|
+
* This property is either an array of types or a function that returns the array of types. This
|
|
1324
|
+
* function may be necessary to support forward declarations.
|
|
1325
|
+
*/
|
|
1326
|
+
dependencies?: TypeOrFactory<DependencyTypeList>;
|
|
1327
|
+
/**
|
|
1328
|
+
* The set of schemas that declare elements to be allowed in the component's template.
|
|
1329
|
+
*/
|
|
1330
|
+
schemas?: SchemaMetadata[] | null;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1238
1333
|
/**
|
|
1239
1334
|
* Base class for a factory that can create a component dynamically.
|
|
1240
1335
|
* Instantiate a factory for a given type of component with `resolveComponentFactory()`.
|
|
@@ -2469,6 +2564,141 @@ declare interface DirectiveDefFeature {
|
|
|
2469
2564
|
ngInherit?: true;
|
|
2470
2565
|
}
|
|
2471
2566
|
|
|
2567
|
+
declare interface DirectiveDefinition<T> {
|
|
2568
|
+
/**
|
|
2569
|
+
* Directive type, needed to configure the injector.
|
|
2570
|
+
*/
|
|
2571
|
+
type: Type<T>;
|
|
2572
|
+
/** The selectors that will be used to match nodes to this directive. */
|
|
2573
|
+
selectors?: ɵCssSelectorList;
|
|
2574
|
+
/**
|
|
2575
|
+
* A map of input names.
|
|
2576
|
+
*
|
|
2577
|
+
* The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
|
|
2578
|
+
*
|
|
2579
|
+
* Given:
|
|
2580
|
+
* ```
|
|
2581
|
+
* class MyComponent {
|
|
2582
|
+
* @Input()
|
|
2583
|
+
* publicInput1: string;
|
|
2584
|
+
*
|
|
2585
|
+
* @Input('publicInput2')
|
|
2586
|
+
* declaredInput2: string;
|
|
2587
|
+
* }
|
|
2588
|
+
* ```
|
|
2589
|
+
*
|
|
2590
|
+
* is described as:
|
|
2591
|
+
* ```
|
|
2592
|
+
* {
|
|
2593
|
+
* publicInput1: 'publicInput1',
|
|
2594
|
+
* declaredInput2: ['declaredInput2', 'publicInput2'],
|
|
2595
|
+
* }
|
|
2596
|
+
* ```
|
|
2597
|
+
*
|
|
2598
|
+
* Which the minifier may translate to:
|
|
2599
|
+
* ```
|
|
2600
|
+
* {
|
|
2601
|
+
* minifiedPublicInput1: 'publicInput1',
|
|
2602
|
+
* minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],
|
|
2603
|
+
* }
|
|
2604
|
+
* ```
|
|
2605
|
+
*
|
|
2606
|
+
* This allows the render to re-construct the minified, public, and declared names
|
|
2607
|
+
* of properties.
|
|
2608
|
+
*
|
|
2609
|
+
* NOTE:
|
|
2610
|
+
* - Because declared and public name are usually same we only generate the array
|
|
2611
|
+
* `['declared', 'public']` format when they differ.
|
|
2612
|
+
* - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
|
|
2613
|
+
* inconsistent behavior in that it uses declared names rather than minified or public. For
|
|
2614
|
+
* this reason `NgOnChanges` will be deprecated and removed in future version and this
|
|
2615
|
+
* API will be simplified to be consistent with `output`.
|
|
2616
|
+
*/
|
|
2617
|
+
inputs?: {
|
|
2618
|
+
[P in keyof T]?: string | [string, string];
|
|
2619
|
+
};
|
|
2620
|
+
/**
|
|
2621
|
+
* A map of output names.
|
|
2622
|
+
*
|
|
2623
|
+
* The format is in: `{[actualPropertyName: string]:string}`.
|
|
2624
|
+
*
|
|
2625
|
+
* Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
|
|
2626
|
+
*
|
|
2627
|
+
* This allows the render to re-construct the minified and non-minified names
|
|
2628
|
+
* of properties.
|
|
2629
|
+
*/
|
|
2630
|
+
outputs?: {
|
|
2631
|
+
[P in keyof T]?: string;
|
|
2632
|
+
};
|
|
2633
|
+
/**
|
|
2634
|
+
* A list of optional features to apply.
|
|
2635
|
+
*
|
|
2636
|
+
* See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}
|
|
2637
|
+
*/
|
|
2638
|
+
features?: DirectiveDefFeature[];
|
|
2639
|
+
/**
|
|
2640
|
+
* Function executed by the parent template to allow child directive to apply host bindings.
|
|
2641
|
+
*/
|
|
2642
|
+
hostBindings?: HostBindingsFunction<T>;
|
|
2643
|
+
/**
|
|
2644
|
+
* The number of bindings in this directive `hostBindings` (including pure fn bindings).
|
|
2645
|
+
*
|
|
2646
|
+
* Used to calculate the length of the component's LView array, so we
|
|
2647
|
+
* can pre-fill the array and set the host binding start index.
|
|
2648
|
+
*/
|
|
2649
|
+
hostVars?: number;
|
|
2650
|
+
/**
|
|
2651
|
+
* Assign static attribute values to a host element.
|
|
2652
|
+
*
|
|
2653
|
+
* This property will assign static attribute values as well as class and style
|
|
2654
|
+
* values to a host element. Since attribute values can consist of different types of values,
|
|
2655
|
+
* the `hostAttrs` array must include the values in the following format:
|
|
2656
|
+
*
|
|
2657
|
+
* attrs = [
|
|
2658
|
+
* // static attributes (like `title`, `name`, `id`...)
|
|
2659
|
+
* attr1, value1, attr2, value,
|
|
2660
|
+
*
|
|
2661
|
+
* // a single namespace value (like `x:id`)
|
|
2662
|
+
* NAMESPACE_MARKER, namespaceUri1, name1, value1,
|
|
2663
|
+
*
|
|
2664
|
+
* // another single namespace value (like `x:name`)
|
|
2665
|
+
* NAMESPACE_MARKER, namespaceUri2, name2, value2,
|
|
2666
|
+
*
|
|
2667
|
+
* // a series of CSS classes that will be applied to the element (no spaces)
|
|
2668
|
+
* CLASSES_MARKER, class1, class2, class3,
|
|
2669
|
+
*
|
|
2670
|
+
* // a series of CSS styles (property + value) that will be applied to the element
|
|
2671
|
+
* STYLES_MARKER, prop1, value1, prop2, value2
|
|
2672
|
+
* ]
|
|
2673
|
+
*
|
|
2674
|
+
* All non-class and non-style attributes must be defined at the start of the list
|
|
2675
|
+
* first before all class and style values are set. When there is a change in value
|
|
2676
|
+
* type (like when classes and styles are introduced) a marker must be used to separate
|
|
2677
|
+
* the entries. The marker values themselves are set via entries found in the
|
|
2678
|
+
* [AttributeMarker] enum.
|
|
2679
|
+
*/
|
|
2680
|
+
hostAttrs?: TAttributes;
|
|
2681
|
+
/**
|
|
2682
|
+
* Function to create instances of content queries associated with a given directive.
|
|
2683
|
+
*/
|
|
2684
|
+
contentQueries?: ContentQueriesFunction<T>;
|
|
2685
|
+
/**
|
|
2686
|
+
* Additional set of instructions specific to view query processing. This could be seen as a
|
|
2687
|
+
* set of instructions to be inserted into the template function.
|
|
2688
|
+
*/
|
|
2689
|
+
viewQuery?: ViewQueriesFunction<T> | null;
|
|
2690
|
+
/**
|
|
2691
|
+
* Defines the name that can be used in the template to assign this directive to a variable.
|
|
2692
|
+
*
|
|
2693
|
+
* See: {@link Directive.exportAs}
|
|
2694
|
+
*/
|
|
2695
|
+
exportAs?: string[];
|
|
2696
|
+
/**
|
|
2697
|
+
* Whether this directive/component is standalone.
|
|
2698
|
+
*/
|
|
2699
|
+
standalone?: boolean;
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2472
2702
|
declare type DirectiveDefList = (ɵDirectiveDef<any> | ɵComponentDef<any>)[];
|
|
2473
2703
|
|
|
2474
2704
|
/**
|
|
@@ -5054,6 +5284,12 @@ export declare interface ModuleWithProviders<T> {
|
|
|
5054
5284
|
|
|
5055
5285
|
declare const MOVED_VIEWS = 9;
|
|
5056
5286
|
|
|
5287
|
+
declare type Mutable<T extends {
|
|
5288
|
+
[x: string]: any;
|
|
5289
|
+
}, K extends string> = {
|
|
5290
|
+
[P in K]: T[P];
|
|
5291
|
+
};
|
|
5292
|
+
|
|
5057
5293
|
declare const NATIVE = 7;
|
|
5058
5294
|
|
|
5059
5295
|
declare const NEXT = 4;
|
|
@@ -7482,7 +7718,7 @@ declare interface TContainerNode extends TNode {
|
|
|
7482
7718
|
* - They are dynamically created
|
|
7483
7719
|
*/
|
|
7484
7720
|
parent: TElementNode | TElementContainerNode | null;
|
|
7485
|
-
|
|
7721
|
+
tView: TView | null;
|
|
7486
7722
|
projection: null;
|
|
7487
7723
|
value: null;
|
|
7488
7724
|
}
|
|
@@ -7522,7 +7758,7 @@ declare interface TElementContainerNode extends TNode {
|
|
|
7522
7758
|
index: number;
|
|
7523
7759
|
child: TElementNode | TTextNode | TContainerNode | TElementContainerNode | TProjectionNode | null;
|
|
7524
7760
|
parent: TElementNode | TElementContainerNode | null;
|
|
7525
|
-
|
|
7761
|
+
tView: null;
|
|
7526
7762
|
projection: null;
|
|
7527
7763
|
}
|
|
7528
7764
|
|
|
@@ -7537,7 +7773,7 @@ declare interface TElementNode extends TNode {
|
|
|
7537
7773
|
* retrieved using viewData[HOST_NODE]).
|
|
7538
7774
|
*/
|
|
7539
7775
|
parent: TElementNode | TElementContainerNode | null;
|
|
7540
|
-
|
|
7776
|
+
tView: null;
|
|
7541
7777
|
/**
|
|
7542
7778
|
* If this is a component TNode with projection, this will be an array of projected
|
|
7543
7779
|
* TNodes or native nodes (see TNode.projection for more info). If it's a regular element node
|
|
@@ -7975,26 +8211,14 @@ declare interface TNode {
|
|
|
7975
8211
|
*/
|
|
7976
8212
|
outputs: PropertyAliases | null;
|
|
7977
8213
|
/**
|
|
7978
|
-
* The TView
|
|
7979
|
-
*
|
|
7980
|
-
* If this TNode corresponds to an LContainer with inline views, the container will
|
|
7981
|
-
* need to store separate static data for each of its view blocks (TView[]). Otherwise,
|
|
7982
|
-
* nodes in inline views with the same index as nodes in their parent views will overwrite
|
|
7983
|
-
* each other, as they are in the same template.
|
|
7984
|
-
*
|
|
7985
|
-
* Each index in this array corresponds to the static data for a certain
|
|
7986
|
-
* view. So if you had V(0) and V(1) in a container, you might have:
|
|
7987
|
-
*
|
|
7988
|
-
* [
|
|
7989
|
-
* [{tagName: 'div', attrs: ...}, null], // V(0) TView
|
|
7990
|
-
* [{tagName: 'button', attrs ...}, null] // V(1) TView
|
|
8214
|
+
* The TView attached to this node.
|
|
7991
8215
|
*
|
|
7992
8216
|
* If this TNode corresponds to an LContainer with a template (e.g. structural
|
|
7993
8217
|
* directive), the template's TView will be stored here.
|
|
7994
8218
|
*
|
|
7995
|
-
* If this TNode corresponds to an element,
|
|
8219
|
+
* If this TNode corresponds to an element, tView will be `null`.
|
|
7996
8220
|
*/
|
|
7997
|
-
|
|
8221
|
+
tView: TView | null;
|
|
7998
8222
|
/**
|
|
7999
8223
|
* The next sibling node. Necessary so we can propagate through the root nodes of a view
|
|
8000
8224
|
* to insert them or remove them from the DOM.
|
|
@@ -8295,7 +8519,7 @@ declare interface TProjectionNode extends TNode {
|
|
|
8295
8519
|
* retrieved using LView.node).
|
|
8296
8520
|
*/
|
|
8297
8521
|
parent: TElementNode | TElementContainerNode | null;
|
|
8298
|
-
|
|
8522
|
+
tView: null;
|
|
8299
8523
|
/** Index of the projection node. (See TNode.projection for more info.) */
|
|
8300
8524
|
projection: number;
|
|
8301
8525
|
value: null;
|
|
@@ -8686,7 +8910,7 @@ declare interface TTextNode extends TNode {
|
|
|
8686
8910
|
* retrieved using LView.node).
|
|
8687
8911
|
*/
|
|
8688
8912
|
parent: TElementNode | TElementContainerNode | null;
|
|
8689
|
-
|
|
8913
|
+
tView: null;
|
|
8690
8914
|
projection: null;
|
|
8691
8915
|
}
|
|
8692
8916
|
|
|
@@ -9712,43 +9936,6 @@ export declare const enum ɵBypassType {
|
|
|
9712
9936
|
Style = "Style"
|
|
9713
9937
|
}
|
|
9714
9938
|
|
|
9715
|
-
/**
|
|
9716
|
-
* Defines the possible states of the default change detector.
|
|
9717
|
-
* @see `ChangeDetectorRef`
|
|
9718
|
-
*/
|
|
9719
|
-
export declare enum ɵChangeDetectorStatus {
|
|
9720
|
-
/**
|
|
9721
|
-
* A state in which, after calling `detectChanges()`, the change detector
|
|
9722
|
-
* state becomes `Checked`, and must be explicitly invoked or reactivated.
|
|
9723
|
-
*/
|
|
9724
|
-
CheckOnce = 0,
|
|
9725
|
-
/**
|
|
9726
|
-
* A state in which change detection is skipped until the change detector mode
|
|
9727
|
-
* becomes `CheckOnce`.
|
|
9728
|
-
*/
|
|
9729
|
-
Checked = 1,
|
|
9730
|
-
/**
|
|
9731
|
-
* A state in which change detection continues automatically until explicitly
|
|
9732
|
-
* deactivated.
|
|
9733
|
-
*/
|
|
9734
|
-
CheckAlways = 2,
|
|
9735
|
-
/**
|
|
9736
|
-
* A state in which a change detector sub tree is not a part of the main tree and
|
|
9737
|
-
* should be skipped.
|
|
9738
|
-
*/
|
|
9739
|
-
Detached = 3,
|
|
9740
|
-
/**
|
|
9741
|
-
* Indicates that the change detector encountered an error checking a binding
|
|
9742
|
-
* or calling a directive lifecycle method and is now in an inconsistent state. Change
|
|
9743
|
-
* detectors in this state do not detect changes.
|
|
9744
|
-
*/
|
|
9745
|
-
Errored = 4,
|
|
9746
|
-
/**
|
|
9747
|
-
* Indicates that the change detector has been destroyed.
|
|
9748
|
-
*/
|
|
9749
|
-
Destroyed = 5
|
|
9750
|
-
}
|
|
9751
|
-
|
|
9752
9939
|
export declare function ɵclearResolutionOfComponentResourcesQueue(): Map<Type<any>, Component>;
|
|
9753
9940
|
|
|
9754
9941
|
|
|
@@ -10283,21 +10470,10 @@ export declare interface ɵInternalEnvironmentProviders extends EnvironmentProvi
|
|
|
10283
10470
|
|
|
10284
10471
|
export declare function ɵisBoundToModule<C>(cf: ComponentFactory<C>): boolean;
|
|
10285
10472
|
|
|
10286
|
-
/**
|
|
10287
|
-
* Reports whether a given strategy is currently the default for change detection.
|
|
10288
|
-
* @param changeDetectionStrategy The strategy to check.
|
|
10289
|
-
* @returns True if the given strategy is the current default, false otherwise.
|
|
10290
|
-
* @see `ChangeDetectorStatus`
|
|
10291
|
-
* @see `ChangeDetectorRef`
|
|
10292
|
-
*/
|
|
10293
|
-
export declare function ɵisDefaultChangeDetectionStrategy(changeDetectionStrategy: ChangeDetectionStrategy): boolean;
|
|
10294
|
-
|
|
10295
10473
|
export declare function ɵisEnvironmentProviders(value: Provider | EnvironmentProviders | ɵInternalEnvironmentProviders): value is ɵInternalEnvironmentProviders;
|
|
10296
10474
|
|
|
10297
10475
|
export declare function ɵisInjectable(type: any): boolean;
|
|
10298
10476
|
|
|
10299
|
-
export declare function ɵisListLikeIterable(obj: any): boolean;
|
|
10300
|
-
|
|
10301
10477
|
export declare function ɵisNgModule<T>(value: Type<T>): value is Type<T> & {
|
|
10302
10478
|
ɵmod: ɵNgModuleDef<T>;
|
|
10303
10479
|
};
|
|
@@ -10323,8 +10499,6 @@ export declare function ɵisPromise<T = any>(obj: any): obj is Promise<T>;
|
|
|
10323
10499
|
*/
|
|
10324
10500
|
export declare function ɵisSubscribable(obj: any | Subscribable<any>): obj is Subscribable<any>;
|
|
10325
10501
|
|
|
10326
|
-
export declare const ɵivyEnabled = true;
|
|
10327
|
-
|
|
10328
10502
|
/**
|
|
10329
10503
|
* The internal view context which is specific to a given DOM element, directive or
|
|
10330
10504
|
* component instance. Each value in here (besides the LView and element node details)
|
|
@@ -11894,7 +12068,7 @@ export declare function ɵɵCopyDefinitionFeature(definition: ɵDirectiveDef<any
|
|
|
11894
12068
|
*
|
|
11895
12069
|
* # Example
|
|
11896
12070
|
* ```
|
|
11897
|
-
* class
|
|
12071
|
+
* class MyComponent {
|
|
11898
12072
|
* // Generated by Angular Template Compiler
|
|
11899
12073
|
* // [Symbol] syntax will not be supported by TypeScript until v2.7
|
|
11900
12074
|
* static ɵcmp = defineComponent({
|
|
@@ -11904,230 +12078,7 @@ export declare function ɵɵCopyDefinitionFeature(definition: ɵDirectiveDef<any
|
|
|
11904
12078
|
* ```
|
|
11905
12079
|
* @codeGenApi
|
|
11906
12080
|
*/
|
|
11907
|
-
export declare function ɵɵdefineComponent<T>(componentDefinition:
|
|
11908
|
-
/**
|
|
11909
|
-
* Directive type, needed to configure the injector.
|
|
11910
|
-
*/
|
|
11911
|
-
type: Type<T>;
|
|
11912
|
-
/** The selectors that will be used to match nodes to this component. */
|
|
11913
|
-
selectors?: ɵCssSelectorList;
|
|
11914
|
-
/**
|
|
11915
|
-
* The number of nodes, local refs, and pipes in this component template.
|
|
11916
|
-
*
|
|
11917
|
-
* Used to calculate the length of this component's LView array, so we
|
|
11918
|
-
* can pre-fill the array and set the binding start index.
|
|
11919
|
-
*/
|
|
11920
|
-
decls: number;
|
|
11921
|
-
/**
|
|
11922
|
-
* The number of bindings in this component template (including pure fn bindings).
|
|
11923
|
-
*
|
|
11924
|
-
* Used to calculate the length of this component's LView array, so we
|
|
11925
|
-
* can pre-fill the array and set the host binding start index.
|
|
11926
|
-
*/
|
|
11927
|
-
vars: number;
|
|
11928
|
-
/**
|
|
11929
|
-
* A map of input names.
|
|
11930
|
-
*
|
|
11931
|
-
* The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
|
|
11932
|
-
*
|
|
11933
|
-
* Given:
|
|
11934
|
-
* ```
|
|
11935
|
-
* class MyComponent {
|
|
11936
|
-
* @Input()
|
|
11937
|
-
* publicInput1: string;
|
|
11938
|
-
*
|
|
11939
|
-
* @Input('publicInput2')
|
|
11940
|
-
* declaredInput2: string;
|
|
11941
|
-
* }
|
|
11942
|
-
* ```
|
|
11943
|
-
*
|
|
11944
|
-
* is described as:
|
|
11945
|
-
* ```
|
|
11946
|
-
* {
|
|
11947
|
-
* publicInput1: 'publicInput1',
|
|
11948
|
-
* declaredInput2: ['publicInput2', 'declaredInput2'],
|
|
11949
|
-
* }
|
|
11950
|
-
* ```
|
|
11951
|
-
*
|
|
11952
|
-
* Which the minifier may translate to:
|
|
11953
|
-
* ```
|
|
11954
|
-
* {
|
|
11955
|
-
* minifiedPublicInput1: 'publicInput1',
|
|
11956
|
-
* minifiedDeclaredInput2: ['publicInput2', 'declaredInput2'],
|
|
11957
|
-
* }
|
|
11958
|
-
* ```
|
|
11959
|
-
*
|
|
11960
|
-
* This allows the render to re-construct the minified, public, and declared names
|
|
11961
|
-
* of properties.
|
|
11962
|
-
*
|
|
11963
|
-
* NOTE:
|
|
11964
|
-
* - Because declared and public name are usually same we only generate the array
|
|
11965
|
-
* `['public', 'declared']` format when they differ.
|
|
11966
|
-
* - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
|
|
11967
|
-
* inconsistent behavior in that it uses declared names rather than minified or public. For
|
|
11968
|
-
* this reason `NgOnChanges` will be deprecated and removed in future version and this
|
|
11969
|
-
* API will be simplified to be consistent with `output`.
|
|
11970
|
-
*/
|
|
11971
|
-
inputs?: {
|
|
11972
|
-
[P in keyof T]?: string | [string, string];
|
|
11973
|
-
};
|
|
11974
|
-
/**
|
|
11975
|
-
* A map of output names.
|
|
11976
|
-
*
|
|
11977
|
-
* The format is in: `{[actualPropertyName: string]:string}`.
|
|
11978
|
-
*
|
|
11979
|
-
* Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
|
|
11980
|
-
*
|
|
11981
|
-
* This allows the render to re-construct the minified and non-minified names
|
|
11982
|
-
* of properties.
|
|
11983
|
-
*/
|
|
11984
|
-
outputs?: {
|
|
11985
|
-
[P in keyof T]?: string;
|
|
11986
|
-
};
|
|
11987
|
-
/**
|
|
11988
|
-
* Function executed by the parent template to allow child directive to apply host bindings.
|
|
11989
|
-
*/
|
|
11990
|
-
hostBindings?: HostBindingsFunction<T>;
|
|
11991
|
-
/**
|
|
11992
|
-
* The number of bindings in this directive `hostBindings` (including pure fn bindings).
|
|
11993
|
-
*
|
|
11994
|
-
* Used to calculate the length of the component's LView array, so we
|
|
11995
|
-
* can pre-fill the array and set the host binding start index.
|
|
11996
|
-
*/
|
|
11997
|
-
hostVars?: number;
|
|
11998
|
-
/**
|
|
11999
|
-
* Assign static attribute values to a host element.
|
|
12000
|
-
*
|
|
12001
|
-
* This property will assign static attribute values as well as class and style
|
|
12002
|
-
* values to a host element. Since attribute values can consist of different types of values, the
|
|
12003
|
-
* `hostAttrs` array must include the values in the following format:
|
|
12004
|
-
*
|
|
12005
|
-
* attrs = [
|
|
12006
|
-
* // static attributes (like `title`, `name`, `id`...)
|
|
12007
|
-
* attr1, value1, attr2, value,
|
|
12008
|
-
*
|
|
12009
|
-
* // a single namespace value (like `x:id`)
|
|
12010
|
-
* NAMESPACE_MARKER, namespaceUri1, name1, value1,
|
|
12011
|
-
*
|
|
12012
|
-
* // another single namespace value (like `x:name`)
|
|
12013
|
-
* NAMESPACE_MARKER, namespaceUri2, name2, value2,
|
|
12014
|
-
*
|
|
12015
|
-
* // a series of CSS classes that will be applied to the element (no spaces)
|
|
12016
|
-
* CLASSES_MARKER, class1, class2, class3,
|
|
12017
|
-
*
|
|
12018
|
-
* // a series of CSS styles (property + value) that will be applied to the element
|
|
12019
|
-
* STYLES_MARKER, prop1, value1, prop2, value2
|
|
12020
|
-
* ]
|
|
12021
|
-
*
|
|
12022
|
-
* All non-class and non-style attributes must be defined at the start of the list
|
|
12023
|
-
* first before all class and style values are set. When there is a change in value
|
|
12024
|
-
* type (like when classes and styles are introduced) a marker must be used to separate
|
|
12025
|
-
* the entries. The marker values themselves are set via entries found in the
|
|
12026
|
-
* [AttributeMarker] enum.
|
|
12027
|
-
*/
|
|
12028
|
-
hostAttrs?: TAttributes;
|
|
12029
|
-
/**
|
|
12030
|
-
* Function to create instances of content queries associated with a given directive.
|
|
12031
|
-
*/
|
|
12032
|
-
contentQueries?: ContentQueriesFunction<T>;
|
|
12033
|
-
/**
|
|
12034
|
-
* Defines the name that can be used in the template to assign this directive to a variable.
|
|
12035
|
-
*
|
|
12036
|
-
* See: {@link Directive.exportAs}
|
|
12037
|
-
*/
|
|
12038
|
-
exportAs?: string[];
|
|
12039
|
-
/**
|
|
12040
|
-
* Template function use for rendering DOM.
|
|
12041
|
-
*
|
|
12042
|
-
* This function has following structure.
|
|
12043
|
-
*
|
|
12044
|
-
* ```
|
|
12045
|
-
* function Template<T>(ctx:T, creationMode: boolean) {
|
|
12046
|
-
* if (creationMode) {
|
|
12047
|
-
* // Contains creation mode instructions.
|
|
12048
|
-
* }
|
|
12049
|
-
* // Contains binding update instructions
|
|
12050
|
-
* }
|
|
12051
|
-
* ```
|
|
12052
|
-
*
|
|
12053
|
-
* Common instructions are:
|
|
12054
|
-
* Creation mode instructions:
|
|
12055
|
-
* - `elementStart`, `elementEnd`
|
|
12056
|
-
* - `text`
|
|
12057
|
-
* - `container`
|
|
12058
|
-
* - `listener`
|
|
12059
|
-
*
|
|
12060
|
-
* Binding update instructions:
|
|
12061
|
-
* - `bind`
|
|
12062
|
-
* - `elementAttribute`
|
|
12063
|
-
* - `elementProperty`
|
|
12064
|
-
* - `elementClass`
|
|
12065
|
-
* - `elementStyle`
|
|
12066
|
-
*
|
|
12067
|
-
*/
|
|
12068
|
-
template: ComponentTemplate<T>;
|
|
12069
|
-
/**
|
|
12070
|
-
* Constants for the nodes in the component's view.
|
|
12071
|
-
* Includes attribute arrays, local definition arrays etc.
|
|
12072
|
-
*/
|
|
12073
|
-
consts?: TConstantsOrFactory;
|
|
12074
|
-
/**
|
|
12075
|
-
* An array of `ngContent[selector]` values that were found in the template.
|
|
12076
|
-
*/
|
|
12077
|
-
ngContentSelectors?: string[];
|
|
12078
|
-
/**
|
|
12079
|
-
* Additional set of instructions specific to view query processing. This could be seen as a
|
|
12080
|
-
* set of instruction to be inserted into the template function.
|
|
12081
|
-
*
|
|
12082
|
-
* Query-related instructions need to be pulled out to a specific function as a timing of
|
|
12083
|
-
* execution is different as compared to all other instructions (after change detection hooks but
|
|
12084
|
-
* before view hooks).
|
|
12085
|
-
*/
|
|
12086
|
-
viewQuery?: ViewQueriesFunction<T> | null;
|
|
12087
|
-
/**
|
|
12088
|
-
* A list of optional features to apply.
|
|
12089
|
-
*
|
|
12090
|
-
* See: {@link NgOnChangesFeature}, {@link ProvidersFeature}
|
|
12091
|
-
*/
|
|
12092
|
-
features?: ComponentDefFeature[];
|
|
12093
|
-
/**
|
|
12094
|
-
* Defines template and style encapsulation options available for Component's {@link Component}.
|
|
12095
|
-
*/
|
|
12096
|
-
encapsulation?: ViewEncapsulation;
|
|
12097
|
-
/**
|
|
12098
|
-
* Defines arbitrary developer-defined data to be stored on a renderer instance.
|
|
12099
|
-
* This is useful for renderers that delegate to other renderers.
|
|
12100
|
-
*
|
|
12101
|
-
* see: animation
|
|
12102
|
-
*/
|
|
12103
|
-
data?: {
|
|
12104
|
-
[kind: string]: any;
|
|
12105
|
-
};
|
|
12106
|
-
/**
|
|
12107
|
-
* A set of styles that the component needs to be present for component to render correctly.
|
|
12108
|
-
*/
|
|
12109
|
-
styles?: string[];
|
|
12110
|
-
/**
|
|
12111
|
-
* The strategy that the default change detector uses to detect changes.
|
|
12112
|
-
* When set, takes effect the next time change detection is triggered.
|
|
12113
|
-
*/
|
|
12114
|
-
changeDetection?: ChangeDetectionStrategy;
|
|
12115
|
-
/**
|
|
12116
|
-
* Registry of directives, components, and pipes that may be found in this component's view.
|
|
12117
|
-
*
|
|
12118
|
-
* This property is either an array of types or a function that returns the array of types. This
|
|
12119
|
-
* function may be necessary to support forward declarations.
|
|
12120
|
-
*/
|
|
12121
|
-
dependencies?: TypeOrFactory<DependencyTypeList>;
|
|
12122
|
-
/**
|
|
12123
|
-
* The set of schemas that declare elements to be allowed in the component's template.
|
|
12124
|
-
*/
|
|
12125
|
-
schemas?: SchemaMetadata[] | null;
|
|
12126
|
-
/**
|
|
12127
|
-
* Whether this directive/component is standalone.
|
|
12128
|
-
*/
|
|
12129
|
-
standalone?: boolean;
|
|
12130
|
-
}): unknown;
|
|
12081
|
+
export declare function ɵɵdefineComponent<T>(componentDefinition: ComponentDefinition<T>): Mutable<ɵComponentDef<any>, keyof ɵComponentDef<any>>;
|
|
12131
12082
|
|
|
12132
12083
|
/**
|
|
12133
12084
|
* Create a directive definition object.
|
|
@@ -12145,132 +12096,7 @@ export declare function ɵɵdefineComponent<T>(componentDefinition: {
|
|
|
12145
12096
|
*
|
|
12146
12097
|
* @codeGenApi
|
|
12147
12098
|
*/
|
|
12148
|
-
export declare
|
|
12149
|
-
/**
|
|
12150
|
-
* Directive type, needed to configure the injector.
|
|
12151
|
-
*/
|
|
12152
|
-
type: Type<T>;
|
|
12153
|
-
/** The selectors that will be used to match nodes to this directive. */
|
|
12154
|
-
selectors?: ɵCssSelectorList | undefined;
|
|
12155
|
-
/**
|
|
12156
|
-
* A map of input names.
|
|
12157
|
-
*
|
|
12158
|
-
* The format is in: `{[actualPropertyName: string]:(string|[string, string])}`.
|
|
12159
|
-
*
|
|
12160
|
-
* Given:
|
|
12161
|
-
* ```
|
|
12162
|
-
* class MyComponent {
|
|
12163
|
-
* @Input()
|
|
12164
|
-
* publicInput1: string;
|
|
12165
|
-
*
|
|
12166
|
-
* @Input('publicInput2')
|
|
12167
|
-
* declaredInput2: string;
|
|
12168
|
-
* }
|
|
12169
|
-
* ```
|
|
12170
|
-
*
|
|
12171
|
-
* is described as:
|
|
12172
|
-
* ```
|
|
12173
|
-
* {
|
|
12174
|
-
* publicInput1: 'publicInput1',
|
|
12175
|
-
* declaredInput2: ['declaredInput2', 'publicInput2'],
|
|
12176
|
-
* }
|
|
12177
|
-
* ```
|
|
12178
|
-
*
|
|
12179
|
-
* Which the minifier may translate to:
|
|
12180
|
-
* ```
|
|
12181
|
-
* {
|
|
12182
|
-
* minifiedPublicInput1: 'publicInput1',
|
|
12183
|
-
* minifiedDeclaredInput2: [ 'publicInput2', 'declaredInput2'],
|
|
12184
|
-
* }
|
|
12185
|
-
* ```
|
|
12186
|
-
*
|
|
12187
|
-
* This allows the render to re-construct the minified, public, and declared names
|
|
12188
|
-
* of properties.
|
|
12189
|
-
*
|
|
12190
|
-
* NOTE:
|
|
12191
|
-
* - Because declared and public name are usually same we only generate the array
|
|
12192
|
-
* `['declared', 'public']` format when they differ.
|
|
12193
|
-
* - The reason why this API and `outputs` API is not the same is that `NgOnChanges` has
|
|
12194
|
-
* inconsistent behavior in that it uses declared names rather than minified or public. For
|
|
12195
|
-
* this reason `NgOnChanges` will be deprecated and removed in future version and this
|
|
12196
|
-
* API will be simplified to be consistent with `output`.
|
|
12197
|
-
*/
|
|
12198
|
-
inputs?: { [P in keyof T]?: string | [string, string] | undefined; } | undefined;
|
|
12199
|
-
/**
|
|
12200
|
-
* A map of output names.
|
|
12201
|
-
*
|
|
12202
|
-
* The format is in: `{[actualPropertyName: string]:string}`.
|
|
12203
|
-
*
|
|
12204
|
-
* Which the minifier may translate to: `{[minifiedPropertyName: string]:string}`.
|
|
12205
|
-
*
|
|
12206
|
-
* This allows the render to re-construct the minified and non-minified names
|
|
12207
|
-
* of properties.
|
|
12208
|
-
*/
|
|
12209
|
-
outputs?: { [P_1 in keyof T]?: string | undefined; } | undefined;
|
|
12210
|
-
/**
|
|
12211
|
-
* A list of optional features to apply.
|
|
12212
|
-
*
|
|
12213
|
-
* See: {@link NgOnChangesFeature}, {@link ProvidersFeature}, {@link InheritDefinitionFeature}
|
|
12214
|
-
*/
|
|
12215
|
-
features?: DirectiveDefFeature[] | undefined;
|
|
12216
|
-
/**
|
|
12217
|
-
* Function executed by the parent template to allow child directive to apply host bindings.
|
|
12218
|
-
*/
|
|
12219
|
-
hostBindings?: HostBindingsFunction<T> | undefined;
|
|
12220
|
-
/**
|
|
12221
|
-
* The number of bindings in this directive `hostBindings` (including pure fn bindings).
|
|
12222
|
-
*
|
|
12223
|
-
* Used to calculate the length of the component's LView array, so we
|
|
12224
|
-
* can pre-fill the array and set the host binding start index.
|
|
12225
|
-
*/
|
|
12226
|
-
hostVars?: number | undefined;
|
|
12227
|
-
/**
|
|
12228
|
-
* Assign static attribute values to a host element.
|
|
12229
|
-
*
|
|
12230
|
-
* This property will assign static attribute values as well as class and style
|
|
12231
|
-
* values to a host element. Since attribute values can consist of different types of values,
|
|
12232
|
-
* the `hostAttrs` array must include the values in the following format:
|
|
12233
|
-
*
|
|
12234
|
-
* attrs = [
|
|
12235
|
-
* // static attributes (like `title`, `name`, `id`...)
|
|
12236
|
-
* attr1, value1, attr2, value,
|
|
12237
|
-
*
|
|
12238
|
-
* // a single namespace value (like `x:id`)
|
|
12239
|
-
* NAMESPACE_MARKER, namespaceUri1, name1, value1,
|
|
12240
|
-
*
|
|
12241
|
-
* // another single namespace value (like `x:name`)
|
|
12242
|
-
* NAMESPACE_MARKER, namespaceUri2, name2, value2,
|
|
12243
|
-
*
|
|
12244
|
-
* // a series of CSS classes that will be applied to the element (no spaces)
|
|
12245
|
-
* CLASSES_MARKER, class1, class2, class3,
|
|
12246
|
-
*
|
|
12247
|
-
* // a series of CSS styles (property + value) that will be applied to the element
|
|
12248
|
-
* STYLES_MARKER, prop1, value1, prop2, value2
|
|
12249
|
-
* ]
|
|
12250
|
-
*
|
|
12251
|
-
* All non-class and non-style attributes must be defined at the start of the list
|
|
12252
|
-
* first before all class and style values are set. When there is a change in value
|
|
12253
|
-
* type (like when classes and styles are introduced) a marker must be used to separate
|
|
12254
|
-
* the entries. The marker values themselves are set via entries found in the
|
|
12255
|
-
* [AttributeMarker] enum.
|
|
12256
|
-
*/
|
|
12257
|
-
hostAttrs?: TAttributes | undefined;
|
|
12258
|
-
/**
|
|
12259
|
-
* Function to create instances of content queries associated with a given directive.
|
|
12260
|
-
*/
|
|
12261
|
-
contentQueries?: ContentQueriesFunction<T> | undefined;
|
|
12262
|
-
/**
|
|
12263
|
-
* Additional set of instructions specific to view query processing. This could be seen as a
|
|
12264
|
-
* set of instructions to be inserted into the template function.
|
|
12265
|
-
*/
|
|
12266
|
-
viewQuery?: ViewQueriesFunction<T> | null | undefined;
|
|
12267
|
-
/**
|
|
12268
|
-
* Defines the name that can be used in the template to assign this directive to a variable.
|
|
12269
|
-
*
|
|
12270
|
-
* See: {@link Directive.exportAs}
|
|
12271
|
-
*/
|
|
12272
|
-
exportAs?: string[] | undefined;
|
|
12273
|
-
}) => never;
|
|
12099
|
+
export declare function ɵɵdefineDirective<T>(directiveDefinition: DirectiveDefinition<T>): Mutable<ɵDirectiveDef<any>, keyof ɵDirectiveDef<any>>;
|
|
12274
12100
|
|
|
12275
12101
|
/**
|
|
12276
12102
|
* Construct an injectable definition which defines how a token will be constructed by the DI
|