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

2 lines
8.0 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("primeng/dom"),require("primeng/api"),require("primeng/ripple"),require("@angular/animations")):"function"==typeof define&&define.amd?define("primeng/overlaypanel",["exports","@angular/core","@angular/common","primeng/dom","primeng/api","primeng/ripple","@angular/animations"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).primeng=e.primeng||{},e.primeng.overlaypanel={}),e.ng.core,e.ng.common,e.primeng.dom,e.primeng.api,e.primeng.ripple,e.ng.animations)}(this,(function(e,t,n,i,o,r,s){"use strict";var a=function(){function e(e,n,i,o){this.el=e,this.renderer=n,this.cd=i,this.zone=o,this.dismissable=!0,this.autoZIndex=!0,this.baseZIndex=0,this.focusOnShow=!0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onShow=new t.EventEmitter,this.onHide=new t.EventEmitter,this.overlayVisible=!1,this.render=!1,this.isContainerClicked=!0}return e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach((function(t){switch(t.getType()){case"content":default:e.contentTemplate=t.template}e.cd.markForCheck()}))},e.prototype.onContainerClick=function(){this.isContainerClicked=!0},e.prototype.bindDocumentClickListener=function(){var e=this;!this.documentClickListener&&this.dismissable&&this.zone.runOutsideAngular((function(){var t=i.DomHandler.isIOS()?"touchstart":"click",n=e.el?e.el.nativeElement.ownerDocument:"document";e.documentClickListener=e.renderer.listen(n,t,(function(t){e.container.contains(t.target)||e.target===t.target||e.target.contains(t.target)||e.isContainerClicked||e.zone.run((function(){e.hide()})),e.isContainerClicked=!1,e.cd.markForCheck()}))}))},e.prototype.unbindDocumentClickListener=function(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)},e.prototype.toggle=function(e,t){var n=this;this.overlayVisible?(this.hasTargetChanged(e,t)&&(this.destroyCallback=function(){n.show(null,t||e.currentTarget||e.target)}),this.hide()):this.show(e,t)},e.prototype.show=function(e,t){this.target=t||e.currentTarget||e.target,this.overlayVisible=!0,this.render=!0,this.cd.markForCheck()},e.prototype.hasTargetChanged=function(e,t){return null!=this.target&&this.target!==(t||e.currentTarget||e.target)},e.prototype.appendContainer=function(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.container):i.DomHandler.appendChild(this.container,this.appendTo))},e.prototype.restoreAppend=function(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.container)},e.prototype.align=function(){this.autoZIndex&&(this.container.style.zIndex=String(this.baseZIndex+ ++i.DomHandler.zindex)),i.DomHandler.absolutePosition(this.container,this.target),i.DomHandler.getOffset(this.container).top<i.DomHandler.getOffset(this.target).top&&i.DomHandler.addClass(this.container,"p-overlaypanel-flipped"),Math.floor(i.DomHandler.getOffset(this.container).left)<Math.floor(i.DomHandler.getOffset(this.target).left)&&i.DomHandler.getOffset(this.container).left>0&&i.DomHandler.addClass(this.container,"p-overlaypanel-shifted")},e.prototype.onAnimationStart=function(e){"open"===e.toState&&(this.container=e.element,this.onShow.emit(null),this.appendContainer(),this.align(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.focusOnShow&&this.focus())},e.prototype.onAnimationEnd=function(e){switch(e.toState){case"void":this.destroyCallback&&(this.destroyCallback(),this.destroyCallback=null);break;case"close":this.onContainerDestroy(),this.onHide.emit({}),this.render=!1}},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.hide=function(){this.overlayVisible=!1,this.cd.markForCheck()},e.prototype.onCloseClick=function(e){this.hide(),e.preventDefault()},e.prototype.onWindowResize=function(e){this.hide()},e.prototype.bindDocumentResizeListener=function(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)},e.prototype.unbindDocumentResizeListener=function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},e.prototype.bindScrollListener=function(){var e=this;this.scrollHandler||(this.scrollHandler=new i.ConnectedOverlayScrollHandler(this.target,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},e.prototype.unbindScrollListener=function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},e.prototype.onContainerDestroy=function(){this.target=null,this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener()},e.prototype.ngOnDestroy=function(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.target=null,this.destroyCallback=null,this.container&&(this.restoreAppend(),this.onContainerDestroy())},e}();a.decorators=[{type:t.Component,args:[{selector:"p-overlayPanel",template:'\n <div *ngIf="render" [ngClass]="\'p-overlaypanel p-component\'" [ngStyle]="style" [class]="styleClass" (click)="onContainerClick()"\n [@animation]="{value: (overlayVisible ? \'open\': \'close\'), params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}"\n (@animation.start)="onAnimationStart($event)" (@animation.done)="onAnimationEnd($event)">\n <div class="p-overlaypanel-content">\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet="contentTemplate"></ng-container>\n </div>\n <button *ngIf="showCloseIcon" type="button" class="p-overlaypanel-close p-link" (click)="onCloseClick($event)" (keydown.enter)="hide()" [attr.aria-label]="ariaCloseLabel" pRipple>\n <span class="p-overlaypanel-close-icon pi pi-times"></span>\n </button>\n </div>\n ',animations:[s.trigger("animation",[s.state("void",s.style({transform:"scaleY(0.8)",opacity:0})),s.state("close",s.style({opacity:0})),s.state("open",s.style({transform:"translateY(0)",opacity:1})),s.transition("void => open",s.animate("{{showTransitionParams}}")),s.transition("open => close",s.animate("{{hideTransitionParams}}"))])],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,styles:['.p-overlaypanel{margin-top:10px;position:absolute}.p-overlaypanel-flipped{margin-bottom:10px;margin-top:0}.p-overlaypanel-close{-ms-flex-align:center;-ms-flex-pack:center;align-items:center;display:-ms-flexbox;display:flex;justify-content:center;overflow:hidden;position:relative}.p-overlaypanel:after,.p-overlaypanel:before{bottom:100%;content:" ";height:0;left:1.25rem;pointer-events:none;position:absolute;width:0}.p-overlaypanel:after{border-width:8px;margin-left:-8px}.p-overlaypanel:before{border-width:10px;margin-left:-10px}.p-overlaypanel-flipped:after,.p-overlaypanel-flipped:before{bottom:auto;top:100%}.p-overlaypanel.p-overlaypanel-flipped:after,.p-overlaypanel.p-overlaypanel-flipped:before{border-bottom-color:rgba(0,0,0,0)}']}]}],a.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ChangeDetectorRef},{type:t.NgZone}]},a.propDecorators={dismissable:[{type:t.Input}],showCloseIcon:[{type:t.Input}],style:[{type:t.Input}],styleClass:[{type:t.Input}],appendTo:[{type:t.Input}],autoZIndex:[{type:t.Input}],ariaCloseLabel:[{type:t.Input}],baseZIndex:[{type:t.Input}],focusOnShow:[{type:t.Input}],showTransitionOptions:[{type:t.Input}],hideTransitionOptions:[{type:t.Input}],onShow:[{type:t.Output}],onHide:[{type:t.Output}],templates:[{type:t.ContentChildren,args:[o.PrimeTemplate]}]};var l=function(){};l.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,r.RippleModule],exports:[a],declarations:[a]}]}],e.OverlayPanel=a,e.OverlayPanelModule=l,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=primeng-overlaypanel.umd.min.js.map