primeng 11.2.2 → 11.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/avatar/primeng-avatar.metadata.json +1 -1
  2. package/bundles/primeng-avatar.umd.js +1 -1
  3. package/bundles/primeng-avatar.umd.min.js +1 -1
  4. package/bundles/primeng-avatar.umd.min.js.map +1 -1
  5. package/bundles/primeng-confirmdialog.umd.js +1 -1
  6. package/bundles/primeng-confirmdialog.umd.min.js +1 -1
  7. package/bundles/primeng-confirmdialog.umd.min.js.map +1 -1
  8. package/bundles/primeng-dialog.umd.js +1 -1
  9. package/bundles/primeng-dialog.umd.min.js +1 -1
  10. package/bundles/primeng-dialog.umd.min.js.map +1 -1
  11. package/bundles/primeng-dynamicdialog.umd.js +1 -1
  12. package/bundles/primeng-dynamicdialog.umd.min.js +1 -1
  13. package/bundles/primeng-dynamicdialog.umd.min.js.map +1 -1
  14. package/bundles/primeng-inputmask.umd.js +5 -2
  15. package/bundles/primeng-inputmask.umd.js.map +1 -1
  16. package/bundles/primeng-inputmask.umd.min.js +1 -1
  17. package/bundles/primeng-inputmask.umd.min.js.map +1 -1
  18. package/bundles/primeng-inputnumber.umd.js +16 -2
  19. package/bundles/primeng-inputnumber.umd.js.map +1 -1
  20. package/bundles/primeng-inputnumber.umd.min.js +1 -1
  21. package/bundles/primeng-inputnumber.umd.min.js.map +1 -1
  22. package/bundles/primeng-lightbox.umd.js +1 -1
  23. package/bundles/primeng-lightbox.umd.min.js +1 -1
  24. package/bundles/primeng-lightbox.umd.min.js.map +1 -1
  25. package/bundles/primeng-slider.umd.js +1 -0
  26. package/bundles/primeng-slider.umd.js.map +1 -1
  27. package/bundles/primeng-slider.umd.min.js +1 -1
  28. package/bundles/primeng-slider.umd.min.js.map +1 -1
  29. package/bundles/primeng-table.umd.js +15 -8
  30. package/bundles/primeng-table.umd.js.map +1 -1
  31. package/bundles/primeng-table.umd.min.js +2 -2
  32. package/bundles/primeng-table.umd.min.js.map +1 -1
  33. package/confirmdialog/primeng-confirmdialog.metadata.json +1 -1
  34. package/dialog/primeng-dialog.metadata.json +1 -1
  35. package/dynamicdialog/primeng-dynamicdialog.metadata.json +1 -1
  36. package/esm2015/avatar/avatar.js +1 -1
  37. package/esm2015/confirmdialog/confirmdialog.js +1 -1
  38. package/esm2015/dialog/dialog.js +1 -1
  39. package/esm2015/dynamicdialog/dynamicdialog.js +1 -1
  40. package/esm2015/inputmask/inputmask.js +6 -3
  41. package/esm2015/inputnumber/inputnumber.js +13 -3
  42. package/esm2015/lightbox/lightbox.js +1 -1
  43. package/esm2015/slider/slider.js +2 -1
  44. package/esm2015/table/table.js +16 -9
  45. package/fesm2015/primeng-avatar.js +1 -1
  46. package/fesm2015/primeng-confirmdialog.js +1 -1
  47. package/fesm2015/primeng-dialog.js +1 -1
  48. package/fesm2015/primeng-dynamicdialog.js +1 -1
  49. package/fesm2015/primeng-inputmask.js +5 -2
  50. package/fesm2015/primeng-inputmask.js.map +1 -1
  51. package/fesm2015/primeng-inputnumber.js +12 -2
  52. package/fesm2015/primeng-inputnumber.js.map +1 -1
  53. package/fesm2015/primeng-lightbox.js +1 -1
  54. package/fesm2015/primeng-slider.js +1 -0
  55. package/fesm2015/primeng-slider.js.map +1 -1
  56. package/fesm2015/primeng-table.js +15 -8
  57. package/fesm2015/primeng-table.js.map +1 -1
  58. package/inputmask/inputmask.d.ts +2 -1
  59. package/inputmask/primeng-inputmask.metadata.json +1 -1
  60. package/inputnumber/inputnumber.d.ts +3 -1
  61. package/inputnumber/primeng-inputnumber.metadata.json +1 -1
  62. package/lightbox/primeng-lightbox.metadata.json +1 -1
  63. package/package.json +1 -1
  64. package/resources/components/avatar/avatar.css +3 -2
  65. package/resources/components/dialog/dialog.css +2 -0
  66. package/slider/primeng-slider.metadata.json +1 -1
  67. package/table/primeng-table.metadata.json +1 -1
  68. package/table/table.d.ts +4 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/app/components/dialog/dialog.ts"],"names":["idx","showAnimation","animation","style","transform","opacity","animate","hideAnimation","Dialog","el","renderer","zone","cd","this","draggable","resizable","closeOnEscape","closable","showHeader","blockScroll","autoZIndex","baseZIndex","minX","minY","focusOnShow","keepInViewport","focusTrap","transitionOptions","closeIcon","minimizeIcon","maximizeIcon","onShow","EventEmitter","onHide","visibleChange","onResizeInit","onResizeEnd","onDragEnd","onMaximize","id","_style","_position","transformOptions","Object","defineProperty","prototype","_positionLeft","console","log","_positionTop","_responsive","_breakpoint","ngAfterContentInit","_this","templates","forEach","item","getType","headerTemplate","template","contentTemplate","footerTemplate","_visible","value","maskVisible","assign","originalStyle","focus","focusable","DomHandler","findSingle","container","runOutsideAngular","setTimeout","close","event","emit","preventDefault","enableModality","dismissableMask","maskClickListener","listen","wrapper","isSameNode","target","modal","addClass","document","body","disableModality","unbindMaskClickListener","removeClass","destroyed","detectChanges","maximize","maximized","moveOnTop","zIndex","String","zindex","initDrag","hasClass","parentElement","dragging","lastPageX","pageX","lastPageY","pageY","margin","onKeydown","which","focusableElements","getFocusableElements","length","ownerDocument","activeElement","focusedIndex","indexOf","shiftKey","onDrag","containerWidth","getOuterWidth","containerHeight","getOuterHeight","deltaX","deltaY","offset","getOffset","leftPos","left","topPos","top","viewport","getViewport","position","width","height","endDrag","resetPosition","center","initResize","resizing","onResize","contentHeight","contentViewChild","nativeElement","newWidth","newHeight","minWidth","minHeight","parseInt","resizeEnd","bindGlobalListeners","bindDocumentDragListener","bindDocumentDragEndListener","bindDocumentResizeListeners","bindDocumentEscapeListener","unbindGlobalListeners","unbindDocumentDragListener","unbindDocumentDragEndListener","unbindDocumentResizeListeners","unbindDocumentEscapeListener","documentDragListener","bind","window","addEventListener","removeEventListener","documentDragEndListener","documentResizeListener","documentResizeEndListener","documentTarget","documentEscapeListener","appendContainer","appendTo","appendChild","restoreAppend","onAnimationStart","toState","element","onAnimationEnd","onContainerDestroy","ngOnDestroy","Component","args","selector","animations","trigger","transition","useAnimation","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","ElementRef","Renderer2","NgZone","ChangeDetectorRef","Input","ContentChild","Header","Footer","ContentChildren","PrimeTemplate","ViewChild","Output","NgModule","imports","CommonModule","FocusTrapModule","RippleModule","exports","SharedModule","declarations"],"mappings":"usBASA,IAAIA,EAAc,EAEZC,EAAgBC,EAAAA,UAAU,CAC5BC,EAAAA,MAAM,CAAEC,UAAW,gBAAiBC,QAAS,IAC7CC,EAAAA,QAAQ,oBAGNC,EAAgBL,EAAAA,UAAU,CAC5BI,EAAAA,QAAQ,iBAAkBH,EAAAA,MAAM,CAAEC,UAAW,gBAAiBC,QAAS,oBAwOvE,SAAAG,EAAmBC,EAAuBC,EAA4BC,EAAsBC,GAAzEC,KAAAJ,GAAAA,EAAuBI,KAAAH,SAAAA,EAA4BG,KAAAF,KAAAA,EAAsBE,KAAAD,GAAAA,EAxKnFC,KAAAC,WAAqB,EAErBD,KAAAE,WAAqB,EAwBrBF,KAAAG,eAAyB,EAMzBH,KAAAI,UAAoB,EAgBpBJ,KAAAK,YAAsB,EAUtBL,KAAAM,aAAuB,EAEvBN,KAAAO,YAAsB,EAEtBP,KAAAQ,WAAqB,EAErBR,KAAAS,KAAe,EAEfT,KAAAU,KAAe,EAEfV,KAAAW,aAAuB,EAIvBX,KAAAY,gBAA0B,EAE1BZ,KAAAa,WAAqB,EAErBb,KAAAc,kBAA4B,mCAE5Bd,KAAAe,UAAoB,cAEpBf,KAAAgB,aAAuB,wBAEvBhB,KAAAiB,aAAuB,wBActBjB,KAAAkB,OAA4B,IAAIC,EAAAA,aAEhCnB,KAAAoB,OAA4B,IAAID,EAAAA,aAEhCnB,KAAAqB,cAAkC,IAAIF,EAAAA,aAEtCnB,KAAAsB,aAAkC,IAAIH,EAAAA,aAEtCnB,KAAAuB,YAAiC,IAAIJ,EAAAA,aAErCnB,KAAAwB,UAA+B,IAAIL,EAAAA,aAEnCnB,KAAAyB,WAAgC,IAAIN,EA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6M,EAAAA,cACjBC,aAAc,CAAC9M","sourcesContent":["import {NgModule,Component,ElementRef,OnDestroy,Input,Output,EventEmitter,Renderer2,\n ContentChildren,QueryList,ViewChild,NgZone, ChangeDetectorRef,ViewRef,ChangeDetectionStrategy, ViewEncapsulation, AfterContentInit, TemplateRef, ContentChild} from '@angular/core';\nimport {trigger,style,transition,animate, AnimationEvent, animation, useAnimation} from '@angular/animations';\nimport {CommonModule} from '@angular/common';\nimport {DomHandler} from 'primeng/dom';\nimport {Header,Footer,SharedModule, PrimeTemplate} from 'primeng/api';\nimport {FocusTrapModule} from 'primeng/focustrap';\nimport {RippleModule} from 'primeng/ripple';\n\nlet idx: number = 0;\n\nconst showAnimation = animation([\n style({ transform: '{{transform}}', opacity: 0 }),\n animate('{{transition}}')\n]);\n\nconst hideAnimation = animation([\n animate('{{transition}}', style({ transform: '{{transform}}', opacity: 0 }))\n]);\n\n@Component({\n selector: 'p-dialog',\n template: `\n <div *ngIf=\"maskVisible\" [class]=\"maskStyleClass\"\n [ngClass]=\"{'p-dialog-mask': true, 'p-component-overlay': this.modal, '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 <div #container [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\" [class]=\"styleClass\" *ngIf=\"visible\" pFocusTrap [pFocusTrapDisabled]=\"focusTrap === false\"\n [@animation]=\"{value: 'visible', params: {transform: transformOptions, transition: transitionOptions}}\" (@animation.start)=\"onAnimationStart($event)\" (@animation.done)=\"onAnimationEnd($event)\" role=\"dialog\" [attr.aria-labelledby]=\"id + '-label'\">\n <div #titlebar class=\"p-dialog-header\" (mousedown)=\"initDrag($event)\" *ngIf=\"showHeader\">\n <span [attr.id]=\"id + '-label'\" class=\"p-dialog-title\" *ngIf=\"header\">{{header}}</span>\n <span [attr.id]=\"id + '-label'\" 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 *ngIf=\"maximizable\" type=\"button\" [ngClass]=\"{'p-dialog-header-icon p-dialog-header-maximize p-link':true}\" (click)=\"maximize()\" (keydown.enter)=\"maximize()\" tabindex=\"-1\" pRipple>\n <span class=\"p-dialog-header-maximize-icon\" [ngClass]=\"maximized ? minimizeIcon : maximizeIcon\"></span>\n </button>\n <button *ngIf=\"closable\" type=\"button\" [ngClass]=\"{'p-dialog-header-icon p-dialog-header-close p-link':true}\" (click)=\"close($event)\" (keydown.enter)=\"close($event)\" tabindex=\"-1\" pRipple>\n <span class=\"p-dialog-header-close-icon\" [ngClass]=\"closeIcon\"></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 <div *ngIf=\"resizable\" class=\"p-resizable-handle\" style=\"z-index: 90;\" (mousedown)=\"initResize($event)\"></div>\n </div>\n </div>\n `,\n animations: [\n trigger('animation', [\n transition('void => visible', [\n useAnimation(showAnimation)\n ]),\n transition('visible => void', [\n useAnimation(hideAnimation)\n ])\n ])\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['../dialog/dialog.css']\n})\nexport class Dialog implements AfterContentInit,OnDestroy {\n\n @Input() header: string;\n\n @Input() draggable: boolean = true;\n\n @Input() resizable: boolean = true;\n\n @Input() get positionLeft(): number {\n return 0;\n };\n\n set positionLeft(_positionLeft: number) {\n console.log(\"positionLeft property is deprecated.\");\n }\n\n @Input() get positionTop(): number {\n return 0;\n };\n\n set positionTop(_positionTop: number) {\n console.log(\"positionTop property is deprecated.\");\n }\n\n @Input() contentStyle: any;\n\n @Input() contentStyleClass: string;\n\n @Input() modal: boolean;\n\n @Input() closeOnEscape: boolean = true;\n\n @Input() dismissableMask: boolean;\n\n @Input() rtl: boolean;\n\n @Input() closable: boolean = true;\n\n @Input() get responsive(): boolean {\n return false;\n };\n\n set responsive(_responsive: boolean) {\n console.log(\"Responsive property is deprecated.\");\n }\n\n @Input() appendTo: any;\n\n @Input() styleClass: string;\n\n @Input() maskStyleClass: string;\n\n @Input() showHeader: boolean = true;\n\n @Input() get breakpoint(): number {\n return 649;\n };\n\n set breakpoint(_breakpoint: number) {\n console.log(\"Breakpoint property is not utilized and deprecated, use CSS media queries instead.\");\n }\n\n @Input() blockScroll: boolean = false;\n\n @Input() autoZIndex: boolean = true;\n\n @Input() baseZIndex: number = 0;\n\n @Input() minX: number = 0;\n\n @Input() minY: number = 0;\n\n @Input() focusOnShow: boolean = true;\n\n @Input() maximizable: boolean;\n\n @Input() keepInViewport: boolean = true;\n\n @Input() focusTrap: boolean = true;\n\n @Input() transitionOptions: string = '150ms cubic-bezier(0, 0, 0.2, 1)';\n\n @Input() closeIcon: string = 'pi pi-times';\n\n @Input() minimizeIcon: string = 'pi pi-window-minimize';\n\n @Input() maximizeIcon: string = 'pi pi-window-maximize';\n\n @ContentChild(Header) headerFacet: QueryList<Header>;\n\n @ContentChild(Footer) footerFacet: QueryList<Footer>;\n\n @ContentChildren(PrimeTemplate) templates: QueryList<any>;\n\n @ViewChild('titlebar') headerViewChild: ElementRef;\n\n @ViewChild('content') contentViewChild: ElementRef;\n\n @ViewChild('footer') footerViewChild: ElementRef;\n\n @Output() onShow: EventEmitter<any> = new EventEmitter();\n\n @Output() onHide: EventEmitter<any> = new EventEmitter();\n\n @Output() visibleChange:EventEmitter<any> = new EventEmitter();\n\n @Output() onResizeInit: EventEmitter<any> = new EventEmitter();\n\n @Output() onResizeEnd: EventEmitter<any> = new EventEmitter();\n\n @Output() onDragEnd: EventEmitter<any> = new EventEmitter();\n\n @Output() onMaximize: EventEmitter<any> = new EventEmitter();\n\n headerTemplate: TemplateRef<any>;\n\n contentTemplate: TemplateRef<any>;\n\n footerTemplate: TemplateRef<any>;\n\n _visible: boolean;\n\n maskVisible: boolean;\n\n container: HTMLDivElement;\n\n wrapper: HTMLElement;\n\n dragging: boolean;\n\n documentDragListener: any;\n\n documentDragEndListener: any;\n\n resizing: boolean;\n\n documentResizeListener: any;\n\n documentResizeEndListener: any;\n\n documentEscapeListener: Function;\n\n maskClickListener: Function;\n\n lastPageX: number;\n\n lastPageY: number;\n\n preventVisibleChangePropagation: boolean;\n\n maximized: boolean;\n\n preMaximizeContentHeight: number;\n\n preMaximizeContainerWidth: number;\n\n preMaximizeContainerHeight: number;\n\n preMaximizePageX: number;\n\n preMaximizePageY: number;\n\n id: string = `p-dialog-${idx++}`;\n\n _style: any = {};\n\n _position: string = \"center\";\n\n originalStyle: any;\n\n transformOptions: any = \"scale(0.7)\";\n\n constructor(public el: ElementRef, public renderer: Renderer2, public zone: NgZone, private cd: ChangeDetectorRef) { }\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 default:\n this.contentTemplate = item.template;\n break;\n }\n });\n }\n\n @Input() get visible(): any {\n return this._visible;\n }\n set visible(value:any) {\n this._visible = value;\n\n if (this._visible && !this.maskVisible) {\n this.maskVisible = true;\n }\n }\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 @Input() get position(): string {\n return this._position;\n };\n\n set position(value: string) {\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 focus() {\n let focusable = DomHandler.findSingle(this.container, '[autofocus]');\n if (focusable) {\n this.zone.runOutsideAngular(() => {\n setTimeout(() => focusable.focus(), 5);\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 DomHandler.addClass(document.body, 'p-overflow-hidden');\n }\n }\n\n disableModality() {\n if (this.wrapper) {\n if (this.dismissableMask) {\n this.unbindMaskClickListener();\n }\n\n if (this.modal) {\n DomHandler.removeClass(document.body, 'p-overflow-hidden');\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.addClass(document.body, 'p-overflow-hidden');\n else\n DomHandler.removeClass(document.body, 'p-overflow-hidden');\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 this.container.style.zIndex = String(this.baseZIndex + (++DomHandler.zindex));\n this.wrapper.style.zIndex = String(this.baseZIndex + (DomHandler.zindex - 1));\n }\n }\n\n initDrag(event: MouseEvent) {\n if (DomHandler.hasClass(event.target, 'p-dialog-header-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.style.margin = '0';\n DomHandler.addClass(document.body, 'p-unselectable-text');\n }\n }\n\n onKeydown(event: KeyboardEvent) {\n if (this.focusTrap) {\n if (event.which === 9) {\n event.preventDefault();\n\n let focusableElements = DomHandler.getFocusableElements(this.container);\n\n if (focusableElements && focusableElements.length > 0) {\n if (!focusableElements[0].ownerDocument.activeElement) {\n focusableElements[0].focus();\n }\n else {\n let focusedIndex = focusableElements.indexOf(focusableElements[0].ownerDocument.activeElement);\n\n if (event.shiftKey) {\n if (focusedIndex == -1 || focusedIndex === 0)\n focusableElements[focusableElements.length - 1].focus();\n else\n focusableElements[focusedIndex - 1].focus();\n }\n else {\n if (focusedIndex == -1 || focusedIndex === (focusableElements.length - 1))\n focusableElements[0].focus();\n else\n focusableElements[focusedIndex + 1].focus();\n }\n }\n }\n }\n }\n }\n\n onDrag(event: MouseEvent) {\n if (this.dragging) {\n let containerWidth = DomHandler.getOuterWidth(this.container);\n let containerHeight = DomHandler.getOuterHeight(this.container);\n let deltaX = event.pageX - this.lastPageX;\n let deltaY = event.pageY - this.lastPageY;\n let offset = DomHandler.getOffset(this.container);\n let leftPos = offset.left + deltaX;\n let topPos = offset.top + deltaY;\n let 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 }\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: MouseEvent) {\n if (this.dragging) {\n this.dragging = false;\n DomHandler.removeClass(document.body, 'p-unselectable-text');\n this.cd.detectChanges();\n this.onDragEnd.emit(event);\n }\n }\n\n resetPosition() {\n this.container.style.position = '';\n this.container.style.left = '';\n this.container.style.top = '';\n this.container.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(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;\n let deltaY = event.pageY - this.lastPageY;\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.style.minWidth;\n let minHeight = this.container.style.minHeight;\n let offset = DomHandler.getOffset(this.container);\n let viewport = DomHandler.getViewport();\n let hasBeenDragged = !parseInt(this.container.style.top) || !parseInt(this.container.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.style.width = this._style.width;\n }\n\n if ((!minHeight || newHeight > parseInt(minHeight)) && (offset.top + newHeight) < viewport.height) {\n this.contentViewChild.nativeElement.style.height = contentHeight + newHeight - containerHeight + 'px';\n\n if (this._style.height) {\n this._style.height = newHeight + 'px';\n this.container.style.height = this._style.height;\n }\n }\n\n this.lastPageX = event.pageX;\n this.lastPageY = event.pageY;\n }\n }\n\n resizeEnd(event) {\n if (this.resizing) {\n this.resizing = false;\n DomHandler.removeClass(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 this.zone.runOutsideAngular(() => {\n this.documentDragListener = this.onDrag.bind(this);\n window.document.addEventListener('mousemove', this.documentDragListener);\n });\n }\n\n unbindDocumentDragListener() {\n if (this.documentDragListener) {\n window.document.removeEventListener('mousemove', this.documentDragListener);\n this.documentDragListener = null;\n }\n }\n\n bindDocumentDragEndListener() {\n this.zone.runOutsideAngular(() => {\n this.documentDragEndListener = this.endDrag.bind(this);\n window.document.addEventListener('mouseup', this.documentDragEndListener);\n });\n }\n\n unbindDocumentDragEndListener() {\n if (this.documentDragEndListener) {\n window.document.removeEventListener('mouseup', this.documentDragEndListener);\n this.documentDragEndListener = null;\n }\n }\n\n bindDocumentResizeListeners() {\n this.zone.runOutsideAngular(() => {\n this.documentResizeListener = this.onResize.bind(this);\n this.documentResizeEndListener = this.resizeEnd.bind(this);\n window.document.addEventListener('mousemove', this.documentResizeListener);\n window.document.addEventListener('mouseup', this.documentResizeEndListener);\n });\n }\n\n unbindDocumentResizeListeners() {\n if (this.documentResizeListener && this.documentResizeEndListener) {\n window.document.removeEventListener('mousemove', this.documentResizeListener);\n window.document.removeEventListener('mouseup', 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.which == 27) {\n if (parseInt(this.container.style.zIndex) === (DomHandler.zindex + this.baseZIndex)) {\n this.close(event);\n }\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')\n document.body.appendChild(this.wrapper);\n else\n DomHandler.appendChild(this.wrapper, this.appendTo);\n }\n }\n\n restoreAppend() {\n if (this.container && this.appendTo) {\n this.el.nativeElement.appendChild(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\n if (this.modal) {\n this.enableModality();\n }\n\n if (!this.modal && this.blockScroll) {\n DomHandler.addClass(document.body, 'p-overflow-hidden');\n }\n\n if (this.focusOnShow) {\n this.focus();\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 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(document.body, 'p-overflow-hidden');\n this.maximized = false;\n }\n\n if (this.modal) {\n this.disableModality();\n }\n\n if (this.blockScroll) {\n DomHandler.removeClass(document.body, 'p-overflow-hidden');\n }\n\n this.container = null;\n this.wrapper = null;\n\n this._style = this.originalStyle ? {...this.originalStyle} : {};\n }\n\n ngOnDestroy() {\n if (this.container) {\n this.restoreAppend();\n this.onContainerDestroy();\n }\n }\n\n}\n\n@NgModule({\n imports: [CommonModule,FocusTrapModule,RippleModule],\n exports: [Dialog,SharedModule],\n declarations: [Dialog]\n})\nexport class DialogModule { }\n"]}
1
+ {"version":3,"sources":["../../src/app/components/dialog/dialog.ts"],"names":["idx","showAnimation","animation","style","transform","opacity","animate","hideAnimation","Dialog","el","renderer","zone","cd","this","draggable","resizable","closeOnEscape","closable","showHeader","blockScroll","autoZIndex","baseZIndex","minX","minY","focusOnShow","keepInViewport","focusTrap","transitionOptions","closeIcon","minimizeIcon","maximizeIcon","onShow","EventEmitter","onHide","visibleChange","onResizeInit","onResizeEnd","onDragEnd","onMaximize","id","_style","_position","transformOptions","Object","defineProperty","prototype","_positionLeft","console","log","_positionTop","_responsive","_breakpoint","ngAfterContentInit","_this","templates","forEach","item","getType","headerTemplate","template","contentTemplate","footerTemplate","_visible","value","maskVisible","assign","originalStyle","focus","focusable","DomHandler","findSingle","container","runOutsideAngular","setTimeout","close","event","emit","preventDefault","enableModality","dismissableMask","maskClickListener","listen","wrapper","isSameNode","target","modal","addClass","document","body","disableModality","unbindMaskClickListener","removeClass","destroyed","detectChanges","maximize","maximized","moveOnTop","zIndex","String","zindex","initDrag","hasClass","parentElement","dragging","lastPageX","pageX","lastPageY","pageY","margin","onKeydown","which","focusableElements","getFocusableElements","length","ownerDocument","activeElement","focusedIndex","indexOf","shiftKey","onDrag","containerWidth","getOuterWidth","containerHeight","getOuterHeight","deltaX","deltaY","offset","getOffset","leftPos","left","topPos","top","viewport","getViewport","position","width","height","endDrag","resetPosition","center","initResize","resizing","onResize","contentHeight","contentViewChild","nativeElement","newWidth","newHeight","minWidth","minHeight","parseInt","resizeEnd","bindGlobalListeners","bindDocumentDragListener","bindDocumentDragEndListener","bindDocumentResizeListeners","bindDocumentEscapeListener","unbindGlobalListeners","unbindDocumentDragListener","unbindDocumentDragEndListener","unbindDocumentResizeListeners","unbindDocumentEscapeListener","documentDragListener","bind","window","addEventListener","removeEventListener","documentDragEndListener","documentResizeListener","documentResizeEndListener","documentTarget","documentEscapeListener","appendContainer","appendTo","appendChild","restoreAppend","onAnimationStart","toState","element","onAnimationEnd","onContainerDestroy","ngOnDestroy","Component","args","selector","animations","trigger","transition","useAnimation","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","ElementRef","Renderer2","NgZone","ChangeDetectorRef","Input","ContentChild","Header","Footer","ContentChildren","PrimeTemplate","ViewChild","Output","NgModule","imports","CommonModule","FocusTrapModule","RippleModule","exports","SharedModule","declarations"],"mappings":"usBASA,IAAIA,EAAc,EAEZC,EAAgBC,EAAAA,UAAU,CAC5BC,EAAAA,MAAM,CAAEC,UAAW,gBAAiBC,QAAS,IAC7CC,EAAAA,QAAQ,oBAGNC,EAAgBL,EAAAA,UAAU,CAC5BI,EAAAA,QAAQ,iBAAkBH,EAAAA,MAAM,CAAEC,UAAW,gBAAiBC,QAAS,oBAwOvE,SAAAG,EAAmBC,EAAuBC,EAA4BC,EAAsBC,GAAzEC,KAAAJ,GAAAA,EAAuBI,KAAAH,SAAAA,EAA4BG,KAAAF,KAAAA,EAAsBE,KAAAD,GAAAA,EAxKnFC,KAAAC,WAAqB,EAErBD,KAAAE,WAAqB,EAwBrBF,KAAAG,eAAyB,EAMzBH,KAAAI,UAAoB,EAgBpBJ,KAAAK,YAAsB,EAUtBL,KAAAM,aAAuB,EAEvBN,KAAAO,YAAsB,EAEtBP,KAAAQ,WAAqB,EAErBR,KAAAS,KAAe,EAEfT,KAAAU,KAAe,EAEfV,KAAAW,aAAuB,EAIvBX,KAAAY,gBAA0B,EAE1BZ,KAAAa,WAAqB,EAErBb,KAAAc,kBAA4B,mCAE5Bd,KAAAe,UAAoB,cAEpBf,KAAAgB,aAAuB,wBAEvBhB,KAAAiB,aAAuB,wBActBjB,KAAAkB,OAA4B,IAAIC,EAAAA,aAEhCnB,KAAAoB,OAA4B,IAAID,EAAAA,aAEhCnB,KAAAqB,cAAkC,IAAIF,EAAAA,aAE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EAAAA,wBAUAA,EAAAA,eAsbL,iCALCQ,EAAAA,SAAQxB,KAAA,CAAC,CACNyB,QAAS,CAACC,EAAAA,aAAaC,EAAAA,gBAAgBC,EAAAA,cACvCC,QAAS,CAAC5M,EAAO6M,EAAAA,cACjBC,aAAc,CAAC9M","sourcesContent":["import {NgModule,Component,ElementRef,OnDestroy,Input,Output,EventEmitter,Renderer2,\n ContentChildren,QueryList,ViewChild,NgZone, ChangeDetectorRef,ViewRef,ChangeDetectionStrategy, ViewEncapsulation, AfterContentInit, TemplateRef, ContentChild} from '@angular/core';\nimport {trigger,style,transition,animate, AnimationEvent, animation, useAnimation} from '@angular/animations';\nimport {CommonModule} from '@angular/common';\nimport {DomHandler} from 'primeng/dom';\nimport {Header,Footer,SharedModule, PrimeTemplate} from 'primeng/api';\nimport {FocusTrapModule} from 'primeng/focustrap';\nimport {RippleModule} from 'primeng/ripple';\n\nlet idx: number = 0;\n\nconst showAnimation = animation([\n style({ transform: '{{transform}}', opacity: 0 }),\n animate('{{transition}}')\n]);\n\nconst hideAnimation = animation([\n animate('{{transition}}', style({ transform: '{{transform}}', opacity: 0 }))\n]);\n\n@Component({\n selector: 'p-dialog',\n template: `\n <div *ngIf=\"maskVisible\" [class]=\"maskStyleClass\"\n [ngClass]=\"{'p-dialog-mask': true, 'p-component-overlay': this.modal, '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 <div #container [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\" [class]=\"styleClass\" *ngIf=\"visible\" pFocusTrap [pFocusTrapDisabled]=\"focusTrap === false\"\n [@animation]=\"{value: 'visible', params: {transform: transformOptions, transition: transitionOptions}}\" (@animation.start)=\"onAnimationStart($event)\" (@animation.done)=\"onAnimationEnd($event)\" role=\"dialog\" [attr.aria-labelledby]=\"id + '-label'\">\n <div #titlebar class=\"p-dialog-header\" (mousedown)=\"initDrag($event)\" *ngIf=\"showHeader\">\n <span [attr.id]=\"id + '-label'\" class=\"p-dialog-title\" *ngIf=\"header\">{{header}}</span>\n <span [attr.id]=\"id + '-label'\" 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 *ngIf=\"maximizable\" type=\"button\" [ngClass]=\"{'p-dialog-header-icon p-dialog-header-maximize p-link':true}\" (click)=\"maximize()\" (keydown.enter)=\"maximize()\" tabindex=\"-1\" pRipple>\n <span class=\"p-dialog-header-maximize-icon\" [ngClass]=\"maximized ? minimizeIcon : maximizeIcon\"></span>\n </button>\n <button *ngIf=\"closable\" type=\"button\" [ngClass]=\"{'p-dialog-header-icon p-dialog-header-close p-link':true}\" (click)=\"close($event)\" (keydown.enter)=\"close($event)\" tabindex=\"-1\" pRipple>\n <span class=\"p-dialog-header-close-icon\" [ngClass]=\"closeIcon\"></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 <div *ngIf=\"resizable\" class=\"p-resizable-handle\" style=\"z-index: 90;\" (mousedown)=\"initResize($event)\"></div>\n </div>\n </div>\n `,\n animations: [\n trigger('animation', [\n transition('void => visible', [\n useAnimation(showAnimation)\n ]),\n transition('visible => void', [\n useAnimation(hideAnimation)\n ])\n ])\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['../dialog/dialog.css']\n})\nexport class Dialog implements AfterContentInit,OnDestroy {\n\n @Input() header: string;\n\n @Input() draggable: boolean = true;\n\n @Input() resizable: boolean = true;\n\n @Input() get positionLeft(): number {\n return 0;\n };\n\n set positionLeft(_positionLeft: number) {\n console.log(\"positionLeft property is deprecated.\");\n }\n\n @Input() get positionTop(): number {\n return 0;\n };\n\n set positionTop(_positionTop: number) {\n console.log(\"positionTop property is deprecated.\");\n }\n\n @Input() contentStyle: any;\n\n @Input() contentStyleClass: string;\n\n @Input() modal: boolean;\n\n @Input() closeOnEscape: boolean = true;\n\n @Input() dismissableMask: boolean;\n\n @Input() rtl: boolean;\n\n @Input() closable: boolean = true;\n\n @Input() get responsive(): boolean {\n return false;\n };\n\n set responsive(_responsive: boolean) {\n console.log(\"Responsive property is deprecated.\");\n }\n\n @Input() appendTo: any;\n\n @Input() styleClass: string;\n\n @Input() maskStyleClass: string;\n\n @Input() showHeader: boolean = true;\n\n @Input() get breakpoint(): number {\n return 649;\n };\n\n set breakpoint(_breakpoint: number) {\n console.log(\"Breakpoint property is not utilized and deprecated, use CSS media queries instead.\");\n }\n\n @Input() blockScroll: boolean = false;\n\n @Input() autoZIndex: boolean = true;\n\n @Input() baseZIndex: number = 0;\n\n @Input() minX: number = 0;\n\n @Input() minY: number = 0;\n\n @Input() focusOnShow: boolean = true;\n\n @Input() maximizable: boolean;\n\n @Input() keepInViewport: boolean = true;\n\n @Input() focusTrap: boolean = true;\n\n @Input() transitionOptions: string = '150ms cubic-bezier(0, 0, 0.2, 1)';\n\n @Input() closeIcon: string = 'pi pi-times';\n\n @Input() minimizeIcon: string = 'pi pi-window-minimize';\n\n @Input() maximizeIcon: string = 'pi pi-window-maximize';\n\n @ContentChild(Header) headerFacet: QueryList<Header>;\n\n @ContentChild(Footer) footerFacet: QueryList<Footer>;\n\n @ContentChildren(PrimeTemplate) templates: QueryList<any>;\n\n @ViewChild('titlebar') headerViewChild: ElementRef;\n\n @ViewChild('content') contentViewChild: ElementRef;\n\n @ViewChild('footer') footerViewChild: ElementRef;\n\n @Output() onShow: EventEmitter<any> = new EventEmitter();\n\n @Output() onHide: EventEmitter<any> = new EventEmitter();\n\n @Output() visibleChange:EventEmitter<any> = new EventEmitter();\n\n @Output() onResizeInit: EventEmitter<any> = new EventEmitter();\n\n @Output() onResizeEnd: EventEmitter<any> = new EventEmitter();\n\n @Output() onDragEnd: EventEmitter<any> = new EventEmitter();\n\n @Output() onMaximize: EventEmitter<any> = new EventEmitter();\n\n headerTemplate: TemplateRef<any>;\n\n contentTemplate: TemplateRef<any>;\n\n footerTemplate: TemplateRef<any>;\n\n _visible: boolean;\n\n maskVisible: boolean;\n\n container: HTMLDivElement;\n\n wrapper: HTMLElement;\n\n dragging: boolean;\n\n documentDragListener: any;\n\n documentDragEndListener: any;\n\n resizing: boolean;\n\n documentResizeListener: any;\n\n documentResizeEndListener: any;\n\n documentEscapeListener: Function;\n\n maskClickListener: Function;\n\n lastPageX: number;\n\n lastPageY: number;\n\n preventVisibleChangePropagation: boolean;\n\n maximized: boolean;\n\n preMaximizeContentHeight: number;\n\n preMaximizeContainerWidth: number;\n\n preMaximizeContainerHeight: number;\n\n preMaximizePageX: number;\n\n preMaximizePageY: number;\n\n id: string = `p-dialog-${idx++}`;\n\n _style: any = {};\n\n _position: string = \"center\";\n\n originalStyle: any;\n\n transformOptions: any = \"scale(0.7)\";\n\n constructor(public el: ElementRef, public renderer: Renderer2, public zone: NgZone, private cd: ChangeDetectorRef) { }\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 default:\n this.contentTemplate = item.template;\n break;\n }\n });\n }\n\n @Input() get visible(): any {\n return this._visible;\n }\n set visible(value:any) {\n this._visible = value;\n\n if (this._visible && !this.maskVisible) {\n this.maskVisible = true;\n }\n }\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 @Input() get position(): string {\n return this._position;\n };\n\n set position(value: string) {\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 focus() {\n let focusable = DomHandler.findSingle(this.container, '[autofocus]');\n if (focusable) {\n this.zone.runOutsideAngular(() => {\n setTimeout(() => focusable.focus(), 5);\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 DomHandler.addClass(document.body, 'p-overflow-hidden');\n }\n }\n\n disableModality() {\n if (this.wrapper) {\n if (this.dismissableMask) {\n this.unbindMaskClickListener();\n }\n\n if (this.modal) {\n DomHandler.removeClass(document.body, 'p-overflow-hidden');\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.addClass(document.body, 'p-overflow-hidden');\n else\n DomHandler.removeClass(document.body, 'p-overflow-hidden');\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 this.container.style.zIndex = String(this.baseZIndex + (++DomHandler.zindex));\n this.wrapper.style.zIndex = String(this.baseZIndex + (DomHandler.zindex - 1));\n }\n }\n\n initDrag(event: MouseEvent) {\n if (DomHandler.hasClass(event.target, 'p-dialog-header-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.style.margin = '0';\n DomHandler.addClass(document.body, 'p-unselectable-text');\n }\n }\n\n onKeydown(event: KeyboardEvent) {\n if (this.focusTrap) {\n if (event.which === 9) {\n event.preventDefault();\n\n let focusableElements = DomHandler.getFocusableElements(this.container);\n\n if (focusableElements && focusableElements.length > 0) {\n if (!focusableElements[0].ownerDocument.activeElement) {\n focusableElements[0].focus();\n }\n else {\n let focusedIndex = focusableElements.indexOf(focusableElements[0].ownerDocument.activeElement);\n\n if (event.shiftKey) {\n if (focusedIndex == -1 || focusedIndex === 0)\n focusableElements[focusableElements.length - 1].focus();\n else\n focusableElements[focusedIndex - 1].focus();\n }\n else {\n if (focusedIndex == -1 || focusedIndex === (focusableElements.length - 1))\n focusableElements[0].focus();\n else\n focusableElements[focusedIndex + 1].focus();\n }\n }\n }\n }\n }\n }\n\n onDrag(event: MouseEvent) {\n if (this.dragging) {\n let containerWidth = DomHandler.getOuterWidth(this.container);\n let containerHeight = DomHandler.getOuterHeight(this.container);\n let deltaX = event.pageX - this.lastPageX;\n let deltaY = event.pageY - this.lastPageY;\n let offset = DomHandler.getOffset(this.container);\n let leftPos = offset.left + deltaX;\n let topPos = offset.top + deltaY;\n let 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 }\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: MouseEvent) {\n if (this.dragging) {\n this.dragging = false;\n DomHandler.removeClass(document.body, 'p-unselectable-text');\n this.cd.detectChanges();\n this.onDragEnd.emit(event);\n }\n }\n\n resetPosition() {\n this.container.style.position = '';\n this.container.style.left = '';\n this.container.style.top = '';\n this.container.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(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;\n let deltaY = event.pageY - this.lastPageY;\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.style.minWidth;\n let minHeight = this.container.style.minHeight;\n let offset = DomHandler.getOffset(this.container);\n let viewport = DomHandler.getViewport();\n let hasBeenDragged = !parseInt(this.container.style.top) || !parseInt(this.container.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.style.width = this._style.width;\n }\n\n if ((!minHeight || newHeight > parseInt(minHeight)) && (offset.top + newHeight) < viewport.height) {\n this.contentViewChild.nativeElement.style.height = contentHeight + newHeight - containerHeight + 'px';\n\n if (this._style.height) {\n this._style.height = newHeight + 'px';\n this.container.style.height = this._style.height;\n }\n }\n\n this.lastPageX = event.pageX;\n this.lastPageY = event.pageY;\n }\n }\n\n resizeEnd(event) {\n if (this.resizing) {\n this.resizing = false;\n DomHandler.removeClass(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 this.zone.runOutsideAngular(() => {\n this.documentDragListener = this.onDrag.bind(this);\n window.document.addEventListener('mousemove', this.documentDragListener);\n });\n }\n\n unbindDocumentDragListener() {\n if (this.documentDragListener) {\n window.document.removeEventListener('mousemove', this.documentDragListener);\n this.documentDragListener = null;\n }\n }\n\n bindDocumentDragEndListener() {\n this.zone.runOutsideAngular(() => {\n this.documentDragEndListener = this.endDrag.bind(this);\n window.document.addEventListener('mouseup', this.documentDragEndListener);\n });\n }\n\n unbindDocumentDragEndListener() {\n if (this.documentDragEndListener) {\n window.document.removeEventListener('mouseup', this.documentDragEndListener);\n this.documentDragEndListener = null;\n }\n }\n\n bindDocumentResizeListeners() {\n this.zone.runOutsideAngular(() => {\n this.documentResizeListener = this.onResize.bind(this);\n this.documentResizeEndListener = this.resizeEnd.bind(this);\n window.document.addEventListener('mousemove', this.documentResizeListener);\n window.document.addEventListener('mouseup', this.documentResizeEndListener);\n });\n }\n\n unbindDocumentResizeListeners() {\n if (this.documentResizeListener && this.documentResizeEndListener) {\n window.document.removeEventListener('mousemove', this.documentResizeListener);\n window.document.removeEventListener('mouseup', 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.which == 27) {\n if (parseInt(this.container.style.zIndex) === (DomHandler.zindex + this.baseZIndex)) {\n this.close(event);\n }\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')\n document.body.appendChild(this.wrapper);\n else\n DomHandler.appendChild(this.wrapper, this.appendTo);\n }\n }\n\n restoreAppend() {\n if (this.container && this.appendTo) {\n this.el.nativeElement.appendChild(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\n if (this.modal) {\n this.enableModality();\n }\n\n if (!this.modal && this.blockScroll) {\n DomHandler.addClass(document.body, 'p-overflow-hidden');\n }\n\n if (this.focusOnShow) {\n this.focus();\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 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(document.body, 'p-overflow-hidden');\n this.maximized = false;\n }\n\n if (this.modal) {\n this.disableModality();\n }\n\n if (this.blockScroll) {\n DomHandler.removeClass(document.body, 'p-overflow-hidden');\n }\n\n this.container = null;\n this.wrapper = null;\n\n this._style = this.originalStyle ? {...this.originalStyle} : {};\n }\n\n ngOnDestroy() {\n if (this.container) {\n this.restoreAppend();\n this.onContainerDestroy();\n }\n }\n\n}\n\n@NgModule({\n imports: [CommonModule,FocusTrapModule,RippleModule],\n exports: [Dialog,SharedModule],\n declarations: [Dialog]\n})\nexport class DialogModule { }\n"]}
@@ -244,7 +244,7 @@
244
244
  ],
245
245
  changeDetection: core.ChangeDetectionStrategy.Default,
246
246
  encapsulation: core.ViewEncapsulation.None,
247
- styles: [".p-dialog-mask{align-items:center;background-color:transparent;display:flex;height:100%;justify-content:center;left:0;pointer-events:none;position:fixed;top:0;transition-property:background-color;width:100%}.p-dialog,.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;max-height:90%;position:relative;transform:scale(1)}.p-dialog-content{overflow-y:auto}.p-dialog-header{align-items:center;display:flex;flex-shrink:0;justify-content:space-between}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{align-items:center;display:flex}.p-dialog .p-dialog-header-icon{align-items:center;display:flex;justify-content:center;overflow:hidden;position:relative}.p-dialog-mask.p-dialog-mask-leave{background-color:transparent}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-top .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{height:100%;max-height:100%;transform:none;transition:none;width:100vw!important}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top,.p-dialog-top-left{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start}.p-dialog-top-right{align-items:flex-start;justify-content:flex-end}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{align-items:flex-end;justify-content:flex-start}.p-dialog-bottom-right{align-items:flex-end;justify-content:flex-end}.p-dialog .p-resizable-handle{bottom:1px;cursor:se-resize;display:block;font-size:.1px;height:12px;position:absolute;right:1px;width:12px}.p-confirm-dialog .p-dialog-content{align-items:center;display:flex}"]
247
+ styles: [".p-dialog-mask{align-items:center;background-color:transparent;display:flex;height:100%;justify-content:center;left:0;pointer-events:none;position:fixed;top:0;transition-property:background-color;width:100%}.p-dialog,.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;max-height:90%;position:relative;transform:scale(1)}.p-dialog-content{overflow-y:auto}.p-dialog-header{align-items:center;display:flex;flex-shrink:0;justify-content:space-between}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{align-items:center;display:flex}.p-dialog .p-dialog-header-icon{align-items:center;display:flex;justify-content:center;overflow:hidden;position:relative}.p-dialog-mask.p-dialog-mask-leave{background-color:transparent}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-top .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{height:100%;left:0!important;max-height:100%;top:0!important;transform:none;transition:none;width:100vw!important}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top,.p-dialog-top-left{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start}.p-dialog-top-right{align-items:flex-start;justify-content:flex-end}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{align-items:flex-end;justify-content:flex-start}.p-dialog-bottom-right{align-items:flex-end;justify-content:flex-end}.p-dialog .p-resizable-handle{bottom:1px;cursor:se-resize;display:block;font-size:.1px;height:12px;position:absolute;right:1px;width:12px}.p-confirm-dialog .p-dialog-content{align-items:center;display:flex}"]
248
248
  },] }
