ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
1 lines • 41 kB
Source Map (JSON)
{"version":3,"file":"ng-zorro-antd-drawer.mjs","names":[],"sources":["../../components/drawer/drawer-content.directive.ts","../../components/drawer/drawer-ref.ts","../../components/drawer/drawer-footer.directive.ts","../../components/drawer/drawer-options.ts","../../components/drawer/drawer.component.ts","../../components/drawer/drawer.service.ts","../../components/drawer/drawer.module.ts"],"sourcesContent":["/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Directive, inject, TemplateRef } from '@angular/core';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Directive({\n selector: '[nzDrawerContent]',\n exportAs: 'nzDrawerContent'\n})\nexport class NzDrawerContentDirective {\n public templateRef = inject(TemplateRef<NzSafeAny>);\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { ComponentRef, TemplateRef } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { NzDrawerPlacement, NzDrawerUpdateOptions } from './drawer-options';\n\nexport abstract class NzDrawerRef<T = NzSafeAny, R = NzSafeAny> {\n abstract afterClose: Observable<R | undefined>;\n abstract afterOpen: Observable<void>;\n abstract close(result?: R): void;\n abstract open(): void;\n abstract getContentComponent(): T | null;\n abstract getContentComponentRef(): Readonly<ComponentRef<T>> | null;\n abstract updateConfig(options: NzDrawerUpdateOptions<T>): void;\n\n abstract nzClosable?: boolean;\n abstract nzNoAnimation?: boolean;\n abstract nzMaskClosable?: boolean;\n abstract nzKeyboard?: boolean;\n abstract nzMask?: boolean;\n abstract nzTitle?: string | TemplateRef<{}>;\n abstract nzExtra?: string | TemplateRef<{}>;\n abstract nzFooter?: string | TemplateRef<{}>;\n abstract nzOnCancel?: () => Promise<NzSafeAny>;\n abstract nzPlacement?: NzDrawerPlacement;\n abstract nzMaskStyle?: object;\n abstract nzBodyStyle?: object;\n abstract nzWrapClassName?: string;\n abstract nzWidth?: number | string;\n abstract nzHeight?: number | string;\n abstract nzZIndex?: number | string;\n abstract nzOffsetX?: number | string;\n abstract nzOffsetY?: number | string;\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { DestroyRef, Directive, inject, OnInit, TemplateRef } from '@angular/core';\n\nimport { NzDrawerRef } from './drawer-ref';\n\n@Directive({\n selector: '[nzDrawerFooter]',\n exportAs: 'nzDrawerFooter'\n})\nexport class NzDrawerFooterDirective implements OnInit {\n readonly templateRef: TemplateRef<{}> = inject(TemplateRef);\n private readonly drawerRef = inject(NzDrawerRef, { optional: true });\n\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n if (this.drawerRef?.nzFooter === this.templateRef) {\n this.drawerRef.updateConfig({ nzFooter: undefined });\n }\n });\n }\n\n ngOnInit(): void {\n this.drawerRef?.updateConfig({ nzFooter: this.templateRef });\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { Direction } from '@angular/cdk/bidi';\nimport { InjectionToken, TemplateRef, Type } from '@angular/core';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { NzDrawerRef } from './drawer-ref';\n\nexport const DRAWER_DEFAULT_SIZE = 378;\nexport const DRAWER_LARGE_SIZE = 736;\nexport type NzDrawerPlacement = 'left' | 'right' | 'top' | 'bottom';\nexport type NzDrawerSize = 'default' | 'large';\n\n/**\n * @deprecated Use `NzDrawerOptions` instead.\n */\nexport type NzDrawerOptionsOfComponent<T = NzSafeAny, D = NzSafeAny> = NzDrawerOptions<T, D>;\n\nexport interface NzDrawerOptions<T = NzSafeAny, D = NzSafeAny> {\n nzClosable?: boolean;\n nzMaskClosable?: boolean;\n nzCloseOnNavigation?: boolean;\n nzDirection?: Direction;\n nzMask?: boolean;\n nzKeyboard?: boolean;\n nzNoAnimation?: boolean;\n nzTitle?: string | TemplateRef<{}>;\n nzExtra?: string | TemplateRef<{}>;\n nzFooter?: string | TemplateRef<{}>;\n nzContent?: TemplateRef<{ $implicit: D; drawerRef: NzDrawerRef }> | Type<T>;\n /**\n * @deprecated will be removed in v23, please use `nzData` instead\n */\n nzContentParams?: Partial<T & D>;\n nzData?: D;\n nzMaskStyle?: object;\n nzBodyStyle?: object;\n nzWrapClassName?: string;\n nzSize?: NzDrawerSize;\n nzWidth?: number | string;\n nzHeight?: number | string;\n nzPlacement?: NzDrawerPlacement;\n nzZIndex?: number;\n nzOffsetX?: number;\n nzOffsetY?: number;\n nzOnCancel?(): Promise<NzSafeAny>;\n}\n\nexport type NzDrawerUpdateOptions<T = NzSafeAny> = Omit<NzDrawerOptions<T>, 'nzContent' | 'nzContentParams' | 'nzData'>;\n\nexport const NZ_DRAWER_DATA = new InjectionToken<NzSafeAny>(\n typeof ngDevMode !== 'undefined' && ngDevMode ? 'nz-drawer-data' : ''\n);\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { FocusTrap, FocusTrapFactory } from '@angular/cdk/a11y';\nimport { Direction, Directionality } from '@angular/cdk/bidi';\nimport { ESCAPE } from '@angular/cdk/keycodes';\nimport {\n CdkScrollable,\n createBlockScrollStrategy,\n createGlobalPositionStrategy,\n createOverlayRef,\n OverlayKeyboardDispatcher,\n OverlayRef\n} from '@angular/cdk/overlay';\nimport { CdkPortalOutlet, ComponentPortal, PortalModule, TemplatePortal } from '@angular/cdk/portal';\nimport { Location, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ContentChild,\n DestroyRef,\n DOCUMENT,\n EventEmitter,\n forwardRef,\n inject,\n Injector,\n Input,\n OnChanges,\n OnInit,\n Output,\n reflectComponentType,\n Renderer2,\n signal,\n SimpleChanges,\n TemplateRef,\n Type,\n ViewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Observable, Subject } from 'rxjs';\n\nimport { NzNoAnimationDirective, withAnimationCheck } from 'ng-zorro-antd/core/animation';\nimport { NzConfigKey, WithConfig } from 'ng-zorro-antd/core/config';\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\nimport { overlayZIndexSetter } from 'ng-zorro-antd/core/overlay';\nimport { NgStyleInterface, NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { isTemplateRef, toCssPixel } from 'ng-zorro-antd/core/util';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\nimport { NzDrawerContentDirective } from './drawer-content.directive';\nimport {\n DRAWER_DEFAULT_SIZE,\n DRAWER_LARGE_SIZE,\n NZ_DRAWER_DATA,\n NzDrawerOptions,\n NzDrawerPlacement,\n NzDrawerSize,\n NzDrawerUpdateOptions\n} from './drawer-options';\nimport { NzDrawerRef } from './drawer-ref';\n\nexport const DRAWER_ANIMATE_DURATION = 300;\n\nconst NZ_CONFIG_MODULE_NAME: NzConfigKey = 'drawer';\n\n@Component({\n selector: 'nz-drawer',\n exportAs: 'nzDrawer',\n providers: [{ provide: NzDrawerRef, useExisting: forwardRef(() => NzDrawerComponent) }],\n imports: [NzNoAnimationDirective, NzOutletModule, NzIconModule, PortalModule, NgTemplateOutlet, CdkScrollable],\n template: `\n <ng-template #drawerTemplate>\n <div\n class=\"ant-drawer\"\n [nzNoAnimation]=\"nzNoAnimation\"\n [class.ant-drawer-rtl]=\"dir() === 'rtl'\"\n [class.ant-drawer-open]=\"isOpen\"\n [class.no-mask]=\"!nzMask\"\n [class.ant-drawer-top]=\"nzPlacement === 'top'\"\n [class.ant-drawer-bottom]=\"nzPlacement === 'bottom'\"\n [class.ant-drawer-right]=\"nzPlacement === 'right'\"\n [class.ant-drawer-left]=\"nzPlacement === 'left'\"\n [style.transform]=\"offsetTransform\"\n [style.transition]=\"placementChanging ? 'none' : null\"\n [style.zIndex]=\"nzZIndex\"\n >\n @if (nzMask && isOpen) {\n <div\n class=\"ant-drawer-mask\"\n [animate.enter]=\"maskAnimationEnter()\"\n [animate.leave]=\"maskAnimationLeave()\"\n (click)=\"maskClick()\"\n [style]=\"nzMaskStyle\"\n ></div>\n }\n <div\n class=\"ant-drawer-content-wrapper {{ nzWrapClassName }}\"\n [style.width]=\"width\"\n [style.height]=\"height\"\n [style.transform]=\"transform\"\n [style.transition]=\"placementChanging ? 'none' : null\"\n >\n <div class=\"ant-drawer-content\">\n <div class=\"ant-drawer-wrapper-body\" [style.height]=\"isLeftOrRight ? '100%' : null\">\n @if (nzTitle || nzClosable) {\n <div class=\"ant-drawer-header\" [class.ant-drawer-header-close-only]=\"!nzTitle\">\n <div class=\"ant-drawer-header-title\">\n @if (nzClosable) {\n <button (click)=\"closeClick()\" aria-label=\"Close\" class=\"ant-drawer-close\">\n <ng-container *nzStringTemplateOutlet=\"nzCloseIcon; let closeIcon\">\n <nz-icon [nzType]=\"closeIcon\" />\n </ng-container>\n </button>\n }\n\n @if (nzTitle) {\n <div class=\"ant-drawer-title\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n </div>\n }\n </div>\n @if (nzExtra) {\n <div class=\"ant-drawer-extra\">\n <ng-container *nzStringTemplateOutlet=\"nzExtra\">{{ nzExtra }}</ng-container>\n </div>\n }\n </div>\n }\n <div class=\"ant-drawer-body\" [style]=\"nzBodyStyle\" cdkScrollable>\n <ng-template cdkPortalOutlet />\n @if (nzContent) {\n @if (isTemplateRef(nzContent)) {\n <ng-container *ngTemplateOutlet=\"nzContent; context: templateContext\" />\n }\n } @else if (contentFromContentChild && (isOpen || inAnimation)) {\n <ng-template [ngTemplateOutlet]=\"contentFromContentChild\" />\n }\n </div>\n @if (nzFooter) {\n <div class=\"ant-drawer-footer\">\n <ng-container *nzStringTemplateOutlet=\"nzFooter\">{{ nzFooter }}</ng-container>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n `\n})\nexport class NzDrawerComponent<T extends {} = NzSafeAny, R = NzSafeAny, D extends Partial<T> = NzSafeAny>\n extends NzDrawerRef<T, R>\n implements OnInit, AfterViewInit, OnChanges, NzDrawerOptions\n{\n private readonly renderer = inject(Renderer2);\n private readonly injector = inject(Injector);\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly focusTrapFactory = inject(FocusTrapFactory);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly overlayKeyboardDispatcher = inject(OverlayKeyboardDispatcher);\n private readonly directionality = inject(Directionality);\n private readonly destroyRef = inject(DestroyRef);\n private readonly document = inject(DOCUMENT);\n private readonly location = inject(Location, { optional: true });\n\n readonly _nzModuleName: NzConfigKey = NZ_CONFIG_MODULE_NAME;\n\n @Input() nzContent!: TemplateRef<{ $implicit: D; drawerRef: NzDrawerRef<R> }> | Type<T>;\n @Input() nzCloseIcon: string | TemplateRef<void> = 'close';\n @Input({ transform: booleanAttribute }) nzClosable: boolean = true;\n @Input({ transform: booleanAttribute }) @WithConfig() nzMaskClosable: boolean = true;\n @Input({ transform: booleanAttribute }) @WithConfig() nzMask: boolean = true;\n @Input({ transform: booleanAttribute }) @WithConfig() nzCloseOnNavigation: boolean = true;\n @Input({ transform: booleanAttribute }) nzNoAnimation = false;\n @Input({ transform: booleanAttribute }) nzKeyboard: boolean = true;\n @Input() nzTitle?: string | TemplateRef<{}>;\n @Input() nzExtra?: string | TemplateRef<{}>;\n private readonly footer = signal<string | TemplateRef<{}> | undefined>(undefined);\n\n @Input()\n get nzFooter(): string | TemplateRef<{}> | undefined {\n return this.footer();\n }\n\n set nzFooter(value: string | TemplateRef<{}> | undefined) {\n this.footer.set(value);\n }\n\n nzOnCancel?: () => Promise<NzSafeAny>;\n @Input() nzPlacement: NzDrawerPlacement = 'right';\n @Input() nzSize: NzDrawerSize = 'default';\n @Input() nzMaskStyle: NgStyleInterface = {};\n @Input() nzBodyStyle: NgStyleInterface = {};\n @Input() nzWrapClassName?: string;\n @Input() nzWidth?: number | string;\n @Input() nzHeight?: number | string;\n @Input() nzZIndex = 1000;\n @Input() nzOffsetX = 0;\n @Input() nzOffsetY = 0;\n private componentInstance: T | null = null;\n private componentRef: ComponentRef<T> | null = null;\n\n @Input({ transform: booleanAttribute })\n set nzVisible(value: boolean) {\n this.isOpen = value;\n }\n\n get nzVisible(): boolean {\n return this.isOpen;\n }\n\n @Output() readonly nzOnViewInit = new EventEmitter<void>();\n @Output() readonly nzOnClose = new EventEmitter<MouseEvent>();\n @Output() readonly nzVisibleChange = new EventEmitter<boolean>();\n\n @ViewChild('drawerTemplate', { static: true }) drawerTemplate!: TemplateRef<void>;\n @ViewChild(CdkPortalOutlet, { static: false }) bodyPortalOutlet?: CdkPortalOutlet;\n @ContentChild(NzDrawerContentDirective, { static: true, read: TemplateRef })\n contentFromContentChild?: TemplateRef<NzSafeAny>;\n\n previouslyFocusedElement?: HTMLElement;\n placementChanging = false;\n placementChangeTimeoutId?: ReturnType<typeof setTimeout>;\n nzContentParams?: NzSafeAny; // only service\n nzData?: D;\n overlayRef?: OverlayRef | null;\n portal?: TemplatePortal;\n focusTrap?: FocusTrap;\n isOpen = false;\n inAnimation = false;\n templateContext: { $implicit: D | undefined; drawerRef: NzDrawerRef<R> } = {\n $implicit: undefined,\n drawerRef: this as NzDrawerRef<R>\n };\n protected isTemplateRef = isTemplateRef;\n protected readonly maskAnimationEnter = withAnimationCheck(() => 'ant-drawer-mask-motion-enter');\n protected readonly maskAnimationLeave = withAnimationCheck(() => 'ant-drawer-mask-motion-leave');\n\n get offsetTransform(): string | null {\n if (!this.isOpen || this.nzOffsetX + this.nzOffsetY === 0) {\n return null;\n }\n switch (this.nzPlacement) {\n case 'left':\n return `translateX(${this.nzOffsetX}px)`;\n case 'right':\n return `translateX(-${this.nzOffsetX}px)`;\n case 'top':\n return `translateY(${this.nzOffsetY}px)`;\n case 'bottom':\n return `translateY(-${this.nzOffsetY}px)`;\n }\n }\n\n get transform(): string | null {\n if (this.isOpen) {\n return null;\n }\n\n switch (this.nzPlacement) {\n case 'left':\n return `translateX(-100%)`;\n case 'right':\n return `translateX(100%)`;\n case 'top':\n return `translateY(-100%)`;\n case 'bottom':\n return `translateY(100%)`;\n }\n }\n\n get width(): string | null {\n if (this.isLeftOrRight) {\n const defaultWidth = this.nzSize === 'large' ? DRAWER_LARGE_SIZE : DRAWER_DEFAULT_SIZE;\n return this.nzWidth === undefined ? toCssPixel(defaultWidth) : toCssPixel(this.nzWidth);\n }\n return null;\n }\n\n get height(): string | null {\n if (!this.isLeftOrRight) {\n const defaultHeight = this.nzSize === 'large' ? DRAWER_LARGE_SIZE : DRAWER_DEFAULT_SIZE;\n return this.nzHeight === undefined ? toCssPixel(defaultHeight) : toCssPixel(this.nzHeight);\n }\n return null;\n }\n\n get isLeftOrRight(): boolean {\n return this.nzPlacement === 'left' || this.nzPlacement === 'right';\n }\n\n nzAfterOpen = new Subject<void>();\n nzAfterClose = new Subject<R | undefined>();\n\n get afterOpen(): Observable<void> {\n return this.nzAfterOpen.asObservable();\n }\n\n get afterClose(): Observable<R | undefined> {\n return this.nzAfterClose.asObservable();\n }\n\n get isNzContentTemplateRef(): boolean {\n return isTemplateRef(this.nzContent);\n }\n\n // from service config\n @WithConfig() nzDirection?: Direction = undefined;\n\n protected readonly dir = (): Direction => this.nzDirection || this.directionality.valueSignal();\n\n constructor() {\n super();\n this.destroyRef.onDestroy(() => {\n clearTimeout(this.placementChangeTimeoutId);\n this.disposeOverlay();\n });\n }\n\n ngOnInit(): void {\n this.attachOverlay();\n this.subscribeToNavigation();\n this.updateOverlayStyle();\n this.updateBodyOverflow();\n this.templateContext = { $implicit: this.nzData || this.nzContentParams, drawerRef: this as NzDrawerRef<R> };\n this.cdr.detectChanges();\n }\n\n ngAfterViewInit(): void {\n this.attachBodyContent();\n // The `setTimeout` triggers change detection. There's no sense to schedule the DOM timer if anyone is\n // listening to the `nzOnViewInit` event inside the template, for instance `<nz-drawer (nzOnViewInit)=\"...\">`.\n if (this.nzOnViewInit.observers.length) {\n setTimeout(() => {\n this.nzOnViewInit.emit();\n });\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const { nzPlacement, nzVisible } = changes;\n if (nzVisible) {\n const value = changes.nzVisible.currentValue;\n if (value) {\n this.open();\n } else {\n this.close();\n }\n }\n if (nzPlacement && !nzPlacement.isFirstChange()) {\n this.triggerPlacementChangeCycleOnce();\n }\n }\n\n private getAnimationDuration(): number {\n return this.nzNoAnimation ? 0 : DRAWER_ANIMATE_DURATION;\n }\n\n // Disable the transition animation temporarily when the placement changing\n private triggerPlacementChangeCycleOnce(): void {\n if (!this.nzNoAnimation) {\n this.placementChanging = true;\n this.cdr.markForCheck();\n clearTimeout(this.placementChangeTimeoutId);\n this.placementChangeTimeoutId = setTimeout(() => {\n this.placementChanging = false;\n this.cdr.markForCheck();\n }, this.getAnimationDuration());\n }\n }\n\n close(result?: R): void {\n this.isOpen = false;\n this.inAnimation = true;\n this.nzVisibleChange.emit(false);\n this.updateOverlayStyle();\n this.overlayKeyboardDispatcher.remove(this.overlayRef!);\n this.cdr.detectChanges();\n setTimeout(() => {\n this.updateBodyOverflow();\n this.restoreFocus();\n this.inAnimation = false;\n this.cdr.markForCheck();\n this.nzAfterClose.next(result);\n this.nzAfterClose.complete();\n this.componentInstance = null;\n this.componentRef = null;\n }, this.getAnimationDuration());\n }\n\n open(): void {\n this.attachOverlay();\n this.isOpen = true;\n this.inAnimation = true;\n this.nzVisibleChange.emit(true);\n this.overlayKeyboardDispatcher.add(this.overlayRef!);\n this.updateOverlayStyle();\n this.updateBodyOverflow();\n this.savePreviouslyFocusedElement();\n this.trapFocus();\n this.cdr.detectChanges();\n setTimeout(() => {\n this.inAnimation = false;\n this.cdr.detectChanges();\n this.nzAfterOpen.next();\n }, this.getAnimationDuration());\n }\n\n getContentComponent(): T | null {\n return this.componentInstance;\n }\n\n override getContentComponentRef(): ComponentRef<T> | null {\n return this.componentRef;\n }\n\n updateConfig(options: NzDrawerUpdateOptions<T>): void {\n const previousPlacement = this.nzPlacement;\n Object.assign(this, options);\n if (this.overlayRef && this.nzPlacement !== previousPlacement) {\n this.triggerPlacementChangeCycleOnce();\n }\n if (this.overlayRef) {\n overlayZIndexSetter(this.overlayRef, this.nzZIndex);\n }\n this.cdr.markForCheck();\n }\n\n closeClick(): void {\n this.nzOnClose.emit();\n }\n\n maskClick(): void {\n if (this.nzMaskClosable && this.nzMask) {\n this.nzOnClose.emit();\n }\n }\n\n private attachBodyContent(): void {\n this.bodyPortalOutlet!.dispose();\n\n if (this.nzContent instanceof Type) {\n const childInjector = Injector.create({\n parent: this.injector,\n providers: [\n { provide: NzDrawerRef, useValue: this },\n { provide: NZ_DRAWER_DATA, useValue: this.nzData }\n ]\n });\n const componentPortal = new ComponentPortal<T>(this.nzContent, null, childInjector);\n this.componentRef = this.bodyPortalOutlet!.attachComponentPortal(componentPortal);\n this.componentInstance = this.componentRef.instance;\n\n /**\n * @todo `nzContentParams` will be removed in v23, we have to remove the following logics\n */\n const contentParams = this.nzData || this.nzContentParams;\n const signalInputNames = new Set(\n reflectComponentType(this.nzContent)\n ?.inputs.filter(input => input.isSignal)\n .map(input => input.propName)\n );\n\n for (const [key, value] of Object.entries(contentParams ?? {})) {\n // skip signal inputs\n if (!signalInputNames.has(key)) {\n const instance = this.componentRef.instance as Record<string, unknown>;\n instance[key] = value;\n }\n }\n this.componentRef.changeDetectorRef.detectChanges();\n }\n }\n\n private attachOverlay(): void {\n if (!this.overlayRef) {\n this.portal = new TemplatePortal(this.drawerTemplate, this.viewContainerRef);\n this.overlayRef = createOverlayRef(this.injector, {\n positionStrategy: createGlobalPositionStrategy(this.injector),\n scrollStrategy: createBlockScrollStrategy(this.injector)\n });\n\n overlayZIndexSetter(this.overlayRef, this.nzZIndex);\n }\n\n if (this.overlayRef && !this.overlayRef.hasAttached()) {\n this.overlayRef.attach(this.portal);\n this.overlayRef!.keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((event: KeyboardEvent) => {\n if (event.keyCode === ESCAPE && this.isOpen && this.nzKeyboard) {\n this.nzOnClose.emit();\n }\n });\n this.overlayRef\n .detachments()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.close();\n this.disposeOverlay();\n });\n }\n }\n\n private subscribeToNavigation(): void {\n const subscription = this.location?.subscribe(() => {\n if (this.nzCloseOnNavigation) {\n this.disposeOverlay();\n }\n });\n this.destroyRef.onDestroy(() => subscription?.unsubscribe());\n }\n\n private disposeOverlay(): void {\n this.overlayRef?.dispose();\n this.overlayRef = null;\n }\n\n private updateOverlayStyle(): void {\n if (this.overlayRef && this.overlayRef.overlayElement) {\n this.renderer.setStyle(this.overlayRef.overlayElement, 'pointer-events', this.isOpen ? 'auto' : 'none');\n }\n }\n\n private updateBodyOverflow(): void {\n if (this.overlayRef) {\n if (this.isOpen) {\n this.overlayRef.getConfig().scrollStrategy!.enable();\n } else {\n this.overlayRef.getConfig().scrollStrategy!.disable();\n }\n }\n }\n\n savePreviouslyFocusedElement(): void {\n if (this.document && !this.previouslyFocusedElement) {\n this.previouslyFocusedElement = this.document.activeElement as HTMLElement;\n this.previouslyFocusedElement?.blur();\n }\n }\n\n private trapFocus(): void {\n if (!this.focusTrap && this.overlayRef && this.overlayRef.overlayElement) {\n this.focusTrap = this.focusTrapFactory.create(this.overlayRef!.overlayElement);\n this.focusTrap.focusInitialElement();\n }\n }\n\n private restoreFocus(): void {\n if (this.previouslyFocusedElement) {\n this.previouslyFocusedElement.focus();\n this.previouslyFocusedElement = undefined;\n }\n if (this.focusTrap) {\n this.focusTrap.destroy();\n }\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { createOverlayRef, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { inject, Injectable, Injector } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { NzDrawerOptions } from './drawer-options';\nimport { NzDrawerRef } from './drawer-ref';\nimport { NzDrawerComponent } from './drawer.component';\n\nexport class DrawerBuilderForService<T extends {}, R> {\n private drawerRef: NzDrawerComponent<T, R> | null;\n private unsubscribe$ = new Subject<void>();\n\n constructor(\n private overlayRef: OverlayRef,\n private options: NzDrawerOptions\n ) {\n this.drawerRef = this.overlayRef.attach(new ComponentPortal(NzDrawerComponent)).instance;\n this.updateOptions(this.options);\n // Prevent repeatedly open drawer when tap focus element.\n this.drawerRef.savePreviouslyFocusedElement();\n this.drawerRef.nzOnViewInit.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {\n this.drawerRef!.open();\n });\n this.drawerRef.nzOnClose.subscribe(() => {\n if (this.drawerRef!.nzOnCancel) {\n this.drawerRef!.nzOnCancel().then(canClose => {\n if (canClose !== false) {\n this.drawerRef!.close();\n }\n });\n } else {\n this.drawerRef!.close();\n }\n });\n\n this.drawerRef.afterClose.pipe(takeUntil(this.unsubscribe$)).subscribe(() => {\n this.overlayRef.dispose();\n this.drawerRef = null;\n this.unsubscribe$.next();\n this.unsubscribe$.complete();\n });\n }\n\n getInstance(): NzDrawerRef<T, R> {\n return this.drawerRef!;\n }\n\n updateOptions(options: NzDrawerOptions): void {\n Object.assign(this.drawerRef!, options);\n }\n}\n\n@Injectable()\nexport class NzDrawerService {\n private injector = inject(Injector);\n\n create<T extends {} = NzSafeAny, D = undefined, R = NzSafeAny>(\n options: NzDrawerOptions<T, D extends undefined ? {} : D>\n ): NzDrawerRef<T, R> {\n return new DrawerBuilderForService<T, R>(createOverlayRef(this.injector), options).getInstance();\n }\n}\n","/**\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { NzDrawerContentDirective } from './drawer-content.directive';\nimport { NzDrawerFooterDirective } from './drawer-footer.directive';\nimport { NzDrawerComponent } from './drawer.component';\nimport { NzDrawerService } from './drawer.service';\n\n@NgModule({\n imports: [NzDrawerComponent, NzDrawerContentDirective, NzDrawerFooterDirective],\n providers: [NzDrawerService],\n exports: [NzDrawerComponent, NzDrawerContentDirective, NzDrawerFooterDirective]\n})\nexport class NzDrawerModule {}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAaA,IAAa,2BAAb,MAAa,yBAAwB;CAC5B,cAAc,OAAO,WAAsB;CADvC,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAwB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAxB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAwB,cAAA;EAAA,UAAA;EAAA,UAAA,CAAA,iBAAA;EAAA,UAAA;CAAA,CAAA;;AAAxB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAwB,YAAA,CAAA;EAJpC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;EACX,CAAA;;;ACAD,IAAsB,cAAtB,MAAiC,CA2BhC;AC1BD,IAAa,0BAAb,MAAa,wBAAuB;CACzB,cAA+B,OAAO,WAAW;CACzC,YAAY,OAAO,aAAa,EAAE,UAAU,KAAI,CAAE;CAEnE,cAAA;EACE,OAAO,UAAU,CAAC,CAAC,gBAAe;GAChC,IAAI,KAAK,WAAW,aAAa,KAAK,aACpC,KAAK,UAAU,aAAa,EAAE,UAAU,OAAS,CAAE;EAEvD,CAAC;CACH;CAEA,WAAQ;EACN,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