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

2 lines
14 KiB
JavaScript

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/animations"),require("@angular/common"),require("primeng/dom"),require("primeng/api"),require("primeng/button")):"function"==typeof define&&define.amd?define("primeng/confirmdialog",["exports","@angular/core","@angular/animations","@angular/common","primeng/dom","primeng/api","primeng/button"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).primeng=t.primeng||{},t.primeng.confirmdialog={}),t.ng.core,t.ng.animations,t.ng.common,t.primeng.dom,t.primeng.api,t.primeng.button)}(this,(function(t,e,n,i,o,a,s){"use strict";var r=n.animation([n.style({transform:"{{transform}}",opacity:0}),n.animate("{{transition}}",n.style({transform:"none",opacity:1}))]),l=n.animation([n.animate("{{transition}}",n.style({transform:"{{transform}}",opacity:0}))]),c=function(){function t(t,n,i,o,a){var s=this;this.el=t,this.renderer=n,this.confirmationService=i,this.zone=o,this.cd=a,this.acceptIcon="pi pi-check",this.acceptLabel="Yes",this.acceptVisible=!0,this.rejectIcon="pi pi-times",this.rejectLabel="No",this.rejectVisible=!0,this.closeOnEscape=!0,this.blockScroll=!0,this.closable=!0,this.autoZIndex=!0,this.baseZIndex=0,this.transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)",this.focusTrap=!0,this.defaultFocus="accept",this._position="center",this.transformOptions="scale(0.7)",this.subscription=this.confirmationService.requireConfirmation$.subscribe((function(t){t?t.key===s.key&&(s.confirmation=t,s.confirmationOptions={message:s.confirmation.message||s.message,icon:s.confirmation.icon||s.icon,header:s.confirmation.header||s.header,rejectVisible:null==s.confirmation.rejectVisible?s.rejectVisible:s.confirmation.rejectVisible,acceptVisible:null==s.confirmation.acceptVisible?s.acceptVisible:s.confirmation.acceptVisible,acceptLabel:s.confirmation.acceptLabel||s.acceptLabel,rejectLabel:s.confirmation.rejectLabel||s.rejectLabel,acceptIcon:s.confirmation.acceptIcon||s.acceptIcon,rejectIcon:s.confirmation.rejectIcon||s.rejectIcon,acceptButtonStyleClass:s.confirmation.acceptButtonStyleClass||s.acceptButtonStyleClass,rejectButtonStyleClass:s.confirmation.rejectButtonStyleClass||s.rejectButtonStyleClass,defaultFocus:s.confirmation.defaultFocus||s.defaultFocus,blockScroll:!1===s.confirmation.blockScroll||!0===s.confirmation.blockScroll?s.confirmation.blockScroll:s.blockScroll},s.confirmation.accept&&(s.confirmation.acceptEvent=new e.EventEmitter,s.confirmation.acceptEvent.subscribe(s.confirmation.accept)),s.confirmation.reject&&(s.confirmation.rejectEvent=new e.EventEmitter,s.confirmation.rejectEvent.subscribe(s.confirmation.reject)),s.visible=!0):s.hide()}))}return Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible},set:function(t){this._visible=t,this._visible&&!this.maskVisible&&(this.maskVisible=!0),this.cd.markForCheck()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(t){switch(this._position=t,t){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}),t.prototype.ngAfterContentInit=function(){var t=this;this.templates.forEach((function(e){switch(e.getType()){case"footerTemplate":t.footerTemplate=e.template}}))},t.prototype.option=function(t){var e=this.confirmationOptions||this;if(e.hasOwnProperty(t))return e[t]},t.prototype.onAnimationStart=function(t){switch(t.toState){case"visible":this.container=t.element,this.wrapper=this.container.parentElement,this.contentContainer=o.DomHandler.findSingle(this.container,".p-dialog-content");var e=this.getElementToFocus();e&&e.focus(),this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.enableModality()}},t.prototype.onAnimationEnd=function(t){switch(t.toState){case"void":this.onOverlayHide()}},t.prototype.getElementToFocus=function(){switch(this.option("defaultFocus")){case"accept":return o.DomHandler.findSingle(this.container,".p-confirm-dialog-accept");case"reject":return o.DomHandler.findSingle(this.container,".p-confirm-dialog-reject");case"close":return o.DomHandler.findSingle(this.container,".p-dialog-header-close");case"none":return null;default:return o.DomHandler.findSingle(this.container,".p-confirm-dialog-accept")}},t.prototype.appendContainer=function(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.wrapper):o.DomHandler.appendChild(this.wrapper,this.appendTo))},t.prototype.restoreAppend=function(){this.wrapper&&this.appendTo&&this.el.nativeElement.appendChild(this.wrapper)},t.prototype.enableModality=function(){this.option("blockScroll")&&o.DomHandler.addClass(document.body,"p-overflow-hidden")},t.prototype.disableModality=function(){this.maskVisible=!1,this.option("blockScroll")&&o.DomHandler.removeClass(document.body,"p-overflow-hidden"),this.container&&this.cd.detectChanges()},t.prototype.close=function(t){this.confirmation.rejectEvent&&this.confirmation.rejectEvent.emit(),this.hide(),t.preventDefault()},t.prototype.hide=function(){this.visible=!1,this.confirmation=null,this.confirmationOptions=null},t.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)))},t.prototype.getMaskClass=function(){var t={"p-dialog-mask p-component-overlay":!0,"p-dialog-mask-scrollblocker":this.blockScroll};return t[this.getPositionClass().toString()]=!0,t},t.prototype.getPositionClass=function(){var t=this,e=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"].find((function(e){return e===t.position}));return e?"p-dialog-"+e:""},t.prototype.bindGlobalListeners=function(){var t=this;if(this.closeOnEscape&&this.closable||this.focusTrap&&!this.documentEscapeListener){var e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(e,"keydown",(function(e){if(27==e.which&&t.closeOnEscape&&t.closable&&parseInt(t.container.style.zIndex)===o.DomHandler.zindex+t.baseZIndex&&t.visible&&t.close(e),9===e.which&&t.focusTrap){e.preventDefault();var n=o.DomHandler.getFocusableElements(t.container);if(n&&n.length>0)if(n[0].ownerDocument.activeElement){var i=n.indexOf(n[0].ownerDocument.activeElement);e.shiftKey?-1==i||0===i?n[n.length-1].focus():n[i-1].focus():-1==i||i===n.length-1?n[0].focus():n[i+1].focus()}else n[0].focus()}}))}},t.prototype.unbindGlobalListeners=function(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)},t.prototype.onOverlayHide=function(){this.disableModality(),this.unbindGlobalListeners(),this.container=null},t.prototype.ngOnDestroy=function(){this.restoreAppend(),this.onOverlayHide(),this.subscription.unsubscribe()},t.prototype.accept=function(){this.confirmation.acceptEvent&&this.confirmation.acceptEvent.emit(),this.hide()},t.prototype.reject=function(){this.confirmation.rejectEvent&&this.confirmation.rejectEvent.emit(),this.hide()},t}();c.decorators=[{type:e.Component,args:[{selector:"p-confirmDialog",template:'\n <div [class]="maskStyleClass" [ngClass]="getMaskClass()" *ngIf="maskVisible">\n <div [ngClass]="{\'p-dialog p-confirm-dialog p-component\':true,\'p-dialog-rtl\':rtl}" [ngStyle]="style" [class]="styleClass" (mousedown)="moveOnTop()"\n [@animation]="{value: \'visible\', params: {transform: transformOptions, transition: transitionOptions}}" (@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)" *ngIf="visible">\n <div class="p-dialog-header">\n <span class="p-dialog-title" *ngIf="option(\'header\')">{{option(\'header\')}}</span>\n <div class="p-dialog-header-icons">\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)">\n <span class="pi pi-times"></span>\n </button>\n </div>\n </div>\n <div #content class="p-dialog-content">\n <i [ngClass]="\'p-confirm-dialog-icon\'" [class]="option(\'icon\')" *ngIf="option(\'icon\')"></i>\n <span class="p-confirm-dialog-message" [innerHTML]="option(\'message\')"></span>\n </div>\n <div class="p-dialog-footer" *ngIf="footer || footerTemplate">\n <ng-content select="p-footer"></ng-content>\n <ng-container *ngTemplateOutlet="footerTemplate"></ng-container>\n </div>\n <div class="p-dialog-footer" *ngIf="!footer">\n <button type="button" pButton [icon]="option(\'acceptIcon\')" [label]="option(\'acceptLabel\')" (click)="accept()" [ngClass]="\'p-confirm-dialog-accept\'" [class]="option(\'acceptButtonStyleClass\')" *ngIf="option(\'acceptVisible\')"></button>\n <button type="button" pButton [icon]="option(\'rejectIcon\')" [label]="option(\'rejectLabel\')" (click)="reject()" [ngClass]="\'p-confirm-dialog-reject\'" [class]="option(\'rejectButtonStyleClass\')" *ngIf="option(\'rejectVisible\')"></button>\n </div>\n </div>\n </div>\n ',animations:[n.trigger("animation",[n.transition("void => visible",[n.useAnimation(r)]),n.transition("visible => void",[n.useAnimation(l)])])],changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.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:e.ElementRef},{type:e.Renderer2},{type:a.ConfirmationService},{type:e.NgZone},{type:e.ChangeDetectorRef}]},c.propDecorators={header:[{type:e.Input}],icon:[{type:e.Input}],message:[{type:e.Input}],style:[{type:e.Input}],styleClass:[{type:e.Input}],maskStyleClass:[{type:e.Input}],acceptIcon:[{type:e.Input}],acceptLabel:[{type:e.Input}],acceptVisible:[{type:e.Input}],rejectIcon:[{type:e.Input}],rejectLabel:[{type:e.Input}],rejectVisible:[{type:e.Input}],acceptButtonStyleClass:[{type:e.Input}],rejectButtonStyleClass:[{type:e.Input}],closeOnEscape:[{type:e.Input}],blockScroll:[{type:e.Input}],rtl:[{type:e.Input}],closable:[{type:e.Input}],appendTo:[{type:e.Input}],key:[{type:e.Input}],autoZIndex:[{type:e.Input}],baseZIndex:[{type:e.Input}],transitionOptions:[{type:e.Input}],focusTrap:[{type:e.Input}],defaultFocus:[{type:e.Input}],visible:[{type:e.Input}],position:[{type:e.Input}],footer:[{type:e.ContentChild,args:[a.Footer]}],contentViewChild:[{type:e.ViewChild,args:["content"]}],templates:[{type:e.ContentChildren,args:[a.PrimeTemplate]}]};var p=function(){};p.decorators=[{type:e.NgModule,args:[{imports:[i.CommonModule,s.ButtonModule],exports:[c,s.ButtonModule,a.SharedModule],declarations:[c]}]}],t.ConfirmDialog=c,t.ConfirmDialogModule=p,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=primeng-confirmdialog.umd.min.js.map