primeng
Version:
[](https://badge.fury.io/js/primeng) [](https://www.npmjs.com/package/primeng) [
{"version":3,"file":"primeng-dialog.mjs","sources":["../../src/app/components/dialog/dialog.ts","../../src/app/components/dialog/primeng-dialog.ts"],"sourcesContent":["import { AnimationEvent, animate, animation, style, transition, trigger, useAnimation } from '@angular/animations';\nimport { CommonModule, DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n NgModule,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n PLATFORM_ID,\n QueryList,\n Renderer2,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n ViewRef,\n booleanAttribute,\n numberAttribute\n} from '@angular/core';\nimport { Footer, Header, PrimeNGConfig, PrimeTemplate, SharedModule, TranslationKeys } from 'primeng/api';\nimport { DomHandler } from 'primeng/dom';\nimport { FocusTrapModule } from 'primeng/focustrap';\nimport { TimesIcon } from 'primeng/icons/times';\nimport { WindowMaximizeIcon } from 'primeng/icons/windowmaximize';\nimport { WindowMinimizeIcon } from 'primeng/icons/windowminimize';\nimport { RippleModule } from 'primeng/ripple';\nimport { Nullable, VoidListener } from 'primeng/ts-helpers';\nimport { UniqueComponentId, ZIndexUtils } from 'primeng/utils';\nimport { ButtonModule } from 'primeng/button';\n\nconst showAnimation = animation([style({ transform: '{{transform}}', opacity: 0 }), animate('{{transition}}')]);\n\nconst hideAnimation = animation([animate('{{transition}}', style({ transform: '{{transform}}', opacity: 0 }))]);\n/**\n * Dialog is a container to display content in an overlay window.\n * @group Components\n */\n@Component({\n selector: 'p-dialog',\n template: `\n <div\n *ngIf=\"maskVisible\"\n [class]=\"maskStyleClass\"\n [style]=\"maskStyle\"\n [ngClass]=\"{\n 'p-dialog-mask': true,\n 'p-component-overlay p-component-overlay-enter': this.modal,\n 'p-dialog-mask-scrollblocker': this.modal || this.blockScroll,\n 'p-dialog-left': position === 'left',\n 'p-dialog-right': position === 'right',\n 'p-dialog-top': position === 'top',\n 'p-dialog-top-left': position === 'topleft' || position === 'top-left',\n 'p-dialog-top-right': position === 'topright' || position === 'top-right',\n 'p-dialog-bottom': position === 'bottom',\n 'p-dialog-bottom-left': position === 'bottomleft' || position === 'bottom-left',\n 'p-dialog-bottom-right': position === 'bottomright' || position === 'bottom-right'\n }\"\n >\n <div\n #container\n [ngClass]=\"{ 'p-dialog p-component': true, 'p-dialog-rtl': rtl, 'p-dialog-draggable': draggable, 'p-dialog-resizable': resizable, 'p-dialog-maximized': maximized }\"\n [ngStyle]=\"style\"\n [class]=\"styleClass\"\n *ngIf=\"visible\"\n pFocusTrap\n [pFocusTrapDisabled]=\"focusTrap === false\"\n [@animation]=\"{ value: 'visible', params: { transform: transformOptions, transition: transitionOptions } }\"\n (@animation.start)=\"onAnimationStart($event)\"\n (@animation.done)=\"onAnimationEnd($event)\"\n role=\"dialog\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-modal]=\"true\"\n >\n <ng-container *ngIf=\"headlessTemplate; else notHeadless\">\n <ng-container *ngTemplateOutlet=\"headlessTemplate\"></ng-container>\n </ng-container>\n\n <ng-template #notHeadless>\n <div *ngIf=\"resizable\" class=\"p-resizable-handle\" style=\"z-index: 90;\" (mousedown)=\"initResize($event)\"></div>\n <div #titlebar class=\"p-dialog-header\" (mousedown)=\"initDrag($event)\" *ngIf=\"showHeader\">\n <span [id]=\"ariaLabelledBy\" class=\"p-dialog-title\" *ngIf=\"!headerFacet && !headerTemplate\">{{ header }}</span>\n <span [id]=\"ariaLabelledBy\" class=\"p-dialog-title\" *ngIf=\"headerFacet\">\n <ng-content select=\"p-header\"></ng-content>\n </span>\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n <div class=\"p-dialog-header-icons\">\n <button\n *ngIf=\"maximizable\"\n role=\"button\"\n type=\"button\"\n [ngClass]=\"{ 'p-dialog-header-icon p-dialog-header-maximize p-link': true }\"\n (click)=\"maximize()\"\n (keydown.enter)=\"maximize()\"\n [attr.tabindex]=\"maximizable ? '0' : '-1'\"\n [attr.aria-label]=\"maximizeLabel\"\n pRipple\n pButton\n >\n <span *ngIf=\"maximizeIcon && !maximizeIconTemplate && !minimizeIconTemplate\" class=\"p-dialog-header-maximize-icon\" [ngClass]=\"maximized ? minimizeIcon : maximizeIcon\"></span>\n <ng-container *ngIf=\"!maximizeIcon\">\n <WindowMaximizeIcon *ngIf=\"!maximized && !maximizeIconTemplate\" [styleClass]=\"'p-dialog-header-maximize-icon'\" />\n <WindowMinimizeIcon *ngIf=\"maximized && !minimizeIconTemplate\" [styleClass]=\"'p-dialog-header-maximize-icon'\" />\n </ng-container>\n <ng-container *ngIf=\"!maximized\">\n <ng-template *ngTemplateOutlet=\"maximizeIconTemplate\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"maximized\">\n <ng-template *ngTemplateOutlet=\"minimizeIconTemplate\"></ng-template>\n </ng-container>\n </button>\n <button\n *ngIf=\"closable\"\n type=\"button\"\n [ngClass]=\"{ 'p-dialog-header-icon p-dialog-header-close p-link': true }\"\n [attr.aria-label]=\"closeAriaLabel\"\n (click)=\"close($event)\"\n (keydown.enter)=\"close($event)\"\n pRipple\n pButton\n [attr.tabindex]=\"closeTabindex\"\n >\n <ng-container *ngIf=\"!closeIconTemplate\">\n <span *ngIf=\"closeIcon\" class=\"p-dialog-header-close-icon\" [ngClass]=\"closeIcon\"></span>\n <TimesIcon *ngIf=\"!closeIcon\" [styleClass]=\"'p-dialog-header-close-icon'\" />\n </ng-container>\n <span *ngIf=\"closeIconTemplate\">\n <ng-template *ngTemplateOutlet=\"closeIconTemplate\"></ng-template>\n </span>\n </button>\n </div>\n </div>\n <div #content [ngClass]=\"'p-dialog-content'\" [ngStyle]=\"contentStyle\" [class]=\"contentStyleClass\">\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </div>\n <div #footer class=\"p-dialog-footer\" *ngIf=\"footerFacet || footerTemplate\">\n <ng-content select=\"p-footer\"></ng-content>\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n </div>\n </ng-template>\n </div>\n </div>\n `,\n animations: [trigger('animation', [transition('void => visible', [useAnimation(showAnimation)]), transition('visible => void', [useAnimation(hideAnimation)])])],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['../dialog/dialog.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class Dialog implements AfterContentInit, OnInit, OnDestroy {\n /**\n * Title text of the dialog.\n * @group Props\n */\n @Input() header: string | undefined;\n /**\n * Enables dragging to change the position using header.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) draggable: boolean = true;\n /**\n * Enables resizing of the content.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) resizable: boolean = true;\n /**\n * Defines the left offset of dialog.\n * @group Props\n * @deprecated positionLeft property is deprecated.\n */\n @Input() get positionLeft(): number {\n return 0;\n }\n set positionLeft(_positionLeft: number) {\n console.log('positionLeft property is deprecated.');\n }\n /**\n * Defines the top offset of dialog.\n * @group Props\n * @deprecated positionTop property is deprecated.\n */\n @Input() get positionTop(): number {\n return 0;\n }\n set positionTop(_positionTop: number) {\n console.log('positionTop property is deprecated.');\n }\n /**\n * Style of the content section.\n * @group Props\n */\n @Input() contentStyle: any;\n /**\n * Style class of the content.\n * @group Props\n */\n @Input() contentStyleClass: string | undefined;\n /**\n * Defines if background should be blocked when dialog is displayed.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) modal: boolean = false;\n /**\n * Specifies if pressing escape key should hide the dialog.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) closeOnEscape: boolean = true;\n /**\n * Specifies if clicking the modal background should hide the dialog.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) dismissableMask: boolean = false;\n /**\n * When enabled dialog is displayed in RTL direction.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) rtl: boolean = false;\n /**\n * Adds a close icon to the header to hide the dialog.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) closable: boolean = true;\n /**\n * Defines if the component is responsive.\n * @group Props\n * @deprecated Responsive property is deprecated.\n */\n @Input() get responsive(): boolean {\n return false;\n }\n set responsive(_responsive: boolean) {\n console.log('Responsive property is deprecated.');\n }\n /**\n * Target element to attach the dialog, valid values are \"body\" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]=\"mydiv\" for a div element having #mydiv as variable name).\n * @group Props\n */\n @Input() appendTo: HTMLElement | ElementRef | TemplateRef<any> | string | null | undefined | any;\n /**\n * Object literal to define widths per screen size.\n * @group Props\n */\n @Input() breakpoints: any;\n /**\n * Style class of the component.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Style class of the mask.\n * @group Props\n */\n @Input() maskStyleClass: string | undefined;\n /**\n * Style of the mask.\n * @group Props\n */\n @Input() maskStyle: string | undefined;\n /**\n * Whether to show the header or not.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) showHeader: boolean = true;\n /**\n * Defines the breakpoint of the component responsive.\n * @group Props\n * @deprecated Breakpoint property is not utilized and deprecated. Use breakpoints or CSS media queries instead.\n */\n @Input() get breakpoint(): number {\n return 649;\n }\n set breakpoint(_breakpoint: number) {\n console.log('Breakpoint property is not utilized and deprecated, use breakpoints or CSS media queries instead.');\n }\n /**\n * Whether background scroll should be blocked when dialog is visible.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) blockScroll: boolean = false;\n /**\n * Whether to automatically manage layering.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) autoZIndex: boolean = true;\n /**\n * Base zIndex value to use in layering.\n * @group Props\n */\n @Input({ transform: numberAttribute }) baseZIndex: number = 0;\n /**\n * Minimum value for the left coordinate of dialog in dragging.\n * @group Props\n */\n @Input({ transform: numberAttribute }) minX: number = 0;\n /**\n * Minimum value for the top coordinate of dialog in dragging.\n * @group Props\n */\n @Input({ transform: numberAttribute }) minY: number = 0;\n /**\n * When enabled, first focusable element receives focus on show.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) focusOnShow: boolean = true;\n /**\n * Whether the dialog can be displayed full screen.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) maximizable: boolean = false;\n /**\n * Keeps dialog in the viewport.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) keepInViewport: boolean = true;\n /**\n * When enabled, can only focus on elements inside the dialog.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) focusTrap: boolean = true;\n /**\n * Transition options of the animation.\n * @group Props\n */\n @Input() transitionOptions: string = '150ms cubic-bezier(0, 0, 0.2, 1)';\n /**\n * Name of the close icon.\n * @group Props\n */\n @Input() closeIcon: string | undefined;\n /**\n * Defines a string that labels the close button for accessibility.\n * @group Props\n */\n @Input() closeAriaLabel: string | undefined;\n /**\n * Index of the close button in tabbing order.\n * @group Props\n */\n @Input() closeTabindex: string = '0';\n /**\n * Name of the minimize icon.\n * @group Props\n */\n @Input() minimizeIcon: string | undefined;\n /**\n * Name of the maximize icon.\n * @group Props\n */\n @Input() maximizeIcon: string | undefined;\n /**\n * Specifies the visibility of the dialog.\n * @group Props\n */\n @Input() get visible(): boolean {\n return this._visible;\n }\n set visible(value: boolean) {\n this._visible = value;\n\n if (this._visible && !this.maskVisible) {\n this.maskVisible = true;\n }\n }\n /**\n * Inline style of the component.\n * @group Props\n */\n @Input() get style(): any {\n return this._style;\n }\n set style(value: any) {\n if (value) {\n this._style = { ...value };\n this.originalStyle = value;\n }\n }\n /**\n * Position of the dialog.\n * @group Props\n */\n @Input() get position(): 'center' | 'top' | 'bottom' | 'left' | 'right' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright' {\n return this._position;\n }\n set position(value: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright') {\n this._position = value;\n\n switch (value) {\n case 'topleft':\n case 'bottomleft':\n case 'left':\n this.transformOptions = 'translate3d(-100%, 0px, 0px)';\n break;\n case 'topright':\n case 'bottomright':\n case 'right':\n this.transformOptions = 'translate3d(100%, 0px, 0px)';\n break;\n case 'bottom':\n this.transformOptions = 'translate3d(0px, 100%, 0px)';\n break;\n case 'top':\n this.transformOptions = 'translate3d(0px, -100%, 0px)';\n break;\n default:\n this.transformOptions = 'scale(0.7)';\n break;\n }\n }\n /**\n * Callback to invoke when dialog is shown.\n * @group Emits\n */\n @Output() onShow: EventEmitter<any> = new EventEmitter<any>();\n /**\n * Callback to invoke when dialog is hidden.\n * @group Emits\n */\n @Output() onHide: EventEmitter<any> = new EventEmitter<any>();\n /**\n * This EventEmitter is used to notify changes in the visibility state of a component.\n * @param {boolean} value - New value.\n * @group Emits\n */\n @Output() visibleChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n /**\n * Callback to invoke when dialog resizing is initiated.\n * @param {MouseEvent} event - Mouse event.\n * @group Emits\n */\n @Output() onResizeInit: EventEmitter<MouseEvent> = new EventEmitter<MouseEvent>();\n /**\n * Callback to invoke when dialog resizing is completed.\n * @param {MouseEvent} event - Mouse event.\n * @group Emits\n */\n @Output() onResizeEnd: EventEmitter<MouseEvent> = new EventEmitter<MouseEvent>();\n /**\n * Callback to invoke when dialog dragging is completed.\n * @param {DragEvent} event - Drag event.\n * @group Emits\n */\n @Output() onDragEnd: EventEmitter<DragEvent> = new EventEmitter<DragEvent>();\n /**\n * Callback to invoke when dialog maximized or unmaximized.\n * @group Emits\n */\n @Output() onMaximize: EventEmitter<any> = new EventEmitter<any>();\n\n @ContentChild(Header) headerFacet: QueryList<Header> | undefined;\n\n @ContentChild(Footer) footerFacet: QueryList<Footer> | undefined;\n\n @ContentChildren(PrimeTemplate) templates: QueryList<PrimeTemplate> | undefined;\n\n @ViewChild('titlebar') headerViewChild: Nullable<ElementRef>;\n\n @ViewChild('content') contentViewChild: Nullable<ElementRef>;\n\n @ViewChild('footer') footerViewChild: Nullable<ElementRef>;\n\n headerTemplate: Nullable<TemplateRef<any>>;\n\n contentTemplate: Nullable<TemplateRef<any>>;\n\n footerTemplate: Nullable<TemplateRef<any>>;\n\n maximizeIconTemplate: Nullable<TemplateRef<any>>;\n\n closeIconTemplate: Nullable<TemplateRef<any>>;\n\n minimizeIconTemplate: Nullable<TemplateRef<any>>;\n\n headlessTemplate: Nullable<TemplateRef<any>>;\n\n _visible: boolean = false;\n\n maskVisible: boolean | undefined;\n\n container: Nullable<HTMLDivElement>;\n\n wrapper: Nullable<HTMLElement>;\n\n dragging: boolean | undefined;\n\n ariaLabelledBy: string = this.getAriaLabelledBy();\n\n documentDragListener: VoidListener;\n\n documentDragEndListener: VoidListener;\n\n resizing: boolean | undefined;\n\n documentResizeListener: VoidListener;\n\n documentResizeEndListener: VoidListener;\n\n documentEscapeListener: VoidListener;\n\n maskClickListener: VoidListener;\n\n lastPageX: number | undefined;\n\n lastPageY: number | undefined;\n\n preventVisibleChangePropagation: boolean | undefined;\n\n maximized: boolean | undefined;\n\n preMaximizeContentHeight: number | undefined;\n\n preMaximizeContainerWidth: number | undefined;\n\n preMaximizeContainerHeight: number | undefined;\n\n preMaximizePageX: number | undefined;\n\n preMaximizePageY: number | undefined;\n\n id: string = UniqueComponentId();\n\n _style: any = {};\n\n _position: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright' = 'center';\n\n originalStyle: any;\n\n transformOptions: any = 'scale(0.7)';\n\n styleElement: any;\n\n private window: Window;\n\n get maximizeLabel(): string {\n return this.config.getTranslation(TranslationKeys.ARIA)['maximizeLabel'];\n }\n\n constructor(\n @Inject(DOCUMENT) private document: Document,\n @Inject(PLATFORM_ID) private platformId: any,\n public el: ElementRef,\n public renderer: Renderer2,\n public zone: NgZone,\n private cd: ChangeDetectorRef,\n public config: PrimeNGConfig\n ) {\n this.window = this.document.defaultView as Window;\n }\n\n ngAfterContentInit() {\n this.templates?.forEach((item) => {\n switch (item.getType()) {\n case 'header':\n this.headerTemplate = item.template;\n break;\n\n case 'content':\n this.contentTemplate = item.template;\n break;\n\n case 'footer':\n this.footerTemplate = item.template;\n break;\n\n case 'closeicon':\n this.closeIconTemplate = item.template;\n break;\n\n case 'maximizeicon':\n this.maximizeIconTemplate = item.template;\n break;\n\n case 'minimizeicon':\n this.minimizeIconTemplate = item.template;\n break;\n\n case 'headless':\n this.headlessTemplate = item.template;\n break;\n\n default:\n this.contentTemplate = item.template;\n break;\n }\n });\n }\n\n ngOnInit() {\n if (this.breakpoints) {\n this.createStyle();\n }\n }\n\n getAriaLabelledBy() {\n return this.header !== null ? UniqueComponentId() + '_header' : null;\n }\n\n focus(focusParentElement = this.contentViewChild?.nativeElement) {\n let focusable = DomHandler.getFocusableElement(focusParentElement, '[autofocus]');\n if (focusable) {\n this.zone.runOutsideAngular(() => {\n setTimeout(() => focusable.focus(), 5);\n });\n return;\n }\n const focusableElement = DomHandler.getFocusableElement(focusParentElement);\n if (focusableElement) {\n this.zone.runOutsideAngular(() => {\n setTimeout(() => focusableElement.focus(), 5);\n });\n } else if (this.footerViewChild) {\n // If the content section is empty try to focus on footer\n this.focus(this.footerViewChild.nativeElement);\n }\n }\n\n close(event: Event) {\n this.visibleChange.emit(false);\n event.preventDefault();\n }\n\n enableModality() {\n if (this.closable && this.dismissableMask) {\n this.maskClickListener = this.renderer.listen(this.wrapper, 'mousedown', (event: any) => {\n if (this.wrapper && this.wrapper.isSameNode(event.target)) {\n this.close(event);\n }\n });\n }\n\n if (this.modal) {\n DomHandler.blockBodyScroll();\n }\n }\n\n disableModality() {\n if (this.wrapper) {\n if (this.dismissableMask) {\n this.unbindMaskClickListener();\n }\n\n // for nested dialogs w/modal\n const scrollBlockers = document.querySelectorAll('.p-dialog-mask-scrollblocker');\n\n if (this.modal && scrollBlockers && scrollBlockers.length == 1) {\n DomHandler.unblockBodyScroll();\n }\n\n if (!(this.cd as ViewRef).destroyed) {\n this.cd.detectChanges();\n }\n }\n }\n\n maximize() {\n this.maximized = !this.maximized;\n\n if (!this.modal && !this.blockScroll) {\n if (this.maximized) {\n DomHandler.blockBodyScroll();\n } else {\n DomHandler.unblockBodyScroll();\n }\n }\n\n this.onMaximize.emit({ maximized: this.maximized });\n }\n\n unbindMaskClickListener() {\n if (this.maskClickListener) {\n this.maskClickListener();\n this.maskClickListener = null;\n }\n }\n\n moveOnTop() {\n if (this.autoZIndex) {\n ZIndexUtils.set('modal', this.container, this.baseZIndex + this.config.zIndex.modal);\n (this.wrapper as HTMLElement).style.zIndex = String(parseInt((this.container as HTMLDivElement).style.zIndex, 10) - 1);\n }\n }\n\n createStyle() {\n if (isPlatformBrowser(this.platformId)) {\n if (!this.styleElement) {\n this.styleElement = this.renderer.createElement('style');\n this.styleElement.type = 'text/css';\n this.renderer.appendChild(this.document.head, this.styleElement);\n let innerHTML = '';\n for (let breakpoint in this.breakpoints) {\n innerHTML += `\n @media screen and (max-width: ${breakpoint}) {\n .p-dialog[${this.id}]:not(.p-dialog-maximized) {\n width: ${this.breakpoints[breakpoint]} !important;\n }\n }\n `;\n }\n\n this.renderer.setProperty(this.styleElement, 'innerHTML', innerHTML);\n DomHandler.setAttribute(this.styleElement, 'nonce', this.config?.csp()?.nonce);\n }\n }\n }\n\n initDrag(event: MouseEvent) {\n if (DomHandler.hasClass(event.target, 'p-dialog-header-icon') || DomHandler.hasClass(event.target, 'p-dialog-header-close-icon') || DomHandler.hasClass((<HTMLElement>event.target).parentElement, 'p-dialog-header-icon')) {\n return;\n }\n\n if (this.draggable) {\n this.dragging = true;\n this.lastPageX = event.pageX;\n this.lastPageY = event.pageY;\n\n (this.container as HTMLDivElement).style.margin = '0';\n DomHandler.addClass(this.document.body, 'p-unselectable-text');\n }\n }\n\n onDrag(event: MouseEvent) {\n if (this.dragging) {\n const containerWidth = DomHandler.getOuterWidth(this.container);\n const containerHeight = DomHandler.getOuterHeight(this.container);\n const deltaX = event.pageX - (this.lastPageX as number);\n const deltaY = event.pageY - (this.lastPageY as number);\n const offset = this.container.getBoundingClientRect();\n\n const containerComputedStyle = getComputedStyle(this.container);\n\n const leftMargin = parseFloat(containerComputedStyle.marginLeft);\n const topMargin = parseFloat(containerComputedStyle.marginTop);\n\n const leftPos = offset.left + deltaX - leftMargin;\n const topPos = offset.top + deltaY - topMargin;\n const viewport = DomHandler.getViewport();\n\n this.container.style.position = 'fixed';\n\n if (this.keepInViewport) {\n if (leftPos >= this.minX && leftPos + containerWidth < viewport.width) {\n this._style.left = `${leftPos}px`;\n this.lastPageX = event.pageX;\n this.container.style.left = `${leftPos}px`;\n }\n\n if (topPos >= this.minY && topPos + containerHeight < viewport.height) {\n this._style.top = `${topPos}px`;\n this.lastPageY = event.pageY;\n this.container.style.top = `${topPos}px`;\n }\n } else {\n this.lastPageX = event.pageX;\n this.container.style.left = `${leftPos}px`;\n this.lastPageY = event.pageY;\n this.container.style.top = `${topPos}px`;\n }\n }\n }\n\n endDrag(event: DragEvent) {\n if (this.dragging) {\n this.dragging = false;\n DomHandler.removeClass(this.document.body, 'p-unselectable-text');\n this.cd.detectChanges();\n this.onDragEnd.emit(event);\n }\n }\n\n resetPosition() {\n (this.container as HTMLDivElement).style.position = '';\n (this.container as HTMLDivElement).style.left = '';\n (this.container as HTMLDivElement).style.top = '';\n (this.container as HTMLDivElement).style.margin = '';\n }\n\n //backward compatibility\n center() {\n this.resetPosition();\n }\n\n initResize(event: MouseEvent) {\n if (this.resizable) {\n this.resizing = true;\n this.lastPageX = event.pageX;\n this.lastPageY = event.pageY;\n DomHandler.addClass(this.document.body, 'p-unselectable-text');\n this.onResizeInit.emit(event);\n }\n }\n\n onResize(event: MouseEvent) {\n if (this.resizing) {\n let deltaX = event.pageX - (this.lastPageX as number);\n let deltaY = event.pageY - (this.lastPageY as number);\n let containerWidth = DomHandler.getOuterWidth(this.container);\n let containerHeight = DomHandler.getOuterHeight(this.container);\n let contentHeight = DomHandler.getOuterHeight(this.contentViewChild?.nativeElement);\n let newWidth = containerWidth + deltaX;\n let newHeight = containerHeight + deltaY;\n let minWidth = (this.container as HTMLDivElement).style.minWidth;\n let minHeight = (this.container as HTMLDivElement).style.minHeight;\n let offset = (this.container as HTMLDivElement).getBoundingClientRect();\n let viewport = DomHandler.getViewport();\n let hasBeenDragged = !parseInt((this.container as HTMLDivElement).style.top) || !parseInt((this.container as HTMLDivElement).style.left);\n\n if (hasBeenDragged) {\n newWidth += deltaX;\n newHeight += deltaY;\n }\n\n if ((!minWidth || newWidth > parseInt(minWidth)) && offset.left + newWidth < viewport.width) {\n this._style.width = newWidth + 'px';\n (this.container as HTMLDivElement).style.width = this._style.width;\n }\n\n if ((!minHeight || newHeight > parseInt(minHeight)) && offset.top + newHeight < viewport.height) {\n (<ElementRef>this.contentViewChild).nativeElement.style.height = contentHeight + newHeight - containerHeight + 'px';\n\n if (this._style.height) {\n this._style.height = newHeight + 'px';\n (this.container as HTMLDivElement).style.height = this._style.height;\n }\n }\n\n this.lastPageX = event.pageX;\n this.lastPageY = event.pageY;\n }\n }\n\n resizeEnd(event: MouseEvent) {\n if (this.resizing) {\n this.resizing = false;\n DomHandler.removeClass(this.document.body, 'p-unselectable-text');\n this.onResizeEnd.emit(event);\n }\n }\n\n bindGlobalListeners() {\n if (this.draggable) {\n this.bindDocumentDragListener();\n this.bindDocumentDragEndListener();\n }\n\n if (this.resizable) {\n this.bindDocumentResizeListeners();\n }\n\n if (this.closeOnEscape && this.closable) {\n this.bindDocumentEscapeListener();\n }\n }\n\n unbindGlobalListeners() {\n this.unbindDocumentDragListener();\n this.unbindDocumentDragEndListener();\n this.unbindDocumentResizeListeners();\n this.unbindDocumentEscapeListener();\n }\n\n bindDocumentDragListener() {\n if (!this.documentDragListener) {\n this.zone.runOutsideAngular(() => {\n this.documentDragListener = this.renderer.listen(this.window, 'mousemove', this.onDrag.bind(this));\n });\n }\n }\n\n unbindDocumentDragListener() {\n if (this.documentDragListener) {\n this.documentDragListener();\n this.documentDragListener = null;\n }\n }\n\n bindDocumentDragEndListener() {\n if (!this.documentDragEndListener) {\n this.zone.runOutsideAngular(() => {\n this.documentDragEndListener = this.renderer.listen(this.window, 'mouseup', this.endDrag.bind(this));\n });\n }\n }\n\n unbindDocumentDragEndListener() {\n if (this.documentDragEndListener) {\n this.documentDragEndListener();\n this.documentDragEndListener = null;\n }\n }\n\n bindDocumentResizeListeners() {\n if (!this.documentResizeListener && !this.documentResizeEndListener) {\n this.zone.runOutsideAngular(() => {\n this.documentResizeListener = this.renderer.listen(this.window, 'mousemove', this.onResize.bind(this));\n this.documentResizeEndListener = this.renderer.listen(this.window, 'mouseup', this.resizeEnd.bind(this));\n });\n }\n }\n\n unbindDocumentResizeListeners() {\n if (this.documentResizeListener && this.documentResizeEndListener) {\n this.documentResizeListener();\n this.documentResizeEndListener();\n this.documentResizeListener = null;\n this.documentResizeEndListener = null;\n }\n }\n\n bindDocumentEscapeListener() {\n const documentTarget: any = this.el ? this.el.nativeElement.ownerDocument : 'document';\n\n this.documentEscapeListener = this.renderer.listen(documentTarget, 'keydown', (event) => {\n if (event.key == 'Escape') {\n this.close(event);\n }\n });\n }\n\n unbindDocumentEscapeListener() {\n if (this.documentEscapeListener) {\n this.documentEscapeListener();\n this.documentEscapeListener = null;\n }\n }\n\n appendContainer() {\n if (this.appendTo) {\n if (this.appendTo === 'body') this.renderer.appendChild(this.document.body, this.wrapper);\n else DomHandler.appendChild(this.wrapper, this.appendTo);\n }\n }\n\n restoreAppend() {\n if (this.container && this.appendTo) {\n this.renderer.appendChild(this.el.nativeElement, this.wrapper);\n }\n }\n\n onAnimationStart(event: AnimationEvent) {\n switch (event.toState) {\n case 'visible':\n this.container = event.element;\n this.wrapper = this.container?.parentElement;\n this.appendContainer();\n this.moveOnTop();\n this.bindGlobalListeners();\n this.container?.setAttribute(this.id, '');\n\n if (this.modal) {\n this.enableModality();\n }\n\n if (!this.modal && this.blockScroll) {\n DomHandler.addClass(this.document.body, 'p-overflow-hidden');\n }\n\n if (this.focusOnShow) {\n this.focus();\n }\n break;\n\n case 'void':\n if (this.wrapper && this.modal) {\n DomHandler.addClass(this.wrapper, 'p-component-overlay-leave');\n }\n break;\n }\n }\n\n onAnimationEnd(event: AnimationEvent) {\n switch (event.toState) {\n case 'void':\n this.onContainerDestroy();\n this.onHide.emit({});\n this.cd.markForCheck();\n break;\n case 'visible':\n this.onShow.emit({});\n break;\n }\n }\n\n onContainerDestroy() {\n this.unbindGlobalListeners();\n this.dragging = false;\n\n this.maskVisible = false;\n\n if (this.maximized) {\n DomHandler.removeClass(this.document.body, 'p-overflow-hidden');\n this.document.body.style.removeProperty('--scrollbar-width');\n this.maximized = false;\n }\n\n if (this.modal) {\n this.disableModality();\n }\n\n if (this.blockScroll) {\n DomHandler.removeClass(this.document.body, 'p-overflow-hidden');\n }\n\n if (this.container && this.autoZIndex) {\n ZIndexUtils.clear(this.container);\n }\n\n this.container = null;\n this.wrapper = null;\n\n this._style = this.originalStyle ? { ...this.originalStyle } : {};\n }\n\n destroyStyle() {\n if (this.styleElement) {\n this.renderer.removeChild(this.document.head, this.styleElement);\n this.styleElement = null;\n }\n }\n\n ngOnDestroy() {\n if (this.container) {\n this.restoreAppend();\n this.onContainerDestroy();\n }\n\n this.destroyStyle();\n }\n}\n\n@NgModule({\n imports: [CommonModule, FocusTrapModule, ButtonModule, RippleModule, TimesIcon, WindowMaximizeIcon, WindowMinimizeIcon],\n exports: [Dialog, SharedModule],\n declarations: [Dialog]\n})\nexport class DialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAwCA,MAAM,aAAa,GAAG,SAAS,CAAC,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAEhH,MAAM,aAAa,GAAG,SAAS,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC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