primeng
Version:
PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB
1 lines • 75.1 kB
Source Map (JSON)
{"version":3,"file":"primeng-dialog.mjs","sources":["../../src/dialog/style/dialogstyle.ts","../../src/dialog/dialog.ts","../../src/dialog/primeng-dialog.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style } from '@primeuix/styles/dialog';\nimport { BaseStyle } from 'primeng/base';\n\n/* Position */\nconst inlineStyles = {\n mask: ({ instance }) => ({\n position: 'fixed',\n height: '100%',\n width: '100%',\n left: 0,\n top: 0,\n display: 'flex',\n justifyContent:\n instance.position === 'left' || instance.position === 'topleft' || instance.position === 'bottomleft'\n ? 'flex-start'\n : instance.position === 'right' || instance.position === 'topright' || instance.position === 'bottomright'\n ? 'flex-end'\n : 'center',\n alignItems:\n instance.position === 'top' || instance.position === 'topleft' || instance.position === 'topright'\n ? 'flex-start'\n : instance.position === 'bottom' || instance.position === 'bottomleft' || instance.position === 'bottomright'\n ? 'flex-end'\n : 'center',\n pointerEvents: instance.modal ? 'auto' : 'none'\n }),\n root: {\n display: 'flex',\n flexDirection: 'column',\n pointerEvents: 'auto'\n }\n};\n\nconst classes = {\n mask: ({ instance }) => {\n const positions = ['left', 'right', 'top', 'topleft', 'topright', 'bottom', 'bottomleft', 'bottomright'];\n const pos = positions.find((item) => item === instance.position);\n\n return ['p-dialog-mask', { 'p-overlay-mask p-overlay-mask-enter': instance.modal }, pos ? `p-dialog-${pos}` : ''];\n },\n root: ({ instance }) => [\n 'p-dialog p-component',\n {\n 'p-dialog-maximized': instance.maximizable && instance.maximized\n }\n ],\n header: 'p-dialog-header',\n title: 'p-dialog-title',\n resizeHandle: 'p-resizable-handle',\n headerActions: 'p-dialog-header-actions',\n pcMaximizeButton: 'p-dialog-maximize-button',\n pcCloseButton: 'p-dialog-close-button',\n content: () => ['p-dialog-content'],\n footer: 'p-dialog-footer'\n};\n\n@Injectable()\nexport class DialogStyle extends BaseStyle {\n name = 'dialog';\n\n theme = style;\n\n classes = classes;\n\n inlineStyles = inlineStyles;\n}\n\n/**\n *\n * Dialog is a container to display content in an overlay window.\n *\n * [Live Demo](https://www.primeng.org/dialog)\n *\n * @module dialogstyle\n *\n */\nexport enum DialogClasses {\n /**\n * Class name of the mask element\n */\n mask = 'p-dialog-mask',\n /**\n * Class name of the root element\n */\n root = 'p-dialog',\n /**\n * Class name of the header element\n */\n header = 'p-dialog-header',\n /**\n * Class name of the title element\n */\n title = 'p-dialog-title',\n /**\n * Class name of the header actions element\n */\n headerActions = 'p-dialog-header-actions',\n /**\n * Class name of the maximize button element\n */\n pcMaximizeButton = 'p-dialog-maximize-button',\n /**\n * Class name of the close button element\n */\n pcCloseButton = 'p-dialog-close-button',\n /**\n * Class name of the content element\n */\n content = 'p-dialog-content',\n /**\n * Class name of the footer element\n */\n footer = 'p-dialog-footer'\n}\n\nexport interface DialogStyle extends BaseStyle {}\n","import { animate, animation, AnimationEvent, style, transition, trigger, useAnimation } from '@angular/animations';\nimport { CommonModule, isPlatformBrowser } from '@angular/common';\nimport {\n AfterContentInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n ContentChild,\n ContentChildren,\n ElementRef,\n EventEmitter,\n inject,\n input,\n Input,\n NgModule,\n NgZone,\n numberAttribute,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n ViewRef\n} from '@angular/core';\nimport { addClass, appendChild, getOuterHeight, getOuterWidth, getViewport, hasClass, removeClass, setAttribute, uuid } from '@primeuix/utils';\nimport { PrimeTemplate, SharedModule, TranslationKeys } from 'primeng/api';\nimport { BaseComponent } from 'primeng/basecomponent';\nimport { Button, ButtonProps } from 'primeng/button';\nimport { blockBodyScroll, DomHandler, unblockBodyScroll } from 'primeng/dom';\nimport { FocusTrap } from 'primeng/focustrap';\nimport { TimesIcon, WindowMaximizeIcon, WindowMinimizeIcon } from 'primeng/icons';\nimport { Nullable, VoidListener } from 'primeng/ts-helpers';\nimport { ZIndexUtils } from 'primeng/utils';\nimport { DialogStyle } from './style/dialogstyle';\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 standalone: true,\n imports: [CommonModule, Button, FocusTrap, TimesIcon, WindowMaximizeIcon, WindowMinimizeIcon, SharedModule],\n template: `\n <div *ngIf=\"maskVisible\" [class]=\"cn(cx('mask'), maskStyleClass)\" [style]=\"sx('mask')\" [ngStyle]=\"maskStyle\">\n <div\n *ngIf=\"visible\"\n #container\n [class]=\"cn(cx('root'), styleClass)\"\n [style]=\"sx('root')\"\n [ngStyle]=\"style\"\n pFocusTrap\n [pFocusTrapDisabled]=\"focusTrap === false\"\n [@animation]=\"{\n value: 'visible',\n params: { transform: transformOptions, transition: transitionOptions }\n }\"\n (@animation.start)=\"onAnimationStart($event)\"\n (@animation.done)=\"onAnimationEnd($event)\"\n [attr.role]=\"role\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-modal]=\"true\"\n >\n <ng-container *ngIf=\"_headlessTemplate || headlessTemplate || headlessT; else notHeadless\">\n <ng-container *ngTemplateOutlet=\"_headlessTemplate || headlessTemplate || headlessT\"></ng-container>\n </ng-container>\n\n <ng-template #notHeadless>\n <div *ngIf=\"resizable\" [class]=\"cx('resizeHandle')\" [style.z-index]=\"90\" (mousedown)=\"initResize($event)\"></div>\n <div #titlebar [class]=\"cx('header')\" (mousedown)=\"initDrag($event)\" *ngIf=\"showHeader\">\n <span [id]=\"ariaLabelledBy\" [class]=\"cx('title')\" *ngIf=\"!_headerTemplate && !headerTemplate && !headerT\">{{ header }}</span>\n <ng-container *ngTemplateOutlet=\"_headerTemplate || headerTemplate || headerT\"></ng-container>\n <div [class]=\"cx('headerActions')\">\n <p-button *ngIf=\"maximizable\" [styleClass]=\"cx('pcMaximizeButton')\" (onClick)=\"maximize()\" (keydown.enter)=\"maximize()\" [tabindex]=\"maximizable ? '0' : '-1'\" [ariaLabel]=\"maximizeLabel\" [buttonProps]=\"maximizeButtonProps\">\n <ng-template #icon>\n <span *ngIf=\"maximizeIcon && !_maximizeiconTemplate && !_minimizeiconTemplate\" [ngClass]=\"maximized ? minimizeIcon : maximizeIcon\"></span>\n <ng-container *ngIf=\"!maximizeIcon && !maximizeButtonProps?.icon\">\n <svg data-p-icon=\"window-maximize\" *ngIf=\"!maximized && !_maximizeiconTemplate && !maximizeIconTemplate && !maximizeIconT\" />\n <svg data-p-icon=\"window-minimize\" *ngIf=\"maximized && !_minimizeiconTemplate && !minimizeIconTemplate && !minimizeIconT\" />\n </ng-container>\n <ng-container *ngIf=\"!maximized\">\n <ng-template *ngTemplateOutlet=\"_maximizeiconTemplate || maximizeIconTemplate || maximizeIconT\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"maximized\">\n <ng-template *ngTemplateOutlet=\"_minimizeiconTemplate || minimizeIconTemplate || minimizeIconT\"></ng-template>\n </ng-container>\n </ng-template>\n </p-button>\n <p-button *ngIf=\"closable\" [styleClass]=\"cx('pcCloseButton')\" [ariaLabel]=\"closeAriaLabel\" (onClick)=\"close($event)\" (keydown.enter)=\"close($event)\" [tabindex]=\"closeTabindex\" [buttonProps]=\"closeButtonProps\">\n <ng-template #icon>\n <ng-container *ngIf=\"!_closeiconTemplate && !closeIconTemplate && !closeIconT && !closeButtonProps?.icon\">\n <span *ngIf=\"closeIcon\" [class]=\"closeIcon\"></span>\n <svg data-p-icon=\"times\" *ngIf=\"!closeIcon\" />\n </ng-container>\n <span *ngIf=\"_closeiconTemplate || closeIconTemplate || closeIconT\">\n <ng-template *ngTemplateOutlet=\"_closeiconTemplate || closeIconTemplate || closeIconT\"></ng-template>\n </span>\n </ng-template>\n </p-button>\n </div>\n </div>\n <div #content [class]=\"cn(cx('content'), contentStyleClass)\" [ngStyle]=\"contentStyle\" [attr.data-pc-section]=\"'content'\">\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet=\"_contentTemplate || contentTemplate || contentT\"></ng-container>\n </div>\n <div #footer [class]=\"cx('footer')\" *ngIf=\"_footerTemplate || footerTemplate || footerT\">\n <ng-content select=\"p-footer\"></ng-content>\n <ng-container *ngTemplateOutlet=\"_footerTemplate || footerTemplate || footerT\"></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 providers: [DialogStyle]\n})\nexport class Dialog extends BaseComponent implements OnInit, AfterContentInit, 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 * 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 * 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: { [klass: string]: any } | null | undefined;\n /**\n * Whether to show the header or not.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) showHeader: boolean = true;\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 * Used to pass all properties of the ButtonProps to the Button component.\n * @group Props\n */\n @Input() closeButtonProps: ButtonProps = {\n severity: 'secondary',\n variant: 'text',\n rounded: true\n };\n /**\n * Used to pass all properties of the ButtonProps to the Button component.\n * @group Props\n */\n @Input() maximizeButtonProps: ButtonProps = {\n severity: 'secondary',\n variant: 'text',\n rounded: true\n };\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 * Role attribute of html element.\n * @group Emits\n */\n @Input() role: string = 'dialog';\n /**\n * Target element to attach the overlay, 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 * @defaultValue 'self'\n * @group Props\n */\n appendTo = input<HTMLElement | ElementRef | TemplateRef<any> | 'self' | 'body' | null | undefined | any>(undefined);\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 @ViewChild('titlebar') headerViewChild: Nullable<ElementRef>;\n\n @ViewChild('content') contentViewChild: Nullable<ElementRef>;\n\n @ViewChild('footer') footerViewChild: Nullable<ElementRef>;\n /**\n * Header template.\n * @group Props\n */\n @Input('content') headerTemplate: TemplateRef<any> | undefined;\n /**\n * Content template.\n * @group Props\n */\n @Input() contentTemplate: TemplateRef<any> | undefined;\n /**\n * Footer template.\n * @group Props\n */\n @Input() footerTemplate: TemplateRef<any> | undefined;\n /**\n * Close icon template.\n * @group Props\n */\n @Input() closeIconTemplate: TemplateRef<any> | undefined;\n /**\n * Maximize icon template.\n * @group Props\n */\n @Input() maximizeIconTemplate: TemplateRef<any> | undefined;\n /**\n * Minimize icon template.\n * @group Props\n */\n @Input() minimizeIconTemplate: TemplateRef<any> | undefined;\n /**\n * Headless template.\n * @group Props\n */\n @Input() headlessTemplate: TemplateRef<any> | undefined;\n\n @ContentChild('header', { descendants: false }) _headerTemplate: TemplateRef<any> | undefined;\n\n @ContentChild('content', { descendants: false }) _contentTemplate: TemplateRef<any> | undefined;\n\n @ContentChild('footer', { descendants: false }) _footerTemplate: TemplateRef<any> | undefined;\n\n @ContentChild('closeicon', { descendants: false }) _closeiconTemplate: TemplateRef<any> | undefined;\n\n @ContentChild('maximizeicon', { descendants: false }) _maximizeiconTemplate: TemplateRef<any> | undefined;\n\n @ContentChild('minimizeicon', { descendants: false }) _minimizeiconTemplate: TemplateRef<any> | undefined;\n\n @ContentChild('headless', { descendants: false }) _headlessTemplate: TemplateRef<any> | undefined;\n\n $appendTo = computed(() => this.appendTo() || this.config.overlayAppendTo());\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 = uuid('pn_id_');\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 _componentStyle = inject(DialogStyle);\n\n headerT: TemplateRef<any> | undefined;\n\n contentT: TemplateRef<any> | undefined;\n\n footerT: TemplateRef<any> | undefined;\n\n closeIconT: TemplateRef<any> | undefined;\n\n maximizeIconT: TemplateRef<any> | undefined;\n\n minimizeIconT: TemplateRef<any> | undefined;\n\n headlessT: TemplateRef<any> | undefined;\n\n get maximizeLabel(): string {\n return this.config.getTranslation(TranslationKeys.ARIA)['maximizeLabel'];\n }\n zone: NgZone = inject(NgZone);\n\n get maskClass() {\n const positions = ['left', 'right', 'top', 'topleft', 'topright', 'bottom', 'bottomleft', 'bottomright'];\n const pos = positions.find((item) => item === this.position);\n\n return {\n 'p-dialog-mask': true,\n 'p-overlay-mask p-overlay-mask-enter': this.modal || this.dismissableMask,\n [`p-dialog-${pos}`]: pos\n };\n }\n\n ngOnInit() {\n super.ngOnInit();\n if (this.breakpoints) {\n this.createStyle();\n }\n }\n\n @ContentChildren(PrimeTemplate) templates: QueryList<PrimeTemplate> | undefined;\n\n ngAfterContentInit() {\n this.templates?.forEach((item) => {\n switch (item.getType()) {\n case 'header':\n this.headerT = item.template;\n break;\n\n case 'content':\n this.contentT = item.template;\n break;\n\n case 'footer':\n this.footerT = item.template;\n break;\n\n case 'closeicon':\n this.closeIconT = item.template;\n break;\n\n case 'maximizeicon':\n this.maximizeIconT = item.template;\n break;\n\n case 'minimizeicon':\n this.minimizeIconT = item.template;\n break;\n\n case 'headless':\n this.headlessT = item.template;\n break;\n\n default:\n this.contentT = item.template;\n break;\n }\n });\n }\n\n getAriaLabelledBy() {\n return this.header !== null ? uuid('pn_id_') + '_header' : null;\n }\n\n parseDurationToMilliseconds(durationString: string): number | undefined {\n const transitionTimeRegex = /([\\d\\.]+)(ms|s)\\b/g;\n let totalMilliseconds = 0;\n let match;\n while ((match = transitionTimeRegex.exec(durationString)) !== null) {\n const value = parseFloat(match[1]);\n const unit = match[2];\n if (unit === 'ms') {\n totalMilliseconds += value;\n } else if (unit === 's') {\n totalMilliseconds += value * 1000;\n }\n }\n if (totalMilliseconds === 0) {\n return undefined;\n }\n return totalMilliseconds;\n }\n\n _focus(focusParentElement?: HTMLElement): boolean {\n if (focusParentElement) {\n const timeoutDuration = this.parseDurationToMilliseconds(this.transitionOptions);\n let _focusableElements = DomHandler.getFocusableElements(focusParentElement);\n if (_focusableElements && _focusableElements.length > 0) {\n this.zone.runOutsideAngular(() => {\n setTimeout(() => _focusableElements[0].focus(), timeoutDuration || 5);\n });\n return true;\n }\n }\n\n return false;\n }\n\n focus(focusParentElement?: HTMLElement) {\n let focused = this._focus(focusParentElement);\n\n if (!focused) {\n focused = this._focus(this.footerViewChild?.nativeElement);\n if (!focused) {\n focused = this._focus(this.headerViewChild?.nativeElement);\n if (!focused) {\n this._focus(this.contentViewChild?.nativeElement);\n }\n }\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 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 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 blockBodyScroll();\n } else {\n 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 setAttribute(this.styleElement, 'nonce', this.config?.csp()?.nonce);\n }\n }\n }\n\n initDrag(event: MouseEvent) {\n if (hasClass(event.target as any, 'p-dialog-maximize-icon') || hasClass(event.target as any, 'p-dialog-header-close-icon') || 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 addClass(this.document.body, 'p-unselectable-text');\n }\n }\n\n onDrag(event: MouseEvent) {\n if (this.dragging) {\n const containerWidth = getOuterWidth(this.container);\n const containerHeight = 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 = 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 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 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 = getOuterWidth(this.container);\n let containerHeight = getOuterHeight(this.container);\n let contentHeight = 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 = 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 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.document.defaultView, '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.document.defaultView, '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.document.defaultView, 'mousemove', this.onResize.bind(this));\n this.documentResizeEndListener = this.renderer.listen(this.document.defaultView, '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() && this.$appendTo() !== 'self') {\n if (this.$appendTo() === 'body') this.renderer.appendChild(this.document.body, this.wrapper);\n else appendChild(this.$appendTo(), this.wrapper);\n }\n }\n\n restoreAppend() {\n if (this.container && this.$appendTo() !== 'self') {\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.attrSelector && this.container.setAttribute(this.attrSelector, '');\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 // 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 addClass(this.wrapper, 'p-overlay-mask-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\n if (this.maskVisible !== this.visible) {\n this.maskVisible = this.visible;\n }\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 // 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 // removeClass(this.document.body, 'p-overflow-hidden');\n // }\n\n if (hasClass(this.document.body, 'p-overflow-hidden')) {\n 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 super.ngOnDestroy();\n }\n}\n\n@NgModule({\n imports: [Dialog, SharedModule],\n exports: [Dialog, SharedModule]\n})\nexport class DialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["style"],"mappings":";;;;;;;;;;;;;;;;AAIA;AACA,MAAM,YAAY,GAAG;IACjB,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM;AACrB,QAAA,QAAQ,EAAE,OAAO;AACjB,QAAA,MAAM,EAAE,MAAM;AACd,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,IAAI,EAAE,CAAC;AACP,QAAA,GAAG,EAAE,CAAC;AACN,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,cAAc,EACV,QAAQ,CAAC,QAAQ,KAAK,MAAM,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,QAAQ,KAAK;AACrF,cAAE;AACF,cAAE,QAAQ,CAAC,QAAQ,KAAK,OAAO,IAAI,QAAQ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