ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
85 lines (84 loc) • 3.59 kB
TypeScript
/**
* @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 { OverlayRef } from '@angular/cdk/overlay';
import { ChangeDetectorRef, EventEmitter, OnChanges, SimpleChanges, TemplateRef, Type, ViewContainerRef } from '@angular/core';
import { NzButtonType } from 'ng-zorro-antd/button';
import { NzConfigService } from 'ng-zorro-antd/core/config';
import { BooleanInput, NzSafeAny } from 'ng-zorro-antd/core/types';
import { Observable } from 'rxjs';
import { NzModalFooterDirective } from './modal-footer.directive';
import { NzModalLegacyAPI } from './modal-legacy-api';
import { NzModalRef } from './modal-ref';
import { ModalButtonOptions, ModalTypes, OnClickCallback, StyleObjectLike } from './modal-types';
import { NzModalService } from './modal.service';
export declare class NzModalComponent<T = NzSafeAny, R = NzSafeAny> implements OnChanges, NzModalLegacyAPI<T, R> {
nzConfigService: NzConfigService;
private cdr;
private modal;
private viewContainerRef;
static ngAcceptInputType_nzMask: BooleanInput;
static ngAcceptInputType_nzMaskClosable: BooleanInput;
static ngAcceptInputType_nzVisible: BooleanInput;
static ngAcceptInputType_nzClosable: BooleanInput;
static ngAcceptInputType_nzOkLoading: BooleanInput;
static ngAcceptInputType_nzOkDisabled: BooleanInput;
static ngAcceptInputType_nzCancelDisabled: BooleanInput;
static ngAcceptInputType_nzCancelLoading: BooleanInput;
static ngAcceptInputType_nzKeyboard: BooleanInput;
static ngAcceptInputType_nzNoAnimation: BooleanInput;
nzMask: boolean;
nzMaskClosable: boolean;
nzVisible: boolean;
nzClosable: boolean;
nzOkLoading: boolean;
nzOkDisabled: boolean;
nzCancelDisabled: boolean;
nzCancelLoading: boolean;
nzKeyboard: boolean;
nzNoAnimation: boolean;
nzContent: string | TemplateRef<{}> | Type<T>;
nzComponentParams: T;
nzFooter: string | TemplateRef<{}> | Array<ModalButtonOptions<T>> | null;
nzGetContainer: HTMLElement | OverlayRef | (() => HTMLElement | OverlayRef);
nzZIndex: number;
nzWidth: number | string;
nzWrapClassName: string;
nzClassName: string;
nzStyle: object;
nzTitle: string | TemplateRef<{}>;
nzCloseIcon: string | TemplateRef<void>;
nzMaskStyle: StyleObjectLike;
nzBodyStyle: StyleObjectLike;
nzOkText: string | null;
nzCancelText: string | null;
nzOkType: NzButtonType;
nzIconType: string;
nzModalType: ModalTypes;
readonly nzOnOk: EventEmitter<T> | OnClickCallback<T>;
readonly nzOnCancel: EventEmitter<T> | OnClickCallback<T>;
readonly nzAfterOpen: EventEmitter<void>;
readonly nzAfterClose: EventEmitter<R>;
readonly nzVisibleChange: EventEmitter<boolean>;
contentTemplateRef: TemplateRef<{}>;
set modalFooter(value: NzModalFooterDirective);
private modalRef;
get afterOpen(): Observable<void>;
get afterClose(): Observable<R>;
constructor(nzConfigService: NzConfigService, cdr: ChangeDetectorRef, modal: NzModalService, viewContainerRef: ViewContainerRef);
open(): void;
close(result?: R): void;
destroy(result?: R): void;
triggerOk(): void;
triggerCancel(): void;
getContentComponent(): T | void;
getElement(): HTMLElement | void;
getModalRef(): NzModalRef | null;
private setFooterWithTemplate;
private getConfig;
ngOnChanges(changes: SimpleChanges): void;
}