249
249
  ];
250
250
  DynamicDialogComponent.ctorParameters = function () { return [
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/animations"),require("@angular/common"),require("primeng/dom"),require("rxjs")):"function"==typeof define&&define.amd?define("primeng/dynamicdialog",["exports","@angular/core","@angular/animations","@angular/common","primeng/dom","rxjs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).primeng=e.primeng||{},e.primeng.dynamicdialog={}),e.ng.core,e.ng.animations,e.ng.common,e.primeng.dom,e.rxjs)}(this,(function(e,t,n,o,i,a){"use strict";var s=function(e){this.viewContainerRef=e};s.decorators=[{type:t.Directive,args:[{selector:"[pDynamicDialogContent]"}]}],s.ctorParameters=function(){return[{type:t.ViewContainerRef}]};var r=function(){},l=function(){function e(){this._onClose=new a.Subject,this.onClose=this._onClose.asObservable(),this._onDestroy=new a.Subject,this.onDestroy=this._onDestroy.asObservable()}return e.prototype.close=function(e){this._onClose.next(e)},e.prototype.destroy=function(){this._onDestroy.next()},e}(),d=n.animation([n.style({transform:"{{transform}}",opacity:0}),n.animate("{{transition}}",n.style({transform:"none",opacity:1}))]),c=n.animation([n.animate("{{transition}}",n.style({transform:"{{transform}}",opacity:0}))]),p=function(){function e(e,t,n,o,i,a){this.componentFactoryResolver=e,this.cd=t,this.renderer=n,this.config=o,this.dialogRef=i,this.zone=a,this.visible=!0,this.transformOptions="scale(0.7)"}return e.prototype.ngAfterViewInit=function(){this.loadChildComponent(this.childComponentType),this.cd.detectChanges()},e.prototype.loadChildComponent=function(e){var t=this.componentFactoryResolver.resolveComponentFactory(e),n=this.insertionPoint.viewContainerRef;n.clear(),this.componentRef=n.createComponent(t)},e.prototype.moveOnTop=function(){if(!1!==this.config.autoZIndex){var e=(this.config.baseZIndex||0)+ ++i.DomHandler.zindex;this.container.style.zIndex=String(e),this.maskViewChild.nativeElement.style.zIndex=String(e-1)}},e.prototype.onAnimationStart=function(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container.parentElement,this.moveOnTop(),this.bindGlobalListeners(),!1!==this.config.modal&&this.enableModality(),this.focus();break;case"void":this.onContainerDestroy()}},e.prototype.onAnimationEnd=function(e){"void"===e.toState&&this.dialogRef.destroy()},e.prototype.onContainerDestroy=function(){this.unbindGlobalListeners(),!1!==this.config.modal&&this.disableModality(),this.container=null},e.prototype.close=function(){this.visible=!1,this.cd.markForCheck()},e.prototype.hide=function(){this.dialogRef&&this.dialogRef.close()},e.prototype.enableModality=function(){var e=this;!1!==this.config.closable&&this.config.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",(function(t){e.wrapper&&e.wrapper.isSameNode(t.target)&&e.hide()}))),!1!==this.config.modal&&i.DomHandler.addClass(document.body,"p-overflow-hidden")},e.prototype.disableModality=function(){this.wrapper&&(this.config.dismissableMask&&this.unbindMaskClickListener(),!1!==this.config.modal&&i.DomHandler.removeClass(document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())},e.prototype.onKeydown=function(e){if(9===e.which){e.preventDefault();var t=i.DomHandler.getFocusableElements(this.container);if(t&&t.length>0)if(t[0].ownerDocument.activeElement){var n=t.indexOf(t[0].ownerDocument.activeElement);e.shiftKey?-1==n||0===n?t[t.length-1].focus():t[n-1].focus():-1==n||n===t.length-1?t[0].focus():t[n+1].focus()}else t[0].focus()}},e.prototype.focus=function(){var e=i.DomHandler.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular((function(){setTimeout((function(){return e.focus()}),5)}))},e.prototype.bindGlobalListeners=function(){this.bindDocumentKeydownListener(),!1!==this.config.closeOnEscape&&!1!==this.config.closable&&this.bindDocumentEscapeListener()},e.prototype.unbindGlobalListeners=function(){this.unbindDocumentKeydownListener(),this.unbindDocumentEscapeListener()},e.prototype.bindDocumentKeydownListener=function(){var e=this;this.zone.runOutsideAngular((function(){e.documentKeydownListener=e.onKeydown.bind(e),window.document.addEventListener("keydown",e.documentKeydownListener)}))},e.prototype.unbindDocumentKeydownListener=function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},e.prototype.bindDocumentEscapeListener=function(){var e=this,t=this.maskViewChild?this.maskViewChild.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(t,"keydown",(function(t){27==t.which&&parseInt(e.container.style.zIndex)==i.DomHandler.zindex+(e.config.baseZIndex?e.config.baseZIndex:0)&&e.hide()}))},e.prototype.unbindDocumentEscapeListener=function(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)},e.prototype.unbindMaskClickListener=function(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)},e.prototype.ngOnDestroy=function(){this.onContainerDestroy(),this.componentRef&&this.componentRef.destroy()},e}();p.decorators=[{type:t.Component,args:[{selector:"p-dynamicDialog",template:'\n <div #mask [ngClass]="{\'p-dialog-mask\':true, \'p-component-overlay p-dialog-mask-scrollblocker\': config.modal !== false}">\n <div [ngClass]="{\'p-dialog p-dynamic-dialog p-component\':true, \'p-dialog-rtl\': config.rtl}" [ngStyle]="config.style" [class]="config.styleClass"\n [@animation]="{value: \'visible\', params: {transform: transformOptions, transition: config.transitionOptions || \'150ms cubic-bezier(0, 0, 0.2, 1)\'}}"\n (@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)" role="dialog" *ngIf="visible"\n [style.width]="config.width" [style.height]="config.height">\n <div class="p-dialog-header" *ngIf="config.showHeader === false ? false: true">\n <span class="p-dialog-title">{{config.header}}</span>\n <div class="p-dialog-header-icons">\n <button [ngClass]="\'p-dialog-header-icon p-dialog-header-maximize p-link\'" type="button" (click)="hide()" (keydown.enter)="hide()" *ngIf="config.closable !== false">\n <span class="p-dialog-header-close-icon pi pi-times"></span>\n </button>\n </div>\n </div>\n <div class="p-dialog-content" [ngStyle]="config.contentStyle">\n <ng-template pDynamicDialogContent></ng-template>\n </div>\n <div class="p-dialog-footer" *ngIf="config.footer">\n {{config.footer}}\n </div>\n </div>\n </div>\n\t',animations:[n.trigger("animation",[n.transition("void => visible",[n.useAnimation(d)]),n.transition("visible => void",[n.useAnimation(c)])])],changeDetection:t.ChangeDetectionStrategy.Default,encapsulation:t.ViewEncapsulation.None,styles:[".p-dialog-mask{align-items:center;background-color:transparent;display:flex;height:100%;justify-content:center;left:0;pointer-events:none;position:fixed;top:0;transition-property:background-color;width:100%}.p-dialog,.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;max-height:90%;position:relative;transform:scale(1)}.p-dialog-content{overflow-y:auto}.p-dialog-header{align-items:center;display:flex;flex-shrink:0;justify-content:space-between}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{align-items:center;display:flex}.p-dialog .p-dialog-header-icon{align-items:center;display:flex;justify-content:center;overflow:hidden;position:relative}.p-dialog-mask.p-dialog-mask-leave{background-color:transparent}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-top .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{height:100%;max-height:100%;transform:none;transition:none;width:100vw!important}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top,.p-dialog-top-left{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start}.p-dialog-top-right{align-items:flex-start;justify-content:flex-end}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{align-items:flex-end;justify-content:flex-start}.p-dialog-bottom-right{align-items:flex-end;justify-content:flex-end}.p-dialog .p-resizable-handle{bottom:1px;cursor:se-resize;display:block;font-size:.1px;height:12px;position:absolute;right:1px;width:12px}.p-confirm-dialog .p-dialog-content{align-items:center;display:flex}"]}]}],p.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ChangeDetectorRef},{type:t.Renderer2},{type:r},{type:l},{type:t.NgZone}]},p.propDecorators={insertionPoint:[{type:t.ViewChild,args:[s]}],maskViewChild:[{type:t.ViewChild,args:["mask"]}]};var m=function(){};m.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule],declarations:[p,s],entryComponents:[p]}]}];var g=function(){function e(e,t){this._parentInjector=e,this._additionalTokens=t}return e.prototype.get=function(e,t,n){var o=this._additionalTokens.get(e);return o||this._parentInjector.get(e,t)},e}(),f=function(){function e(e,t,n){this.componentFactoryResolver=e,this.appRef=t,this.injector=n,this.dialogComponentRefMap=new Map}return e.prototype.open=function(e,t){var n=this.appendDialogComponentToBody(t);return this.dialogComponentRefMap.get(n).instance.childComponentType=e,n},e.prototype.appendDialogComponentToBody=function(e){var t=this,n=new WeakMap;n.set(r,e);var o=new l;n.set(l,o);var i=o.onClose.subscribe((function(){t.dialogComponentRefMap.get(o).instance.close()})),a=o.onDestroy.subscribe((function(){t.removeDialogComponentFromBody(o),a.unsubscribe(),i.unsubscribe()})),s=this.componentFactoryResolver.resolveComponentFactory(p).create(new g(this.injector,n));this.appRef.attachView(s.hostView);var d=s.hostView.rootNodes[0];return document.body.appendChild(d),this.dialogComponentRefMap.set(o,s),o},e.prototype.removeDialogComponentFromBody=function(e){if(e&&this.dialogComponentRefMap.has(e)){var t=this.dialogComponentRefMap.get(e);this.appRef.detachView(t.hostView),t.destroy(),this.dialogComponentRefMap.delete(e)}},e}();f.decorators=[{type:t.Injectable}],f.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ApplicationRef},{type:t.Injector}]},e.DialogService=f,e.DynamicDialogComponent=p,e.DynamicDialogConfig=r,e.DynamicDialogInjector=g,e.DynamicDialogModule=m,e.DynamicDialogRef=l,e.ɵa=s,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/animations"),require("@angular/common"),require("primeng/dom"),require("rxjs")):"function"==typeof define&&define.amd?define("primeng/dynamicdialog",["exports","@angular/core","@angular/animations","@angular/common","primeng/dom","rxjs"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).primeng=e.primeng||{},e.primeng.dynamicdialog={}),e.ng.core,e.ng.animations,e.ng.common,e.primeng.dom,e.rxjs)}(this,(function(e,t,n,o,i,a){"use strict";var s=function(e){this.viewContainerRef=e};s.decorators=[{type:t.Directive,args:[{selector:"[pDynamicDialogContent]"}]}],s.ctorParameters=function(){return[{type:t.ViewContainerRef}]};var r=function(){},l=function(){function e(){this._onClose=new a.Subject,this.onClose=this._onClose.asObservable(),this._onDestroy=new a.Subject,this.onDestroy=this._onDestroy.asObservable()}return e.prototype.close=function(e){this._onClose.next(e)},e.prototype.destroy=function(){this._onDestroy.next()},e}(),d=n.animation([n.style({transform:"{{transform}}",opacity:0}),n.animate("{{transition}}",n.style({transform:"none",opacity:1}))]),c=n.animation([n.animate("{{transition}}",n.style({transform:"{{transform}}",opacity:0}))]),p=function(){function e(e,t,n,o,i,a){this.componentFactoryResolver=e,this.cd=t,this.renderer=n,this.config=o,this.dialogRef=i,this.zone=a,this.visible=!0,this.transformOptions="scale(0.7)"}return e.prototype.ngAfterViewInit=function(){this.loadChildComponent(this.childComponentType),this.cd.detectChanges()},e.prototype.loadChildComponent=function(e){var t=this.componentFactoryResolver.resolveComponentFactory(e),n=this.insertionPoint.viewContainerRef;n.clear(),this.componentRef=n.createComponent(t)},e.prototype.moveOnTop=function(){if(!1!==this.config.autoZIndex){var e=(this.config.baseZIndex||0)+ ++i.DomHandler.zindex;this.container.style.zIndex=String(e),this.maskViewChild.nativeElement.style.zIndex=String(e-1)}},e.prototype.onAnimationStart=function(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container.parentElement,this.moveOnTop(),this.bindGlobalListeners(),!1!==this.config.modal&&this.enableModality(),this.focus();break;case"void":this.onContainerDestroy()}},e.prototype.onAnimationEnd=function(e){"void"===e.toState&&this.dialogRef.destroy()},e.prototype.onContainerDestroy=function(){this.unbindGlobalListeners(),!1!==this.config.modal&&this.disableModality(),this.container=null},e.prototype.close=function(){this.visible=!1,this.cd.markForCheck()},e.prototype.hide=function(){this.dialogRef&&this.dialogRef.close()},e.prototype.enableModality=function(){var e=this;!1!==this.config.closable&&this.config.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",(function(t){e.wrapper&&e.wrapper.isSameNode(t.target)&&e.hide()}))),!1!==this.config.modal&&i.DomHandler.addClass(document.body,"p-overflow-hidden")},e.prototype.disableModality=function(){this.wrapper&&(this.config.dismissableMask&&this.unbindMaskClickListener(),!1!==this.config.modal&&i.DomHandler.removeClass(document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())},e.prototype.onKeydown=function(e){if(9===e.which){e.preventDefault();var t=i.DomHandler.getFocusableElements(this.container);if(t&&t.length>0)if(t[0].ownerDocument.activeElement){var n=t.indexOf(t[0].ownerDocument.activeElement);e.shiftKey?-1==n||0===n?t[t.length-1].focus():t[n-1].focus():-1==n||n===t.length-1?t[0].focus():t[n+1].focus()}else t[0].focus()}},e.prototype.focus=function(){var e=i.DomHandler.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular((function(){setTimeout((function(){return e.focus()}),5)}))},e.prototype.bindGlobalListeners=function(){this.bindDocumentKeydownListener(),!1!==this.config.closeOnEscape&&!1!==this.config.closable&&this.bindDocumentEscapeListener()},e.prototype.unbindGlobalListeners=function(){this.unbindDocumentKeydownListener(),this.unbindDocumentEscapeListener()},e.prototype.bindDocumentKeydownListener=function(){var e=this;this.zone.runOutsideAngular((function(){e.documentKeydownListener=e.onKeydown.bind(e),window.document.addEventListener("keydown",e.documentKeydownListener)}))},e.prototype.unbindDocumentKeydownListener=function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},e.prototype.bindDocumentEscapeListener=function(){var e=this,t=this.maskViewChild?this.maskViewChild.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(t,"keydown",(function(t){27==t.which&&parseInt(e.container.style.zIndex)==i.DomHandler.zindex+(e.config.baseZIndex?e.config.baseZIndex:0)&&e.hide()}))},e.prototype.unbindDocumentEscapeListener=function(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)},e.prototype.unbindMaskClickListener=function(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)},e.prototype.ngOnDestroy=function(){this.onContainerDestroy(),this.componentRef&&this.componentRef.destroy()},e}();p.decorators=[{type:t.Component,args:[{selector:"p-dynamicDialog",template:'\n <div #mask [ngClass]="{\'p-dialog-mask\':true, \'p-component-overlay p-dialog-mask-scrollblocker\': config.modal !== false}">\n <div [ngClass]="{\'p-dialog p-dynamic-dialog p-component\':true, \'p-dialog-rtl\': config.rtl}" [ngStyle]="config.style" [class]="config.styleClass"\n [@animation]="{value: \'visible\', params: {transform: transformOptions, transition: config.transitionOptions || \'150ms cubic-bezier(0, 0, 0.2, 1)\'}}"\n (@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)" role="dialog" *ngIf="visible"\n [style.width]="config.width" [style.height]="config.height">\n <div class="p-dialog-header" *ngIf="config.showHeader === false ? false: true">\n <span class="p-dialog-title">{{config.header}}</span>\n <div class="p-dialog-header-icons">\n <button [ngClass]="\'p-dialog-header-icon p-dialog-header-maximize p-link\'" type="button" (click)="hide()" (keydown.enter)="hide()" *ngIf="config.closable !== false">\n <span class="p-dialog-header-close-icon pi pi-times"></span>\n </button>\n </div>\n </div>\n <div class="p-dialog-content" [ngStyle]="config.contentStyle">\n <ng-template pDynamicDialogContent></ng-template>\n </div>\n <div class="p-dialog-footer" *ngIf="config.footer">\n {{config.footer}}\n </div>\n </div>\n </div>\n\t',animations:[n.trigger("animation",[n.transition("void => visible",[n.useAnimation(d)]),n.transition("visible => void",[n.useAnimation(c)])])],changeDetection:t.ChangeDetectionStrategy.Default,encapsulation:t.ViewEncapsulation.None,styles:[".p-dialog-mask{align-items:center;background-color:transparent;display:flex;height:100%;justify-content:center;left:0;pointer-events:none;position:fixed;top:0;transition-property:background-color;width:100%}.p-dialog,.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;max-height:90%;position:relative;transform:scale(1)}.p-dialog-content{overflow-y:auto}.p-dialog-header{align-items:center;display:flex;flex-shrink:0;justify-content:space-between}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{align-items:center;display:flex}.p-dialog .p-dialog-header-icon{align-items:center;display:flex;justify-content:center;overflow:hidden;position:relative}.p-dialog-mask.p-dialog-mask-leave{background-color:transparent}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-top .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{height:100%;left:0!important;max-height:100%;top:0!important;transform:none;transition:none;width:100vw!important}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top,.p-dialog-top-left{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start}.p-dialog-top-right{align-items:flex-start;justify-content:flex-end}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{align-items:flex-end;justify-content:flex-start}.p-dialog-bottom-right{align-items:flex-end;justify-content:flex-end}.p-dialog .p-resizable-handle{bottom:1px;cursor:se-resize;display:block;font-size:.1px;height:12px;position:absolute;right:1px;width:12px}.p-confirm-dialog .p-dialog-content{align-items:center;display:flex}"]}]}],p.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ChangeDetectorRef},{type:t.Renderer2},{type:r},{type:l},{type:t.NgZone}]},p.propDecorators={insertionPoint:[{type:t.ViewChild,args:[s]}],maskViewChild:[{type:t.ViewChild,args:["mask"]}]};var m=function(){};m.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule],declarations:[p,s],entryComponents:[p]}]}];var g=function(){function e(e,t){this._parentInjector=e,this._additionalTokens=t}return e.prototype.get=function(e,t,n){var o=this._additionalTokens.get(e);return o||this._parentInjector.get(e,t)},e}(),f=function(){function e(e,t,n){this.componentFactoryResolver=e,this.appRef=t,this.injector=n,this.dialogComponentRefMap=new Map}return e.prototype.open=function(e,t){var n=this.appendDialogComponentToBody(t);return this.dialogComponentRefMap.get(n).instance.childComponentType=e,n},e.prototype.appendDialogComponentToBody=function(e){var t=this,n=new WeakMap;n.set(r,e);var o=new l;n.set(l,o);var i=o.onClose.subscribe((function(){t.dialogComponentRefMap.get(o).instance.close()})),a=o.onDestroy.subscribe((function(){t.removeDialogComponentFromBody(o),a.unsubscribe(),i.unsubscribe()})),s=this.componentFactoryResolver.resolveComponentFactory(p).create(new g(this.injector,n));this.appRef.attachView(s.hostView);var d=s.hostView.rootNodes[0];return document.body.appendChild(d),this.dialogComponentRefMap.set(o,s),o},e.prototype.removeDialogComponentFromBody=function(e){if(e&&this.dialogComponentRefMap.has(e)){var t=this.dialogComponentRefMap.get(e);this.appRef.detachView(t.hostView),t.destroy(),this.dialogComponentRefMap.delete(e)}},e}();f.decorators=[{type:t.Injectable}],f.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ApplicationRef},{type:t.Injector}]},e.DialogService=f,e.DynamicDialogComponent=p,e.DynamicDialogConfig=r,e.DynamicDialogInjector=g,e.DynamicDialogModule=m,e.DynamicDialogRef=l,e.ɵa=s,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=primeng-dynamicdialog.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/app/components/dynamicdialog/dynamicdialogcontent.ts","../../src/app/components/dynamicdialog/dynamicdialog-config.ts","../../src/app/components/dynamicdialog/dynamicdialog-ref.ts","../../src/app/components/dynamicdialog/dynamicdialog.ts","../../src/app/components/dynamicdialog/dynamicdialog-injector.ts","../../src/app/components/dynamicdialog/dialogservice.ts"],"names":["viewContainerRef","this","Directive","args","selector","ViewContainerRef","DynamicDialogRef","_onClose","Subject","onClose","asObservable","_onDestroy","onDestroy","prototype","close","result","next","destroy","showAnimation","animation","style","transform","opacity","animate","hideAnimation","DynamicDialogComponent","componentFactoryResolver","cd","renderer","config","dialogRef","zone","visible","transformOptions","ngAfterViewInit","loadChildComponent","childComponentType","detectChanges","componentType","componentFactory","resolveComponentFactory","insertionPoint","clear","componentRef","createComponent","moveOnTop","autoZIndex","zIndex","baseZIndex","DomHandler","zindex","container","String","maskViewChild","nativeElement","onAnimationStart","event","toState","element","wrapper","parentElement","bindGlobalListeners","modal","enableModality","focus","onContainerDestroy","onAnimationEnd","unbindGlobalListeners","disableModality","markForCheck","hide","_this","closable","dismissableMask","maskClickListener","listen","isSameNode","target","addClass","document","body","unbindMaskClickListener","removeClass","destroyed","onKeydown","which","preventDefault","focusableElements","getFocusableElements","length","ownerDocument","activeElement","focusedIndex","indexOf","shiftKey","focusable","findSingle","runOutsideAngular","setTimeout","bindDocumentKeydownListener","closeOnEscape","bindDocumentEscapeListener","unbindDocumentKeydownListener","unbindDocumentEscapeListener","documentKeydownListener","bind","window","addEventListener","removeEventListener","documentTarget","documentEscapeListener","parseInt","ngOnDestroy","Component","template","animations","trigger","transition","useAnimation","changeDetection","ChangeDetectionStrategy","Default","encapsulation","ViewEncapsulation","None","ComponentFactoryResolver","ChangeDetectorRef","Renderer2","DynamicDialogConfig","NgZone","ViewChild","DynamicDialogContent","NgModule","imports","CommonModule","declarations","entryComponents","DynamicDialogInjector","_parentInjector","_additionalTokens","get","token","notFoundValue","flags","value","DialogService","appRef","injector","dialogComponentRefMap","Map","open","appendDialogComponentToBody","instance","map","WeakMap","set","sub","subscribe","destroySub","removeDialogComponentFromBody","unsubscribe","create","attachView","hostView","domElem","rootNodes","appendChild","has","dialogComponentRef","detachView","delete","Injectable","ApplicationRef","Injector"],"mappings":"ikBAOC,SAAmBA,GAAAC,KAAAD,iBAAAA,uBALnBE,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,uEAHQC,EAAAA,0BCApB,0BCGC,SAAAC,IAUiBL,KAAAM,SAAW,IAAIC,EAAAA,QAC7BP,KAAAQ,QAA2BR,KAAKM,SAASG,eAExBT,KAAAU,WAAa,IAAIH,EAAAA,QACrCP,KAAAW,UAA6BX,KAAKU,WAAWD,sBAZ7CJ,EAAAO,UAAAC,MAAA,SAAMC,GACLd,KAAKM,SAASS,KAAKD,IAGjBT,EAAAO,UAAAI,QAAA,WACFhB,KAAKU,WAAWK,aCFZE,EAAgBC,EAAAA,UAAU,CAC5BC,EAAAA,MAAM,CAAEC,UAAW,gBAAiBC,QAAS,IAC7CC,EAAAA,QAAQ,iBAAkBH,EAAAA,MAAM,CAAEC,UAAW,OAAQC,QAAS,OAG5DE,EAAgBL,EAAAA,UAAU,CAC5BI,EAAAA,QAAQ,iBAAkBH,EAAAA,MAAM,CAAEC,UAAW,gBAAiBC,QAAS,oBAoE1E,SAAAG,EAAoBC,EAA4DC,EAA8BC,EACrGC,EAAqCC,EAAoCC,GAD9D9B,KAAAyB,yBAAAA,EAA4DzB,KAAA0B,GAAAA,EAA8B1B,KAAA2B,SAAAA,EACrG3B,KAAA4B,OAAAA,EAAqC5B,KAAA6B,UAAAA,EAAoC7B,KAAA8B,KAAAA,EAzBlF9B,KAAA+B,SAAmB,EAsBhB/B,KAAAgC,iBAA2B,oBAK9BR,EAAAZ,UAAAqB,gBAAA,WACCjC,KAAKkC,mBAAmBlC,KAAKmC,oBAC7BnC,KAAK0B,GAAGU,iBAGTZ,EAAAZ,UAAAsB,mBAAA,SAAmBG,GAClB,IAAIC,EAAmBtC,KAAKyB,yBAAyBc,wBAAw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rH,EADmB1C,KAAKyB,yBAAyBc,wBAAwBf,GACzCwI,OAAO,IAAIxB,EAAsBxI,KAAKkJ,SAAUM,IAEtFxJ,KAAKiJ,OAAOgB,WAAWvH,EAAawH,UAEpC,IAAMC,EAAWzH,EAAawH,SAAkCE,UAAU,GAK1E,OAJAtF,SAASC,KAAKsF,YAAYF,GAE1BnK,KAAKmJ,sBAAsBO,IAAI7H,EAAWa,GAEnCb,GAGHmH,EAAApI,UAAAkJ,8BAAA,SAA8BjI,GAClC,GAAKA,GAAc7B,KAAKmJ,sBAAsBmB,IAAIzI,GAAlD,CAIA,IAAM0I,EAAqBvK,KAAKmJ,sBAAsBR,IAAI9G,GAC1D7B,KAAKiJ,OAAOuB,WAAWD,EAAmBL,UAC1CK,EAAmBvJ,UACnBhB,KAAKmJ,sBAAsBsB,OAAO5I,8BAtDzC6I,EAAAA,sDANoB9C,EAAAA,gCAA0B+C,EAAAA,sBAAgBC,EAAAA","sourcesContent":["import { Directive, ViewContainerRef } from '@angular/core';\n\n@Directive({\n selector: '[pDynamicDialogContent]'\n})\nexport class DynamicDialogContent {\n \n\tconstructor(public viewContainerRef: ViewContainerRef) {}\n\n}\n","export class DynamicDialogConfig {\r\n\tdata?: any;\r\n\theader?: string;\r\n\tfooter?: string;\r\n\twidth?: string;\r\n\theight?: string;\r\n\tcloseOnEscape?: boolean;\r\n\tbaseZIndex?: number;\r\n\tautoZIndex?: boolean;\r\n\tdismissableMask?: boolean;\r\n\trtl?: boolean;\r\n\tstyle?: any;\r\n\tcontentStyle?: any;\r\n\tstyleClass?: string;\r\n\ttransitionOptions?: string;\r\n\tclosable?: boolean;\r\n\tshowHeader?: boolean;\r\n\tmodal?: boolean;\r\n}\r\n","import { Observable, Subject } from 'rxjs';\r\n\r\nexport class DynamicDialogRef {\r\n\tconstructor() { }\r\n\r\n\tclose(result?: any) {\r\n\t\tthis._onClose.next(result);\r\n }\r\n \r\n destroy() {\r\n\t\tthis._onDestroy.next();\r\n\t}\r\n\r\n\tprivate readonly _onClose = new Subject<any>();\r\n onClose: Observable<any> = this._onClose.asObservable();\r\n\r\n private readonly _onDestroy = new Subject<any>();\r\n\tonDestroy: Observable<any> = this._onDestroy.asObservable();\r\n}\r\n","import { Component, NgModule, Type, ComponentFactoryResolver, ViewChild, OnDestroy, ComponentRef, AfterViewInit, ChangeDetectorRef, Renderer2, NgZone, ElementRef, ChangeDetectionStrategy, ViewRef, ViewEncapsulation } from '@angular/core';\nimport { trigger,style,transition,animate,AnimationEvent, animation, useAnimation } from '@angular/animations';\nimport { DynamicDialogContent } from './dynamicdialogcontent';\nimport { DynamicDialogConfig } from './dynamicdialog-config';\nimport { CommonModule } from '@angular/common';\nimport { DomHandler } from 'primeng/dom';\nimport { DynamicDialogRef } from './dynamicdialog-ref';\n\nconst showAnimation = animation([\n style({ transform: '{{transform}}', opacity: 0 }),\n animate('{{transition}}', style({ transform: 'none', opacity: 1 }))\n]);\n\nconst hideAnimation = animation([\n animate('{{transition}}', style({ transform: '{{transform}}', opacity: 0 }))\n]);\n\n@Component({\n\tselector: 'p-dynamicDialog',\n\ttemplate: `\n <div #mask [ngClass]=\"{'p-dialog-mask':true, 'p-component-overlay p-dialog-mask-scrollblocker': config.modal !== false}\">\n <div [ngClass]=\"{'p-dialog p-dynamic-dialog p-component':true, 'p-dialog-rtl': config.rtl}\" [ngStyle]=\"config.style\" [class]=\"config.styleClass\"\n [@animation]=\"{value: 'visible', params: {transform: transformOptions, transition: config.transitionOptions || '150ms cubic-bezier(0, 0, 0.2, 1)'}}\"\n (@animation.start)=\"onAnimationStart($event)\" (@animation.done)=\"onAnimationEnd($event)\" role=\"dialog\" *ngIf=\"visible\"\n [style.width]=\"config.width\" [style.height]=\"config.height\">\n <div class=\"p-dialog-header\" *ngIf=\"config.showHeader === false ? false: true\">\n <span class=\"p-dialog-title\">{{config.header}}</span>\n <div class=\"p-dialog-header-icons\">\n <button [ngClass]=\"'p-dialog-header-icon p-dialog-header-maximize p-link'\" type=\"button\" (click)=\"hide()\" (keydown.enter)=\"hide()\" *ngIf=\"config.closable !== false\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </div>\n </div>\n <div class=\"p-dialog-content\" [ngStyle]=\"config.contentStyle\">\n <ng-template pDynamicDialogContent></ng-template>\n </div>\n <div class=\"p-dialog-footer\" *ngIf=\"config.footer\">\n {{config.footer}}\n </div>\n </div>\n </div>\n\t`,\n\tanimations: [\n trigger('animation', [\n transition('void => visible', [\n useAnimation(showAnimation)\n ]),\n transition('visible => void', [\n useAnimation(hideAnimation)\n ])\n ])\n ],\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['../dialog/dialog.css']\n})\nexport class DynamicDialogComponent implements AfterViewInit, OnDestroy {\n\n\tvisible: boolean = true;\n\n\tcomponentRef: ComponentRef<any>;\n\n\tmask: HTMLDivElement;\n\n\t@ViewChild(DynamicDialogContent) insertionPoint: DynamicDialogContent;\n\n\t@ViewChild('mask') maskViewChild: ElementRef;\n\n\tchildComponentType: Type<any>;\n\n container: HTMLDivElement;\n\n wrapper: HTMLElement;\n\n documentKeydownListener: any;\n\n documentEscapeListener: Function;\n\n maskClickListener: Function;\n\n transformOptions: string = \"scale(0.7)\";\n\n\tconstructor(private componentFactoryResolver: ComponentFactoryResolver, private cd: ChangeDetectorRef, public renderer: Renderer2,\n\t\t\tpublic config: DynamicDialogConfig, private dialogRef: DynamicDialogRef, public zone: NgZone) { }\n\n\tngAfterViewInit() {\n\t\tthis.loadChildComponent(this.childComponentType);\n\t\tthis.cd.detectChanges();\n\t}\n\n\tloadChildComponent(componentType: Type<any>) {\n\t\tlet componentFactory = this.componentFactoryResolver.resolveComponentFactory(componentType);\n\n\t\tlet viewContainerRef = this.insertionPoint.viewContainerRef;\n\t\tviewContainerRef.clear();\n\n\t\tthis.componentRef = viewContainerRef.createComponent(componentFactory);\n\t}\n\n\tmoveOnTop() {\n if (this.config.autoZIndex !== false) {\n\t\t\tconst zIndex = (this.config.baseZIndex||0) + (++DomHandler.zindex);\n\t\t\tthis.container.style.zIndex = String(zIndex);\n\t\t\tthis.maskViewChild.nativeElement.style.zIndex = String(zIndex - 1);\n\t\t}\n }\n\n\tonAnimationStart(event: AnimationEvent) {\n\t\tswitch(event.toState) {\n\t\t\tcase 'visible':\n this.container = event.element;\n this.wrapper = this.container.parentElement;\n\t\t\t\tthis.moveOnTop();\n this.bindGlobalListeners();\n\n if (this.config.modal !== false) {\n this.enableModality();\n }\n this.focus();\n\t\t\tbreak;\n\n\t\t\tcase 'void':\n\t\t\t\tthis.onContainerDestroy();\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tonAnimationEnd(event: AnimationEvent) {\n\t\tif (event.toState === 'void') {\n\t\t\tthis.dialogRef.destroy();\n\t\t}\n\t}\n\n\tonContainerDestroy() {\n\t\tthis.unbindGlobalListeners();\n\n if (this.config.modal !== false) {\n this.disableModality();\n }\n this.container = null;\n\t}\n\n\tclose() {\n this.visible = false;\n this.cd.markForCheck();\n\t}\n\n hide() {\n if (this.dialogRef) {\n this.dialogRef.close();\n }\n }\n\n enableModality() {\n if (this.config.closable !== false && this.config.dismissableMask) {\n this.maskClickListener = this.renderer.listen(this.wrapper, 'mousedown', (event: any) => {\n if (this.wrapper && this.wrapper.isSameNode(event.target)) {\n this.hide();\n }\n });\n }\n\n if (this.config.modal !== false) {\n DomHandler.addClass(document.body, 'p-overflow-hidden');\n }\n }\n\n disableModality() {\n if (this.wrapper) {\n if (this.config.dismissableMask) {\n this.unbindMaskClickListener();\n }\n\n if (this.config.modal !== false) {\n DomHandler.removeClass(document.body, 'p-overflow-hidden');\n }\n\n if (!(this.cd as ViewRef).destroyed) {\n this.cd.detectChanges();\n }\n }\n }\n\n onKeydown(event: KeyboardEvent) {\n if (event.which === 9) {\n event.preventDefault();\n\n let focusableElements = DomHandler.getFocusableElements(this.container);\n\n if (focusableElements && focusableElements.length > 0) {\n if (!focusableElements[0].ownerDocument.activeElement) {\n focusableElements[0].focus();\n }\n else {\n let focusedIndex = focusableElements.indexOf(focusableElements[0].ownerDocument.activeElement);\n\n if (event.shiftKey) {\n if (focusedIndex == -1 || focusedIndex === 0)\n focusableElements[focusableElements.length - 1].focus();\n else\n focusableElements[focusedIndex - 1].focus();\n }\n else {\n if (focusedIndex == -1 || focusedIndex === (focusableElements.length - 1))\n focusableElements[0].focus();\n else\n focusableElements[focusedIndex + 1].focus();\n }\n }\n }\n }\n }\n\n focus() {\n let focusable = DomHandler.findSingle(this.container, '[autofocus]');\n if (focusable) {\n this.zone.runOutsideAngular(() => {\n setTimeout(() => focusable.focus(), 5);\n });\n }\n }\n\n\tbindGlobalListeners() {\n this.bindDocumentKeydownListener();\n\n if (this.config.closeOnEscape !== false && this.config.closable !== false) {\n this.bindDocumentEscapeListener();\n }\n }\n\n unbindGlobalListeners() {\n this.unbindDocumentKeydownListener();\n this.unbindDocumentEscapeListener();\n }\n\n bindDocumentKeydownListener() {\n this.zone.runOutsideAngular(() => {\n this.documentKeydownListener = this.onKeydown.bind(this);\n window.document.addEventListener('keydown', this.documentKeydownListener);\n });\n }\n\n unbindDocumentKeydownListener() {\n if (this.documentKeydownListener) {\n window.document.removeEventListener('keydown', this.documentKeydownListener);\n this.documentKeydownListener = null;\n }\n }\n\n\tbindDocumentEscapeListener() {\n const documentTarget: any = this.maskViewChild ? this.maskViewChild.nativeElement.ownerDocument : 'document';\n\n this.documentEscapeListener = this.renderer.listen(documentTarget, 'keydown', (event) => {\n if (event.which == 27) {\n if (parseInt(this.container.style.zIndex) == (DomHandler.zindex + (this.config.baseZIndex ? this.config.baseZIndex : 0))) {\n\t\t\t\t\tthis.hide();\n\t\t\t\t}\n }\n });\n }\n\n unbindDocumentEscapeListener() {\n if (this.documentEscapeListener) {\n this.documentEscapeListener();\n this.documentEscapeListener = null;\n }\n }\n\n unbindMaskClickListener() {\n if (this.maskClickListener) {\n this.maskClickListener();\n this.maskClickListener = null;\n }\n }\n\n\tngOnDestroy() {\n\t\tthis.onContainerDestroy();\n\n\t\tif (this.componentRef) {\n\t\t\tthis.componentRef.destroy();\n\t\t}\n\t}\n}\n\n@NgModule({\n\timports: [CommonModule],\n\tdeclarations: [DynamicDialogComponent, DynamicDialogContent],\n\tentryComponents: [DynamicDialogComponent]\n})\nexport class DynamicDialogModule { }\n","import { Injector, Type, InjectionToken, InjectFlags } from '@angular/core';\r\n\r\nexport class DynamicDialogInjector implements Injector {\r\n\t\r\n\tconstructor(private _parentInjector: Injector, private _additionalTokens: WeakMap<any, any>) { }\r\n\r\n\tget<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\r\n\tget(token: any, notFoundValue?: any);\r\n\tget(token: any, notFoundValue?: any, flags?: any) {\r\n\t\tconst value = this._additionalTokens.get(token);\r\n\r\n\t\tif (value) return value;\r\n\r\n\t\treturn this._parentInjector.get<any>(token, notFoundValue);\r\n\t}\r\n}\r\n","import { Injectable, ComponentFactoryResolver, ApplicationRef, Injector, Type, EmbeddedViewRef, ComponentRef } from '@angular/core';\nimport { DynamicDialogComponent } from './dynamicdialog';\nimport { DynamicDialogInjector } from './dynamicdialog-injector';\nimport { DynamicDialogConfig } from './dynamicdialog-config';\nimport { DynamicDialogRef } from './dynamicdialog-ref';\n\n@Injectable()\nexport class DialogService {\n\n dialogComponentRefMap: Map<DynamicDialogRef, ComponentRef<DynamicDialogComponent>> = new Map();\n\n constructor(private componentFactoryResolver: ComponentFactoryResolver, private appRef: ApplicationRef, private injector: Injector) {\n }\n\n public open(componentType: Type<any>, config: DynamicDialogConfig) {\n const dialogRef = this.appendDialogComponentToBody(config);\n\n this.dialogComponentRefMap.get(dialogRef).instance.childComponentType = componentType;\n\n return dialogRef;\n }\n\n private appendDialogComponentToBody(config: DynamicDialogConfig) {\n const map = new WeakMap();\n map.set(DynamicDialogConfig, config);\n\n const dialogRef = new DynamicDialogRef();\n map.set(DynamicDialogRef, dialogRef);\n\n const sub = dialogRef.onClose.subscribe(() => {\n this.dialogComponentRefMap.get(dialogRef).instance.close();\n });\n\n const destroySub = dialogRef.onDestroy.subscribe(() => {\n this.removeDialogComponentFromBody(dialogRef);\n destroySub.unsubscribe();\n sub.unsubscribe();\n });\n\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(DynamicDialogComponent);\n const componentRef = componentFactory.create(new DynamicDialogInjector(this.injector, map));\n\n this.appRef.attachView(componentRef.hostView);\n\n const domElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n document.body.appendChild(domElem);\n\n this.dialogComponentRefMap.set(dialogRef, componentRef);\n\n return dialogRef;\n }\n\n private removeDialogComponentFromBody(dialogRef: DynamicDialogRef) {\n if (!dialogRef || !this.dialogComponentRefMap.has(dialogRef)) {\n return;\n }\n\n const dialogComponentRef = this.dialogComponentRefMap.get(dialogRef);\n this.appRef.detachView(dialogComponentRef.hostView);\n dialogComponentRef.destroy();\n this.dialogComponentRefMap.delete(dialogRef);\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/app/components/dynamicdialog/dynamicdialogcontent.ts","../../src/app/components/dynamicdialog/dynamicdialog-config.ts","../../src/app/components/dynamicdialog/dynamicdialog-ref.ts","../../src/app/components/dynamicdialog/dynamicdialog.ts","../../src/app/components/dynamicdialog/dynamicdialog-injector.ts","../../src/app/components/dynamicdialog/dialogservice.ts"],"names":["viewContainerRef","this","Directive","args","selector","ViewContainerRef","DynamicDialogRef","_onClose","Subject","onClose","asObservable","_onDestroy","onDestroy","prototype","close","result","next","destroy","showAnimation","animation","style","transform","opacity","animate","hideAnimation","DynamicDialogComponent","componentFactoryResolver","cd","renderer","config","dialogRef","zone","visible","transformOptions","ngAfterViewInit","loadChildComponent","childComponentType","detectChanges","componentType","componentFactory","resolveComponentFactory","insertionPoint","clear","componentRef","createComponent","moveOnTop","autoZIndex","zIndex","baseZIndex","DomHandler","zindex","container","String","maskViewChild","nativeElement","onAnimationStart","event","toState","element","wrapper","parentElement","bindGlobalListeners","modal","enableModality","focus","onContainerDestroy","onAnimationEnd","unbindGlobalListeners","disableModality","markForCheck","hide","_this","closable","dismissableMask","maskClickListener","listen","isSameNode","target","addClass","document","body","unbindMaskClickListener","removeClass","destroyed","onKeydown","which","preventDefault","focusableElements","getFocusableElements","length","ownerDocument","activeElement","focusedIndex","indexOf","shiftKey","focusable","findSingle","runOutsideAngular","setTimeout","bindDocumentKeydownListener","closeOnEscape","bindDocumentEscapeListener","unbindDocumentKeydownListener","unbindDocumentEscapeListener","documentKeydownListener","bind","window","addEventListener","removeEventListener","documentTarget","documentEscapeListener","parseInt","ngOnDestroy","Component","template","animations","trigger","transition","useAnimation","changeDetection","ChangeDetectionStrategy","Default","encapsulation","ViewEncapsulation","None","ComponentFactoryResolver","ChangeDetectorRef","Renderer2","DynamicDialogConfig","NgZone","ViewChild","DynamicDialogContent","NgModule","imports","CommonModule","declarations","entryComponents","DynamicDialogInjector","_parentInjector","_additionalTokens","get","token","notFoundValue","flags","value","DialogService","appRef","injector","dialogComponentRefMap","Map","open","appendDialogComponentToBody","instance","map","WeakMap","set","sub","subscribe","destroySub","removeDialogComponentFromBody","unsubscribe","create","attachView","hostView","domElem","rootNodes","appendChild","has","dialogComponentRef","detachView","delete","Injectable","ApplicationRef","Injector"],"mappings":"ikBAOC,SAAmBA,GAAAC,KAAAD,iBAAAA,uBALnBE,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,uEAHQC,EAAAA,0BCApB,0BCGC,SAAAC,IAUiBL,KAAAM,SAAW,IAAIC,EAAAA,QAC7BP,KAAAQ,QAA2BR,KAAKM,SAASG,eAExBT,KAAAU,WAAa,IAAIH,EAAAA,QACrCP,KAAAW,UAA6BX,KAAKU,WAAWD,sBAZ7CJ,EAAAO,UAAAC,MAAA,SAAMC,GACLd,KAAKM,SAASS,KAAKD,IAGjBT,EAAAO,UAAAI,QAAA,WACFhB,KAAKU,WAAWK,aCFZE,EAAgBC,EAAAA,UAAU,CAC5BC,EAAAA,MAAM,CAAEC,UAAW,gBAAiBC,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cesContent":["import { Directive, ViewContainerRef } from '@angular/core';\n\n@Directive({\n selector: '[pDynamicDialogContent]'\n})\nexport class DynamicDialogContent {\n \n\tconstructor(public viewContainerRef: ViewContainerRef) {}\n\n}\n","export class DynamicDialogConfig {\r\n\tdata?: any;\r\n\theader?: string;\r\n\tfooter?: string;\r\n\twidth?: string;\r\n\theight?: string;\r\n\tcloseOnEscape?: boolean;\r\n\tbaseZIndex?: number;\r\n\tautoZIndex?: boolean;\r\n\tdismissableMask?: boolean;\r\n\trtl?: boolean;\r\n\tstyle?: any;\r\n\tcontentStyle?: any;\r\n\tstyleClass?: string;\r\n\ttransitionOptions?: string;\r\n\tclosable?: boolean;\r\n\tshowHeader?: boolean;\r\n\tmodal?: boolean;\r\n}\r\n","import { Observable, Subject } from 'rxjs';\r\n\r\nexport class DynamicDialogRef {\r\n\tconstructor() { }\r\n\r\n\tclose(result?: any) {\r\n\t\tthis._onClose.next(result);\r\n }\r\n \r\n destroy() {\r\n\t\tthis._onDestroy.next();\r\n\t}\r\n\r\n\tprivate readonly _onClose = new Subject<any>();\r\n onClose: Observable<any> = this._onClose.asObservable();\r\n\r\n private readonly _onDestroy = new Subject<any>();\r\n\tonDestroy: Observable<any> = this._onDestroy.asObservable();\r\n}\r\n","import { Component, NgModule, Type, ComponentFactoryResolver, ViewChild, OnDestroy, ComponentRef, AfterViewInit, ChangeDetectorRef, Renderer2, NgZone, ElementRef, ChangeDetectionStrategy, ViewRef, ViewEncapsulation } from '@angular/core';\nimport { trigger,style,transition,animate,AnimationEvent, animation, useAnimation } from '@angular/animations';\nimport { DynamicDialogContent } from './dynamicdialogcontent';\nimport { DynamicDialogConfig } from './dynamicdialog-config';\nimport { CommonModule } from '@angular/common';\nimport { DomHandler } from 'primeng/dom';\nimport { DynamicDialogRef } from './dynamicdialog-ref';\n\nconst showAnimation = animation([\n style({ transform: '{{transform}}', opacity: 0 }),\n animate('{{transition}}', style({ transform: 'none', opacity: 1 }))\n]);\n\nconst hideAnimation = animation([\n animate('{{transition}}', style({ transform: '{{transform}}', opacity: 0 }))\n]);\n\n@Component({\n\tselector: 'p-dynamicDialog',\n\ttemplate: `\n <div #mask [ngClass]=\"{'p-dialog-mask':true, 'p-component-overlay p-dialog-mask-scrollblocker': config.modal !== false}\">\n <div [ngClass]=\"{'p-dialog p-dynamic-dialog p-component':true, 'p-dialog-rtl': config.rtl}\" [ngStyle]=\"config.style\" [class]=\"config.styleClass\"\n [@animation]=\"{value: 'visible', params: {transform: transformOptions, transition: config.transitionOptions || '150ms cubic-bezier(0, 0, 0.2, 1)'}}\"\n (@animation.start)=\"onAnimationStart($event)\" (@animation.done)=\"onAnimationEnd($event)\" role=\"dialog\" *ngIf=\"visible\"\n [style.width]=\"config.width\" [style.height]=\"config.height\">\n <div class=\"p-dialog-header\" *ngIf=\"config.showHeader === false ? false: true\">\n <span class=\"p-dialog-title\">{{config.header}}</span>\n <div class=\"p-dialog-header-icons\">\n <button [ngClass]=\"'p-dialog-header-icon p-dialog-header-maximize p-link'\" type=\"button\" (click)=\"hide()\" (keydown.enter)=\"hide()\" *ngIf=\"config.closable !== false\">\n <span class=\"p-dialog-header-close-icon pi pi-times\"></span>\n </button>\n </div>\n </div>\n <div class=\"p-dialog-content\" [ngStyle]=\"config.contentStyle\">\n <ng-template pDynamicDialogContent></ng-template>\n </div>\n <div class=\"p-dialog-footer\" *ngIf=\"config.footer\">\n {{config.footer}}\n </div>\n </div>\n </div>\n\t`,\n\tanimations: [\n trigger('animation', [\n transition('void => visible', [\n useAnimation(showAnimation)\n ]),\n transition('visible => void', [\n useAnimation(hideAnimation)\n ])\n ])\n ],\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['../dialog/dialog.css']\n})\nexport class DynamicDialogComponent implements AfterViewInit, OnDestroy {\n\n\tvisible: boolean = true;\n\n\tcomponentRef: ComponentRef<any>;\n\n\tmask: HTMLDivElement;\n\n\t@ViewChild(DynamicDialogContent) insertionPoint: DynamicDialogContent;\n\n\t@ViewChild('mask') maskViewChild: ElementRef;\n\n\tchildComponentType: Type<any>;\n\n container: HTMLDivElement;\n\n wrapper: HTMLElement;\n\n documentKeydownListener: any;\n\n documentEscapeListener: Function;\n\n maskClickListener: Function;\n\n transformOptions: string = \"scale(0.7)\";\n\n\tconstructor(private componentFactoryResolver: ComponentFactoryResolver, private cd: ChangeDetectorRef, public renderer: Renderer2,\n\t\t\tpublic config: DynamicDialogConfig, private dialogRef: DynamicDialogRef, public zone: NgZone) { }\n\n\tngAfterViewInit() {\n\t\tthis.loadChildComponent(this.childComponentType);\n\t\tthis.cd.detectChanges();\n\t}\n\n\tloadChildComponent(componentType: Type<any>) {\n\t\tlet componentFactory = this.componentFactoryResolver.resolveComponentFactory(componentType);\n\n\t\tlet viewContainerRef = this.insertionPoint.viewContainerRef;\n\t\tviewContainerRef.clear();\n\n\t\tthis.componentRef = viewContainerRef.createComponent(componentFactory);\n\t}\n\n\tmoveOnTop() {\n if (this.config.autoZIndex !== false) {\n\t\t\tconst zIndex = (this.config.baseZIndex||0) + (++DomHandler.zindex);\n\t\t\tthis.container.style.zIndex = String(zIndex);\n\t\t\tthis.maskViewChild.nativeElement.style.zIndex = String(zIndex - 1);\n\t\t}\n }\n\n\tonAnimationStart(event: AnimationEvent) {\n\t\tswitch(event.toState) {\n\t\t\tcase 'visible':\n this.container = event.element;\n this.wrapper = this.container.parentElement;\n\t\t\t\tthis.moveOnTop();\n this.bindGlobalListeners();\n\n if (this.config.modal !== false) {\n this.enableModality();\n }\n this.focus();\n\t\t\tbreak;\n\n\t\t\tcase 'void':\n\t\t\t\tthis.onContainerDestroy();\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tonAnimationEnd(event: AnimationEvent) {\n\t\tif (event.toState === 'void') {\n\t\t\tthis.dialogRef.destroy();\n\t\t}\n\t}\n\n\tonContainerDestroy() {\n\t\tthis.unbindGlobalListeners();\n\n if (this.config.modal !== false) {\n this.disableModality();\n }\n this.container = null;\n\t}\n\n\tclose() {\n this.visible = false;\n this.cd.markForCheck();\n\t}\n\n hide() {\n if (this.dialogRef) {\n this.dialogRef.close();\n }\n }\n\n enableModality() {\n if (this.config.closable !== false && this.config.dismissableMask) {\n this.maskClickListener = this.renderer.listen(this.wrapper, 'mousedown', (event: any) => {\n if (this.wrapper && this.wrapper.isSameNode(event.target)) {\n this.hide();\n }\n });\n }\n\n if (this.config.modal !== false) {\n DomHandler.addClass(document.body, 'p-overflow-hidden');\n }\n }\n\n disableModality() {\n if (this.wrapper) {\n if (this.config.dismissableMask) {\n this.unbindMaskClickListener();\n }\n\n if (this.config.modal !== false) {\n DomHandler.removeClass(document.body, 'p-overflow-hidden');\n }\n\n if (!(this.cd as ViewRef).destroyed) {\n this.cd.detectChanges();\n }\n }\n }\n\n onKeydown(event: KeyboardEvent) {\n if (event.which === 9) {\n event.preventDefault();\n\n let focusableElements = DomHandler.getFocusableElements(this.container);\n\n if (focusableElements && focusableElements.length > 0) {\n if (!focusableElements[0].ownerDocument.activeElement) {\n focusableElements[0].focus();\n }\n else {\n let focusedIndex = focusableElements.indexOf(focusableElements[0].ownerDocument.activeElement);\n\n if (event.shiftKey) {\n if (focusedIndex == -1 || focusedIndex === 0)\n focusableElements[focusableElements.length - 1].focus();\n else\n focusableElements[focusedIndex - 1].focus();\n }\n else {\n if (focusedIndex == -1 || focusedIndex === (focusableElements.length - 1))\n focusableElements[0].focus();\n else\n focusableElements[focusedIndex + 1].focus();\n }\n }\n }\n }\n }\n\n focus() {\n let focusable = DomHandler.findSingle(this.container, '[autofocus]');\n if (focusable) {\n this.zone.runOutsideAngular(() => {\n setTimeout(() => focusable.focus(), 5);\n });\n }\n }\n\n\tbindGlobalListeners() {\n this.bindDocumentKeydownListener();\n\n if (this.config.closeOnEscape !== false && this.config.closable !== false) {\n this.bindDocumentEscapeListener();\n }\n }\n\n unbindGlobalListeners() {\n this.unbindDocumentKeydownListener();\n this.unbindDocumentEscapeListener();\n }\n\n bindDocumentKeydownListener() {\n this.zone.runOutsideAngular(() => {\n this.documentKeydownListener = this.onKeydown.bind(this);\n window.document.addEventListener('keydown', this.documentKeydownListener);\n });\n }\n\n unbindDocumentKeydownListener() {\n if (this.documentKeydownListener) {\n window.document.removeEventListener('keydown', this.documentKeydownListener);\n this.documentKeydownListener = null;\n }\n }\n\n\tbindDocumentEscapeListener() {\n const documentTarget: any = this.maskViewChild ? this.maskViewChild.nativeElement.ownerDocument : 'document';\n\n this.documentEscapeListener = this.renderer.listen(documentTarget, 'keydown', (event) => {\n if (event.which == 27) {\n if (parseInt(this.container.style.zIndex) == (DomHandler.zindex + (this.config.baseZIndex ? this.config.baseZIndex : 0))) {\n\t\t\t\t\tthis.hide();\n\t\t\t\t}\n }\n });\n }\n\n unbindDocumentEscapeListener() {\n if (this.documentEscapeListener) {\n this.documentEscapeListener();\n this.documentEscapeListener = null;\n }\n }\n\n unbindMaskClickListener() {\n if (this.maskClickListener) {\n this.maskClickListener();\n this.maskClickListener = null;\n }\n }\n\n\tngOnDestroy() {\n\t\tthis.onContainerDestroy();\n\n\t\tif (this.componentRef) {\n\t\t\tthis.componentRef.destroy();\n\t\t}\n\t}\n}\n\n@NgModule({\n\timports: [CommonModule],\n\tdeclarations: [DynamicDialogComponent, DynamicDialogContent],\n\tentryComponents: [DynamicDialogComponent]\n})\nexport class DynamicDialogModule { }\n","import { Injector, Type, InjectionToken, InjectFlags } from '@angular/core';\r\n\r\nexport class DynamicDialogInjector implements Injector {\r\n\t\r\n\tconstructor(private _parentInjector: Injector, private _additionalTokens: WeakMap<any, any>) { }\r\n\r\n\tget<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\r\n\tget(token: any, notFoundValue?: any);\r\n\tget(token: any, notFoundValue?: any, flags?: any) {\r\n\t\tconst value = this._additionalTokens.get(token);\r\n\r\n\t\tif (value) return value;\r\n\r\n\t\treturn this._parentInjector.get<any>(token, notFoundValue);\r\n\t}\r\n}\r\n","import { Injectable, ComponentFactoryResolver, ApplicationRef, Injector, Type, EmbeddedViewRef, ComponentRef } from '@angular/core';\nimport { DynamicDialogComponent } from './dynamicdialog';\nimport { DynamicDialogInjector } from './dynamicdialog-injector';\nimport { DynamicDialogConfig } from './dynamicdialog-config';\nimport { DynamicDialogRef } from './dynamicdialog-ref';\n\n@Injectable()\nexport class DialogService {\n\n dialogComponentRefMap: Map<DynamicDialogRef, ComponentRef<DynamicDialogComponent>> = new Map();\n\n constructor(private componentFactoryResolver: ComponentFactoryResolver, private appRef: ApplicationRef, private injector: Injector) {\n }\n\n public open(componentType: Type<any>, config: DynamicDialogConfig) {\n const dialogRef = this.appendDialogComponentToBody(config);\n\n this.dialogComponentRefMap.get(dialogRef).instance.childComponentType = componentType;\n\n return dialogRef;\n }\n\n private appendDialogComponentToBody(config: DynamicDialogConfig) {\n const map = new WeakMap();\n map.set(DynamicDialogConfig, config);\n\n const dialogRef = new DynamicDialogRef();\n map.set(DynamicDialogRef, dialogRef);\n\n const sub = dialogRef.onClose.subscribe(() => {\n this.dialogComponentRefMap.get(dialogRef).instance.close();\n });\n\n const destroySub = dialogRef.onDestroy.subscribe(() => {\n this.removeDialogComponentFromBody(dialogRef);\n destroySub.unsubscribe();\n sub.unsubscribe();\n });\n\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(DynamicDialogComponent);\n const componentRef = componentFactory.create(new DynamicDialogInjector(this.injector, map));\n\n this.appRef.attachView(componentRef.hostView);\n\n const domElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n document.body.appendChild(domElem);\n\n this.dialogComponentRefMap.set(dialogRef, componentRef);\n\n return dialogRef;\n }\n\n private removeDialogComponentFromBody(dialogRef: DynamicDialogRef) {\n if (!dialogRef || !this.dialogComponentRefMap.has(dialogRef)) {\n return;\n }\n\n const dialogComponentRef = this.dialogComponentRefMap.get(dialogRef);\n this.appRef.detachView(dialogComponentRef.hostView);\n dialogComponentRef.destroy();\n this.dialogComponentRefMap.delete(dialogRef);\n }\n}\n"]}
@@ -48,6 +48,7 @@
48
48
  this.onFocus = new core.EventEmitter();
