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

2 lines
11 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("primeng/dom"),require("@angular/router"),require("primeng/ripple"),require("@angular/animations")):"function"==typeof define&&define.amd?define("primeng/tieredmenu",["exports","@angular/core","@angular/common","primeng/dom","@angular/router","primeng/ripple","@angular/animations"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).primeng=e.primeng||{},e.primeng.tieredmenu={}),e.ng.core,e.ng.common,e.primeng.dom,e.ng.router,e.primeng.ripple,e.ng.animations)}(this,(function(e,t,n,i,o,r,s){"use strict";var l=function(){function e(e,n,i){this.el=e,this.renderer=n,this.cd=i,this.autoZIndex=!0,this.baseZIndex=0,this.leafClick=new t.EventEmitter,this.menuHoverActive=!1}return Object.defineProperty(e.prototype,"parentActive",{get:function(){return this._parentActive},set:function(e){this.root||(this._parentActive=e,e||(this.activeItem=null))},enumerable:!1,configurable:!0}),e.prototype.onItemMouseEnter=function(e,t){t.disabled||this.mobileActive?e.preventDefault():this.root?this.activeItem&&(this.activeItem=t):this.activeItem=t},e.prototype.onItemClick=function(e,t){t.disabled?e.preventDefault():(t.url||t.routerLink||e.preventDefault(),t.command&&t.command({originalEvent:e,item:t}),t.items&&(this.activeItem&&t===this.activeItem?(this.activeItem=null,this.unbindDocumentClickListener()):(this.activeItem=t,this.root&&this.bindDocumentClickListener())),t.items||this.onLeafClick())},e.prototype.onLeafClick=function(){this.activeItem=null,this.root&&this.unbindDocumentClickListener(),this.leafClick.emit()},e.prototype.bindDocumentClickListener=function(){var e=this;this.documentClickListener||(this.documentClickListener=function(t){e.el&&!e.el.nativeElement.contains(t.target)&&(e.activeItem=null,e.cd.markForCheck(),e.unbindDocumentClickListener())},document.addEventListener("click",this.documentClickListener))},e.prototype.unbindDocumentClickListener=function(){this.documentClickListener&&(document.removeEventListener("click",this.documentClickListener),this.documentClickListener=null)},e.prototype.ngOnDestroy=function(){this.unbindDocumentClickListener()},e}();l.decorators=[{type:t.Component,args:[{selector:"p-tieredMenuSub",template:'\n <ul [ngClass]="{\'p-submenu-list\': !root}">\n <ng-template ngFor let-child [ngForOf]="(root ? item : item.items)">\n <li *ngIf="child.separator" class="p-menu-separator" [ngClass]="{\'p-hidden\': child.visible === false}">\n <li *ngIf="!child.separator" #listItem [ngClass]="{\'p-menuitem\':true, \'p-menuitem-active\': child === activeItem, \'p-hidden\': child.visible === false}" (mouseenter)="onItemMouseEnter($event,child)">\n <a *ngIf="!child.routerLink" [attr.href]="child.url" [attr.data-automationid]="child.automationId" [attr.target]="child.target" [attr.title]="child.title" [attr.id]="child.id" (click)="onItemClick($event, child)"\n [ngClass]="{\'p-menuitem-link\':true,\'p-disabled\':child.disabled}" [ngStyle]="child.style" [class]="child.styleClass" \n [attr.tabindex]="child.disabled ? null : \'0\'" [attr.aria-haspopup]="item.items != null" [attr.aria-expanded]="item === activeItem" pRipple>\n <span class="p-menuitem-icon" *ngIf="child.icon" [ngClass]="child.icon"></span>\n <span class="p-menuitem-text" *ngIf="child.escape !== false; else htmlLabel">{{child.label}}</span>\n <ng-template #htmlLabel><span class="p-menuitem-text" [innerHTML]="child.label"></span></ng-template>\n <span class="p-submenu-icon pi pi-angle-right" *ngIf="child.items"></span>\n </a>\n <a *ngIf="child.routerLink" [routerLink]="child.routerLink" [attr.data-automationid]="child.automationId" [queryParams]="child.queryParams" [routerLinkActive]="\'p-menuitem-link-active\'" [routerLinkActiveOptions]="child.routerLinkActiveOptions||{exact:false}"\n [attr.target]="child.target" [attr.title]="child.title" [attr.id]="child.id" [attr.tabindex]="child.disabled ? null : \'0\'" role="menuitem"\n (click)="onItemClick($event, child)" [ngClass]="{\'p-menuitem-link\':true,\'p-disabled\':child.disabled}" [ngStyle]="child.style" [class]="child.styleClass"\n [fragment]="child.fragment" [queryParamsHandling]="child.queryParamsHandling" [preserveFragment]="child.preserveFragment" [skipLocationChange]="child.skipLocationChange" [replaceUrl]="child.replaceUrl" [state]="child.state" pRipple>\n <span class="p-menuitem-icon" *ngIf="child.icon" [ngClass]="child.icon"></span>\n <span class="p-menuitem-text" *ngIf="child.escape !== false; else htmlRouteLabel">{{child.label}}</span>\n <ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="child.label"></span></ng-template>\n <span class="p-submenu-icon pi pi-angle-right" *ngIf="child.items"></span>\n </a>\n <p-tieredMenuSub [parentActive]="child === activeItem" [item]="child" *ngIf="child.items" [mobileActive]="mobileActive" [autoDisplay]="true" (leafClick)="onLeafClick()"></p-tieredMenuSub>\n </li>\n </ng-template>\n </ul>\n ',encapsulation:t.ViewEncapsulation.None}]}],l.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ChangeDetectorRef}]},l.propDecorators={item:[{type:t.Input}],root:[{type:t.Input}],autoDisplay:[{type:t.Input}],autoZIndex:[{type:t.Input}],baseZIndex:[{type:t.Input}],mobileActive:[{type:t.Input}],parentActive:[{type:t.Input}],leafClick:[{type:t.Output}]};var a=function(){function e(e,t,n){this.el=e,this.renderer=t,this.cd=n,this.autoZIndex=!0,this.baseZIndex=0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear"}return e.prototype.toggle=function(e){this.visible?this.hide():this.show(e),this.preventDocumentDefault=!0},e.prototype.show=function(e){this.target=e.currentTarget,this.visible=!0,this.parentActive=!0,this.preventDocumentDefault=!0,this.cd.markForCheck()},e.prototype.onOverlayAnimationStart=function(e){switch(e.toState){case"visible":this.popup&&(this.container=e.element,this.moveOnTop(),this.appendOverlay(),i.DomHandler.absolutePosition(this.container,this.target),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener());break;case"void":this.onOverlayHide()}},e.prototype.appendOverlay=function(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.container):i.DomHandler.appendChild(this.container,this.appendTo))},e.prototype.restoreOverlayAppend=function(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.container)},e.prototype.moveOnTop=function(){this.autoZIndex&&(this.container.style.zIndex=String(this.baseZIndex+ ++i.DomHandler.zindex))},e.prototype.hide=function(){this.visible=!1,this.parentActive=!1,this.cd.markForCheck()},e.prototype.onWindowResize=function(){this.hide()},e.prototype.onLeafClick=function(){this.unbindDocumentClickListener()},e.prototype.bindDocumentClickListener=function(){var e=this;if(!this.documentClickListener){var t=this.el?this.el.nativeElement.ownerDocument:"document";this.documentClickListener=this.renderer.listen(t,"click",(function(){!e.preventDocumentDefault&&e.popup&&e.hide(),e.preventDocumentDefault=!1}))}},e.prototype.unbindDocumentClickListener=function(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)},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.visible&&e.hide()}))),this.scrollHandler.bindScrollListener()},e.prototype.unbindScrollListener=function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},e.prototype.onOverlayHide=function(){this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.preventDocumentDefault=!1,this.target=null},e.prototype.ngOnDestroy=function(){this.popup&&(this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.restoreOverlayAppend(),this.onOverlayHide())},e}();a.decorators=[{type:t.Component,args:[{selector:"p-tieredMenu",template:'\n <div [ngClass]="{\'p-tieredmenu p-component\':true, \'p-tieredmenu-overlay\':popup}" [class]="styleClass" [ngStyle]="style"\n [@overlayAnimation]="{value: \'visible\', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}" [@.disabled]="popup !== true"\n (@overlayAnimation.start)="onOverlayAnimationStart($event)" (click)="preventDocumentDefault=true" *ngIf="!popup || visible">\n <p-tieredMenuSub [item]="model" root="root" [parentActive]="parentActive" [baseZIndex]="baseZIndex" [autoZIndex]="autoZIndex" (leafClick)="onLeafClick()"></p-tieredMenuSub>\n </div>\n ',animations:[s.trigger("overlayAnimation",[s.transition(":enter",[s.style({opacity:0,transform:"scaleY(0.8)"}),s.animate("{{showTransitionParams}}")]),s.transition(":leave",[s.animate("{{hideTransitionParams}}",s.style({opacity:0}))])])],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,styles:[".p-tieredmenu-overlay{position:absolute}.p-tieredmenu ul{list-style:none;margin:0;padding:0}.p-tieredmenu .p-submenu-list{display:none;min-width:100%;position:absolute;z-index:1}.p-tieredmenu .p-menuitem-link{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex;overflow:hidden;position:relative;text-decoration:none}.p-tieredmenu .p-menuitem-text{line-height:1}.p-tieredmenu .p-menuitem{position:relative}.p-tieredmenu .p-menuitem-link .p-submenu-icon{margin-left:auto}.p-tieredmenu .p-menuitem-active>p-tieredmenusub>.p-submenu-list{display:block;left:100%;top:0}"]}]}],a.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ChangeDetectorRef}]},a.propDecorators={model:[{type:t.Input}],popup:[{type:t.Input}],style:[{type:t.Input}],styleClass:[{type:t.Input}],appendTo:[{type:t.Input}],autoZIndex:[{type:t.Input}],baseZIndex:[{type:t.Input}],showTransitionOptions:[{type:t.Input}],hideTransitionOptions:[{type:t.Input}]};var c=function(){};c.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,o.RouterModule,r.RippleModule],exports:[a,o.RouterModule],declarations:[a,l]}]}],e.TieredMenu=a,e.TieredMenuModule=c,e.TieredMenuSub=l,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=primeng-tieredmenu.umd.min.js.map