Files
flights_web_raw/apps/angular/node_modules/primeng/bundles/primeng-dialog.umd.min.js
T

2 lines
19 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/animations"),require("@angular/common"),require("primeng/dom"),require("primeng/api"),require("primeng/focustrap"),require("primeng/ripple")):"function"==typeof define&&define.amd?define("primeng/dialog",["exports","@angular/core","@angular/animations","@angular/common","primeng/dom","primeng/api","primeng/focustrap","primeng/ripple"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).primeng=e.primeng||{},e.primeng.dialog={}),e.ng.core,e.ng.animations,e.ng.common,e.primeng.dom,e.primeng.api,e.primeng.focustrap,e.primeng.ripple)}(this,(function(e,t,n,i,o,s,a,r){"use strict";var l=0,p=n.animation([n.style({transform:"{{transform}}",opacity:0}),n.animate("{{transition}}")]),d=n.animation([n.animate("{{transition}}",n.style({transform:"{{transform}}",opacity:0}))]),c=function(){function e(e,n,i,o){this.el=e,this.renderer=n,this.zone=i,this.cd=o,this.draggable=!0,this.resizable=!0,this.closeOnEscape=!0,this.closable=!0,this.showHeader=!0,this.blockScroll=!1,this.autoZIndex=!0,this.baseZIndex=0,this.minX=0,this.minY=0,this.focusOnShow=!0,this.keepInViewport=!0,this.focusTrap=!0,this.transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)",this.closeIcon="pi pi-times",this.minimizeIcon="pi pi-window-minimize",this.maximizeIcon="pi pi-window-maximize",this.onShow=new t.EventEmitter,this.onHide=new t.EventEmitter,this.visibleChange=new t.EventEmitter,this.onResizeInit=new t.EventEmitter,this.onResizeEnd=new t.EventEmitter,this.onDragEnd=new t.EventEmitter,this.id="p-dialog-"+l++,this._style={},this._position="center",this.transformOptions="scale(0.7)"}return Object.defineProperty(e.prototype,"positionLeft",{get:function(){return 0},set:function(e){console.log("positionLeft property is deprecated.")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"positionTop",{get:function(){return 0},set:function(e){console.log("positionTop property is deprecated.")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responsive",{get:function(){return!1},set:function(e){console.log("Responsive property is deprecated.")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"breakpoint",{get:function(){return 649},set:function(e){console.log("Breakpoint property is not utilized and deprecated, use CSS media queries instead.")},enumerable:!1,configurable:!0}),e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach((function(t){switch(t.getType()){case"header":e.headerTemplate=t.template;break;case"content":e.contentTemplate=t.template;break;case"footer":e.footerTemplate=t.template;break;default:e.contentTemplate=t.template}}))},Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this._visible&&!this.maskVisible&&(this.maskVisible=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._style},set:function(e){e&&(this._style=Object.assign({},e),this.originalStyle=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this._position},set:function(e){switch(this._position=e,e){case"topleft":case"bottomleft":case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"topright":case"bottomright":case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break;default:this.transformOptions="scale(0.7)"}},enumerable:!1,configurable:!0}),e.prototype.focus=function(){var e=o.DomHandler.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular((function(){setTimeout((function(){return e.focus()}),5)}))},e.prototype.close=function(e){this.visibleChange.emit(!1),e.preventDefault()},e.prototype.enableModality=function(){var e=this;this.closable&&this.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"click",(function(t){e.wrapper&&e.wrapper.isSameNode(t.target)&&e.close(t)}))),this.modal&&o.DomHandler.addClass(document.body,"p-overflow-hidden")},e.prototype.disableModality=function(){this.wrapper&&(this.dismissableMask&&this.unbindMaskClickListener(),this.modal&&o.DomHandler.removeClass(document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())},e.prototype.maximize=function(){this.maximized=!this.maximized,this.modal||this.blockScroll||(this.maximized?o.DomHandler.addClass(document.body,"p-overflow-hidden"):o.DomHandler.removeClass(document.body,"p-overflow-hidden"))},e.prototype.unbindMaskClickListener=function(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)},e.prototype.moveOnTop=function(){this.autoZIndex&&(this.container.style.zIndex=String(this.baseZIndex+ ++o.DomHandler.zindex),this.wrapper.style.zIndex=String(this.baseZIndex+(o.DomHandler.zindex-1)))},e.prototype.initDrag=function(e){o.DomHandler.hasClass(e.target,"p-dialog-header-icon")||o.DomHandler.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",o.DomHandler.addClass(document.body,"p-unselectable-text"))},e.prototype.onKeydown=function(e){if(this.focusTrap&&9===e.which){e.preventDefault();var t=o.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.onDrag=function(e){if(this.dragging){var t=o.DomHandler.getOuterWidth(this.container),n=o.DomHandler.getOuterHeight(this.container),i=e.pageX-this.lastPageX,s=e.pageY-this.lastPageY,a=o.DomHandler.getOffset(this.container),r=a.left+i,l=a.top+s,p=o.DomHandler.getViewport();this.container.style.position="fixed",this.keepInViewport?(r>=this.minX&&r+t<p.width&&(this._style.left=r+"px",this.lastPageX=e.pageX,this.container.style.left=r+"px"),l>=this.minY&&l+n<p.height&&(this._style.top=l+"px",this.lastPageY=e.pageY,this.container.style.top=l+"px")):(this.lastPageX=e.pageX,this.container.style.left=r+"px",this.lastPageY=e.pageY,this.container.style.top=l+"px")}},e.prototype.endDrag=function(e){this.dragging&&(this.dragging=!1,o.DomHandler.removeClass(document.body,"p-unselectable-text"),this.cd.detectChanges(),this.onDragEnd.emit(e))},e.prototype.resetPosition=function(){this.container.style.position="",this.container.style.left="",this.container.style.top="",this.container.style.margin=""},e.prototype.center=function(){this.resetPosition()},e.prototype.initResize=function(e){this.resizable&&(this.resizing=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,o.DomHandler.addClass(document.body,"p-unselectable-text"),this.onResizeInit.emit(e))},e.prototype.onResize=function(e){if(this.resizing){var t=e.pageX-this.lastPageX,n=e.pageY-this.lastPageY,i=o.DomHandler.getOuterWidth(this.container),s=o.DomHandler.getOuterHeight(this.container),a=o.DomHandler.getOuterHeight(this.contentViewChild.nativeElement),r=i+t,l=s+n,p=this.container.style.minWidth,d=this.container.style.minHeight,c=o.DomHandler.getOffset(this.container),m=o.DomHandler.getViewport();(!parseInt(this.container.style.top)||!parseInt(this.container.style.left))&&(r+=t,l+=n),(!p||r>parseInt(p))&&c.left+r<m.width&&(this._style.width=r+"px",this.container.style.width=this._style.width),(!d||l>parseInt(d))&&c.top+l<m.height&&(this.contentViewChild.nativeElement.style.height=a+l-s+"px",this._style.height&&(this._style.height=l+"px",this.container.style.height=this._style.height)),this.lastPageX=e.pageX,this.lastPageY=e.pageY}},e.prototype.resizeEnd=function(e){this.resizing&&(this.resizing=!1,o.DomHandler.removeClass(document.body,"p-unselectable-text"),this.onResizeEnd.emit(e))},e.prototype.bindGlobalListeners=function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.resizable&&this.bindDocumentResizeListeners(),this.closeOnEscape&&this.closable&&this.bindDocumentEscapeListener()},e.prototype.unbindGlobalListeners=function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentResizeListeners(),this.unbindDocumentEscapeListener()},e.prototype.bindDocumentDragListener=function(){var e=this;this.zone.runOutsideAngular((function(){e.documentDragListener=e.onDrag.bind(e),window.document.addEventListener("mousemove",e.documentDragListener)}))},e.prototype.unbindDocumentDragListener=function(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},e.prototype.bindDocumentDragEndListener=function(){var e=this;this.zone.runOutsideAngular((function(){e.documentDragEndListener=e.endDrag.bind(e),window.document.addEventListener("mouseup",e.documentDragEndListener)}))},e.prototype.unbindDocumentDragEndListener=function(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)},e.prototype.bindDocumentResizeListeners=function(){var e=this;this.zone.runOutsideAngular((function(){e.documentResizeListener=e.onResize.bind(e),e.documentResizeEndListener=e.resizeEnd.bind(e),window.document.addEventListener("mousemove",e.documentResizeListener),window.document.addEventListener("mouseup",e.documentResizeEndListener)}))},e.prototype.unbindDocumentResizeListeners=function(){this.documentResizeListener&&this.documentResizeEndListener&&(window.document.removeEventListener("mousemove",this.documentResizeListener),window.document.removeEventListener("mouseup",this.documentResizeEndListener),this.documentResizeListener=null,this.documentResizeEndListener=null)},e.prototype.bindDocumentEscapeListener=function(){var e=this,t=this.el?this.el.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(t,"keydown",(function(t){27==t.which&&parseInt(e.container.style.zIndex)===o.DomHandler.zindex+e.baseZIndex&&e.close(t)}))},e.prototype.unbindDocumentEscapeListener=function(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)},e.prototype.appendContainer=function(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.wrapper):o.DomHandler.appendChild(this.wrapper,this.appendTo))},e.prototype.restoreAppend=function(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.wrapper)},e.prototype.onAnimationStart=function(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container.parentElement,this.onShow.emit({}),this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.modal&&this.enableModality(),!this.modal&&this.blockScroll&&o.DomHandler.addClass(document.body,"p-overflow-hidden"),this.focusOnShow&&this.focus()}},e.prototype.onAnimationEnd=function(e){switch(e.toState){case"void":this.onContainerDestroy(),this.onHide.emit({})}},e.prototype.onContainerDestroy=function(){this.unbindGlobalListeners(),this.dragging=!1,this.maskVisible=!1,this.maximized&&(o.DomHandler.removeClass(document.body,"p-overflow-hidden"),this.maximized=!1),this.modal&&this.disableModality(),this.blockScroll&&o.DomHandler.removeClass(document.body,"p-overflow-hidden"),this.container=null,this.wrapper=null,this._style=this.originalStyle?Object.assign({},this.originalStyle):{}},e.prototype.ngOnDestroy=function(){this.container&&(this.restoreAppend(),this.onContainerDestroy())},e}();c.decorators=[{type:t.Component,args:[{selector:"p-dialog",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 ',animations:[n.trigger("animation",[n.transition("void => visible",[n.useAnimation(p)]),n.transition("visible => void",[n.useAnimation(d)])])],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,styles:[".p-dialog-mask{-ms-flex-align:center;-ms-flex-pack:center;align-items:center;background-color:rgba(0,0,0,0);display:-ms-flexbox;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{-ms-flex-direction:column;-ms-transform:scale(1);display:-ms-flexbox;display:flex;flex-direction:column;max-height:90%;position:relative;transform:scale(1)}.p-dialog-content{overflow-y:auto}.p-dialog-header{-ms-flex-align:center;-ms-flex-pack:justify;align-items:center;display:-ms-flexbox;display:flex;justify-content:space-between}.p-dialog-footer,.p-dialog-header{-ms-flex-negative:0;flex-shrink:0}.p-dialog .p-dialog-header-icon,.p-dialog .p-dialog-header-icons{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}.p-dialog .p-dialog-header-icon{-ms-flex-pack:center;justify-content:center;overflow:hidden;position:relative}.p-dialog-mask.p-dialog-mask-leave{background-color:rgba(0,0,0,0)}.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{-ms-transform:none;height:100%;max-height:100%;transform:none;transition:none;width:100vw!important}.p-dialog-maximized .p-dialog-content{-ms-flex-positive:1;flex-grow:1}.p-dialog-left{-ms-flex-pack:start;justify-content:flex-start}.p-dialog-right{-ms-flex-pack:end;justify-content:flex-end}.p-dialog-top,.p-dialog-top-left{-ms-flex-align:start;align-items:flex-start}.p-dialog-top-left{-ms-flex-pack:start;justify-content:flex-start}.p-dialog-top-right{-ms-flex-align:start;-ms-flex-pack:end;align-items:flex-start;justify-content:flex-end}.p-dialog-bottom,.p-dialog-bottom-left{-ms-flex-align:end;align-items:flex-end}.p-dialog-bottom-left{-ms-flex-pack:start;justify-content:flex-start}.p-dialog-bottom-right{-ms-flex-align:end;-ms-flex-pack:end;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{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}"]}]}],c.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.NgZone},{type:t.ChangeDetectorRef}]},c.propDecorators={header:[{type:t.Input}],draggable:[{type:t.Input}],resizable:[{type:t.Input}],positionLeft:[{type:t.Input}],positionTop:[{type:t.Input}],contentStyle:[{type:t.Input}],contentStyleClass:[{type:t.Input}],modal:[{type:t.Input}],closeOnEscape:[{type:t.Input}],dismissableMask:[{type:t.Input}],rtl:[{type:t.Input}],closable:[{type:t.Input}],responsive:[{type:t.Input}],appendTo:[{type:t.Input}],styleClass:[{type:t.Input}],maskStyleClass:[{type:t.Input}],showHeader:[{type:t.Input}],breakpoint:[{type:t.Input}],blockScroll:[{type:t.Input}],autoZIndex:[{type:t.Input}],baseZIndex:[{type:t.Input}],minX:[{type:t.Input}],minY:[{type:t.Input}],focusOnShow:[{type:t.Input}],maximizable:[{type:t.Input}],keepInViewport:[{type:t.Input}],focusTrap:[{type:t.Input}],transitionOptions:[{type:t.Input}],closeIcon:[{type:t.Input}],minimizeIcon:[{type:t.Input}],maximizeIcon:[{type:t.Input}],headerFacet:[{type:t.ContentChild,args:[s.Header]}],footerFacet:[{type:t.ContentChild,args:[s.Footer]}],templates:[{type:t.ContentChildren,args:[s.PrimeTemplate]}],headerViewChild:[{type:t.ViewChild,args:["titlebar"]}],contentViewChild:[{type:t.ViewChild,args:["content"]}],footerViewChild:[{type:t.ViewChild,args:["footer"]}],onShow:[{type:t.Output}],onHide:[{type:t.Output}],visibleChange:[{type:t.Output}],onResizeInit:[{type:t.Output}],onResizeEnd:[{type:t.Output}],onDragEnd:[{type:t.Output}],visible:[{type:t.Input}],style:[{type:t.Input}],position:[{type:t.Input}]};var m=function(){};m.decorators=[{type:t.NgModule,args:[{imports:[i.CommonModule,a.FocusTrapModule,r.RippleModule],exports:[c,s.SharedModule],declarations:[c]}]}],e.Dialog=c,e.DialogModule=m,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=primeng-dialog.umd.min.js.map