UNPKG

@alauda/ui

Version:

Angular UI components by Alauda Frontend Team.

34 lines (33 loc) 2.02 kB
import { Overlay } from '@angular/cdk/overlay'; import { ComponentType } from '@angular/cdk/portal'; import { ApplicationRef, ComponentFactoryResolver, ComponentRef, ElementRef, Injector } from '@angular/core'; import { MessageWrapperComponent } from './message-wrapper.component'; import { MessageComponent } from './message.component'; import { MessageConfig, MessageGlobalConfig, MessageType } from './message.config'; export declare abstract class BaseMessage<Wrapper extends MessageWrapperComponent, Component extends MessageComponent, Config extends MessageConfig> { protected overlay: Overlay; protected injector: Injector; protected applicationRef: ApplicationRef; protected cfr: ComponentFactoryResolver; protected overlayPaneClassName: string; protected wrapperClass: ComponentType<Wrapper>; protected componentClass: ComponentType<Component>; protected globalConfig: MessageGlobalConfig; wrapperInstance: { elementRef: ElementRef<HTMLElement>; }; componentRefs: Array<ComponentRef<Component>>; constructor(overlay: Overlay, injector: Injector, applicationRef: ApplicationRef, cfr: ComponentFactoryResolver, overlayPaneClassName: string, wrapperClass: ComponentType<Wrapper>, componentClass: ComponentType<Component>, globalConfig: MessageGlobalConfig); create(config: Config): ComponentRef<Component>; create(config: MessageType, content: string): ComponentRef<Component>; createType(type: MessageType, option: Config | string): ComponentRef<Component>; success(option: Config | string): ComponentRef<Component>; warning(option: Config | string): ComponentRef<Component>; error(option: Config | string): ComponentRef<Component>; info(option: Config | string): ComponentRef<Component>; remove(id: number | string): void; removeAll(): void; protected initWrapperContainer(): void; protected initComponentRef(config: Config): ComponentRef<Component>; protected removeNeedless(id: number | string): void; }