UNPKG

ng-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

39 lines (38 loc) 1.33 kB
/** * @license * Copyright Alibaba.com All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ import { Observable } from 'rxjs'; import { NzModalComponent } from './nz-modal.component'; /** * API class that public to users to handle the modal instance. * NzModalRef is aim to avoid accessing to the modal instance directly by users. */ export declare abstract class NzModalRef<T = any, R = any> { abstract afterOpen: Observable<void>; abstract afterClose: Observable<R>; abstract open(): void; abstract close(result?: R): void; abstract destroy(result?: R): void; /** * Trigger the nzOnOk/nzOnCancel by manual */ abstract triggerOk(): void; abstract triggerCancel(): void; /** * Return the component instance of nzContent when specify nzContent as a Component * Note: this method may return undefined if the Component has not ready yet. (it only available after Modal's ngOnInit) */ abstract getContentComponent(): T; /** * Get the dom element of this Modal */ abstract getElement(): HTMLElement; /** * Get the instance of the Modal itself */ abstract getInstance(): NzModalComponent; }