1280 lines
175 KiB
JavaScript
1280 lines
175 KiB
JavaScript
import { animate, state, style, transition, trigger } from '@angular/animations';
|
|
import { CommonModule } from '@angular/common';
|
|
import { ChangeDetectionStrategy, Component, ContentChildren, EventEmitter, Inject, Input, NgModule, Output, ViewChild, ViewEncapsulation, booleanAttribute, computed, forwardRef, numberAttribute, signal } from '@angular/core';
|
|
import { RouterModule } from '@angular/router';
|
|
import { PrimeTemplate, SharedModule } from 'primeng/api';
|
|
import { DomHandler } from 'primeng/dom';
|
|
import { AngleDownIcon } from 'primeng/icons/angledown';
|
|
import { AngleRightIcon } from 'primeng/icons/angleright';
|
|
import { ChevronDownIcon } from 'primeng/icons/chevrondown';
|
|
import { ChevronRightIcon } from 'primeng/icons/chevronright';
|
|
import { TooltipModule } from 'primeng/tooltip';
|
|
import { ObjectUtils, UniqueComponentId } from 'primeng/utils';
|
|
import * as i0 from "@angular/core";
|
|
import * as i1 from "@angular/common";
|
|
import * as i2 from "@angular/router";
|
|
import * as i3 from "primeng/tooltip";
|
|
export class PanelMenuSub {
|
|
panelMenu;
|
|
el;
|
|
panelId;
|
|
focusedItemId;
|
|
items;
|
|
itemTemplate;
|
|
level = 0;
|
|
activeItemPath;
|
|
root;
|
|
tabindex;
|
|
transitionOptions;
|
|
parentExpanded;
|
|
itemToggle = new EventEmitter();
|
|
menuFocus = new EventEmitter();
|
|
menuBlur = new EventEmitter();
|
|
menuKeyDown = new EventEmitter();
|
|
listViewChild;
|
|
constructor(panelMenu, el) {
|
|
this.panelMenu = panelMenu;
|
|
this.el = el;
|
|
}
|
|
getItemId(processedItem) {
|
|
return processedItem.item?.id ?? `${this.panelId}_${processedItem.key}`;
|
|
}
|
|
getItemKey(processedItem) {
|
|
return this.getItemId(processedItem);
|
|
}
|
|
getItemClass(processedItem) {
|
|
return {
|
|
'p-menuitem': true,
|
|
'p-disabled': this.isItemDisabled(processedItem)
|
|
};
|
|
}
|
|
getItemProp(processedItem, name, params) {
|
|
return processedItem && processedItem.item ? ObjectUtils.getItemValue(processedItem.item[name], params) : undefined;
|
|
}
|
|
getItemLabel(processedItem) {
|
|
return this.getItemProp(processedItem, 'label');
|
|
}
|
|
isItemExpanded(processedItem) {
|
|
return processedItem.expanded;
|
|
}
|
|
isItemActive(processedItem) {
|
|
return this.isItemExpanded(processedItem) || this.activeItemPath.some((path) => path && path.key === processedItem.key);
|
|
}
|
|
isItemVisible(processedItem) {
|
|
return this.getItemProp(processedItem, 'visible') !== false;
|
|
}
|
|
isItemDisabled(processedItem) {
|
|
return this.getItemProp(processedItem, 'disabled');
|
|
}
|
|
isItemFocused(processedItem) {
|
|
return this.focusedItemId === this.getItemId(processedItem);
|
|
}
|
|
isItemGroup(processedItem) {
|
|
return ObjectUtils.isNotEmpty(processedItem.items);
|
|
}
|
|
getAnimation(processedItem) {
|
|
return this.isItemActive(processedItem) ? { value: 'visible', params: { transitionParams: this.transitionOptions, height: '*' } } : { value: 'hidden', params: { transitionParams: this.transitionOptions, height: '0' } };
|
|
}
|
|
getAriaSetSize() {
|
|
return this.items.filter((processedItem) => this.isItemVisible(processedItem) && !this.getItemProp(processedItem, 'separator')).length;
|
|
}
|
|
getAriaPosInset(index) {
|
|
return index - this.items.slice(0, index).filter((processedItem) => this.isItemVisible(processedItem) && this.getItemProp(processedItem, 'separator')).length + 1;
|
|
}
|
|
onItemClick(event, processedItem) {
|
|
if (!this.isItemDisabled(processedItem)) {
|
|
this.getItemProp(processedItem, 'command', { originalEvent: event, item: processedItem.item });
|
|
this.itemToggle.emit({ processedItem, expanded: !this.isItemActive(processedItem) });
|
|
}
|
|
}
|
|
onItemToggle(event) {
|
|
this.itemToggle.emit(event);
|
|
}
|
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: PanelMenuSub, deps: [{ token: forwardRef(() => PanelMenu) }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: PanelMenuSub, selector: "p-panelMenuSub", inputs: { panelId: "panelId", focusedItemId: "focusedItemId", items: "items", itemTemplate: "itemTemplate", level: ["level", "level", numberAttribute], activeItemPath: "activeItemPath", root: ["root", "root", booleanAttribute], tabindex: ["tabindex", "tabindex", numberAttribute], transitionOptions: "transitionOptions", parentExpanded: ["parentExpanded", "parentExpanded", booleanAttribute] }, outputs: { itemToggle: "itemToggle", menuFocus: "menuFocus", menuBlur: "menuBlur", menuKeyDown: "menuKeyDown" }, host: { classAttribute: "p-element" }, viewQueries: [{ propertyName: "listViewChild", first: true, predicate: ["list"], descendants: true }], ngImport: i0, template: `
|
|
<ul
|
|
#list
|
|
[ngClass]="{ 'p-submenu-list': true, 'p-panelmenu-root-list': root }"
|
|
role="tree"
|
|
[tabindex]="-1"
|
|
[attr.aria-activedescendant]="focusedItemId"
|
|
[attr.data-pc-section]="'menu'"
|
|
[attr.aria-hidden]="!parentExpanded"
|
|
(focusin)="menuFocus.emit($event)"
|
|
(focusout)="menuBlur.emit($event)"
|
|
(keydown)="menuKeyDown.emit($event)"
|
|
>
|
|
<ng-template ngFor let-processedItem let-index="index" [ngForOf]="items">
|
|
<li *ngIf="processedItem.separator" class="p-menuitem-separator" role="separator"></li>
|
|
<li
|
|
*ngIf="!processedItem.separator && isItemVisible(processedItem)"
|
|
[ngClass]="getItemClass(processedItem)"
|
|
role="treeitem"
|
|
[attr.id]="getItemId(processedItem)"
|
|
[attr.aria-label]="getItemProp(processedItem, 'label')"
|
|
[attr.aria-expanded]="isItemGroup(processedItem) ? isItemActive(processedItem) : undefined"
|
|
[attr.aria-level]="level + 1"
|
|
[attr.aria-setsize]="getAriaSetSize()"
|
|
[attr.aria-posinset]="getAriaPosInset(index)"
|
|
[class]="getItemProp(processedItem, 'styleClass')"
|
|
[class.p-hidden]="processedItem.visible === false"
|
|
[class.p-focus]="isItemFocused(processedItem) && !isItemDisabled(processedItem)"
|
|
[ngStyle]="getItemProp(processedItem, 'style')"
|
|
[pTooltip]="getItemProp(processedItem, 'tooltip')"
|
|
[attr.data-p-disabled]="isItemDisabled(processedItem)"
|
|
[tooltipOptions]="getItemProp(processedItem, 'tooltipOptions')"
|
|
>
|
|
<div class="p-menuitem-content" (click)="onItemClick($event, processedItem)">
|
|
<ng-container *ngIf="!itemTemplate">
|
|
<a
|
|
*ngIf="!getItemProp(processedItem, 'routerLink')"
|
|
[attr.href]="getItemProp(processedItem, 'url')"
|
|
class="p-menuitem-link"
|
|
[ngClass]="{ 'p-disabled': getItemProp(processedItem, 'disabled') }"
|
|
[target]="getItemProp(processedItem, 'target')"
|
|
[attr.data-pc-section]="'action'"
|
|
[attr.tabindex]="!!parentExpanded ? '0' : '-1'"
|
|
>
|
|
<ng-container *ngIf="isItemGroup(processedItem)">
|
|
<ng-container *ngIf="!panelMenu.submenuIconTemplate">
|
|
<AngleDownIcon [styleClass]="'p-submenu-icon'" *ngIf="isItemActive(processedItem)" [ngStyle]="getItemProp(processedItem, 'iconStyle')" />
|
|
<AngleRightIcon [styleClass]="'p-submenu-icon'" *ngIf="!isItemActive(processedItem)" [ngStyle]="getItemProp(processedItem, 'iconStyle')" />
|
|
</ng-container>
|
|
<ng-template *ngTemplateOutlet="panelMenu.submenuIconTemplate"></ng-template>
|
|
</ng-container>
|
|
<span class="p-menuitem-icon" [ngClass]="processedItem.icon" *ngIf="processedItem.icon" [ngStyle]="getItemProp(processedItem, 'iconStyle')"></span>
|
|
<span class="p-menuitem-text" *ngIf="processedItem.item?.escape !== false; else htmlLabel">{{ getItemProp(processedItem, 'label') }}</span>
|
|
<ng-template #htmlLabel><span class="p-menuitem-text" [innerHTML]="getItemProp(processedItem, 'label')"></span></ng-template>
|
|
<span class="p-menuitem-badge" *ngIf="processedItem.badge" [ngClass]="processedItem.badgeStyleClass">{{ processedItem.badge }}</span>
|
|
</a>
|
|
<a
|
|
*ngIf="getItemProp(processedItem, 'routerLink')"
|
|
[routerLink]="getItemProp(processedItem, 'routerLink')"
|
|
[queryParams]="getItemProp(processedItem, 'queryParams')"
|
|
[routerLinkActive]="'p-menuitem-link-active'"
|
|
[routerLinkActiveOptions]="getItemProp(processedItem, 'routerLinkActiveOptions') || { exact: false }"
|
|
class="p-menuitem-link"
|
|
[ngClass]="{ 'p-disabled': getItemProp(processedItem, 'disabled') }"
|
|
[target]="getItemProp(processedItem, 'target')"
|
|
[attr.title]="getItemProp(processedItem, 'title')"
|
|
[fragment]="getItemProp(processedItem, 'fragment')"
|
|
[queryParamsHandling]="getItemProp(processedItem, 'queryParamsHandling')"
|
|
[preserveFragment]="getItemProp(processedItem, 'preserveFragment')"
|
|
[skipLocationChange]="getItemProp(processedItem, 'skipLocationChange')"
|
|
[replaceUrl]="getItemProp(processedItem, 'replaceUrl')"
|
|
[state]="getItemProp(processedItem, 'state')"
|
|
[attr.data-pc-section]="'action'"
|
|
[attr.tabindex]="!!parentExpanded ? '0' : '-1'"
|
|
>
|
|
<ng-container *ngIf="isItemGroup(processedItem)">
|
|
<ng-container *ngIf="!panelMenu.submenuIconTemplate">
|
|
<AngleDownIcon *ngIf="isItemActive(processedItem)" [styleClass]="'p-submenu-icon'" [ngStyle]="getItemProp(processedItem, 'iconStyle')" />
|
|
<AngleRightIcon *ngIf="!isItemActive(processedItem)" [styleClass]="'p-submenu-icon'" [ngStyle]="getItemProp(processedItem, 'iconStyle')" />
|
|
</ng-container>
|
|
<ng-template *ngTemplateOutlet="panelMenu.submenuIconTemplate"></ng-template>
|
|
</ng-container>
|
|
<span class="p-menuitem-icon" [ngClass]="processedItem.icon" *ngIf="processedItem.icon" [ngStyle]="getItemProp(processedItem, 'iconStyle')"></span>
|
|
<span class="p-menuitem-text" *ngIf="getItemProp(processedItem, 'escape') !== false; else htmlRouteLabel">{{ getItemProp(processedItem, 'label') }}</span>
|
|
<ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="getItemProp(processedItem, 'label')"></span></ng-template>
|
|
<span class="p-menuitem-badge" *ngIf="processedItem.badge" [ngClass]="getItemProp(processedItem, 'badgeStyleClass')">{{ getItemProp(processedItem, 'badge') }}</span>
|
|
</a>
|
|
</ng-container>
|
|
<ng-container *ngIf="itemTemplate">
|
|
<ng-template *ngTemplateOutlet="itemTemplate; context: { $implicit: processedItem.item }"></ng-template>
|
|
</ng-container>
|
|
</div>
|
|
<div class="p-toggleable-content" [@submenu]="getAnimation(processedItem)">
|
|
<p-panelMenuSub
|
|
*ngIf="isItemVisible(processedItem) && isItemGroup(processedItem) && isItemExpanded(processedItem)"
|
|
[id]="getItemId(processedItem) + '_list'"
|
|
[panelId]="panelId"
|
|
[items]="processedItem?.items"
|
|
[itemTemplate]="itemTemplate"
|
|
[transitionOptions]="transitionOptions"
|
|
[focusedItemId]="focusedItemId"
|
|
[activeItemPath]="activeItemPath"
|
|
[level]="level + 1"
|
|
[parentExpanded]="!!parentExpanded && isItemExpanded(processedItem)"
|
|
(itemToggle)="onItemToggle($event)"
|
|
></p-panelMenuSub>
|
|
</div>
|
|
</li>
|
|
</ng-template>
|
|
</ul>
|
|
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => i1.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgForOf), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i0.forwardRef(() => i2.RouterLink), selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i0.forwardRef(() => i2.RouterLinkActive), selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: i0.forwardRef(() => i3.Tooltip), selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i0.forwardRef(() => AngleDownIcon), selector: "AngleDownIcon" }, { kind: "component", type: i0.forwardRef(() => AngleRightIcon), selector: "AngleRightIcon" }, { kind: "component", type: i0.forwardRef(() => PanelMenuSub), selector: "p-panelMenuSub", inputs: ["panelId", "focusedItemId", "items", "itemTemplate", "level", "activeItemPath", "root", "tabindex", "transitionOptions", "parentExpanded"], outputs: ["itemToggle", "menuFocus", "menuBlur", "menuKeyDown"] }], animations: [
|
|
trigger('submenu', [
|
|
state('hidden', style({
|
|
height: '0'
|
|
})),
|
|
state('visible', style({
|
|
height: '*'
|
|
})),
|
|
transition('visible <=> hidden', [animate('{{transitionParams}}')]),
|
|
transition('void => *', animate(0))
|
|
])
|
|
], encapsulation: i0.ViewEncapsulation.None });
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: PanelMenuSub, decorators: [{
|
|
type: Component,
|
|
args: [{
|
|
selector: 'p-panelMenuSub',
|
|
template: `
|
|
<ul
|
|
#list
|
|
[ngClass]="{ 'p-submenu-list': true, 'p-panelmenu-root-list': root }"
|
|
role="tree"
|
|
[tabindex]="-1"
|
|
[attr.aria-activedescendant]="focusedItemId"
|
|
[attr.data-pc-section]="'menu'"
|
|
[attr.aria-hidden]="!parentExpanded"
|
|
(focusin)="menuFocus.emit($event)"
|
|
(focusout)="menuBlur.emit($event)"
|
|
(keydown)="menuKeyDown.emit($event)"
|
|
>
|
|
<ng-template ngFor let-processedItem let-index="index" [ngForOf]="items">
|
|
<li *ngIf="processedItem.separator" class="p-menuitem-separator" role="separator"></li>
|
|
<li
|
|
*ngIf="!processedItem.separator && isItemVisible(processedItem)"
|
|
[ngClass]="getItemClass(processedItem)"
|
|
role="treeitem"
|
|
[attr.id]="getItemId(processedItem)"
|
|
[attr.aria-label]="getItemProp(processedItem, 'label')"
|
|
[attr.aria-expanded]="isItemGroup(processedItem) ? isItemActive(processedItem) : undefined"
|
|
[attr.aria-level]="level + 1"
|
|
[attr.aria-setsize]="getAriaSetSize()"
|
|
[attr.aria-posinset]="getAriaPosInset(index)"
|
|
[class]="getItemProp(processedItem, 'styleClass')"
|
|
[class.p-hidden]="processedItem.visible === false"
|
|
[class.p-focus]="isItemFocused(processedItem) && !isItemDisabled(processedItem)"
|
|
[ngStyle]="getItemProp(processedItem, 'style')"
|
|
[pTooltip]="getItemProp(processedItem, 'tooltip')"
|
|
[attr.data-p-disabled]="isItemDisabled(processedItem)"
|
|
[tooltipOptions]="getItemProp(processedItem, 'tooltipOptions')"
|
|
>
|
|
<div class="p-menuitem-content" (click)="onItemClick($event, processedItem)">
|
|
<ng-container *ngIf="!itemTemplate">
|
|
<a
|
|
*ngIf="!getItemProp(processedItem, 'routerLink')"
|
|
[attr.href]="getItemProp(processedItem, 'url')"
|
|
class="p-menuitem-link"
|
|
[ngClass]="{ 'p-disabled': getItemProp(processedItem, 'disabled') }"
|
|
[target]="getItemProp(processedItem, 'target')"
|
|
[attr.data-pc-section]="'action'"
|
|
[attr.tabindex]="!!parentExpanded ? '0' : '-1'"
|
|
>
|
|
<ng-container *ngIf="isItemGroup(processedItem)">
|
|
<ng-container *ngIf="!panelMenu.submenuIconTemplate">
|
|
<AngleDownIcon [styleClass]="'p-submenu-icon'" *ngIf="isItemActive(processedItem)" [ngStyle]="getItemProp(processedItem, 'iconStyle')" />
|
|
<AngleRightIcon [styleClass]="'p-submenu-icon'" *ngIf="!isItemActive(processedItem)" [ngStyle]="getItemProp(processedItem, 'iconStyle')" />
|
|
</ng-container>
|
|
<ng-template *ngTemplateOutlet="panelMenu.submenuIconTemplate"></ng-template>
|
|
</ng-container>
|
|
<span class="p-menuitem-icon" [ngClass]="processedItem.icon" *ngIf="processedItem.icon" [ngStyle]="getItemProp(processedItem, 'iconStyle')"></span>
|
|
<span class="p-menuitem-text" *ngIf="processedItem.item?.escape !== false; else htmlLabel">{{ getItemProp(processedItem, 'label') }}</span>
|
|
<ng-template #htmlLabel><span class="p-menuitem-text" [innerHTML]="getItemProp(processedItem, 'label')"></span></ng-template>
|
|
<span class="p-menuitem-badge" *ngIf="processedItem.badge" [ngClass]="processedItem.badgeStyleClass">{{ processedItem.badge }}</span>
|
|
</a>
|
|
<a
|
|
*ngIf="getItemProp(processedItem, 'routerLink')"
|
|
[routerLink]="getItemProp(processedItem, 'routerLink')"
|
|
[queryParams]="getItemProp(processedItem, 'queryParams')"
|
|
[routerLinkActive]="'p-menuitem-link-active'"
|
|
[routerLinkActiveOptions]="getItemProp(processedItem, 'routerLinkActiveOptions') || { exact: false }"
|
|
class="p-menuitem-link"
|
|
[ngClass]="{ 'p-disabled': getItemProp(processedItem, 'disabled') }"
|
|
[target]="getItemProp(processedItem, 'target')"
|
|
[attr.title]="getItemProp(processedItem, 'title')"
|
|
[fragment]="getItemProp(processedItem, 'fragment')"
|
|
[queryParamsHandling]="getItemProp(processedItem, 'queryParamsHandling')"
|
|
[preserveFragment]="getItemProp(processedItem, 'preserveFragment')"
|
|
[skipLocationChange]="getItemProp(processedItem, 'skipLocationChange')"
|
|
[replaceUrl]="getItemProp(processedItem, 'replaceUrl')"
|
|
[state]="getItemProp(processedItem, 'state')"
|
|
[attr.data-pc-section]="'action'"
|
|
[attr.tabindex]="!!parentExpanded ? '0' : '-1'"
|
|
>
|
|
<ng-container *ngIf="isItemGroup(processedItem)">
|
|
<ng-container *ngIf="!panelMenu.submenuIconTemplate">
|
|
<AngleDownIcon *ngIf="isItemActive(processedItem)" [styleClass]="'p-submenu-icon'" [ngStyle]="getItemProp(processedItem, 'iconStyle')" />
|
|
<AngleRightIcon *ngIf="!isItemActive(processedItem)" [styleClass]="'p-submenu-icon'" [ngStyle]="getItemProp(processedItem, 'iconStyle')" />
|
|
</ng-container>
|
|
<ng-template *ngTemplateOutlet="panelMenu.submenuIconTemplate"></ng-template>
|
|
</ng-container>
|
|
<span class="p-menuitem-icon" [ngClass]="processedItem.icon" *ngIf="processedItem.icon" [ngStyle]="getItemProp(processedItem, 'iconStyle')"></span>
|
|
<span class="p-menuitem-text" *ngIf="getItemProp(processedItem, 'escape') !== false; else htmlRouteLabel">{{ getItemProp(processedItem, 'label') }}</span>
|
|
<ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="getItemProp(processedItem, 'label')"></span></ng-template>
|
|
<span class="p-menuitem-badge" *ngIf="processedItem.badge" [ngClass]="getItemProp(processedItem, 'badgeStyleClass')">{{ getItemProp(processedItem, 'badge') }}</span>
|
|
</a>
|
|
</ng-container>
|
|
<ng-container *ngIf="itemTemplate">
|
|
<ng-template *ngTemplateOutlet="itemTemplate; context: { $implicit: processedItem.item }"></ng-template>
|
|
</ng-container>
|
|
</div>
|
|
<div class="p-toggleable-content" [@submenu]="getAnimation(processedItem)">
|
|
<p-panelMenuSub
|
|
*ngIf="isItemVisible(processedItem) && isItemGroup(processedItem) && isItemExpanded(processedItem)"
|
|
[id]="getItemId(processedItem) + '_list'"
|
|
[panelId]="panelId"
|
|
[items]="processedItem?.items"
|
|
[itemTemplate]="itemTemplate"
|
|
[transitionOptions]="transitionOptions"
|
|
[focusedItemId]="focusedItemId"
|
|
[activeItemPath]="activeItemPath"
|
|
[level]="level + 1"
|
|
[parentExpanded]="!!parentExpanded && isItemExpanded(processedItem)"
|
|
(itemToggle)="onItemToggle($event)"
|
|
></p-panelMenuSub>
|
|
</div>
|
|
</li>
|
|
</ng-template>
|
|
</ul>
|
|
`,
|
|
animations: [
|
|
trigger('submenu', [
|
|
state('hidden', style({
|
|
height: '0'
|
|
})),
|
|
state('visible', style({
|
|
height: '*'
|
|
})),
|
|
transition('visible <=> hidden', [animate('{{transitionParams}}')]),
|
|
transition('void => *', animate(0))
|
|
])
|
|
],
|
|
encapsulation: ViewEncapsulation.None,
|
|
host: {
|
|
class: 'p-element'
|
|
}
|
|
}]
|
|
}], ctorParameters: () => [{ type: PanelMenu, decorators: [{
|
|
type: Inject,
|
|
args: [forwardRef(() => PanelMenu)]
|
|
}] }, { type: i0.ElementRef }], propDecorators: { panelId: [{
|
|
type: Input
|
|
}], focusedItemId: [{
|
|
type: Input
|
|
}], items: [{
|
|
type: Input
|
|
}], itemTemplate: [{
|
|
type: Input
|
|
}], level: [{
|
|
type: Input,
|
|
args: [{ transform: numberAttribute }]
|
|
}], activeItemPath: [{
|
|
type: Input
|
|
}], root: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], tabindex: [{
|
|
type: Input,
|
|
args: [{ transform: numberAttribute }]
|
|
}], transitionOptions: [{
|
|
type: Input
|
|
}], parentExpanded: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], itemToggle: [{
|
|
type: Output
|
|
}], menuFocus: [{
|
|
type: Output
|
|
}], menuBlur: [{
|
|
type: Output
|
|
}], menuKeyDown: [{
|
|
type: Output
|
|
}], listViewChild: [{
|
|
type: ViewChild,
|
|
args: ['list']
|
|
}] } });
|
|
export class PanelMenuList {
|
|
el;
|
|
panelId;
|
|
id;
|
|
items;
|
|
itemTemplate;
|
|
parentExpanded;
|
|
expanded;
|
|
transitionOptions;
|
|
root;
|
|
tabindex;
|
|
activeItem;
|
|
itemToggle = new EventEmitter();
|
|
headerFocus = new EventEmitter();
|
|
subMenuViewChild;
|
|
searchTimeout;
|
|
searchValue;
|
|
focused;
|
|
focusedItem = signal(null);
|
|
activeItemPath = signal([]);
|
|
processedItems = signal([]);
|
|
visibleItems = computed(() => {
|
|
const processedItems = this.processedItems();
|
|
return this.flatItems(processedItems);
|
|
});
|
|
get focusedItemId() {
|
|
const focusedItem = this.focusedItem();
|
|
return focusedItem && focusedItem.item?.id ? focusedItem.item.id : ObjectUtils.isNotEmpty(this.focusedItem()) ? `${this.panelId}_${this.focusedItem().key}` : undefined;
|
|
}
|
|
constructor(el) {
|
|
this.el = el;
|
|
}
|
|
ngOnChanges(changes) {
|
|
this.processedItems.set(this.createProcessedItems(changes?.items?.currentValue || this.items || []));
|
|
}
|
|
getItemProp(processedItem, name) {
|
|
return processedItem && processedItem.item ? ObjectUtils.getItemValue(processedItem.item[name]) : undefined;
|
|
}
|
|
getItemLabel(processedItem) {
|
|
return this.getItemProp(processedItem, 'label');
|
|
}
|
|
isItemVisible(processedItem) {
|
|
return this.getItemProp(processedItem, 'visible') !== false;
|
|
}
|
|
isItemDisabled(processedItem) {
|
|
return this.getItemProp(processedItem, 'disabled');
|
|
}
|
|
isItemActive(processedItem) {
|
|
return this.activeItemPath().some((path) => path.key === processedItem.parentKey);
|
|
}
|
|
isItemGroup(processedItem) {
|
|
return ObjectUtils.isNotEmpty(processedItem.items);
|
|
}
|
|
isElementInPanel(event, element) {
|
|
const panel = event.currentTarget.closest('[data-pc-section="panel"]');
|
|
return panel && panel.contains(element);
|
|
}
|
|
isItemMatched(processedItem) {
|
|
return this.isValidItem(processedItem) && this.getItemLabel(processedItem).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase());
|
|
}
|
|
isVisibleItem(processedItem) {
|
|
return !!processedItem && (processedItem.level === 0 || this.isItemActive(processedItem)) && this.isItemVisible(processedItem);
|
|
}
|
|
isValidItem(processedItem) {
|
|
return !!processedItem && !this.isItemDisabled(processedItem) && !processedItem.separator;
|
|
}
|
|
findFirstItem() {
|
|
return this.visibleItems().find((processedItem) => this.isValidItem(processedItem));
|
|
}
|
|
findLastItem() {
|
|
return ObjectUtils.findLast(this.visibleItems(), (processedItem) => this.isValidItem(processedItem));
|
|
}
|
|
findItemByEventTarget(target) {
|
|
let parentNode = target;
|
|
while (parentNode && parentNode.tagName?.toLowerCase() !== 'li') {
|
|
parentNode = parentNode?.parentNode;
|
|
}
|
|
return parentNode?.id && this.visibleItems().find((processedItem) => this.isValidItem(processedItem) && `${this.panelId}_${processedItem.key}` === parentNode.id);
|
|
}
|
|
createProcessedItems(items, level = 0, parent = {}, parentKey = '') {
|
|
const processedItems = [];
|
|
items &&
|
|
items.forEach((item, index) => {
|
|
const key = (parentKey !== '' ? parentKey + '_' : '') + index;
|
|
const newItem = {
|
|
icon: item.icon,
|
|
expanded: item.expanded,
|
|
separator: item.separator,
|
|
item,
|
|
index,
|
|
level,
|
|
key,
|
|
parent,
|
|
parentKey
|
|
};
|
|
newItem['items'] = this.createProcessedItems(item.items, level + 1, newItem, key);
|
|
processedItems.push(newItem);
|
|
});
|
|
return processedItems;
|
|
}
|
|
findProcessedItemByItemKey(key, processedItems, level = 0) {
|
|
processedItems = processedItems || this.processedItems();
|
|
if (processedItems && processedItems.length) {
|
|
for (let i = 0; i < processedItems.length; i++) {
|
|
const processedItem = processedItems[i];
|
|
if (this.getItemProp(processedItem, 'key') === key)
|
|
return processedItem;
|
|
const matchedItem = this.findProcessedItemByItemKey(key, processedItem.items, level + 1);
|
|
if (matchedItem)
|
|
return matchedItem;
|
|
}
|
|
}
|
|
}
|
|
flatItems(processedItems, processedFlattenItems = []) {
|
|
processedItems &&
|
|
processedItems.forEach((processedItem) => {
|
|
if (this.isVisibleItem(processedItem)) {
|
|
processedFlattenItems.push(processedItem);
|
|
this.flatItems(processedItem.items, processedFlattenItems);
|
|
}
|
|
});
|
|
return processedFlattenItems;
|
|
}
|
|
changeFocusedItem(event) {
|
|
const { originalEvent, processedItem, focusOnNext, selfCheck, allowHeaderFocus = true } = event;
|
|
if (ObjectUtils.isNotEmpty(this.focusedItem()) && this.focusedItem().key !== processedItem.key) {
|
|
this.focusedItem.set(processedItem);
|
|
this.scrollInView();
|
|
}
|
|
else if (allowHeaderFocus) {
|
|
this.headerFocus.emit({ originalEvent, focusOnNext, selfCheck });
|
|
}
|
|
}
|
|
scrollInView() {
|
|
const element = DomHandler.findSingle(this.subMenuViewChild.listViewChild.nativeElement, `li[id="${`${this.focusedItemId}`}"]`);
|
|
if (element) {
|
|
element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
}
|
|
}
|
|
onFocus(event) {
|
|
if (!this.focused) {
|
|
this.focused = true;
|
|
const focusedItem = this.focusedItem() || (this.isElementInPanel(event, event.relatedTarget) ? this.findItemByEventTarget(event.target) || this.findFirstItem() : this.findLastItem());
|
|
if (event.relatedTarget !== null)
|
|
this.focusedItem.set(focusedItem);
|
|
}
|
|
}
|
|
onBlur(event) {
|
|
const target = event.relatedTarget;
|
|
if (this.focused && !this.el.nativeElement.contains(target)) {
|
|
this.focused = false;
|
|
this.focusedItem.set(null);
|
|
this.searchValue = '';
|
|
}
|
|
}
|
|
onItemToggle(event) {
|
|
const { processedItem, expanded } = event;
|
|
processedItem.expanded = !processedItem.expanded;
|
|
const activeItemPath = this.activeItemPath().filter((p) => p.parentKey !== processedItem.parentKey);
|
|
expanded && activeItemPath.push(processedItem);
|
|
this.activeItemPath.set(activeItemPath);
|
|
this.processedItems.update((value) => value.map((i) => (i === processedItem ? processedItem : i)));
|
|
this.focusedItem.set(processedItem);
|
|
}
|
|
onKeyDown(event) {
|
|
const metaKey = event.metaKey || event.ctrlKey;
|
|
switch (event.code) {
|
|
case 'ArrowDown':
|
|
this.onArrowDownKey(event);
|
|
break;
|
|
case 'ArrowUp':
|
|
this.onArrowUpKey(event);
|
|
break;
|
|
case 'ArrowLeft':
|
|
this.onArrowLeftKey(event);
|
|
break;
|
|
case 'ArrowRight':
|
|
this.onArrowRightKey(event);
|
|
break;
|
|
case 'Home':
|
|
this.onHomeKey(event);
|
|
break;
|
|
case 'End':
|
|
this.onEndKey(event);
|
|
break;
|
|
case 'Space':
|
|
this.onSpaceKey(event);
|
|
break;
|
|
case 'Enter':
|
|
this.onEnterKey(event);
|
|
break;
|
|
case 'Escape':
|
|
case 'Tab':
|
|
case 'PageDown':
|
|
case 'PageUp':
|
|
case 'Backspace':
|
|
case 'ShiftLeft':
|
|
case 'ShiftRight':
|
|
//NOOP
|
|
break;
|
|
default:
|
|
if (!metaKey && ObjectUtils.isPrintableCharacter(event.key)) {
|
|
this.searchItems(event, event.key);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
onArrowDownKey(event) {
|
|
const processedItem = ObjectUtils.isNotEmpty(this.focusedItem()) ? this.findNextItem(this.focusedItem()) : this.findFirstItem();
|
|
this.changeFocusedItem({ originalEvent: event, processedItem, focusOnNext: true });
|
|
event.preventDefault();
|
|
}
|
|
onArrowUpKey(event) {
|
|
const processedItem = ObjectUtils.isNotEmpty(this.focusedItem()) ? this.findPrevItem(this.focusedItem()) : this.findLastItem();
|
|
this.changeFocusedItem({ originalEvent: event, processedItem, selfCheck: true });
|
|
event.preventDefault();
|
|
}
|
|
onArrowLeftKey(event) {
|
|
if (ObjectUtils.isNotEmpty(this.focusedItem())) {
|
|
const matched = this.activeItemPath().some((p) => p.key === this.focusedItem().key);
|
|
if (matched) {
|
|
const activeItemPath = this.activeItemPath().filter((p) => p.key !== this.focusedItem().key);
|
|
this.activeItemPath.set(activeItemPath);
|
|
}
|
|
else {
|
|
const focusedItem = ObjectUtils.isNotEmpty(this.focusedItem().parent) ? this.focusedItem().parent : this.focusedItem();
|
|
this.focusedItem.set(focusedItem);
|
|
}
|
|
event.preventDefault();
|
|
}
|
|
}
|
|
onArrowRightKey(event) {
|
|
if (ObjectUtils.isNotEmpty(this.focusedItem())) {
|
|
const grouped = this.isItemGroup(this.focusedItem());
|
|
if (grouped) {
|
|
const matched = this.activeItemPath().some((p) => p.key === this.focusedItem().key);
|
|
if (matched) {
|
|
this.onArrowDownKey(event);
|
|
}
|
|
else {
|
|
const activeItemPath = this.activeItemPath().filter((p) => p.parentKey !== this.focusedItem().parentKey);
|
|
activeItemPath.push(this.focusedItem());
|
|
this.activeItemPath.set(activeItemPath);
|
|
}
|
|
}
|
|
event.preventDefault();
|
|
}
|
|
}
|
|
onHomeKey(event) {
|
|
this.changeFocusedItem({ originalEvent: event, processedItem: this.findFirstItem(), allowHeaderFocus: false });
|
|
event.preventDefault();
|
|
}
|
|
onEndKey(event) {
|
|
this.changeFocusedItem({ originalEvent: event, processedItem: this.findLastItem(), focusOnNext: true, allowHeaderFocus: false });
|
|
event.preventDefault();
|
|
}
|
|
onEnterKey(event) {
|
|
if (ObjectUtils.isNotEmpty(this.focusedItem())) {
|
|
const element = DomHandler.findSingle(this.subMenuViewChild.listViewChild.nativeElement, `li[id="${`${this.focusedItemId}`}"]`);
|
|
const anchorElement = element && (DomHandler.findSingle(element, '[data-pc-section="action"]') || DomHandler.findSingle(element, 'a,button'));
|
|
anchorElement ? anchorElement.click() : element && element.click();
|
|
}
|
|
event.preventDefault();
|
|
}
|
|
onSpaceKey(event) {
|
|
this.onEnterKey(event);
|
|
}
|
|
findNextItem(processedItem) {
|
|
const index = this.visibleItems().findIndex((item) => item.key === processedItem.key);
|
|
const matchedItem = index < this.visibleItems().length - 1
|
|
? this.visibleItems()
|
|
.slice(index + 1)
|
|
.find((pItem) => this.isValidItem(pItem))
|
|
: undefined;
|
|
return matchedItem || processedItem;
|
|
}
|
|
findPrevItem(processedItem) {
|
|
const index = this.visibleItems().findIndex((item) => item.key === processedItem.key);
|
|
const matchedItem = index > 0 ? ObjectUtils.findLast(this.visibleItems().slice(0, index), (pItem) => this.isValidItem(pItem)) : undefined;
|
|
return matchedItem || processedItem;
|
|
}
|
|
searchItems(event, char) {
|
|
this.searchValue = (this.searchValue || '') + char;
|
|
let matchedItem = null;
|
|
let matched = false;
|
|
if (ObjectUtils.isNotEmpty(this.focusedItem())) {
|
|
const focusedItemIndex = this.visibleItems().findIndex((processedItem) => processedItem.key === this.focusedItem().key);
|
|
matchedItem = this.visibleItems()
|
|
.slice(focusedItemIndex)
|
|
.find((processedItem) => this.isItemMatched(processedItem));
|
|
matchedItem = ObjectUtils.isEmpty(matchedItem)
|
|
? this.visibleItems()
|
|
.slice(0, focusedItemIndex)
|
|
.find((processedItem) => this.isItemMatched(processedItem))
|
|
: matchedItem;
|
|
}
|
|
else {
|
|
matchedItem = this.visibleItems().find((processedItem) => this.isItemMatched(processedItem));
|
|
}
|
|
if (ObjectUtils.isNotEmpty(matchedItem)) {
|
|
matched = true;
|
|
}
|
|
if (ObjectUtils.isEmpty(matchedItem) && ObjectUtils.isEmpty(this.focusedItem())) {
|
|
matchedItem = this.findFirstItem();
|
|
}
|
|
if (ObjectUtils.isNotEmpty(matchedItem)) {
|
|
this.changeFocusedItem({
|
|
originalEvent: event,
|
|
processedItem: matchedItem,
|
|
allowHeaderFocus: false
|
|
});
|
|
}
|
|
if (this.searchTimeout) {
|
|
clearTimeout(this.searchTimeout);
|
|
}
|
|
this.searchTimeout = setTimeout(() => {
|
|
this.searchValue = '';
|
|
this.searchTimeout = null;
|
|
}, 500);
|
|
return matched;
|
|
}
|
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: PanelMenuList, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: PanelMenuList, selector: "p-panelMenuList", inputs: { panelId: "panelId", id: "id", items: "items", itemTemplate: "itemTemplate", parentExpanded: ["parentExpanded", "parentExpanded", booleanAttribute], expanded: ["expanded", "expanded", booleanAttribute], transitionOptions: "transitionOptions", root: ["root", "root", booleanAttribute], tabindex: ["tabindex", "tabindex", numberAttribute], activeItem: "activeItem" }, outputs: { itemToggle: "itemToggle", headerFocus: "headerFocus" }, host: { classAttribute: "p-element" }, viewQueries: [{ propertyName: "subMenuViewChild", first: true, predicate: ["submenu"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
<p-panelMenuSub
|
|
#submenu
|
|
[root]="true"
|
|
[id]="panelId + '_list'"
|
|
[panelId]="panelId"
|
|
[tabindex]="tabindex"
|
|
[itemTemplate]="itemTemplate"
|
|
[focusedItemId]="focused ? focusedItemId : undefined"
|
|
[activeItemPath]="activeItemPath()"
|
|
[transitionOptions]="transitionOptions"
|
|
[items]="processedItems()"
|
|
[parentExpanded]="parentExpanded"
|
|
(itemToggle)="onItemToggle($event)"
|
|
(keydown)="onKeyDown($event)"
|
|
(menuFocus)="onFocus($event)"
|
|
(menuBlur)="onBlur($event)"
|
|
></p-panelMenuSub>
|
|
`, isInline: true, styles: ["@layer primeng{.p-panelmenu .p-panelmenu-header-action{display:flex;align-items:center;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;text-decoration:none}.p-panelmenu .p-panelmenu-header-action:focus{z-index:1}.p-panelmenu .p-submenu-list{margin:0;padding:0;list-style:none}.p-panelmenu .p-menuitem-link{display:flex;align-items:center;-webkit-user-select:none;user-select:none;cursor:pointer;text-decoration:none;position:relative;overflow:hidden;outline:none}.p-panelmenu .p-menuitem-text{line-height:1}.p-panelmenu-expanded.p-toggleable-content:not(.ng-animating),.p-panelmenu .p-submenu-expanded:not(.ng-animating){overflow:visible}.p-panelmenu .p-toggleable-content,.p-panelmenu .p-submenu-list{overflow:hidden}}\n"], dependencies: [{ kind: "component", type: PanelMenuSub, selector: "p-panelMenuSub", inputs: ["panelId", "focusedItemId", "items", "itemTemplate", "level", "activeItemPath", "root", "tabindex", "transitionOptions", "parentExpanded"], outputs: ["itemToggle", "menuFocus", "menuBlur", "menuKeyDown"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: PanelMenuList, decorators: [{
|
|
type: Component,
|
|
args: [{ selector: 'p-panelMenuList', template: `
|
|
<p-panelMenuSub
|
|
#submenu
|
|
[root]="true"
|
|
[id]="panelId + '_list'"
|
|
[panelId]="panelId"
|
|
[tabindex]="tabindex"
|
|
[itemTemplate]="itemTemplate"
|
|
[focusedItemId]="focused ? focusedItemId : undefined"
|
|
[activeItemPath]="activeItemPath()"
|
|
[transitionOptions]="transitionOptions"
|
|
[items]="processedItems()"
|
|
[parentExpanded]="parentExpanded"
|
|
(itemToggle)="onItemToggle($event)"
|
|
(keydown)="onKeyDown($event)"
|
|
(menuFocus)="onFocus($event)"
|
|
(menuBlur)="onBlur($event)"
|
|
></p-panelMenuSub>
|
|
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
class: 'p-element'
|
|
}, styles: ["@layer primeng{.p-panelmenu .p-panelmenu-header-action{display:flex;align-items:center;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;text-decoration:none}.p-panelmenu .p-panelmenu-header-action:focus{z-index:1}.p-panelmenu .p-submenu-list{margin:0;padding:0;list-style:none}.p-panelmenu .p-menuitem-link{display:flex;align-items:center;-webkit-user-select:none;user-select:none;cursor:pointer;text-decoration:none;position:relative;overflow:hidden;outline:none}.p-panelmenu .p-menuitem-text{line-height:1}.p-panelmenu-expanded.p-toggleable-content:not(.ng-animating),.p-panelmenu .p-submenu-expanded:not(.ng-animating){overflow:visible}.p-panelmenu .p-toggleable-content,.p-panelmenu .p-submenu-list{overflow:hidden}}\n"] }]
|
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { panelId: [{
|
|
type: Input
|
|
}], id: [{
|
|
type: Input
|
|
}], items: [{
|
|
type: Input
|
|
}], itemTemplate: [{
|
|
type: Input
|
|
}], parentExpanded: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], expanded: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], transitionOptions: [{
|
|
type: Input
|
|
}], root: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], tabindex: [{
|
|
type: Input,
|
|
args: [{ transform: numberAttribute }]
|
|
}], activeItem: [{
|
|
type: Input
|
|
}], itemToggle: [{
|
|
type: Output
|
|
}], headerFocus: [{
|
|
type: Output
|
|
}], subMenuViewChild: [{
|
|
type: ViewChild,
|
|
args: ['submenu']
|
|
}] } });
|
|
/**
|
|
* PanelMenu is a hybrid of Accordion and Tree components.
|
|
* @group Components
|
|
*/
|
|
export class PanelMenu {
|
|
cd;
|
|
/**
|
|
* An array of menuitems.
|
|
* @group Props
|
|
*/
|
|
model;
|
|
/**
|
|
* Inline style of the component.
|
|
* @group Props
|
|
*/
|
|
style;
|
|
/**
|
|
* Style class of the component.
|
|
* @group Props
|
|
*/
|
|
styleClass;
|
|
/**
|
|
* Whether multiple tabs can be activated at the same time or not.
|
|
* @group Props
|
|
*/
|
|
multiple = false;
|
|
/**
|
|
* Transition options of the animation.
|
|
* @group Props
|
|
*/
|
|
transitionOptions = '400ms cubic-bezier(0.86, 0, 0.07, 1)';
|
|
/**
|
|
* Current id state as a string.
|
|
* @group Props
|
|
*/
|
|
id;
|
|
/**
|
|
* Index of the element in tabbing order.
|
|
* @group Props
|
|
*/
|
|
tabindex = 0;
|
|
templates;
|
|
containerViewChild;
|
|
submenuIconTemplate;
|
|
headerContentTemplate;
|
|
itemTemplate;
|
|
animating;
|
|
activeItem = signal(null);
|
|
ngOnInit() {
|
|
this.id = this.id || UniqueComponentId();
|
|
}
|
|
ngAfterContentInit() {
|
|
this.templates?.forEach((item) => {
|
|
switch (item.getType()) {
|
|
case 'headercontent':
|
|
this.headerContentTemplate = item.template;
|
|
break;
|
|
case 'submenuicon':
|
|
this.submenuIconTemplate = item.template;
|
|
break;
|
|
case 'item':
|
|
this.itemTemplate = item.template;
|
|
break;
|
|
default:
|
|
this.itemTemplate = item.template;
|
|
break;
|
|
}
|
|
});
|
|
}
|
|
constructor(cd) {
|
|
this.cd = cd;
|
|
}
|
|
/**
|
|
* Collapses open panels.
|
|
* @group Method
|
|
*/
|
|
collapseAll() {
|
|
for (let item of this.model) {
|
|
if (item.expanded) {
|
|
item.expanded = false;
|
|
}
|
|
}
|
|
this.cd.detectChanges();
|
|
}
|
|
onToggleDone() {
|
|
this.animating = false;
|
|
this.cd.markForCheck();
|
|
}
|
|
changeActiveItem(event, item, index, selfActive = false) {
|
|
if (!this.isItemDisabled(item)) {
|
|
const activeItem = selfActive ? item : this.activeItem && ObjectUtils.equals(item, this.activeItem) ? null : item;
|
|
this.activeItem.set(activeItem);
|
|
}
|
|
}
|
|
getAnimation(item) {
|
|
return item.expanded ? { value: 'visible', params: { transitionParams: this.animating ? this.transitionOptions : '0ms', height: '*' } } : { value: 'hidden', params: { transitionParams: this.transitionOptions, height: '0' } };
|
|
}
|
|
getItemProp(item, name) {
|
|
return item ? ObjectUtils.getItemValue(item[name]) : undefined;
|
|
}
|
|
getItemLabel(item) {
|
|
return this.getItemProp(item, 'label');
|
|
}
|
|
isItemActive(item) {
|
|
return item.expanded;
|
|
}
|
|
isItemVisible(item) {
|
|
return this.getItemProp(item, 'visible') !== false;
|
|
}
|
|
isItemDisabled(item) {
|
|
return this.getItemProp(item, 'disabled');
|
|
}
|
|
isItemGroup(item) {
|
|
return ObjectUtils.isNotEmpty(item.items);
|
|
}
|
|
getPanelId(index, item) {
|
|
return item && item.id ? item.id : `${this.id}_${index}`;
|
|
}
|
|
getHeaderId(item, index) {
|
|
return item.id ? item.id + '_header' : `${this.getPanelId(index)}_header`;
|
|
}
|
|
getContentId(item, index) {
|
|
return item.id ? item.id + '_content' : `${this.getPanelId(index)}_content`;
|
|
}
|
|
updateFocusedHeader(event) {
|
|
const { originalEvent, focusOnNext, selfCheck } = event;
|
|
const panelElement = originalEvent.currentTarget.closest('[data-pc-section="panel"]');
|
|
const header = selfCheck ? DomHandler.findSingle(panelElement, '[data-pc-section="header"]') : focusOnNext ? this.findNextHeader(panelElement) : this.findPrevHeader(panelElement);
|
|
header ? this.changeFocusedHeader(originalEvent, header) : focusOnNext ? this.onHeaderHomeKey(originalEvent) : this.onHeaderEndKey(originalEvent);
|
|
}
|
|
changeFocusedHeader(event, element) {
|
|
element && DomHandler.focus(element);
|
|
}
|
|
findNextHeader(panelElement, selfCheck = false) {
|
|
const nextPanelElement = selfCheck ? panelElement : panelElement.nextElementSibling;
|
|
const headerElement = DomHandler.findSingle(nextPanelElement, '[data-pc-section="header"]');
|
|
return headerElement ? (DomHandler.getAttribute(headerElement, 'data-p-disabled') ? this.findNextHeader(headerElement.parentElement) : headerElement) : null;
|
|
}
|
|
findPrevHeader(panelElement, selfCheck = false) {
|
|
const prevPanelElement = selfCheck ? panelElement : panelElement.previousElementSibling;
|
|
const headerElement = DomHandler.findSingle(prevPanelElement, '[data-pc-section="header"]');
|
|
return headerElement ? (DomHandler.getAttribute(headerElement, 'data-p-disabled') ? this.findPrevHeader(headerElement.parentElement) : headerElement) : null;
|
|
}
|
|
findFirstHeader() {
|
|
return this.findNextHeader(this.containerViewChild.nativeElement.firstElementChild, true);
|
|
}
|
|
findLastHeader() {
|
|
return this.findPrevHeader(this.containerViewChild.nativeElement.lastElementChild, true);
|
|
}
|
|
onHeaderClick(event, item, index) {
|
|
if (this.isItemDisabled(item)) {
|
|
event.preventDefault();
|
|
return;
|
|
}
|
|
if (item.command) {
|
|
item.command({ originalEvent: event, item });
|
|
}
|
|
if (!this.multiple) {
|
|
for (let modelItem of this.model) {
|
|
if (item !== modelItem && modelItem.expanded) {
|
|
modelItem.expanded = false;
|
|
}
|
|
}
|
|
}
|
|
item.expanded = !item.expanded;
|
|
this.changeActiveItem(event, item, index);
|
|
this.animating = true;
|
|
DomHandler.focus(event.currentTarget);
|
|
}
|
|
onHeaderKeyDown(event, item, index) {
|
|
switch (event.code) {
|
|
case 'ArrowDown':
|
|
this.onHeaderArrowDownKey(event);
|
|
break;
|
|
case 'ArrowUp':
|
|
this.onHeaderArrowUpKey(event);
|
|
break;
|
|
case 'Home':
|
|
this.onHeaderHomeKey(event);
|
|
break;
|
|
case 'End':
|
|
this.onHeaderEndKey(event);
|
|
break;
|
|
case 'Enter':
|
|
case 'Space':
|
|
this.onHeaderEnterKey(event, item, index);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|
|
onHeaderArrowDownKey(event) {
|
|
const rootList = DomHandler.getAttribute(event.currentTarget, 'data-p-highlight') === true ? DomHandler.findSingle(event.currentTarget.nextElementSibling, '[data-pc-section="menu"]') : null;
|
|
rootList ? DomHandler.focus(rootList) : this.updateFocusedHeader({ originalEvent: event, focusOnNext: true });
|
|
event.preventDefault();
|
|
}
|
|
onHeaderArrowUpKey(event) {
|
|
const prevHeader = this.findPrevHeader(event.currentTarget.parentElement) || this.findLastHeader();
|
|
const rootList = DomHandler.getAttribute(prevHeader, 'data-p-highlight') === true ? DomHandler.findSingle(prevHeader.nextElementSibling, '[data-pc-section="menu"]') : null;
|
|
rootList ? DomHandler.focus(rootList) : this.updateFocusedHeader({ originalEvent: event, focusOnNext: false });
|
|
event.preventDefault();
|
|
}
|
|
onHeaderHomeKey(event) {
|
|
this.changeFocusedHeader(event, this.findFirstHeader());
|
|
event.preventDefault();
|
|
}
|
|
onHeaderEndKey(event) {
|
|
this.changeFocusedHeader(event, this.findLastHeader());
|
|
event.preventDefault();
|
|
}
|
|
onHeaderEnterKey(event, item, index) {
|
|
const headerAction = DomHandler.findSingle(event.currentTarget, '[data-pc-section="headeraction"]');
|
|
headerAction ? headerAction.click() : this.onHeaderClick(event, item, index);
|
|
event.preventDefault();
|
|
}
|
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: PanelMenu, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.7", type: PanelMenu, selector: "p-panelMenu", inputs: { model: "model", style: "style", styleClass: "styleClass", multiple: ["multiple", "multiple", booleanAttribute], transitionOptions: "transitionOptions", id: "id", tabindex: ["tabindex", "tabindex", numberAttribute] }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: `
|
|
<div [class]="styleClass" [ngStyle]="style" [ngClass]="'p-panelmenu p-component'" #container>
|
|
<ng-container *ngFor="let item of model; let f = first; let l = last; let i = index">
|
|
<div *ngIf="isItemVisible(item)" class="p-panelmenu-panel" [ngClass]="getItemProp(item, 'headerClass')" [ngStyle]="getItemProp(item, 'style')" [attr.data-pc-section]="'panel'">
|
|
<div
|
|
[ngClass]="{ 'p-component p-panelmenu-header': true, 'p-highlight': isItemActive(item), 'p-disabled': isItemDisabled(item) }"
|
|
[class]="getItemProp(item, 'styleClass')"
|
|
[ngStyle]="getItemProp(item, 'style')"
|
|
[pTooltip]="getItemProp(item, 'tooltip')"
|
|
[attr.id]="getHeaderId(item, i)"
|
|
[tabindex]="0"
|
|
role="button"
|
|
[tooltipOptions]="getItemProp(item, 'tooltipOptions')"
|
|
[attr.aria-expanded]="isItemActive(item)"
|
|
[attr.aria-label]="getItemProp(item, 'label')"
|
|
[attr.aria-controls]="getContentId(item, i)"
|
|
[attr.aria-disabled]="isItemDisabled(item)"
|
|
[attr.data-p-highlight]="isItemActive(item)"
|
|
[attr.data-p-disabled]="isItemDisabled(item)"
|
|
[attr.data-pc-section]="'header'"
|
|
(click)="onHeaderClick($event, item, i)"
|
|
(keydown)="onHeaderKeyDown($event, item, i)"
|
|
>
|
|
<div class="p-panelmenu-header-content">
|
|
<ng-container *ngIf="!headerContentTemplate">
|
|
<a
|
|
*ngIf="!getItemProp(item, 'routerLink')"
|
|
[attr.href]="getItemProp(item, 'url')"
|
|
[attr.tabindex]="-1"
|
|
[target]="getItemProp(item, 'target')"
|
|
[attr.title]="getItemProp(item, 'title')"
|
|
class="p-panelmenu-header-action"
|
|
[attr.data-pc-section]="'headeraction'"
|
|
>
|
|
<ng-container *ngIf="isItemGroup(item)">
|
|
<ng-container *ngIf="!submenuIconTemplate">
|
|
<ChevronDownIcon [styleClass]="'p-submenu-icon'" *ngIf="isItemActive(item)" />
|
|
<ChevronRightIcon [styleClass]="'p-submenu-icon'" *ngIf="!isItemActive(item)" />
|
|
</ng-container>
|
|
<ng-template *ngTemplateOutlet="submenuIconTemplate"></ng-template>
|
|
</ng-container>
|
|
<span class="p-menuitem-icon" [ngClass]="item.icon" *ngIf="item.icon" [ngStyle]="getItemProp(item, 'iconStyle')"></span>
|
|
<span class="p-menuitem-text" *ngIf="getItemProp(item, 'escape') !== false; else htmlLabel">{{ getItemProp(item, 'label') }}</span>
|
|
<ng-template #htmlLabel><span class="p-menuitem-text" [innerHTML]="getItemProp(item, 'label')"></span></ng-template>
|
|
<span class="p-menuitem-badge" *ngIf="getItemProp(item, 'badge')" [ngClass]="getItemProp(item, 'badgeStyleClass')">{{ getItemProp(item, 'badge') }}</span>
|
|
</a>
|
|
</ng-container>
|
|
<ng-container *ngTemplateOutlet="headerContentTemplate; context: { $implicit: item }"></ng-container>
|
|
<a
|
|
*ngIf="getItemProp(item, 'routerLink')"
|
|
[routerLink]="getItemProp(item, 'routerLink')"
|
|
[queryParams]="getItemProp(item, 'queryParams')"
|
|
[routerLinkActive]="'p-menuitem-link-active'"
|
|
[routerLinkActiveOptions]="getItemProp(item, 'routerLinkActiveOptions') || { exact: false }"
|
|
[target]="getItemProp(item, 'target')"
|
|
class="p-panelmenu-header-action"
|
|
[attr.tabindex]="-1"
|
|
[fragment]="getItemProp(item, 'fragment')"
|
|
[queryParamsHandling]="getItemProp(item, 'queryParamsHandling')"
|
|
[preserveFragment]="getItemProp(item, 'preserveFragment')"
|
|
[skipLocationChange]="getItemProp(item, 'skipLocationChange')"
|
|
[replaceUrl]="getItemProp(item, 'replaceUrl')"
|
|
[state]="getItemProp(item, 'state')"
|
|
[attr.data-pc-section]="'headeraction'"
|
|
>
|
|
<ng-container *ngIf="isItemGroup(item)">
|
|
<ng-container *ngIf="!submenuIconTemplate">
|
|
<ChevronDownIcon [styleClass]="'p-submenu-icon'" *ngIf="isItemActive(item)" />
|
|
<ChevronRightIcon [styleClass]="'p-submenu-icon'" *ngIf="!isItemActive(item)" />
|
|
</ng-container>
|
|
<ng-template *ngTemplateOutlet="submenuIconTemplate"></ng-template>
|
|
</ng-container>
|
|
<span class="p-menuitem-icon" [ngClass]="item.icon" *ngIf="item.icon" [ngStyle]="getItemProp(item, 'iconStyle')"></span>
|
|
<span class="p-menuitem-text" *ngIf="getItemProp(item, 'escape') !== false; else htmlRouteLabel">{{ getItemProp(item, 'label') }}</span>
|
|
<ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="getItemProp(item, 'label')"></span></ng-template>
|
|
<span class="p-menuitem-badge" *ngIf="getItemProp(item, 'badge')" [ngClass]="getItemProp(item, 'badgeStyleClass')">{{ getItemProp(item, 'badge') }}</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div
|
|
*ngIf="isItemGroup(item)"
|
|
class="p-toggleable-content"
|
|
[ngClass]="{ 'p-panelmenu-expanded': isItemActive(item) }"
|
|
[@rootItem]="getAnimation(item)"
|
|
(@rootItem.done)="onToggleDone()"
|
|
role="region"
|
|
[attr.id]="getContentId(item, i)"
|
|
[attr.aria-labelledby]="getHeaderId(item, i)"
|
|
[attr.data-pc-section]="'toggleablecontent'"
|
|
>
|
|
<div class="p-panelmenu-content" [attr.data-pc-section]="'menucontent'">
|
|
<p-panelMenuList
|
|
[panelId]="getPanelId(i, item)"
|
|
[items]="getItemProp(item, 'items')"
|
|
[itemTemplate]="itemTemplate"
|
|
[transitionOptions]="transitionOptions"
|
|
[root]="true"
|
|
[activeItem]="activeItem()"
|
|
[tabindex]="tabindex"
|
|
[parentExpanded]="isItemActive(item)"
|
|
(headerFocus)="updateFocusedHeader($event)"
|
|
></p-panelMenuList>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ng-container>
|
|
</div>
|
|
`, isInline: true, styles: ["@layer primeng{.p-panelmenu .p-panelmenu-header-action{display:flex;align-items:center;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;text-decoration:none}.p-panelmenu .p-panelmenu-header-action:focus{z-index:1}.p-panelmenu .p-submenu-list{margin:0;padding:0;list-style:none}.p-panelmenu .p-menuitem-link{display:flex;align-items:center;-webkit-user-select:none;user-select:none;cursor:pointer;text-decoration:none;position:relative;overflow:hidden;outline:none}.p-panelmenu .p-menuitem-text{line-height:1}.p-panelmenu-expanded.p-toggleable-content:not(.ng-animating),.p-panelmenu .p-submenu-expanded:not(.ng-animating){overflow:visible}.p-panelmenu .p-toggleable-content,.p-panelmenu .p-submenu-list{overflow:hidden}}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => i1.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgForOf), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i0.forwardRef(() => i2.RouterLink), selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i0.forwardRef(() => i2.RouterLinkActive), selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: i0.forwardRef(() => i3.Tooltip), selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i0.forwardRef(() => ChevronDownIcon), selector: "ChevronDownIcon" }, { kind: "component", type: i0.forwardRef(() => ChevronRightIcon), selector: "ChevronRightIcon" }, { kind: "component", type: i0.forwardRef(() => PanelMenuList), selector: "p-panelMenuList", inputs: ["panelId", "id", "items", "itemTemplate", "parentExpanded", "expanded", "transitionOptions", "root", "tabindex", "activeItem"], outputs: ["itemToggle", "headerFocus"] }], animations: [
|
|
trigger('rootItem', [
|
|
state('hidden', style({
|
|
height: '0'
|
|
})),
|
|
state('visible', style({
|
|
height: '*'
|
|
})),
|
|
transition('visible <=> hidden', [animate('{{transitionParams}}')]),
|
|
transition('void => *', animate(0))
|
|
])
|
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: PanelMenu, decorators: [{
|
|
type: Component,
|
|
args: [{ selector: 'p-panelMenu', template: `
|
|
<div [class]="styleClass" [ngStyle]="style" [ngClass]="'p-panelmenu p-component'" #container>
|
|
<ng-container *ngFor="let item of model; let f = first; let l = last; let i = index">
|
|
<div *ngIf="isItemVisible(item)" class="p-panelmenu-panel" [ngClass]="getItemProp(item, 'headerClass')" [ngStyle]="getItemProp(item, 'style')" [attr.data-pc-section]="'panel'">
|
|
<div
|
|
[ngClass]="{ 'p-component p-panelmenu-header': true, 'p-highlight': isItemActive(item), 'p-disabled': isItemDisabled(item) }"
|
|
[class]="getItemProp(item, 'styleClass')"
|
|
[ngStyle]="getItemProp(item, 'style')"
|
|
[pTooltip]="getItemProp(item, 'tooltip')"
|
|
[attr.id]="getHeaderId(item, i)"
|
|
[tabindex]="0"
|
|
role="button"
|
|
[tooltipOptions]="getItemProp(item, 'tooltipOptions')"
|
|
[attr.aria-expanded]="isItemActive(item)"
|
|
[attr.aria-label]="getItemProp(item, 'label')"
|
|
[attr.aria-controls]="getContentId(item, i)"
|
|
[attr.aria-disabled]="isItemDisabled(item)"
|
|
[attr.data-p-highlight]="isItemActive(item)"
|
|
[attr.data-p-disabled]="isItemDisabled(item)"
|
|
[attr.data-pc-section]="'header'"
|
|
(click)="onHeaderClick($event, item, i)"
|
|
(keydown)="onHeaderKeyDown($event, item, i)"
|
|
>
|
|
<div class="p-panelmenu-header-content">
|
|
<ng-container *ngIf="!headerContentTemplate">
|
|
<a
|
|
*ngIf="!getItemProp(item, 'routerLink')"
|
|
[attr.href]="getItemProp(item, 'url')"
|
|
[attr.tabindex]="-1"
|
|
[target]="getItemProp(item, 'target')"
|
|
[attr.title]="getItemProp(item, 'title')"
|
|
class="p-panelmenu-header-action"
|
|
[attr.data-pc-section]="'headeraction'"
|
|
>
|
|
<ng-container *ngIf="isItemGroup(item)">
|
|
<ng-container *ngIf="!submenuIconTemplate">
|
|
<ChevronDownIcon [styleClass]="'p-submenu-icon'" *ngIf="isItemActive(item)" />
|
|
<ChevronRightIcon [styleClass]="'p-submenu-icon'" *ngIf="!isItemActive(item)" />
|
|
</ng-container>
|
|
<ng-template *ngTemplateOutlet="submenuIconTemplate"></ng-template>
|
|
</ng-container>
|
|
<span class="p-menuitem-icon" [ngClass]="item.icon" *ngIf="item.icon" [ngStyle]="getItemProp(item, 'iconStyle')"></span>
|
|
<span class="p-menuitem-text" *ngIf="getItemProp(item, 'escape') !== false; else htmlLabel">{{ getItemProp(item, 'label') }}</span>
|
|
<ng-template #htmlLabel><span class="p-menuitem-text" [innerHTML]="getItemProp(item, 'label')"></span></ng-template>
|
|
<span class="p-menuitem-badge" *ngIf="getItemProp(item, 'badge')" [ngClass]="getItemProp(item, 'badgeStyleClass')">{{ getItemProp(item, 'badge') }}</span>
|
|
</a>
|
|
</ng-container>
|
|
<ng-container *ngTemplateOutlet="headerContentTemplate; context: { $implicit: item }"></ng-container>
|
|
<a
|
|
*ngIf="getItemProp(item, 'routerLink')"
|
|
[routerLink]="getItemProp(item, 'routerLink')"
|
|
[queryParams]="getItemProp(item, 'queryParams')"
|
|
[routerLinkActive]="'p-menuitem-link-active'"
|
|
[routerLinkActiveOptions]="getItemProp(item, 'routerLinkActiveOptions') || { exact: false }"
|
|
[target]="getItemProp(item, 'target')"
|
|
class="p-panelmenu-header-action"
|
|
[attr.tabindex]="-1"
|
|
[fragment]="getItemProp(item, 'fragment')"
|
|
[queryParamsHandling]="getItemProp(item, 'queryParamsHandling')"
|
|
[preserveFragment]="getItemProp(item, 'preserveFragment')"
|
|
[skipLocationChange]="getItemProp(item, 'skipLocationChange')"
|
|
[replaceUrl]="getItemProp(item, 'replaceUrl')"
|
|
[state]="getItemProp(item, 'state')"
|
|
[attr.data-pc-section]="'headeraction'"
|
|
>
|
|
<ng-container *ngIf="isItemGroup(item)">
|
|
<ng-container *ngIf="!submenuIconTemplate">
|
|
<ChevronDownIcon [styleClass]="'p-submenu-icon'" *ngIf="isItemActive(item)" />
|
|
<ChevronRightIcon [styleClass]="'p-submenu-icon'" *ngIf="!isItemActive(item)" />
|
|
</ng-container>
|
|
<ng-template *ngTemplateOutlet="submenuIconTemplate"></ng-template>
|
|
</ng-container>
|
|
<span class="p-menuitem-icon" [ngClass]="item.icon" *ngIf="item.icon" [ngStyle]="getItemProp(item, 'iconStyle')"></span>
|
|
<span class="p-menuitem-text" *ngIf="getItemProp(item, 'escape') !== false; else htmlRouteLabel">{{ getItemProp(item, 'label') }}</span>
|
|
<ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="getItemProp(item, 'label')"></span></ng-template>
|
|
<span class="p-menuitem-badge" *ngIf="getItemProp(item, 'badge')" [ngClass]="getItemProp(item, 'badgeStyleClass')">{{ getItemProp(item, 'badge') }}</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div
|
|
*ngIf="isItemGroup(item)"
|
|
class="p-toggleable-content"
|
|
[ngClass]="{ 'p-panelmenu-expanded': isItemActive(item) }"
|
|
[@rootItem]="getAnimation(item)"
|
|
(@rootItem.done)="onToggleDone()"
|
|
role="region"
|
|
[attr.id]="getContentId(item, i)"
|
|
[attr.aria-labelledby]="getHeaderId(item, i)"
|
|
[attr.data-pc-section]="'toggleablecontent'"
|
|
>
|
|
<div class="p-panelmenu-content" [attr.data-pc-section]="'menucontent'">
|
|
<p-panelMenuList
|
|
[panelId]="getPanelId(i, item)"
|
|
[items]="getItemProp(item, 'items')"
|
|
[itemTemplate]="itemTemplate"
|
|
[transitionOptions]="transitionOptions"
|
|
[root]="true"
|
|
[activeItem]="activeItem()"
|
|
[tabindex]="tabindex"
|
|
[parentExpanded]="isItemActive(item)"
|
|
(headerFocus)="updateFocusedHeader($event)"
|
|
></p-panelMenuList>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ng-container>
|
|
</div>
|
|
`, animations: [
|
|
trigger('rootItem', [
|
|
state('hidden', style({
|
|
height: '0'
|
|
})),
|
|
state('visible', style({
|
|
height: '*'
|
|
})),
|
|
transition('visible <=> hidden', [animate('{{transitionParams}}')]),
|
|
transition('void => *', animate(0))
|
|
])
|
|
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
class: 'p-element'
|
|
}, styles: ["@layer primeng{.p-panelmenu .p-panelmenu-header-action{display:flex;align-items:center;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;text-decoration:none}.p-panelmenu .p-panelmenu-header-action:focus{z-index:1}.p-panelmenu .p-submenu-list{margin:0;padding:0;list-style:none}.p-panelmenu .p-menuitem-link{display:flex;align-items:center;-webkit-user-select:none;user-select:none;cursor:pointer;text-decoration:none;position:relative;overflow:hidden;outline:none}.p-panelmenu .p-menuitem-text{line-height:1}.p-panelmenu-expanded.p-toggleable-content:not(.ng-animating),.p-panelmenu .p-submenu-expanded:not(.ng-animating){overflow:visible}.p-panelmenu .p-toggleable-content,.p-panelmenu .p-submenu-list{overflow:hidden}}\n"] }]
|
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { model: [{
|
|
type: Input
|
|
}], style: [{
|
|
type: Input
|
|
}], styleClass: [{
|
|
type: Input
|
|
}], multiple: [{
|
|
type: Input,
|
|
args: [{ transform: booleanAttribute }]
|
|
}], transitionOptions: [{
|
|
type: Input
|
|
}], id: [{
|
|
type: Input
|
|
}], tabindex: [{
|
|
type: Input,
|
|
args: [{ transform: numberAttribute }]
|
|
}], templates: [{
|
|
type: ContentChildren,
|
|
args: [PrimeTemplate]
|
|
}], containerViewChild: [{
|
|
type: ViewChild,
|
|
args: ['container']
|
|
}] } });
|
|
export class PanelMenuModule {
|
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: PanelMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.7", ngImport: i0, type: PanelMenuModule, declarations: [PanelMenu, PanelMenuSub, PanelMenuList], imports: [CommonModule, RouterModule, TooltipModule, SharedModule, AngleDownIcon, AngleRightIcon, ChevronDownIcon, ChevronRightIcon], exports: [PanelMenu, RouterModule, TooltipModule, SharedModule] });
|
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: PanelMenuModule, imports: [CommonModule, RouterModule, TooltipModule, SharedModule, AngleDownIcon, AngleRightIcon, ChevronDownIcon, ChevronRightIcon, RouterModule, TooltipModule, SharedModule] });
|
|
}
|
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: PanelMenuModule, decorators: [{
|
|
type: NgModule,
|
|
args: [{
|
|
imports: [CommonModule, RouterModule, TooltipModule, SharedModule, AngleDownIcon, AngleRightIcon, ChevronDownIcon, ChevronRightIcon],
|
|
exports: [PanelMenu, RouterModule, TooltipModule, SharedModule],
|
|
declarations: [PanelMenu, PanelMenuSub, Panel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iXG4gICAgICAgICAgICAgICAgICAgIFt0b29sdGlwT3B0aW9uc109XCJnZXRJdGVtUHJvcChwcm9jZXNzZWRJdGVtLCAndG9vbHRpcE9wdGlvbnMnKVwiXG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicC1tZW51aXRlbS1jb250ZW50XCIgKGNsaWNrKT1cIm9uSXRlbUNsaWNrKCRldmVudCwgcHJvY2Vzc2VkSXRlbSlcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCIhaXRlbVRlbXBsYXRlXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5nSWY9XCIhZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3JvdXRlckxpbmsnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyLmhyZWZdPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3VybCcpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJwLW1lbnVpdGVtLWxpbmtcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbbmdDbGFzc109XCJ7ICdwLWRpc2FibGVkJzogZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ2Rpc2FibGVkJykgfVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFt0YXJnZXRdPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3RhcmdldCcpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHIuZGF0YS1wYy1zZWN0aW9uXT1cIidhY3Rpb24nXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHIudGFiaW5kZXhdPVwiISFwYXJlbnRFeHBhbmRlZCA/ICcwJyA6ICctMSdcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdJZj1cImlzSXRlbUdyb3VwKHByb2Nlc3NlZEl0ZW0pXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiIXBhbmVsTWVudS5zdWJtZW51SWNvblRlbXBsYXRlXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPEFuZ2xlRG93bkljb24gW3N0eWxlQ2xhc3NdPVwiJ3Atc3VibWVudS1pY29uJ1wiICpuZ0lmPVwiaXNJdGVtQWN0aXZlKHByb2Nlc3NlZEl0ZW0pXCIgW25nU3R5bGVdPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ2ljb25TdHlsZScpXCIgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8QW5nbGVSaWdodEljb24gW3N0eWxlQ2xhc3NdPVwiJ3Atc3VibWVudS1pY29uJ1wiICpuZ0lmPVwiIWlzSXRlbUFjdGl2ZShwcm9jZXNzZWRJdGVtKVwiIFtuZ1N0eWxlXT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdpY29uU3R5bGUnKVwiIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy10ZW1wbGF0ZSAqbmdUZW1wbGF0ZU91dGxldD1cInBhbmVsTWVudS5zdWJtZW51SWNvblRlbXBsYXRlXCI+PC9uZy10ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwicC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IFtyb3V0ZXJMaW5rXT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdyb3V0ZXJMaW5rJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcXVlcnlQYXJhbXNdPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3F1ZXJ5UGFyYW1zJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcm91dGVyTGlua0FjdGl2ZV09XCIncC1tZW51aXRlbS1saW5rLWFjdGl2ZSdcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcm91dGVyTGlua0FjdGl2ZU9wdGlvbnNdPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3JvdXRlckxpbmtBY3RpdmVPcHRpb25zJykgfHwgeyBleGFjdDogZmFsc2UgfVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzPVwicC1tZW51aXRlbS1saW5rXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW25nQ2xhc3NdPVwieyAncC1kaXNhYmxlZCc6IGdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdkaXNhYmxlZCcpIH1cIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbdGFyZ2V0XT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICd0YXJnZXQnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyLnRpdGxlXT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICd0aXRsZScpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW2ZyYWdtZW50XT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdmcmFnbWVudCcpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW3F1ZXJ5UGFyYW1zSGFuZGxpbmddPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3F1ZXJ5UGFyYW1zSGFuZGxpbmcnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtwcmVzZXJ2ZUZyYWdtZW50XT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdwcmVzZXJ2ZUZyYWdtZW50JylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbc2tpcExvY2F0aW9uQ2hhbmdlXT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdza2lwTG9jYXRpb25DaGFuZ2UnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtyZXBsYWNlVXJsXT1cImdldEl0ZW1Qcm9wKHByb2Nlc3NlZEl0ZW0sICdyZXBsYWNlVXJsJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbc3RhdGVdPVwiZ2V0SXRlbVByb3AocHJvY2Vzc2VkSXRlbSwgJ3N0YXRlJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5kYXRhLXBjLXNlY3Rpb25dPVwiJ2FjdGlvbidcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci50YWJpbmRleF09XCIhIXBhcmVudEV4cGFuZGVkID8gJzAnIDogJy0xJ1wiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiaXNJdGVtR3JvdXAocHJvY2Vzc2VkSXRlbSlcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCIhcGFuZWxNZW51LnN1Ym1lbnVJY29uVGVtcGxhdGVcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8QW5nbGVEb3duSWNvbiAqbmdJZj1c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RcIiBbQHN1Ym1lbnVdPVwiZ2V0QW5pbWF0aW9uKHByb2Nlc3NlZEl0ZW0pXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8cC1wYW5lbE1lbnVTdWJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbmdJZj1cImlzSXRlbVZpc2libGUocHJvY2Vzc2VkSXRlbSkgJiYgaXNJdGVtR3JvdXAocHJvY2Vzc2VkSXRlbSkgJiYgaXNJdGVtRXhwYW5kZWQocHJvY2Vzc2VkSXRlbSlcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtpZF09XCJnZXRJdGVtSWQocHJvY2Vzc2VkSXRlbSkgKyAnX2xpc3QnXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcGFuZWxJZF09XCJwYW5lbElkXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbaXRlbXNdPVwicHJvY2Vzc2VkSXRlbT8uaXRlbXNcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtpdGVtVGVtcGxhdGVdPVwiaXRlbVRlbXBsYXRlXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbdHJhbnNpdGlvbk9wdGlvbnNdPVwidHJhbnNpdGlvbk9wdGlvbnNcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtmb2N1c2VkSXRlbUlkXT1cImZvY3VzZWRJdGVtSWRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFthY3RpdmVJdGVtUGF0aF09XCJhY3RpdmVJdGVtUGF0aFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgW2xldmVsXT1cImxldmVsICsgMVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgW3BhcmVudEV4cGFuZGVkXT1cIiEhcGFyZW50RXhwYW5kZWQgJiYgaXNJdGVtRXhwYW5kZWQocHJvY2Vzc2VkSXRlbSlcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpdGVtVG9nZ2xlKT1cIm9uSXRlbVRvZ2dsZSgkZXZlbnQpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgID48L3AtcGFuZWxNZW51U3ViPlxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2xpPlxuICAgICAgICAgICAgPC9uZy10ZW1wbGF0ZT5cbiAgICAgICAgPC91bD5cbiAgICBgLFxuICAgIGFuaW1hdGlvbnM6IFtcbiAgICAgICAgdHJpZ2dlcignc3VibWVudScsIFtcbiAgICAgICAgICAgIHN0YXRlKFxuICAgICAgICAgICAgICAgICdoaWRkZW4nLFxuICAgICAgICAgICAgICAgIHN0eWxlKHtcbiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAnMCdcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIHN0YXRlKFxuICAgICAgICAgICAgICAgICd2aXNpYmxlJyxcbiAgICAgICAgICAgICAgICBzdHlsZSh7XG4gICAgICAgICAgICAgICAgICAgIGhlaWdodDogJyonXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICksXG4gICAgICAgICAgICB0cmFuc2l0aW9uKCd2aXNpYmxlIDw9PiBoaWRkZW4nLCBbYW5pbWF0ZSgne3t0cmFuc2l0aW9uUGFyYW1zfX0nKV0pLFxuICAgICAgICAgICAgdHJhbnNpdGlvbigndm9pZCA9PiAqJywgYW5pbWF0ZSgwKSlcbiAgICAgICAgXSlcbiAgICBdLFxuICAgIGVuY2Fwc3VsYXRpb246IFZpZXdFbmNhcHN1bGF0aW9uLk5vbmUsXG4gICAgaG9zdDoge1xuICAgICAgICBjbGFzczogJ3AtZWxlbWVudCdcbiAgICB9XG59KVxuZXhwb3J0IGNsYXNzIFBhbmVsTWVudVN1YiB7XG4gICAgQElucHV0KCkgcGFuZWxJZDogc3RyaW5nIHwgdW5kZWZpbmVkO1xuXG4gICAgQElucHV0KCkgZm9jdXNlZEl0ZW1JZDogc3RyaW5nIHwgd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kgJiYgYCR7dGhpcy5wYW5lbElkfV8ke3Byb2Nlc3NlZEl0ZW0ua2V5fWAgPT09IHBhcmVudE5vZGUuaWQpO1xuICAgIH1cblxuICAgIGNyZWF0ZVByb2Nlc3NlZEl0ZW1zKGl0ZW1zLCBsZXZlbCA9IDAsIHBhcmVudCA9IHt9LCBwYXJlbnRLZXkgPSAnJykge1xuICAgICAgICBjb25zdCBwcm9jZXNzZWRJdGVtcyA9IFtdO1xuICAgICAgICBpdGVtcyAmJlxuICAgICAgICAgICAgaXRlbXMuZm9yRWFjaCgoaXRlbSwgaW5kZXgpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSAocGFyZW50S2V5ICE9PSAnJyA/IHBhcmVudEtleSArICdfJyA6ICcnKSArIGluZGV4O1xuICAgICAgICAgICAgICAgIGNvbnN0IG5ld0l0ZW0gPSB7XG4gICAgICAgICAgICAgICAgICAgIGljb246IGl0ZW0uaWNvbixcbiAgICAgICAgICAgICAgICAgICAgZXhwYW5kZWQ6IGl0ZW0uZXhwYW5kZWQsXG4gICAgICAgICAgICAgICAgICAgIHNlcGFyYXRvcjogaXRlbS5zZXBhcmF0b3IsXG4gICAgICAgICAgICAgICAgICAgIGl0ZW0sXG4gICAgICAgICAgICAgICAgICAgIGluZGV4LFxuICAgICAgICAgICAgICAgICAgICBsZXZlbCxcbiAgICAgICAgICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgICAgICAgICBwYXJlbnQsXG4gICAgICAgICAgICAgICAgICAgIHBhcmVudEtleVxuICAgICAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgICAgICBuZXdJdGVtWydpdGVtcyddID0gdGhpcy5jcmVhdGVQcm9jZXNzZWRJdGVtcyhpdGVtLml0ZW1zLCBsZXZlbCArIDEsIG5ld0l0ZW0sIGtleSk7XG4gICAgICAgICAgICAgICAgcHJvY2Vzc2VkSXRlbXMucHVzaChuZXdJdGVtKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICByZ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ICAgICAgICAgICAgIHRoaXMub25BcnJvd1VwS2V5KGV2ZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnQXJyb3dMZWZ0JzpcbiAgICAgICAgICAgICAgICB0aGlzLm9uQXJyb3dMZWZ0S2V5KGV2ZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnQXJyb3dSaWdodCc6XG4gICAgICAgICAgICAgICAgdGhpcy5vbkFycm93UmlnaHRLZXkoZXZlbnQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdIb21lJzpcbiAgICAgICAgICAgICAgICB0aGlzLm9uSG9tZUtleShldmVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ0VuZCc6XG4gICAgICAgICAgICAgICAgdGhpcy5vbkVuZEtleShldmVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ1NwYWNlJzpcbiAgICAgICAgICAgICAgICB0aGlzLm9uU3BhY2VLZXkoZXZlbnQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdFbnRlcic6XG4gICAgICAgICAgICAgICAgdGhpcy5vbkVudGVyS2V5KGV2ZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnRXNjYXBlJzpcbiAgICAgICAgICAgIGNhc2UgJ1RhYic6XG4gICAgICAgICAgICBjYXNlICdQYWdlRG93bic6XG4gICAgICAgICAgICBjYXNlICdQYWdlVXAnOlxuICAgICAgICAgICAgY2FzZSAnQmFja3NwYWNlJzpcbiAgICAgICAgICAgIGNhc2UgJ1NoaWZ0TGVmdCc6XG4gICAgICAgICAgICBjYXNlICdTaGlmdFJpZ2h0JzpcbiAgICAgICAgICAgICAgICAvL05PT1BcbiAgICAgICAgICAg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F09XCJnZXRJdGVtUHJvcChpdGVtLCAndG9vbHRpcCcpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyLmlkXT1cImdldEhlYWRlcklkKGl0ZW0sIGkpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIFt0YWJpbmRleF09XCIwXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvbGU9XCJidXR0b25cIlxuICAgICAgICAgICAgICAgICAgICAgICAgW3Rvb2x0aXBPcHRpb25zXT1cImdldEl0ZW1Qcm9wKGl0ZW0sICd0b29sdGlwT3B0aW9ucycpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtZXhwYW5kZWRdPVwiaXNJdGVtQWN0aXZlKGl0ZW0pXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtbGFiZWxdPVwiZ2V0SXRlbVByb3AoaXRlbSwgJ2xhYmVsJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHIuYXJpYS1jb250cm9sc109XCJnZXRDb250ZW50SWQoaXRlbSwgaSlcIlxuICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHIuYXJpYS1kaXNhYmxlZF09XCJpc0l0ZW1EaXNhYmxlZChpdGVtKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5kYXRhLXAtaGlnaGxpZ2h0XT1cImlzSXRlbUFjdGl2ZShpdGVtKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5kYXRhLXAtZGlzYWJsZWRdPVwiaXNJdGVtRGlzYWJsZWQoaXRlbSlcIlxuICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHIuZGF0YS1wYy1zZWN0aW9uXT1cIidoZWFkZXInXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIChjbGljayk9XCJvbkhlYWRlckNsaWNrKCRldmVudCwgaXRlbSwgaSlcIlxuICAgICAgICAgICAgICAgICAgICAgICAgKGtleWRvd24pPVwib25IZWFkZXJLZXlEb3duKCRldmVudCwgaXRlbSwgaSlcIlxuICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwicC1wYW5lbG1lbnUtaGVhZGVyLWNvbnRlbnRcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiIWhlYWRlckNvbnRlbnRUZW1wbGF0ZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm5nSWY9XCIhZ2V0SXRlbVByb3AoaXRlbSwgJ3JvdXRlckxpbmsnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5ocmVmXT1cImdldEl0ZW1Qcm9wKGl0ZW0sICd1cmwnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci50YWJpbmRleF09XCItMVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbdGFyZ2V0XT1cImdldEl0ZW1Qcm9wKGl0ZW0sICd0YXJnZXQnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci50aXRsZV09XCJnZXRJdGVtUHJvcChpdGVtLCAndGl0bGUnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzcz1cInAtcGFuZWxtZW51LWhlYWRlci1hY3Rpb25cIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHIuZGF0YS1wYy1zZWN0aW9uXT1cIidoZWFkZXJhY3Rpb24nXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdJZj1cImlzSXRlbUdyb3VwKGl0ZW0pXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdJZj1cIiFzdWJtZW51SWNvblRlbXBsYXRlXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxDaGV2cm9uRG93bkljb24gW3N0eWxlQ2xhc3NdPVwiJ3Atc3VibWVudS1pY29uJ1wiICpuZ0lmPVwiaXNJdGVtQWN0aXZlKGl0ZW0pXCIgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPENoZXZyb25SaWdodEljb24gW3N0eWxlQ2xhc3NdPVwiJ3Atc3VibWVudS1pY29uJ1wiICpuZ0lmPVwiIWlzSXRlbUFjdGl2ZShpdGVtKVwiIC8+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLXRlbXBsYXRlICpuZ1RlbXBsYXRlT3V0bGV0PVwic3VibWVudUljb25UZW1wbGF0ZVwiPjwvbmctdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwicC1tZW51aXRlbS1pY29uXCIgW25nQ2xhc3NdPVwiaXRlbS5pY29uXCIgKm5nSWY9XCJpdGVtLmljb25cIiBbbmdTdHlsZV09XCJnZXRJdGVtUHJvcChpdGVtLCAnaWNvblN0eWxlJylcIj48L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cInAtbWVudWl0ZW0tdGV4dFwiICpuZ0lmPVwiZ2V0SXRlbVByb3AoaXRlbSwgJ2VzY2FwZScpICE9PSBmYWxzZTsgZWxzZSBodG1sTGFiZWxcIj57eyBnZXRJdGVtUHJvcChpdGVtLCAnbGFiZWwnKSB9fTwvc3Bhbj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy10ZW1wbGF0ZSAjaHRtbExhYmVsPjxzcGFuIGNsYXNzPVwicC1tZW51aXRlbS10ZXh0XCIgW2lubmVySFRNTF09XCJnZXRJdGVtUHJvcChpdGVtLCAnbGFiZWwnKVwiPjwvc3Bhbj48L25nLXRlbXBsYXRlPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJwLW1lbnVpdGVtLWJhZGdlXCIgKm5nSWY9XCJnZXRJdGVtUHJvcChpdGVtLCAnYmFkZ2UnKVwiIFtuZ0NsYXNzXT1cImdldEl0ZW1Qcm9wKGl0ZW0sICdiYWRnZVN0eWxlQ2xhc3MnKVwiPnt7IGdldEl0ZW1Qcm9wKGl0ZW0sICdiYWRnZScpIH19PC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2E+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9uZy1jb250YWluZXI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdUZW1wbGF0ZU91dGxldD1cImhlYWRlckNvbnRlbnRUZW1wbGF0ZTsgY29udGV4dDogeyAkaW1wbGljaXQ6IGl0ZW0gfVwiPjwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpuZ0lmPVwiZ2V0SXRlbVByb3AoaXRlbSwgJ3JvdXRlckxpbmsnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtyb3V0ZXJMaW5rXT1cImdldEl0ZW1Qcm9wKGl0ZW0sICdyb3V0ZXJMaW5rJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcXVlcnlQYXJhbXNdPVwiZ2V0SXRlbVByb3AoaXRlbSwgJ3F1ZXJ5UGFyYW1zJylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcm91dGVyTGlua0FjdGl2ZV09XCIncC1tZW51aXRlbS1saW5rLWFjdGl2ZSdcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcm91dGVyTGlua0FjdGl2ZU9wdGlvbnNdPVwiZ2V0SXRlbVByb3AoaXRlbSwgJ3JvdXRlckxpbmtBY3RpdmVPcHRpb25zJykgfHwgeyBleGFjdDogZmFsc2UgfVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFt0YXJnZXRdPVwiZ2V0SXRlbVByb3AoaXRlbSwgJ3RhcmdldCcpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJwLXBhbmVsbWVudS1oZWFkZXItYWN0aW9uXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHIudGFiaW5kZXhdPVwiLTFcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbZnJhZ21lbnRdPVwiZ2V0SXRlbVByb3AoaXRlbSwgJ2ZyYWdtZW50JylcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbcXVlcnlQYXJhbXNIYW5kbGluZ109XCJnZXRJdGVtUHJvcChpdGVtLCAncXVlcnlQYXJhbXNIYW5kbGluZycpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW3ByZXNlcnZlRnJhZ21lbnRdPVwiZ2V0SXRlbVByb3AoaXRlbSwgJ3ByZXNlcnZlRnJhZ21lbnQnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtza2lwTG9jYXRpb25DaGFuZ2VdPVwiZ2V0SXRlbVByb3AoaXRlbSwgJ3NraXBMb2NhdGlvbkNoYW5nZScpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW3JlcGxhY2VVcmxdPVwiZ2V0SXRlbVByb3AoaXRlbSwgJ3JlcGxhY2VVcmwnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtzdGF0ZV09XCJnZXRJdGVtUHJvcChpdGVtLCAnc3RhdGUnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyLmRhdGEtcGMtc2VjdGlvbl09XCInaGVhZGVyYWN0aW9uJ1wiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiaXNJdGVtR3JvdXAoaXRlbSlcIj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCIhc3VibWVudUljb25UZW1wbGF0ZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxDaGV2cm9uRG93bkljb24gW3N0eWxlQ2xhc3NdPVwiJ3Atc3VibWVudS1pY29uJ1wiICpuZ0lmPVwiaXNJdGVtQWN0aXZlKGl0ZW0pXCIgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8Q2hldnJvblJpZ2h0SWNvbiBbc3R5bGVDbGFzc109XCIncC1zdWJtZW51LWljb24nXCIgKm5nSWY9XCIhaXNJdGVtQWN0aXZlKGl0ZW0pXCIgLz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5nLXRlbXBsYXRlICpuZ1RlbXBsYXRlT3V0bGV0PVwic3VibWVudUljb25UZW1wbGF0ZVwiPjwvbmctdGVtcGxhdGU+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cInAtbWVudWl0ZW0taWNvblwiIFtu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lLWNvbnRlbnRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgW25nQ2xhc3NdPVwieyAncC1wYW5lbG1lbnUtZXhwYW5kZWQnOiBpc0l0ZW1BY3RpdmUoaXRlbSkgfVwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbQHJvb3RJdGVtXT1cImdldEFuaW1hdGlvbihpdGVtKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAoQHJvb3RJdGVtLmRvbmUpPVwib25Ub2dnbGVEb25lKClcIlxuICAgICAgICAgICAgICAgICAgICAgICAgcm9sZT1cInJlZ2lvblwiXG4gICAgICAgICAgICAgICAgICAgICAgICBbYXR0ci5pZF09XCJnZXRDb250ZW50SWQoaXRlbSwgaSlcIlxuICAgICAgICAgICAgICAgICAgICAgICAgW2F0dHIuYXJpYS1sYWJlbGxlZGJ5XT1cImdldEhlYWRlcklkKGl0ZW0sIGkpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIFthdHRyLmRhdGEtcGMtc2VjdGlvbl09XCIndG9nZ2xlYWJsZWNvbnRlbnQnXCJcbiAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInAtcGFuZWxtZW51LWNvbnRlbnRcIiBbYXR0ci5kYXRhLXBjLXNlY3Rpb25dPVwiJ21lbnVjb250ZW50J1wiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwLXBhbmVsTWVudUxpc3RcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW3BhbmVsSWRdPVwiZ2V0UGFuZWxJZChpLCBpdGVtKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtpdGVtc109XCJnZXRJdGVtUHJvcChpdGVtLCAnaXRlbXMnKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtpdGVtVGVtcGxhdGVdPVwiaXRlbVRlbXBsYXRlXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW3RyYW5zaXRpb25PcHRpb25zXT1cInRyYW5zaXRpb25PcHRpb25zXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW3Jvb3RdPVwidHJ1ZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFthY3RpdmVJdGVtXT1cImFjdGl2ZUl0ZW0oKVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFt0YWJpbmRleF09XCJ0YWJpbmRleFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtwYXJlbnRFeHBhbmRlZF09XCJpc0l0ZW1BY3RpdmUoaXRlbSlcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaGVhZGVyRm9jdXMpPVwidXBkYXRlRm9jdXNlZEhlYWRlcigkZXZlbnQpXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA+PC9wLXBhbmVsTWVudUxpc3Q+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgPC9kaXY+XG4gICAgYCxcbiAgICBhbmltYXRpb25zOiBbXG4gICAgICAgIHRyaWdnZXIoJ3Jvb3RJdGVtJywgW1xuICAgICAgICAgICAgc3RhdGUoXG4gICAgICAgICAgICAgICAgJ2hpZGRlbicsXG4gICAgICAgICAgICAgICAgc3R5bGUoe1xuICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6ICcwJ1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApLFxuICAgICAgICAgICAgc3RhdGUoXG4gICAgICAgICAgICAgICAgJ3Zpc2libGUnLFxuICAgICAgICAgICAgICAgIHN0eWxlKHtcbiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAnKidcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKSxcbi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mJiBtb2RlbEl0ZW0uZXhwYW5kZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgbW9kZWxJdGVtLmV4cGFuZGVkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaXRlbS5leHBhbmRlZCA9ICFpdGVtLmV4cGFuZGVkO1xuICAgICAgICB0aGlzLmNoYW5nZUFjdGl2ZUl0ZW0oZXZlbnQsIGl0ZW0sIGluZGV4KTtcbiAgICAgICAgdGhpcy5hbmltYXRpbmcgPSB0cnVlO1xuICAgICAgICBEb21IYW5kbGVyLmZvY3VzKGV2ZW50LmN1cnJlbnRUYXJnZXQgYXMgSFRNTEVsZW1lbnQpO1xuICAgIH1cblxuICAgIG9uSGVhZGVyS2V5RG93bihldmVudCwgaXRlbSwgaW5kZXgpIHtcbiAgICAgICAgc3dpdGNoIChldmVudC5jb2RlKSB7XG4gICAgICAgICAgICBjYXNlICdBcnJvd0Rvd24nOlxuICAgICAgICAgICAgICAgIHRoaXMub25IZWFkZXJBcnJvd0Rvd25LZXkoZXZlbnQpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdBcnJvd1VwJzpcbiAgICAgICAgICAgICAgICB0aGlzLm9uSGVhZGVyQXJyb3dVcEtleShldmVudCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ0hvbWUnOlxuICAgICAgICAgICAgICAgIHRoaXMub25IZWFkZXJIb21lS2V5KGV2ZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnRW5kJzpcbiAgICAgICAgICAgICAgICB0aGlzLm9uSGVhZGVyRW5kS2V5KGV2ZW50KTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnRW50ZXInOlxuICAgICAgICAgICAgY2FzZSAnU3BhY2UnOlxuICAgICAgICA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