primeng
Version:
PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB
1 lines • 72.5 kB
Source Map (JSON)
{"version":3,"file":"primeng-treeselect.mjs","sources":["../../src/treeselect/style/treeselectstyle.ts","../../src/treeselect/treeselect.ts","../../src/treeselect/primeng-treeselect.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style } from '@primeuix/styles/treeselect';\nimport { BaseStyle } from 'primeng/base';\n\nconst theme = /*css*/ `\n ${style}\n\n /* For PrimeNG */\n\n .p-treeselect.ng-invalid.ng-dirty {\n border-color: dt('treeselect.invalid.border.color');\n }\n\n p-treeselect.ng-invalid.ng-dirty.p-focus {\n border-color: dt('treeselect.focus.border.color');\n }\n\n p-treeselect.ng-invalid.ng-dirty .p-treeselect-label.p-placeholder {\n color: dt('treeselect.invalid.placeholder.color');\n }\n`;\n\nconst inlineStyles = {\n root: ({ instance }) => ({ position: instance.$appendTo() === 'self' ? 'relative' : undefined, ...instance.containerStyle })\n};\n\nconst classes = {\n root: ({ instance }) => [\n 'p-treeselect p-component p-inputwrapper',\n {\n 'p-treeselect-display-chip': instance.display === 'chip',\n 'p-disabled': instance.$disabled(),\n 'p-invalid': instance.invalid(),\n 'p-focus': instance.focused,\n 'p-variant-filled': instance.$variant() === 'filled',\n 'p-inputwrapper-filled': !instance.emptyValue,\n 'p-inputwrapper-focus': instance.focused || instance.overlayVisible,\n 'p-treeselect-open': instance.overlayVisible,\n 'p-treeselect-clearable': instance.showClear,\n 'p-treeselect-fluid': instance.hasFluid,\n 'p-treeselect-sm p-inputfield-sm': instance.size() === 'small',\n 'p-treeselect-lg p-inputfield-lg': instance.size() === 'large'\n }\n ],\n labelContainer: 'p-treeselect-label-container',\n label: ({ instance }) => [\n 'p-treeselect-label',\n {\n 'p-placeholder': instance.label === instance.placeholder,\n 'p-treeselect-label-empty': !instance.placeholder && instance.emptyValue\n }\n ],\n chip: 'p-treeselect-chip-item',\n pcChip: 'p-treeselect-chip',\n dropdown: 'p-treeselect-dropdown',\n dropdownIcon: 'p-treeselect-dropdown-icon',\n panel: 'p-treeselect-overlay p-component-overlay p-component',\n treeContainer: 'p-treeselect-tree-container',\n emptyMessage: 'p-treeselect-empty-message'\n};\n\n@Injectable()\nexport class TreeSelectStyle extends BaseStyle {\n name = 'treeselect';\n\n theme = theme;\n\n classes = classes;\n\n inlineStyles = inlineStyles;\n}\n\n/**\n *\n * TreeSelect is a form component to choose from hierarchical data.\n *\n * [Live Demo](https://www.primeng.org/treeselect/)\n *\n * @module treeselectstyle\n *\n */\nexport enum TreeSelectClasses {\n /**\n * Class name of the root element\n */\n root = 'p-treeselect',\n /**\n * Class name of the label container element\n */\n labelContainer = 'p-treeselect-label-container',\n /**\n * Class name of the label element\n */\n label = 'p-treeselect-label',\n /**\n * Class name of the chip item element\n */\n chipItem = 'p-treeselect-chip-item',\n /**\n * Class name of the chip element\n */\n pcChip = 'p-treeselect-chip',\n /**\n * Class name of the dropdown element\n */\n dropdown = 'p-treeselect-dropdown',\n /**\n * Class name of the dropdown icon element\n */\n dropdownIcon = 'p-treeselect-dropdown-icon',\n /**\n * Class name of the panel element\n */\n panel = 'p-treeselect-overlay',\n /**\n * Class name of the tree container element\n */\n treeContainer = 'p-treeselect-tree-container',\n /**\n * Class name of the empty message element\n */\n emptyMessage = 'p-treeselect-empty-message'\n}\n\nexport interface TreeSelectStyle extends BaseStyle {}\n","import { AnimationEvent } from '@angular/animations';\nimport { CommonModule } from '@angular/common';\nimport {\n AfterContentInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n ContentChild,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostListener,\n inject,\n input,\n Input,\n NgModule,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { focus, getFirstFocusableElement, getFocusableElements, getLastFocusableElement, hasClass, isNotEmpty, uuid } from '@primeuix/utils';\nimport { OverlayOptions, PrimeTemplate, ScrollerOptions, SharedModule, TreeNode } from 'primeng/api';\nimport { AutoFocus } from 'primeng/autofocus';\nimport { BaseEditableHolder } from 'primeng/baseeditableholder';\nimport { Chip } from 'primeng/chip';\nimport { Fluid } from 'primeng/fluid';\nimport { ChevronDownIcon, TimesIcon } from 'primeng/icons';\nimport { Overlay } from 'primeng/overlay';\nimport { Tree, TreeFilterEvent, TreeNodeSelectEvent, TreeNodeUnSelectEvent } from 'primeng/tree';\nimport { Nullable } from 'primeng/ts-helpers';\nimport { TreeSelectStyle } from './style/treeselectstyle';\nimport { TreeSelectNodeCollapseEvent, TreeSelectNodeExpandEvent } from './treeselect.interface';\n\nexport const TREESELECT_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TreeSelect),\n multi: true\n};\n/**\n * TreeSelect is a form component to choose from hierarchical data.\n * @group Components\n */\n@Component({\n selector: 'p-treeSelect, p-treeselect, p-tree-select',\n standalone: true,\n imports: [CommonModule, Overlay, SharedModule, Tree, AutoFocus, TimesIcon, ChevronDownIcon, Chip],\n template: `\n <div class=\"p-hidden-accessible\">\n <input\n #focusInput\n type=\"text\"\n role=\"combobox\"\n [attr.id]=\"inputId\"\n readonly\n [attr.disabled]=\"$disabled() ? '' : undefined\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n (keydown)=\"onKeyDown($event)\"\n [attr.tabindex]=\"!$disabled() ? tabindex : -1\"\n [attr.aria-controls]=\"overlayVisible ? listId : null\"\n [attr.aria-haspopup]=\"'tree'\"\n [attr.aria-expanded]=\"overlayVisible ?? false\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-label]=\"ariaLabel || (label === 'p-emptylabel' ? undefined : label)\"\n [pAutoFocus]=\"autofocus\"\n />\n </div>\n <div [class]=\"cx('labelContainer')\">\n <div [class]=\"cn(cx('label'), labelStyleClass)\" [ngStyle]=\"labelStyle\">\n <ng-container *ngIf=\"valueTemplate || _valueTemplate; else defaultValueTemplate\">\n <ng-container *ngTemplateOutlet=\"valueTemplate || _valueTemplate; context: { $implicit: value, placeholder: placeholder }\"></ng-container>\n </ng-container>\n <ng-template #defaultValueTemplate>\n <ng-container *ngIf=\"display === 'comma'; else chipsValueTemplate\">\n {{ label || 'empty' }}\n </ng-container>\n <ng-template #chipsValueTemplate>\n <div *ngFor=\"let node of value\" [class]=\"cx('chipItem')\">\n <p-chip [label]=\"node.label\" [class]=\"cx('pcChip')\" />\n </div>\n <ng-container *ngIf=\"emptyValue\">{{ placeholder || 'empty' }}</ng-container>\n </ng-template>\n </ng-template>\n </div>\n </div>\n <ng-container *ngIf=\"checkValue() && !$disabled() && showClear\">\n <svg data-p-icon=\"times\" *ngIf=\"!clearIconTemplate && !_clearIconTemplate\" [class]=\"cx('clearIcon')\" (click)=\"clear($event)\" />\n <span *ngIf=\"clearIconTemplate || clearIconTemplate\" [class]=\"cx('clearIcon')\" (click)=\"clear($event)\">\n <ng-template *ngTemplateOutlet=\"clearIconTemplate || _clearIconTemplate\"></ng-template>\n </span>\n </ng-container>\n <div [class]=\"cx('dropdown')\" role=\"button\" aria-haspopup=\"tree\" [attr.aria-expanded]=\"overlayVisible ?? false\" [attr.aria-label]=\"'treeselect trigger'\">\n <svg data-p-icon=\"chevron-down\" *ngIf=\"!triggerIconTemplate && !_triggerIconTemplate && !dropdownIconTemplate && !_dropdownIconTemplate\" [class]=\"cx('dropdownIcon')\" />\n <span *ngIf=\"triggerIconTemplate || _triggerIconTemplate || dropdownIconTemplate || _dropdownIconTemplate\" [class]=\"cx('dropdownIcon')\">\n <ng-template *ngTemplateOutlet=\"triggerIconTemplate || _triggerIconTemplate || dropdownIconTemplate || _dropdownIconTemplate\"></ng-template>\n </span>\n </div>\n <p-overlay\n #overlay\n [hostAttrSelector]=\"attrSelector\"\n [(visible)]=\"overlayVisible\"\n [options]=\"overlayOptions\"\n [target]=\"'@parent'\"\n [appendTo]=\"$appendTo()\"\n (onAnimationStart)=\"onOverlayAnimationStart($event)\"\n (onBeforeHide)=\"onOverlayBeforeHide($event)\"\n (onShow)=\"onShow.emit($event)\"\n (onHide)=\"hide($event)\"\n >\n <ng-template #content>\n <div #panel [attr.id]=\"listId\" [class]=\"cn(cx('panel'), panelStyleClass, panelClass)\" [ngStyle]=\"panelStyle\">\n <span\n #firstHiddenFocusableEl\n role=\"presentation\"\n class=\"p-hidden-accessible p-hidden-focusable\"\n [attr.tabindex]=\"0\"\n (focus)=\"onFirstHiddenFocus($event)\"\n [attr.data-p-hidden-accessible]=\"true\"\n [attr.data-p-hidden-focusable]=\"true\"\n >\n </span>\n <ng-container *ngTemplateOutlet=\"headerTemplate || _headerTemplate; context: { $implicit: value, options: options }\"></ng-container>\n <div [class]=\"cx('treeContainer')\" [ngStyle]=\"{ 'max-height': scrollHeight }\">\n <p-tree\n #tree\n [value]=\"options\"\n [propagateSelectionDown]=\"propagateSelectionDown\"\n [propagateSelectionUp]=\"propagateSelectionUp\"\n [selectionMode]=\"selectionMode\"\n (selectionChange)=\"onSelectionChange($event)\"\n [selection]=\"value\"\n [metaKeySelection]=\"metaKeySelection\"\n (onNodeExpand)=\"nodeExpand($event)\"\n (onNodeCollapse)=\"nodeCollapse($event)\"\n (onNodeSelect)=\"onSelect($event)\"\n [emptyMessage]=\"emptyMessage\"\n (onNodeUnselect)=\"onUnselect($event)\"\n [filter]=\"filter\"\n [filterBy]=\"filterBy\"\n [filterMode]=\"filterMode\"\n [filterPlaceholder]=\"filterPlaceholder\"\n [filterLocale]=\"filterLocale\"\n [filteredNodes]=\"filteredNodes\"\n [virtualScroll]=\"virtualScroll\"\n [virtualScrollItemSize]=\"virtualScrollItemSize\"\n [virtualScrollOptions]=\"virtualScrollOptions\"\n [_templateMap]=\"templateMap\"\n [loading]=\"loading\"\n [filterInputAutoFocus]=\"filterInputAutoFocus\"\n >\n <ng-container *ngIf=\"emptyTemplate || _emptyTemplate\">\n <ng-template #empty>\n <ng-container *ngTemplateOutlet=\"emptyTemplate || _emptyTemplate\"></ng-container>\n </ng-template>\n </ng-container>\n <ng-template #togglericon let-expanded *ngIf=\"itemTogglerIconTemplate || _itemTogglerIconTemplate\">\n <ng-container *ngTemplateOutlet=\"itemTogglerIconTemplate || _itemTogglerIconTemplate; context: { $implicit: expanded }\"></ng-container>\n </ng-template>\n <ng-template #checkboxicon let-selected let-partialSelected=\"partialSelected\" *ngIf=\"itemCheckboxIconTemplate || _itemCheckboxIconTemplate\">\n <ng-container *ngTemplateOutlet=\"itemCheckboxIconTemplate || _itemCheckboxIconTemplate; context: { $implicit: selected, partialSelected: partialSelected }\"></ng-container>\n </ng-template>\n <ng-template #loadingicon *ngIf=\"itemLoadingIconTemplate || _itemLoadingIconTemplate\">\n <ng-container *ngTemplateOutlet=\"itemLoadingIconTemplate || _itemLoadingIconTemplate\"></ng-container>\n </ng-template>\n </p-tree>\n </div>\n <ng-container *ngTemplateOutlet=\"footerTemplate; context: { $implicit: value, options: options }\"></ng-container>\n <span\n #lastHiddenFocusableEl\n role=\"presentation\"\n class=\"p-hidden-accessible p-hidden-focusable\"\n [attr.tabindex]=\"0\"\n (focus)=\"onLastHiddenFocus($event)\"\n [attr.data-p-hidden-accessible]=\"true\"\n [attr.data-p-hidden-focusable]=\"true\"\n ></span>\n </div>\n </ng-template>\n </p-overlay>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TREESELECT_VALUE_ACCESSOR, TreeSelectStyle],\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': \"cn(cx('root'), containerStyleClass)\",\n '[style]': \"sx('root')\"\n }\n})\nexport class TreeSelect extends BaseEditableHolder implements AfterContentInit {\n /**\n * Identifier of the underlying input element.\n * @group Props\n */\n @Input() inputId: string | undefined;\n /**\n * Height of the viewport, a scrollbar is defined if height of list exceeds this value.\n * @group Props\n */\n @Input() scrollHeight: string = '400px';\n /**\n * Defines how multiple items can be selected, when true metaKey needs to be pressed to select or unselect an item and when set to false selection of each item can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) metaKeySelection: boolean = false;\n /**\n * Defines how the selected items are displayed.\n * @group Props\n */\n @Input() display: 'comma' | 'chip' = 'comma';\n /**\n * Defines the selection mode.\n * @group Props\n */\n @Input() selectionMode: 'single' | 'multiple' | 'checkbox' = 'single';\n /**\n * Index of the element in tabbing order.\n * @group Props\n */\n @Input() tabindex: string | undefined = '0';\n /**\n * Defines a string that labels the input for accessibility.\n * @group Props\n */\n @Input() ariaLabel: string | undefined;\n /**\n * Establishes relationships between the component and label(s) where its value should be one or more element IDs.\n * @group Props\n */\n @Input() ariaLabelledBy: string | undefined;\n /**\n * Label to display when there are no selections.\n * @group Props\n */\n @Input() placeholder: string | undefined;\n /**\n * Style class of the overlay panel.\n * @group Props\n */\n @Input() panelClass: string | string[] | Set<string> | { [klass: string]: any } | undefined;\n /**\n * Inline style of the panel element.\n * @group Props\n */\n @Input() panelStyle: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the panel element.\n * @group Props\n */\n @Input() panelStyleClass: string | undefined;\n /**\n * Inline style of the container element.\n * @deprecated since v20.0.0, use `style` instead.\n * @group Props\n */\n @Input() containerStyle: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the container element.\n * @deprecated since v20.0.0, use `class` instead.\n * @group Props\n */\n @Input() containerStyleClass: string | undefined;\n /**\n * Inline style of the label element.\n * @group Props\n */\n @Input() labelStyle: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the label element.\n * @group Props\n */\n @Input() labelStyleClass: string | undefined;\n /**\n * Specifies the options for the overlay.\n * @group Props\n */\n @Input() overlayOptions: OverlayOptions | undefined;\n /**\n * Text to display when there are no options available. Defaults to value from PrimeNG locale configuration.\n * @group Props\n */\n @Input() emptyMessage: string = '';\n /**\n * When specified, displays an input field to filter the items.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) filter: boolean = false;\n /**\n * When filtering is enabled, filterBy decides which field or fields (comma separated) to search against.\n * @group Props\n */\n @Input() filterBy: string = 'label';\n /**\n * Mode for filtering valid values are \"lenient\" and \"strict\". Default is lenient.\n * @group Props\n */\n @Input() filterMode: string = 'lenient';\n /**\n * Placeholder text to show when filter input is empty.\n * @group Props\n */\n @Input() filterPlaceholder: string | undefined;\n /**\n * Locale to use in filtering. The default locale is the host environment's current locale.\n * @group Props\n */\n @Input() filterLocale: string | undefined;\n /**\n * Determines whether the filter input should be automatically focused when the component is rendered.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) filterInputAutoFocus: boolean = true;\n /**\n * Whether checkbox selections propagate to descendant nodes.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) propagateSelectionDown: boolean = true;\n /**\n * Whether checkbox selections propagate to ancestor nodes.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) propagateSelectionUp: boolean = true;\n /**\n * When enabled, a clear icon is displayed to clear the value.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) showClear: boolean = false;\n /**\n * Clears the filter value when hiding the dropdown.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) resetFilterOnHide: boolean = true;\n /**\n * Whether the data should be loaded on demand during scroll.\n * @group Props\n */\n @Input() virtualScroll: boolean | undefined;\n /**\n * Height of an item in the list for VirtualScrolling.\n * @group Props\n */\n @Input() virtualScrollItemSize: number | undefined;\n /**\n * Whether to use the scroller feature. The properties of scroller component can be used like an object in it.\n * @group Props\n */\n @Input() virtualScrollOptions: ScrollerOptions | undefined;\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) autofocus: boolean | undefined;\n /**\n * An array of treenodes.\n * @defaultValue undefined\n * @group Props\n */\n @Input() get options(): TreeNode[] | undefined {\n return this._options;\n }\n set options(options: TreeNode[] | undefined) {\n this._options = options;\n this.updateTreeState();\n }\n /**\n * Displays a loader to indicate data load is in progress.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) loading: boolean | undefined;\n /**\n * Specifies the size of the component.\n * @defaultValue undefined\n * @group Props\n */\n size = input<'large' | 'small' | undefined>();\n /**\n * Specifies the input variant of the component.\n * @defaultValue undefined\n * @group Props\n */\n variant = input<'filled' | 'outlined' | undefined>();\n /**\n * Spans 100% width of the container when enabled.\n * @defaultValue undefined\n * @group Props\n */\n fluid = input(undefined, { transform: booleanAttribute });\n /**\n * Target element to attach the overlay, valid values are \"body\" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]=\"mydiv\" for a div element having #mydiv as variable name).\n * @defaultValue 'self'\n * @group Props\n */\n appendTo = input<HTMLElement | ElementRef | TemplateRef<any> | 'self' | 'body' | null | undefined | any>(undefined);\n /**\n * Callback to invoke when a node is expanded.\n * @param {TreeSelectNodeExpandEvent} event - Custom node expand event.\n * @group Emits\n */\n @Output() onNodeExpand: EventEmitter<TreeSelectNodeExpandEvent> = new EventEmitter<TreeSelectNodeExpandEvent>();\n /**\n * Callback to invoke when a node is collapsed.\n * @param {TreeSelectNodeCollapseEvent} event - Custom node collapse event.\n * @group Emits\n */\n @Output() onNodeCollapse: EventEmitter<TreeSelectNodeCollapseEvent> = new EventEmitter<TreeSelectNodeCollapseEvent>();\n /**\n * Callback to invoke when the overlay is shown.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n @Output() onShow: EventEmitter<any> = new EventEmitter<any>();\n /**\n * Callback to invoke when the overlay is hidden.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n @Output() onHide: EventEmitter<Event> = new EventEmitter<Event>();\n /**\n * Callback to invoke when input field is cleared.\n * @group Emits\n */\n @Output() onClear: EventEmitter<any> = new EventEmitter<any>();\n /**\n * Callback to invoke when data is filtered.\n * @group Emits\n */\n @Output() onFilter: EventEmitter<TreeFilterEvent> = new EventEmitter<TreeFilterEvent>();\n /**\n * Callback to invoke when treeselect gets focus.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n @Output() onFocus: EventEmitter<Event> = new EventEmitter<Event>();\n /**\n * Callback to invoke when treeselect loses focus.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n @Output() onBlur: EventEmitter<Event> = new EventEmitter<Event>();\n /**\n * Callback to invoke when a node is unselected.\n * @param {TreeNodeUnSelectEvent} event - node unselect event.\n * @group Emits\n */\n @Output() onNodeUnselect: EventEmitter<TreeNodeUnSelectEvent> = new EventEmitter<TreeNodeUnSelectEvent>();\n /**\n * Callback to invoke when a node is selected.\n * @param {TreeNodeSelectEvent} event - node select event.\n * @group Emits\n */\n @Output() onNodeSelect: EventEmitter<TreeNodeSelectEvent> = new EventEmitter<TreeNodeSelectEvent>();\n\n $appendTo = computed(() => this.appendTo() || this.config.overlayAppendTo());\n\n @ViewChild('focusInput') focusInput: Nullable<ElementRef>;\n\n @ViewChild('filter') filterViewChild: Nullable<ElementRef>;\n\n @ViewChild('tree') treeViewChild: Nullable<Tree>;\n\n @ViewChild('panel') panelEl: Nullable<ElementRef>;\n\n @ViewChild('overlay') overlayViewChild: Nullable<Overlay>;\n\n @ViewChild('firstHiddenFocusableEl') firstHiddenFocusableElementOnOverlay: Nullable<ElementRef>;\n\n @ViewChild('lastHiddenFocusableEl') lastHiddenFocusableElementOnOverlay: Nullable<ElementRef>;\n\n $variant = computed(() => this.variant() || this.config.inputStyle() || this.config.inputVariant());\n\n pcFluid: Fluid = inject(Fluid, { optional: true, host: true, skipSelf: true });\n\n get hasFluid() {\n return this.fluid() ?? !!this.pcFluid;\n }\n\n public filteredNodes: TreeNode[] | undefined | null;\n\n filterValue: Nullable<string> = null;\n\n serializedValue: Nullable<any[]>;\n /**\n * Custom value template.\n * @group Templates\n */\n @ContentChild('value', { descendants: false }) valueTemplate: Nullable<TemplateRef<any>>;\n\n /**\n * Custom header template.\n * @group Templates\n */\n @ContentChild('header', { descendants: false }) headerTemplate: Nullable<TemplateRef<any>>;\n\n /**\n * Custom empty message template.\n * @group Templates\n */\n @ContentChild('empty', { descendants: false }) emptyTemplate: Nullable<TemplateRef<any>>;\n\n /**\n * Custom footer template.\n * @group Templates\n */\n @ContentChild('footer', { descendants: false }) footerTemplate: Nullable<TemplateRef<any>>;\n\n /**\n * Custom clear icon template.\n * @group Templates\n */\n @ContentChild('clearicon', { descendants: false }) clearIconTemplate: Nullable<TemplateRef<any>>;\n\n /**\n * Custom trigger icon template.\n * @group Templates\n */\n @ContentChild('triggericon', { descendants: false }) triggerIconTemplate: Nullable<TemplateRef<any>>;\n\n /**\n * Custom dropdown icon template.\n * @group Templates\n */\n @ContentChild('dropdownicon', { descendants: false }) dropdownIconTemplate: Nullable<TemplateRef<any>>;\n\n /**\n * Custom filter icon template.\n * @group Templates\n */\n @ContentChild('filtericon', { descendants: false }) filterIconTemplate: Nullable<TemplateRef<any>>;\n\n /**\n * Custom close icon template.\n * @group Templates\n */\n @ContentChild('closeicon', { descendants: false }) closeIconTemplate: Nullable<TemplateRef<any>>;\n\n /**\n * Custom item toggler icon template.\n * @group Templates\n */\n @ContentChild('itemtogglericon', { descendants: false }) itemTogglerIconTemplate: Nullable<TemplateRef<any>>;\n\n /**\n * Custom item checkbox icon template.\n * @group Templates\n */\n @ContentChild('itemcheckboxicon', { descendants: false }) itemCheckboxIconTemplate: Nullable<TemplateRef<any>>;\n\n /**\n * Custom item loading icon template.\n * @group Templates\n */\n @ContentChild('itemloadingicon', { descendants: false }) itemLoadingIconTemplate: Nullable<TemplateRef<any>>;\n\n @ContentChildren(PrimeTemplate) templates: Nullable<QueryList<PrimeTemplate>>;\n\n _valueTemplate: TemplateRef<any> | undefined;\n\n _headerTemplate: TemplateRef<any> | undefined;\n\n _emptyTemplate: TemplateRef<any> | undefined;\n\n _footerTemplate: TemplateRef<any> | undefined;\n\n _clearIconTemplate: TemplateRef<any> | undefined;\n\n _triggerIconTemplate: TemplateRef<any> | undefined;\n\n _filterIconTemplate: TemplateRef<any> | undefined;\n\n _closeIconTemplate: TemplateRef<any> | undefined;\n\n _itemTogglerIconTemplate: TemplateRef<any> | undefined;\n\n _itemCheckboxIconTemplate: TemplateRef<any> | undefined;\n\n _itemLoadingIconTemplate: TemplateRef<any> | undefined;\n\n _dropdownIconTemplate: TemplateRef<any> | undefined;\n\n focused: Nullable<boolean>;\n\n overlayVisible: Nullable<boolean>;\n\n value: any | undefined;\n\n expandedNodes: any[] = [];\n\n _options: TreeNode[] | undefined;\n\n public templateMap: any;\n\n listId: string = '';\n\n _componentStyle = inject(TreeSelectStyle);\n\n @HostListener('click', ['$event'])\n onHostClick(event: MouseEvent) {\n this.onClick(event);\n }\n\n ngOnInit() {\n super.ngOnInit();\n this.listId = uuid('pn_id_') + '_list';\n this.updateTreeState();\n }\n\n ngAfterContentInit() {\n if ((this.templates as QueryList<PrimeTemplate>).length) {\n this.templateMap = {};\n }\n\n (this.templates as QueryList<PrimeTemplate>).forEach((item) => {\n switch (item.getType()) {\n case 'value':\n this._valueTemplate = item.template;\n break;\n\n case 'header':\n this._headerTemplate = item.template;\n break;\n\n case 'empty':\n this._emptyTemplate = item.template;\n break;\n\n case 'footer':\n this._footerTemplate = item.template;\n break;\n\n case 'clearicon':\n this._clearIconTemplate = item.template;\n break;\n\n case 'triggericon':\n this._triggerIconTemplate = item.template;\n break;\n\n case 'filtericon':\n this._filterIconTemplate = item.template;\n break;\n\n case 'closeicon':\n this._closeIconTemplate = item.template;\n break;\n\n case 'itemtogglericon':\n this._itemTogglerIconTemplate = item.template;\n break;\n\n case 'itemcheckboxicon':\n this._itemCheckboxIconTemplate = item.template;\n break;\n\n case 'dropdownicon':\n this._dropdownIconTemplate = item.template;\n break;\n\n case 'itemloadingicon':\n this._itemLoadingIconTemplate = item.template;\n break;\n\n default: //TODO: @deprecated Use \"value\" template instead\n if (item.name) this.templateMap[item.name] = item.template;\n else this.valueTemplate = item.template;\n break;\n }\n });\n }\n\n onOverlayAnimationStart(event: AnimationEvent) {\n switch (event.toState) {\n case 'visible':\n if (this.filter) {\n isNotEmpty(this.filterValue) && this.treeViewChild?._filter(<any>this.filterValue);\n this.filterInputAutoFocus && this.filterViewChild?.nativeElement.focus();\n } else {\n let focusableElements = <any>getFocusableElements(this.panelEl.nativeElement);\n\n if (focusableElements && focusableElements.length > 0) {\n focusableElements[0].focus();\n }\n }\n break;\n }\n }\n\n onOverlayBeforeHide(event: any) {\n let focusableElements = <any>getFocusableElements(this.el.nativeElement);\n\n if (focusableElements && focusableElements.length > 0) {\n focusableElements[0].focus();\n }\n }\n\n onSelectionChange(event: any) {\n this.value = event;\n this.onModelChange(this.value);\n this.cd.markForCheck();\n }\n\n onClick(event: any) {\n if (this.$disabled()) {\n return;\n }\n\n if (!this.overlayViewChild?.el?.nativeElement?.contains(event.target) && !hasClass(event.target, 'p-treeselect-close') && !hasClass(event.target, 'p-checkbox-box') && !hasClass(event.target, 'p-checkbox-icon')) {\n if (this.overlayVisible) {\n this.hide();\n } else {\n this.show();\n }\n\n this.focusInput?.nativeElement.focus();\n }\n }\n\n onKeyDown(event: KeyboardEvent) {\n switch (event.code) {\n //down\n case 'ArrowDown':\n if (!this.overlayVisible) {\n this.show();\n event.preventDefault();\n }\n this.onArrowDown(event);\n event.preventDefault();\n break;\n\n //space\n case 'Space':\n case 'Enter':\n if (!this.overlayVisible) {\n this.show();\n event.preventDefault();\n }\n break;\n\n //escape\n case 'Escape':\n if (this.overlayVisible) {\n this.hide();\n this.focusInput?.nativeElement.focus();\n event.preventDefault();\n }\n break;\n\n //tab\n case 'Tab':\n this.onTabKey(event);\n break;\n\n default:\n break;\n }\n }\n\n onFilterInput(event: Event) {\n this.filterValue = (event.target as HTMLInputElement).value;\n this.treeViewChild?._filter(this.filterValue);\n this.onFilter.emit({\n filter: this.filterValue,\n filteredValue: this.treeViewChild?.filteredNodes\n });\n setTimeout(() => {\n this.overlayViewChild.alignOverlay();\n });\n }\n\n onArrowDown(event: KeyboardEvent) {\n if (this.overlayVisible && this.panelEl?.nativeElement) {\n let focusableElements = <any>getFocusableElements(this.panelEl.nativeElement, '.p-tree-node');\n\n if (focusableElements && focusableElements.length > 0) {\n focusableElements[0].focus();\n }\n\n event.preventDefault();\n }\n }\n\n onFirstHiddenFocus(event) {\n const focusableEl = event.relatedTarget === this.focusInput?.nativeElement ? getFirstFocusableElement(this.overlayViewChild?.overlayViewChild?.nativeElement, ':not([data-p-hidden-focusable=\"true\"])') : this.focusInput?.nativeElement;\n\n focus(focusableEl);\n }\n\n onLastHiddenFocus(event) {\n const focusableEl = event.relatedTarget === this.focusInput?.nativeElement ? getLastFocusableElement(this.overlayViewChild?.overlayViewChild?.nativeElement, ':not([data-p-hidden-focusable=\"true\"])') : this.focusInput?.nativeElement;\n\n focus(focusableEl);\n }\n\n show() {\n this.overlayVisible = true;\n }\n\n hide(event?: any) {\n this.overlayVisible = false;\n this.resetFilter();\n\n this.onHide.emit(event);\n this.cd.markForCheck();\n }\n\n clear(event: Event) {\n this.value = null;\n this.resetExpandedNodes();\n this.resetPartialSelected();\n this.onModelChange(this.value);\n this.onClear.emit();\n\n event.stopPropagation();\n }\n\n checkValue() {\n return this.value !== null && isNotEmpty(this.value);\n }\n\n onTabKey(event, pressedInInputText = false) {\n if (!pressedInInputText) {\n if (this.overlayVisible && this.hasFocusableElements()) {\n focus(event.shiftKey ? this.lastHiddenFocusableElementOnOverlay.nativeElement : this.firstHiddenFocusableElementOnOverlay.nativeElement);\n\n event.preventDefault();\n } else {\n this.overlayVisible && this.hide(this.filter);\n }\n }\n }\n\n hasFocusableElements() {\n return getFocusableElements(this.overlayViewChild.overlayViewChild.nativeElement, ':not([data-p-hidden-focusable=\"true\"])').length > 0;\n }\n\n resetFilter() {\n if (this.filter && !this.resetFilterOnHide) {\n this.filteredNodes = this.treeViewChild?.filteredNodes;\n this.treeViewChild?.resetFilter();\n } else {\n this.filterValue = null;\n }\n }\n\n updateTreeState() {\n if (this.value) {\n let selectedNodes = this.selectionMode === 'single' ? [this.value] : [...this.value];\n this.resetExpandedNodes();\n this.resetPartialSelected();\n if (selectedNodes && this.options) {\n this.updateTreeBranchState(null, null, selectedNodes);\n }\n }\n }\n\n updateTreeBranchState(node: TreeNode | null, path: any, selectedNodes: TreeNode[]) {\n if (node) {\n if (this.isSelected(node)) {\n this.expandPath(path);\n selectedNodes.splice(selectedNodes.indexOf(node), 1);\n }\n\n if (selectedNodes.length > 0 && node.children) {\n for (let childNode of node.children) {\n this.updateTreeBranchState(childNode, [...path, node], selectedNodes);\n }\n }\n } else {\n for (let childNode of this.options as TreeNode[]) {\n this.updateTreeBranchState(childNode, [], selectedNodes);\n }\n }\n }\n\n expandPath(expandedNodes: TreeNode[]) {\n for (let node of expandedNodes) {\n node.expanded = true;\n }\n\n this.expandedNodes = [...expandedNodes];\n }\n\n nodeExpand(event: { originalEvent: Event; node: TreeNode }) {\n this.onNodeExpand.emit(event);\n this.expandedNodes.push(event.node);\n setTimeout(() => {\n this.overlayViewChild.alignOverlay();\n });\n }\n\n nodeCollapse(event: { originalEvent: Event; node: TreeNode }) {\n this.onNodeCollapse.emit(event);\n this.expandedNodes.splice(this.expandedNodes.indexOf(event.node), 1);\n setTimeout(() => {\n this.overlayViewChild.alignOverlay();\n });\n }\n\n resetExpandedNodes() {\n for (let node of this.expandedNodes) {\n node.expanded = false;\n }\n\n this.expandedNodes = [];\n }\n\n resetPartialSelected(nodes = this.options): void {\n if (!nodes) {\n return;\n }\n\n for (let node of nodes) {\n node.partialSelected = false;\n\n if (node.children && node.children?.length > 0) {\n this.resetPartialSelected(node.children);\n }\n }\n }\n\n findSelectedNodes(node: TreeNode, keys: any[], selectedNodes: TreeNode[]) {\n if (node) {\n if (this.isSelected(node)) {\n selectedNodes.push(node);\n delete keys[node.key as any];\n }\n\n if (Object.keys(keys).length && node.children) {\n for (let childNode of node.children) {\n this.findSelectedNodes(childNode, keys, selectedNodes);\n }\n }\n } else {\n for (let childNode of this.options as TreeNode[]) {\n this.findSelectedNodes(childNode, keys, selectedNodes);\n }\n }\n }\n\n isSelected(node: TreeNode) {\n return this.findIndexInSelection(node) != -1;\n }\n\n findIndexInSelection(node: TreeNode) {\n let index: number = -1;\n\n if (this.value) {\n if (this.selectionMode === 'single') {\n let areNodesEqual = (this.value.key && this.value.key === node.key) || this.value == node;\n index = areNodesEqual ? 0 : -1;\n } else {\n for (let i = 0; i < this.value.length; i++) {\n let selectedNode = this.value[i];\n let areNodesEqual = (selectedNode.key && selectedNode.key === node.key) || selectedNode == node;\n if (areNodesEqual) {\n index = i;\n break;\n }\n }\n }\n }\n\n return index;\n }\n\n onSelect(event: TreeNodeSelectEvent) {\n this.onNodeSelect.emit(event);\n\n if (this.selectionMode === 'single') {\n this.hide();\n this.focusInput?.nativeElement.focus();\n }\n }\n\n onUnselect(event: TreeNodeUnSelectEvent) {\n this.onNodeUnselect.emit(event);\n }\n\n onInputFocus(event: Event) {\n if (this.$disabled()) {\n // For ScreenReaders\n return;\n }\n\n this.focused = true;\n this.onFocus.emit(event);\n }\n\n onInputBlur(event: Event) {\n this.focused = false;\n this.onBlur.emit(event);\n this.onModelTouched();\n }\n\n /**\n * @override\n *\n * @see {@link BaseEditableHolder.writeControlValue}\n * Writes the value to the control.\n */\n writeControlValue(value: any): void {\n this.value = value;\n this.updateTreeState();\n this.cd.markForCheck();\n }\n\n get emptyValue() {\n return !this.value || Object.keys(this.value).length === 0;\n }\n\n get emptyOptions() {\n return !this.options || this.options.length === 0;\n }\n\n get label() {\n let value = this.value || [];\n return value.length ? value.map((node: TreeNode) => node.label).join(', ') : this.selectionMode === 'single' && this.value ? value.label : this.placeholder;\n }\n}\n\n@NgModule({\n imports: [TreeSelect, SharedModule],\n exports: [TreeSelect, SharedModule]\n})\nexport class TreeSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;MAChB,KAAK;;;;;;;;;;;;;;;CAeV;AAED,MAAM,YAAY,GAAG;AACjB,IAAA,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,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