@angular/core 14.2.0-next.1 → 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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.2.0-next.1
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;
@@ -7660,8 +7674,7 @@ export declare abstract class TemplateRef<C> {
7660
7674
  */
7661
7675
  abstract readonly elementRef: ElementRef;
7662
7676
  /**
7663
- * Instantiates an embedded view based on this template,
7664
- * and attaches it to the view container.
7677
+ * Instantiates an unattached embedded view based on this template.
7665
7678
  * @param context The data-binding context of the embedded view, as declared
7666
7679
  * in the `<ng-template>` usage.
7667
7680
  * @param injector Injector to be used within the embedded view.
@@ -10157,6 +10170,11 @@ export declare interface ɵDirectiveDef<T> {
10157
10170
  * The features applied to this directive
10158
10171
  */
10159
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;
10160
10178
  setInput: (<U extends T>(this: ɵDirectiveDef<U>, instance: U, value: any, publicName: string, privateName: string) => void) | null;
10161
10179
  }
10162
10180
 
@@ -10194,6 +10212,12 @@ export declare function ɵfindLocaleData(locale: string): any;
10194
10212
  */
10195
10213
  export declare function ɵflushModuleScopingQueueAsMuchAsPossible(): void;
10196
10214
 
10215
+ /**
10216
+ * Called to format a runtime error.
10217
+ * See additional info on the `message` argument type in the `RuntimeError` class description.
10218
+ */
10219
+ export declare function ɵformatRuntimeError<T extends number = RuntimeErrorCode>(code: T, message: null | false | string): string;
10220
+
10197
10221
  export declare function ɵgetDebugNodeR2(_nativeNode: any): DebugNode | null;
10198
10222
 
10199
10223
  /**
@@ -11893,7 +11917,7 @@ export declare type ɵɵComponentDeclaration<T, Selector extends String, ExportA
11893
11917
  [key: string]: string;
11894
11918
  }, OutputMap extends {
11895
11919
  [key: string]: string;
11896
- }, 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;
11897
11921
 
11898
11922
  /**
11899
11923
  * Registers a QueryList, associated with a content query, for later refresh (part of a view
@@ -12416,7 +12440,7 @@ export declare type ɵɵDirectiveDeclaration<T, Selector extends string, ExportA
12416
12440
  [key: string]: string;
12417
12441
  }, OutputMap extends {
12418
12442
  [key: string]: string;
12419
- }, 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;
12420
12444
 
12421
12445
  /**
12422
12446
  * Returns the value associated to the given token from the injectors.
@@ -12594,6 +12618,28 @@ export declare function ɵɵgetCurrentView(): OpaqueViewState;
12594
12618
  */
12595
12619
  export declare function ɵɵgetInheritedFactory<T>(type: Type<any>): (type: Type<T>) => T;
12596
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
+
12597
12643
  /**
12598
12644
  * Update a property on a host element. Only applies to native node properties, not inputs.
12599
12645
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "14.2.0-next.1",
3
+ "version": "15.0.0-next.0",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.2.0-next.1
2
+ * @license Angular v15.0.0-next.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */