@po-ui/ng-components 16.5.0 → 16.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5334,6 +5334,7 @@ function PoListBoxComponent_ng_container_4_li_4_Template(rf, ctx) { if (rf & 1)
5334
5334
  } if (rf & 2) {
5335
5335
  const item_r19 = ctx.$implicit;
5336
5336
  const ctx_r15 = i0.ɵɵnextContext(2);
5337
+ i0.ɵɵclassProp("po-listbox-item", ctx_r15.visible);
5337
5338
  i0.ɵɵproperty("cdkOption", item_r19[ctx_r15.fieldLabel])("cdkOptionDisabled", ctx_r15.returnBooleanValue(item_r19, "disabled") || ctx_r15.returnBooleanValue(item_r19, "visible") === false || item_r19.options);
5338
5339
  i0.ɵɵattribute("aria-selected", ctx_r15.isSelectedItem(item_r19) || item_r19.selected);
5339
5340
  i0.ɵɵadvance(1);
@@ -5345,7 +5346,7 @@ function PoListBoxComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
5345
5346
  i0.ɵɵelementContainerStart(0);
5346
5347
  i0.ɵɵelementStart(1, "ul", 10, 11);
5347
5348
  i0.ɵɵtemplate(3, PoListBoxComponent_ng_container_4_li_3_Template, 2, 4, "li", 12);
5348
- i0.ɵɵtemplate(4, PoListBoxComponent_ng_container_4_li_4_Template, 3, 5, "li", 13);
5349
+ i0.ɵɵtemplate(4, PoListBoxComponent_ng_container_4_li_4_Template, 3, 7, "li", 13);
5349
5350
  i0.ɵɵelementEnd();
5350
5351
  i0.ɵɵelementContainerEnd();
5351
5352
  } if (rf & 2) {
@@ -5560,7 +5561,7 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
5560
5561
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.listbox = _t.first);
5561
5562
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.listboxItemList = _t.first);
5562
5563
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.searchElement = _t.first);
5563
- } }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c4$5, decls: 12, vars: 8, consts: [[1, "po-listbox", 3, "hidden"], ["listbox", ""], [3, "p-literals", "p-field-value", "p-placeholder", "p-change", 4, "ngIf"], [4, "ngIf", "ngIfElse"], ["class", "po-text-center", 4, "ngIf"], ["scrollLoadingTemplate", ""], ["defaultLoadingTemplate", ""], ["noDataTemplate", ""], [3, "p-literals", "p-field-value", "p-placeholder", "p-change"], ["searchElement", ""], ["cdkListbox", "", 1, "po-listbox-list", 3, "cdkListboxMultiple"], ["listboxItemList", ""], ["cdkOption", "selectAll", 3, "click", "keydown", 4, "ngIf"], ["class", "po-listbox-item", 3, "cdkOption", "cdkOptionDisabled", "click", "keydown", 4, "ngFor", "ngForOf"], ["cdkOption", "selectAll", 3, "click", "keydown"], ["p-type", "check", "p-value", "selectAll", 3, "p-selected", "p-label", "p-checkbox-value"], [1, "po-listbox-item", 3, "cdkOption", "cdkOptionDisabled", "click", "keydown"], ["class", "po-combo-item-title", 4, "ngIf"], [3, "p-disabled", "p-visible", "p-checkbox-value", "p-label", "p-value", "p-selected", "p-separator", "p-danger", "p-icon", "p-type", "p-item", "p-field-value", "p-field-label", "p-template", "p-template-context", "p-search-value", "p-filter-mode", "p-filtering", "p-should-mark-letter", "p-compare-cache", "p-combo-service", "p-selectcheckbox-item", "p-selectcombo-item", "p-select-item", 4, "ngIf"], [1, "po-combo-item-title"], [3, "p-disabled", "p-visible", "p-checkbox-value", "p-label", "p-value", "p-selected", "p-separator", "p-danger", "p-icon", "p-type", "p-item", "p-field-value", "p-field-label", "p-template", "p-template-context", "p-search-value", "p-filter-mode", "p-filtering", "p-should-mark-letter", "p-compare-cache", "p-combo-service", "p-selectcheckbox-item", "p-selectcombo-item", "p-select-item"], [1, "po-text-center"], [4, "ngIf", "ngIfThen", "ngIfElse"], [1, "po-listbox-container-loading-scroll"], [1, "po-listbox-container-loading-default"], ["class", "po-listbox-container-no-data po-text-center", 4, "ngIf"], [1, "po-listbox-container-no-data", "po-text-center"]], template: function PoListBoxComponent_Template(rf, ctx) { if (rf & 1) {
5564
+ } }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c4$5, decls: 12, vars: 8, consts: [[1, "po-listbox", 3, "hidden"], ["listbox", ""], [3, "p-literals", "p-field-value", "p-placeholder", "p-change", 4, "ngIf"], [4, "ngIf", "ngIfElse"], ["class", "po-text-center", 4, "ngIf"], ["scrollLoadingTemplate", ""], ["defaultLoadingTemplate", ""], ["noDataTemplate", ""], [3, "p-literals", "p-field-value", "p-placeholder", "p-change"], ["searchElement", ""], ["cdkListbox", "", 1, "po-listbox-list", 3, "cdkListboxMultiple"], ["listboxItemList", ""], ["cdkOption", "selectAll", 3, "click", "keydown", 4, "ngIf"], [3, "po-listbox-item", "cdkOption", "cdkOptionDisabled", "click", "keydown", 4, "ngFor", "ngForOf"], ["cdkOption", "selectAll", 3, "click", "keydown"], ["p-type", "check", "p-value", "selectAll", 3, "p-selected", "p-label", "p-checkbox-value"], [3, "cdkOption", "cdkOptionDisabled", "click", "keydown"], ["class", "po-combo-item-title", 4, "ngIf"], [3, "p-disabled", "p-visible", "p-checkbox-value", "p-label", "p-value", "p-selected", "p-separator", "p-danger", "p-icon", "p-type", "p-item", "p-field-value", "p-field-label", "p-template", "p-template-context", "p-search-value", "p-filter-mode", "p-filtering", "p-should-mark-letter", "p-compare-cache", "p-combo-service", "p-selectcheckbox-item", "p-selectcombo-item", "p-select-item", 4, "ngIf"], [1, "po-combo-item-title"], [3, "p-disabled", "p-visible", "p-checkbox-value", "p-label", "p-value", "p-selected", "p-separator", "p-danger", "p-icon", "p-type", "p-item", "p-field-value", "p-field-label", "p-template", "p-template-context", "p-search-value", "p-filter-mode", "p-filtering", "p-should-mark-letter", "p-compare-cache", "p-combo-service", "p-selectcheckbox-item", "p-selectcombo-item", "p-select-item"], [1, "po-text-center"], [4, "ngIf", "ngIfThen", "ngIfElse"], [1, "po-listbox-container-loading-scroll"], [1, "po-listbox-container-loading-default"], ["class", "po-listbox-container-no-data po-text-center", 4, "ngIf"], [1, "po-listbox-container-no-data", "po-text-center"]], template: function PoListBoxComponent_Template(rf, ctx) { if (rf & 1) {
5564
5565
  i0.ɵɵprojectionDef(_c3$c);
5565
5566
  i0.ɵɵelementStart(0, "div", 0, 1);
5566
5567
  i0.ɵɵprojection(2);
@@ -5586,7 +5587,7 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
5586
5587
  }
5587
5588
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoListBoxComponent, [{
5588
5589
  type: Component,
5589
- args: [{ selector: 'po-listbox', template: "<div\n #listbox\n class=\"po-listbox\"\n [class.po-listbox-check]=\"type === 'check' || type === 'option'\"\n [attr.data-type]=\"type\"\n [hidden]=\"visible\"\n>\n <ng-content select=\"[p-popup-header-template]\"></ng-content>\n\n <po-search-list\n #searchElement\n *ngIf=\"!hideSearch && type === 'check'\"\n (p-change)=\"callChangeSearch($event)\"\n [p-literals]=\"literalSearch\"\n [p-field-value]=\"fieldValueSearch\"\n [p-placeholder]=\"placeholderSearch\"\n ></po-search-list>\n\n <ng-container *ngIf=\"checkTemplate(); else noDataTemplate\">\n <ul #listboxItemList cdkListbox [cdkListboxMultiple]=\"type === 'check'\" class=\"po-listbox-list\">\n <li\n cdkOption=\"selectAll\"\n *ngIf=\"type === 'check' && items.length && !searchElement?.inputValue && !hideSelectAll\"\n [attr.aria-checked]=\"checkboxAllValue === null ? 'mixed' : checkboxAllValue\"\n (click)=\"changeAll.emit()\"\n (keydown)=\"changeAllEmit($event)\"\n >\n <po-item-list\n [p-selected]=\"checkboxAllValue\"\n p-type=\"check\"\n [p-label]=\"literals.selectAll\"\n p-value=\"selectAll\"\n [p-checkbox-value]=\"checkboxAllValue\"\n >\n </po-item-list>\n </li>\n <li\n class=\"po-listbox-item\"\n *ngFor=\"let item of items\"\n [cdkOption]=\"item[fieldLabel]\"\n [cdkOptionDisabled]=\"\n returnBooleanValue(item, 'disabled') || returnBooleanValue(item, 'visible') === false || item.options\n \"\n [attr.aria-selected]=\"isSelectedItem(item) || item.selected\"\n (click)=\"onSelectItem(item)\"\n (keydown)=\"onKeyDown(item, $event)\"\n >\n <label *ngIf=\"item.options\" class=\"po-combo-item-title\">\n {{ item.label }}\n </label>\n <po-item-list\n *ngIf=\"returnBooleanValue(item, 'visible') !== false && !item.options\"\n [p-disabled]=\"returnBooleanValue(item, 'disabled')\"\n [p-visible]=\"returnBooleanValue(item, 'visible')\"\n [p-checkbox-value]=\"isSelectedItem(item)\"\n [attr.data-item-list]=\"item | json\"\n [p-label]=\"item[fieldLabel]\"\n [p-value]=\"item[fieldValue]\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n [p-separator]=\"item.separator\"\n [p-danger]=\"item.danger || item.type === 'danger'\"\n [p-icon]=\"item.icon\"\n [p-type]=\"type\"\n [p-item]=\"item\"\n [p-field-value]=\"fieldValue\"\n [p-field-label]=\"fieldLabel\"\n [p-template]=\"template\"\n [p-template-context]=\"item\"\n (p-selectcheckbox-item)=\"checkboxClicked($event)\"\n (p-selectcombo-item)=\"optionClicked($event)\"\n (p-select-item)=\"onSelectCheckBoxItem(item)\"\n [p-search-value]=\"searchValue\"\n [p-filter-mode]=\"filterMode\"\n [p-filtering]=\"isFiltering\"\n [p-should-mark-letter]=\"shouldMarkLetters\"\n [p-compare-cache]=\"compareCache\"\n [p-combo-service]=\"comboService\"\n ></po-item-list>\n </li>\n </ul>\n </ng-container>\n\n <div *ngIf=\"isServerSearching && type !== 'action'\" class=\"po-text-center\">\n <ng-container *ngIf=\"infiniteLoading; then scrollLoadingTemplate; else defaultLoadingTemplate\"></ng-container>\n </div>\n\n <ng-template #scrollLoadingTemplate>\n <po-loading-overlay class=\"po-listbox-container-loading-scroll\"></po-loading-overlay>\n </ng-template>\n\n <ng-template #defaultLoadingTemplate>\n <po-loading class=\"po-listbox-container-loading-default\"></po-loading>\n </ng-template>\n\n <ng-template #noDataTemplate>\n <div\n *ngIf=\"!items.length && !isServerSearching && type !== 'action'\"\n class=\"po-listbox-container-no-data po-text-center\"\n >\n <span> {{ literals.noItems }}</span>\n </div>\n </ng-template>\n</div>\n" }]
5590
+ args: [{ selector: 'po-listbox', template: "<div\n #listbox\n class=\"po-listbox\"\n [class.po-listbox-check]=\"type === 'check' || type === 'option'\"\n [attr.data-type]=\"type\"\n [hidden]=\"visible\"\n>\n <ng-content select=\"[p-popup-header-template]\"></ng-content>\n\n <po-search-list\n #searchElement\n *ngIf=\"!hideSearch && type === 'check'\"\n (p-change)=\"callChangeSearch($event)\"\n [p-literals]=\"literalSearch\"\n [p-field-value]=\"fieldValueSearch\"\n [p-placeholder]=\"placeholderSearch\"\n ></po-search-list>\n\n <ng-container *ngIf=\"checkTemplate(); else noDataTemplate\">\n <ul #listboxItemList cdkListbox [cdkListboxMultiple]=\"type === 'check'\" class=\"po-listbox-list\">\n <li\n cdkOption=\"selectAll\"\n *ngIf=\"type === 'check' && items.length && !searchElement?.inputValue && !hideSelectAll\"\n [attr.aria-checked]=\"checkboxAllValue === null ? 'mixed' : checkboxAllValue\"\n (click)=\"changeAll.emit()\"\n (keydown)=\"changeAllEmit($event)\"\n >\n <po-item-list\n [p-selected]=\"checkboxAllValue\"\n p-type=\"check\"\n [p-label]=\"literals.selectAll\"\n p-value=\"selectAll\"\n [p-checkbox-value]=\"checkboxAllValue\"\n >\n </po-item-list>\n </li>\n <li\n [class.po-listbox-item]=\"visible\"\n *ngFor=\"let item of items\"\n [cdkOption]=\"item[fieldLabel]\"\n [cdkOptionDisabled]=\"\n returnBooleanValue(item, 'disabled') || returnBooleanValue(item, 'visible') === false || item.options\n \"\n [attr.aria-selected]=\"isSelectedItem(item) || item.selected\"\n (click)=\"onSelectItem(item)\"\n (keydown)=\"onKeyDown(item, $event)\"\n >\n <label *ngIf=\"item.options\" class=\"po-combo-item-title\">\n {{ item.label }}\n </label>\n <po-item-list\n *ngIf=\"returnBooleanValue(item, 'visible') !== false && !item.options\"\n [p-disabled]=\"returnBooleanValue(item, 'disabled')\"\n [p-visible]=\"returnBooleanValue(item, 'visible')\"\n [p-checkbox-value]=\"isSelectedItem(item)\"\n [attr.data-item-list]=\"item | json\"\n [p-label]=\"item[fieldLabel]\"\n [p-value]=\"item[fieldValue]\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n [p-separator]=\"item.separator\"\n [p-danger]=\"item.danger || item.type === 'danger'\"\n [p-icon]=\"item.icon\"\n [p-type]=\"type\"\n [p-item]=\"item\"\n [p-field-value]=\"fieldValue\"\n [p-field-label]=\"fieldLabel\"\n [p-template]=\"template\"\n [p-template-context]=\"item\"\n (p-selectcheckbox-item)=\"checkboxClicked($event)\"\n (p-selectcombo-item)=\"optionClicked($event)\"\n (p-select-item)=\"onSelectCheckBoxItem(item)\"\n [p-search-value]=\"searchValue\"\n [p-filter-mode]=\"filterMode\"\n [p-filtering]=\"isFiltering\"\n [p-should-mark-letter]=\"shouldMarkLetters\"\n [p-compare-cache]=\"compareCache\"\n [p-combo-service]=\"comboService\"\n ></po-item-list>\n </li>\n </ul>\n </ng-container>\n\n <div *ngIf=\"isServerSearching && type !== 'action'\" class=\"po-text-center\">\n <ng-container *ngIf=\"infiniteLoading; then scrollLoadingTemplate; else defaultLoadingTemplate\"></ng-container>\n </div>\n\n <ng-template #scrollLoadingTemplate>\n <po-loading-overlay class=\"po-listbox-container-loading-scroll\"></po-loading-overlay>\n </ng-template>\n\n <ng-template #defaultLoadingTemplate>\n <po-loading class=\"po-listbox-container-loading-default\"></po-loading>\n </ng-template>\n\n <ng-template #noDataTemplate>\n <div\n *ngIf=\"!items.length && !isServerSearching && type !== 'action'\"\n class=\"po-listbox-container-no-data po-text-center\"\n >\n <span> {{ literals.noItems }}</span>\n </div>\n </ng-template>\n</div>\n" }]
5590
5591
  }], function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: PoLanguageService }, { type: i2.Router }, { type: i0.ChangeDetectorRef }]; }, { listbox: [{
5591
5592
  type: ViewChild,
5592
5593
  args: ['listbox', { static: true }]
@@ -24133,19 +24134,23 @@ class PoComboOptionTemplateDirective {
24133
24134
  const poComboLiteralsDefault = {
24134
24135
  en: {
24135
24136
  noData: 'No data found',
24136
- chooseOption: 'Choose an option'
24137
+ chooseOption: 'Choose an option',
24138
+ clear: 'Clear'
24137
24139
  },
24138
24140
  es: {
24139
24141
  noData: 'Datos no encontrados',
24140
- chooseOption: 'Elija una opción'
24142
+ chooseOption: 'Elija una opción',
24143
+ clear: 'limpia'
24141
24144
  },
24142
24145
  pt: {
24143
24146
  noData: 'Nenhum dado encontrado',
24144
- chooseOption: 'Escolha uma opção'
24147
+ chooseOption: 'Escolha uma opção',
24148
+ clear: 'Apagar'
24145
24149
  },
24146
24150
  ru: {
24147
24151
  noData: 'Данные не найдены',
24148
- chooseOption: 'Выберите опцию'
24152
+ chooseOption: 'Выберите опцию',
24153
+ clear: 'чистый'
24149
24154
  }
24150
24155
  };
24151
24156
 
@@ -24910,6 +24915,9 @@ class PoComboBaseComponent {
24910
24915
  this.updateComboList();
24911
24916
  this.initInputObservable();
24912
24917
  this.updateHasNext();
24918
+ if (this.service || this.filterService) {
24919
+ this.keyupSubscribe.unsubscribe();
24920
+ }
24913
24921
  }
24914
24922
  configAfterSetFilterService(service) {
24915
24923
  if (service) {
@@ -25259,14 +25267,17 @@ function PoComboComponent_div_3_Template(rf, ctx) { if (rf & 1) {
25259
25267
  i0.ɵɵclassProp("po-field-icon-disabled", ctx_r1.disabled);
25260
25268
  i0.ɵɵproperty("p-icon", ctx_r1.icon);
25261
25269
  } }
25262
- function PoComboComponent_po_clean_7_Template(rf, ctx) { if (rf & 1) {
25270
+ function PoComboComponent_div_7_Template(rf, ctx) { if (rf & 1) {
25263
25271
  const _r13 = i0.ɵɵgetCurrentView();
25264
- i0.ɵɵelementStart(0, "po-clean", 17);
25265
- i0.ɵɵlistener("p-change-event", function PoComboComponent_po_clean_7_Template_po_clean_p_change_event_0_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r12 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r12.clear($event)); });
25272
+ i0.ɵɵelementStart(0, "div", 17);
25273
+ i0.ɵɵlistener("click", function PoComboComponent_div_7_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r12 = i0.ɵɵnextContext(); ctx_r12.clear(null); return i0.ɵɵresetView($event.preventDefault()); })("keydown.enter", function PoComboComponent_div_7_Template_div_keydown_enter_0_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r14 = i0.ɵɵnextContext(); ctx_r14.clearAndFocus(); return i0.ɵɵresetView($event.preventDefault()); });
25274
+ i0.ɵɵelement(1, "span", 18);
25266
25275
  i0.ɵɵelementEnd();
25267
25276
  } if (rf & 2) {
25268
25277
  const ctx_r3 = i0.ɵɵnextContext();
25269
- i0.ɵɵproperty("p-element-ref", ctx_r3.inputEl);
25278
+ i0.ɵɵattribute("aria-label", ctx_r3.literals.clean);
25279
+ i0.ɵɵadvance(1);
25280
+ i0.ɵɵclassProp("po-border-focused", !ctx_r3.disabled && ctx_r3.comboOpen);
25270
25281
  } }
25271
25282
  function PoComboComponent_ng_container_10_Template(rf, ctx) { if (rf & 1) {
25272
25283
  i0.ɵɵelementContainer(0);
@@ -25275,7 +25286,7 @@ function PoComboComponent_ng_template_11_ng_container_0_Template(rf, ctx) { if (
25275
25286
  i0.ɵɵelementContainer(0);
25276
25287
  } }
25277
25288
  function PoComboComponent_ng_template_11_Template(rf, ctx) { if (rf & 1) {
25278
- i0.ɵɵtemplate(0, PoComboComponent_ng_template_11_ng_container_0_Template, 1, 0, "ng-container", 18);
25289
+ i0.ɵɵtemplate(0, PoComboComponent_ng_template_11_ng_container_0_Template, 1, 0, "ng-container", 19);
25279
25290
  } if (rf & 2) {
25280
25291
  i0.ɵɵnextContext();
25281
25292
  const _r10 = i0.ɵɵreference(17);
@@ -25285,23 +25296,23 @@ function PoComboComponent_ng_template_13_ng_template_0_ng_container_0_Template(r
25285
25296
  i0.ɵɵelementContainer(0);
25286
25297
  } }
25287
25298
  function PoComboComponent_ng_template_13_ng_template_0_Template(rf, ctx) { if (rf & 1) {
25288
- i0.ɵɵtemplate(0, PoComboComponent_ng_template_13_ng_template_0_ng_container_0_Template, 1, 0, "ng-container", 18);
25299
+ i0.ɵɵtemplate(0, PoComboComponent_ng_template_13_ng_template_0_ng_container_0_Template, 1, 0, "ng-container", 19);
25289
25300
  } if (rf & 2) {
25290
25301
  i0.ɵɵnextContext(2);
25291
25302
  const _r10 = i0.ɵɵreference(17);
25292
25303
  i0.ɵɵproperty("ngTemplateOutlet", _r10);
25293
25304
  } }
25294
25305
  function PoComboComponent_ng_template_13_Template(rf, ctx) { if (rf & 1) {
25295
- i0.ɵɵtemplate(0, PoComboComponent_ng_template_13_ng_template_0_Template, 1, 1, "ng-template", 19);
25306
+ i0.ɵɵtemplate(0, PoComboComponent_ng_template_13_ng_template_0_Template, 1, 1, "ng-template", 20);
25296
25307
  } if (rf & 2) {
25297
25308
  i0.ɵɵnextContext();
25298
25309
  const _r0 = i0.ɵɵreference(2);
25299
25310
  i0.ɵɵproperty("cdkConnectedOverlayOrigin", _r0)("cdkConnectedOverlayOpen", true);
25300
25311
  } }
25301
25312
  function PoComboComponent_ng_template_16_Template(rf, ctx) { if (rf & 1) {
25302
- const _r21 = i0.ɵɵgetCurrentView();
25303
- i0.ɵɵelementStart(0, "div", 20, 21)(2, "po-listbox", 22, 23);
25304
- i0.ɵɵlistener("p-selectcombo-item", function PoComboComponent_ng_template_16_Template_po_listbox_p_selectcombo_item_2_listener($event) { i0.ɵɵrestoreView(_r21); const ctx_r20 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r20.onOptionClick($event, $event.event)); })("p-update-infinite-scroll", function PoComboComponent_ng_template_16_Template_po_listbox_p_update_infinite_scroll_2_listener() { i0.ɵɵrestoreView(_r21); const ctx_r22 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r22.showMoreInfiniteScroll()); })("p-close", function PoComboComponent_ng_template_16_Template_po_listbox_p_close_2_listener() { i0.ɵɵrestoreView(_r21); const ctx_r23 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r23.onCloseCombo()); });
25313
+ const _r22 = i0.ɵɵgetCurrentView();
25314
+ i0.ɵɵelementStart(0, "div", 21, 22)(2, "po-listbox", 23, 24);
25315
+ i0.ɵɵlistener("p-selectcombo-item", function PoComboComponent_ng_template_16_Template_po_listbox_p_selectcombo_item_2_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r21 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r21.onOptionClick($event, $event.event)); })("p-update-infinite-scroll", function PoComboComponent_ng_template_16_Template_po_listbox_p_update_infinite_scroll_2_listener() { i0.ɵɵrestoreView(_r22); const ctx_r23 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r23.showMoreInfiniteScroll()); })("p-close", function PoComboComponent_ng_template_16_Template_po_listbox_p_close_2_listener() { i0.ɵɵrestoreView(_r22); const ctx_r24 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r24.onCloseCombo()); });
25305
25316
  i0.ɵɵelementEnd()();
25306
25317
  } if (rf & 2) {
25307
25318
  const ctx_r11 = i0.ɵɵnextContext();
@@ -25384,6 +25395,7 @@ class PoComboComponent extends PoComboBaseComponent {
25384
25395
  shouldMarkLetters = true;
25385
25396
  infiniteLoading = false;
25386
25397
  _isServerSearching = false;
25398
+ lastKey;
25387
25399
  clickoutListener;
25388
25400
  eventResizeListener;
25389
25401
  filterSubscription;
@@ -25474,8 +25486,8 @@ class PoComboComponent extends PoComboBaseComponent {
25474
25486
  }
25475
25487
  if (key === PoKeyCodeEnum.arrowDown) {
25476
25488
  event.preventDefault();
25477
- if (!this.service) {
25478
- this.poListbox?.setFocus();
25489
+ if (this.visibleOptions.length) {
25490
+ this.focusItem();
25479
25491
  }
25480
25492
  this.controlComboVisibility(true);
25481
25493
  this.isFiltering = this.changeOnEnter ? this.isFiltering : false;
@@ -25495,11 +25507,28 @@ class PoComboComponent extends PoComboBaseComponent {
25495
25507
  if (key === PoKeyCodeEnum.enter) {
25496
25508
  this.controlComboVisibility(true);
25497
25509
  }
25510
+ if (key === PoKeyCodeEnum.esc) {
25511
+ if (key === this.lastKey) {
25512
+ this.lastKey = '';
25513
+ if (this.selectedValue) {
25514
+ this.clearAndFocus();
25515
+ }
25516
+ return;
25517
+ }
25518
+ else {
25519
+ this.onCloseCombo();
25520
+ }
25521
+ }
25522
+ this.lastKey = event.keyCode;
25498
25523
  }
25499
25524
  onKeyUp(event) {
25500
25525
  const key = event.keyCode || event.which;
25501
25526
  const inputValue = event.target.value;
25502
- const isValidKey = key !== PoKeyCodeEnum.arrowUp && key !== PoKeyCodeEnum.arrowDown && key !== PoKeyCodeEnum.enter;
25527
+ const isValidKey = key !== PoKeyCodeEnum.arrowUp &&
25528
+ key !== PoKeyCodeEnum.arrowDown &&
25529
+ key !== PoKeyCodeEnum.enter &&
25530
+ key !== PoKeyCodeEnum.esc &&
25531
+ key !== PoKeyCodeEnum.tab;
25503
25532
  if (isValidKey) {
25504
25533
  if (inputValue) {
25505
25534
  if (!this.service && this.previousSearchValue !== inputValue) {
@@ -25542,24 +25571,29 @@ class PoComboComponent extends PoComboBaseComponent {
25542
25571
  });
25543
25572
  }
25544
25573
  }
25545
- controlApplyFilter(value) {
25574
+ controlApplyFilter(value, isArrowDown) {
25546
25575
  if ((!this.isProcessingValueByTab && (!this.selectedOption || value !== this.selectedOption[this.dynamicLabel])) ||
25547
25576
  !this.cache) {
25548
25577
  this.defaultService.hasNext = true;
25549
25578
  this.page = this.setPage();
25550
25579
  this.options = [];
25551
- this.applyFilter(value, true);
25580
+ this.applyFilter(value, true, isArrowDown);
25552
25581
  }
25553
25582
  this.isProcessingValueByTab = false;
25554
25583
  }
25555
- applyFilter(value, reset = false) {
25584
+ applyFilter(value, reset = false, isArrowDown) {
25556
25585
  if (this.defaultService.hasNext) {
25557
25586
  this.controlComboVisibility(false, reset);
25558
25587
  this.isServerSearching = true;
25559
25588
  const param = this.infiniteScroll
25560
25589
  ? { property: this.fieldLabel, value, page: this.page, pageSize: this.pageSize }
25561
25590
  : { property: this.fieldLabel, value };
25562
- this.filterSubscription = this.service.getFilteredData(param, this.filterParams).subscribe(items => this.setOptionsByApplyFilter(value, items, reset), error => this.onErrorFilteredData());
25591
+ this.filterSubscription = this.service.getFilteredData(param, this.filterParams).subscribe(items => {
25592
+ this.setOptionsByApplyFilter(value, items, reset);
25593
+ if (isArrowDown) {
25594
+ this.focusItem();
25595
+ }
25596
+ }, error => this.onErrorFilteredData());
25563
25597
  }
25564
25598
  }
25565
25599
  setOptionsByApplyFilter(value, items, reset = false) {
@@ -25593,14 +25627,14 @@ class PoComboComponent extends PoComboBaseComponent {
25593
25627
  this.isProcessingValueByTab = false;
25594
25628
  }, this.debounceTime);
25595
25629
  }
25596
- toggleComboVisibility() {
25630
+ toggleComboVisibility(isButton) {
25597
25631
  if (this.disabled) {
25598
25632
  return;
25599
25633
  }
25600
25634
  if (this.service && !this.disabledInitFilter) {
25601
25635
  this.applyFilterInFirstClick();
25602
25636
  }
25603
- this.controlComboVisibility(!this.comboOpen);
25637
+ this.controlComboVisibility(!this.comboOpen, false, isButton);
25604
25638
  }
25605
25639
  applyFilterInFirstClick() {
25606
25640
  if (this.isFirstFilter && !this.selectedValue) {
@@ -25609,8 +25643,8 @@ class PoComboComponent extends PoComboBaseComponent {
25609
25643
  this.applyFilter('', scrollingControl);
25610
25644
  }
25611
25645
  }
25612
- controlComboVisibility(toOpen, reset = false) {
25613
- toOpen ? this.open(reset) : this.close(reset);
25646
+ controlComboVisibility(toOpen, reset = false, isButton) {
25647
+ toOpen ? this.open(reset, isButton) : this.close(reset);
25614
25648
  }
25615
25649
  onCloseCombo() {
25616
25650
  this.controlComboVisibility(false);
@@ -25629,6 +25663,7 @@ class PoComboComponent extends PoComboBaseComponent {
25629
25663
  this.updateComboList([...this.cacheStaticOptions]);
25630
25664
  }
25631
25665
  this.previousSearchValue = this.selectedView[this.dynamicLabel];
25666
+ this.inputEl.nativeElement.focus();
25632
25667
  }
25633
25668
  calculateScrollTop(selectedItem, index) {
25634
25669
  if (!selectedItem.length || index <= 1) {
@@ -25676,9 +25711,12 @@ class PoComboComponent extends PoComboBaseComponent {
25676
25711
  keyCode !== 40 && // seta
25677
25712
  keyCode !== 93); // windows menu
25678
25713
  }
25679
- searchOnEnter(value) {
25680
- if (this.service && !this.selectedView && value.length >= this.filterMinlength) {
25681
- this.controlApplyFilter(value);
25714
+ searchOnEnterOrArrow(event, value) {
25715
+ if ((event.key === 'ArrowDown' || event.key === 'Enter') &&
25716
+ this.service &&
25717
+ !this.selectedView &&
25718
+ value.length >= this.filterMinlength) {
25719
+ this.controlApplyFilter(value, event.key === 'ArrowDown');
25682
25720
  }
25683
25721
  }
25684
25722
  showMoreInfiniteScroll() {
@@ -25688,6 +25726,10 @@ class PoComboComponent extends PoComboBaseComponent {
25688
25726
  this.page++;
25689
25727
  this.applyFilter('', true);
25690
25728
  }
25729
+ clearAndFocus() {
25730
+ this.clear(null);
25731
+ this.inputEl.nativeElement.focus();
25732
+ }
25691
25733
  adjustContainerPosition() {
25692
25734
  this.controlPosition.adjustPosition(poComboContainerPositionDefault);
25693
25735
  }
@@ -25706,6 +25748,7 @@ class PoComboComponent extends PoComboBaseComponent {
25706
25748
  this.comboIcon = 'po-icon-arrow-down';
25707
25749
  this.removeListeners();
25708
25750
  this.isFiltering = false;
25751
+ this.renderer.removeClass(this.inputEl.nativeElement, 'po-combo-input-focus');
25709
25752
  }
25710
25753
  initializeListeners() {
25711
25754
  this.removeListeners();
@@ -25729,7 +25772,7 @@ class PoComboComponent extends PoComboBaseComponent {
25729
25772
  this.updateComboList([]);
25730
25773
  this.controlComboVisibility(true);
25731
25774
  }
25732
- open(reset) {
25775
+ open(reset, isButton) {
25733
25776
  this.comboOpen = true;
25734
25777
  if (!reset && this.infiniteScroll) {
25735
25778
  if (!this.getInputValue()) {
@@ -25740,7 +25783,9 @@ class PoComboComponent extends PoComboBaseComponent {
25740
25783
  this.changeDetector.detectChanges();
25741
25784
  this.comboIcon = 'po-icon-arrow-up';
25742
25785
  this.initializeListeners();
25743
- this.inputEl.nativeElement.focus();
25786
+ isButton
25787
+ ? this.renderer.addClass(this.inputEl.nativeElement, 'po-combo-input-focus')
25788
+ : this.inputEl.nativeElement.focus();
25744
25789
  this.setContainerPosition();
25745
25790
  }
25746
25791
  removeListeners() {
@@ -25768,6 +25813,20 @@ class PoComboComponent extends PoComboBaseComponent {
25768
25813
  setScrollingControl() {
25769
25814
  return this.infiniteScroll ? true : false;
25770
25815
  }
25816
+ focusItem() {
25817
+ this.poListbox?.listboxItemList?.nativeElement.focus();
25818
+ setTimeout(() => {
25819
+ let item;
25820
+ if (this.selectedValue) {
25821
+ item = document.querySelector('.po-listbox-item[aria-selected="true"]');
25822
+ }
25823
+ else {
25824
+ item = document.querySelectorAll('.po-listbox-item')[0];
25825
+ }
25826
+ this.poListbox?.listboxItemList?.nativeElement.focus();
25827
+ item?.focus();
25828
+ });
25829
+ }
25771
25830
  static ɵfac = function PoComboComponent_Factory(t) { return new (t || PoComboComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.IterableDiffers), i0.ɵɵdirectiveInject(PoComboFilterService), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PoControlPositionService), i0.ɵɵdirectiveInject(PoLanguageService)); };
25772
25831
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PoComboComponent, selectors: [["po-combo"]], contentQueries: function PoComboComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
25773
25832
  i0.ɵɵcontentQuery(dirIndex, PoComboOptionTemplateDirective, 7);
@@ -25800,16 +25859,16 @@ class PoComboComponent extends PoComboBaseComponent {
25800
25859
  useExisting: forwardRef(() => PoComboComponent),
25801
25860
  multi: true
25802
25861
  }
25803
- ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 18, vars: 28, consts: [[3, "p-disabled", "p-id", "p-label", "p-optional", "p-required", "p-show-required"], ["cdkOverlayOrigin", "", 1, "po-field-container-content"], ["trigger", "cdkOverlayOrigin"], ["class", "po-field-icon-container-left", 4, "ngIf"], ["autocomplete", "off", "type", "text", 1, "po-input", "po-combo-input", 3, "ngClass", "disabled", "id", "placeholder", "required", "click", "keyup", "blur", "keyup.enter", "keydown"], ["inp", ""], [1, "po-field-icon-container-right"], ["class", "po-icon-input", 3, "p-element-ref", "p-change-event", 4, "ngIf"], [3, "click"], ["iconArrow", ""], [4, "ngIf", "ngIfThen", "ngIfElse"], ["dropdownDefault", ""], ["dropdownCDK", ""], [3, "p-help", "p-disabled"], ["dropdownListbox", ""], [1, "po-field-icon-container-left"], [1, "po-field-icon", "po-icon-input", 3, "p-icon"], [1, "po-icon-input", 3, "p-element-ref", "p-change-event"], [4, "ngTemplateOutlet"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen"], [1, "po-combo-container", 3, "hidden"], ["containerElement", ""], ["p-type", "option", 3, "p-items", "p-field-value", "p-field-label", "p-template", "p-search-value", "p-infinite-loading", "p-infinite-scroll", "p-filtering", "p-cache", "p-filter-mode", "p-visible", "p-is-searching", "p-should-mark-letter", "p-compare-cache", "p-combo-service", "p-infinite-scroll-distance", "p-selectcombo-item", "p-update-infinite-scroll", "p-close"], ["poListbox", "", "contentElement", ""]], template: function PoComboComponent_Template(rf, ctx) { if (rf & 1) {
25862
+ ]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 18, vars: 33, consts: [[3, "p-disabled", "p-id", "p-label", "p-optional", "p-required", "p-show-required"], ["cdkOverlayOrigin", "", 1, "po-field-container-content", "po-combo-container-content"], ["trigger", "cdkOverlayOrigin"], ["class", "po-field-icon-container-left", 4, "ngIf"], ["autocomplete", "off", "type", "text", 1, "po-combo-input", 3, "ngClass", "disabled", "id", "placeholder", "required", "click", "keyup", "blur", "keydown"], ["inp", ""], [1, "po-field-icon-container-right"], ["tabindex", "0", "role", "button", "class", "po-combo-clean", 3, "click", "keydown.enter", 4, "ngIf"], [1, "po-icon", "po-field-icon", "po-icon-input", 3, "click"], ["iconArrow", ""], [4, "ngIf", "ngIfThen", "ngIfElse"], ["dropdownDefault", ""], ["dropdownCDK", ""], [3, "p-help", "p-disabled"], ["dropdownListbox", ""], [1, "po-field-icon-container-left"], [1, "po-field-icon", "po-icon-input", 3, "p-icon"], ["tabindex", "0", "role", "button", 1, "po-combo-clean", 3, "click", "keydown.enter"], [1, "po-icon", "po-field-icon", "po-icon-clear-content"], [4, "ngTemplateOutlet"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen"], [1, "po-combo-container", 3, "hidden"], ["containerElement", ""], ["p-type", "option", 3, "p-items", "p-field-value", "p-field-label", "p-template", "p-search-value", "p-infinite-loading", "p-infinite-scroll", "p-filtering", "p-cache", "p-filter-mode", "p-visible", "p-is-searching", "p-should-mark-letter", "p-compare-cache", "p-combo-service", "p-infinite-scroll-distance", "p-selectcombo-item", "p-update-infinite-scroll", "p-close"], ["poListbox", "", "contentElement", ""]], template: function PoComboComponent_Template(rf, ctx) { if (rf & 1) {
25804
25863
  i0.ɵɵelementStart(0, "po-field-container", 0)(1, "div", 1, 2);
25805
25864
  i0.ɵɵtemplate(3, PoComboComponent_div_3_Template, 2, 3, "div", 3);
25806
25865
  i0.ɵɵelementStart(4, "input", 4, 5);
25807
- i0.ɵɵlistener("click", function PoComboComponent_Template_input_click_4_listener() { return ctx.toggleComboVisibility(); })("keyup", function PoComboComponent_Template_input_keyup_4_listener($event) { return ctx.onKeyUp($event); })("blur", function PoComboComponent_Template_input_blur_4_listener() { return ctx.onBlur(); })("keyup.enter", function PoComboComponent_Template_input_keyup_enter_4_listener($event) { return ctx.searchOnEnter($event.target.value); })("keydown", function PoComboComponent_Template_input_keydown_4_listener($event) { return ctx.onKeyDown($event); });
25866
+ i0.ɵɵlistener("click", function PoComboComponent_Template_input_click_4_listener() { return ctx.toggleComboVisibility(); })("keyup", function PoComboComponent_Template_input_keyup_4_listener($event) { return ctx.onKeyUp($event); })("blur", function PoComboComponent_Template_input_blur_4_listener() { return ctx.onBlur(); })("keyup", function PoComboComponent_Template_input_keyup_4_listener($event) { return ctx.searchOnEnterOrArrow($event, $event.target.value); })("keydown", function PoComboComponent_Template_input_keydown_4_listener($event) { return ctx.onKeyDown($event); });
25808
25867
  i0.ɵɵelementEnd();
25809
25868
  i0.ɵɵelementStart(6, "div", 6);
25810
- i0.ɵɵtemplate(7, PoComboComponent_po_clean_7_Template, 1, 1, "po-clean", 7);
25869
+ i0.ɵɵtemplate(7, PoComboComponent_div_7_Template, 2, 3, "div", 7);
25811
25870
  i0.ɵɵelementStart(8, "span", 8, 9);
25812
- i0.ɵɵlistener("click", function PoComboComponent_Template_span_click_8_listener() { return ctx.toggleComboVisibility(); });
25871
+ i0.ɵɵlistener("click", function PoComboComponent_Template_span_click_8_listener() { return ctx.toggleComboVisibility(true); });
25813
25872
  i0.ɵɵelementEnd()()();
25814
25873
  i0.ɵɵtemplate(10, PoComboComponent_ng_container_10_Template, 1, 0, "ng-container", 10);
25815
25874
  i0.ɵɵtemplate(11, PoComboComponent_ng_template_11_Template, 1, 1, "ng-template", null, 11, i0.ɵɵtemplateRefExtractor);
@@ -25829,15 +25888,14 @@ class PoComboComponent extends PoComboBaseComponent {
25829
25888
  i0.ɵɵproperty("ngClass", ctx.clean && _r2.value ? "po-input-double-icon-right" : "po-input-icon-right")("disabled", ctx.disabled)("id", ctx.id)("placeholder", ctx.disabled ? "" : ctx.placeholder)("required", ctx.required);
25830
25889
  i0.ɵɵattribute("name", ctx.name);
25831
25890
  i0.ɵɵadvance(3);
25832
- i0.ɵɵproperty("ngIf", ctx.clean && !ctx.disabled);
25891
+ i0.ɵɵproperty("ngIf", ctx.clean && !ctx.disabled && _r2.value);
25833
25892
  i0.ɵɵadvance(1);
25834
- i0.ɵɵclassMapInterpolate1("po-icon po-field-icon ", ctx.comboIcon, " po-icon-input");
25835
- i0.ɵɵclassProp("po-field-icon-disabled", ctx.disabled)("po-field-icon", !ctx.disabled);
25893
+ i0.ɵɵclassProp("po-field-icon-disabled", ctx.disabled)("po-icon-arrow-up", ctx.comboOpen)("po-icon-arrow-down", !ctx.comboOpen)("po-field-icon", !ctx.disabled)("po-combo-default-border", !ctx.disabled && _r2.value)("po-combo-background-arrow-up", !ctx.disabled && ctx.comboOpen);
25836
25894
  i0.ɵɵadvance(2);
25837
25895
  i0.ɵɵproperty("ngIf", ctx.appendBox)("ngIfThen", _r8)("ngIfElse", _r6);
25838
25896
  i0.ɵɵadvance(5);
25839
25897
  i0.ɵɵproperty("p-help", ctx.help)("p-disabled", ctx.disabled);
25840
- } }, dependencies: [i1.NgClass, i1.NgIf, i1.NgTemplateOutlet, i5.CdkConnectedOverlay, i5.CdkOverlayOrigin, PoCleanComponent, PoFieldContainerBottomComponent, PoFieldContainerComponent, PoIconComponent, PoListBoxComponent], encapsulation: 2, changeDetection: 0 });
25898
+ } }, dependencies: [i1.NgClass, i1.NgIf, i1.NgTemplateOutlet, i5.CdkConnectedOverlay, i5.CdkOverlayOrigin, PoFieldContainerBottomComponent, PoFieldContainerComponent, PoIconComponent, PoListBoxComponent], encapsulation: 2, changeDetection: 0 });
25841
25899
  }
25842
25900
  (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PoComboComponent, [{
25843
25901
  type: Component,
@@ -25854,7 +25912,7 @@ class PoComboComponent extends PoComboBaseComponent {
25854
25912
  useExisting: forwardRef(() => PoComboComponent),
25855
25913
  multi: true
25856
25914
  }
25857
- ], template: "<po-field-container\n [p-disabled]=\"disabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n>\n <div cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\" class=\"po-field-container-content\">\n <div *ngIf=\"icon\" class=\"po-field-icon-container-left\">\n <po-icon class=\"po-field-icon po-icon-input\" [class.po-field-icon-disabled]=\"disabled\" [p-icon]=\"icon\"></po-icon>\n </div>\n\n <input\n #inp\n class=\"po-input po-combo-input\"\n [ngClass]=\"clean && inp.value ? 'po-input-double-icon-right' : 'po-input-icon-right'\"\n [class.po-input-icon-left]=\"icon\"\n autocomplete=\"off\"\n type=\"text\"\n [attr.name]=\"name\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [placeholder]=\"disabled ? '' : placeholder\"\n [required]=\"required\"\n (click)=\"toggleComboVisibility()\"\n (keyup)=\"onKeyUp($event)\"\n (blur)=\"onBlur()\"\n (keyup.enter)=\"searchOnEnter($event.target.value)\"\n (keydown)=\"onKeyDown($event)\"\n />\n\n <div class=\"po-field-icon-container-right\">\n <po-clean\n class=\"po-icon-input\"\n *ngIf=\"clean && !disabled\"\n (p-change-event)=\"clear($event)\"\n [p-element-ref]=\"inputEl\"\n >\n </po-clean>\n <span\n #iconArrow\n class=\"po-icon po-field-icon {{ comboIcon }} po-icon-input\"\n [class.po-field-icon-disabled]=\"disabled\"\n [class.po-field-icon]=\"!disabled\"\n (click)=\"toggleComboVisibility()\"\n >\n </span>\n </div>\n </div>\n\n <ng-container *ngIf=\"appendBox; then dropdownCDK; else dropdownDefault\"> </ng-container>\n\n <ng-template #dropdownDefault>\n <ng-container *ngTemplateOutlet=\"dropdownListbox\"> </ng-container>\n </ng-template>\n\n <ng-template #dropdownCDK>\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"trigger\" [cdkConnectedOverlayOpen]=\"true\">\n <ng-container *ngTemplateOutlet=\"dropdownListbox\"></ng-container>\n </ng-template>\n </ng-template>\n\n <po-field-container-bottom [p-help]=\"help\" [p-disabled]=\"disabled\"></po-field-container-bottom>\n</po-field-container>\n\n<ng-template #dropdownListbox>\n <div #containerElement class=\"po-combo-container\" [hidden]=\"!comboOpen && !isServerSearching\">\n <po-listbox\n #poListbox\n #contentElement\n p-type=\"option\"\n [p-items]=\"visibleOptions\"\n [p-field-value]=\"dynamicValue\"\n [p-field-label]=\"dynamicLabel\"\n [p-template]=\"comboOptionTemplate\"\n [p-search-value]=\"getInputValue()\"\n [p-infinite-loading]=\"infiniteLoading\"\n [p-infinite-scroll]=\"infiniteScroll\"\n [p-filtering]=\"isFiltering\"\n [p-cache]=\"cache\"\n (p-selectcombo-item)=\"onOptionClick($event, $event.event)\"\n [p-filter-mode]=\"filterMode\"\n [p-visible]=\"comboOpen\"\n [p-is-searching]=\"isServerSearching\"\n [p-should-mark-letter]=\"shouldMarkLetters\"\n [p-compare-cache]=\"compareObjects(cacheOptions, visibleOptions)\"\n [p-combo-service]=\"service\"\n [p-infinite-scroll-distance]=\"infiniteScrollDistance\"\n (p-update-infinite-scroll)=\"showMoreInfiniteScroll()\"\n (p-close)=\"onCloseCombo()\"\n ></po-listbox>\n </div>\n</ng-template>\n" }]
25915
+ ], template: "<po-field-container\n [p-disabled]=\"disabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n>\n <div cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\" class=\"po-field-container-content po-combo-container-content\">\n <div *ngIf=\"icon\" class=\"po-field-icon-container-left\">\n <po-icon class=\"po-field-icon po-icon-input\" [class.po-field-icon-disabled]=\"disabled\" [p-icon]=\"icon\"></po-icon>\n </div>\n\n <input\n #inp\n class=\"po-combo-input\"\n [ngClass]=\"clean && inp.value ? 'po-input-double-icon-right' : 'po-input-icon-right'\"\n [class.po-input-icon-left]=\"icon\"\n autocomplete=\"off\"\n type=\"text\"\n [attr.name]=\"name\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [placeholder]=\"disabled ? '' : placeholder\"\n [required]=\"required\"\n (click)=\"toggleComboVisibility()\"\n (keyup)=\"onKeyUp($event)\"\n (blur)=\"onBlur()\"\n (keyup)=\"searchOnEnterOrArrow($event, $event.target.value)\"\n (keydown)=\"onKeyDown($event)\"\n />\n\n <div class=\"po-field-icon-container-right\">\n <div\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"literals.clean\"\n *ngIf=\"clean && !disabled && inp.value\"\n class=\"po-combo-clean\"\n (click)=\"clear(null); $event.preventDefault()\"\n (keydown.enter)=\"clearAndFocus(); $event.preventDefault()\"\n >\n <span\n [class.po-border-focused]=\"!disabled && comboOpen\"\n class=\"po-icon po-field-icon po-icon-clear-content\"\n ></span>\n </div>\n <span\n #iconArrow\n class=\"po-icon po-field-icon po-icon-input\"\n [class.po-field-icon-disabled]=\"disabled\"\n [class.po-icon-arrow-up]=\"comboOpen\"\n [class.po-icon-arrow-down]=\"!comboOpen\"\n [class.po-field-icon]=\"!disabled\"\n [class.po-combo-default-border]=\"!disabled && inp.value\"\n [class.po-combo-background-arrow-up]=\"!disabled && comboOpen\"\n (click)=\"toggleComboVisibility(true)\"\n >\n </span>\n </div>\n </div>\n\n <ng-container *ngIf=\"appendBox; then dropdownCDK; else dropdownDefault\"> </ng-container>\n\n <ng-template #dropdownDefault>\n <ng-container *ngTemplateOutlet=\"dropdownListbox\"> </ng-container>\n </ng-template>\n\n <ng-template #dropdownCDK>\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"trigger\" [cdkConnectedOverlayOpen]=\"true\">\n <ng-container *ngTemplateOutlet=\"dropdownListbox\"></ng-container>\n </ng-template>\n </ng-template>\n\n <po-field-container-bottom [p-help]=\"help\" [p-disabled]=\"disabled\"></po-field-container-bottom>\n</po-field-container>\n\n<ng-template #dropdownListbox>\n <div #containerElement class=\"po-combo-container\" [hidden]=\"!comboOpen && !isServerSearching\">\n <po-listbox\n #poListbox\n #contentElement\n p-type=\"option\"\n [p-items]=\"visibleOptions\"\n [p-field-value]=\"dynamicValue\"\n [p-field-label]=\"dynamicLabel\"\n [p-template]=\"comboOptionTemplate\"\n [p-search-value]=\"getInputValue()\"\n [p-infinite-loading]=\"infiniteLoading\"\n [p-infinite-scroll]=\"infiniteScroll\"\n [p-filtering]=\"isFiltering\"\n [p-cache]=\"cache\"\n (p-selectcombo-item)=\"onOptionClick($event, $event.event)\"\n [p-filter-mode]=\"filterMode\"\n [p-visible]=\"comboOpen\"\n [p-is-searching]=\"isServerSearching\"\n [p-should-mark-letter]=\"shouldMarkLetters\"\n [p-compare-cache]=\"compareObjects(cacheOptions, visibleOptions)\"\n [p-combo-service]=\"service\"\n [p-infinite-scroll-distance]=\"infiniteScrollDistance\"\n (p-update-infinite-scroll)=\"showMoreInfiniteScroll()\"\n (p-close)=\"onCloseCombo()\"\n ></po-listbox>\n </div>\n</ng-template>\n" }]
25858
25916
  }], function () { return [{ type: i0.ElementRef }, { type: i0.IterableDiffers }, { type: PoComboFilterService }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: PoControlPositionService }, { type: PoLanguageService }]; }, { comboOptionTemplate: [{
25859
25917
  type: ContentChild,
25860
25918
  args: [PoComboOptionTemplateDirective, { static: true }]