UNPKG

@metadev/lux

Version:

Lux: Library with User Interface components for Angular.

42 lines (41 loc) 1.47 kB
import { ComponentRef } from '@angular/core'; import { LuxModalWindowComponent } from './modal-window'; import { ContentRef } from './util'; import { LuxModalBackdropComponent } from './modal-backdrop'; export declare class ActiveModal { close(result?: any): void; dismiss(reason?: any): void; } export declare class ModalRef { private _windowCmptRef; private _contentRef; private _backdropCmptRef?; private _beforeDismiss?; private _resolve; private _reject; /** * The instance of a component used for the modal content. * * When a `TemplateRef` is used as the content, will return `undefined`. */ get componentInstance(): any; /** * The promise that is resolved when the modal is closed and rejected when the modal is dismissed. */ result: Promise<any>; constructor(_windowCmptRef: ComponentRef<LuxModalWindowComponent>, _contentRef: ContentRef, _backdropCmptRef?: ComponentRef<LuxModalBackdropComponent>, _beforeDismiss?: () => any); /** * Closes the modal with an optional `result` value. * * The `NgbMobalRef.result` promise will be resolved with the provided value. */ close(result?: any): void; private _dismiss; /** * Dismisses the modal with an optional `reason` value. * * The `NgbModalRef.result` promise will be rejected with the provided value. */ dismiss(reason?: any): void; private _removeModalElements; }