UNPKG

@doku-dev/doku-fragment

Version:

A new Angular UI library that moving away from Bootstrap and built from scratch.

60 lines (59 loc) 2.08 kB
import { Observable, ReplaySubject } from 'rxjs'; import { DokuBackdropRef } from '../backdrop/backdrop-ref'; import { DokuModalConfig } from './modal.interface'; import { DokuModalService } from './modal.service'; export declare class DokuActiveModal { protected _config: DokuModalConfig; /** * Gets config value of the modal that have been normalized based on provided config and default value. */ get config(): DokuModalConfig; /** * Close the active modal. */ close<R>(result?: R): void; } export declare class DokuModalRef<T> { private modalService; private _componentInstance; protected view?: { element: { portal: HTMLDivElement; modal: HTMLDivElement; modalContent: HTMLDivElement; }; content: { componentRef: import("@angular/core").ComponentRef<unknown> | undefined; templateRef: import("@angular/core").EmbeddedViewRef<unknown> | undefined; }; } | undefined; /** * The instance of component opened into the modal. */ componentInstance: T; protected afterClosed$: ReplaySubject<unknown>; protected backdropRef?: DokuBackdropRef; constructor(modalService: DokuModalService, _componentInstance: T, view?: { element: { portal: HTMLDivElement; modal: HTMLDivElement; modalContent: HTMLDivElement; }; content: { componentRef: import("@angular/core").ComponentRef<unknown> | undefined; templateRef: import("@angular/core").EmbeddedViewRef<unknown> | undefined; }; } | undefined); /** * Close the current active modal. * @param result Optional result returned to modal opener. */ close<R>(result?: R): void; /** * Gets an observable that is notified when the modal is finished closing. * * The observable will automatically completed when modal is closed. * In other words, you don't need to unsubscribe. */ afterClosed<T>(): Observable<T>; }