123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- /**
- * 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 { FocusTrap, FocusTrapFactory } from '@angular/cdk/a11y';
- import { Direction, Directionality } from '@angular/cdk/bidi';
- import { Overlay, OverlayKeyboardDispatcher, OverlayRef } from '@angular/cdk/overlay';
- import { CdkPortalOutlet, TemplatePortal } from '@angular/cdk/portal';
- import { AfterViewInit, ChangeDetectorRef, ComponentRef, EventEmitter, Injector, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, TemplateRef, Type, ViewContainerRef } from '@angular/core';
- import { Observable, Subject } from 'rxjs';
- import { NzConfigKey, NzConfigService } from 'ng-zorro-antd/core/config';
- import { NgStyleInterface, NzSafeAny } from 'ng-zorro-antd/core/types';
- import { isTemplateRef } from 'ng-zorro-antd/core/util';
- import { NzDrawerOptionsOfComponent, NzDrawerPlacement, NzDrawerSize } from './drawer-options';
- import { NzDrawerRef } from './drawer-ref';
- import * as i0 from "@angular/core";
- export declare const DRAWER_ANIMATE_DURATION = 300;
- export declare class NzDrawerComponent<T extends {} = NzSafeAny, R = NzSafeAny, D extends Partial<T> = NzSafeAny> extends NzDrawerRef<T, R> implements OnInit, OnDestroy, AfterViewInit, OnChanges, NzDrawerOptionsOfComponent {
- private cdr;
- nzConfigService: NzConfigService;
- private renderer;
- private overlay;
- private injector;
- private changeDetectorRef;
- private focusTrapFactory;
- private viewContainerRef;
- private overlayKeyboardDispatcher;
- private directionality;
- readonly _nzModuleName: NzConfigKey;
- nzContent: TemplateRef<{
- $implicit: D;
- drawerRef: NzDrawerRef<R>;
- }> | Type<T>;
- nzCloseIcon: string | TemplateRef<void>;
- 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<void>;
- readonly nzOnClose: EventEmitter<MouseEvent>;
- readonly nzVisibleChange: EventEmitter<boolean>;
- drawerTemplate: TemplateRef<void>;
- bodyPortalOutlet?: CdkPortalOutlet;
- contentFromContentChild?: TemplateRef<NzSafeAny>;
- private destroy$;
- previouslyFocusedElement?: HTMLElement;
- placementChanging: boolean;
- placementChangeTimeoutId?: ReturnType<typeof setTimeout>;
- nzContentParams?: NzSafeAny;
- nzData?: D;
- overlayRef?: OverlayRef | null;
- portal?: TemplatePortal;
- focusTrap?: FocusTrap;
- isOpen: boolean;
- inAnimation: boolean;
- templateContext: {
- $implicit: D | undefined;
- drawerRef: NzDrawerRef<R>;
- };
- 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<void>;
- nzAfterClose: Subject<R | undefined>;
- get afterOpen(): Observable<void>;
- get afterClose(): Observable<R | undefined>;
- get isNzContentTemplateRef(): boolean;
- nzDirection?: Direction;
- dir: Direction;
- private document;
- constructor(cdr: ChangeDetectorRef, nzConfigService: NzConfigService, renderer: Renderer2, overlay: Overlay, injector: Injector, changeDetectorRef: ChangeDetectorRef, focusTrapFactory: FocusTrapFactory, viewContainerRef: ViewContainerRef, overlayKeyboardDispatcher: OverlayKeyboardDispatcher, directionality: Directionality);
- ngOnInit(): void;
- ngAfterViewInit(): void;
- ngOnChanges(changes: SimpleChanges): void;
- ngOnDestroy(): void;
- private getAnimationDuration;
- private triggerPlacementChangeCycleOnce;
- close(result?: R): void;
- open(): void;
- getContentComponent(): T | null;
- getContentComponentRef(): ComponentRef<T> | 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<NzDrawerComponent<any, any, any>, never>;
- static ɵcmp: i0.ɵɵComponentDeclaration<NzDrawerComponent<any, any, any>, "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;
- }
|