{"version":3,"file":"primeng-dynamicdialog.umd.js","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","../../src/app/components/dynamicdialog/primeng-dynamicdialog.ts"],"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();\r\n onClose: Observable = this._onClose.asObservable();\r\n\r\n private readonly _onDestroy = new Subject();\r\n\tonDestroy: Observable = 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
\n
\n
\n {{config.header}}\n
\n \n
\n
\n
\n \n
\n
\n {{config.footer}}\n
\n
\n
\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;\n\n\tmask: HTMLDivElement;\n\n\t@ViewChild(DynamicDialogContent) insertionPoint: DynamicDialogContent;\n\n\t@ViewChild('mask') maskViewChild: ElementRef;\n\n\tchildComponentType: Type;\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) {\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) { }\r\n\r\n\tget(token: Type | InjectionToken, 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(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> = new Map();\n\n constructor(private componentFactoryResolver: ComponentFactoryResolver, private appRef: ApplicationRef, private injector: Injector) {\n }\n\n public open(componentType: Type, 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).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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {DynamicDialogContent as ɵa} from './dynamicdialogcontent';"],"names":["Directive","ViewContainerRef","Subject","animation","style","animate","DomHandler","Component","trigger","transition","useAnimation","ChangeDetectionStrategy","ViewEncapsulation","ComponentFactoryResolver","ChangeDetectorRef","Renderer2","NgZone","ViewChild","NgModule","CommonModule","Injectable","ApplicationRef","Injector"],"mappings":";;;;;;;QAOC,8BAAmB,gBAAkC;YAAlC,qBAAgB,GAAhB,gBAAgB,CAAkB;SAAI;;;;gBALzDA,cAAS,SAAC;oBACT,QAAQ,EAAE,yBAAyB;iBACpC;;;gBAJmBC,qBAAgB;;;;QCApC;SAkBC;kCAAA;KAAA;;;QCfA;YAUiB,aAAQ,GAAG,IAAIC,YAAO,EAAO,CAAC;YAC5C,YAAO,GAAoB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