[59329aa] | 1 | import { NgModule, Component, Input, ChangeDetectionStrategy, ViewEncapsulation, Output, EventEmitter } from '@angular/core';
|
---|
| 2 | import { CommonModule } from '@angular/common';
|
---|
| 3 | import { ConnectedOverlayScrollHandler, DomHandler } from 'primeng/dom';
|
---|
| 4 | import { RouterModule } from '@angular/router';
|
---|
| 5 | import { RippleModule } from 'primeng/ripple';
|
---|
| 6 | import { animate, style, transition, trigger } from '@angular/animations';
|
---|
| 7 | import { ZIndexUtils } from 'primeng/utils';
|
---|
| 8 | import { TooltipModule } from 'primeng/tooltip';
|
---|
| 9 | import * as i0 from "@angular/core";
|
---|
| 10 | import * as i1 from "@angular/common";
|
---|
| 11 | import * as i2 from "primeng/tooltip";
|
---|
| 12 | import * as i3 from "primeng/ripple";
|
---|
| 13 | import * as i4 from "@angular/router";
|
---|
| 14 | import * as i5 from "primeng/api";
|
---|
| 15 | export class TieredMenuSub {
|
---|
| 16 | constructor(el, renderer, cd) {
|
---|
| 17 | this.el = el;
|
---|
| 18 | this.renderer = renderer;
|
---|
| 19 | this.cd = cd;
|
---|
| 20 | this.autoZIndex = true;
|
---|
| 21 | this.baseZIndex = 0;
|
---|
| 22 | this.leafClick = new EventEmitter();
|
---|
| 23 | this.keydownItem = new EventEmitter();
|
---|
| 24 | this.menuHoverActive = false;
|
---|
| 25 | }
|
---|
| 26 | get parentActive() {
|
---|
| 27 | return this._parentActive;
|
---|
| 28 | }
|
---|
| 29 | set parentActive(value) {
|
---|
| 30 | if (!this.root) {
|
---|
| 31 | this._parentActive = value;
|
---|
| 32 | if (!value)
|
---|
| 33 | this.activeItem = null;
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
| 36 | onItemClick(event, item) {
|
---|
| 37 | if (item.disabled) {
|
---|
| 38 | event.preventDefault();
|
---|
| 39 | return;
|
---|
| 40 | }
|
---|
| 41 | if (!item.url && !item.routerLink) {
|
---|
| 42 | event.preventDefault();
|
---|
| 43 | }
|
---|
| 44 | if (item.command) {
|
---|
| 45 | item.command({
|
---|
| 46 | originalEvent: event,
|
---|
| 47 | item: item
|
---|
| 48 | });
|
---|
| 49 | }
|
---|
| 50 | if (item.items) {
|
---|
| 51 | if (this.activeItem && item === this.activeItem) {
|
---|
| 52 | this.activeItem = null;
|
---|
| 53 | this.unbindDocumentClickListener();
|
---|
| 54 | }
|
---|
| 55 | else {
|
---|
| 56 | this.activeItem = item;
|
---|
| 57 | if (this.root) {
|
---|
| 58 | this.bindDocumentClickListener();
|
---|
| 59 | }
|
---|
| 60 | }
|
---|
| 61 | }
|
---|
| 62 | if (!item.items) {
|
---|
| 63 | this.onLeafClick();
|
---|
| 64 | }
|
---|
| 65 | }
|
---|
| 66 | onItemMouseEnter(event, item) {
|
---|
| 67 | if (item.disabled || this.mobileActive) {
|
---|
| 68 | event.preventDefault();
|
---|
| 69 | return;
|
---|
| 70 | }
|
---|
| 71 | if (this.root) {
|
---|
| 72 | if (this.activeItem || this.autoDisplay || this.popup) {
|
---|
| 73 | this.activeItem = item;
|
---|
| 74 | this.bindDocumentClickListener();
|
---|
| 75 | }
|
---|
| 76 | }
|
---|
| 77 | else {
|
---|
| 78 | this.activeItem = item;
|
---|
| 79 | this.bindDocumentClickListener();
|
---|
| 80 | }
|
---|
| 81 | }
|
---|
| 82 | onLeafClick() {
|
---|
| 83 | this.activeItem = null;
|
---|
| 84 | if (this.root) {
|
---|
| 85 | this.unbindDocumentClickListener();
|
---|
| 86 | }
|
---|
| 87 | this.leafClick.emit();
|
---|
| 88 | }
|
---|
| 89 | onItemKeyDown(event, item) {
|
---|
| 90 | let listItem = event.currentTarget.parentElement;
|
---|
| 91 | switch (event.key) {
|
---|
| 92 | case 'ArrowDown':
|
---|
| 93 | var nextItem = this.findNextItem(listItem);
|
---|
| 94 | if (nextItem) {
|
---|
| 95 | nextItem.children[0].focus();
|
---|
| 96 | }
|
---|
| 97 | event.preventDefault();
|
---|
| 98 | break;
|
---|
| 99 | case 'ArrowUp':
|
---|
| 100 | var prevItem = this.findPrevItem(listItem);
|
---|
| 101 | if (prevItem) {
|
---|
| 102 | prevItem.children[0].focus();
|
---|
| 103 | }
|
---|
| 104 | event.preventDefault();
|
---|
| 105 | break;
|
---|
| 106 | case 'ArrowRight':
|
---|
| 107 | if (item.items) {
|
---|
| 108 | this.activeItem = item;
|
---|
| 109 | if (this.root) {
|
---|
| 110 | this.bindDocumentClickListener();
|
---|
| 111 | }
|
---|
| 112 | setTimeout(() => {
|
---|
| 113 | listItem.children[1].children[0].children[0].children[0].focus();
|
---|
| 114 | }, 50);
|
---|
| 115 | }
|
---|
| 116 | event.preventDefault();
|
---|
| 117 | break;
|
---|
| 118 | default:
|
---|
| 119 | break;
|
---|
| 120 | }
|
---|
| 121 | this.keydownItem.emit({
|
---|
| 122 | originalEvent: event,
|
---|
| 123 | element: listItem
|
---|
| 124 | });
|
---|
| 125 | }
|
---|
| 126 | findNextItem(item) {
|
---|
| 127 | let nextItem = item.nextElementSibling;
|
---|
| 128 | if (nextItem)
|
---|
| 129 | return DomHandler.hasClass(nextItem, 'p-disabled') || !DomHandler.hasClass(nextItem, 'p-menuitem') ? this.findNextItem(nextItem) : nextItem;
|
---|
| 130 | else
|
---|
| 131 | return null;
|
---|
| 132 | }
|
---|
| 133 | findPrevItem(item) {
|
---|
| 134 | let prevItem = item.previousElementSibling;
|
---|
| 135 | if (prevItem)
|
---|
| 136 | return DomHandler.hasClass(prevItem, 'p-disabled') || !DomHandler.hasClass(prevItem, 'p-menuitem') ? this.findPrevItem(prevItem) : prevItem;
|
---|
| 137 | else
|
---|
| 138 | return null;
|
---|
| 139 | }
|
---|
| 140 | onChildItemKeyDown(event) {
|
---|
| 141 | if (event.originalEvent.key === 'ArrowLeft') {
|
---|
| 142 | this.activeItem = null;
|
---|
| 143 | if (this.root) {
|
---|
| 144 | this.unbindDocumentClickListener();
|
---|
| 145 | }
|
---|
| 146 | event.element.parentElement.parentElement.parentElement.children[0].focus();
|
---|
| 147 | }
|
---|
| 148 | }
|
---|
| 149 | bindDocumentClickListener() {
|
---|
| 150 | if (!this.documentClickListener) {
|
---|
| 151 | this.documentClickListener = (event) => {
|
---|
| 152 | if (this.el && !this.el.nativeElement.contains(event.target)) {
|
---|
| 153 | this.activeItem = null;
|
---|
| 154 | this.cd.markForCheck();
|
---|
| 155 | this.unbindDocumentClickListener();
|
---|
| 156 | }
|
---|
| 157 | };
|
---|
| 158 | document.addEventListener('click', this.documentClickListener);
|
---|
| 159 | }
|
---|
| 160 | }
|
---|
| 161 | unbindDocumentClickListener() {
|
---|
| 162 | if (this.documentClickListener) {
|
---|
| 163 | document.removeEventListener('click', this.documentClickListener);
|
---|
| 164 | this.documentClickListener = null;
|
---|
| 165 | }
|
---|
| 166 | }
|
---|
| 167 | ngOnDestroy() {
|
---|
| 168 | this.unbindDocumentClickListener();
|
---|
| 169 | }
|
---|
| 170 | }
|
---|
| 171 | TieredMenuSub.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TieredMenuSub, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
---|
| 172 | TieredMenuSub.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: TieredMenuSub, selector: "p-tieredMenuSub", inputs: { item: "item", root: "root", autoDisplay: "autoDisplay", autoZIndex: "autoZIndex", baseZIndex: "baseZIndex", mobileActive: "mobileActive", popup: "popup", parentActive: "parentActive" }, outputs: { leafClick: "leafClick", keydownItem: "keydownItem" }, host: { classAttribute: "p-element" }, ngImport: i0, template: `
|
---|
| 173 | <ul [ngClass]="{'p-submenu-list': !root}">
|
---|
| 174 | <ng-template ngFor let-child [ngForOf]="(root ? item : item.items)">
|
---|
| 175 | <li *ngIf="child.separator" class="p-menu-separator" [ngClass]="{'p-hidden': child.visible === false}">
|
---|
| 176 | <li *ngIf="!child.separator" #listItem [ngClass]="{'p-menuitem':true, 'p-menuitem-active': child === activeItem, 'p-hidden': child.visible === false}" [ngStyle]="child.style" [class]="child.styleClass" pTooltip [tooltipOptions]="child.tooltipOptions">
|
---|
| 177 | <a *ngIf="!child.routerLink" (keydown)="onItemKeyDown($event, child)" [attr.href]="child.url" [attr.data-automationid]="child.automationId" [attr.target]="child.target" [attr.title]="child.title" [attr.id]="child.id"
|
---|
| 178 | (click)="onItemClick($event, child)" (mouseenter)="onItemMouseEnter($event,child)"
|
---|
| 179 | [ngClass]="{'p-menuitem-link':true,'p-disabled':child.disabled}"
|
---|
| 180 | [attr.tabindex]="child.disabled ? null : '0'" [attr.aria-haspopup]="item.items != null" [attr.aria-expanded]="item === activeItem" pRipple>
|
---|
| 181 | <span class="p-menuitem-icon" *ngIf="child.icon" [ngClass]="child.icon"></span>
|
---|
| 182 | <span class="p-menuitem-text" *ngIf="child.escape !== false; else htmlLabel">{{child.label}}</span>
|
---|
| 183 | <ng-template #htmlLabel><span class="p-menuitem-text" [innerHTML]="child.label"></span></ng-template>
|
---|
| 184 | <span class="p-submenu-icon pi pi-angle-right" *ngIf="child.items"></span>
|
---|
| 185 | </a>
|
---|
| 186 | <a *ngIf="child.routerLink" (keydown)="onItemKeyDown($event, child)" [routerLink]="child.routerLink" [attr.data-automationid]="child.automationId" [queryParams]="child.queryParams" [routerLinkActive]="'p-menuitem-link-active'" [routerLinkActiveOptions]="child.routerLinkActiveOptions||{exact:false}"
|
---|
| 187 | [attr.target]="child.target" [attr.title]="child.title" [attr.id]="child.id" [attr.tabindex]="child.disabled ? null : '0'" role="menuitem"
|
---|
| 188 | (click)="onItemClick($event, child)" (mouseenter)="onItemMouseEnter($event,child)" [ngClass]="{'p-menuitem-link':true,'p-disabled':child.disabled}"
|
---|
| 189 | [fragment]="child.fragment" [queryParamsHandling]="child.queryParamsHandling" [preserveFragment]="child.preserveFragment" [skipLocationChange]="child.skipLocationChange" [replaceUrl]="child.replaceUrl" [state]="child.state" pRipple>
|
---|
| 190 | <span class="p-menuitem-icon" *ngIf="child.icon" [ngClass]="child.icon"></span>
|
---|
| 191 | <span class="p-menuitem-text" *ngIf="child.escape !== false; else htmlRouteLabel">{{child.label}}</span>
|
---|
| 192 | <ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="child.label"></span></ng-template>
|
---|
| 193 | <span class="p-submenu-icon pi pi-angle-right" *ngIf="child.items"></span>
|
---|
| 194 | </a>
|
---|
| 195 | <p-tieredMenuSub (keydownItem)="onChildItemKeyDown($event)" [parentActive]="child === activeItem" [item]="child" *ngIf="child.items" [mobileActive]="mobileActive" [autoDisplay]="autoDisplay" (leafClick)="onLeafClick()" [popup]="popup"></p-tieredMenuSub>
|
---|
| 196 | </li>
|
---|
| 197 | </ng-template>
|
---|
| 198 | </ul>
|
---|
| 199 | `, isInline: true, components: [{ type: TieredMenuSub, selector: "p-tieredMenuSub", inputs: ["item", "root", "autoDisplay", "autoZIndex", "baseZIndex", "mobileActive", "popup", "parentActive"], outputs: ["leafClick", "keydownItem"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.Ripple, selector: "[pRipple]" }, { type: i4.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i4.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], encapsulation: i0.ViewEncapsulation.None });
|
---|
| 200 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TieredMenuSub, decorators: [{
|
---|
| 201 | type: Component,
|
---|
| 202 | args: [{
|
---|
| 203 | selector: 'p-tieredMenuSub',
|
---|
| 204 | template: `
|
---|
| 205 | <ul [ngClass]="{'p-submenu-list': !root}">
|
---|
| 206 | <ng-template ngFor let-child [ngForOf]="(root ? item : item.items)">
|
---|
| 207 | <li *ngIf="child.separator" class="p-menu-separator" [ngClass]="{'p-hidden': child.visible === false}">
|
---|
| 208 | <li *ngIf="!child.separator" #listItem [ngClass]="{'p-menuitem':true, 'p-menuitem-active': child === activeItem, 'p-hidden': child.visible === false}" [ngStyle]="child.style" [class]="child.styleClass" pTooltip [tooltipOptions]="child.tooltipOptions">
|
---|
| 209 | <a *ngIf="!child.routerLink" (keydown)="onItemKeyDown($event, child)" [attr.href]="child.url" [attr.data-automationid]="child.automationId" [attr.target]="child.target" [attr.title]="child.title" [attr.id]="child.id"
|
---|
| 210 | (click)="onItemClick($event, child)" (mouseenter)="onItemMouseEnter($event,child)"
|
---|
| 211 | [ngClass]="{'p-menuitem-link':true,'p-disabled':child.disabled}"
|
---|
| 212 | [attr.tabindex]="child.disabled ? null : '0'" [attr.aria-haspopup]="item.items != null" [attr.aria-expanded]="item === activeItem" pRipple>
|
---|
| 213 | <span class="p-menuitem-icon" *ngIf="child.icon" [ngClass]="child.icon"></span>
|
---|
| 214 | <span class="p-menuitem-text" *ngIf="child.escape !== false; else htmlLabel">{{child.label}}</span>
|
---|
| 215 | <ng-template #htmlLabel><span class="p-menuitem-text" [innerHTML]="child.label"></span></ng-template>
|
---|
| 216 | <span class="p-submenu-icon pi pi-angle-right" *ngIf="child.items"></span>
|
---|
| 217 | </a>
|
---|
| 218 | <a *ngIf="child.routerLink" (keydown)="onItemKeyDown($event, child)" [routerLink]="child.routerLink" [attr.data-automationid]="child.automationId" [queryParams]="child.queryParams" [routerLinkActive]="'p-menuitem-link-active'" [routerLinkActiveOptions]="child.routerLinkActiveOptions||{exact:false}"
|
---|
| 219 | [attr.target]="child.target" [attr.title]="child.title" [attr.id]="child.id" [attr.tabindex]="child.disabled ? null : '0'" role="menuitem"
|
---|
| 220 | (click)="onItemClick($event, child)" (mouseenter)="onItemMouseEnter($event,child)" [ngClass]="{'p-menuitem-link':true,'p-disabled':child.disabled}"
|
---|
| 221 | [fragment]="child.fragment" [queryParamsHandling]="child.queryParamsHandling" [preserveFragment]="child.preserveFragment" [skipLocationChange]="child.skipLocationChange" [replaceUrl]="child.replaceUrl" [state]="child.state" pRipple>
|
---|
| 222 | <span class="p-menuitem-icon" *ngIf="child.icon" [ngClass]="child.icon"></span>
|
---|
| 223 | <span class="p-menuitem-text" *ngIf="child.escape !== false; else htmlRouteLabel">{{child.label}}</span>
|
---|
| 224 | <ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="child.label"></span></ng-template>
|
---|
| 225 | <span class="p-submenu-icon pi pi-angle-right" *ngIf="child.items"></span>
|
---|
| 226 | </a>
|
---|
| 227 | <p-tieredMenuSub (keydownItem)="onChildItemKeyDown($event)" [parentActive]="child === activeItem" [item]="child" *ngIf="child.items" [mobileActive]="mobileActive" [autoDisplay]="autoDisplay" (leafClick)="onLeafClick()" [popup]="popup"></p-tieredMenuSub>
|
---|
| 228 | </li>
|
---|
| 229 | </ng-template>
|
---|
| 230 | </ul>
|
---|
| 231 | `,
|
---|
| 232 | encapsulation: ViewEncapsulation.None,
|
---|
| 233 | host: {
|
---|
| 234 | 'class': 'p-element'
|
---|
| 235 | }
|
---|
| 236 | }]
|
---|
| 237 | }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { item: [{
|
---|
| 238 | type: Input
|
---|
| 239 | }], root: [{
|
---|
| 240 | type: Input
|
---|
| 241 | }], autoDisplay: [{
|
---|
| 242 | type: Input
|
---|
| 243 | }], autoZIndex: [{
|
---|
| 244 | type: Input
|
---|
| 245 | }], baseZIndex: [{
|
---|
| 246 | type: Input
|
---|
| 247 | }], mobileActive: [{
|
---|
| 248 | type: Input
|
---|
| 249 | }], popup: [{
|
---|
| 250 | type: Input
|
---|
| 251 | }], parentActive: [{
|
---|
| 252 | type: Input
|
---|
| 253 | }], leafClick: [{
|
---|
| 254 | type: Output
|
---|
| 255 | }], keydownItem: [{
|
---|
| 256 | type: Output
|
---|
| 257 | }] } });
|
---|
| 258 | export class TieredMenu {
|
---|
| 259 | constructor(el, renderer, cd, config, overlayService) {
|
---|
| 260 | this.el = el;
|
---|
| 261 | this.renderer = renderer;
|
---|
| 262 | this.cd = cd;
|
---|
| 263 | this.config = config;
|
---|
| 264 | this.overlayService = overlayService;
|
---|
| 265 | this.autoZIndex = true;
|
---|
| 266 | this.baseZIndex = 0;
|
---|
| 267 | this.showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
|
---|
| 268 | this.hideTransitionOptions = '.1s linear';
|
---|
| 269 | }
|
---|
| 270 | toggle(event) {
|
---|
| 271 | if (this.visible)
|
---|
| 272 | this.hide();
|
---|
| 273 | else
|
---|
| 274 | this.show(event);
|
---|
| 275 | this.preventDocumentDefault = true;
|
---|
| 276 | }
|
---|
| 277 | show(event) {
|
---|
| 278 | this.target = event.currentTarget;
|
---|
| 279 | this.visible = true;
|
---|
| 280 | this.parentActive = true;
|
---|
| 281 | this.preventDocumentDefault = true;
|
---|
| 282 | this.cd.markForCheck();
|
---|
| 283 | }
|
---|
| 284 | onOverlayClick(event) {
|
---|
| 285 | if (this.popup) {
|
---|
| 286 | this.overlayService.add({
|
---|
| 287 | originalEvent: event,
|
---|
| 288 | target: this.el.nativeElement
|
---|
| 289 | });
|
---|
| 290 | }
|
---|
| 291 | this.preventDocumentDefault = true;
|
---|
| 292 | }
|
---|
| 293 | onOverlayAnimationStart(event) {
|
---|
| 294 | switch (event.toState) {
|
---|
| 295 | case 'visible':
|
---|
| 296 | if (this.popup) {
|
---|
| 297 | this.container = event.element;
|
---|
| 298 | this.moveOnTop();
|
---|
| 299 | this.appendOverlay();
|
---|
| 300 | DomHandler.absolutePosition(this.container, this.target);
|
---|
| 301 | this.bindDocumentClickListener();
|
---|
| 302 | this.bindDocumentResizeListener();
|
---|
| 303 | this.bindScrollListener();
|
---|
| 304 | }
|
---|
| 305 | break;
|
---|
| 306 | case 'void':
|
---|
| 307 | this.onOverlayHide();
|
---|
| 308 | break;
|
---|
| 309 | }
|
---|
| 310 | }
|
---|
| 311 | onOverlayAnimationEnd(event) {
|
---|
| 312 | switch (event.toState) {
|
---|
| 313 | case 'void':
|
---|
| 314 | ZIndexUtils.clear(event.element);
|
---|
| 315 | break;
|
---|
| 316 | }
|
---|
| 317 | }
|
---|
| 318 | appendOverlay() {
|
---|
| 319 | if (this.appendTo) {
|
---|
| 320 | if (this.appendTo === 'body')
|
---|
| 321 | document.body.appendChild(this.container);
|
---|
| 322 | else
|
---|
| 323 | DomHandler.appendChild(this.container, this.appendTo);
|
---|
| 324 | }
|
---|
| 325 | }
|
---|
| 326 | restoreOverlayAppend() {
|
---|
| 327 | if (this.container && this.appendTo) {
|
---|
| 328 | this.el.nativeElement.appendChild(this.container);
|
---|
| 329 | }
|
---|
| 330 | }
|
---|
| 331 | moveOnTop() {
|
---|
| 332 | if (this.autoZIndex) {
|
---|
| 333 | ZIndexUtils.set('menu', this.container, this.baseZIndex + this.config.zIndex.menu);
|
---|
| 334 | }
|
---|
| 335 | }
|
---|
| 336 | hide() {
|
---|
| 337 | this.visible = false;
|
---|
| 338 | this.parentActive = false;
|
---|
| 339 | this.cd.markForCheck();
|
---|
| 340 | }
|
---|
| 341 | onWindowResize() {
|
---|
| 342 | this.hide();
|
---|
| 343 | }
|
---|
| 344 | onLeafClick() {
|
---|
| 345 | if (this.popup) {
|
---|
| 346 | this.hide();
|
---|
| 347 | }
|
---|
| 348 | this.unbindDocumentClickListener();
|
---|
| 349 | }
|
---|
| 350 | bindDocumentClickListener() {
|
---|
| 351 | if (!this.documentClickListener) {
|
---|
| 352 | const documentTarget = this.el ? this.el.nativeElement.ownerDocument : 'document';
|
---|
| 353 | this.documentClickListener = this.renderer.listen(documentTarget, 'click', () => {
|
---|
| 354 | if (!this.preventDocumentDefault && this.popup) {
|
---|
| 355 | this.hide();
|
---|
| 356 | }
|
---|
| 357 | this.preventDocumentDefault = false;
|
---|
| 358 | });
|
---|
| 359 | }
|
---|
| 360 | }
|
---|
| 361 | unbindDocumentClickListener() {
|
---|
| 362 | if (this.documentClickListener) {
|
---|
| 363 | this.documentClickListener();
|
---|
| 364 | this.documentClickListener = null;
|
---|
| 365 | }
|
---|
| 366 | }
|
---|
| 367 | bindDocumentResizeListener() {
|
---|
| 368 | this.documentResizeListener = this.onWindowResize.bind(this);
|
---|
| 369 | window.addEventListener('resize', this.documentResizeListener);
|
---|
| 370 | }
|
---|
| 371 | unbindDocumentResizeListener() {
|
---|
| 372 | if (this.documentResizeListener) {
|
---|
| 373 | window.removeEventListener('resize', this.documentResizeListener);
|
---|
| 374 | this.documentResizeListener = null;
|
---|
| 375 | }
|
---|
| 376 | }
|
---|
| 377 | bindScrollListener() {
|
---|
| 378 | if (!this.scrollHandler) {
|
---|
| 379 | this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, () => {
|
---|
| 380 | if (this.visible) {
|
---|
| 381 | this.hide();
|
---|
| 382 | }
|
---|
| 383 | });
|
---|
| 384 | }
|
---|
| 385 | this.scrollHandler.bindScrollListener();
|
---|
| 386 | }
|
---|
| 387 | unbindScrollListener() {
|
---|
| 388 | if (this.scrollHandler) {
|
---|
| 389 | this.scrollHandler.unbindScrollListener();
|
---|
| 390 | }
|
---|
| 391 | }
|
---|
| 392 | onOverlayHide() {
|
---|
| 393 | this.unbindDocumentClickListener();
|
---|
| 394 | this.unbindDocumentResizeListener();
|
---|
| 395 | this.unbindScrollListener();
|
---|
| 396 | this.preventDocumentDefault = false;
|
---|
| 397 | this.target = null;
|
---|
| 398 | }
|
---|
| 399 | ngOnDestroy() {
|
---|
| 400 | if (this.popup) {
|
---|
| 401 | if (this.scrollHandler) {
|
---|
| 402 | this.scrollHandler.destroy();
|
---|
| 403 | this.scrollHandler = null;
|
---|
| 404 | }
|
---|
| 405 | if (this.container && this.autoZIndex) {
|
---|
| 406 | ZIndexUtils.clear(this.container);
|
---|
| 407 | }
|
---|
| 408 | this.restoreOverlayAppend();
|
---|
| 409 | this.onOverlayHide();
|
---|
| 410 | }
|
---|
| 411 | }
|
---|
| 412 | }
|
---|
| 413 | TieredMenu.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TieredMenu, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i5.PrimeNGConfig }, { token: i5.OverlayService }], target: i0.ɵɵFactoryTarget.Component });
|
---|
| 414 | TieredMenu.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: TieredMenu, selector: "p-tieredMenu", inputs: { model: "model", popup: "popup", style: "style", styleClass: "styleClass", appendTo: "appendTo", autoZIndex: "autoZIndex", baseZIndex: "baseZIndex", autoDisplay: "autoDisplay", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions" }, host: { classAttribute: "p-element" }, ngImport: i0, template: `
|
---|
| 415 | <div [ngClass]="{'p-tieredmenu p-component':true, 'p-tieredmenu-overlay':popup}" [class]="styleClass" [ngStyle]="style" (click)="onOverlayClick($event)"
|
---|
| 416 | [@overlayAnimation]="{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}" [@.disabled]="popup !== true"
|
---|
| 417 | (@overlayAnimation.start)="onOverlayAnimationStart($event)" (@overlayAnimation.done)="onOverlayAnimationEnd($event)" *ngIf="!popup || visible">
|
---|
| 418 | <p-tieredMenuSub [item]="model" root="root" [parentActive]="parentActive" [baseZIndex]="baseZIndex" [autoZIndex]="autoZIndex" (leafClick)="onLeafClick()"
|
---|
| 419 | [autoDisplay]="autoDisplay" [popup]="popup"></p-tieredMenuSub>
|
---|
| 420 | </div>
|
---|
| 421 | `, isInline: true, styles: [".p-tieredmenu-overlay{position:absolute;top:0;left:0}.p-tieredmenu ul{margin:0;padding:0;list-style:none}.p-tieredmenu .p-submenu-list{position:absolute;min-width:100%;z-index:1;display:none}.p-tieredmenu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden;position:relative}.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}\n"], components: [{ type: TieredMenuSub, selector: "p-tieredMenuSub", inputs: ["item", "root", "autoDisplay", "autoZIndex", "baseZIndex", "mobileActive", "popup", "parentActive"], outputs: ["leafClick", "keydownItem"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], animations: [
|
---|
| 422 | trigger('overlayAnimation', [
|
---|
| 423 | transition(':enter', [
|
---|
| 424 | style({ opacity: 0, transform: 'scaleY(0.8)' }),
|
---|
| 425 | animate('{{showTransitionParams}}')
|
---|
| 426 | ]),
|
---|
| 427 | transition(':leave', [
|
---|
| 428 | animate('{{hideTransitionParams}}', style({ opacity: 0 }))
|
---|
| 429 | ])
|
---|
| 430 | ])
|
---|
| 431 | ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
---|
| 432 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TieredMenu, decorators: [{
|
---|
| 433 | type: Component,
|
---|
| 434 | args: [{ selector: 'p-tieredMenu', template: `
|
---|
| 435 | <div [ngClass]="{'p-tieredmenu p-component':true, 'p-tieredmenu-overlay':popup}" [class]="styleClass" [ngStyle]="style" (click)="onOverlayClick($event)"
|
---|
| 436 | [@overlayAnimation]="{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}" [@.disabled]="popup !== true"
|
---|
| 437 | (@overlayAnimation.start)="onOverlayAnimationStart($event)" (@overlayAnimation.done)="onOverlayAnimationEnd($event)" *ngIf="!popup || visible">
|
---|
| 438 | <p-tieredMenuSub [item]="model" root="root" [parentActive]="parentActive" [baseZIndex]="baseZIndex" [autoZIndex]="autoZIndex" (leafClick)="onLeafClick()"
|
---|
| 439 | [autoDisplay]="autoDisplay" [popup]="popup"></p-tieredMenuSub>
|
---|
| 440 | </div>
|
---|
| 441 | `, animations: [
|
---|
| 442 | trigger('overlayAnimation', [
|
---|
| 443 | transition(':enter', [
|
---|
| 444 | style({ opacity: 0, transform: 'scaleY(0.8)' }),
|
---|
| 445 | animate('{{showTransitionParams}}')
|
---|
| 446 | ]),
|
---|
| 447 | transition(':leave', [
|
---|
| 448 | animate('{{hideTransitionParams}}', style({ opacity: 0 }))
|
---|
| 449 | ])
|
---|
| 450 | ])
|
---|
| 451 | ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
---|
| 452 | 'class': 'p-element'
|
---|
| 453 | }, styles: [".p-tieredmenu-overlay{position:absolute;top:0;left:0}.p-tieredmenu ul{margin:0;padding:0;list-style:none}.p-tieredmenu .p-submenu-list{position:absolute;min-width:100%;z-index:1;display:none}.p-tieredmenu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden;position:relative}.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}\n"] }]
|
---|
| 454 | }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i5.PrimeNGConfig }, { type: i5.OverlayService }]; }, propDecorators: { model: [{
|
---|
| 455 | type: Input
|
---|
| 456 | }], popup: [{
|
---|
| 457 | type: Input
|
---|
| 458 | }], style: [{
|
---|
| 459 | type: Input
|
---|
| 460 | }], styleClass: [{
|
---|
| 461 | type: Input
|
---|
| 462 | }], appendTo: [{
|
---|
| 463 | type: Input
|
---|
| 464 | }], autoZIndex: [{
|
---|
| 465 | type: Input
|
---|
| 466 | }], baseZIndex: [{
|
---|
| 467 | type: Input
|
---|
| 468 | }], autoDisplay: [{
|
---|
| 469 | type: Input
|
---|
| 470 | }], showTransitionOptions: [{
|
---|
| 471 | type: Input
|
---|
| 472 | }], hideTransitionOptions: [{
|
---|
| 473 | type: Input
|
---|
| 474 | }] } });
|
---|
| 475 | export class TieredMenuModule {
|
---|
| 476 | }
|
---|
| 477 | TieredMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TieredMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
---|
| 478 | TieredMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TieredMenuModule, declarations: [TieredMenu, TieredMenuSub], imports: [CommonModule, RouterModule, RippleModule, TooltipModule], exports: [TieredMenu, RouterModule, TooltipModule] });
|
---|
| 479 | TieredMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TieredMenuModule, imports: [[CommonModule, RouterModule, RippleModule, TooltipModule], RouterModule, TooltipModule] });
|
---|
| 480 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TieredMenuModule, decorators: [{
|
---|
| 481 | type: NgModule,
|
---|
| 482 | args: [{
|
---|
| 483 | imports: [CommonModule, RouterModule, RippleModule, TooltipModule],
|
---|
| 484 | exports: [TieredMenu, RouterModule, TooltipModule],
|
---|
| 485 | declarations: [TieredMenu, TieredMenuSub]
|
---|
| 486 | }]
|
---|
| 487 | }] });
|
---|
| 488 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGllcmVkbWVudS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy90aWVyZWRtZW51L3RpZXJlZG1lbnUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxTQUFTLEVBQWMsS0FBSyxFQUEwQyx1QkFBdUIsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLEVBQUUsWUFBWSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ2pMLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsNkJBQTZCLEVBQUUsVUFBVSxFQUFFLE1BQU0sYUFBYSxDQUFDO0FBRXhFLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDOUMsT0FBTyxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsVUFBVSxFQUFFLE9BQU8sRUFBa0IsTUFBTSxxQkFBcUIsQ0FBQztBQUMxRixPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzVDLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQzs7Ozs7OztBQXFDaEQsTUFBTSxPQUFPLGFBQWE7SUF5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oaXRlbS5jb21tYW5kKSB7XG4gICAgICAgICAgICBpdGVtLmNvbW1hbmQoe1xuICAgICAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGV2ZW50LFxuICAgICAgICAgICAgICAgIGl0ZW06IGl0ZW1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGl0ZW0uaXRlbXMpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmFjdGl2ZUl0ZW0gJiYgaXRlbSA9PT0gdGhpcy5hY3RpdmVJdGVtKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5hY3RpdmVJdGVtID0gbnVsbDtcbiAgICAgICAgICAgICAgICB0aGlzLnVuYmluZERvY3VtZW50Q2xpY2tMaXN0ZW5lcigpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5hY3RpdmVJdGVtID0gaXRlbTtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5yb290KSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYmluZERvY3VtZW50Q2xpY2tMaXN0ZW5lcigpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghaXRlbS5pdGVtcykge1xuICAgICAgICAgICAgdGhpcy5vbkxlYWZDbGljaygpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25JdGVtTW91c2VFbnRlcihldmVudCwgaXRlbSkge1xuICAgICAgICBpZiAoaXRlbS5kaXNhYmxlZCB8fCB0aGlzLm1vYmlsZUFjdGl2ZSkge1xuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLnJvb3QpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmFjdGl2ZUl0ZW0gfHwgdGhpcy5hdXRvRGlzcGxheSB8fCB0aGlzLnBvcHVwKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5hY3RpdmVJdGVtID0gaXRlbTtcbiAgICAgICAgICAgICAgICB0aGlzLmJpbmREb2N1bWVudENsaWNrTGlzdGVuZXIoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuYWN0aXZlSXRlbSA9IGl0ZW07XG4gICAgICAgICAgICB0aGlzLmJpbmREb2N1bWVudENsaWNrTGlzdGVuZXIoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uTGVhZkNsaWNrKCkge1xuICAgICAgICB0aGlzLmFjdGl2ZUl0ZW0gPSBudWxsO1xuICAgICAgICBpZiAodGhpcy5yb290KSB7XG4gICAgICAgICAgICB0aGlzLnVuYmluZERvY3VtZW50Q2xpY2tMaXN0ZW5lcigpO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5sZWFmQ2xpY2suZW1pdCgpO1xuICAgIH1cblxuICAgIG9uSXRlbUtleURvd24oZXZlbnQsIGl0ZW0pIHtcbiAgICAgICAgbGV0IGxpc3RJdGVtID0gZXZlbnQuY3VycmVudFRhcmdldC5wYXJlbnRFbGVtZW50O1xuXG4gICAgICAgIHN3aXRjaCAoZXZlbnQua2V5KSB7XG4gICAgICAgICAgICBjYXNlICdBcnJvd0Rvd24nOlxuICAgICAgICAgICAgICAgIHZhciBuZXh0SXRlbSA9IHRoaXMuZmluZE5leHRJdGVtKGxpc3RJdGVtKTtcbiAgICAgICAgICAgICAgICBpZiAobmV4dEl0ZW0pIHtcbiAgICAgICAgICAgICAgICAgICAgbmV4dEl0ZW0uY2hpbGRyZW5bMF0uZm9jdXMoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ0Fycm93VXAnOlxuICAgICAgICAgICAgICAgIHZhciBwcmV2SXRlbSA9IHRoaXMuZmluZFByZXZJdGVtKGxpc3RJdGVtKTtcbiAgICAgICAgICAgICAgICBpZiAocHJldkl0ZW0pIHtcbiAgICAgICAgICAgICAgICAgICAgcHJldkl0ZW0uY2hpbGRyZW5bMF0uZm9jdXMoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ0Fycm93UmlnaHQnOlxuICAgICAgICAgICAgICAgIGlmIChpdGVtLml0ZW1zKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYWN0aXZlSXRlbSA9IGl0ZW07XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMucm9vdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5iaW5kRG9jdW1lbnRDbGlja0xpc3RlbmVyKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RJdGVtLmNoaWxkcmVuWzFdLmNoaWxkcmVuWzBdLmNoaWxkcmVuWzBdLmNoaWxkcmVuWzBdLmZvY3VzKCk7XG4gICAgICAgICAgICAgICAgICAgIH0sIDUwKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMua2V5ZG93bkl0ZW0uZW1pdCh7XG4gICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBldmVudCxcbiAgICAgICAgICAgIGVsZW1lbnQ6IGxpc3RJdGVtXG4gICAgICAgI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ICAgICAgICB9XG5cbiAgICAgICAgICAgIGV2ZW50LmVsZW1lbnQucGFyZW50RWxlbWVudC5wYXJlbnRFbGVtZW50LnBhcmVudEVsZW1lbnQuY2hpbGRyZW5bMF0uZm9jdXMoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGJpbmREb2N1bWVudENsaWNrTGlzdGVuZXIoKSB7XG4gICAgICAgIGlmICghdGhpcy5kb2N1bWVudENsaWNrTGlzdGVuZXIpIHtcbiAgICAgICAgICAgIHRoaXMuZG9jdW1lbnRDbGlja0xpc3RlbmVyID0gKGV2ZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZWwgJiYgIXRoaXMuZWwubmF0aXZlRWxlbWVudC5jb250YWlucyhldmVudC50YXJnZXQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYWN0aXZlSXRlbSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2QubWFya0ZvckNoZWNrKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudW5iaW5kRG9jdW1lbnRDbGlja0xpc3RlbmVyKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCB0aGlzLmRvY3VtZW50Q2xpY2tMaXN0ZW5lcik7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICB1bmJpbmREb2N1bWVudENsaWNrTGlzdGVuZXIoKSB7XG4gICAgICAgIGlmICh0aGlzLmRvY3VtZW50Q2xpY2tMaXN0ZW5lcikge1xuICAgICAgICAgICAgZG9jdW1lbnQucmVtb3ZlRXZlbnRMaXN0ZW5lcignY2xpY2snLCB0aGlzLmRvY3VtZW50Q2xpY2tMaXN0ZW5lcik7XG4gICAgICAgICAgICB0aGlzLmRvY3VtZW50Q2xpY2tMaXN0ZW5lciA9IG51bGw7XG4gICAgICAgIH1cbiAgICB9XG5cbiA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gICAgICBlbHNlXG4gICAgICAgICAgICB0aGlzLnNob3coZXZlbnQpO1xuXG4gICAgICAgIHRoaXMucHJldmVudERvY3VtZW50RGVmYXVsdCA9IHRydWU7XG4gICAgfVxuXG4gICAgc2hvdyhldmVudCkge1xuICAgICAgICB0aGlzLnRhcmdldCA9IGV2ZW50LmN1cnJlbnRUYXJnZXQ7XG4gICAgICAgIHRoaXMudmlzaWJsZSA9IHRydWU7XG4gICAgICAgIHRoaXMucGFyZW50QWN0aXZlID0gdHJ1ZTtcbiAgICAgICAgdGhpcy5wcmV2ZW50RG9jdW1lbnREZWZhdWx0ID0gdHJ1ZTtcbiAgICAgICAgdGhpcy5jZC5tYXJrRm9yQ2hlY2soKTtcbiAgICB9XG5cbiAgICBvbk92ZXJsYXlDbGljayhldmVudCkge1xuICAgICAgICBpZiAodGhpcy5wb3B1cCkge1xuICAgICAgICAgICAgdGhpcy5vdmVybGF5U2VydmljZS5hZGQoe1xuICAgICAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGV2ZW50LFxuICAgICAgICAgICAgICAgIHRhcmdldDogdGhpcy5lbC5uYXRpdmVFbGVtZW50XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMucHJldmVudERvY3VtZW50RGVmYXVsdCA9IHRydWU7XG4gICAgfVxuXG4gICAgb25PdmVybGF5QW5pbWF0aW9uU3RhcnQoZXZlbnQ6IEFuaW1hdGlvbkV2ZW50KSB7XG4gICAgICAgIHN3aXRjaChldmVudC50b1N0YXRlKSB7XG4gICAgICAgICAgICBjYXNlICd2aXNpYmxlJzpcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5wb3B1cCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbnRhaW5lciA9IGV2ZW50LmVsZW1lbnQ7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubW92ZU9uVG9wKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYXBwZW5kT3ZlcmxheSgpO1xuICAgICAgICAgICAgICAgICAgICBEb21IYW5kbGVyLmFic29sdXRlUG9zaXRpb24odGhpcy5jb250YWluZXIsIHRoaXMudGFyZ2V0KTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5iaW5kRG9jdW1lbnRDbGlja0xpc3RlbmVyKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYmluZERvY3VtZW50UmVzaXplTGlzdGVuZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5iaW5kU2Nyb2xsTGlzdGVuZXIoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAndm9pZCc6XG4gICAgICAgICAgICAgICAgdGhpcy5vbk92ZXJsYXlIaWRlKCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uT3ZlcmxheUFuaW1hdGlvbkVuZChldmVudDogQW5pbWF0aW9uRXZlbnQpIHtcbiAgICAgICAgc3dpdGNoKGV2ZW50LnRvU3RhdGUpIHtcbiAgICAgICAgICAgIGNhc2UgJ3ZvaWQnOlxuICAgICAgICAgICAgICAgIFpJbmRleFV0aWxzLmNsZWFyKGV2ZW50LmVsZW1lbnQpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBhcHBlbmRPdmVybGF5KCkge1xuICAgICAgICBpZiAodGhpcy5hcHBlbmRUbykge1xuICAgICAgICAgICAgaWYgKHRoaXMuYXBwZW5kVG8gPT09ICdib2R5JylcbiAgICAgICAgICAgICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHRoaXMuY29udGFpbmVyKTtcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICBEb21IYW5kbGVyLmFwcGVuZENoaWxkKHRoaXMuY29udGFpbmVyLCB0aGlzLmFwcGVuZFRvKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlc3RvcmVPdmVybGF5QXBwZW5kKCkge1xuICAgICAgICBpZiAodGhpcy5jb250YWluZXIgJiYgdGhpcy5hcHBlbmRUbykge1xuICAgICAgICAgICAgdGhpcy5lbC5uYXRpdmVFbGVtZW50LmFwcGVuZENoaWxkKHRoaXMuY29udGFpbmVyKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG1vdmVPblRvcCgpIHtcbiAgICAgICAgaWYgKHRoaXMuYXV0b1pJbmRleCkge1xuICAgICAgICAgICAgWkluZGV4VXRpbHMuc2V0KCdtZW51JywgdGhpcy5jb250YWluZXIsIHRoaXMuYmFzZVpJbmRleCArIHRoaXMuY29uZmlnLnpJbmRleC5tZW51KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGhpZGUoKSB7XG4gICAgICAgIHRoaXMudmlzaWJsZSA9IGZhbHNlO1xuICAgICAgICB0aGlzLnBhcmVudEFjdGl2ZSA9IGZhbHNlO1xuICAgICAgICB0aGlzLmNkLm1hcmtGb3JDaGVjaygpO1xuICAgIH1cblxuICAgIG9uV2luZG93UmVzaXplKCkge1xuICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICB9XG5cbiAgICBvbkxlYWZDbGljaygpIHtcbiAgICAgICAgaWYgKHRoaXMucG9wdXApIHtcbiAgICAgICAgICAgIHRoaXMuaGlkZSgpO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy51bmJpbmREb2N1bWVudENsaWNrTGlzdGVuZXIoKTtcbiAgICB9XG5cbiAgICBiaW5kRG9jdW1lbnRDbGlja0xpc3RlbmVyKCkge1xuICAgICAgICBpZiAoIXRoaXMuZG9jdW1lbnRDbGlja0xpc3RlbmVyKSB7XG4gICAgICAgICAgICBjb25zdCBkb2N1bWVudFRhcmdldDogYW55ID0gdGhpcy5lbCA/IHRoaXMuZWwubmF0aXZlRWxlbWVudC5vd25lckRvY3VtZW50IDogJ2RvY3VtZW50JztcblxuICAgICAgICAgICAgdGhpcy5kb2N1bWVudENsaWNrTGlzdGV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Y3VtZW50UmVzaXplTGlzdGVuZXIgPSBudWxsO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgYmluZFNjcm9sbExpc3RlbmVyKCkge1xuICAgICAgICBpZiAoIXRoaXMuc2Nyb2xsSGFuZGxlcikge1xuICAgICAgICAgICAgdGhpcy5zY3JvbGxIYW5kbGVyID0gbmV3IENvbm5lY3RlZE92ZXJsYXlTY3JvbGxIYW5kbGVyKHRoaXMudGFyZ2V0LCAoKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudmlzaWJsZSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuc2Nyb2xsSGFuZGxlci5iaW5kU2Nyb2xsTGlzdGVuZXIoKTtcbiAgICB9XG5cbiAgICB1bmJpbmRTY3JvbGxMaXN0ZW5lcigpIHtcbiAgICAgICAgaWYgKHRoaXMuc2Nyb2xsSGFuZGxlcikge1xuICAgICAgICAgICAgdGhpcy5zY3JvbGxIYW5kbGVyLnVuYmluZFNjcm9sbExpc3RlbmVyKCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvbk92ZXJsYXlIaWRlKCkge1xuICAgICAgICB0aGlzLnVuYmluZERvY3VtZW50Q2xpY2tMaXN0ZW5lcigpO1xuICAgICAgICB0aGlzLnVuYmluZERvY3VtZW50UmVzaXplTGlzdGVuZXIoKTtcbiAgICAgICAgdGhpcy51bmJpbmRTY3JvbGxMaXN0ZW5lcigpO1xuICAgICAgICB0aGlzLnByZXZlbnREb2N1bWVudERlZmF1bHQgPSBmYWxzZTtcbiAgICAgICAgdGhpcy50YXJnZXQgPSBudWxsO1xuICAgIH1cblxuICAgIG5nT25EZXN0cm95KCkge1xuICAgICAgICBpZiAodGhpcy5wb3B1cCkge1xuICAgICAgICAgICAgaWYgKHRoaXMuc2Nyb2xsSGFuZGxlcikge1xuIC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