UNPKG

ng-zorro-antd

Version:

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

74 lines (73 loc) 3 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 { AnimationEvent } from '@angular/animations'; import { FocusTrapFactory } from '@angular/cdk/a11y'; import { OverlayRef } from '@angular/cdk/overlay'; import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal'; import { ChangeDetectorRef, ComponentRef, ElementRef, EmbeddedViewRef, EventEmitter, NgZone, Renderer2 } from '@angular/core'; import { NzSafeAny } from 'ng-zorro-antd/core/types'; import { NzModalRef } from './modal-ref'; import { ModalOptions } from './modal-types'; export declare function throwNzModalContentAlreadyAttachedError(): never; export declare class BaseModalContainer extends BasePortalOutlet { protected elementRef: ElementRef; protected focusTrapFactory: FocusTrapFactory; cdr: ChangeDetectorRef; protected render: Renderer2; protected zone: NgZone; protected overlayRef: OverlayRef; config: ModalOptions; protected animationType?: string | undefined; portalOutlet: CdkPortalOutlet; modalElementRef: ElementRef<HTMLDivElement>; animationStateChanged: EventEmitter<AnimationEvent>; containerClick: EventEmitter<void>; cancelTriggered: EventEmitter<void>; okTriggered: EventEmitter<void>; state: 'void' | 'enter' | 'exit'; document: Document; modalRef: NzModalRef; isStringContent: boolean; private elementFocusedBeforeModalWasOpened; private focusTrap; private latestMousedownTarget; private oldMaskStyle; constructor(elementRef: ElementRef, focusTrapFactory: FocusTrapFactory, cdr: ChangeDetectorRef, render: Renderer2, zone: NgZone, overlayRef: OverlayRef, config: ModalOptions, document?: NzSafeAny, animationType?: string | undefined); onMousedown(e: MouseEvent): void; onMouseup(e: MouseEvent): void; onCloseClick(): void; onOkClick(): void; attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>; attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>; getNativeElement(): HTMLElement; private animationDisabled; private setModalTransformOrigin; private savePreviouslyFocusedElement; private trapFocus; private restoreFocus; private setEnterAnimationClass; private setExitAnimationClass; private cleanAnimationClass; private bindBackdropStyle; /** * Set the container element. * @deprecated Not supported. * @breaking-change 10.0.0 */ private setContainer; /** * Reset the container element. * @deprecated Not supported. * @breaking-change 10.0.0 */ private resetContainer; private getContainer; onAnimationDone(event: AnimationEvent): void; onAnimationStart(event: AnimationEvent): void; startExitAnimation(): void; }