import * as i0 from '@angular/core'; import { TemplateRef, ComponentRef, Type, InjectionToken, OnInit, AfterViewInit, OnChanges, EventEmitter, SimpleChanges } from '@angular/core'; import { Direction } from '@angular/cdk/bidi'; import { NzSafeAny, NgStyleInterface } from 'ng-zorro-antd/core/types'; import { Observable, Subject } from 'rxjs'; import { FocusTrap } from '@angular/cdk/a11y'; import { OverlayRef, Overlay } from '@angular/cdk/overlay'; import { CdkPortalOutlet, TemplatePortal } from '@angular/cdk/portal'; import { NzConfigService, NzConfigKey } from 'ng-zorro-antd/core/config'; import { isTemplateRef } from 'ng-zorro-antd/core/util'; /** * 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 */ declare class NzDrawerContentDirective { templateRef: TemplateRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * 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 */ declare abstract class NzDrawerRef { abstract afterClose: Observable; abstract afterOpen: Observable; abstract close(result?: R): void; abstract open(): void; abstract getContentComponent(): T | null; abstract getContentComponentRef(): Readonly> | null; abstract nzClosable?: boolean; abstract nzNoAnimation?: boolean; abstract nzMaskClosable?: boolean; abstract nzKeyboard?: boolean; abstract nzMask?: boolean; abstract nzTitle?: string | TemplateRef<{}>; abstract nzPlacement?: NzDrawerPlacement; abstract nzMaskStyle?: object; abstract nzBodyStyle?: object; abstract nzWrapClassName?: string; abstract nzWidth?: number | string; abstract nzHeight?: number | string; abstract nzZIndex?: number | string; abstract nzOffsetX?: number | string; abstract nzOffsetY?: number | string; } /** * 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 */ declare const DRAWER_DEFAULT_SIZE = 378; declare const DRAWER_LARGE_SIZE = 736; type NzDrawerPlacement = 'left' | 'right' | 'top' | 'bottom'; type NzDrawerSize = 'default' | 'large'; interface NzDrawerOptionsOfComponent { nzClosable?: boolean; nzMaskClosable?: boolean; nzCloseOnNavigation?: boolean; nzDirection?: Direction; nzMask?: boolean; nzKeyboard?: boolean; nzNoAnimation?: boolean; nzTitle?: string | TemplateRef<{}>; nzExtra?: string | TemplateRef<{}>; nzFooter?: string | TemplateRef<{}>; nzContent?: TemplateRef<{ $implicit: D; drawerRef: NzDrawerRef; }> | Type; /**@Deprecated**/ nzContentParams?: Partial; nzData?: D; nzMaskStyle?: object; nzBodyStyle?: object; nzWrapClassName?: string; nzSize?: NzDrawerSize; nzWidth?: number | string; nzHeight?: number | string; nzPlacement?: NzDrawerPlacement; nzZIndex?: number; nzOffsetX?: number; nzOffsetY?: number; } interface NzDrawerOptions extends NzDrawerOptionsOfComponent { nzOnCancel?(): Promise; } declare const NZ_DRAWER_DATA: InjectionToken; /** * 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 */ declare const DRAWER_ANIMATE_DURATION = 300; declare class NzDrawerComponent = NzSafeAny> extends NzDrawerRef implements OnInit, AfterViewInit, OnChanges, NzDrawerOptionsOfComponent { private cdr; nzConfigService: NzConfigService; private renderer; private overlay; private injector; private changeDetectorRef; private focusTrapFactory; private viewContainerRef; private overlayKeyboardDispatcher; private directionality; private destroyRef; readonly _nzModuleName: NzConfigKey; nzContent: TemplateRef<{ $implicit: D; drawerRef: NzDrawerRef; }> | Type; nzCloseIcon: string | TemplateRef; nzClosable: boolean; nzMaskClosable: boolean; nzMask: boolean; nzCloseOnNavigation: boolean; nzNoAnimation: boolean; nzKeyboard: boolean; nzTitle?: string | TemplateRef<{}>; nzExtra?: string | TemplateRef<{}>; nzFooter?: string | TemplateRef<{}>; nzPlacement: NzDrawerPlacement; nzSize: NzDrawerSize; nzMaskStyle: NgStyleInterface; nzBodyStyle: NgStyleInterface; nzWrapClassName?: string; nzWidth?: number | string; nzHeight?: number | string; nzZIndex: number; nzOffsetX: number; nzOffsetY: number; private componentInstance; private componentRef; set nzVisible(value: boolean); get nzVisible(): boolean; readonly nzOnViewInit: EventEmitter; readonly nzOnClose: EventEmitter; readonly nzVisibleChange: EventEmitter; drawerTemplate: TemplateRef; bodyPortalOutlet?: CdkPortalOutlet; contentFromContentChild?: TemplateRef; previouslyFocusedElement?: HTMLElement; placementChanging: boolean; placementChangeTimeoutId?: ReturnType; nzContentParams?: NzSafeAny; nzData?: D; overlayRef?: OverlayRef | null; portal?: TemplatePortal; focusTrap?: FocusTrap; isOpen: boolean; inAnimation: boolean; templateContext: { $implicit: D | undefined; drawerRef: NzDrawerRef; }; protected isTemplateRef: typeof isTemplateRef; get offsetTransform(): string | null; get transform(): string | null; get width(): string | null; get height(): string | null; get isLeftOrRight(): boolean; nzAfterOpen: Subject; nzAfterClose: Subject; get afterOpen(): Observable; get afterClose(): Observable; get isNzContentTemplateRef(): boolean; nzDirection?: Direction; dir: Direction; private document; constructor(); ngOnInit(): void; ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; private getAnimationDuration; private triggerPlacementChangeCycleOnce; close(result?: R): void; open(): void; getContentComponent(): T | null; getContentComponentRef(): ComponentRef | null; closeClick(): void; maskClick(): void; private attachBodyContent; private attachOverlay; private disposeOverlay; private getOverlayConfig; private updateOverlayStyle; private updateBodyOverflow; savePreviouslyFocusedElement(): void; private trapFocus; private restoreFocus; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "nz-drawer", ["nzDrawer"], { "nzContent": { "alias": "nzContent"; "required": false; }; "nzCloseIcon": { "alias": "nzCloseIcon"; "required": false; }; "nzClosable": { "alias": "nzClosable"; "required": false; }; "nzMaskClosable": { "alias": "nzMaskClosable"; "required": false; }; "nzMask": { "alias": "nzMask"; "required": false; }; "nzCloseOnNavigation": { "alias": "nzCloseOnNavigation"; "required": false; }; "nzNoAnimation": { "alias": "nzNoAnimation"; "required": false; }; "nzKeyboard": { "alias": "nzKeyboard"; "required": false; }; "nzTitle": { "alias": "nzTitle"; "required": false; }; "nzExtra": { "alias": "nzExtra"; "required": false; }; "nzFooter": { "alias": "nzFooter"; "required": false; }; "nzPlacement": { "alias": "nzPlacement"; "required": false; }; "nzSize": { "alias": "nzSize"; "required": false; }; "nzMaskStyle": { "alias": "nzMaskStyle"; "required": false; }; "nzBodyStyle": { "alias": "nzBodyStyle"; "required": false; }; "nzWrapClassName": { "alias": "nzWrapClassName"; "required": false; }; "nzWidth": { "alias": "nzWidth"; "required": false; }; "nzHeight": { "alias": "nzHeight"; "required": false; }; "nzZIndex": { "alias": "nzZIndex"; "required": false; }; "nzOffsetX": { "alias": "nzOffsetX"; "required": false; }; "nzOffsetY": { "alias": "nzOffsetY"; "required": false; }; "nzVisible": { "alias": "nzVisible"; "required": false; }; }, { "nzOnViewInit": "nzOnViewInit"; "nzOnClose": "nzOnClose"; "nzVisibleChange": "nzVisibleChange"; }, ["contentFromContentChild"], never, true, never>; static ngAcceptInputType_nzClosable: unknown; static ngAcceptInputType_nzMaskClosable: unknown; static ngAcceptInputType_nzMask: unknown; static ngAcceptInputType_nzCloseOnNavigation: unknown; static ngAcceptInputType_nzNoAnimation: unknown; static ngAcceptInputType_nzKeyboard: unknown; static ngAcceptInputType_nzVisible: unknown; } declare class NzDrawerModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * 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 */ declare class DrawerBuilderForService { private overlay; private options; private drawerRef; private overlayRef; private unsubscribe$; constructor(overlay: Overlay, options: NzDrawerOptions); getInstance(): NzDrawerRef; updateOptions(options: NzDrawerOptionsOfComponent): void; } declare class NzDrawerService { private overlay; create(options: NzDrawerOptions): NzDrawerRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { DRAWER_ANIMATE_DURATION, DRAWER_DEFAULT_SIZE, DRAWER_LARGE_SIZE, DrawerBuilderForService, NZ_DRAWER_DATA, NzDrawerComponent, NzDrawerContentDirective, NzDrawerModule, NzDrawerRef, NzDrawerService }; export type { NzDrawerOptions, NzDrawerOptionsOfComponent, NzDrawerPlacement, NzDrawerSize };