import { Token, Type } from '../di'; import { Renderable, RenderableConfig } from '../dom'; import { ViewContainer, ViewContainerStatus } from './ViewContainer'; import { LayoutInsertPosition } from '../layout'; import { RenderableArg } from '../common'; import { ConfiguredItem } from '../ConfiguredItem'; export declare const VIEW_COMPONENT_CONFIG: Token; export declare const ViewComponentRef: Token; export declare const LinkerMetadataRef: Token; export declare const VIEW_CONFIG: Token; export declare const VIEW_CONTAINER_CLASS: Token>; export declare const VIEW_CONFIG_KEY = "ugLayout:viewConfig"; export declare const VIEW_LINKER_METADATA = "ugLayout:ViewLinkerMetadata"; export declare enum ResolverStrategy { SINGLETON = 0, TRANSIENT = 1, REF = 2 } export declare enum ViewQueryReadType { CONTAINER = 0, OBSERVABLE = 1, COMPONENT = 2, EVENT = 3, LIST = 4 } export declare enum CacheStrategy { NONE = 0, PERSISTENT = 1, RELOAD = 2, RESET_ONLY = 3 } export declare enum ViewQueryResolveType { INIT = 0, RESOLVE = 1 } export interface ViewQueryArgs { ref?: string; token?: any; id?: number; type?: ViewQueryResolveType[]; immediate?: boolean; } export interface ViewQueryReadOptions { type?: ViewQueryReadType; when?: ViewContainerStatus[]; until?: ViewContainerStatus[]; lazy?: boolean; } export interface ViewResolveConfigArgs { query: ViewQueryArgs; read?: ViewQueryReadType | ViewQueryReadOptions; } export interface ViewResolveConfig extends ViewResolveConfigArgs { method: string; } export interface ViewLinkerMetadata { extensions: Function[]; queries: ViewQueryConfig[]; inits: ViewQueryInitConfig[]; inserts: ViewInsertConfig[]; resolves: ViewResolveConfig[]; unlinks: string[]; } export interface ViewQueryInitConfig { method: string; injections: any[]; } export interface ViewQueryConfigArgs extends ViewQueryArgs { read?: ViewQueryReadType | ViewQueryReadOptions; } export interface ViewInsertConfigArgs { from: ViewQueryArgs; into: Type | Type[]; insert: RenderableArg; query: ViewQueryArgs; position?: LayoutInsertPosition; index?: number; read?: ViewQueryReadType | ViewQueryReadOptions; tag?: string; } export interface ViewInsertConfig extends ViewInsertConfigArgs { method: string; } export interface ViewQueryConfig extends ViewQueryConfigArgs { read: ViewQueryReadType | ViewQueryReadOptions; method: string; } export interface ViewComponentConfig { name: string; ref: string | null; caching: CacheStrategy | null; lazy: boolean; resolution: ResolverStrategy; container: Type> | null; } export declare type ViewComponentConfigArgs = { [P in keyof ViewComponentConfig]?: ViewComponentConfig[P]; }; export interface ViewConfig extends RenderableConfig { lazy?: boolean; caching?: CacheStrategy | null; token?: any; ref?: string | null; resolution?: ResolverStrategy; useFactory?: (() => any) | ConfiguredItem; useValue?: any; useClass?: Type | ConfiguredItem; deps?: any[]; }