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,049 lines (1,016 loc) 128 kB
import * as i1 from '@angular/common'; import { CommonModule } from '@angular/common'; import * as i0 from '@angular/core'; import { Injectable, forwardRef, EventEmitter, booleanAttribute, numberAttribute, Component, Input, Output, inject, signal, computed, effect, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, HostBinding, ContentChildren, NgModule } from '@angular/core'; import { NG_VALUE_ACCESSOR } from '@angular/forms'; import { deepEquals, isNotEmpty, isEmpty, uuid, findSingle, scrollInView, equals, resolveFieldData, focus, unblockBodyScroll, isPrintableCharacter, findLastIndex, getFirstFocusableElement, getLastFocusableElement, getFocusableElements } from '@primeuix/utils'; import * as i2 from 'primeng/api'; import { TranslationKeys, PrimeTemplate, SharedModule } from 'primeng/api'; import * as i5 from 'primeng/autofocus'; import { AutoFocusModule } from 'primeng/autofocus'; import { BaseComponent } from 'primeng/basecomponent'; import { IconField } from 'primeng/iconfield'; import { BlankIcon, CheckIcon, TimesIcon, ChevronDownIcon, SearchIcon } from 'primeng/icons'; import { InputIcon } from 'primeng/inputicon'; import * as i6 from 'primeng/inputtext'; import { InputTextModule } from 'primeng/inputtext'; import * as i3 from 'primeng/overlay'; import { OverlayModule } from 'primeng/overlay'; import { Ripple } from 'primeng/ripple'; import { Scroller } from 'primeng/scroller'; import * as i4 from 'primeng/tooltip'; import { TooltipModule } from 'primeng/tooltip'; import { BaseStyle } from 'primeng/base'; const theme = ({ dt }) => ` .p-select { display: inline-flex; cursor: pointer; position: relative; user-select: none; background: ${dt('select.background')}; border: 1px solid ${dt('select.border.color')}; transition: background ${dt('select.transition.duration')}, color ${dt('select.transition.duration')}, border-color ${dt('select.transition.duration')}, outline-color ${dt('select.transition.duration')}, box-shadow ${dt('select.transition.duration')}; border-radius: ${dt('select.border.radius')}; outline-color: transparent; box-shadow: ${dt('select.shadow')}; } .p-select:not(.p-disabled):hover { border-color: ${dt('select.hover.border.color')}; } .p-select:not(.p-disabled).p-focus { border-color: ${dt('select.focus.border.color')}; box-shadow: ${dt('select.focus.ring.shadow')}; outline: ${dt('select.focus.ring.width')} ${dt('select.focus.ring.style')} ${dt('select.focus.ring.color')}; outline-offset: ${dt('select.focus.ring.offset')}; } .p-select.p-variant-filled { background: ${dt('select.filled.background')}; } .p-select.p-variant-filled.p-focus { background: ${dt('select.filled.focus.background')}; } .p-select.p-disabled { opacity: 1; background: ${dt('select.disabled.background')}; } .p-select-clear-icon { position: absolute; top: 50%; margin-top: -0.5rem; color: ${dt('select.clear.icon.color')}; right: ${dt('select.dropdown.width')}; } .p-select-dropdown { display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: transparent; color: ${dt('select.dropdown.color')}; width: ${dt('select.dropdown.width')}; border-start-end-radius: ${dt('select.border.radius')}; border-end-end-radius: ${dt('select.border.radius')}; } .p-select-label { display: block; white-space: nowrap; overflow: hidden; flex: 1 1 auto; width: 1%; padding: ${dt('select.padding.y')} ${dt('select.padding.x')}; text-overflow: ellipsis; cursor: pointer; color: ${dt('select.color')}; background: transparent; border: 0 none; outline: 0 none; } .p-select-label.p-placeholder { color: ${dt('select.placeholder.color')}; } .p-select:has(.p-select-clear-icon) .p-select-label { padding-right: calc(1rem + ${dt('select.padding.x')}); } .p-select.p-disabled .p-select-label { color: ${dt('select.disabled.color')}; } .p-select-label-empty { overflow: hidden; opacity: 0; } input.p-select-label { cursor: default; } .p-select .p-select-overlay { min-width: 100%; } .p-select-overlay { position: absolute; top: 0; left: 0; background: ${dt('select.overlay.background')}; color: ${dt('select.overlay.color')}; border: 1px solid ${dt('select.overlay.border.color')}; border-radius: ${dt('select.overlay.border.radius')}; box-shadow: ${dt('select.overlay.shadow')}; } .p-select-header { padding: ${dt('select.list.header.padding')}; } .p-select-filter { width: 100%; } .p-select-list-container { overflow: auto; } .p-select-option-group { cursor: auto; margin: 0; padding: ${dt('select.option.group.padding')}; background: ${dt('select.option.group.background')}; color: ${dt('select.option.group.color')}; font-weight: ${dt('select.option.group.font.weight')}; } .p-select-list { margin: 0; padding: 0; list-style-type: none; padding: ${dt('select.list.padding')}; gap: ${dt('select.list.gap')}; display: flex; flex-direction: column; } .p-select-option { cursor: pointer; font-weight: normal; white-space: nowrap; position: relative; overflow: hidden; display: flex; align-items: center; padding: ${dt('select.option.padding')}; border: 0 none; color: ${dt('select.option.color')}; background: transparent; transition: background ${dt('select.transition.duration')}, color ${dt('select.transition.duration')}, border-color ${dt('select.transition.duration')}, box-shadow ${dt('select.transition.duration')}, outline-color ${dt('select.transition.duration')}; border-radius: ${dt('select.option.border.radius')}; } .p-select-option:not(.p-select-option-selected):not(.p-disabled).p-focus { background: ${dt('select.option.focus.background')}; color: ${dt('select.option.focus.color')}; } .p-select-option.p-select-option-selected { background: ${dt('select.option.selected.background')}; color: ${dt('select.option.selected.color')}; } .p-select-option.p-select-option-selected.p-focus { background: ${dt('select.option.selected.focus.background')}; color: ${dt('select.option.selected.focus.color')}; } .p-select-option-check-icon { position: relative; margin-inline-start: ${dt('select.checkmark.gutter.start')}; margin-inline-end: ${dt('select.checkmark.gutter.end')}; color: ${dt('select.checkmark.color')}; } .p-select-empty-message { padding: ${dt('select.empty.message.padding')}; } .p-select-fluid { display: flex; } /*For PrimeNG*/ .p-dropdown.ng-invalid.ng-dirty, .p-select.ng-invalid.ng-dirty { outline: 1px solid ${dt('select.invalid.border.color')}; outline-offset: 0; } .p-dropdown.ng-invalid.ng-dirty .p-dropdown-label.p-placeholder, .p-select.ng-invalid.ng-dirty .p-select-label.p-placeholder { color: ${dt('select.invalid.placeholder.color')}; } `; const classes = { root: ({ instance }) => [ 'p-dropdown p-select p-component p-inputwrapper', { 'p-disabled': instance.disabled, 'p-variant-filled': instance.variant ? instance.variant === 'filled' : instance.config.inputStyle() === 'filled', 'p-focus': instance.focused, 'p-inputwrapper-filled': instance.modelValue() !== undefined && instance.modelValue() !== null && !instance.modelValue().length, 'p-inputwrapper-focus': instance.focused || instance.overlayVisible, 'p-select-open': instance.overlayVisible, 'p-select-fluid': instance.hasFluid, 'p-select-sm p-inputfield-sm': instance.size === 'small', 'p-select-lg p-inputfield-lg': instance.size === 'large' } ], label: ({ instance, props }) => [ 'p-select-label', { 'p-placeholder': !props.editable && instance.label === props.placeholder, 'p-select-label-empty': !props.editable && !instance.$slots['value'] && (instance.label === 'p-emptylabel' || instance.label.length === 0) } ], clearIcon: 'p-select-clear-icon', dropdown: 'p-select-dropdown', loadingicon: 'p-select-loading-icon', dropdownIcon: 'p-select-dropdown-icon', overlay: 'p-select-overlay p-component', header: 'p-select-header', pcFilter: 'p-select-filter', listContainer: 'p-select-list-container', list: 'p-select-list', optionGroup: 'p-select-option-group', optionGroupLabel: 'p-select-option-group-label', option: ({ instance, props, state, option, focusedOption }) => [ 'p-select-option', { 'p-select-option-selected': instance.isSelected(option) && props.highlightOnSelect, 'p-focus': state.focusedOptionIndex === focusedOption, 'p-disabled': instance.isOptionDisabled(option) } ], optionLabel: 'p-select-option-label', optionCheckIcon: 'p-select-option-check-icon', optionBlankIcon: 'p-select-option-blank-icon', emptyMessage: 'p-select-empty-message' }; class DropdownStyle extends BaseStyle { name = 'select'; theme = theme; classes = classes; static ɵfac = /*@__PURE__*/ (() => { let ɵDropdownStyle_BaseFactory; return function DropdownStyle_Factory(__ngFactoryType__) { return (ɵDropdownStyle_BaseFactory || (ɵDropdownStyle_BaseFactory = i0.ɵɵgetInheritedFactory(DropdownStyle)))(__ngFactoryType__ || DropdownStyle); }; })(); static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: DropdownStyle, factory: DropdownStyle.ɵfac }); } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DropdownStyle, [{ type: Injectable }], null, null); })(); var DropdownClasses; (function (DropdownClasses) { })(DropdownClasses || (DropdownClasses = {})); const _c0 = a0 => ({ height: a0 }); const _c1 = (a0, a1, a2) => ({ "p-select-option": true, "p-select-option-selected": a0, "p-disabled": a1, "p-focus": a2 }); const _c2 = a0 => ({ $implicit: a0 }); function DropdownItem_ng_container_1_CheckIcon_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "CheckIcon", 4); } if (rf & 2) { i0.ɵɵproperty("styleClass", "p-select-option-check-icon"); } } function DropdownItem_ng_container_1_BlankIcon_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "BlankIcon", 4); } if (rf & 2) { i0.ɵɵproperty("styleClass", "p-select-option-blank-icon"); } } function DropdownItem_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, DropdownItem_ng_container_1_CheckIcon_1_Template, 1, 1, "CheckIcon", 3)(2, DropdownItem_ng_container_1_BlankIcon_2_Template, 1, 1, "BlankIcon", 3); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r0.selected); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r0.selected); } } function DropdownItem_span_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "span"); i0.ɵɵtext(1); i0.ɵɵelementEnd(); } if (rf & 2) { let tmp_1_0; const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵadvance(); i0.ɵɵtextInterpolate((tmp_1_0 = ctx_r0.label) !== null && tmp_1_0 !== undefined ? tmp_1_0 : "empty"); } } function DropdownItem_ng_container_3_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } const _c3 = ["container"]; const _c4 = ["filter"]; const _c5 = ["focusInput"]; const _c6 = ["editableInput"]; const _c7 = ["items"]; const _c8 = ["scroller"]; const _c9 = ["overlay"]; const _c10 = ["firstHiddenFocusableEl"]; const _c11 = ["lastHiddenFocusableEl"]; const _c12 = () => ({ class: "p-select-clear-icon" }); const _c13 = () => ({ class: "p-select-dropdown-icon" }); const _c14 = a0 => ({ options: a0 }); const _c15 = (a0, a1) => ({ $implicit: a0, options: a1 }); const _c16 = () => ({}); function Dropdown_span_0_ng_container_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtext(1); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵtextInterpolate(ctx_r2.label() === "p-emptylabel" ? "\u00A0" : ctx_r2.label()); } } function Dropdown_span_0_ng_container_3_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0, 23); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.selectedItemTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c2, ctx_r2.selectedOption)); } } function Dropdown_span_0_ng_template_4_span_0_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "span"); i0.ɵɵtext(1); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(3); i0.ɵɵadvance(); i0.ɵɵtextInterpolate(ctx_r2.label() === "p-emptylabel" ? "\u00A0" : ctx_r2.label()); } } function Dropdown_span_0_ng_template_4_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, Dropdown_span_0_ng_template_4_span_0_Template, 2, 1, "span", 17); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵproperty("ngIf", !ctx_r2.selectedOption); } } function Dropdown_span_0_Template(rf, ctx) { if (rf & 1) { const _r2 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "span", 21, 3); i0.ɵɵlistener("focus", function Dropdown_span_0_Template_span_focus_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputFocus($event)); })("blur", function Dropdown_span_0_Template_span_blur_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputBlur($event)); })("keydown", function Dropdown_span_0_Template_span_keydown_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onKeyDown($event)); }); i0.ɵɵtemplate(2, Dropdown_span_0_ng_container_2_Template, 2, 1, "ng-container", 19)(3, Dropdown_span_0_ng_container_3_Template, 1, 4, "ng-container", 22)(4, Dropdown_span_0_ng_template_4_Template, 1, 1, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor); i0.ɵɵelementEnd(); } if (rf & 2) { let tmp_17_0; const defaultPlaceholder_r4 = i0.ɵɵreference(5); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵproperty("ngClass", ctx_r2.inputClass)("pTooltip", ctx_r2.tooltip)("tooltipPosition", ctx_r2.tooltipPosition)("positionStyle", ctx_r2.tooltipPositionStyle)("tooltipStyleClass", ctx_r2.tooltipStyleClass)("pAutoFocus", ctx_r2.autofocus); i0.ɵɵattribute("aria-disabled", ctx_r2.disabled)("id", ctx_r2.inputId)("aria-label", ctx_r2.ariaLabel || (ctx_r2.label() === "p-emptylabel" ? undefined : ctx_r2.label()))("aria-labelledby", ctx_r2.ariaLabelledBy)("aria-haspopup", "listbox")("aria-expanded", (tmp_17_0 = ctx_r2.overlayVisible) !== null && tmp_17_0 !== undefined ? tmp_17_0 : false)("aria-controls", ctx_r2.overlayVisible ? ctx_r2.id + "_list" : null)("tabindex", !ctx_r2.disabled ? ctx_r2.tabindex : -1)("aria-activedescendant", ctx_r2.focused ? ctx_r2.focusedOptionId : undefined)("aria-required", ctx_r2.required)("required", ctx_r2.required); i0.ɵɵadvance(2); i0.ɵɵproperty("ngIf", !ctx_r2.selectedItemTemplate)("ngIfElse", defaultPlaceholder_r4); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.selectedItemTemplate && ctx_r2.selectedOption); } } function Dropdown_input_1_Template(rf, ctx) { if (rf & 1) { const _r5 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "input", 24, 5); i0.ɵɵlistener("input", function Dropdown_input_1_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onEditableInput($event)); })("keydown", function Dropdown_input_1_Template_input_keydown_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onKeyDown($event)); })("focus", function Dropdown_input_1_Template_input_focus_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputFocus($event)); })("blur", function Dropdown_input_1_Template_input_blur_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputBlur($event)); }); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵproperty("ngClass", ctx_r2.inputClass)("disabled", ctx_r2.disabled)("pAutoFocus", ctx_r2.autofocus); i0.ɵɵattribute("id", ctx_r2.inputId)("maxlength", ctx_r2.maxlength)("placeholder", ctx_r2.modelValue() === undefined || ctx_r2.modelValue() === null ? ctx_r2.placeholder() : undefined)("aria-label", ctx_r2.ariaLabel || (ctx_r2.label() === "p-emptylabel" ? undefined : ctx_r2.label()))("aria-activedescendant", ctx_r2.focused ? ctx_r2.focusedOptionId : undefined); } } function Dropdown_ng_container_2_TimesIcon_1_Template(rf, ctx) { if (rf & 1) { const _r6 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "TimesIcon", 26); i0.ɵɵlistener("click", function Dropdown_ng_container_2_TimesIcon_1_Template_TimesIcon_click_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.clear($event)); }); i0.ɵɵelementEnd(); } if (rf & 2) { i0.ɵɵattribute("data-pc-section", "clearicon"); } } function Dropdown_ng_container_2_span_2_1_ng_template_0_Template(rf, ctx) { } function Dropdown_ng_container_2_span_2_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, Dropdown_ng_container_2_span_2_1_ng_template_0_Template, 0, 0, "ng-template"); } } function Dropdown_ng_container_2_span_2_Template(rf, ctx) { if (rf & 1) { const _r7 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "span", 26); i0.ɵɵlistener("click", function Dropdown_ng_container_2_span_2_Template_span_click_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.clear($event)); }); i0.ɵɵtemplate(1, Dropdown_ng_container_2_span_2_1_Template, 1, 0, null, 27); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵattribute("data-pc-section", "clearicon"); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.clearIconTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction0(3, _c12)); } } function Dropdown_ng_container_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, Dropdown_ng_container_2_TimesIcon_1_Template, 1, 1, "TimesIcon", 25)(2, Dropdown_ng_container_2_span_2_Template, 2, 4, "span", 25); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r2.clearIconTemplate); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.clearIconTemplate); } } function Dropdown_ng_container_4_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function Dropdown_ng_container_4_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, Dropdown_ng_container_4_ng_container_1_ng_container_1_Template, 1, 0, "ng-container", 28); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.loadingIconTemplate); } } function Dropdown_ng_container_4_ng_container_2_span_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "span", 31); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(3); i0.ɵɵproperty("ngClass", "p-select-loading-icon pi-spin " + ctx_r2.loadingIcon); } } function Dropdown_ng_container_4_ng_container_2_span_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "span", 32); } if (rf & 2) { i0.ɵɵclassMap("p-select-loading-icon pi pi-spinner pi-spin"); } } function Dropdown_ng_container_4_ng_container_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, Dropdown_ng_container_4_ng_container_2_span_1_Template, 1, 1, "span", 29)(2, Dropdown_ng_container_4_ng_container_2_span_2_Template, 1, 2, "span", 30); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.loadingIcon); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r2.loadingIcon); } } function Dropdown_ng_container_4_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, Dropdown_ng_container_4_ng_container_1_Template, 2, 1, "ng-container", 17)(2, Dropdown_ng_container_4_ng_container_2_Template, 3, 2, "ng-container", 17); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.loadingIconTemplate); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r2.loadingIconTemplate); } } function Dropdown_ng_template_5_ng_container_0_span_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "span", 36); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(3); i0.ɵɵproperty("ngClass", ctx_r2.dropdownIcon); } } function Dropdown_ng_template_5_ng_container_0_ChevronDownIcon_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "ChevronDownIcon", 37); } if (rf & 2) { i0.ɵɵproperty("styleClass", "p-select-dropdown-icon"); } } function Dropdown_ng_template_5_ng_container_0_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, Dropdown_ng_template_5_ng_container_0_span_1_Template, 1, 1, "span", 34)(2, Dropdown_ng_template_5_ng_container_0_ChevronDownIcon_2_Template, 1, 1, "ChevronDownIcon", 35); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.dropdownIcon); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r2.dropdownIcon); } } function Dropdown_ng_template_5_span_1_1_ng_template_0_Template(rf, ctx) { } function Dropdown_ng_template_5_span_1_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, Dropdown_ng_template_5_span_1_1_ng_template_0_Template, 0, 0, "ng-template"); } } function Dropdown_ng_template_5_span_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "span", 38); i0.ɵɵtemplate(1, Dropdown_ng_template_5_span_1_1_Template, 1, 0, null, 27); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.dropdownIconTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction0(2, _c13)); } } function Dropdown_ng_template_5_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, Dropdown_ng_template_5_ng_container_0_Template, 3, 2, "ng-container", 17)(1, Dropdown_ng_template_5_span_1_Template, 2, 3, "span", 33); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵproperty("ngIf", !ctx_r2.dropdownIconTemplate); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.dropdownIconTemplate); } } function Dropdown_ng_template_9_ng_container_3_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function Dropdown_ng_template_9_div_4_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function Dropdown_ng_template_9_div_4_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, Dropdown_ng_template_9_div_4_ng_container_1_ng_container_1_Template, 1, 0, "ng-container", 27); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(3); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.filterTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c14, ctx_r2.filterOptions)); } } function Dropdown_ng_template_9_div_4_ng_template_2_SearchIcon_4_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelement(0, "SearchIcon"); } } function Dropdown_ng_template_9_div_4_ng_template_2_span_5_1_ng_template_0_Template(rf, ctx) { } function Dropdown_ng_template_9_div_4_ng_template_2_span_5_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, Dropdown_ng_template_9_div_4_ng_template_2_span_5_1_ng_template_0_Template, 0, 0, "ng-template"); } } function Dropdown_ng_template_9_div_4_ng_template_2_span_5_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "span"); i0.ɵɵtemplate(1, Dropdown_ng_template_9_div_4_ng_template_2_span_5_1_Template, 1, 0, null, 28); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(4); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.filterIconTemplate); } } function Dropdown_ng_template_9_div_4_ng_template_2_Template(rf, ctx) { if (rf & 1) { const _r10 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "p-iconfield")(1, "input", 45, 10); i0.ɵɵlistener("input", function Dropdown_ng_template_9_div_4_ng_template_2_Template_input_input_1_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onFilterInputChange($event)); })("keydown", function Dropdown_ng_template_9_div_4_ng_template_2_Template_input_keydown_1_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onFilterKeyDown($event)); })("blur", function Dropdown_ng_template_9_div_4_ng_template_2_Template_input_blur_1_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onFilterBlur($event)); }); i0.ɵɵelementEnd(); i0.ɵɵelementStart(3, "p-inputicon"); i0.ɵɵtemplate(4, Dropdown_ng_template_9_div_4_ng_template_2_SearchIcon_4_Template, 1, 0, "SearchIcon", 17)(5, Dropdown_ng_template_9_div_4_ng_template_2_span_5_Template, 2, 1, "span", 17); i0.ɵɵelementEnd()(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(3); i0.ɵɵadvance(); i0.ɵɵproperty("value", ctx_r2._filterValue() || "")("variant", ctx_r2.variant); i0.ɵɵattribute("placeholder", ctx_r2.filterPlaceholder)("aria-owns", ctx_r2.id + "_list")("aria-label", ctx_r2.ariaFilterLabel)("aria-activedescendant", ctx_r2.focusedOptionId); i0.ɵɵadvance(3); i0.ɵɵproperty("ngIf", !ctx_r2.filterIconTemplate); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.filterIconTemplate); } } function Dropdown_ng_template_9_div_4_Template(rf, ctx) { if (rf & 1) { const _r9 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "div", 44); i0.ɵɵlistener("click", function Dropdown_ng_template_9_div_4_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r9); return i0.ɵɵresetView($event.stopPropagation()); }); i0.ɵɵtemplate(1, Dropdown_ng_template_9_div_4_ng_container_1_Template, 2, 4, "ng-container", 19)(2, Dropdown_ng_template_9_div_4_ng_template_2_Template, 6, 8, "ng-template", null, 9, i0.ɵɵtemplateRefExtractor); i0.ɵɵelementEnd(); } if (rf & 2) { const builtInFilterElement_r11 = i0.ɵɵreference(3); const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.filterTemplate)("ngIfElse", builtInFilterElement_r11); } } function Dropdown_ng_template_9_p_scroller_6_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function Dropdown_ng_template_9_p_scroller_6_ng_template_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, Dropdown_ng_template_9_p_scroller_6_ng_template_2_ng_container_0_Template, 1, 0, "ng-container", 27); } if (rf & 2) { const items_r13 = ctx.$implicit; const scrollerOptions_r14 = ctx.options; i0.ɵɵnextContext(2); const buildInItems_r15 = i0.ɵɵreference(9); i0.ɵɵproperty("ngTemplateOutlet", buildInItems_r15)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c15, items_r13, scrollerOptions_r14)); } } function Dropdown_ng_template_9_p_scroller_6_ng_container_4_ng_template_1_ng_container_0_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function Dropdown_ng_template_9_p_scroller_6_ng_container_4_ng_template_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, Dropdown_ng_template_9_p_scroller_6_ng_container_4_ng_template_1_ng_container_0_Template, 1, 0, "ng-container", 27); } if (rf & 2) { const scrollerOptions_r16 = ctx.options; const ctx_r2 = i0.ɵɵnextContext(4); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.loaderTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c14, scrollerOptions_r16)); } } function Dropdown_ng_template_9_p_scroller_6_ng_container_4_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, Dropdown_ng_template_9_p_scroller_6_ng_container_4_ng_template_1_Template, 1, 4, "ng-template", null, 12, i0.ɵɵtemplateRefExtractor); i0.ɵɵelementContainerEnd(); } } function Dropdown_ng_template_9_p_scroller_6_Template(rf, ctx) { if (rf & 1) { const _r12 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "p-scroller", 46, 11); i0.ɵɵlistener("onLazyLoad", function Dropdown_ng_template_9_p_scroller_6_Template_p_scroller_onLazyLoad_0_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onLazyLoad.emit($event)); }); i0.ɵɵtemplate(2, Dropdown_ng_template_9_p_scroller_6_ng_template_2_Template, 1, 5, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor)(4, Dropdown_ng_template_9_p_scroller_6_ng_container_4_Template, 3, 0, "ng-container", 17); i0.ɵɵelementEnd(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵstyleMap(i0.ɵɵpureFunction1(8, _c0, ctx_r2.scrollHeight)); i0.ɵɵproperty("items", ctx_r2.visibleOptions())("itemSize", ctx_r2.virtualScrollItemSize || ctx_r2._itemSize)("autoSize", true)("lazy", ctx_r2.lazy)("options", ctx_r2.virtualScrollOptions); i0.ɵɵadvance(4); i0.ɵɵproperty("ngIf", ctx_r2.loaderTemplate); } } function Dropdown_ng_template_9_ng_container_7_ng_container_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function Dropdown_ng_template_9_ng_container_7_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵtemplate(1, Dropdown_ng_template_9_ng_container_7_ng_container_1_Template, 1, 0, "ng-container", 27); i0.ɵɵelementContainerEnd(); } if (rf & 2) { i0.ɵɵnextContext(); const buildInItems_r15 = i0.ɵɵreference(9); const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", buildInItems_r15)("ngTemplateOutletContext", i0.ɵɵpureFunction2(3, _c15, ctx_r2.visibleOptions(), i0.ɵɵpureFunction0(2, _c16))); } } function Dropdown_ng_template_9_ng_template_8_ng_template_2_ng_container_0_span_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "span"); i0.ɵɵtext(1); i0.ɵɵelementEnd(); } if (rf & 2) { const option_r17 = i0.ɵɵnextContext(2).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); i0.ɵɵadvance(); i0.ɵɵtextInterpolate(ctx_r2.getOptionGroupLabel(option_r17.optionGroup)); } } function Dropdown_ng_template_9_ng_template_8_ng_template_2_ng_container_0_ng_container_3_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function Dropdown_ng_template_9_ng_template_8_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainerStart(0); i0.ɵɵelementStart(1, "li", 50); i0.ɵɵtemplate(2, Dropdown_ng_template_9_ng_template_8_ng_template_2_ng_container_0_span_2_Template, 2, 1, "span", 17)(3, Dropdown_ng_template_9_ng_template_8_ng_template_2_ng_container_0_ng_container_3_Template, 1, 0, "ng-container", 27); i0.ɵɵelementEnd(); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r17 = i0.ɵɵnextContext(); const option_r17 = ctx_r17.$implicit; const i_r19 = ctx_r17.index; const scrollerOptions_r20 = i0.ɵɵnextContext().options; const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(5, _c0, scrollerOptions_r20.itemSize + "px")); i0.ɵɵattribute("id", ctx_r2.id + "_" + ctx_r2.getOptionIndex(i_r19, scrollerOptions_r20)); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r2.groupTemplate); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.groupTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(7, _c2, option_r17.optionGroup)); } } function Dropdown_ng_template_9_ng_template_8_ng_template_2_ng_container_1_Template(rf, ctx) { if (rf & 1) { const _r21 = i0.ɵɵgetCurrentView(); i0.ɵɵelementContainerStart(0); i0.ɵɵelementStart(1, "p-dropdownItem", 51); i0.ɵɵlistener("onClick", function Dropdown_ng_template_9_ng_template_8_ng_template_2_ng_container_1_Template_p_dropdownItem_onClick_1_listener($event) { i0.ɵɵrestoreView(_r21); const option_r17 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onOptionSelect($event, option_r17)); })("onMouseEnter", function Dropdown_ng_template_9_ng_template_8_ng_template_2_ng_container_1_Template_p_dropdownItem_onMouseEnter_1_listener($event) { i0.ɵɵrestoreView(_r21); const i_r19 = i0.ɵɵnextContext().index; const scrollerOptions_r20 = i0.ɵɵnextContext().options; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onOptionMouseEnter($event, ctx_r2.getOptionIndex(i_r19, scrollerOptions_r20))); }); i0.ɵɵelementEnd(); i0.ɵɵelementContainerEnd(); } if (rf & 2) { const ctx_r17 = i0.ɵɵnextContext(); const option_r17 = ctx_r17.$implicit; const i_r19 = ctx_r17.index; const scrollerOptions_r20 = i0.ɵɵnextContext().options; const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵadvance(); i0.ɵɵproperty("id", ctx_r2.id + "_" + ctx_r2.getOptionIndex(i_r19, scrollerOptions_r20))("option", option_r17)("checkmark", ctx_r2.checkmark)("selected", ctx_r2.isSelected(option_r17))("label", ctx_r2.getOptionLabel(option_r17))("disabled", ctx_r2.isOptionDisabled(option_r17))("template", ctx_r2.itemTemplate)("focused", ctx_r2.focusedOptionIndex() === ctx_r2.getOptionIndex(i_r19, scrollerOptions_r20))("ariaPosInset", ctx_r2.getAriaPosInset(ctx_r2.getOptionIndex(i_r19, scrollerOptions_r20)))("ariaSetSize", ctx_r2.ariaSetSize); } } function Dropdown_ng_template_9_ng_template_8_ng_template_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, Dropdown_ng_template_9_ng_template_8_ng_template_2_ng_container_0_Template, 4, 9, "ng-container", 17)(1, Dropdown_ng_template_9_ng_template_8_ng_template_2_ng_container_1_Template, 2, 10, "ng-container", 17); } if (rf & 2) { const option_r17 = ctx.$implicit; const ctx_r2 = i0.ɵɵnextContext(3); i0.ɵɵproperty("ngIf", ctx_r2.isOptionGroup(option_r17)); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r2.isOptionGroup(option_r17)); } } function Dropdown_ng_template_9_ng_template_8_li_3_Conditional_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtext(0); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(4); i0.ɵɵtextInterpolate1(" ", ctx_r2.emptyFilterMessageLabel, " "); } } function Dropdown_ng_template_9_ng_template_8_li_3_Conditional_2_ng_container_0_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0, null, 14); } } function Dropdown_ng_template_9_ng_template_8_li_3_Conditional_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, Dropdown_ng_template_9_ng_template_8_li_3_Conditional_2_ng_container_0_Template, 2, 0, "ng-container", 28); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(4); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.emptyFilterTemplate || ctx_r2.emptyTemplate); } } function Dropdown_ng_template_9_ng_template_8_li_3_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "li", 52); i0.ɵɵtemplate(1, Dropdown_ng_template_9_ng_template_8_li_3_Conditional_1_Template, 1, 1)(2, Dropdown_ng_template_9_ng_template_8_li_3_Conditional_2_Template, 1, 1, "ng-container"); i0.ɵɵelementEnd(); } if (rf & 2) { const scrollerOptions_r20 = i0.ɵɵnextContext().options; const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(2, _c0, scrollerOptions_r20.itemSize + "px")); i0.ɵɵadvance(); i0.ɵɵconditional(!ctx_r2.emptyFilterTemplate && !ctx_r2.emptyTemplate ? 1 : 2); } } function Dropdown_ng_template_9_ng_template_8_li_4_Conditional_1_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtext(0); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(4); i0.ɵɵtextInterpolate1(" ", ctx_r2.emptyMessageLabel, " "); } } function Dropdown_ng_template_9_ng_template_8_li_4_Conditional_2_ng_container_0_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function Dropdown_ng_template_9_ng_template_8_li_4_Conditional_2_Template(rf, ctx) { if (rf & 1) { i0.ɵɵtemplate(0, Dropdown_ng_template_9_ng_template_8_li_4_Conditional_2_ng_container_0_Template, 1, 0, "ng-container", 28); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(4); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.emptyTemplate); } } function Dropdown_ng_template_9_ng_template_8_li_4_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "li", 52); i0.ɵɵtemplate(1, Dropdown_ng_template_9_ng_template_8_li_4_Conditional_1_Template, 1, 1)(2, Dropdown_ng_template_9_ng_template_8_li_4_Conditional_2_Template, 1, 1, "ng-container"); i0.ɵɵelementEnd(); } if (rf & 2) { const scrollerOptions_r20 = i0.ɵɵnextContext().options; const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(2, _c0, scrollerOptions_r20.itemSize + "px")); i0.ɵɵadvance(); i0.ɵɵconditional(!ctx_r2.emptyTemplate ? 1 : 2); } } function Dropdown_ng_template_9_ng_template_8_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "ul", 47, 13); i0.ɵɵtemplate(2, Dropdown_ng_template_9_ng_template_8_ng_template_2_Template, 2, 2, "ng-template", 48)(3, Dropdown_ng_template_9_ng_template_8_li_3_Template, 3, 4, "li", 49)(4, Dropdown_ng_template_9_ng_template_8_li_4_Template, 3, 4, "li", 49); i0.ɵɵelementEnd(); } if (rf & 2) { const items_r22 = ctx.$implicit; const scrollerOptions_r20 = ctx.options; const ctx_r2 = i0.ɵɵnextContext(2); i0.ɵɵstyleMap(scrollerOptions_r20.contentStyle); i0.ɵɵproperty("ngClass", scrollerOptions_r20.contentStyleClass); i0.ɵɵattribute("id", ctx_r2.id + "_list")("aria-label", ctx_r2.listLabel); i0.ɵɵadvance(2); i0.ɵɵproperty("ngForOf", items_r22); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.filterValue && ctx_r2.isEmpty()); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r2.filterValue && ctx_r2.isEmpty()); } } function Dropdown_ng_template_9_ng_container_10_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementContainer(0); } } function Dropdown_ng_template_9_Template(rf, ctx) { if (rf & 1) { const _r8 = i0.ɵɵgetCurrentView(); i0.ɵɵelementStart(0, "div", 39)(1, "span", 40, 6); i0.ɵɵlistener("focus", function Dropdown_ng_template_9_Template_span_focus_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onFirstHiddenFocus($event)); }); i0.ɵɵelementEnd(); i0.ɵɵtemplate(3, Dropdown_ng_template_9_ng_container_3_Template, 1, 0, "ng-container", 28)(4, Dropdown_ng_template_9_div_4_Template, 4, 2, "div", 41); i0.ɵɵelementStart(5, "div", 42); i0.ɵɵtemplate(6, Dropdown_ng_template_9_p_scroller_6_Template, 5, 10, "p-scroller", 43)(7, Dropdown_ng_template_9_ng_container_7_Template, 2, 6, "ng-container", 17)(8, Dropdown_ng_template_9_ng_template_8_Template, 5, 8, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor); i0.ɵɵelementEnd(); i0.ɵɵtemplate(10, Dropdown_ng_template_9_ng_container_10_Template, 1, 0, "ng-container", 28); i0.ɵɵelementStart(11, "span", 40, 8); i0.ɵɵlistener("focus", function Dropdown_ng_template_9_Template_span_focus_11_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onLastHiddenFocus($event)); }); i0.ɵɵelementEnd()(); } if (rf & 2) { const ctx_r2 = i0.ɵɵnextContext(); i0.ɵɵclassMap(ctx_r2.panelStyleClass); i0.ɵɵproperty("ngClass", "p-select-overlay p-component")("ngStyle", ctx_r2.panelStyle); i0.ɵɵadvance(); i0.ɵɵattribute("tabindex", 0)("data-p-hidden-accessible", true)("data-p-hidden-focusable", true); i0.ɵɵadvance(2); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.headerTemplate); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.filter); i0.ɵɵadvance(); i0.ɵɵstyleProp("max-height", ctx_r2.virtualScroll ? "auto" : ctx_r2.scrollHeight || "auto"); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx_r2.virtualScroll); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx_r2.virtualScroll); i0.ɵɵadvance(3); i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.footerTemplate); i0.ɵɵadvance(); i0.ɵɵattribute("tabindex", 0)("data-p-hidden-accessible", true)("data-p-hidden-focusable", true); } } const DROPDOWN_VALUE_ACCESSOR = { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => Dropdown), multi: true }; class DropdownItem extends BaseComponent { id; option; selected; focused; label; disabled; visible; itemSize; ariaPosInset; ariaSetSize; template; checkmark; onClick = new EventEmitter(); onMouseEnter = new EventEmitter(); onOptionClick(event) { this.onClick.emit(event); } onOptionMouseEnter(event) { this.onMouseEnter.emit(event); } static ɵfac = /*@__PURE__*/ (() => { let ɵDropdownItem_BaseFactory; return function DropdownItem_Factory(__ngFactoryType__) { return (ɵDropdownItem_BaseFactory || (ɵDropdownItem_BaseFactory = i0.ɵɵgetInheritedFactory(DropdownItem)))(__ngFactoryType__ || DropdownItem); }; })(); static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DropdownItem, selectors: [["p-dropdownItem"]], inputs: { id: "id", option: "option", selected: [2, "selected", "selected", booleanAttribute], focused: [2, "focused", "focused", booleanAttribute], label: "label", disabled: [2, "disabled", "disabled", booleanAttribute], visible: [2, "visible", "visible", booleanAttribute], itemSize: [2, "itemSize", "itemSize", numberAttribute], ariaPosInset: "ariaPosInset", ariaSetSize: "ariaSetSize", template: "template", checkmark: [2, "checkmark", "checkmark", booleanAttribute] }, outputs: { onClick: "onClick", onMouseEnter: "onMouseEnter" }, standalone: false, features: [i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 22, consts: [["role", "option", "pRipple", "", 3, "click", "mouseenter", "id", "ngStyle", "ngClass"], [4, "ngIf"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [3, "styleClass", 4, "ngIf"], [3, "styleClass"]], template: function DropdownItem_Template(rf, ctx) { if (rf & 1) { i0.ɵɵelementStart(0, "li", 0); i0.ɵɵlistener("click", function DropdownItem_Template_li_click_0_listener($event) { return ctx.onOptionClick($event); })("mouseenter", function DropdownItem_Template_li_mouseenter_0_listener($event) { return ctx.onOptionMouseEnter($event); }); i0.ɵɵtemplate(1, DropdownItem_ng_container_1_Template, 3, 2, "ng-container", 1)(2, DropdownItem_span_2_Template, 2, 1, "span", 1)(3, DropdownItem_ng_container_3_Template, 1, 0, "ng-container", 2); i0.ɵɵelementEnd(); } if (rf & 2) { i0.ɵɵproperty("id", ctx.id)("ngStyle", i0.ɵɵpureFunction1(14, _c0, ctx.itemSize + "px"))("ngClass", i0.ɵɵpureFunction3(16, _c1, ctx.selected, ctx.disabled, ctx.focused)); i0.ɵɵattribute("aria-label", ctx.label)("aria-setsize", ctx.ariaSetSize)("aria-posinset", ctx.ariaPosInset)("aria-selected", ctx.selected)("data-p-focused", ctx.focused)("data-p-highlight", ctx.selected)("data-p-disabled", ctx.disabled); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", ctx.checkmark); i0.ɵɵadvance(); i0.ɵɵproperty("ngIf", !ctx.template); i0.ɵɵadvance(); i0.ɵɵproperty("ngTemplateOutlet", ctx.template)("ngTemplateOutletContext", i0.ɵɵpureFunction1(20, _c2, ctx.option)); } }, dependencies: () => [i1.NgClass, i1.NgIf, i1.NgTemplateOutlet, i1.NgStyle, Ripple, BlankIcon, CheckIcon], encapsulation: 2 }); } (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DropdownItem, [{ type: Component, args: [{ selector: 'p-dropdownItem', standalone: false, template: ` <li [id]="id" (click)="onOptionClick($event)" (mouseenter)="onOptionMouseEnter($event)" role="option" pRipple [attr.aria-label]="label" [attr.aria-setsize]="ariaSetSize" [attr.aria-posinset]="ariaPosInset" [attr.aria-selected]="selected" [attr.data-p-focused]="focused" [attr.data-p-highlight]="selected" [attr.data-p-disabled]="disabled" [ngStyle]="{ height: itemSize + 'px' }" [ngClass]="{ 'p-select-option': true, 'p-select-option-selected': selected, 'p-disabled': disabled, 'p-focus': focused }" > <ng-container *ngIf="checkmark"> <CheckIcon *ngIf="selected" [styleClass]="'p-select-option-check-icon'" /> <BlankIcon *ngIf="!selected" [styleClass]="'p-select-option-blank-icon'" /> </ng-container> <span *ngIf="!template">{{ label ?? 'empty' }}</span> <ng-container *ngTemplateOutlet="template; context: { $implicit: option }"></ng-container> </li> ` }] }], null, { id: [{ type: Input }], option: [{ type: Input }], selected: [{ type: Input, args: [{ transform: booleanAttribute }] }], focused: [{ type: Input, args: [{ transform: booleanAttribute }] }], label: [{ type: Input }], disabled: [{ type: Input, args: [{ transform: booleanAttribute }] }], visible: [{ type: Input, args: [{ transform: booleanAttribute }] }], itemSize: [{ type: Input, args: [{ transform: numberAttribute }] }], ariaPosInset: [{ type: Input }], ariaSetSize: [{ type: Input }], template: [{ type: Input }], checkmark: [{ type: Input, args: [{ transform: booleanAttribute }] }], onClick: [{ type: Output }], onMouseEnter: [{ type: Output }] }); })(); (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DropdownItem, { className: "DropdownItem", filePath: "dropdown.ts", lineNumber: 105 }); })(); /** * Dropdown also known as Select, is used to choose an item from a collection of options. * @group Components */ class Dropdown extends BaseComponent { zone; filterService; /** * Unique identifier of the component * @group Props */ id; /** * Height of the viewport in pixels, a scrollbar is defined if height of list exceeds this value. * @group Props */ scrollHeight = '200px'; /** * When specified, displays an input field to filter the items on keyup. * @group Props */ filter; /** * Name of the input element. * @group Props */ name; /** * Inline style of the element. * @group Props */ style; /** * Inline style of the overlay panel element. * @group Props */ panelStyle; /** * Style class of the element. * @group Props */ styleClass; /** * Style class of the overlay panel element. * @group Props */ panelStyleClass; /** * When present, it specifies that the component cannot be edited. * @group Props */ readonly; /** * When present, it specifies that an input field must be filled out before submitting the form. * @group Props */ required; /** * When present, custom value instead of predefined options can be entered using the editable input field. * @group Props */ editable; /** * 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). * @group Props */ appendTo; /** * Index of the element in tabbing order. * @group Props */ tabindex = 0; /** * Default text to display when no option is selected. * @group Props */ set placeholder(val) { this._placeholder.set(val); } get placeholder() { return this._placeholder.asReadonly(); } /** * Icon to display in loading state. * @group Props */ loadingIcon; /** * Placeholder text to show when filter input is empty. * @group Props */ filterPlaceholder; /** * Locale to use in filtering. The default locale is the host environment's current locale. * @group Props */ filterLocale; /** * Specifies the input variant of the component. * @group Props */ variant = 'outlined'; /** * Identifier of the accessible input element. * @group Props */ inputId; /** * A property to uniquely identify a value in options. * @group Props */ dataKey; /** * When filtering is enabled, filterBy decides which field or fields (comma separated) to search against. * @group Props */ filterBy; /** * Fields used when filtering the options, defaults to optionLabel. * @group Props */ filterFields; /** * When present, it specifies that the component should automatically get focus on load. * @group Props */ autofocus; /** * Clears the filter value when hiding the dropdown. * @group Props */ resetFilterOnHide = false; /** * Whether the selected option will be shown with a check mark. * @group Props */ checkmark = false;