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,073 lines (1,027 loc) • 123 kB
JavaScript
import * as i2 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i0 from '@angular/core';
import { Injectable, forwardRef, EventEmitter, inject, signal, computed, effect, numberAttribute, booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, ViewChild, ContentChild, ContentChildren, NgModule } from '@angular/core';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { resolveFieldData, isNotEmpty, uuid, findLastIndex, equals, focus, isEmpty, findSingle } from '@primeuix/utils';
import * as i1 from 'primeng/api';
import { TranslationKeys, PrimeTemplate, SharedModule } from 'primeng/api';
import { AutoFocus } from 'primeng/autofocus';
import { BaseComponent } from 'primeng/basecomponent';
import { Chip } from 'primeng/chip';
import { PrimeNG } from 'primeng/config';
import { TimesCircleIcon, SpinnerIcon, TimesIcon, ChevronDownIcon } from 'primeng/icons';
import { InputText } from 'primeng/inputtext';
import { Overlay } from 'primeng/overlay';
import { Ripple } from 'primeng/ripple';
import { Scroller } from 'primeng/scroller';
import { BaseStyle } from 'primeng/base';
const theme = ({ dt }) => `
.p-autocomplete {
display: inline-flex;
}
.p-autocomplete-loader {
position: absolute;
top: 50%;
margin-top: -0.5rem;
inset-inline-end: ${dt('autocomplete.padding.x')};
}
.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader {
inset-inline-end: calc(${dt('autocomplete.dropdown.width')} + ${dt('autocomplete.padding.x')});
}
.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input {
flex: 1 1 auto;
width: 1%;
}
.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input,
.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input-multiple {
border-start-end-radius: 0;
border-end-end-radius: 0;
}
.p-autocomplete-dropdown {
cursor: pointer;
display: inline-flex;
user-select: none;
align-items: center;
justify-content: center;
overflow: hidden;
position: relative;
width: ${dt('autocomplete.dropdown.width')};
border-start-end-radius: ${dt('autocomplete.dropdown.border.radius')};
border-end-end-radius: ${dt('autocomplete.dropdown.border.radius')};
background: ${dt('autocomplete.dropdown.background')};
border: 1px solid ${dt('autocomplete.dropdown.border.color')};
border-inline-start: 0 none;
color: ${dt('autocomplete.dropdown.color')};
transition: background ${dt('autocomplete.transition.duration')}, color ${dt('autocomplete.transition.duration')}, border-color ${dt('autocomplete.transition.duration')}, outline-color ${dt('autocomplete.transition.duration')}, box-shadow ${dt('autocomplete.transition.duration')};
outline-color: transparent;
}
.p-autocomplete-dropdown:not(:disabled):hover {
background: ${dt('autocomplete.dropdown.hover.background')};
border-color: ${dt('autocomplete.dropdown.hover.border.color')};
color: ${dt('autocomplete.dropdown.hover.color')};
}
.p-autocomplete-dropdown:not(:disabled):active {
background: ${dt('autocomplete.dropdown.active.background')};
border-color: ${dt('autocomplete.dropdown.active.border.color')};
color: ${dt('autocomplete.dropdown.active.color')};
}
.p-autocomplete-dropdown:focus-visible {
box-shadow: ${dt('autocomplete.dropdown.focus.ring.shadow')};
outline: ${dt('autocomplete.dropdown.focus.ring.width')} ${dt('autocomplete.dropdown.focus.ring.style')} ${dt('autocomplete.dropdown.focus.ring.color')};
outline-offset: ${dt('autocomplete.dropdown.focus.ring.offset')};
}
.p-autocomplete .p-autocomplete-overlay {
min-width: 100%;
}
.p-autocomplete-overlay {
background: ${dt('autocomplete.overlay.background')};
color: ${dt('autocomplete.overlay.color')};
border: 1px solid ${dt('autocomplete.overlay.border.color')};
border-radius: ${dt('autocomplete.overlay.border.radius')};
box-shadow: ${dt('autocomplete.overlay.shadow')};
}
.p-autocomplete-list-container {
overflow: auto;
}
.p-autocomplete-list {
margin: 0;
list-style-type: none;
display: flex;
flex-direction: column;
gap: ${dt('autocomplete.list.gap')};
padding: ${dt('autocomplete.list.padding')};
}
.p-autocomplete-option {
cursor: pointer;
white-space: nowrap;
position: relative;
overflow: hidden;
display: flex;
align-items: center;
padding: ${dt('autocomplete.option.padding')};
border: 0 none;
color: ${dt('autocomplete.option.color')};
background: transparent;
transition: background ${dt('autocomplete.transition.duration')}, color ${dt('autocomplete.transition.duration')}, border-color ${dt('autocomplete.transition.duration')};
border-radius: ${dt('autocomplete.option.border.radius')};
}
.p-autocomplete-option:not(.p-autocomplete-option-selected):not(.p-disabled).p-focus {
background: ${dt('autocomplete.option.focus.background')};
color: ${dt('autocomplete.option.focus.color')};
}
.p-autocomplete-option-selected {
background: ${dt('autocomplete.option.selected.background')};
color: ${dt('autocomplete.option.selected.color')};
}
.p-autocomplete-option-selected.p-focus {
background: ${dt('autocomplete.option.selected.focus.background')};
color: ${dt('autocomplete.option.selected.focus.color')};
}
.p-autocomplete-option-group {
margin: 0;
padding: ${dt('autocomplete.option.group.padding')};
color: ${dt('autocomplete.option.group.color')};
background: ${dt('autocomplete.option.group.background')};
font-weight: ${dt('autocomplete.option.group.font.weight')};
}
.p-autocomplete-input-multiple {
margin: 0;
list-style-type: none;
cursor: text;
overflow: hidden;
display: flex;
align-items: center;
flex-wrap: wrap;
padding: calc(${dt('autocomplete.padding.y')} / 2) ${dt('autocomplete.padding.x')};
gap: calc(${dt('autocomplete.padding.y')} / 2);
color: ${dt('autocomplete.color')};
background: ${dt('autocomplete.background')};
border: 1px solid ${dt('autocomplete.border.color')};
border-radius: ${dt('autocomplete.border.radius')};
width: 100%;
transition: background ${dt('autocomplete.transition.duration')}, color ${dt('autocomplete.transition.duration')}, border-color ${dt('autocomplete.transition.duration')}, outline-color ${dt('autocomplete.transition.duration')}, box-shadow ${dt('autocomplete.transition.duration')};
outline-color: transparent;
box-shadow: ${dt('autocomplete.shadow')};
}
.p-autocomplete:not(.p-disabled):hover .p-autocomplete-input-multiple {
border-color: ${dt('autocomplete.hover.border.color')};
}
.p-autocomplete:not(.p-disabled).p-focus .p-autocomplete-input-multiple {
border-color: ${dt('autocomplete.focus.border.color')};
box-shadow: ${dt('autocomplete.focus.ring.shadow')};
outline: ${dt('autocomplete.focus.ring.width')} ${dt('autocomplete.focus.ring.style')} ${dt('autocomplete.focus.ring.color')};
outline-offset: ${dt('autocomplete.focus.ring.offset')};
}
.p-autocomplete.p-invalid .p-autocomplete-input-multiple {
border-color: ${dt('autocomplete.invalid.border.color')};
}
.p-variant-filled.p-autocomplete-input-multiple {
background: ${dt('autocomplete.filled.background')};
}
.p-autocomplete:not(.p-disabled):hover .p-variant-filled.p-autocomplete-input-multiple {
background: ${dt('autocomplete.filled.hover.background')};
}
.p-autocomplete:not(.p-disabled).p-focus .p-variant-filled.p-autocomplete-input-multiple {
background: ${dt('autocomplete.filled.focus.background')};
}
.p-autocomplete.p-disabled .p-autocomplete-input-multiple {
opacity: 1;
background: ${dt('autocomplete.disabled.background')};
color: ${dt('autocomplete.disabled.color')};
}
.p-autocomplete-chip.p-chip {
padding-block-start: calc(${dt('autocomplete.padding.y')} / 2);
padding-block-end: calc(${dt('autocomplete.padding.y')} / 2);
border-radius: ${dt('autocomplete.chip.border.radius')};
}
.p-autocomplete-input-multiple:has(.p-autocomplete-chip) {
padding-inline-start: calc(${dt('autocomplete.padding.y')} / 2);
padding-inline-end: calc(${dt('autocomplete.padding.y')} / 2);
}
.p-autocomplete-chip-item.p-focus .p-autocomplete-chip {
background: ${dt('autocomplete.chip.focus.background')};
color: ${dt('autocomplete.chip.focus.color')};
}
.p-autocomplete-input-chip {
flex: 1 1 auto;
display: inline-flex;
padding-block-start: calc(${dt('autocomplete.padding.y')} / 2);
padding-block-end: calc(${dt('autocomplete.padding.y')} / 2);
}
.p-autocomplete-input-chip input {
border: 0 none;
outline: 0 none;
background: transparent;
margin: 0;
padding: 0;
box-shadow: none;
border-radius: 0;
width: 100%;
font-family: inherit;
font-feature-settings: inherit;
font-size: 1rem;
color: inherit;
}
.p-autocomplete-input-chip input::placeholder {
color: ${dt('autocomplete.placeholder.color')};
}
.p-autocomplete-empty-message {
padding: ${dt('autocomplete.empty.message.padding')};
}
.p-autocomplete-fluid {
display: flex;
}
.p-autocomplete-fluid:has(.p-autocomplete-dropdown) .p-autocomplete-input {
width: 1%;
}
.p-autocomplete:has(.p-inputtext-sm) .p-autocomplete-dropdown {
width: ${dt('autocomplete.dropdown.sm.width')};
}
.p-autocomplete:has(.p-inputtext-sm) .p-autocomplete-dropdown .p-icon {
font-size: ${dt('form.field.sm.font.size')};
width: ${dt('form.field.sm.font.size')};
height: ${dt('form.field.sm.font.size')};
}
.p-autocomplete:has(.p-inputtext-lg) .p-autocomplete-dropdown {
width: ${dt('autocomplete.dropdown.lg.width')};
}
.p-autocomplete:has(.p-inputtext-lg) .p-autocomplete-dropdown .p-icon {
font-size: ${dt('form.field.lg.font.size')};
width: ${dt('form.field.lg.font.size')};
height: ${dt('form.field.lg.font.size')};
}
.p-autocomplete-clear-icon {
position: absolute;
top: 50%;
margin-top: -0.5rem;
cursor: pointer;
right: ${dt('autocomplete.padding.x')};
color: ${dt('autocomplete.dropdown.color')};
}
.p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-clear-icon {
right: calc(${dt('autocomplete.padding.x')} + ${dt('autocomplete.dropdown.width')});
}
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input,
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input-multiple {
border-color: ${dt('autocomplete.invalid.border.color')};
}
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input:enabled:focus,
p-autocomplete.ng-invalid.ng-dirty:not(.p-disabled).p-focus .p-autocomplete-input-multiple {
border-color: ${dt('autocomplete.focus.border.color')};
}
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input-chip input::placeholder {
color: ${dt('autocomplete.invalid.placeholder.color')};
}
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input::placeholder {
color: ${dt('autocomplete.invalid.placeholder.color')};
}`;
const inlineStyles = {
root: { position: 'relative' }
};
const classes = {
root: ({ instance }) => ({
'p-autocomplete p-component p-inputwrapper': true,
'p-disabled': instance.disabled,
'p-focus': instance.focused,
'p-inputwrapper-filled': instance.filled,
'p-inputwrapper-focus': (instance.focused && !instance.disabled) || instance.autofocus || instance.overlayVisible,
'p-autocomplete-open': instance.overlayVisible,
'p-autocomplete-clearable': instance.showClear && !instance.disabled,
// 'p-invalid': instance.invalid,
'p-autocomplete-fluid': instance.hasFluid
}),
pcInput: 'p-autocomplete-input',
inputMultiple: ({ instance }) => ({
'p-autocomplete-input-multiple': true,
'p-variant-filled': instance.variant ? instance.variant === 'filled' : instance.config.inputStyle() === 'filled'
}),
chipItem: ({ instance, i }) => [
'p-autocomplete-chip-item',
{
'p-focus': instance.focusedMultipleOptionIndex === i
}
],
pcChip: 'p-autocomplete-chip',
chipIcon: 'p-autocomplete-chip-icon',
inputChip: 'p-autocomplete-input-chip',
loader: 'p-autocomplete-loader',
dropdown: 'p-autocomplete-dropdown',
overlay: 'p-autocomplete-overlay p-component',
list: 'p-autocomplete-list',
optionGroup: 'p-autocomplete-option-group',
option: ({ instance, option, i, getItemOptions }) => ({
'p-autocomplete-option': true,
'p-autocomplete-option-selected': instance.isSelected(option),
'p-focus': instance.focusedOptionIndex === instance.getOptionIndex(i, getItemOptions),
'p-disabled': instance.isOptionDisabled(option)
}),
emptyMessage: 'p-autocomplete-empty-message'
};
class AutoCompleteStyle extends BaseStyle {
name = 'autocomplete';
theme = theme;
classes = classes;
inlineStyles = inlineStyles;
static ɵfac = /*@__PURE__*/ (() => { let ɵAutoCompleteStyle_BaseFactory; return function AutoCompleteStyle_Factory(__ngFactoryType__) { return (ɵAutoCompleteStyle_BaseFactory || (ɵAutoCompleteStyle_BaseFactory = i0.ɵɵgetInheritedFactory(AutoCompleteStyle)))(__ngFactoryType__ || AutoCompleteStyle); }; })();
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AutoCompleteStyle, factory: AutoCompleteStyle.ɵfac });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AutoCompleteStyle, [{
type: Injectable
}], null, null); })();
/**
*
* AutoComplete is an input component that provides real-time suggestions while being typed.
*
* [Live Demo](https://www.primeng.org/autocomplete/)
*
* @module autocompletestyle
*
*/
var AutoCompleteClasses;
(function (AutoCompleteClasses) {
/**
* Class name of the root element
*/
AutoCompleteClasses["root"] = "p-autocomplete";
/**
* Class name of the input element
*/
AutoCompleteClasses["pcInput"] = "p-autocomplete-input";
/**
* Class name of the input multiple element
*/
AutoCompleteClasses["inputMultiple"] = "p-autocomplete-input-multiple";
/**
* Class name of the chip item element
*/
AutoCompleteClasses["chipItem"] = "p-autocomplete-chip-item";
/**
* Class name of the chip element
*/
AutoCompleteClasses["pcChip"] = "p-autocomplete-chip";
/**
* Class name of the chip icon element
*/
AutoCompleteClasses["chipIcon"] = "p-autocomplete-chip-icon";
/**
* Class name of the input chip element
*/
AutoCompleteClasses["inputChip"] = "p-autocomplete-input-chip";
/**
* Class name of the loader element
*/
AutoCompleteClasses["loader"] = "p-autocomplete-loader";
/**
* Class name of the dropdown element
*/
AutoCompleteClasses["dropdown"] = "p-autocomplete-dropdown";
/**
* Class name of the panel element
*/
AutoCompleteClasses["panel"] = "p-autocomplete-overlay";
/**
* Class name of the list element
*/
AutoCompleteClasses["list"] = "p-autocomplete-list";
/**
* Class name of the option group element
*/
AutoCompleteClasses["optionGroup"] = "p-autocomplete-option-group";
/**
* Class name of the option element
*/
AutoCompleteClasses["option"] = "p-autocomplete-option";
/**
* Class name of the empty message element
*/
AutoCompleteClasses["emptyMessage"] = "p-autocomplete-empty-message";
})(AutoCompleteClasses || (AutoCompleteClasses = {}));
const _c0 = ["item"];
const _c1 = ["empty"];
const _c2 = ["header"];
const _c3 = ["footer"];
const _c4 = ["selecteditem"];
const _c5 = ["group"];
const _c6 = ["loader"];
const _c7 = ["removeicon"];
const _c8 = ["loadingicon"];
const _c9 = ["clearicon"];
const _c10 = ["dropdownicon"];
const _c11 = ["container"];
const _c12 = ["focusInput"];
const _c13 = ["multiIn"];
const _c14 = ["multiContainer"];
const _c15 = ["ddBtn"];
const _c16 = ["items"];
const _c17 = ["scroller"];
const _c18 = ["overlay"];
const _c19 = a0 => ({ "p-autocomplete-chip-item": true, "p-focus": a0 });
const _c20 = a0 => ({ $implicit: a0 });
const _c21 = () => ({ class: "p-autocomplete-chip-icon" });
const _c22 = a0 => ({ height: a0 });
const _c23 = (a0, a1) => ({ $implicit: a0, options: a1 });
const _c24 = a0 => ({ options: a0 });
const _c25 = () => ({});
const _c26 = (a0, a1) => ({ $implicit: a0, index: a1 });
function AutoComplete_input_2_Template(rf, ctx) { if (rf & 1) {
const _r2 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "input", 19, 3);
i0.ɵɵlistener("input", function AutoComplete_input_2_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInput($event)); })("keydown", function AutoComplete_input_2_Template_input_keydown_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onKeyDown($event)); })("change", function AutoComplete_input_2_Template_input_change_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputChange($event)); })("focus", function AutoComplete_input_2_Template_input_focus_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputFocus($event)); })("blur", function AutoComplete_input_2_Template_input_blur_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputBlur($event)); })("paste", function AutoComplete_input_2_Template_input_paste_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputPaste($event)); })("keyup", function AutoComplete_input_2_Template_input_keyup_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputKeyUp($event)); });
i0.ɵɵelementEnd();
} if (rf & 2) {
let tmp_26_0;
const ctx_r2 = i0.ɵɵnextContext();
i0.ɵɵclassMap(ctx_r2.inputStyleClass);
i0.ɵɵproperty("pAutoFocus", ctx_r2.autofocus)("ngClass", "p-autocomplete-input")("ngStyle", ctx_r2.inputStyle)("type", ctx_r2.type)("variant", ctx_r2.variant)("autocomplete", ctx_r2.autocomplete)("required", ctx_r2.required)("name", ctx_r2.name)("pSize", ctx_r2.size)("tabindex", !ctx_r2.disabled ? ctx_r2.tabindex : -1)("readonly", ctx_r2.readonly)("disabled", ctx_r2.disabled)("fluid", ctx_r2.hasFluid);
i0.ɵɵattribute("value", ctx_r2.inputValue())("id", ctx_r2.inputId)("placeholder", ctx_r2.placeholder)("maxlength", ctx_r2.maxlength)("aria-label", ctx_r2.ariaLabel)("aria-labelledby", ctx_r2.ariaLabelledBy)("aria-required", ctx_r2.required)("aria-expanded", (tmp_26_0 = ctx_r2.overlayVisible) !== null && tmp_26_0 !== undefined ? tmp_26_0 : false)("aria-controls", ctx_r2.overlayVisible ? ctx_r2.id + "_list" : null)("aria-activedescendant", ctx_r2.focused ? ctx_r2.focusedOptionId : undefined);
} }
function AutoComplete_ng_container_3_TimesIcon_1_Template(rf, ctx) { if (rf & 1) {
const _r4 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "TimesIcon", 22);
i0.ɵɵlistener("click", function AutoComplete_ng_container_3_TimesIcon_1_Template_TimesIcon_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.clear()); });
i0.ɵɵelementEnd();
} if (rf & 2) {
i0.ɵɵproperty("styleClass", "p-autocomplete-clear-icon");
i0.ɵɵattribute("aria-hidden", true);
} }
function AutoComplete_ng_container_3_span_2_1_ng_template_0_Template(rf, ctx) { }
function AutoComplete_ng_container_3_span_2_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, AutoComplete_ng_container_3_span_2_1_ng_template_0_Template, 0, 0, "ng-template");
} }
function AutoComplete_ng_container_3_span_2_Template(rf, ctx) { if (rf & 1) {
const _r5 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "span", 23);
i0.ɵɵlistener("click", function AutoComplete_ng_container_3_span_2_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.clear()); });
i0.ɵɵtemplate(1, AutoComplete_ng_container_3_span_2_1_Template, 1, 0, null, 24);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵattribute("aria-hidden", true);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.clearIconTemplate || ctx_r2._clearIconTemplate);
} }
function AutoComplete_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, AutoComplete_ng_container_3_TimesIcon_1_Template, 1, 2, "TimesIcon", 20)(2, AutoComplete_ng_container_3_span_2_Template, 2, 2, "span", 21);
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 AutoComplete_ul_4_li_2_ng_container_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function AutoComplete_ul_4_li_2_p_chip_3_ng_container_1_ng_template_1_Template(rf, ctx) { if (rf & 1) {
const _r7 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "span", 33);
i0.ɵɵlistener("click", function AutoComplete_ul_4_li_2_p_chip_3_ng_container_1_ng_template_1_Template_span_click_0_listener($event) { i0.ɵɵrestoreView(_r7); const i_r8 = i0.ɵɵnextContext(3).index; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(!ctx_r2.readonly ? ctx_r2.removeOption($event, i_r8) : ""); });
i0.ɵɵelement(1, "TimesCircleIcon", 34);
i0.ɵɵelementEnd();
} if (rf & 2) {
i0.ɵɵadvance();
i0.ɵɵproperty("styleClass", "p-autocomplete-chip-icon");
i0.ɵɵattribute("aria-hidden", true);
} }
function AutoComplete_ul_4_li_2_p_chip_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, AutoComplete_ul_4_li_2_p_chip_3_ng_container_1_ng_template_1_Template, 2, 2, "ng-template", null, 6, i0.ɵɵtemplateRefExtractor);
i0.ɵɵelementContainerEnd();
} }
function AutoComplete_ul_4_li_2_p_chip_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "p-chip", 32);
i0.ɵɵtemplate(1, AutoComplete_ul_4_li_2_p_chip_3_ng_container_1_Template, 3, 0, "ng-container", 15);
i0.ɵɵelementEnd();
} if (rf & 2) {
const option_r9 = i0.ɵɵnextContext().$implicit;
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵproperty("label", ctx_r2.getOptionLabel(option_r9))("removable", true);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx_r2.removeIconTemplate && !ctx_r2._removeIconTemplate);
} }
function AutoComplete_ul_4_li_2_span_4_1_ng_template_0_Template(rf, ctx) { }
function AutoComplete_ul_4_li_2_span_4_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, AutoComplete_ul_4_li_2_span_4_1_ng_template_0_Template, 0, 0, "ng-template");
} }
function AutoComplete_ul_4_li_2_span_4_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "span");
i0.ɵɵtemplate(1, AutoComplete_ul_4_li_2_span_4_1_Template, 1, 0, null, 30);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(3);
i0.ɵɵattribute("aria-hidden", true);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.removeIconTemplate || ctx_r2._removeIconTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction0(3, _c21));
} }
function AutoComplete_ul_4_li_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "li", 29, 5);
i0.ɵɵtemplate(2, AutoComplete_ul_4_li_2_ng_container_2_Template, 1, 0, "ng-container", 30)(3, AutoComplete_ul_4_li_2_p_chip_3_Template, 2, 3, "p-chip", 31)(4, AutoComplete_ul_4_li_2_span_4_Template, 2, 4, "span", 15);
i0.ɵɵelementEnd();
} if (rf & 2) {
const option_r9 = ctx.$implicit;
const i_r8 = ctx.index;
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(10, _c19, ctx_r2.focusedMultipleOptionIndex() === i_r8));
i0.ɵɵattribute("id", ctx_r2.id + "_multiple_option_" + i_r8)("aria-label", ctx_r2.getOptionLabel(option_r9))("aria-setsize", ctx_r2.modelValue().length)("aria-posinset", i_r8 + 1)("aria-selected", true);
i0.ɵɵadvance(2);
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.selectedItemTemplate || ctx_r2._selectedItemTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(12, _c20, option_r9));
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx_r2.selectedItemTemplate && !ctx_r2._selectedItemTemplate);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", ctx_r2.removeIconTemplate || ctx_r2._removeIconTemplate);
} }
function AutoComplete_ul_4_Template(rf, ctx) { if (rf & 1) {
const _r6 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "ul", 25, 4);
i0.ɵɵlistener("focus", function AutoComplete_ul_4_Template_ul_focus_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onMultipleContainerFocus($event)); })("blur", function AutoComplete_ul_4_Template_ul_blur_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onMultipleContainerBlur($event)); })("keydown", function AutoComplete_ul_4_Template_ul_keydown_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onMultipleContainerKeyDown($event)); });
i0.ɵɵtemplate(2, AutoComplete_ul_4_li_2_Template, 5, 14, "li", 26);
i0.ɵɵelementStart(3, "li", 27)(4, "input", 28, 3);
i0.ɵɵlistener("input", function AutoComplete_ul_4_Template_input_input_4_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInput($event)); })("keydown", function AutoComplete_ul_4_Template_input_keydown_4_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onKeyDown($event)); })("change", function AutoComplete_ul_4_Template_input_change_4_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputChange($event)); })("focus", function AutoComplete_ul_4_Template_input_focus_4_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputFocus($event)); })("blur", function AutoComplete_ul_4_Template_input_blur_4_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputBlur($event)); })("paste", function AutoComplete_ul_4_Template_input_paste_4_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputPaste($event)); })("keyup", function AutoComplete_ul_4_Template_input_keyup_4_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onInputKeyUp($event)); });
i0.ɵɵelementEnd()()();
} if (rf & 2) {
let tmp_28_0;
const ctx_r2 = i0.ɵɵnextContext();
i0.ɵɵproperty("ngClass", ctx_r2.inputMultipleClass)("tabindex", -1);
i0.ɵɵattribute("aria-orientation", "horizontal")("aria-activedescendant", ctx_r2.focused ? ctx_r2.focusedMultipleOptionId : undefined);
i0.ɵɵadvance(2);
i0.ɵɵproperty("ngForOf", ctx_r2.modelValue());
i0.ɵɵadvance(2);
i0.ɵɵclassMap(ctx_r2.inputStyleClass);
i0.ɵɵproperty("pAutoFocus", ctx_r2.autofocus)("ngClass", ctx_r2.inputClass)("ngStyle", ctx_r2.inputStyle)("autocomplete", ctx_r2.autocomplete)("required", ctx_r2.required)("tabindex", !ctx_r2.disabled ? ctx_r2.tabindex : -1)("readonly", ctx_r2.readonly)("disabled", ctx_r2.disabled);
i0.ɵɵattribute("type", ctx_r2.type)("id", ctx_r2.inputId)("name", ctx_r2.name)("placeholder", !ctx_r2.filled ? ctx_r2.placeholder : null)("maxlength", ctx_r2.maxlength)("aria-label", ctx_r2.ariaLabel)("aria-labelledby", ctx_r2.ariaLabelledBy)("aria-required", ctx_r2.required)("aria-expanded", (tmp_28_0 = ctx_r2.overlayVisible) !== null && tmp_28_0 !== undefined ? tmp_28_0 : false)("aria-controls", ctx_r2.overlayVisible ? ctx_r2.id + "_list" : null)("aria-activedescendant", ctx_r2.focused ? ctx_r2.focusedOptionId : undefined);
} }
function AutoComplete_ng_container_5_SpinnerIcon_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "SpinnerIcon", 37);
} if (rf & 2) {
i0.ɵɵproperty("styleClass", "p-autocomplete-loader")("spin", true);
i0.ɵɵattribute("aria-hidden", true);
} }
function AutoComplete_ng_container_5_span_2_1_ng_template_0_Template(rf, ctx) { }
function AutoComplete_ng_container_5_span_2_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, AutoComplete_ng_container_5_span_2_1_ng_template_0_Template, 0, 0, "ng-template");
} }
function AutoComplete_ng_container_5_span_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "span", 38);
i0.ɵɵtemplate(1, AutoComplete_ng_container_5_span_2_1_Template, 1, 0, null, 24);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵattribute("aria-hidden", true);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.loadingIconTemplate || ctx_r2._loadingIconTemplate);
} }
function AutoComplete_ng_container_5_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, AutoComplete_ng_container_5_SpinnerIcon_1_Template, 1, 3, "SpinnerIcon", 35)(2, AutoComplete_ng_container_5_span_2_Template, 2, 2, "span", 36);
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 AutoComplete_button_6_span_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "span", 41);
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵproperty("ngClass", ctx_r2.dropdownIcon);
i0.ɵɵattribute("aria-hidden", true);
} }
function AutoComplete_button_6_ng_container_3_ChevronDownIcon_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "ChevronDownIcon");
} }
function AutoComplete_button_6_ng_container_3_2_ng_template_0_Template(rf, ctx) { }
function AutoComplete_button_6_ng_container_3_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, AutoComplete_button_6_ng_container_3_2_ng_template_0_Template, 0, 0, "ng-template");
} }
function AutoComplete_button_6_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, AutoComplete_button_6_ng_container_3_ChevronDownIcon_1_Template, 1, 0, "ChevronDownIcon", 15)(2, AutoComplete_button_6_ng_container_3_2_Template, 1, 0, null, 24);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx_r2.dropdownIconTemplate && !ctx_r2._dropdownIconTemplate);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.dropdownIconTemplate || ctx_r2._dropdownIconTemplate);
} }
function AutoComplete_button_6_Template(rf, ctx) { if (rf & 1) {
const _r10 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "button", 39, 7);
i0.ɵɵlistener("click", function AutoComplete_button_6_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.handleDropdownClick($event)); });
i0.ɵɵtemplate(2, AutoComplete_button_6_span_2_Template, 1, 2, "span", 40)(3, AutoComplete_button_6_ng_container_3_Template, 3, 2, "ng-container", 15);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext();
i0.ɵɵproperty("disabled", ctx_r2.disabled);
i0.ɵɵattribute("aria-label", ctx_r2.dropdownAriaLabel)("tabindex", ctx_r2.tabindex);
i0.ɵɵadvance(2);
i0.ɵɵproperty("ngIf", ctx_r2.dropdownIcon);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx_r2.dropdownIcon);
} }
function AutoComplete_ng_template_9_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function AutoComplete_ng_template_9_p_scroller_3_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function AutoComplete_ng_template_9_p_scroller_3_ng_template_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, AutoComplete_ng_template_9_p_scroller_3_ng_template_2_ng_container_0_Template, 1, 0, "ng-container", 30);
} if (rf & 2) {
const items_r12 = ctx.$implicit;
const scrollerOptions_r13 = ctx.options;
i0.ɵɵnextContext(2);
const buildInItems_r14 = i0.ɵɵreference(6);
i0.ɵɵproperty("ngTemplateOutlet", buildInItems_r14)("ngTemplateOutletContext", i0.ɵɵpureFunction2(2, _c23, items_r12, scrollerOptions_r13));
} }
function AutoComplete_ng_template_9_p_scroller_3_ng_container_4_ng_template_1_ng_container_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function AutoComplete_ng_template_9_p_scroller_3_ng_container_4_ng_template_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, AutoComplete_ng_template_9_p_scroller_3_ng_container_4_ng_template_1_ng_container_0_Template, 1, 0, "ng-container", 30);
} if (rf & 2) {
const scrollerOptions_r15 = ctx.options;
const ctx_r2 = i0.ɵɵnextContext(4);
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.loaderTemplate || ctx_r2._loaderTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c24, scrollerOptions_r15));
} }
function AutoComplete_ng_template_9_p_scroller_3_ng_container_4_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, AutoComplete_ng_template_9_p_scroller_3_ng_container_4_ng_template_1_Template, 1, 4, "ng-template", null, 10, i0.ɵɵtemplateRefExtractor);
i0.ɵɵelementContainerEnd();
} }
function AutoComplete_ng_template_9_p_scroller_3_Template(rf, ctx) { if (rf & 1) {
const _r11 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "p-scroller", 46, 9);
i0.ɵɵlistener("onLazyLoad", function AutoComplete_ng_template_9_p_scroller_3_Template_p_scroller_onLazyLoad_0_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onLazyLoad.emit($event)); });
i0.ɵɵtemplate(2, AutoComplete_ng_template_9_p_scroller_3_ng_template_2_Template, 1, 5, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor)(4, AutoComplete_ng_template_9_p_scroller_3_ng_container_4_Template, 3, 0, "ng-container", 15);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵstyleMap(i0.ɵɵpureFunction1(8, _c22, 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 AutoComplete_ng_template_9_ng_container_4_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function AutoComplete_ng_template_9_ng_container_4_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, AutoComplete_ng_template_9_ng_container_4_ng_container_1_Template, 1, 0, "ng-container", 30);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
i0.ɵɵnextContext();
const buildInItems_r14 = i0.ɵɵreference(6);
const ctx_r2 = i0.ɵɵnextContext();
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", buildInItems_r14)("ngTemplateOutletContext", i0.ɵɵpureFunction2(3, _c23, ctx_r2.visibleOptions(), i0.ɵɵpureFunction0(2, _c25)));
} }
function AutoComplete_ng_template_9_ng_template_5_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_r16 = i0.ɵɵnextContext(2).$implicit;
const ctx_r2 = i0.ɵɵnextContext(3);
i0.ɵɵadvance();
i0.ɵɵtextInterpolate(ctx_r2.getOptionGroupLabel(option_r16.optionGroup));
} }
function AutoComplete_ng_template_9_ng_template_5_ng_template_2_ng_container_0_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function AutoComplete_ng_template_9_ng_template_5_ng_template_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵelementStart(1, "li", 50);
i0.ɵɵtemplate(2, AutoComplete_ng_template_9_ng_template_5_ng_template_2_ng_container_0_span_2_Template, 2, 1, "span", 15)(3, AutoComplete_ng_template_9_ng_template_5_ng_template_2_ng_container_0_ng_container_3_Template, 1, 0, "ng-container", 30);
i0.ɵɵelementEnd();
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const ctx_r16 = i0.ɵɵnextContext();
const option_r16 = ctx_r16.$implicit;
const i_r18 = ctx_r16.index;
const scrollerOptions_r19 = i0.ɵɵnextContext().options;
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵadvance();
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(5, _c22, scrollerOptions_r19.itemSize + "px"));
i0.ɵɵattribute("id", ctx_r2.id + "_" + ctx_r2.getOptionIndex(i_r18, scrollerOptions_r19));
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx_r2.groupTemplate);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.groupTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(7, _c20, option_r16.optionGroup));
} }
function AutoComplete_ng_template_9_ng_template_5_ng_template_2_ng_container_1_span_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "span");
i0.ɵɵtext(1);
i0.ɵɵelementEnd();
} if (rf & 2) {
const option_r16 = i0.ɵɵnextContext(2).$implicit;
const ctx_r2 = i0.ɵɵnextContext(3);
i0.ɵɵadvance();
i0.ɵɵtextInterpolate(ctx_r2.getOptionLabel(option_r16));
} }
function AutoComplete_ng_template_9_ng_template_5_ng_template_2_ng_container_1_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function AutoComplete_ng_template_9_ng_template_5_ng_template_2_ng_container_1_Template(rf, ctx) { if (rf & 1) {
const _r20 = i0.ɵɵgetCurrentView();
i0.ɵɵelementContainerStart(0);
i0.ɵɵelementStart(1, "li", 51);
i0.ɵɵlistener("click", function AutoComplete_ng_template_9_ng_template_5_ng_template_2_ng_container_1_Template_li_click_1_listener($event) { i0.ɵɵrestoreView(_r20); const option_r16 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onOptionSelect($event, option_r16)); })("mouseenter", function AutoComplete_ng_template_9_ng_template_5_ng_template_2_ng_container_1_Template_li_mouseenter_1_listener($event) { i0.ɵɵrestoreView(_r20); const i_r18 = i0.ɵɵnextContext().index; const scrollerOptions_r19 = i0.ɵɵnextContext().options; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onOptionMouseEnter($event, ctx_r2.getOptionIndex(i_r18, scrollerOptions_r19))); });
i0.ɵɵtemplate(2, AutoComplete_ng_template_9_ng_template_5_ng_template_2_ng_container_1_span_2_Template, 2, 1, "span", 15)(3, AutoComplete_ng_template_9_ng_template_5_ng_template_2_ng_container_1_ng_container_3_Template, 1, 0, "ng-container", 30);
i0.ɵɵelementEnd();
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const ctx_r16 = i0.ɵɵnextContext();
const option_r16 = ctx_r16.$implicit;
const i_r18 = ctx_r16.index;
const scrollerOptions_r19 = i0.ɵɵnextContext().options;
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵadvance();
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(12, _c22, scrollerOptions_r19.itemSize + "px"))("ngClass", ctx_r2.optionClass(option_r16, i_r18, scrollerOptions_r19));
i0.ɵɵattribute("id", ctx_r2.id + "_" + ctx_r2.getOptionIndex(i_r18, scrollerOptions_r19))("aria-label", ctx_r2.getOptionLabel(option_r16))("aria-selected", ctx_r2.isSelected(option_r16))("aria-disabled", ctx_r2.isOptionDisabled(option_r16))("data-p-focused", ctx_r2.focusedOptionIndex() === ctx_r2.getOptionIndex(i_r18, scrollerOptions_r19))("aria-setsize", ctx_r2.ariaSetSize)("aria-posinset", ctx_r2.getAriaPosInset(ctx_r2.getOptionIndex(i_r18, scrollerOptions_r19)));
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx_r2.itemTemplate && !ctx_r2._itemTemplate);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.itemTemplate || ctx_r2._itemTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction2(14, _c26, option_r16, scrollerOptions_r19.getOptions ? scrollerOptions_r19.getOptions(i_r18) : i_r18));
} }
function AutoComplete_ng_template_9_ng_template_5_ng_template_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, AutoComplete_ng_template_9_ng_template_5_ng_template_2_ng_container_0_Template, 4, 9, "ng-container", 15)(1, AutoComplete_ng_template_9_ng_template_5_ng_template_2_ng_container_1_Template, 4, 17, "ng-container", 15);
} if (rf & 2) {
const option_r16 = ctx.$implicit;
const ctx_r2 = i0.ɵɵnextContext(3);
i0.ɵɵproperty("ngIf", ctx_r2.isOptionGroup(option_r16));
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx_r2.isOptionGroup(option_r16));
} }
function AutoComplete_ng_template_9_ng_template_5_li_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtext(1);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext(4);
i0.ɵɵadvance();
i0.ɵɵtextInterpolate1(" ", ctx_r2.searchResultMessageText, " ");
} }
function AutoComplete_ng_template_9_ng_template_5_li_3_ng_container_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0, null, 12);
} }
function AutoComplete_ng_template_9_ng_template_5_li_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "li", 52);
i0.ɵɵtemplate(1, AutoComplete_ng_template_9_ng_template_5_li_3_ng_container_1_Template, 2, 1, "ng-container", 53)(2, AutoComplete_ng_template_9_ng_template_5_li_3_ng_container_2_Template, 2, 0, "ng-container", 24);
i0.ɵɵelementEnd();
} if (rf & 2) {
const scrollerOptions_r19 = i0.ɵɵnextContext().options;
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(4, _c22, scrollerOptions_r19.itemSize + "px"));
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !ctx_r2.emptyTemplate && !ctx_r2._emptyTemplate)("ngIfElse", ctx_r2.empty);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.emptyTemplate || ctx_r2._emptyTemplate);
} }
function AutoComplete_ng_template_9_ng_template_5_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "ul", 47, 11);
i0.ɵɵtemplate(2, AutoComplete_ng_template_9_ng_template_5_ng_template_2_Template, 2, 2, "ng-template", 48)(3, AutoComplete_ng_template_9_ng_template_5_li_3_Template, 3, 6, "li", 49);
i0.ɵɵelementEnd();
} if (rf & 2) {
const items_r21 = ctx.$implicit;
const scrollerOptions_r19 = ctx.options;
const ctx_r2 = i0.ɵɵnextContext(2);
i0.ɵɵstyleMap(scrollerOptions_r19.contentStyle);
i0.ɵɵproperty("ngClass", scrollerOptions_r19.contentStyleClass);
i0.ɵɵattribute("id", ctx_r2.id + "_list")("aria-label", ctx_r2.listLabel);
i0.ɵɵadvance(2);
i0.ɵɵproperty("ngForOf", items_r21);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", !items_r21 || items_r21 && items_r21.length === 0 && ctx_r2.showEmptyMessage);
} }
function AutoComplete_ng_template_9_ng_container_7_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function AutoComplete_ng_template_9_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "div", 42);
i0.ɵɵtemplate(1, AutoComplete_ng_template_9_ng_container_1_Template, 1, 0, "ng-container", 24);
i0.ɵɵelementStart(2, "div", 43);
i0.ɵɵtemplate(3, AutoComplete_ng_template_9_p_scroller_3_Template, 5, 10, "p-scroller", 44)(4, AutoComplete_ng_template_9_ng_container_4_Template, 2, 6, "ng-container", 15);
i0.ɵɵelementEnd();
i0.ɵɵtemplate(5, AutoComplete_ng_template_9_ng_template_5_Template, 4, 7, "ng-template", null, 8, i0.ɵɵtemplateRefExtractor)(7, AutoComplete_ng_template_9_ng_container_7_Template, 1, 0, "ng-container", 24);
i0.ɵɵelementEnd();
i0.ɵɵelementStart(8, "span", 45);
i0.ɵɵtext(9);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext();
i0.ɵɵclassMap(ctx_r2.panelStyleClass);
i0.ɵɵproperty("ngClass", ctx_r2.panelClass)("ngStyle", ctx_r2.panelStyle);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r2.headerTemplate || ctx_r2._headerTemplate);
i0.ɵɵadvance();
i0.ɵɵstyleProp("max-height", ctx_r2.virtualScroll ? "auto" : ctx_r2.scrollHeight);
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(2);
i0.ɵɵtextInterpolate1(" ", ctx_r2.selectedMessageText, " ");
} }
const AUTOCOMPLETE_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => AutoComplete),
multi: true
};
/**
* AutoComplete is an input component that provides real-time suggestions when being typed.
* @group Components
*/
class AutoComplete extends BaseComponent {
overlayService;
zone;
/**
* Minimum number of characters to initiate a search.
* @group Props
*/
minLength = 1;
/**
* Delay between keystrokes to wait before sending a query.
* @group Props
*/
delay = 300;
/**
* Inline style of the component.
* @group Props
*/
style;
/**
* Inline style of the overlay panel element.
* @group Props
*/
panelStyle;
/**
* Style class of the component.
* @group Props
*/
styleClass;
/**
* Style class of the overlay panel element.
* @group Props
*/
panelStyleClass;
/**
* Inline style of the input field.
* @group Props
*/
inputStyle;
/**
* Identifier of the focus input to match a label defined for the component.
* @group Props
*/
inputId;
/**
* Inline style of the input field.
* @group Props
*/
inputStyleClass;
/**
* Hint text for the input field.
* @group Props
*/
placeholder;
/**
* When present, it specifies that the input cannot be typed.
* @group Props
*/
readonly;
/**
* When present, it specifies that the component should be disabled.
* @group Props
*/
disabled;
/**
* Maximum height of the suggestions panel.
* @group Props
*/
scrollHeight = '200px';
/**
* Defines if data is loaded and interacted with in lazy manner.
* @group Props
*/
lazy = false;
/**
* Whether the data should be loaded on demand during scroll.
* @group Props
*/
virtualScroll;
/**
* Height of an item in the list for VirtualScrolling.
* @group Props
*/
virtualScrollItemSize;
/**
* Whether to use the scroller feature. The properties of scroller component can be used like an object in it.
* @group Props
*/
virtualScrollOptions;
/**
* Maximum number of character allows in the input field.
* @group Props
*/
maxlength;
/**
* Name of the input element.
* @group Props
*/
name;
/**
* When present, it specifies that an input field must be filled out before submitting the form.
* @group Props
*/
required;
/**
* Defines the size of the component.
* @group Props
*/
size;
/**
* 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;
/**
* When enabled, highlights the first item in the list by default.
* @group Props
*/
autoHighlight;
/**
* When present, autocomplete clears the manual input if it does not match of the suggestions to force only accepting values from the suggestions.
* @group Props
*/
forceSelection;
/**
* Type of the input, defaults to "text".
* @group Props
*/
type = 'text';
/**
* Whether to automatically manage layering.
* @group Props
*/
autoZIndex = true;
/**
* Base zIndex value to use in layering.
* @group Props
*/
baseZIndex = 0;
/**
* Defines a string that labels the input for accessibility.
* @group Props
*/
ariaLabel;
/**
* Defines a string that labels the dropdown button for accessibility.
* @group Props
*/
dropdownAriaLabel;
/**
* Specifies one or more IDs in the DOM that labels the input field.
* @group Props
*/
ariaLabelledBy;
/**
* Icon class of the dropdown icon.
* @group Props
*/
dropdownIcon;
/**
* Ensures uniqueness of selected items on multiple mode.
* @group Props
*/
unique = true;
/**
* Whether to display options as grouped when nested options are provided.
* @group Props
*/
group;
/**
* Whether to run a query when input receives focus.
* @group Props
*/
completeOnFocus = false;
/**
* When enabled, a clear icon is displayed to clear the value.
* @group Props
*/
showClear = false;
/**
* Field of a suggested object to resolve and display.
* @group Props
* @deprecated use optionLabel property instead
*/
field;
/**
* Displays a button next to the input field when enabled.
* @group Props
*/
dropdown;
/**
* Whether to show the empty message or not.
* @group Props
*/
showEmptyMessage = true;
/**
* Specifies the behavior dropdown button. Default "blank" mode sends an empty string and "current" mode sends the input value.
* @group Props
*/
dropdownMode = 'blank';
/**
* Specifies if multiple values can be selected.
* @group Props
*/
multiple;
/**
* Index of the element in ta