49
49
  this.onBlur = new core.EventEmitter();
50
50
  this.onInput = new core.EventEmitter();
51
+ this.onKeydown = new core.EventEmitter();
51
52
  this.onModelChange = function () { };
52
53
  this.onModelTouched = function () { };
53
54
  }
@@ -273,13 +274,14 @@
273
274
  this.inputViewChild.nativeElement.dispatchEvent(event);
274
275
  }
275
276
  };
276
- InputMask.prototype.onKeyDown = function (e) {
277
+ InputMask.prototype.onInputKeydown = function (e) {
277
278
  if (this.readonly) {
278
279
  return;
279
280
  }
280
281
  var k = e.which || e.keyCode, pos, begin, end;
281
282
  var iPhone = /iphone/i.test(dom.DomHandler.getUserAgent());
282
283
  this.oldVal = this.inputViewChild.nativeElement.value;
284
+ this.onKeydown.emit(e);
283
285
  //backspace, delete, and escape get special treatment
284
286
  if (k === 8 || k === 46 || (iPhone && k === 127)) {
285
287
  pos = this.caret();
@@ -489,7 +491,7 @@
489
491
  InputMask.decorators = [
490
492
  { type: core.Component, args: [{
491
493
  selector: 'p-inputMask',
492
- template: "<input #input pInputText class=\"p-inputmask\" [attr.id]=\"inputId\" [attr.type]=\"type\" [attr.name]=\"name\" [ngStyle]=\"style\" [ngClass]=\"styleClass\" [attr.placeholder]=\"placeholder\" [attr.title]=\"title\"\n [attr.size]=\"size\" [attr.autocomplete]=\"autocomplete\" [attr.maxlength]=\"maxlength\" [attr.tabindex]=\"tabindex\" [attr.aria-label]=\"ariaLabel\" [attr.aria-required]=\"ariaRequired\" [disabled]=\"disabled\" [readonly]=\"readonly\" [attr.required]=\"required\"\n (focus)=\"onInputFocus($event)\" (blur)=\"onInputBlur($event)\" (keydown)=\"onKeyDown($event)\" (keypress)=\"onKeyPress($event)\" [attr.autofocus]=\"autoFocus\"\n (input)=\"onInputChange($event)\" (paste)=\"handleInputChange($event)\">",
494
+ template: "<input #input pInputText class=\"p-inputmask\" [attr.id]=\"inputId\" [attr.type]=\"type\" [attr.name]=\"name\" [ngStyle]=\"style\" [ngClass]=\"styleClass\" [attr.placeholder]=\"placeholder\" [attr.title]=\"title\"\n [attr.size]=\"size\" [attr.autocomplete]=\"autocomplete\" [attr.maxlength]=\"maxlength\" [attr.tabindex]=\"tabindex\" [attr.aria-label]=\"ariaLabel\" [attr.aria-required]=\"ariaRequired\" [disabled]=\"disabled\" [readonly]=\"readonly\" [attr.required]=\"required\"\n (focus)=\"onInputFocus($event)\" (blur)=\"onInputBlur($event)\" (keydown)=\"onInputKeydown($event)\" (keypress)=\"onKeyPress($event)\" [attr.autofocus]=\"autoFocus\"\n (input)=\"onInputChange($event)\" (paste)=\"handleInputChange($event)\">",
493
495
  host: {
494
496
  '[class.p-inputwrapper-filled]': 'filled',
495
497
  '[class.p-inputwrapper-focus]': 'focused'
@@ -530,6 +532,7 @@
530
532
  onFocus: [{ type: core.Output }],
531
533
  onBlur: [{ type: core.Output }],
532
534
  onInput: [{ type: core.Output }],
535
+ onKeydown: [{ type: core.Output }],
533
536
  mask: [{ type: core.Input }]
534
537
  };
535
538
  var InputMaskModule = /** @class */ (function () {