@angular/core 15.0.0-next.4 → 15.0.0-next.5
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/di/injectable.mjs +1 -1
- package/esm2020/src/di/injection_token.mjs +6 -3
- package/esm2020/src/errors.mjs +1 -1
- package/esm2020/src/metadata/directives.mjs +1 -1
- package/esm2020/src/render3/component_ref.mjs +20 -10
- package/esm2020/src/render3/features/host_directives_feature.mjs +101 -9
- package/esm2020/src/render3/features/ng_onchanges_feature.mjs +4 -2
- package/esm2020/src/render3/instructions/shared.mjs +70 -34
- package/esm2020/src/render3/interfaces/definition.mjs +1 -1
- package/esm2020/src/render3/jit/module.mjs +2 -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 +193 -53
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +193 -53
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +193 -53
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +193 -53
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +46 -20
- package/package.json +1 -1
- package/testing/index.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v15.0.0-next.
|
|
2
|
+
* @license Angular v15.0.0-next.5
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1029,10 +1029,10 @@ export declare interface Component extends Directive {
|
|
|
1029
1029
|
preserveWhitespaces?: boolean;
|
|
1030
1030
|
/**
|
|
1031
1031
|
* Angular components marked as `standalone` do not need to be declared in an NgModule. Such
|
|
1032
|
-
* components directly manage their own template dependencies (components, directives and pipes
|
|
1032
|
+
* components directly manage their own template dependencies (components, directives, and pipes
|
|
1033
1033
|
* used in a template) via the imports property.
|
|
1034
1034
|
*
|
|
1035
|
-
* More information about standalone components, directives and pipes can be found in [this
|
|
1035
|
+
* More information about standalone components, directives, and pipes can be found in [this
|
|
1036
1036
|
* guide](guide/standalone-components).
|
|
1037
1037
|
*
|
|
1038
1038
|
* @developerPreview
|
|
@@ -1041,12 +1041,12 @@ export declare interface Component extends Directive {
|
|
|
1041
1041
|
/**
|
|
1042
1042
|
* The imports property specifies the standalone component's template dependencies — those
|
|
1043
1043
|
* directives, components, and pipes that can be used within its template. Standalone components
|
|
1044
|
-
* can import other standalone components, directives and pipes as well as existing NgModules.
|
|
1044
|
+
* can import other standalone components, directives, and pipes as well as existing NgModules.
|
|
1045
1045
|
*
|
|
1046
1046
|
* This property is only available for standalone components - specifying it for components
|
|
1047
1047
|
* declared in an NgModule generates a compilation error.
|
|
1048
1048
|
*
|
|
1049
|
-
* More information about standalone components, directives and pipes can be found in [this
|
|
1049
|
+
* More information about standalone components, directives, and pipes can be found in [this
|
|
1050
1050
|
* guide](guide/standalone-components).
|
|
1051
1051
|
*
|
|
1052
1052
|
* @developerPreview
|
|
@@ -1059,7 +1059,7 @@ export declare interface Component extends Directive {
|
|
|
1059
1059
|
* This property is only available for standalone components - specifying it for components
|
|
1060
1060
|
* declared in an NgModule generates a compilation error.
|
|
1061
1061
|
*
|
|
1062
|
-
* More information about standalone components, directives and pipes can be found in [this
|
|
1062
|
+
* More information about standalone components, directives, and pipes can be found in [this
|
|
1063
1063
|
* guide](guide/standalone-components).
|
|
1064
1064
|
*/
|
|
1065
1065
|
schemas?: SchemaMetadata[];
|
|
@@ -2384,7 +2384,7 @@ export declare interface Directive {
|
|
|
2384
2384
|
* directives don't depend on any "intermediate context" of an NgModule (ex. configured
|
|
2385
2385
|
* providers).
|
|
2386
2386
|
*
|
|
2387
|
-
* More information about standalone components, directives and pipes can be found in [this
|
|
2387
|
+
* More information about standalone components, directives, and pipes can be found in [this
|
|
2388
2388
|
* guide](guide/standalone-components).
|
|
2389
2389
|
*
|
|
2390
2390
|
* @developerPreview
|
|
@@ -3281,6 +3281,15 @@ export declare interface HostDecorator {
|
|
|
3281
3281
|
new (): Host;
|
|
3282
3282
|
}
|
|
3283
3283
|
|
|
3284
|
+
/**
|
|
3285
|
+
* Mapping between the public aliases of directive bindings and the underlying inputs/outputs that
|
|
3286
|
+
* they represent. Also serves as an allowlist of the inputs/outputs from the host directive that
|
|
3287
|
+
* the author has decided to expose.
|
|
3288
|
+
*/
|
|
3289
|
+
declare type HostDirectiveBindingMap = {
|
|
3290
|
+
[publicName: string]: string;
|
|
3291
|
+
};
|
|
3292
|
+
|
|
3284
3293
|
/** Values that can be used to define a host directive through the `HostDirectivesFeature`. */
|
|
3285
3294
|
declare type HostDirectiveConfig = Type<unknown> | {
|
|
3286
3295
|
directive: Type<unknown>;
|
|
@@ -3293,15 +3302,17 @@ declare interface HostDirectiveDef<T = unknown> {
|
|
|
3293
3302
|
/** Class representing the host directive. */
|
|
3294
3303
|
directive: Type<T>;
|
|
3295
3304
|
/** Directive inputs that have been exposed. */
|
|
3296
|
-
inputs:
|
|
3297
|
-
[publicName: string]: string;
|
|
3298
|
-
};
|
|
3305
|
+
inputs: HostDirectiveBindingMap;
|
|
3299
3306
|
/** Directive outputs that have been exposed. */
|
|
3300
|
-
outputs:
|
|
3301
|
-
[publicName: string]: string;
|
|
3302
|
-
};
|
|
3307
|
+
outputs: HostDirectiveBindingMap;
|
|
3303
3308
|
}
|
|
3304
3309
|
|
|
3310
|
+
/**
|
|
3311
|
+
* Mapping between a directive that was used as a host directive
|
|
3312
|
+
* and the configuration that was used to define it as such.
|
|
3313
|
+
*/
|
|
3314
|
+
declare type HostDirectiveDefs = Map<ɵDirectiveDef<unknown>, HostDirectiveDef>;
|
|
3315
|
+
|
|
3305
3316
|
/**
|
|
3306
3317
|
* Type of the HostListener metadata.
|
|
3307
3318
|
*
|
|
@@ -3806,7 +3817,8 @@ export declare interface Injectable {
|
|
|
3806
3817
|
/**
|
|
3807
3818
|
* Determines which injectors will provide the injectable.
|
|
3808
3819
|
*
|
|
3809
|
-
* - `Type<any>` - associates the injectable with an `@NgModule` or other `InjectorType
|
|
3820
|
+
* - `Type<any>` - associates the injectable with an `@NgModule` or other `InjectorType`. This
|
|
3821
|
+
* option is DEPRECATED.
|
|
3810
3822
|
* - 'null' : Equivalent to `undefined`. The injectable is not provided in any scope automatically
|
|
3811
3823
|
* and must be added to a `providers` array of an [@NgModule](api/core/NgModule#providers),
|
|
3812
3824
|
* [@Component](api/core/Directive#providers) or [@Directive](api/core/Directive#providers).
|
|
@@ -3817,7 +3829,7 @@ export declare interface Injectable {
|
|
|
3817
3829
|
* - 'platform' : A special singleton platform injector shared by all
|
|
3818
3830
|
* applications on the page.
|
|
3819
3831
|
* - 'any' : Provides a unique instance in each lazy loaded module while all eagerly loaded
|
|
3820
|
-
* modules share one instance.
|
|
3832
|
+
* modules share one instance. This option is DEPRECATED.
|
|
3821
3833
|
*
|
|
3822
3834
|
*/
|
|
3823
3835
|
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
|
@@ -3962,8 +3974,11 @@ export declare enum InjectFlags {
|
|
|
3962
3974
|
* As you can see in the Tree-shakable InjectionToken example below.
|
|
3963
3975
|
*
|
|
3964
3976
|
* Additionally, if a `factory` is specified you can also specify the `providedIn` option, which
|
|
3965
|
-
* overrides the above behavior and marks the token as belonging to a particular `@NgModule
|
|
3966
|
-
* mentioned above, `'root'` is the default value for
|
|
3977
|
+
* overrides the above behavior and marks the token as belonging to a particular `@NgModule` (note:
|
|
3978
|
+
* this option is now deprecated). As mentioned above, `'root'` is the default value for
|
|
3979
|
+
* `providedIn`.
|
|
3980
|
+
*
|
|
3981
|
+
* The `providedIn: NgModule` and `providedIn: 'any'` options are deprecated.
|
|
3967
3982
|
*
|
|
3968
3983
|
* @usageNotes
|
|
3969
3984
|
* ### Basic Examples
|
|
@@ -5877,7 +5892,7 @@ export declare interface Pipe {
|
|
|
5877
5892
|
* Angular pipes marked as `standalone` do not need to be declared in an NgModule. Such
|
|
5878
5893
|
* pipes don't depend on any "intermediate context" of an NgModule (ex. configured providers).
|
|
5879
5894
|
*
|
|
5880
|
-
* More information about standalone components, directives and pipes can be found in [this
|
|
5895
|
+
* More information about standalone components, directives, and pipes can be found in [this
|
|
5881
5896
|
* guide](guide/standalone-components).
|
|
5882
5897
|
*/
|
|
5883
5898
|
standalone?: boolean;
|
|
@@ -7315,6 +7330,12 @@ declare const enum RuntimeErrorCode {
|
|
|
7315
7330
|
UNKNOWN_ELEMENT = 304,
|
|
7316
7331
|
TEMPLATE_STRUCTURE_ERROR = 305,
|
|
7317
7332
|
INVALID_EVENT_BINDING = 306,
|
|
7333
|
+
HOST_DIRECTIVE_UNRESOLVABLE = 307,
|
|
7334
|
+
HOST_DIRECTIVE_NOT_STANDALONE = 308,
|
|
7335
|
+
DUPLICATE_DIRECTITVE = 309,
|
|
7336
|
+
HOST_DIRECTIVE_COMPONENT = 310,
|
|
7337
|
+
HOST_DIRECTIVE_UNDEFINED_BINDING = 311,
|
|
7338
|
+
HOST_DIRECTIVE_CONFLICTING_ALIAS = 312,
|
|
7318
7339
|
MULTIPLE_PLATFORMS = 400,
|
|
7319
7340
|
PLATFORM_NOT_FOUND = 401,
|
|
7320
7341
|
ERROR_HANDLER_NOT_FOUND = 402,
|
|
@@ -10238,8 +10259,13 @@ export declare interface ɵDirectiveDef<T> {
|
|
|
10238
10259
|
/**
|
|
10239
10260
|
* Function that will add the host directives to the list of matches during directive matching.
|
|
10240
10261
|
* Patched onto the definition by the `HostDirectivesFeature`.
|
|
10262
|
+
* @param currentDef Definition that has been matched.
|
|
10263
|
+
* @param matchedDefs List of all matches for a specified node. Will be mutated to include the
|
|
10264
|
+
* host directives.
|
|
10265
|
+
* @param hostDirectiveDefs Mapping of directive definitions to their host directive
|
|
10266
|
+
* configuration. Host directives will be added to the map as they're being matched to the node.
|
|
10241
10267
|
*/
|
|
10242
|
-
findHostDirectiveDefs: ((
|
|
10268
|
+
findHostDirectiveDefs: ((currentDef: ɵDirectiveDef<unknown>, matchedDefs: ɵDirectiveDef<unknown>[], hostDirectiveDefs: HostDirectiveDefs) => void) | null;
|
|
10243
10269
|
/** Additional directives to be applied whenever the directive has been matched. */
|
|
10244
10270
|
hostDirectives: HostDirectiveDef[] | null;
|
|
10245
10271
|
setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, value: any, publicName: string, privateName: string) => void) | null;
|
|
@@ -12686,7 +12712,7 @@ export declare function ɵɵgetCurrentView(): OpaqueViewState;
|
|
|
12686
12712
|
export declare function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T;
|
|
12687
12713
|
|
|
12688
12714
|
/**
|
|
12689
|
-
* This feature
|
|
12715
|
+
* This feature adds the host directives behavior to a directive definition by patching a
|
|
12690
12716
|
* function onto it. The expectation is that the runtime will invoke the function during
|
|
12691
12717
|
* directive matching.
|
|
12692
12718
|
*
|
package/package.json
CHANGED
package/testing/index.d.ts
CHANGED