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

2 lines
10 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("@angular/router"),require("primeng/ripple")):"function"==typeof define&&define.amd?define("primeng/menubar",["exports","@angular/core","@angular/common","primeng/dom","primeng/api","@angular/router","primeng/ripple"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).primeng=e.primeng||{},e.primeng.menubar={}),e.ng.core,e.ng.common,e.primeng.dom,e.primeng.api,e.ng.router,e.primeng.ripple)}(this,(function(e,t,n,i,a,l,r){"use strict";var o=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}();o.decorators=[{type:t.Component,args:[{selector:"p-menubarSub",template:'\n <ul [ngClass]="{\'p-submenu-list\': !root, \'p-menubar-root-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" *ngIf="child.items" [ngClass]="{\'pi-angle-down\':root,\'pi-angle-right\':!root}"></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" *ngIf="child.items" [ngClass]="{\'pi-angle-down\':root,\'pi-angle-right\':!root}"></span>\n </a>\n <p-menubarSub [parentActive]="child === activeItem" [item]="child" *ngIf="child.items" [mobileActive]="mobileActive" [autoDisplay]="true" (leafClick)="onLeafClick()"></p-menubarSub>\n </li>\n </ng-template>\n </ul>\n ',encapsulation:t.ViewEncapsulation.None}]}],o.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ChangeDetectorRef}]},o.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 s=function(){function e(e,t,n){this.el=e,this.renderer=t,this.cd=n,this.autoZIndex=!0,this.baseZIndex=0}return Object.defineProperty(e.prototype,"autoDisplay",{get:function(){return this._autoDisplay},set:function(e){console.log("AutoDisplay property is deprecated and functionality is not available.")},enumerable:!1,configurable:!0}),e.prototype.ngAfterContentInit=function(){var e=this;this.templates.forEach((function(t){switch(t.getType()){case"start":e.startTemplate=t.template;break;case"end":e.endTemplate=t.template}}))},e.prototype.toggle=function(e){this.mobileActive=!this.mobileActive,i.DomHandler.findSingle(this.el.nativeElement,".p-menubar-root-list").style.zIndex=String(i.DomHandler.generateZIndex()),this.bindOutsideClickListener(),e.preventDefault()},e.prototype.bindOutsideClickListener=function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){!e.mobileActive||e.rootmenu.el.nativeElement===t.target||e.rootmenu.el.nativeElement.contains(t.target)||e.menubutton.nativeElement===t.target||e.menubutton.nativeElement.contains(t.target)||(e.mobileActive=!1,e.cd.markForCheck())},document.addEventListener("click",this.outsideClickListener))},e.prototype.onLeafClick=function(){this.mobileActive=!1,this.unbindOutsideClickListener()},e.prototype.unbindOutsideClickListener=function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},e.prototype.ngOnDestroy=function(){this.unbindOutsideClickListener()},e}();s.decorators=[{type:t.Component,args:[{selector:"p-menubar",template:'\n <div [ngClass]="{\'p-menubar p-component\':true, \'p-menubar-mobile-active\': mobileActive}" [class]="styleClass" [ngStyle]="style">\n <div class="p-menubar-start" *ngIf="startTemplate">\n <ng-container *ngTemplateOutlet="startTemplate"></ng-container>\n </div>\n <a #menubutton tabindex="0" class="p-menubar-button" (click)="toggle($event)">\n <i class="pi pi-bars"></i>\n </a>\n <p-menubarSub #rootmenu [item]="model" root="root" [baseZIndex]="baseZIndex" (leafClick)="onLeafClick()" [autoZIndex]="autoZIndex" [mobileActive]="mobileActive"></p-menubarSub>\n <div class="p-menubar-end" *ngIf="endTemplate; else legacy">\n <ng-container *ngTemplateOutlet="endTemplate"></ng-container>\n </div>\n <ng-template #legacy>\n <div class="p-menubar-end">\n <ng-content></ng-content>\n </div>\n </ng-template>\n </div>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,styles:[".p-menubar{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}.p-menubar ul{list-style:none;margin:0;padding:0}.p-menubar .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-menubar .p-menuitem-text{line-height:1}.p-menubar .p-menuitem{position:relative}.p-menubar-root-list{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}.p-menubar-root-list>li ul{display:none;z-index:1}.p-menubar-root-list>.p-menuitem-active>p-menubarsub>.p-submenu-list{display:block}.p-menubar .p-submenu-list{display:none;position:absolute;z-index:1}.p-menubar .p-submenu-list>.p-menuitem-active>p-menubarsub>.p-submenu-list{display:block;left:100%;top:0}.p-menubar .p-submenu-list .p-menuitem-link .p-submenu-icon{margin-left:auto}.p-menubar .p-menubar-custom,.p-menubar .p-menubar-end{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center;margin-left:auto}.p-menubar-button{-ms-flex-align:center;-ms-flex-pack:center;align-items:center;cursor:pointer;display:none;justify-content:center}"]}]}],s.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:t.ChangeDetectorRef}]},s.propDecorators={model:[{type:t.Input}],style:[{type:t.Input}],styleClass:[{type:t.Input}],autoZIndex:[{type:t.Input}],baseZIndex:[{type:t.Input}],templates:[{type:t.ContentChildren,args:[a.PrimeTemplate]}],autoDisplay:[{type:t.Input}],menubutton:[{type:t.ViewChild,args:["menubutton"]}],rootmenu:[{type:t.ViewChild,args:["rootmenu"]}]};var c=function(){};c.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,l.RouterModule,r.RippleModule],exports:[s,l.RouterModule],declarations:[s,o]}]}],e.Menubar=s,e.MenubarModule=c,e.MenubarSub=o,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=primeng-menubar.umd.min.js.map