@angular/core 14.2.0 → 15.0.0-next.0
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/compiler/compiler_facade_interface.mjs +1 -1
- package/esm2020/src/core_render3_private_export.mjs +2 -2
- package/esm2020/src/render3/definition.mjs +2 -1
- package/esm2020/src/render3/features/host_directives_feature.mjs +49 -0
- package/esm2020/src/render3/index.mjs +3 -2
- package/esm2020/src/render3/instructions/shared.mjs +2 -1
- package/esm2020/src/render3/interfaces/definition.mjs +1 -1
- package/esm2020/src/render3/interfaces/public_definitions.mjs +1 -1
- package/esm2020/src/render3/jit/directive.mjs +2 -1
- package/esm2020/src/render3/jit/environment.mjs +2 -1
- package/esm2020/src/testability/testability.mjs +1 -1
- 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 +56 -3
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/testing.mjs +54 -2
- package/fesm2015/testing.mjs.map +1 -1
- package/fesm2020/core.mjs +55 -3
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/testing.mjs +53 -2
- package/fesm2020/testing.mjs.map +1 -1
- package/index.d.ts +44 -3
- 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
|
|
2
|
+
* @license Angular v15.0.0-next.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -3256,6 +3256,13 @@ export declare interface HostDecorator {
|
|
|
3256
3256
|
new (): Host;
|
|
3257
3257
|
}
|
|
3258
3258
|
|
|
3259
|
+
/** Values that can be used to define a host directive through the `HostDirectivesFeature`. */
|
|
3260
|
+
declare type HostDirectiveDefiniton = Type<unknown> | {
|
|
3261
|
+
directive: Type<unknown>;
|
|
3262
|
+
inputs?: string[];
|
|
3263
|
+
outputs?: string[];
|
|
3264
|
+
};
|
|
3265
|
+
|
|
3259
3266
|
/**
|
|
3260
3267
|
* Type of the HostListener metadata.
|
|
3261
3268
|
*
|
|
@@ -6322,6 +6329,7 @@ declare interface R3DeclareDirectiveFacade {
|
|
|
6322
6329
|
usesInheritance?: boolean;
|
|
6323
6330
|
usesOnChanges?: boolean;
|
|
6324
6331
|
isStandalone?: boolean;
|
|
6332
|
+
hostDirectives?: R3HostDirectiveMetadataFacade[] | null;
|
|
6325
6333
|
}
|
|
6326
6334
|
|
|
6327
6335
|
declare interface R3DeclareFactoryFacade {
|
|
@@ -6388,6 +6396,12 @@ declare type R3DeclareTemplateDependencyFacade = {
|
|
|
6388
6396
|
kind: string;
|
|
6389
6397
|
} & (R3DeclareDirectiveDependencyFacade | R3DeclarePipeDependencyFacade | R3DeclareNgModuleDependencyFacade);
|
|
6390
6398
|
|
|
6399
|
+
declare interface R3HostDirectiveMetadataFacade {
|
|
6400
|
+
directive: Type_2;
|
|
6401
|
+
inputs?: string[];
|
|
6402
|
+
outputs?: string[];
|
|
6403
|
+
}
|
|
6404
|
+
|
|
6391
6405
|
declare class R3Injector extends EnvironmentInjector {
|
|
6392
6406
|
readonly parent: Injector;
|
|
6393
6407
|
readonly source: string | null;
|
|
@@ -10156,6 +10170,11 @@ export declare interface ɵDirectiveDef<T> {
|
|
|
10156
10170
|
* The features applied to this directive
|
|
10157
10171
|
*/
|
|
10158
10172
|
readonly features: DirectiveDefFeature[] | null;
|
|
10173
|
+
/**
|
|
10174
|
+
* Function that will apply the host directives to the list of matches during directive matching.
|
|
10175
|
+
* Patched onto the definition by the `HostDirectivesFeature`.
|
|
10176
|
+
*/
|
|
10177
|
+
applyHostDirectives: ((tView: TView, viewData: LView, tNode: TElementNode | TContainerNode | TElementContainerNode, matches: any[]) => void) | null;
|
|
10159
10178
|
setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, value: any, publicName: string, privateName: string) => void) | null;
|
|
10160
10179
|
}
|
|
10161
10180
|
|
|
@@ -11898,7 +11917,7 @@ export declare type ɵɵComponentDeclaration<T, Selector extends String, ExportA
|
|
|
11898
11917
|
[key: string]: string;
|
|
11899
11918
|
}, OutputMap extends {
|
|
11900
11919
|
[key: string]: string;
|
|
11901
|
-
}, QueryFields extends string[], NgContentSelectors extends string[], IsStandalone extends boolean = false> = unknown;
|
|
11920
|
+
}, QueryFields extends string[], NgContentSelectors extends string[], IsStandalone extends boolean = false, HostDirectives = never> = unknown;
|
|
11902
11921
|
|
|
11903
11922
|
/**
|
|
11904
11923
|
* Registers a QueryList, associated with a content query, for later refresh (part of a view
|
|
@@ -12421,7 +12440,7 @@ export declare type ɵɵDirectiveDeclaration<T, Selector extends string, ExportA
|
|
|
12421
12440
|
[key: string]: string;
|
|
12422
12441
|
}, OutputMap extends {
|
|
12423
12442
|
[key: string]: string;
|
|
12424
|
-
}, QueryFields extends string[], NgContentSelectors extends never = never, IsStandalone extends boolean = false> = unknown;
|
|
12443
|
+
}, QueryFields extends string[], NgContentSelectors extends never = never, IsStandalone extends boolean = false, HostDirectives = never> = unknown;
|
|
12425
12444
|
|
|
12426
12445
|
/**
|
|
12427
12446
|
* Returns the value associated to the given token from the injectors.
|
|
@@ -12599,6 +12618,28 @@ export declare function ɵɵgetCurrentView(): OpaqueViewState;
|
|
|
12599
12618
|
*/
|
|
12600
12619
|
export declare function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T;
|
|
12601
12620
|
|
|
12621
|
+
/**
|
|
12622
|
+
* This feature add the host directives behavior to a directive definition by patching a
|
|
12623
|
+
* function onto it. The expectation is that the runtime will invoke the function during
|
|
12624
|
+
* directive matching.
|
|
12625
|
+
*
|
|
12626
|
+
* For example:
|
|
12627
|
+
* ```ts
|
|
12628
|
+
* class ComponentWithHostDirective {
|
|
12629
|
+
* static ɵcmp = defineComponent({
|
|
12630
|
+
* type: ComponentWithHostDirective,
|
|
12631
|
+
* features: [ɵɵHostDirectivesFeature([
|
|
12632
|
+
* SimpleHostDirective,
|
|
12633
|
+
* {directive: AdvancedHostDirective, inputs: ['foo: alias'], outputs: ['bar']},
|
|
12634
|
+
* ])]
|
|
12635
|
+
* });
|
|
12636
|
+
* }
|
|
12637
|
+
* ```
|
|
12638
|
+
*
|
|
12639
|
+
* @codeGenApi
|
|
12640
|
+
*/
|
|
12641
|
+
export declare function ɵɵHostDirectivesFeature(rawHostDirectives: HostDirectiveDefiniton[] | (() => HostDirectiveDefiniton[])): (definition: ɵDirectiveDef<unknown>) => void;
|
|
12642
|
+
|
|
12602
12643
|
/**
|
|
12603
12644
|
* Update a property on a host element. Only applies to native node properties, not inputs.
|
|
12604
12645
|
*
|
package/package.json
CHANGED
package/testing/index.d.ts
CHANGED