import { ChangeDetectorRef } from '@angular/core'; import { ComponentFactoryResolver } from '@angular/core'; import { ComponentRef } from '@angular/core'; import { DoCheck } from '@angular/core'; import { ElementRef } from '@angular/core'; import { EnvironmentInjector } from '@angular/core'; import { EventEmitter } from '@angular/core'; import * as i0 from '@angular/core'; import { InjectionToken } from '@angular/core'; import { Injector } from '@angular/core'; import { IterableDiffers } from '@angular/core'; import { KeyValueDiffers } from '@angular/core'; import { NgComponentOutlet } from '@angular/common'; import { NgModuleRef } from '@angular/core'; import { OnChanges } from '@angular/core'; import { OnDestroy } from '@angular/core'; import { Renderer2 } from '@angular/core'; import { SimpleChanges } from '@angular/core'; import { StaticProvider } from '@angular/core'; import { Type } from '@angular/core'; import { ViewContainerRef } from '@angular/core'; import { ViewRef } from '@angular/core'; /** * @public */ export declare type AnyFunction = (...args: unknown[]) => unknown; /** * @public */ export declare interface AttributesMap { [key: string]: string; } /** * @public */ export declare class ComponentOutletInjectorDirective implements DynamicComponentInjector { private componentOutlet; get componentRef(): ComponentRef; constructor(componentOutlet: NgComponentOutlet); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @public */ export declare class ComponentOutletInjectorModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * @public */ export declare class ComponentOutletIoDirective implements DoCheck { private ioService; ngComponentOutletNdcDynamicInputs?: InputsType | null; ngComponentOutletNdcDynamicOutputs?: OutputsType | null; constructor(ioService: IoService); ngDoCheck(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @public */ export declare function defaultEventArgumentFactory(): string; /** * @public */ export declare interface DirectiveRef { instance: T; type: Type; injector: Injector; hostComponent: unknown; hostView: ViewRef; location: ElementRef; changeDetectorRef: ChangeDetectorRef; onDestroy: (callback: Function) => void; } /** * @public */ export declare class DynamicAttributesDirective implements DoCheck { private renderer; private differs; private componentInjector?; ndcDynamicAttributes?: AttributesMap | null; ngComponentOutletNdcDynamicAttributes?: AttributesMap | null; private attrsDiffer; private lastCompType?; private lastAttrActions?; private get _attributes(); private get nativeElement(); private get compType(); private get isCompChanged(); constructor(renderer: Renderer2, differs: KeyValueDiffers, componentInjector?: DynamicComponentInjector | undefined); ngDoCheck(): void; setAttribute(name: string, value: string, namespace?: string): void; removeAttribute(name: string, namespace?: string): void; private updateAttributes; private changesToAttrActions; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @public */ export declare class DynamicAttributesModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * @public */ export declare class DynamicComponent implements OnChanges, DynamicComponentInjector { private vcr; private static UpdateOnInputs; ndcDynamicComponent?: Type | null; ndcDynamicInjector?: Injector | null; ndcDynamicProviders?: StaticProvider[] | null; ndcDynamicContent?: Node[][]; ndcDynamicNgModuleRef?: NgModuleRef; ndcDynamicEnvironmentInjector?: EnvironmentInjector | NgModuleRef; ndcDynamicCreated: EventEmitter>; componentRef: ComponentRef | null; constructor(vcr: ViewContainerRef); ngOnChanges(changes: SimpleChanges): void; createDynamicComponent(): void; private _resolveInjector; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "ndc-dynamic", never, { "ndcDynamicComponent": "ndcDynamicComponent"; "ndcDynamicInjector": "ndcDynamicInjector"; "ndcDynamicProviders": "ndcDynamicProviders"; "ndcDynamicContent": "ndcDynamicContent"; "ndcDynamicNgModuleRef": "ndcDynamicNgModuleRef"; "ndcDynamicEnvironmentInjector": "ndcDynamicEnvironmentInjector"; }, { "ndcDynamicCreated": "ndcDynamicCreated"; }, never, never, true>; } /** * @public */ export declare interface DynamicComponentInjector { componentRef: ComponentRef | null; } /** * @public */ export declare const DynamicComponentInjectorToken: InjectionToken; /** * @public */ export declare interface DynamicDirectiveDef { type: Type; inputs?: InputsType; outputs?: OutputsType; } /** * @public */ export declare function dynamicDirectiveDef(type: Type, inputs?: InputsType, outputs?: OutputsType): DynamicDirectiveDef; /** * @public * @experimental Dynamic directives is an experimental API that may not work as expected. * * NOTE: There is a known issue with OnChanges hook not beign triggered on dynamic directives * since this part of functionality has been removed from the core as Angular now * supports this out of the box for dynamic components. */ export declare class DynamicDirectivesDirective implements OnDestroy, DoCheck { private injector; private iterableDiffers; private ioFactoryService; private reflectService; private componentInjector?; ndcDynamicDirectives?: DynamicDirectiveDef[] | null; ngComponentOutletNdcDynamicDirectives?: DynamicDirectiveDef[] | null; ndcDynamicDirectivesCreated: EventEmitter[]>; private lastCompInstance; private get directives(); private get componentRef(); private get compInstance(); private get isCompChanged(); private get hostInjector(); private dirRef; private dirIo; private dirsDiffer; constructor(injector: Injector, iterableDiffers: IterableDiffers, ioFactoryService: IoFactoryService, reflectService: ReflectService, componentInjector?: DynamicComponentInjector | undefined); ngDoCheck(): void; ngOnDestroy(): void; private maybeDestroyDirectives; private processDirChanges; private updateDirectives; private updateDirective; private initDirective; private destroyAllDirectives; private destroyDirective; private initDirIO; private dirToCompDef; private destroyDirRef; private createDirective; private resolveDirParamTypes; private callInitHooks; private callHook; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @public */ export declare class DynamicDirectivesModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * @public */ export declare class DynamicIoDirective implements DoCheck { private ioService; ndcDynamicInputs?: InputsType | null; ndcDynamicOutputs?: OutputsType | null; constructor(ioService: IoService); ngDoCheck(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @public */ export declare class DynamicIoModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * @public */ export declare class DynamicModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * @public * @deprecated Since v10.4.0 - Use {@link IoEventArgumentToken} instead! */ export declare const EventArgumentToken: InjectionToken; /** * @public */ export declare type EventHandler = (event: T) => unknown; declare namespace i1 { export { ComponentOutletInjectorDirective } } declare namespace i1_2 { export { DynamicIoModule } } declare namespace i1_3 { export { DynamicIoDirective } } declare namespace i1_4 { export { AttributesMap, DynamicAttributesDirective } } declare namespace i1_5 { export { dynamicDirectiveDef, DynamicDirectiveDef, DirectiveRef, DynamicDirectivesDirective } } declare namespace i2 { export { ComponentOutletIoDirective } } declare namespace i2_2 { export { ComponentOutletInjectorModule } } declare namespace i2_3 { export { DynamicComponent } } /** * @public */ export declare interface InputsType { [k: string]: unknown; } /** * @public */ export declare const IoEventArgumentToken: InjectionToken; /** * A token that holds provider for custom context of the output handlers * which should be provided using {@link IoEventContextToken} token * * @public */ export declare const IoEventContextProviderToken: InjectionToken; /** * A token that holds custom context of the output handlers * * @public */ export declare const IoEventContextToken: InjectionToken; /** * @public */ export declare class IoFactoryService { private injector; constructor(injector: Injector); create(componentInjector: DynamicComponentInjector, ioOptions?: IoServiceOptions & IoFactoryServiceOptions): IoService; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * @public */ export declare interface IoFactoryServiceOptions { injector?: Injector; } /** * @public */ export declare class IoService implements OnDestroy { private injector; private differs; private cfr; private options; private compInjector; private eventArgument; private cdr; private eventContextProvider; private lastComponentInst; private lastChangedInputs; private inputsDiffer; private compFactory; private outputsShouldDisconnect$; private outputsEventContext; private inputs; private outputs; private outputsChanged; private get compRef(); private get componentInst(); private get componentInstChanged(); constructor(injector: Injector, differs: KeyValueDiffers, cfr: ComponentFactoryResolver, options: IoServiceOptions, compInjector: DynamicComponentInjector, eventArgument: string, cdr: ChangeDetectorRef, eventContextProvider: StaticProvider); ngOnDestroy(): void; /** * Call update whenever inputs/outputs may or did change. * * It will detect both new and mutated changes. */ update(inputs?: InputsType | null, outputs?: OutputsType | null): void; private updateIO; private updateInputs; private bindOutputs; private disconnectOutputs; private getInputsChanges; private updateChangedInputs; private resolveCompFactory; private updateCompFactory; private resolveOutputs; private updateOutputsEventContext; private processOutputs; private processOutputArgs; private remapIO; private findPropByTplInMapping; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * @public */ export declare class IoServiceOptions { trackOutputChanges: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * @public */ export declare type OutputExpression = EventHandler | OutputWithArgs; /** * @public */ export declare interface OutputsType { [k: string]: OutputExpression | undefined; } /** * @public */ export declare interface OutputWithArgs { handler: AnyFunction; args?: unknown[]; } /** * Reflect API subsystem required for lib to work * * @public */ export declare interface ReflectApi { getMetadata(type: string, obj: unknown): unknown[]; } /** * @public */ export declare const ReflectRef: InjectionToken; /** * @public */ export declare class ReflectService { private reflect; constructor(reflect: ReflectApi); getCtorParamTypes(ctor: Type): unknown[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { }