@angular/core 15.0.0-next.2 → 15.0.0-next.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.
Files changed (31) hide show
  1. package/esm2020/src/debug/debug_node.mjs +1 -1
  2. package/esm2020/src/render3/component_ref.mjs +2 -2
  3. package/esm2020/src/render3/context_discovery.mjs +12 -9
  4. package/esm2020/src/render3/definition.mjs +3 -2
  5. package/esm2020/src/render3/features/host_directives_feature.mjs +36 -13
  6. package/esm2020/src/render3/instructions/element.mjs +1 -1
  7. package/esm2020/src/render3/instructions/listener.mjs +2 -4
  8. package/esm2020/src/render3/instructions/lview_debug.mjs +9 -9
  9. package/esm2020/src/render3/instructions/projection.mjs +1 -1
  10. package/esm2020/src/render3/instructions/shared.mjs +60 -25
  11. package/esm2020/src/render3/instructions/styling.mjs +2 -2
  12. package/esm2020/src/render3/interfaces/definition.mjs +1 -1
  13. package/esm2020/src/render3/interfaces/node.mjs +3 -3
  14. package/esm2020/src/render3/interfaces/type_checks.mjs +3 -3
  15. package/esm2020/src/render3/jit/directive.mjs +7 -2
  16. package/esm2020/src/render3/node_manipulation.mjs +6 -5
  17. package/esm2020/src/render3/node_manipulation_i18n.mjs +2 -2
  18. package/esm2020/src/version.mjs +1 -1
  19. package/esm2020/testing/src/logger.mjs +3 -3
  20. package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
  21. package/fesm2015/core.mjs +137 -73
  22. package/fesm2015/core.mjs.map +1 -1
  23. package/fesm2015/testing.mjs +129 -71
  24. package/fesm2015/testing.mjs.map +1 -1
  25. package/fesm2020/core.mjs +136 -72
  26. package/fesm2020/core.mjs.map +1 -1
  27. package/fesm2020/testing.mjs +129 -70
  28. package/fesm2020/testing.mjs.map +1 -1
  29. package/index.d.ts +41 -29
  30. package/package.json +1 -1
  31. 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
2
+ * @license Angular v15.0.0-next.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -3257,12 +3257,26 @@ export declare interface HostDecorator {
3257
3257
  }
3258
3258
 
3259
3259
  /** Values that can be used to define a host directive through the `HostDirectivesFeature`. */
