UNPKG

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,134 lines (1,092 loc) 105 kB
import * as i1 from '@angular/common'; import { CommonModule } from '@angular/common'; import * as i0 from '@angular/core'; import { Injectable, forwardRef, EventEmitter, numberAttribute, booleanAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, signal, inject, computed, effect, ViewChild, ContentChild, ContentChildren, NgModule } from '@angular/core'; import { NG_VALUE_ACCESSOR } from '@angular/forms'; import { resolveFieldData, isNotEmpty, equals, getOffset, getViewport, getHiddenElementOuterWidth, getOuterWidth, calculateScrollbarWidth, isPrintableCharacter, isEmpty, findSingle, findLastIndex, focus, uuid } from '@primeuix/utils'; import * as i2 from 'primeng/api'; import { TranslationKeys, SharedModule, PrimeTemplate } from 'primeng/api'; import { AutoFocus } from 'primeng/autofocus'; import { BaseComponent } from 'primeng/basecomponent'; import { AngleRightIcon, ChevronDownIcon, TimesIcon } from 'primeng/icons'; import { Overlay } from 'primeng/overlay'; import { Ripple } from 'primeng/ripple'; import { BaseStyle } from 'primeng/base'; const theme = ({ dt }) => ` .p-cascadeselect { display: inline-flex; cursor: pointer; position: relative; user-select: none; background: ${dt('cascadeselect.background')}; border: 1px solid ${dt('cascadeselect.border.color')}; transition: background ${dt('cascadeselect.transition.duration')}, color ${dt('cascadeselect.transition.duration')}, border-color ${dt('cascadeselect.transition.duration')}, outline-color ${dt('cascadeselect.transition.duration')}, box-shadow ${dt('cascadeselect.transition.duration')}; border-radius: ${dt('cascadeselect.border.radius')}; outline-color: transparent; box-shadow: ${dt('cascadeselect.shadow')}; } p-cascadeselect.ng-invalid.ng-dirty .p-cascadeselect { border-color: ${dt('cascadeselect.invalid.border.color')}; } p-cascadeselect.ng-invalid.ng-dirty .p-cascadeselect.p-focus { border-color: ${dt('cascadeselect.focus.border.color')}; } .p-cascadeselect:not(.p-disabled):hover { border-color: ${dt('cascadeselect.hover.border.color')}; } .p-cascadeselect:not(.p-disabled).p-focus { border-color: ${dt('cascadeselect.focus.border.color')}; box-shadow: ${dt('cascadeselect.focus.ring.shadow')}; outline: ${dt('cascadeselect.focus.ring.width')} ${dt('cascadeselect.focus.ring.style')} ${dt('cascadeselect.focus.ring.color')}; outline-offset: ${dt('multiscascadeselectelect.focus.ring.offset')}; } .p-cascadeselect.p-variant-filled { background: ${dt('cascadeselect.filled.background')}; } .p-cascadeselect.p-variant-filled:not(.p-disabled):hover { background: ${dt('cascadeselect.filled.hover.background')}; } .p-cascadeselect.p-variant-filled.p-focus { background: ${dt('cascadeselect.filled.focus.background')}; } .p-cascadeselect.p-disabled { opacity: 1; background: ${dt('cascadeselect.disabled.background')}; } .p-cascadeselect-dropdown { display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: transparent; color: ${dt('cascadeselect.dropdown.color')}; width: ${dt('cascadeselect.dropdown.width')}; border-start-end-radius: ${dt('border.radius.md')}; border-end-end-radius: ${dt('border.radius.md')}; } .p-cascadeselect-label { display: block; white-space: nowrap; overflow: hidden; flex: 1 1 auto; width: 1%; text-overflow: ellipsis; cursor: pointer; padding: ${dt('cascadeselect.padding.y')} ${dt('cascadeselect.padding.x')}; background: transparent; border: 0 none; outline: 0 none; } .p-cascadeselect-label.p-placeholder { color: ${dt('cascadeselect.placeholder.color')}; } p-cascadeselect.ng-invalid.ng-dirty .p-cascadeselect-label.p-placeholder { color: ${dt('cascadeselect.invalid.placeholder.color')}; } .p-cascadeselect.p-disabled .p-cascadeselect-label { color: ${dt('cascadeselect.disabled.color')}; } .p-cascadeselect-label-empty { overflow: hidden; visibility: hidden; } .p-cascadeselect-fluid { display: flex; } .p-cascadeselect-fluid .p-cascadeselect-label { width: 1%; } .p-cascadeselect-overlay { background: ${dt('cascadeselect.overlay.background')}; color: ${dt('cascadeselect.overlay.color')}; border: 1px solid ${dt('cascadeselect.overlay.border.color')}; border-radius: ${dt('cascadeselect.overlay.border.radius')}; box-shadow: ${dt('cascadeselect.overlay.shadow')}; } .p-cascadeselect .p-cascadeselect-overlay { min-width: 100%; } .p-cascadeselect-option-list { display: none; min-width: 100%; position: absolute; z-index: 1; } .p-cascadeselect-list { min-width: 100%; margin: 0; padding: 0; list-style-type: none; padding: ${dt('cascadeselect.list.padding')}; display: flex; flex-direction: column; gap: ${dt('cascadeselect.list.gap')} } .p-cascadeselect-option { cursor: pointer; font-weight: normal; white-space: nowrap; border: 0 none; color: ${dt('cascadeselect.option.color')}; background: transparent; transition: background ${dt('cascadeselect.transition.duration')}, color ${dt('cascadeselect.transition.duration')}, border-color ${dt('cascadeselect.transition.duration')}, box-shadow ${dt('cascadeselect.transition.duration')}, outline-color ${dt('cascadeselect.transition.duration')}; border-radius: ${dt('cascadeselect.option.border.radius')}; } .p-cascadeselect-option-active { overflow: visible; } .p-cascadeselect-option-active > .p-cascadeselect-option-content { background: ${dt('cascadeselect.option.focus.background')}; color: ${dt('cascadeselect.option.focus.color')}; } .p-cascadeselect-option:not(.p-cascadeselect-option-selected):not(.p-disabled).p-focus > .p-cascadeselect-option-content { background: ${dt('cascadeselect.option.focus.background')}; color: ${dt('cascadeselect.option.focus.color')}; } .p-cascadeselect-option:not(.p-cascadeselect-option-selected):not(.p-disabled).p-focus > .p-cascadeselect-option-content > .p-cascadeselect-group-icon-container > .p-cascadeselect-group-icon { color: ${dt('cascadeselect.option.icon.focus.color')}; } .p-cascadeselect-option-selected > .p-cascadeselect-option-content { background: ${dt('cascadeselect.option.selected.background')}; color: ${dt('cascadeselect.option.selected.color')}; } .p-cascadeselect-option-selected.p-focus > .p-cascadeselect-option-content { background: ${dt('cascadeselect.option.selected.focus.background')}; color: ${dt('cascadeselect.option.selected.focus.color')}; } .p-cascadeselect-option-active > .p-cascadeselect-option-list { inset-inline-start: 100%; top: 0; } .p-cascadeselect-option-content { display: flex; align-items: center; justify-content: space-between; overflow: hidden; position: relative; padding: ${dt('cascadeselect.option.padding')}; border-radius: ${dt('cascadeselect.option.border.radius')}; transition: background ${dt('cascadeselect.transition.duration')}, color ${dt('cascadeselect.transition.duration')}, border-color ${dt('cascadeselect.transition.duration')}, box-shadow ${dt('cascadeselect.transition.duration')}, outline-color ${dt('cascadeselect.transition.duration')}; } .p-cascadeselect-group-icon { font-size: ${dt('cascadeselect.option.icon.size')}; width: ${dt('cascadeselect.option.icon.size')}; height: ${dt('cascadeselect.option.icon.size')}; color: ${dt('cascadeselect.option.icon.color')}; } .p-cascadeselect-group-icon:dir(rtl) { transform: rotate(180deg); } .p-cascadeselect-mobile-active .p-cascadeselect-option-list { position: static; box-shadow: none; border: 0 none; padding-inline-start: 1rem; padding-inline-end: 0; } .p-cascadeselect-mobile-active .p-cascadeselect-group-icon { transition: transform 0.2s; transform: rotate(90deg); } .p-cascadeselect-mobile-active .p-cascadeselect-option-active > .p-cascadeselect-option-content .p-cascadeselect-group-icon { transform: rotate(-90deg); } .p-cascadeselect-sm .p-cascadeselect-label { font-size: ${dt('cascadeselect.sm.font.size')}; padding-block: ${dt('cascadeselect.sm.padding.y')}; padding-inline: ${dt('cascadeselect.sm.padding.x')}; } .p-cascadeselect-sm .p-cascadeselect-dropdown .p-icon { font-size: ${dt('cascadeselect.sm.font.size')}; width: ${dt('cascadeselect.sm.font.size')}; height: ${dt('cascadeselect.sm.font.size')}; } .p-cascadeselect-lg .p-cascadeselect-label { font-size: ${dt('cascadeselect.lg.font.size')}; padding-block: ${dt('cascadeselect.lg.padding.y')}; padding-inline: ${dt('cascadeselect.lg.padding.x')}; } .p-cascadeselect-lg .p-cascadeselect-dropdown .p-icon { font-size: ${dt('cascadeselect.lg.font.size')}; width: ${dt('cascadeselect.lg.font.size')}; height: ${dt('cascadeselect.lg.font.size')}; } /* For PrimeNG */ .p-cascadeselect-clear-icon { cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: transparent; color: ${dt('cascadeselect.clear.icon.color')}; }`; const inlineStyles = { root: ({ props }) => ({ position: props.appendTo === 'self' ? 'relative' : undefined }) }; const classes = { root: ({ instance, props }) => [ 'p-cascadeselect p-component p-inputwrapper', { 'p-cascadeselect-mobile': instance.queryMatches(), 'p-disabled': props.disabled, 'p-invalid': props.invalid, 'p-variant-filled': props.variant ? props.variant === 'filled' : instance.config.inputStyle === 'filled' || instance.config.inputVariant === 'filled', 'p-focus': instance.focused, 'p-inputwrapper-filled': props.modelValue, 'p-inputwrapper-focus': instance.focused || instance.overlayVisible, 'p-cascadeselect-open': instance.overlayVisible, 'p-cascadeselect-fluid': props.fluid, 'p-cascadeselect-sm p-inputfield-sm': props.size === 'small', 'p-cascadeselect-lg p-inputfield-lg': props.size === 'large' } ], label: ({ instance, props }) => [ 'p-cascadeselect-label', { 'p-placeholder': instance.label === props.placeholder, 'p-cascadeselect-label-empty': !instance.$slots['value'] && (instance.label === 'p-emptylabel' || instance.label.length === 0) } ], dropdown: 'p-cascadeselect-dropdown', loadingIcon: 'p-cascadeselect-loading-icon', dropdownIcon: 'p-cascadeselect-dropdown-icon', overlay: ({ instance }) => [ 'p-cascadeselect-overlay p-component', { 'p-cascadeselect-mobile-active': instance.queryMatches() } ], listContainer: 'p-cascadeselect-list-container', list: 'p-cascadeselect-list', option: ({ instance, processedOption }) => [ 'p-cascadeselect-option', { 'p-cascadeselect-option-active': instance.isOptionActive(processedOption), 'p-cascadeselect-option-selected': instance.isOptionSelected(processedOption), 'p-focus': instance.isOptionFocused(processedOption), 'p-disabled': instance.isOptionDisabled(processedOption) } ], optionContent: 'p-cascadeselect-option-content', optionText: 'p-cascadeselect-option-text', groupIcon: 'p-cascadeselect-group-icon', optionList: 'p-cascadeselect-overlay p-cascadeselect-option-list' }; class CascadeSelectStyle extends BaseStyle { name = 'cascadeselect'; theme = theme; classes = classes; inlineStyles = inlineStyles; static ɵfac = /*@__PURE__*/ (() => { let ɵCascadeSelectStyle_BaseFactory; return function CascadeSelectStyle_Factory(__ngFactoryType__) { return (ɵCascadeSelectStyle_BaseFactory || (ɵCascadeSelectStyle_BaseFactory = i0.ɵɵgetInheritedFactory(CascadeSelectStyle)))(__ngFactoryType__ || CascadeSelectStyle); }; })(); static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CascadeSelectStyle, factory: CascadeSelectStyle.ɵfac }); } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CascadeSelectStyle, [{ type: Injectable }], null, null); })(); /** * * CascadeSelect is a form component to select a value from a nested structure of options. * * [Live Demo](https://www.primeng.org/cascadeselect/) * * @module cascadeselectstyle * */ var CascadeSelectClasses; (function (CascadeSelectClasses) { /** * Class name of the root element */ CascadeSelectClasses["root"] = "p-cascadeselect"; /** * Class name of the label element */ CascadeSelectClasses["label"] = "p-cascadeselect-label"; /** * Class name of the dropdown element */ CascadeSelectClasses["dropdown"] = "p-cascadeselect-dropdown"; /** * Class name of the loading icon element */ CascadeSelectClasses["loadingIcon"] = "p-cascadeselect-loading-icon"; /** * Class name of the dropdown icon element */ CascadeSelectClasses["dropdownIcon"] = "p-cascadeselect-dropdown-icon"; /** * Class name of the overlay element */ CascadeSelectClasses["overlay"] = "p-cascadeselect-overlay"; /** * Class name of the list container element */ CascadeSelectClasses["listContainer"] = "p-cascadeselect-list-container"; /** * Class name of the list element */ CascadeSelectClasses["list"] = "p-cascadeselect-list"; /** * Class name of the item element */ CascadeSelectClasses["item"] = "p-cascadeselect-item"; /** * Class name of the item content element */ CascadeSelectClasses["itemContent"] = "p-cascadeselect-item-content"; /** * Class name of the item text element */ CascadeSelectClasses["itemText"] = "p-cascadeselect-item-text"; /** * Class name of the group icon element */ CascadeSelectClasses["groupIcon"] = "p-cascadeselect-group-icon"; /** * Class name of the item list element */ CascadeSelectClasses["itemList"] = "p-cascadeselect-item-list"; })(CascadeSelectClasses || (CascadeSelectClasses = {})); const _c0 = a0 => ({ $implicit: a0 }); function CascadeSelectSub_ng_template_1_ng_container_2_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function CascadeSelectSub_ng_template_1_ng_container_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, CascadeSelectSub_ng_template_1_ng_container_2_ng_container_1_Template, 1, 0, "ng-container", 8); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const processedOption_r2 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.optionTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, processedOption_r2 == null ? null : processedOption_r2.option)); } } function CascadeSelectSub_ng_template_1_ng_template_3_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "span", 9); i0.ɵɵtext(1); i0.ɵɵelementEnd(); } if (rf & 2) { const processedOption_r2 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵattribute("data-pc-section", "text"); i0.ɵɵadvance(); i0.ɵɵtextInterpolate(ctx_r2.getOptionLabelToRender(processedOption_r2)); } } function CascadeSelectSub_ng_template_1_span_5_AngleRightIcon_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "AngleRightIcon"); } } function CascadeSelectSub_ng_template_1_span_5_2_ng_template_0_Template(rf, ctx) { } function CascadeSelectSub_ng_template_1_span_5_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, CascadeSelectSub_ng_template_1_span_5_2_ng_template_0_Template, 0, 0, "ng-template"); } } function CascadeSelectSub_ng_template_1_span_5_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "span", 10); i0.ɵɵtemplate(1, CascadeSelectSub_ng_template_1_span_5_AngleRightIcon_1_Template, 1, 0, "AngleRightIcon", 11)(2, CascadeSelectSub_ng_template_1_span_5_2_Template, 1, 0, null, 12); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵattribute("data-pc-section", "groupIcon"); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r2.groupicon); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.groupicon); } } function CascadeSelectSub_ng_template_1_p_cascadeselect_sub_6_Template(rf, ctx) { if (rf & 1) { const _r4 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "p-cascadeselect-sub", 13); i0.ɵɵlistener("onChange", function CascadeSelectSub_ng_template_1_p_cascadeselect_sub_6_Template_p_cascadeselect_sub_onChange_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onChange.emit($event)); })("onFocusChange", function CascadeSelectSub_ng_template_1_p_cascadeselect_sub_6_Template_p_cascadeselect_sub_onFocusChange_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onFocusChange.emit($event)); })("onFocusEnterChange", function CascadeSelectSub_ng_template_1_p_cascadeselect_sub_6_Template_p_cascadeselect_sub_onFocusEnterChange_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onFocusEnterChange.emit($event)); }); i0.ɵɵelementEnd(); } if (rf & 2) { const processedOption_r2 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵproperty("role", "group")("selectId", ctx_r2.selectId)("focusedOptionId", ctx_r2.focusedOptionId)("activeOptionPath", ctx_r2.activeOptionPath)("options", ctx_r2.getOptionGroupChildren(processedOption_r2))("optionLabel", ctx_r2.optionLabel)("optionValue", ctx_r2.optionValue)("level", ctx_r2.level + 1)("optionGroupLabel", ctx_r2.optionGroupLabel)("optionGroupChildren", ctx_r2.optionGroupChildren)("dirty", ctx_r2.dirty)("optionTemplate", ctx_r2.optionTemplate); } } function CascadeSelectSub_ng_template_1_Template(rf, ctx) { if (rf & 1) { const _r1 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "li", 3)(1, "div", 4); i0.ɵɵlistener("click", function CascadeSelectSub_ng_template_1_Template_div_click_1_listener($event) { const processedOption_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onOptionClick($event, processedOption_r2)); })("mouseenter", function CascadeSelectSub_ng_template_1_Template_div_mouseenter_1_listener($event) { const processedOption_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onOptionMouseEnter($event, processedOption_r2)); })("mousemove", function CascadeSelectSub_ng_template_1_Template_div_mousemove_1_listener($event) { const processedOption_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onOptionMouseMove($event, processedOption_r2)); }); i0.ɵɵtemplate(2, CascadeSelectSub_ng_template_1_ng_container_2_Template, 2, 4, "ng-container", 5)(3, CascadeSelectSub_ng_template_1_ng_template_3_Template, 2, 2, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor)(5, CascadeSelectSub_ng_template_1_span_5_Template, 3, 3, "span", 6); i0.ɵɵelementEnd(); i0.ɵɵtemplate(6, CascadeSelectSub_ng_template_1_p_cascadeselect_sub_6_Template, 1, 12, "p-cascadeselect-sub", 7); i0.ɵɵelementEnd(); } if (rf & 2) { const processedOption_r2 = ctx.$implicit; const i_r5 = ctx.index; const defaultOptionTemplate_r6 = i0.ɵɵreference(4); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵproperty("ngClass", ctx_r2.getItemClass(processedOption_r2))("id", ctx_r2.getOptionId(processedOption_r2)); i0.ɵɵattribute("aria-level", ctx_r2.level + 1)("aria-setsize", ctx_r2.options.length)("data-pc-section", "item")("aria-label", ctx_r2.getOptionLabelToRender(processedOption_r2))("aria-selected", ctx_r2.isOptionGroup(processedOption_r2) ? undefined : ctx_r2.isOptionSelected(processedOption_r2))("aria-posinset", i_r5 + 1); i0.ɵɵadvance(); i0.ɵɵattribute("data-pc-section", "content"); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.optionTemplate)("ngIfElse", defaultOptionTemplate_r6); i0.ɵɵadvance(3); i0.ɵɵproperty("ngIf", ctx_r2.isOptionGroup(processedOption_r2)); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.isOptionGroup(processedOption_r2) && ctx_r2.isOptionActive(processedOption_r2)); } } const _c1 = ["value"]; const _c2 = ["option"]; const _c3 = ["header"]; const _c4 = ["footer"]; const _c5 = ["triggericon"]; const _c6 = ["loadingicon"]; const _c7 = ["optiongroupicon"]; const _c8 = ["clearicon"]; const _c9 = ["focusInput"]; const _c10 = ["container"]; const _c11 = ["panel"]; const _c12 = ["overlay"]; const _c13 = (a0, a1) => ({ $implicit: a0, placeholder: a1 }); const _c14 = a0 => ({ "p-cascadeselect-overlay p-component": true, "p-cascadeselect-mobile-active": a0 }); function CascadeSelect_ng_container_6_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function CascadeSelect_ng_container_6_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, CascadeSelect_ng_container_6_ng_container_1_Template, 1, 0, "ng-container", 16); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.valueTemplate || ctx_r1._valueTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c13, ctx_r1.value, ctx_r1.placeholder)); } } function CascadeSelect_ng_template_7_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtext(0); } if (rf & 2) { const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtextInterpolate1(" ", ctx_r1.label(), " "); } } function CascadeSelect_ng_container_9_TimesIcon_1_Template(rf, ctx) { if (rf & 1) { const _r3 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "TimesIcon", 18); i0.ɵɵlistener("click", function CascadeSelect_ng_container_9_TimesIcon_1_Template_TimesIcon_click_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.clear($event)); }); i0.ɵɵelementEnd(); } if (rf & 2) { i0.ɵɵattribute("data-pc-section", "clearicon")("aria-hidden", true); } } function CascadeSelect_ng_container_9_span_2_1_ng_template_0_Template(rf, ctx) { } function CascadeSelect_ng_container_9_span_2_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, CascadeSelect_ng_container_9_span_2_1_ng_template_0_Template, 0, 0, "ng-template"); } } function CascadeSelect_ng_container_9_span_2_Template(rf, ctx) { if (rf & 1) { const _r4 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "span", 18); i0.ɵɵlistener("click", function CascadeSelect_ng_container_9_span_2_Template_span_click_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.clear($event)); }); i0.ɵɵtemplate(1, CascadeSelect_ng_container_9_span_2_1_Template, 1, 0, null, 19); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵattribute("data-pc-section", "clearicon")("aria-hidden", true); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.clearIconTemplate || ctx_r1._clearIconTemplate); } } function CascadeSelect_ng_container_9_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, CascadeSelect_ng_container_9_TimesIcon_1_Template, 1, 2, "TimesIcon", 17)(2, CascadeSelect_ng_container_9_span_2_Template, 2, 3, "span", 17); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r1.clearIconTemplate && !ctx_r1._clearIconTemplate); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r1.clearIconTemplate || ctx_r1._clearIconTemplate); } } function CascadeSelect_ng_container_11_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function CascadeSelect_ng_container_11_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, CascadeSelect_ng_container_11_ng_container_1_ng_container_1_Template, 1, 0, "ng-container", 19); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.loadingIconTemplate || ctx_r1._loadingIconTemplate); } } function CascadeSelect_ng_container_11_ng_container_2_span_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "span", 22); } if (rf & 2) { const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵproperty("ngClass", "p-cascadeselect-loading-icon pi-spin " + ctx_r1.loadingIcon); } } function CascadeSelect_ng_container_11_ng_container_2_span_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "span", 23); } if (rf & 2) { i0.ɵɵclassMap("p-cascadeselect-loading-icon pi pi-spinner pi-spin"); } } function CascadeSelect_ng_container_11_ng_container_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, CascadeSelect_ng_container_11_ng_container_2_span_1_Template, 1, 1, "span", 20)(2, CascadeSelect_ng_container_11_ng_container_2_span_2_Template, 1, 2, "span", 21); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r1.loadingIcon); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r1.loadingIcon); } } function CascadeSelect_ng_container_11_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, CascadeSelect_ng_container_11_ng_container_1_Template, 2, 1, "ng-container", 12)(2, CascadeSelect_ng_container_11_ng_container_2_Template, 3, 2, "ng-container", 12); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r1.loadingIconTemplate || ctx_r1._loadingIconTemplate); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r1.loadingIconTemplate && !ctx_r1._loadingIconTemplate); } } function CascadeSelect_ng_template_12_ChevronDownIcon_0_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "ChevronDownIcon", 26); } if (rf & 2) { i0.ɵɵproperty("styleClass", "p-cascadeselect-dropdown-icon"); } } function CascadeSelect_ng_template_12_span_1_1_ng_template_0_Template(rf, ctx) { } function CascadeSelect_ng_template_12_span_1_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, CascadeSelect_ng_template_12_span_1_1_ng_template_0_Template, 0, 0, "ng-template"); } } function CascadeSelect_ng_template_12_span_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "span", 27); i0.ɵɵtemplate(1, CascadeSelect_ng_template_12_span_1_1_Template, 1, 0, null, 19); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.triggerIconTemplate || ctx_r1._triggerIconTemplate); } } function CascadeSelect_ng_template_12_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, CascadeSelect_ng_template_12_ChevronDownIcon_0_Template, 1, 1, "ChevronDownIcon", 24)(1, CascadeSelect_ng_template_12_span_1_Template, 2, 1, "span", 25); } if (rf & 2) { const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵproperty("ngIf", !ctx_r1.triggerIconTemplate && !ctx_r1._triggerIconTemplate); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r1.triggerIconTemplate || ctx_r1._triggerIconTemplate); } } function CascadeSelect_ng_template_18_2_ng_template_0_Template(rf, ctx) { } function CascadeSelect_ng_template_18_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, CascadeSelect_ng_template_18_2_ng_template_0_Template, 0, 0, "ng-template"); } } function CascadeSelect_ng_template_18_7_ng_template_0_Template(rf, ctx) { } function CascadeSelect_ng_template_18_7_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, CascadeSelect_ng_template_18_7_ng_template_0_Template, 0, 0, "ng-template"); } } function CascadeSelect_ng_template_18_Template(rf, ctx) { if (rf & 1) { const _r5 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "div", 28, 6); i0.ɵɵtemplate(2, CascadeSelect_ng_template_18_2_Template, 1, 0, null, 19); i0.ɵɵelementStart(3, "div", 29)(4, "p-cascadeselect-sub", 30); i0.ɵɵlistener("onChange", function CascadeSelect_ng_template_18_Template_p_cascadeselect_sub_onChange_4_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onOptionClick($event)); })("onFocusChange", function CascadeSelect_ng_template_18_Template_p_cascadeselect_sub_onFocusChange_4_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onOptionMouseMove($event)); })("onFocusEnterChange", function CascadeSelect_ng_template_18_Template_p_cascadeselect_sub_onFocusEnterChange_4_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onOptionMouseEnter($event)); }); i0.ɵɵelementEnd()(); i0.ɵɵelementStart(5, "span", 14); i0.ɵɵtext(6); i0.ɵɵelementEnd(); i0.ɵɵtemplate(7, CascadeSelect_ng_template_18_7_Template, 1, 0, null, 19); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵclassMap(ctx_r1.panelStyleClass); i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(24, _c14, ctx_r1.queryMatches()))("ngStyle", ctx_r1.panelStyle); i0.ɵɵattribute("data-pc-section", "panel"); i0.ɵɵadvance(2); i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.headerTemplate || ctx_r1._headerTemplate); i0.ɵɵadvance(); i0.ɵɵattribute("data-pc-section", "wrapper"); i0.ɵɵadvance(); i0.ɵɵproperty("options", ctx_r1.processedOptions)("selectId", ctx_r1.id)("focusedOptionId", ctx_r1.focused ? ctx_r1.focusedOptionId : undefined)("activeOptionPath", ctx_r1.activeOptionPath())("optionLabel", ctx_r1.optionLabel)("optionValue", ctx_r1.optionValue)("level", 0)("optionTemplate", ctx_r1.optionTemplate || ctx_r1._optionTemplate)("groupicon", ctx_r1.groupIconTemplate || ctx_r1.groupIconTemplate)("optionGroupLabel", ctx_r1.optionGroupLabel)("optionGroupChildren", ctx_r1.optionGroupChildren)("optionDisabled", ctx_r1.optionDisabled)("root", true)("dirty", ctx_r1.dirty)("role", "tree"); i0.ɵɵadvance(2); i0.ɵɵtextInterpolate1(" ", ctx_r1.selectedMessageText, " "); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.footerTemplate || ctx_r1._footerTemplate); } } const CASCADESELECT_VALUE_ACCESSOR = { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CascadeSelect), multi: true }; class CascadeSelectSub extends BaseComponent { cascadeselect; role; selectId; activeOptionPath; optionDisabled; focusedOptionId; options; optionGroupChildren; optionTemplate; groupicon; level = 0; optionLabel; optionValue; optionGroupLabel; dirty; root; onChange = new EventEmitter(); onFocusChange = new EventEmitter(); onFocusEnterChange = new EventEmitter(); get listLabel() { return this.config.getTranslation(TranslationKeys.ARIA)['listLabel']; } constructor(cascadeselect) { super(); this.cascadeselect = cascadeselect; } ngOnInit() { super.ngOnInit(); if (!this.root) { this.position(); } } onOptionClick(event, processedOption) { this.onChange.emit({ originalEvent: event, processedOption, isFocus: true }); } onOptionMouseEnter(event, processedOption) { this.onFocusEnterChange.emit({ originalEvent: event, processedOption }); } onOptionMouseMove(event, processedOption) { this.onFocusChange.emit({ originalEvent: event, processedOption }); } getOptionId(processedOption) { return `${this.selectId}_${processedOption.key}`; } getOptionLabel(processedOption) { return this.optionLabel ? resolveFieldData(processedOption.option, this.optionLabel) : processedOption.option; } getOptionValue(processedOption) { return this.optionValue ? resolveFieldData(processedOption.option, this.optionValue) : processedOption.option; } getOptionLabelToRender(processedOption) { return this.isOptionGroup(processedOption) ? this.getOptionGroupLabel(processedOption) : this.getOptionLabel(processedOption); } isOptionDisabled(processedOption) { return this.optionDisabled ? resolveFieldData(processedOption.option, this.optionDisabled) : false; } getOptionGroupLabel(processedOption) { return this.optionGroupLabel ? resolveFieldData(processedOption.option, this.optionGroupLabel) : null; } getOptionGroupChildren(processedOption) { return processedOption.children; } isOptionGroup(processedOption) { return isNotEmpty(processedOption.children); } isOptionSelected(processedOption) { return equals(this.cascadeselect?.modelValue(), processedOption?.option); } isOptionActive(processedOption) { return this.activeOptionPath.some((path) => path.key === processedOption.key); } isOptionFocused(processedOption) { return this.focusedOptionId === this.getOptionId(processedOption); } getItemClass(option) { return { 'p-cascadeselect-option': true, 'p-cascadeselect-option-group': this.isOptionGroup(option), 'p-cascadeselect-option-active': this.isOptionActive(option), 'p-cascadeselect-option-selected': this.isOptionSelected(option), 'p-focus': this.isOptionFocused(option), 'p-disabled': this.isOptionDisabled(option) }; } position() { const parentItem = this.el.nativeElement.parentElement; const containerOffset = getOffset(parentItem); const viewport = getViewport(); const sublistWidth = this.el.nativeElement.children[0].offsetParent ? this.el.nativeElement.children[0].offsetWidth : getHiddenElementOuterWidth(this.el.nativeElement.children[0]); const itemOuterWidth = getOuterWidth(parentItem.children[0]); if (parseInt(containerOffset.left, 10) + itemOuterWidth + sublistWidth > viewport.width - calculateScrollbarWidth()) { this.el.nativeElement.children[0].style.left = '-200%'; } } static ɵfac = function CascadeSelectSub_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CascadeSelectSub)(i0.ɵɵdirectiveInject(CascadeSelect)); }; static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CascadeSelectSub, selectors: [["p-cascadeSelectSub"], ["p-cascadeselect-sub"]], inputs: { role: "role", selectId: "selectId", activeOptionPath: "activeOptionPath", optionDisabled: "optionDisabled", focusedOptionId: "focusedOptionId", options: "options", optionGroupChildren: "optionGroupChildren", optionTemplate: "optionTemplate", groupicon: "groupicon", level: [2, "level", "level", numberAttribute], optionLabel: "optionLabel", optionValue: "optionValue", optionGroupLabel: "optionGroupLabel", dirty: [2, "dirty", "dirty", booleanAttribute], root: [2, "root", "root", booleanAttribute] }, outputs: { onChange: "onChange", onFocusChange: "onFocusChange", onFocusEnterChange: "onFocusEnterChange" }, features: [i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 4, consts: [["defaultOptionTemplate", ""], ["aria-orientation", "horizontal", 1, "p-cascadeselect-list"], ["ngFor", "", 3, "ngForOf"], ["role", "treeitem", 3, "ngClass", "id"], ["pRipple", "", 1, "p-cascadeselect-option-content", 3, "click", "mouseenter", "mousemove"], [4, "ngIf", "ngIfElse"], ["class", "p-cascadeselect-group-icon", 4, "ngIf"], ["class", "p-cascadeselect-list p-cascadeselect-overlay p-cascadeselect-option-list", 3, "role", "selectId", "focusedOptionId", "activeOptionPath", "options", "optionLabel", "optionValue", "level", "optionGroupLabel", "optionGroupChildren", "dirty", "optionTemplate", "onChange", "onFocusChange", "onFocusEnterChange", 4, "ngIf"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "p-cascadeselect-option-text"], [1, "p-cascadeselect-group-icon"], [4, "ngIf"], [4, "ngTemplateOutlet"], [1, "p-cascadeselect-list", "p-cascadeselect-overlay", "p-cascadeselect-option-list", 3, "onChange", "onFocusChange", "onFocusEnterChange", "role", "selectId", "focusedOptionId", "activeOptionPath", "options", "optionLabel", "optionValue", "level", "optionGroupLabel", "optionGroupChildren", "dirty", "optionTemplate"]], template: function CascadeSelectSub_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "ul", 1); i0.ɵɵtemplate(1, CascadeSelectSub_ng_template_1_Template, 7, 13, "ng-template", 2); i0.ɵɵelementEnd(); } if (rf & 2) { i0.ɵɵattribute("role", ctx.role)("data-pc-section", ctx.level === 0 ? "list" : "sublist")("aria-label", ctx.listLabel); i0.ɵɵadvance(); i0.ɵɵproperty("ngForOf", ctx.options); } }, dependencies: [CascadeSelectSub, CommonModule, i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgTemplateOutlet, Ripple, AngleRightIcon, SharedModule], encapsulation: 2, changeDetection: 0 }); } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CascadeSelectSub, [{ type: Component, args: [{ selector: 'p-cascadeSelectSub, p-cascadeselect-sub', standalone: true, imports: [CommonModule, Ripple, AngleRightIcon, SharedModule], template: ` <ul class="p-cascadeselect-list" [attr.role]="role" aria-orientation="horizontal" [attr.data-pc-section]="level === 0 ? 'list' : 'sublist'" [attr.aria-label]="listLabel"> <ng-template ngFor let-processedOption [ngForOf]="options" let-i="index"> <li [ngClass]="getItemClass(processedOption)" role="treeitem" [attr.aria-level]="level + 1" [attr.aria-setsize]="options.length" [attr.data-pc-section]="'item'" [id]="getOptionId(processedOption)" [attr.aria-label]="getOptionLabelToRender(processedOption)" [attr.aria-selected]="isOptionGroup(processedOption) ? undefined : isOptionSelected(processedOption)" [attr.aria-posinset]="i + 1" > <div class="p-cascadeselect-option-content" (click)="onOptionClick($event, processedOption)" (mouseenter)="onOptionMouseEnter($event, processedOption)" (mousemove)="onOptionMouseMove($event, processedOption)" pRipple [attr.data-pc-section]="'content'" > <ng-container *ngIf="optionTemplate; else defaultOptionTemplate"> <ng-container *ngTemplateOutlet="optionTemplate; context: { $implicit: processedOption?.option }"></ng-container> </ng-container> <ng-template #defaultOptionTemplate> <span class="p-cascadeselect-option-text" [attr.data-pc-section]="'text'">{{ getOptionLabelToRender(processedOption) }}</span> </ng-template> <span class="p-cascadeselect-group-icon" *ngIf="isOptionGroup(processedOption)" [attr.data-pc-section]="'groupIcon'"> <AngleRightIcon *ngIf="!groupicon" /> <ng-template *ngTemplateOutlet="groupicon"></ng-template> </span> </div> <p-cascadeselect-sub *ngIf="isOptionGroup(processedOption) && isOptionActive(processedOption)" [role]="'group'" class="p-cascadeselect-list p-cascadeselect-overlay p-cascadeselect-option-list" [selectId]="selectId" [focusedOptionId]="focusedOptionId" [activeOptionPath]="activeOptionPath" [options]="getOptionGroupChildren(processedOption)" [optionLabel]="optionLabel" [optionValue]="optionValue" [level]="level + 1" (onChange)="onChange.emit($event)" (onFocusChange)="onFocusChange.emit($event)" (onFocusEnterChange)="onFocusEnterChange.emit($event)" [optionGroupLabel]="optionGroupLabel" [optionGroupChildren]="optionGroupChildren" [dirty]="dirty" [optionTemplate]="optionTemplate" > </p-cascadeselect-sub> </li> </ng-template> </ul> `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush }] }], () => [{ type: CascadeSelect }], { role: [{ type: Input }], selectId: [{ type: Input }], activeOptionPath: [{ type: Input }], optionDisabled: [{ type: Input }], focusedOptionId: [{ type: Input }], options: [{ type: Input }], optionGroupChildren: [{ type: Input }], optionTemplate: [{ type: Input }], groupicon: [{ type: Input }], level: [{ type: Input, args: [{ transform: numberAttribute }] }], optionLabel: [{ type: Input }], optionValue: [{ type: Input }], optionGroupLabel: [{ type: Input }], dirty: [{ type: Input, args: [{ transform: booleanAttribute }] }], root: [{ type: Input, args: [{ transform: booleanAttribute }] }], onChange: [{ type: Output }], onFocusChange: [{ type: Output }], onFocusEnterChange: [{ type: Output }] }); })(); (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CascadeSelectSub, { className: "CascadeSelectSub", filePath: "cascadeselect.ts", lineNumber: 109 }); })(); /** * CascadeSelect is a form component to select a value from a nested structure of options. * @group Components */ class CascadeSelect extends BaseComponent { overlayService; /** * Unique identifier of the component * @group Props */ id; /** * Text to display when the search is active. Defaults to global value in i18n translation configuration. * @group Props * @defaultValue '{0} results are available' */ searchMessage; /** * Text to display when there is no data. Defaults to global value in i18n translation configuration. * @group Props */ emptyMessage; /** * Text to be displayed in hidden accessible field when options are selected. Defaults to global value in i18n translation configuration. * @group Props * @defaultValue '{0} items selected' */ selectionMessage; /** * Text to display when filtering does not return any results. Defaults to value from PrimeNG locale configuration. * @group Props * @defaultValue 'No available options' */ emptySearchMessage; /** * Text to display when filtering does not return any results. Defaults to global value in i18n translation configuration. * @group Props * @defaultValue 'No selected item' */ emptySelectionMessage; /** * Locale to use in searching. The default locale is the host environment's current locale. * @group Props */ searchLocale; /** * Name of the disabled field of an option. * @group Props */ optionDisabled; /** * Fields used when filtering the options, defaults to optionLabel. * @group Props */ focusOnHover = true; /** * Determines if the option will be selected on focus. * @group Props */ selectOnFocus = false; /** * Whether to focus on the first visible or selected element when the overlay panel is shown. * @group Props */ autoOptionFocus = false; /** * Style class of the component. * @group Props */ styleClass; /** * Inline style of the component. * @group Props */ style; /** * An array of selectitems to display as the available options. * @group Props */ options; /** * Property name or getter function to use as the label of an option. * @group Props */ optionLabel; /** * Property name or getter function to use as the value of an option, defaults to the option itself when not defined. * @group Props */ optionValue; /** * Property name or getter function to use as the label of an option group. * @group Props */ optionGroupLabel; /** * Property name or getter function to retrieve the items of a group. * @group Props */ optionGroupChildren; /** * Default text to display when no option is selected. * @group Props */ placeholder; /** * Selected value of the component. * @group Props */ value; /** * A property to uniquely identify an option. * @group Props */ dataKey; /** * Identifier of the underlying input element. * @group Props */ inputId; /** * Defines the size of the component. * @group Props */ size; /** * Index of the element in tabbing order. * @group Props */ tabindex = 0; /** * Establishes relationships between the component and label(s) where its value should be one or more element IDs. * @group Props */ ariaLabelledBy; /** * Label of the input for accessibility. * @group Props */ inputLabel; /** * Defines a string that labels the input for accessibility. * @group Props */ ariaLabel; /** * Id of the element or "body" for document where the overlay should be appended to. * @group Props */ appendTo; /** * When present, it specifies that the component should be disabled. * @group Props */ disabled; /** * When enabled, a clear icon is displayed to clear the value. * @group Props */ showClear = false; /** * Style class of the overlay panel. * @group Props */ panelStyleClass; /** * Inline style of the overlay panel. * @group Props */ panelStyle; /** * Whether to use overlay API feature. The properties of overlay API can be used like an object in it. * @group Props */ overlayOptions; /** * When present, it specifies that the component should automatically get focus on load. * @group Props */ autofocus; /** * Transition options of the show animation. * @group Props * @deprecated deprecated since v14.2.0, use overlayOptions property instead. */ get showTransitionOptions() { return this._showTransitionOptions; } set showTransitionOptions(val) { this._showTransitionOptions = val; console.log('The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.'); } /** * Specifies the input variant of the component. * @group Props */ variant = 'outlined'; /** * Whether the dropdown is in loading state. * @group Props */ loading = false; /** * Icon to display in loading state. * @group Props */ loadingIcon; /** * Transition options of the hide animation. * @group Props * @deprecated deprecated since v14.2.0, use overlayOptions property instead. */ get hideTransitionOptions() { return this._hideTransitionOptions; } set hideTransitionOptions(val) { this._hideTransitionOptions = val; console.log('The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.'); } /** * Spans 100% width of the container when enabled. * @group Props */ fluid = false; /** * The breakpoint to define the maximum width boundary. * @group Props */ breakpoint = '960px'; /** * Callback to invoke on value change. * @param {CascadeSelectChangeEvent} event - Custom change event. * @group Emits */ onChange = new EventEmitter(); /** * Callback to invoke when a group changes. * @param {Event} event - Browser event. * @group Emits */ onGroupChange = new EventEmitter(); /** * Callback to invoke when the overlay is shown. * @param {CascadeSelectShowEvent} event - Custom overlay show event. * @group Emits */ onShow = new EventEmitter(); /** * Callback to invoke when the overlay is hidden. * @param {CascadeSelectHideEvent} event - Custom overlay hide event. * @group Emits */ onHide = new EventEmitter(); /** * Callback to invoke when the clear token is clicked. * @group Emits */ onClear = new EventEmitter(); /** * Callback to invoke before overlay is shown. * @param {CascadeSelectBeforeShowEvent} event - Custom overlay show event. * @group Emits */ onBeforeShow = new EventEmitter(); /** * Callback to invoke before overlay is hidden. * @param {CascadeSelectBeforeHideEvent} event - Custom overlay hide event. * @group Emits