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,015 lines (979 loc) • 138 kB
JavaScript
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, ContentChild, 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 { SharedModule, TranslationKeys, PrimeTemplate } from 'primeng/api';
import { AutoFocus } from 'primeng/autofocus';
import { BaseComponent } from 'primeng/basecomponent';
import { IconField } from 'primeng/iconfield';
import { CheckIcon, BlankIcon, TimesIcon, ChevronDownIcon, SearchIcon } from 'primeng/icons';
import { InputIcon } from 'primeng/inputicon';
import { InputText } from 'primeng/inputtext';
import { Overlay } from 'primeng/overlay';
import { Ripple } from 'primeng/ripple';
import { Scroller } from 'primeng/scroller';
import { Tooltip } 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.ng-invalid.ng-dirty {
border-color: ${dt('select.invalid.border.color')};
}
.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:not(.p-disabled):hover {
background: ${dt('select.filled.hover.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')};
inset-inline-end: ${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.ng-invalid.ng-dirty .p-select-label.p-placeholder {
color: ${dt('select.invalid.placeholder.color')};
}
.p-select:has(.p-select-clear-icon) .p-select-label {
padding-inline-end: 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 {
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;
}
.p-select-sm .p-select-label {
font-size: ${dt('select.sm.font.size')};
padding-block: ${dt('select.sm.padding.y')};
padding-inline: ${dt('select.sm.padding.x')};
}
.p-select-sm .p-select-dropdown .p-icon {
font-size: ${dt('select.sm.font.size')};
width: ${dt('select.sm.font.size')};
height: ${dt('select.sm.font.size')};
}
.p-select-lg .p-select-label {
font-size: ${dt('select.lg.font.size')};
padding-block: ${dt('select.lg.padding.y')};
padding-inline: ${dt('select.lg.padding.x')};
}
.p-select-lg .p-select-dropdown .p-icon {
font-size: ${dt('select.lg.font.size')};
width: ${dt('select.lg.font.size')};
height: ${dt('select.lg.font.size')};
}
`;
const classes = {
root: ({ instance }) => [
'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,
'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 SelectStyle extends BaseStyle {
name = 'select';
theme = theme;
classes = classes;
static ɵfac = /*@__PURE__*/ (() => { let ɵSelectStyle_BaseFactory; return function SelectStyle_Factory(__ngFactoryType__) { return (ɵSelectStyle_BaseFactory || (ɵSelectStyle_BaseFactory = i0.ɵɵgetInheritedFactory(SelectStyle)))(__ngFactoryType__ || SelectStyle); }; })();
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: SelectStyle, factory: SelectStyle.ɵfac });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SelectStyle, [{
type: Injectable
}], null, null); })();
/**
*
* Select also known as Select, is used to choose an item from a collection of options.
*
* [Live Demo](https://www.primeng.org/select/)
*
* @module selectstyle
*
*/
var SelectClasses;
(function (SelectClasses) {
/**
* Class name of the root element
*/
SelectClasses["root"] = "p-select";
/**
* Class name of the label element
*/
SelectClasses["label"] = "p-select-label";
/**
* Class name of the clear icon element
*/
SelectClasses["clearIcon"] = "p-select-clear-icon";
/**
* Class name of the dropdown element
*/
SelectClasses["dropdown"] = "p-select-dropdown";
/**
* Class name of the loadingicon element
*/
SelectClasses["loadingicon"] = "p-select-loading-icon";
/**
* Class name of the dropdown icon element
*/
SelectClasses["dropdownIcon"] = "p-select-dropdown-icon";
/**
* Class name of the overlay element
*/
SelectClasses["overlay"] = "p-select-overlay";
/**
* Class name of the header element
*/
SelectClasses["header"] = "p-select-header";
/**
* Class name of the filter element
*/
SelectClasses["pcFilter"] = "p-select-filter";
/**
* Class name of the list container element
*/
SelectClasses["listContainer"] = "p-select-list-container";
/**
* Class name of the list element
*/
SelectClasses["list"] = "p-select-list";
/**
* Class name of the option group element
*/
SelectClasses["optionGroup"] = "p-select-option-group";
/**
* Class name of the option group label element
*/
SelectClasses["optionGroupLabel"] = "p-select-option-group-label";
/**
* Class name of the option element
*/
SelectClasses["option"] = "p-select-option";
/**
* Class name of the option label element
*/
SelectClasses["optionLabel"] = "p-select-option-label";
/**
* Class name of the option check icon element
*/
SelectClasses["optionCheckIcon"] = "p-select-option-check-icon";
/**
* Class name of the option blank icon element
*/
SelectClasses["optionBlankIcon"] = "p-select-option-blank-icon";
/**
* Class name of the empty message element
*/
SelectClasses["emptyMessage"] = "p-select-empty-message";
})(SelectClasses || (SelectClasses = {}));
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 SelectItem_ng_container_1_CheckIcon_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "CheckIcon", 5);
} }
function SelectItem_ng_container_1_BlankIcon_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "BlankIcon", 6);
} }
function SelectItem_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, SelectItem_ng_container_1_CheckIcon_1_Template, 1, 0, "CheckIcon", 3)(2, SelectItem_ng_container_1_BlankIcon_2_Template, 1, 0, "BlankIcon", 4);
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 SelectItem_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 SelectItem_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
const _c3 = ["item"];
const _c4 = ["group"];
const _c5 = ["loader"];
const _c6 = ["selectedItem"];
const _c7 = ["header"];
const _c8 = ["filter"];
const _c9 = ["footer"];
const _c10 = ["emptyfilter"];
const _c11 = ["empty"];
const _c12 = ["dropdownicon"];
const _c13 = ["loadingicon"];
const _c14 = ["clearicon"];
const _c15 = ["filtericon"];
const _c16 = ["onicon"];
const _c17 = ["officon"];
const _c18 = ["cancelicon"];
const _c19 = ["focusInput"];
const _c20 = ["editableInput"];
const _c21 = ["items"];
const _c22 = ["scroller"];
const _c23 = ["overlay"];
const _c24 = ["firstHiddenFocusableEl"];
const _c25 = ["lastHiddenFocusableEl"];
const _c26 = () => ({ class: "p-select-clear-icon" });
const _c27 = () => ({ class: "p-select-dropdown-icon" });
const _c28 = a0 => ({ options: a0 });
const _c29 = (a0, a1) => ({ $implicit: a0, options: a1 });
const _c30 = () => ({});
function Select_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 Select_span_0_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0, 24);
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.selectedItemTemplate || ctx_r2._selectedItemTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c2, ctx_r2.selectedOption));
} }
function Select_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 Select_span_0_ng_template_4_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, Select_span_0_ng_template_4_span_0_Template, 2, 1, "span", 18);
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵproperty("ngIf", !ctx_r2.selectedOption);
} }
function Select_span_0_Template(rf, ctx) { if (rf & 1) {
const _r2 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "span", 22, 3);
i0.ɵɵlistener("focus", function Select_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 Select_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 Select_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, Select_span_0_ng_container_2_Template, 2, 1, "ng-container", 20)(3, Select_span_0_ng_container_3_Template, 1, 4, "ng-container", 23)(4, Select_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 && !ctx_r2._selectedItemTemplate)("ngIfElse", defaultPlaceholder_r4);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", (ctx_r2.selectedItemTemplate || ctx_r2._selectedItemTemplate) && ctx_r2.selectedOption);
} }
function Select_input_1_Template(rf, ctx) { if (rf & 1) {
const _r5 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "input", 25, 5);
i0.ɵɵlistener("input", function Select_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 Select_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 Select_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 Select_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 Select_ng_container_2_TimesIcon_1_Template(rf, ctx) { if (rf & 1) {
const _r6 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "TimesIcon", 27);
i0.ɵɵlistener("click", function Select_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 Select_ng_container_2_span_2_1_ng_template_0_Template(rf, ctx) { }
function Select_ng_container_2_span_2_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, Select_ng_container_2_span_2_1_ng_template_0_Template, 0, 0, "ng-template");
} }
function Select_ng_container_2_span_2_Template(rf, ctx) { if (rf & 1) {
const _r7 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "span", 27);
i0.ɵɵlistener("click", function Select_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, Select_ng_container_2_span_2_1_Template, 1, 0, null, 28);
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 || ctx_r2._clearIconTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction0(3, _c26));
} }
function Select_ng_container_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, Select_ng_container_2_TimesIcon_1_Template, 1, 1, "TimesIcon", 26)(2, Select_ng_container_2_span_2_Template, 2, 4, "span", 26);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext();
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx_r2.clearIconTemplate && !ctx_r2._clearIconTemplate);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", ctx_r2.clearIconTemplate || ctx_r2._clearIconTemplate);
} }
function Select_ng_container_4_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function Select_ng_container_4_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, Select_ng_container_4_ng_container_1_ng_container_1_Template, 1, 0, "ng-container", 29);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.loadingIconTemplate || ctx_r2._loadingIconTemplate);
} }
function Select_ng_container_4_ng_container_2_span_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "span", 32);
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(3);
i0.ɵɵproperty("ngClass", "p-select-loading-icon pi-spin " + ctx_r2.loadingIcon);
} }
function Select_ng_container_4_ng_container_2_span_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "span", 33);
} if (rf & 2) {
i0.ɵɵclassMap("p-select-loading-icon pi pi-spinner pi-spin");
} }
function Select_ng_container_4_ng_container_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, Select_ng_container_4_ng_container_2_span_1_Template, 1, 1, "span", 30)(2, Select_ng_container_4_ng_container_2_span_2_Template, 1, 2, "span", 31);
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 Select_ng_container_4_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, Select_ng_container_4_ng_container_1_Template, 2, 1, "ng-container", 18)(2, Select_ng_container_4_ng_container_2_Template, 3, 2, "ng-container", 18);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext();
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", ctx_r2.loadingIconTemplate || ctx_r2._loadingIconTemplate);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx_r2.loadingIconTemplate && !ctx_r2._loadingIconTemplate);
} }
function Select_ng_template_5_ng_container_0_span_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "span", 37);
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(3);
i0.ɵɵproperty("ngClass", ctx_r2.dropdownIcon);
} }
function Select_ng_template_5_ng_container_0_ChevronDownIcon_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "ChevronDownIcon", 38);
} if (rf & 2) {
i0.ɵɵproperty("styleClass", "p-select-dropdown-icon");
} }
function Select_ng_template_5_ng_container_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, Select_ng_template_5_ng_container_0_span_1_Template, 1, 1, "span", 35)(2, Select_ng_template_5_ng_container_0_ChevronDownIcon_2_Template, 1, 1, "ChevronDownIcon", 36);
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 Select_ng_template_5_span_1_1_ng_template_0_Template(rf, ctx) { }
function Select_ng_template_5_span_1_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, Select_ng_template_5_span_1_1_ng_template_0_Template, 0, 0, "ng-template");
} }
function Select_ng_template_5_span_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "span", 39);
i0.ɵɵtemplate(1, Select_ng_template_5_span_1_1_Template, 1, 0, null, 28);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.dropdownIconTemplate || ctx_r2._dropdownIconTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction0(2, _c27));
} }
function Select_ng_template_5_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, Select_ng_template_5_ng_container_0_Template, 3, 2, "ng-container", 18)(1, Select_ng_template_5_span_1_Template, 2, 3, "span", 34);
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext();
i0.ɵɵproperty("ngIf", !ctx_r2.dropdownIconTemplate && !ctx_r2._dropdownIconTemplate);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", ctx_r2.dropdownIconTemplate || ctx_r2._dropdownIconTemplate);
} }
function Select_ng_template_9_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function Select_ng_template_9_div_4_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function Select_ng_template_9_div_4_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, Select_ng_template_9_div_4_ng_container_1_ng_container_1_Template, 1, 0, "ng-container", 28);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(3);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.filterTemplate || ctx_r2._filterTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c28, ctx_r2.filterOptions));
} }
function Select_ng_template_9_div_4_ng_template_2_SearchIcon_4_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "SearchIcon");
} }
function Select_ng_template_9_div_4_ng_template_2_span_5_1_ng_template_0_Template(rf, ctx) { }
function Select_ng_template_9_div_4_ng_template_2_span_5_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, Select_ng_template_9_div_4_ng_template_2_span_5_1_ng_template_0_Template, 0, 0, "ng-template");
} }
function Select_ng_template_9_div_4_ng_template_2_span_5_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "span");
i0.ɵɵtemplate(1, Select_ng_template_9_div_4_ng_template_2_span_5_1_Template, 1, 0, null, 29);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(4);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.filterIconTemplate || ctx_r2._filterIconTemplate);
} }
function Select_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", 46, 10);
i0.ɵɵlistener("input", function Select_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 Select_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 Select_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, Select_ng_template_9_div_4_ng_template_2_SearchIcon_4_Template, 1, 0, "SearchIcon", 18)(5, Select_ng_template_9_div_4_ng_template_2_span_5_Template, 2, 1, "span", 18);
i0.ɵɵelementEnd()();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(3);
i0.ɵɵadvance();
i0.ɵɵproperty("pSize", ctx_r2.size)("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 && !ctx_r2._filterIconTemplate);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", ctx_r2.filterIconTemplate || ctx_r2._filterIconTemplate);
} }
function Select_ng_template_9_div_4_Template(rf, ctx) { if (rf & 1) {
const _r9 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "div", 45);
i0.ɵɵlistener("click", function Select_ng_template_9_div_4_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r9); return i0.ɵɵresetView($event.stopPropagation()); });
i0.ɵɵtemplate(1, Select_ng_template_9_div_4_ng_container_1_Template, 2, 4, "ng-container", 20)(2, Select_ng_template_9_div_4_ng_template_2_Template, 6, 9, "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 || ctx_r2._filterTemplate)("ngIfElse", builtInFilterElement_r11);
} }
function Select_ng_template_9_p_scroller_6_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function Select_ng_template_9_p_scroller_6_ng_template_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, Select_ng_template_9_p_scroller_6_ng_template_2_ng_container_0_Template, 1, 0, "ng-container", 28);
} 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, _c29, items_r13, scrollerOptions_r14));
} }
function Select_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 Select_ng_template_9_p_scroller_6_ng_container_4_ng_template_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, Select_ng_template_9_p_scroller_6_ng_container_4_ng_template_1_ng_container_0_Template, 1, 0, "ng-container", 28);
} if (rf & 2) {
const scrollerOptions_r16 = ctx.options;
const ctx_r2 = i0.ɵɵnextContext(4);
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.loaderTemplate || ctx_r2._loaderTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c28, scrollerOptions_r16));
} }
function Select_ng_template_9_p_scroller_6_ng_container_4_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, Select_ng_template_9_p_scroller_6_ng_container_4_ng_template_1_Template, 1, 4, "ng-template", null, 12, i0.ɵɵtemplateRefExtractor);
i0.ɵɵelementContainerEnd();
} }
function Select_ng_template_9_p_scroller_6_Template(rf, ctx) { if (rf & 1) {
const _r12 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "p-scroller", 47, 11);
i0.ɵɵlistener("onLazyLoad", function Select_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, Select_ng_template_9_p_scroller_6_ng_template_2_Template, 1, 5, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor)(4, Select_ng_template_9_p_scroller_6_ng_container_4_Template, 3, 0, "ng-container", 18);
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 || ctx_r2._loaderTemplate);
} }
function Select_ng_template_9_ng_container_7_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function Select_ng_template_9_ng_container_7_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, Select_ng_template_9_ng_container_7_ng_container_1_Template, 1, 0, "ng-container", 28);
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, _c29, ctx_r2.visibleOptions(), i0.ɵɵpureFunction0(2, _c30)));
} }
function Select_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 Select_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 Select_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", 51);
i0.ɵɵtemplate(2, Select_ng_template_9_ng_template_8_ng_template_2_ng_container_0_span_2_Template, 2, 1, "span", 18)(3, Select_ng_template_9_ng_template_8_ng_template_2_ng_container_0_ng_container_3_Template, 1, 0, "ng-container", 28);
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 && !ctx_r2._groupTemplate);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.groupTemplate || ctx_r2._groupTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(7, _c2, option_r17.optionGroup));
} }
function Select_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-selectItem", 52);
i0.ɵɵlistener("onClick", function Select_ng_template_9_ng_template_8_ng_template_2_ng_container_1_Template_p_selectItem_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 Select_ng_template_9_ng_template_8_ng_template_2_ng_container_1_Template_p_selectItem_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 || 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 Select_ng_template_9_ng_template_8_ng_template_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, Select_ng_template_9_ng_template_8_ng_template_2_ng_container_0_Template, 4, 9, "ng-container", 18)(1, Select_ng_template_9_ng_template_8_ng_template_2_ng_container_1_Template, 2, 10, "ng-container", 18);
} 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 Select_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 Select_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 Select_ng_template_9_ng_template_8_li_3_Conditional_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, Select_ng_template_9_ng_template_8_li_3_Conditional_2_ng_container_0_Template, 2, 0, "ng-container", 29);
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(4);
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.emptyFilterTemplate || ctx_r2._emptyFilterTemplate || ctx_r2.emptyTemplate || ctx_r2._emptyTemplate);
} }
function Select_ng_template_9_ng_template_8_li_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "li", 53);
i0.ɵɵtemplate(1, Select_ng_template_9_ng_template_8_li_3_Conditional_1_Template, 1, 1)(2, Select_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._emptyFilterTemplate && !ctx_r2.emptyTemplate ? 1 : 2);
} }
function Select_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 Select_ng_template_9_ng_template_8_li_4_Conditional_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0, null, 15);
} }
function Select_ng_template_9_ng_template_8_li_4_Conditional_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, Select_ng_template_9_ng_template_8_li_4_Conditional_2_ng_container_0_Template, 2, 0, "ng-container", 29);
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(4);
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.emptyTemplate || ctx_r2._emptyTemplate);
} }
function Select_ng_template_9_ng_template_8_li_4_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "li", 53);
i0.ɵɵtemplate(1, Select_ng_template_9_ng_template_8_li_4_Conditional_1_Template, 1, 1)(2, Select_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 && !ctx_r2._emptyTemplate ? 1 : 2);
} }
function Select_ng_template_9_ng_template_8_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "ul", 48, 13);
i0.ɵɵtemplate(2, Select_ng_template_9_ng_template_8_ng_template_2_Template, 2, 2, "ng-template", 49)(3, Select_ng_template_9_ng_template_8_li_3_Template, 3, 4, "li", 50)(4, Select_ng_template_9_ng_template_8_li_4_Template, 3, 4, "li", 50);
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 Select_ng_template_9_ng_container_10_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function Select_ng_template_9_Template(rf, ctx) { if (rf & 1) {
const _r8 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "div", 40)(1, "span", 41, 6);
i0.ɵɵlistener("focus", function Select_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, Select_ng_template_9_ng_container_3_Template, 1, 0, "ng-container", 29)(4, Select_ng_template_9_div_4_Template, 4, 2, "div", 42);
i0.ɵɵelementStart(5, "div", 43);
i0.ɵɵtemplate(6, Select_ng_template_9_p_scroller_6_Template, 5, 10, "p-scroller", 44)(7, Select_ng_template_9_ng_container_7_Template, 2, 6, "ng-container", 18)(8, Select_ng_template_9_ng_template_8_Template, 5, 8, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor);
i0.ɵɵelementEnd();
i0.ɵɵtemplate(10, Select_ng_template_9_ng_container_10_Template, 1, 0, "ng-container", 29);
i0.ɵɵelementStart(11, "span", 41, 8);
i0.ɵɵlistener("focus", function Select_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 || 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 || ctx_r2._footerTemplate);
i0.ɵɵadvance();
i0.ɵɵattribute("tabindex", 0)("data-p-hidden-accessible", true)("data-p-hidden-focusable", true);
} }
const SELECT_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => Select),
multi: true
};
class SelectItem 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 ɵSelectItem_BaseFactory; return function SelectItem_Factory(__ngFactoryType__) { return (ɵSelectItem_BaseFactory || (ɵSelectItem_BaseFactory = i0.ɵɵgetInheritedFactory(SelectItem)))(__ngFactoryType__ || SelectItem); }; })();
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SelectItem, selectors: [["p-selectItem"]], 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" }, features: [i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 22, consts: [["role", "option", "pRipple", "", 3, "click", "mouseenter", "id", "ngStyle", "ngClass"], [4, "ngIf"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], ["styleClass", "p-select-option-check-icon", 4, "ngIf"], ["styleClass", "p-select-option-blank-icon", 4, "ngIf"], ["styleClass", "p-select-option-check-icon"], ["styleClass", "p-select-option-blank-icon"]], template: function SelectItem_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "li", 0);
i0.ɵɵlistener("click", function SelectItem_Template_li_click_0_listener($event) { return ctx.onOptionClick($event); })("mouseenter", function SelectItem_Template_li_mouseenter_0_listener($event) { return ctx.onOptionMouseEnter($event); });
i0.ɵɵtemplate(1, SelectItem_ng_container_1_Template, 3, 2, "ng-container", 1)(2, SelectItem_span_2_Template, 2, 1, "span", 1)(3, SelectItem_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.checkmark, 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: [CommonModule, i1.NgClass, i1.NgIf, i1.NgTemplateOutlet, i1.NgStyle, SharedModule, Ripple, CheckIcon, BlankIcon], encapsulation: 2 });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SelectItem, [{
type: Component,
args: [{
selector: 'p-selectItem',
standalone: true,
imports: [CommonModule, SharedModule, Ripple, CheckIcon, BlankIcon],
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 && !checkmark,
'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: [{
t