3260
- declare type HostDirectiveDefiniton = Type<unknown> | {
3260
+ declare type HostDirectiveConfig = Type<unknown> | {
3261
3261
  directive: Type<unknown>;
3262
3262
  inputs?: string[];
3263
3263
  outputs?: string[];
3264
3264
  };
3265
3265
 
3266
+ /** Runtime information used to configure a host directive. */
3267
+ declare interface HostDirectiveDef<T = unknown> {
3268
+ /** Class representing the host directive. */
3269
+ directive: Type<T>;
3270
+ /** Directive inputs that have been exposed. */
3271
+ inputs: {
3272
+ [publicName: string]: string;
3273
+ };
3274
+ /** Directive outputs that have been exposed. */
3275
+ outputs: {
3276
+ [publicName: string]: string;
3277
+ };
3278
+ }
3279
+
3266
3280
  /**
3267
3281
  * Type of the HostListener metadata.
3268
3282
  *
@@ -7951,11 +7965,7 @@ declare interface TNode {
7951
7965
  * injector.
7952
7966
  */
7953
7967
  injectorIndex: number;
7954
- /**
7955
- * Stores starting index of the directives.
7956
- *
7957
- * NOTE: The first directive is always component (if present).
7958
- */
7968
+ /** Stores starting index of the directives. */
7959
7969
  directiveStart: number;
7960
7970
  /**
7961
7971
  * Stores final exclusive index of the directives.
@@ -7965,6 +7975,12 @@ declare interface TNode {
7965
7975
  * `LFrame.bindingRootIndex` before `HostBindingFunction` is executed.
7966
7976
  */
7967
7977
  directiveEnd: number;
7978
+ /**
7979
+ * Offset from the `directiveStart` at which the component (one at most) of the node is stored.
7980
+ * Set to -1 if no components have been applied to the node. Component index can be found using
7981
+ * `directiveStart + componentOffset`.
7982
+ */
7983
+ componentOffset: number;
7968
7984
  /**
7969
7985
  * Stores the last directive which had a styling instruction.
7970
7986
  *
@@ -8277,29 +8293,23 @@ declare interface TNode {
8277
8293
  declare const enum TNodeFlags {
8278
8294
  /** Bit #1 - This bit is set if the node is a host for any directive (including a component) */
8279
8295
  isDirectiveHost = 1,
8280
- /**
8281
- * Bit #2 - This bit is set if the node is a host for a component.
8282
- *
8283
- * Setting this bit implies that the `isDirectiveHost` bit is set as well.
8284
- * */
8285
- isComponentHost = 2,
8286
- /** Bit #3 - This bit is set if the node has been projected */
8287
- isProjected = 4,
8288
- /** Bit #4 - This bit is set if any directive on this node has content queries */
8289
- hasContentQuery = 8,
8290
- /** Bit #5 - This bit is set if the node has any "class" inputs */
8291
- hasClassInput = 16,
8292
- /** Bit #6 - This bit is set if the node has any "style" inputs */
8293
- hasStyleInput = 32,
8294
- /** Bit #7 This bit is set if the node has been detached by i18n */
8295
- isDetached = 64,
8296
- /**
8297
- * Bit #8 - This bit is set if the node has directives with host bindings.
8296
+ /** Bit #2 - This bit is set if the node has been projected */
8297
+ isProjected = 2,
8298
+ /** Bit #3 - This bit is set if any directive on this node has content queries */
8299
+ hasContentQuery = 4,
8300
+ /** Bit #4 - This bit is set if the node has any "class" inputs */
8301
+ hasClassInput = 8,
8302
+ /** Bit #5 - This bit is set if the node has any "style" inputs */
8303
+ hasStyleInput = 16,
8304
+ /** Bit #6 This bit is set if the node has been detached by i18n */
8305
+ isDetached = 32,
8306
+ /**
8307
+ * Bit #7 - This bit is set if the node has directives with host bindings.
8298
8308
  *
8299
8309
  * This flags allows us to guard host-binding logic and invoke it only on nodes
8300
8310
  * that actually have directives with host bindings.
8301
8311
  */
8302
- hasHostBindings = 128
8312
+ hasHostBindings = 64
8303
8313
  }
8304
8314
 
8305
8315
  /**
@@ -10171,10 +10181,12 @@ export declare interface ɵDirectiveDef<T> {
10171
10181
  */
10172
10182
  readonly features: DirectiveDefFeature[] | null;
10173
10183
  /**
10174
- * Function that will apply the host directives to the list of matches during directive matching.
10184
+ * Function that will add the host directives to the list of matches during directive matching.
10175
10185
  * Patched onto the definition by the `HostDirectivesFeature`.
10176
10186
  */
10177
- applyHostDirectives: ((tView: TView, viewData: LView, tNode: TElementNode | TContainerNode | TElementContainerNode, matches: any[]) => void) | null;
10187
+ findHostDirectiveDefs: ((matches: ɵDirectiveDef<unknown>[], def: ɵDirectiveDef<unknown>, tView: TView, lView: LView, tNode: TElementNode | TContainerNode | TElementContainerNode) => void) | null;
10188
+ /** Additional directives to be applied whenever the directive has been matched. */
10189
+ hostDirectives: HostDirectiveDef[] | null;
10178
10190
  setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, value: any, publicName: string, privateName: string) => void) | null;
10179
10191
  }
10180
10192
 
@@ -12638,7 +12650,7 @@ export declare function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type
12638
12650
  *
12639
12651
  * @codeGenApi
12640
12652
  */
12641
- export declare function ɵɵHostDirectivesFeature(rawHostDirectives: HostDirectiveDefiniton[] | (() => HostDirectiveDefiniton[])): (definition: ɵDirectiveDef<unknown>) => void;
12653
+ export declare function ɵɵHostDirectivesFeature(rawHostDirectives: HostDirectiveConfig[] | (() => HostDirectiveConfig[])): (definition: ɵDirectiveDef<unknown>) => void;
12642
12654
 
12643
12655
  /**
12644
12656
  * Update a property on a host element. Only applies to native node properties, not inputs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "15.0.0-next.2",
3
+ "version": "15.0.0-next.3",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v15.0.0-next.2
2
+ * @license Angular v15.0.0-next.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */