@po-ui/ng-components 19.25.0 → 19.26.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.
- package/fesm2022/po-ui-ng-components.mjs +232 -39
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-listbox/interfaces/po-listbox-literals.interface.d.ts +1 -0
- package/lib/components/po-listbox/po-item-list/po-item-list-base.component.d.ts +2 -1
- package/lib/components/po-listbox/po-listbox-base.component.d.ts +6 -1
- package/lib/components/po-listbox/po-listbox.component.d.ts +2 -1
- package/lib/components/po-search/literals/po-search-literals-default.d.ts +6 -0
- package/lib/components/po-search/literals/po-search-literals.interface.d.ts +8 -0
- package/lib/components/po-search/po-search-base.component.d.ts +31 -2
- package/lib/components/po-search/po-search.component.d.ts +16 -5
- package/package.json +4 -4
- package/po-ui-ng-components-19.26.0.tgz +0 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-update/v14/index.js +1 -1
- package/schematics/ng-update/v15/index.js +1 -1
- package/schematics/ng-update/v16/index.js +1 -1
- package/schematics/ng-update/v17/index.js +1 -1
- package/schematics/ng-update/v18/index.js +2 -2
- package/schematics/ng-update/v19/index.js +2 -2
- package/schematics/ng-update/v2/index.js +1 -1
- package/schematics/ng-update/v3/index.js +1 -1
- package/schematics/ng-update/v4/index.js +1 -1
- package/schematics/ng-update/v5/index.js +1 -1
- package/schematics/ng-update/v6/index.js +1 -1
- package/po-ui-ng-components-19.25.0.tgz +0 -0
|
@@ -4725,17 +4725,27 @@ class PoListBoxBaseComponent {
|
|
|
4725
4725
|
compareCache = false;
|
|
4726
4726
|
comboService;
|
|
4727
4727
|
containerWidth;
|
|
4728
|
+
// Define os nomes das propriedades do objeto que serão exibidos como rótulos (labels) no `listbox`
|
|
4729
|
+
keysLabel = [];
|
|
4730
|
+
// Habilita a ação no rodapé do list box
|
|
4731
|
+
footerActionListbox = false;
|
|
4732
|
+
// Cria um item no listbox que será utilizado como um "placeholder"
|
|
4733
|
+
placeholderListbox;
|
|
4734
|
+
// Define se haverá ou não um separador entre todos os itens do listbox
|
|
4735
|
+
separator = false;
|
|
4728
4736
|
// Evento disparado quando uma tab é ativada
|
|
4729
4737
|
activatedTab = new EventEmitter();
|
|
4730
4738
|
// Evento disparado no click de uma aba do tabs
|
|
4731
4739
|
clickTab = new EventEmitter();
|
|
4732
4740
|
changeStateTabs = new EventEmitter();
|
|
4733
4741
|
clickItem = new EventEmitter();
|
|
4742
|
+
// Evento disparado ao clicar na ação do rodapé do listbox
|
|
4743
|
+
footerActionListboxEvent = new EventEmitter();
|
|
4734
4744
|
constructor(languageService) {
|
|
4735
4745
|
this.language = languageService.getShortLanguage();
|
|
4736
4746
|
}
|
|
4737
4747
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoListBoxBaseComponent, deps: [{ token: PoLanguageService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4738
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.7", type: PoListBoxBaseComponent, isStandalone: true, inputs: { visible: ["p-visible", "visible", convertToBoolean], type: ["p-type", "type"], items: ["p-items", "items"], literals: ["p-literals", "literals"], isTabs: ["p-is-tabs", "isTabs", convertToBoolean], param: ["p-param", "param"], checkboxAllValue: ["p-checkboxAllValue", "checkboxAllValue"], selectedOptions: ["p-selected-options", "selectedOptions"], selectedOption: ["p-selected-option", "selectedOption"], fieldValue: ["p-field-value", "fieldValue"], fieldLabel: ["p-field-label", "fieldLabel"], literalSearch: ["p-literal-search", "literalSearch"], fieldValueSearch: ["p-field-value-search", "fieldValueSearch"], hideSearch: ["p-hide-search", "hideSearch"], hideSelectAll: ["p-hide-select-all", "hideSelectAll"], multiselectTemplate: ["p-multiselect-template", "multiselectTemplate"], template: ["p-template", "template"], placeholderSearch: ["p-placeholder-search", "placeholderSearch"], searchValue: ["p-search-value", "searchValue"], isServerSearching: ["p-is-searching", "isServerSearching", convertToBoolean], infiniteLoading: ["p-infinite-loading", "infiniteLoading", convertToBoolean], infiniteScroll: ["p-infinite-scroll", "infiniteScroll", convertToBoolean], cache: ["p-cache", "cache", convertToBoolean], infiniteScrollDistance: ["p-infinite-scroll-distance", "infiniteScrollDistance"], filterMode: ["p-filter-mode", "filterMode"], isFiltering: ["p-filtering", "isFiltering"], shouldMarkLetters: ["p-should-mark-letter", "shouldMarkLetters"], size: ["p-size", "size"], compareCache: ["p-compare-cache", "compareCache"], comboService: ["p-combo-service", "comboService"], containerWidth: ["p-container-width", "containerWidth"] }, outputs: { selectItem: "p-select-item", closeEvent: "p-close", change: "p-change", selectCombo: "p-selectcombo-item", changeAll: "p-change-all", UpdateInfiniteScroll: "p-update-infinite-scroll", changeSearch: "p-change-search", activatedTab: "p-activated-tabs", clickTab: "p-click-tabs", changeStateTabs: "p-change-state-tabs", clickItem: "p-click-item" }, ngImport: i0 });
|
|
4748
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.7", type: PoListBoxBaseComponent, isStandalone: true, inputs: { visible: ["p-visible", "visible", convertToBoolean], type: ["p-type", "type"], items: ["p-items", "items"], literals: ["p-literals", "literals"], isTabs: ["p-is-tabs", "isTabs", convertToBoolean], param: ["p-param", "param"], checkboxAllValue: ["p-checkboxAllValue", "checkboxAllValue"], selectedOptions: ["p-selected-options", "selectedOptions"], selectedOption: ["p-selected-option", "selectedOption"], fieldValue: ["p-field-value", "fieldValue"], fieldLabel: ["p-field-label", "fieldLabel"], literalSearch: ["p-literal-search", "literalSearch"], fieldValueSearch: ["p-field-value-search", "fieldValueSearch"], hideSearch: ["p-hide-search", "hideSearch"], hideSelectAll: ["p-hide-select-all", "hideSelectAll"], multiselectTemplate: ["p-multiselect-template", "multiselectTemplate"], template: ["p-template", "template"], placeholderSearch: ["p-placeholder-search", "placeholderSearch"], searchValue: ["p-search-value", "searchValue"], isServerSearching: ["p-is-searching", "isServerSearching", convertToBoolean], infiniteLoading: ["p-infinite-loading", "infiniteLoading", convertToBoolean], infiniteScroll: ["p-infinite-scroll", "infiniteScroll", convertToBoolean], cache: ["p-cache", "cache", convertToBoolean], infiniteScrollDistance: ["p-infinite-scroll-distance", "infiniteScrollDistance"], filterMode: ["p-filter-mode", "filterMode"], isFiltering: ["p-filtering", "isFiltering"], shouldMarkLetters: ["p-should-mark-letter", "shouldMarkLetters"], size: ["p-size", "size"], compareCache: ["p-compare-cache", "compareCache"], comboService: ["p-combo-service", "comboService"], containerWidth: ["p-container-width", "containerWidth"], keysLabel: ["p-keys-label", "keysLabel"], footerActionListbox: ["p-footer-action-listbox", "footerActionListbox"], placeholderListbox: ["p-placeholder-listbox", "placeholderListbox"], separator: ["p-separator", "separator"] }, outputs: { selectItem: "p-select-item", closeEvent: "p-close", change: "p-change", selectCombo: "p-selectcombo-item", changeAll: "p-change-all", UpdateInfiniteScroll: "p-update-infinite-scroll", changeSearch: "p-change-search", activatedTab: "p-activated-tabs", clickTab: "p-click-tabs", changeStateTabs: "p-change-state-tabs", clickItem: "p-click-item", footerActionListboxEvent: "p-footer-action-listbox-event" }, ngImport: i0 });
|
|
4739
4749
|
}
|
|
4740
4750
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoListBoxBaseComponent, decorators: [{
|
|
4741
4751
|
type: Directive
|
|
@@ -4853,6 +4863,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
4853
4863
|
}], containerWidth: [{
|
|
4854
4864
|
type: Input,
|
|
4855
4865
|
args: ['p-container-width']
|
|
4866
|
+
}], keysLabel: [{
|
|
4867
|
+
type: Input,
|
|
4868
|
+
args: ['p-keys-label']
|
|
4869
|
+
}], footerActionListbox: [{
|
|
4870
|
+
type: Input,
|
|
4871
|
+
args: ['p-footer-action-listbox']
|
|
4872
|
+
}], placeholderListbox: [{
|
|
4873
|
+
type: Input,
|
|
4874
|
+
args: ['p-placeholder-listbox']
|
|
4875
|
+
}], separator: [{
|
|
4876
|
+
type: Input,
|
|
4877
|
+
args: ['p-separator']
|
|
4856
4878
|
}], activatedTab: [{
|
|
4857
4879
|
type: Output,
|
|
4858
4880
|
args: ['p-activated-tabs']
|
|
@@ -4865,6 +4887,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
4865
4887
|
}], clickItem: [{
|
|
4866
4888
|
type: Output,
|
|
4867
4889
|
args: ['p-click-item']
|
|
4890
|
+
}], footerActionListboxEvent: [{
|
|
4891
|
+
type: Output,
|
|
4892
|
+
args: ['p-footer-action-listbox-event']
|
|
4868
4893
|
}] } });
|
|
4869
4894
|
|
|
4870
4895
|
const poLoadingOverlayLiteralsDefault = {
|
|
@@ -5375,13 +5400,15 @@ class PoItemListBaseComponent {
|
|
|
5375
5400
|
get activeTabs() {
|
|
5376
5401
|
return this._activeTabs;
|
|
5377
5402
|
}
|
|
5403
|
+
// Define os nomes das propriedades do objeto que serão exibidos como rótulos (labels)
|
|
5404
|
+
keysLabel = [];
|
|
5378
5405
|
emitActiveTabs(tab) {
|
|
5379
5406
|
if (tab?.active) {
|
|
5380
5407
|
this.activatedTab.emit(tab);
|
|
5381
5408
|
}
|
|
5382
5409
|
}
|
|
5383
5410
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoItemListBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5384
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.7", type: PoItemListBaseComponent, isStandalone: true, inputs: { type: ["p-type", "type"], visible: ["p-visible", "visible"], item: ["p-item", "item"], label: ["p-label", "label"], size: ["p-size", "size"], value: ["p-value", "value"], danger: ["p-danger", "danger", convertToBoolean], disabled: ["p-disabled", "disabled"], selected: ["p-selected", "selected", convertToBoolean], separator: ["p-separator", "separator", convertToBoolean], icon: ["p-icon", "icon"], checkboxValue: ["p-checkbox-value", "checkboxValue"], fieldValue: ["p-field-value", "fieldValue"], fieldLabel: ["p-field-label", "fieldLabel"], template: ["p-template", "template"], templateContext: ["p-template-context", "templateContext"], searchValue: ["p-search-value", "searchValue"], filterMode: ["p-filter-mode", "filterMode"], isFiltering: ["p-filtering", "isFiltering"], shouldMarkLetters: ["p-should-mark-letter", "shouldMarkLetters"], compareCache: ["p-compare-cache", "compareCache"], comboService: ["p-combo-service", "comboService"], isTabs: ["p-is-tabs", "isTabs"], tabHide: ["p-tab-hide", "tabHide"], activeTabs: ["p-active-tabs", "activeTabs"] }, outputs: { clickItem: "p-click-item", checkboxItem: "p-selectcheckbox-item", comboItem: "p-selectcombo-item", tabsItem: "p-emit-item-tabs", activatedTab: "p-activated-tabs" }, host: { properties: { "attr.p-type": "this.type" } }, ngImport: i0 });
|
|
5411
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.7", type: PoItemListBaseComponent, isStandalone: true, inputs: { type: ["p-type", "type"], visible: ["p-visible", "visible"], item: ["p-item", "item"], label: ["p-label", "label"], size: ["p-size", "size"], value: ["p-value", "value"], danger: ["p-danger", "danger", convertToBoolean], disabled: ["p-disabled", "disabled"], selected: ["p-selected", "selected", convertToBoolean], separator: ["p-separator", "separator", convertToBoolean], icon: ["p-icon", "icon"], checkboxValue: ["p-checkbox-value", "checkboxValue"], fieldValue: ["p-field-value", "fieldValue"], fieldLabel: ["p-field-label", "fieldLabel"], template: ["p-template", "template"], templateContext: ["p-template-context", "templateContext"], searchValue: ["p-search-value", "searchValue"], filterMode: ["p-filter-mode", "filterMode"], isFiltering: ["p-filtering", "isFiltering"], shouldMarkLetters: ["p-should-mark-letter", "shouldMarkLetters"], compareCache: ["p-compare-cache", "compareCache"], comboService: ["p-combo-service", "comboService"], isTabs: ["p-is-tabs", "isTabs"], tabHide: ["p-tab-hide", "tabHide"], activeTabs: ["p-active-tabs", "activeTabs"], keysLabel: ["p-keys-label", "keysLabel"] }, outputs: { clickItem: "p-click-item", checkboxItem: "p-selectcheckbox-item", comboItem: "p-selectcombo-item", tabsItem: "p-emit-item-tabs", activatedTab: "p-activated-tabs" }, host: { properties: { "attr.p-type": "this.type" } }, ngImport: i0 });
|
|
5385
5412
|
}
|
|
5386
5413
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoItemListBaseComponent, decorators: [{
|
|
5387
5414
|
type: Directive
|
|
@@ -5478,6 +5505,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
5478
5505
|
}], activeTabs: [{
|
|
5479
5506
|
type: Input,
|
|
5480
5507
|
args: ['p-active-tabs']
|
|
5508
|
+
}], keysLabel: [{
|
|
5509
|
+
type: Input,
|
|
5510
|
+
args: ['p-keys-label']
|
|
5481
5511
|
}] } });
|
|
5482
5512
|
|
|
5483
5513
|
/**
|
|
@@ -6298,11 +6328,11 @@ class PoItemListComponent extends PoItemListBaseComponent {
|
|
|
6298
6328
|
return value.replace(/</g, '<').replace(/>/g, '>');
|
|
6299
6329
|
}
|
|
6300
6330
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoItemListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
6301
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.7", type: PoItemListComponent, isStandalone: false, selector: "po-item-list", viewQueries: [{ propertyName: "itemList", first: true, predicate: ["itemList"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container (keydown)=\"onCheckboxItemEmit($event)\">\n @switch (type) {\n @default {\n <div\n #itemList\n [class.po-item-list__separator]=\"separator\"\n [class.po-item-list__disabled]=\"disabled || !visible\"\n [class.po-item-list__selected]=\"(selected || activeTabs) && !disabled\"\n [class.po-item-list__hidden]=\"tabHide\"\n [class.po-item-list-aa]=\"size === 'small'\"\n [attr.aria-disabled]=\"disabled || !visible\"\n [attr.aria-label]=\"label\"\n [class.po-item-list__danger]=\"danger\"\n class=\"po-item-list po-item-list__action\"\n >\n @if (icon) {\n <po-icon class=\"po-popup-icon-item\" [p-icon]=\"icon\"></po-icon>\n }\n <span class=\"po-item-list-label\">{{ label }}</span>\n </div>\n }\n @case ('option') {\n <div\n #itemList\n class=\"po-item-list po-item-list__option\"\n [class.po-item-list__separator]=\"separator\"\n [class.po-item-list__selected]=\"selected && !disabled\"\n [class.po-item-list-aa]=\"size === 'small'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-label]=\"label\"\n (click)=\"onComboItem(item, $event)\"\n >\n @if (!template) {\n <span class=\"po-item-list-label\" [innerHTML]=\"getLabelFormatted(label)\"></span>\n }\n <ng-template\n [ngTemplateOutlet]=\"template?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"\n >\n </ng-template>\n </div>\n }\n @case ('check') {\n <div\n class=\"po-item-list po-item-list__check\"\n [class.po-item-list__separator]=\"separator\"\n [class.po-item-list__selected]=\"selected && !disabled\"\n [class.po-item-list__disabled]=\"disabled\"\n [class.po-item-list-aa]=\"size === 'small'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-label]=\"label\"\n (click)=\"onCheckboxItem()\"\n (keydown)=\"onCheckboxItemEmit($event)\"\n (keyup)=\"onCheckboxItemEmit($event)\"\n >\n <po-checkbox\n [p-disabled-tabindex]=\"true\"\n [p-checkboxValue]=\"checkboxValue === null ? 'mixed' : checkboxValue\"\n [p-disabled]=\"disabled\"\n [p-size]=\"size\"\n ></po-checkbox>\n @if (!template) {\n <span class=\"po-item-list__label\">{{ label }}</span>\n }\n <ng-template\n [ngTemplateOutlet]=\"template?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"\n >\n </ng-template>\n </div>\n }\n }\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PoCheckboxComponent, selector: "po-checkbox" }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }] });
|
|
6331
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.7", type: PoItemListComponent, isStandalone: false, selector: "po-item-list", viewQueries: [{ propertyName: "itemList", first: true, predicate: ["itemList"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container (keydown)=\"onCheckboxItemEmit($event)\">\n @switch (type) {\n @default {\n <div\n #itemList\n [class.po-item-list__separator]=\"separator\"\n [class.po-item-list__disabled]=\"disabled || !visible\"\n [class.po-item-list__selected]=\"(selected || activeTabs) && !disabled\"\n [class.po-item-list__hidden]=\"tabHide\"\n [class.po-item-list-aa]=\"size === 'small'\"\n [attr.aria-disabled]=\"disabled || !visible\"\n [attr.aria-label]=\"label\"\n [class.po-item-list__danger]=\"danger\"\n class=\"po-item-list po-item-list__action\"\n >\n @if (icon) {\n <po-icon class=\"po-popup-icon-item\" [p-icon]=\"icon\"></po-icon>\n }\n <span class=\"po-item-list-label\">{{ label }}</span>\n </div>\n }\n @case ('option') {\n <div\n #itemList\n class=\"po-item-list po-item-list__option\"\n [class.po-item-list__separator]=\"separator\"\n [class.po-item-list__selected]=\"selected && !disabled\"\n [class.po-item-list-aa]=\"size === 'small'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-label]=\"label\"\n (click)=\"onComboItem(item, $event)\"\n >\n @if (!template) {\n @switch (keysLabel.length) {\n @case (0) {\n <span class=\"po-item-list-label\" [innerHTML]=\"getLabelFormatted(label)\"></span>\n }\n\n @case (1) {\n <span class=\"po-item-list-label\">{{ item[keysLabel[0]] }}</span>\n }\n\n @case (2) {\n <div class=\"po-item-list-label po-item-list-label-group\">\n <span class=\"po-item-list-label\">{{ item[keysLabel[0]] }}</span>\n <span class=\"po-item-list-sublabel\">{{ item[keysLabel[1]] }}</span>\n </div>\n }\n\n @default {\n <div class=\"po-item-list-label po-item-list-label-group\">\n <span class=\"po-item-list-label\">{{ item[keysLabel[0]] }}</span>\n <span class=\"po-item-list-sublabel\">{{ item[keysLabel[1]] }} - {{ item[keysLabel[2]] }}</span>\n </div>\n }\n }\n }\n\n <ng-template\n [ngTemplateOutlet]=\"template?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"\n >\n </ng-template>\n </div>\n }\n @case ('check') {\n <div\n class=\"po-item-list po-item-list__check\"\n [class.po-item-list__separator]=\"separator\"\n [class.po-item-list__selected]=\"selected && !disabled\"\n [class.po-item-list__disabled]=\"disabled\"\n [class.po-item-list-aa]=\"size === 'small'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-label]=\"label\"\n (click)=\"onCheckboxItem()\"\n (keydown)=\"onCheckboxItemEmit($event)\"\n (keyup)=\"onCheckboxItemEmit($event)\"\n >\n <po-checkbox\n [p-disabled-tabindex]=\"true\"\n [p-checkboxValue]=\"checkboxValue === null ? 'mixed' : checkboxValue\"\n [p-disabled]=\"disabled\"\n [p-size]=\"size\"\n ></po-checkbox>\n @if (!template) {\n <span class=\"po-item-list__label\">{{ label }}</span>\n }\n <ng-template\n [ngTemplateOutlet]=\"template?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"\n >\n </ng-template>\n </div>\n }\n }\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PoCheckboxComponent, selector: "po-checkbox" }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }] });
|
|
6302
6332
|
}
|
|
6303
6333
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoItemListComponent, decorators: [{
|
|
6304
6334
|
type: Component,
|
|
6305
|
-
args: [{ selector: 'po-item-list', standalone: false, template: "<ng-container (keydown)=\"onCheckboxItemEmit($event)\">\n @switch (type) {\n @default {\n <div\n #itemList\n [class.po-item-list__separator]=\"separator\"\n [class.po-item-list__disabled]=\"disabled || !visible\"\n [class.po-item-list__selected]=\"(selected || activeTabs) && !disabled\"\n [class.po-item-list__hidden]=\"tabHide\"\n [class.po-item-list-aa]=\"size === 'small'\"\n [attr.aria-disabled]=\"disabled || !visible\"\n [attr.aria-label]=\"label\"\n [class.po-item-list__danger]=\"danger\"\n class=\"po-item-list po-item-list__action\"\n >\n @if (icon) {\n <po-icon class=\"po-popup-icon-item\" [p-icon]=\"icon\"></po-icon>\n }\n <span class=\"po-item-list-label\">{{ label }}</span>\n </div>\n }\n @case ('option') {\n <div\n #itemList\n class=\"po-item-list po-item-list__option\"\n [class.po-item-list__separator]=\"separator\"\n [class.po-item-list__selected]=\"selected && !disabled\"\n [class.po-item-list-aa]=\"size === 'small'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-label]=\"label\"\n (click)=\"onComboItem(item, $event)\"\n >\n @if (!template) {\n <span class=\"po-item-list-label\" [innerHTML]=\"getLabelFormatted(label)\"></span>\n }\n <ng-template\n [ngTemplateOutlet]=\"template?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"\n >\n </ng-template>\n </div>\n }\n @case ('check') {\n <div\n class=\"po-item-list po-item-list__check\"\n [class.po-item-list__separator]=\"separator\"\n [class.po-item-list__selected]=\"selected && !disabled\"\n [class.po-item-list__disabled]=\"disabled\"\n [class.po-item-list-aa]=\"size === 'small'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-label]=\"label\"\n (click)=\"onCheckboxItem()\"\n (keydown)=\"onCheckboxItemEmit($event)\"\n (keyup)=\"onCheckboxItemEmit($event)\"\n >\n <po-checkbox\n [p-disabled-tabindex]=\"true\"\n [p-checkboxValue]=\"checkboxValue === null ? 'mixed' : checkboxValue\"\n [p-disabled]=\"disabled\"\n [p-size]=\"size\"\n ></po-checkbox>\n @if (!template) {\n <span class=\"po-item-list__label\">{{ label }}</span>\n }\n <ng-template\n [ngTemplateOutlet]=\"template?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"\n >\n </ng-template>\n </div>\n }\n }\n</ng-container>\n" }]
|
|
6335
|
+
args: [{ selector: 'po-item-list', standalone: false, template: "<ng-container (keydown)=\"onCheckboxItemEmit($event)\">\n @switch (type) {\n @default {\n <div\n #itemList\n [class.po-item-list__separator]=\"separator\"\n [class.po-item-list__disabled]=\"disabled || !visible\"\n [class.po-item-list__selected]=\"(selected || activeTabs) && !disabled\"\n [class.po-item-list__hidden]=\"tabHide\"\n [class.po-item-list-aa]=\"size === 'small'\"\n [attr.aria-disabled]=\"disabled || !visible\"\n [attr.aria-label]=\"label\"\n [class.po-item-list__danger]=\"danger\"\n class=\"po-item-list po-item-list__action\"\n >\n @if (icon) {\n <po-icon class=\"po-popup-icon-item\" [p-icon]=\"icon\"></po-icon>\n }\n <span class=\"po-item-list-label\">{{ label }}</span>\n </div>\n }\n @case ('option') {\n <div\n #itemList\n class=\"po-item-list po-item-list__option\"\n [class.po-item-list__separator]=\"separator\"\n [class.po-item-list__selected]=\"selected && !disabled\"\n [class.po-item-list-aa]=\"size === 'small'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-label]=\"label\"\n (click)=\"onComboItem(item, $event)\"\n >\n @if (!template) {\n @switch (keysLabel.length) {\n @case (0) {\n <span class=\"po-item-list-label\" [innerHTML]=\"getLabelFormatted(label)\"></span>\n }\n\n @case (1) {\n <span class=\"po-item-list-label\">{{ item[keysLabel[0]] }}</span>\n }\n\n @case (2) {\n <div class=\"po-item-list-label po-item-list-label-group\">\n <span class=\"po-item-list-label\">{{ item[keysLabel[0]] }}</span>\n <span class=\"po-item-list-sublabel\">{{ item[keysLabel[1]] }}</span>\n </div>\n }\n\n @default {\n <div class=\"po-item-list-label po-item-list-label-group\">\n <span class=\"po-item-list-label\">{{ item[keysLabel[0]] }}</span>\n <span class=\"po-item-list-sublabel\">{{ item[keysLabel[1]] }} - {{ item[keysLabel[2]] }}</span>\n </div>\n }\n }\n }\n\n <ng-template\n [ngTemplateOutlet]=\"template?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"\n >\n </ng-template>\n </div>\n }\n @case ('check') {\n <div\n class=\"po-item-list po-item-list__check\"\n [class.po-item-list__separator]=\"separator\"\n [class.po-item-list__selected]=\"selected && !disabled\"\n [class.po-item-list__disabled]=\"disabled\"\n [class.po-item-list-aa]=\"size === 'small'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-label]=\"label\"\n (click)=\"onCheckboxItem()\"\n (keydown)=\"onCheckboxItemEmit($event)\"\n (keyup)=\"onCheckboxItemEmit($event)\"\n >\n <po-checkbox\n [p-disabled-tabindex]=\"true\"\n [p-checkboxValue]=\"checkboxValue === null ? 'mixed' : checkboxValue\"\n [p-disabled]=\"disabled\"\n [p-size]=\"size\"\n ></po-checkbox>\n @if (!template) {\n <span class=\"po-item-list__label\">{{ label }}</span>\n }\n <ng-template\n [ngTemplateOutlet]=\"template?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"\n >\n </ng-template>\n </div>\n }\n }\n</ng-container>\n" }]
|
|
6306
6336
|
}], propDecorators: { itemList: [{
|
|
6307
6337
|
type: ViewChild,
|
|
6308
6338
|
args: ['itemList', { static: true }]
|
|
@@ -6469,6 +6499,16 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
6469
6499
|
onKeyDown(itemListAction, event) {
|
|
6470
6500
|
event.preventDefault();
|
|
6471
6501
|
if ((event && event.code === 'Enter') || event.code === 'Space') {
|
|
6502
|
+
if (itemListAction.type === 'footerAction') {
|
|
6503
|
+
this.handleFooterActionListbox();
|
|
6504
|
+
return;
|
|
6505
|
+
}
|
|
6506
|
+
// Cenário em que o `Po-Search` (com listbox) tem nos items ação ou url
|
|
6507
|
+
if (this.type === 'option' && (itemListAction?.action || itemListAction?.url)) {
|
|
6508
|
+
this.onSelectItem(itemListAction);
|
|
6509
|
+
this.optionClicked(itemListAction);
|
|
6510
|
+
return;
|
|
6511
|
+
}
|
|
6472
6512
|
switch (this.type) {
|
|
6473
6513
|
case 'check':
|
|
6474
6514
|
this.onSelectCheckBoxItem(itemListAction);
|
|
@@ -6560,6 +6600,9 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
6560
6600
|
if (this.cache || this.infiniteScroll) {
|
|
6561
6601
|
return this.items.length;
|
|
6562
6602
|
}
|
|
6603
|
+
else if (!this.items.length && this.footerActionListbox) {
|
|
6604
|
+
return true;
|
|
6605
|
+
}
|
|
6563
6606
|
else {
|
|
6564
6607
|
return !this.isServerSearching && this.items.length;
|
|
6565
6608
|
}
|
|
@@ -6617,12 +6660,16 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
6617
6660
|
}
|
|
6618
6661
|
}
|
|
6619
6662
|
}
|
|
6663
|
+
handleFooterActionListbox() {
|
|
6664
|
+
this.footerActionListboxEvent.emit();
|
|
6665
|
+
this.closeEvent.emit();
|
|
6666
|
+
}
|
|
6620
6667
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoListBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6621
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.7", type: PoListBoxComponent, isStandalone: false, selector: "po-listbox", viewQueries: [{ propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true, static: true }, { propertyName: "listboxItemList", first: true, predicate: ["listboxItemList"], descendants: true }, { propertyName: "searchElement", first: true, predicate: ["searchElement"], descendants: true }, { propertyName: "popupHeaderContainer", first: true, predicate: ["popupHeaderContainer"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, 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 <div #popupHeaderContainer>\n <ng-content select=\"[p-popup-header-template]\"></ng-content>\n </div>\n\n @if (!hideSearch && type === 'check') {\n <po-search-list\n #searchElement\n (p-change)=\"callChangeSearch($event)\"\n [p-literals]=\"literalSearch\"\n [p-field-value]=\"fieldValueSearch\"\n [p-placeholder]=\"placeholderSearch\"\n [p-size]=\"size\"\n ></po-search-list>\n }\n\n @if (checkTemplate()) {\n <ul #listboxItemList cdkListbox [cdkListboxMultiple]=\"type === 'check'\" class=\"po-listbox-list\">\n @if (type === 'check' && items.length && !searchElement?.inputValue && !hideSelectAll) {\n <li\n cdkOption=\"selectAll\"\n [attr.aria-checked]=\"checkboxAllValue === null ? 'mixed' : checkboxAllValue\"\n class=\"po-listbox-item-type-check\"\n (click)=\"changeAll.emit()\"\n (keydown)=\"changeAllEmit($event)\"\n (keydown)=\"onSelectAllCheckboxKeyDown($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 [p-size]=\"size\"\n >\n </po-item-list>\n </li>\n }\n @for (item of items; track item) {\n <li\n [class.po-listbox-item]=\"visible\"\n [class.po-listbox-item-type-check]=\"type === 'check'\"\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 @if (item.options) {\n <label class=\"po-combo-item-title\">\n {{ item.label }}\n </label>\n }\n @if (returnBooleanValue(item, 'visible') !== false && !item.options) {\n <po-item-list\n [p-disabled]=\"returnBooleanValue(item, 'disabled')\"\n [p-visible]=\"returnBooleanValue(item, 'visible')\"\n [p-checkbox-value]=\"isSelectedItem(item)\"\n [attr.data-item-list]=\"formatItemList(item)\"\n [p-label]=\"item[fieldLabel]\"\n [p-value]=\"item[fieldValue]\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n [p-active-tabs]=\"item.active\"\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-tab-hide]=\"item.hide\"\n [p-is-tabs]=\"isTabs\"\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(item)\"\n (p-emit-item-tabs)=\"onSelectTabs($event)\"\n (p-activated-tabs)=\"onActivatedTabs($event)\"\n [p-search-value]=\"searchValue\"\n [p-filter-mode]=\"filterMode\"\n [p-filtering]=\"isFiltering\"\n [p-size]=\"size\"\n [p-should-mark-letter]=\"shouldMarkLetters\"\n [p-compare-cache]=\"compareCache\"\n [p-combo-service]=\"comboService\"\n ></po-item-list>\n }\n </li>\n }\n </ul>\n } @else {\n @if (!items.length && !isServerSearching && type !== 'action') {\n <div class=\"po-listbox-container-no-data po-text-center\">\n <span> {{ literals.noItems }}</span>\n </div>\n }\n }\n\n @if (isServerSearching && type !== 'action') {\n <div [class.po-listbox-container-loading-default]=\"!infiniteLoading\">\n <po-loading-overlay [p-size]=\"getSizeLoading()\" [p-text]=\"getTextLoading()\"></po-loading-overlay>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: PoLoadingOverlayComponent, selector: "po-loading-overlay" }, { kind: "directive", type: i2.CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: i2.CdkOption, selector: "[cdkOption]", inputs: ["id", "cdkOption", "cdkOptionTypeaheadLabel", "cdkOptionDisabled", "tabindex"], exportAs: ["cdkOption"] }, { kind: "component", type: PoItemListComponent, selector: "po-item-list" }, { kind: "component", type: PoSearchListComponent, selector: "po-search-list", inputs: ["p-literals", "p-field-value", "p-size", "p-placeholder"], outputs: ["p-change"] }] });
|
|
6668
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.7", type: PoListBoxComponent, isStandalone: false, selector: "po-listbox", viewQueries: [{ propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true, static: true }, { propertyName: "listboxItemList", first: true, predicate: ["listboxItemList"], descendants: true }, { propertyName: "searchElement", first: true, predicate: ["searchElement"], descendants: true }, { propertyName: "popupHeaderContainer", first: true, predicate: ["popupHeaderContainer"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, 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 <div #popupHeaderContainer>\n <ng-content select=\"[p-popup-header-template]\"></ng-content>\n </div>\n\n @if (!hideSearch && type === 'check') {\n <po-search-list\n #searchElement\n (p-change)=\"callChangeSearch($event)\"\n [p-literals]=\"literalSearch\"\n [p-field-value]=\"fieldValueSearch\"\n [p-placeholder]=\"placeholderSearch\"\n [p-size]=\"size\"\n ></po-search-list>\n }\n\n @if (checkTemplate()) {\n <ul #listboxItemList cdkListbox [cdkListboxMultiple]=\"type === 'check'\" class=\"po-listbox-list\">\n @if (type === 'check' && items.length && !searchElement?.inputValue && !hideSelectAll) {\n <li\n cdkOption=\"selectAll\"\n [attr.aria-checked]=\"checkboxAllValue === null ? 'mixed' : checkboxAllValue\"\n class=\"po-listbox-item-type-check\"\n (click)=\"changeAll.emit()\"\n (keydown)=\"changeAllEmit($event)\"\n (keydown)=\"onSelectAllCheckboxKeyDown($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 [p-size]=\"size\"\n >\n </po-item-list>\n </li>\n }\n @for (item of items; track item) {\n <li\n [class.po-listbox-item]=\"visible\"\n [class.po-listbox-item-type-check]=\"type === 'check'\"\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 @if (item.options) {\n <label class=\"po-combo-item-title\">\n {{ item.label }}\n </label>\n }\n @if (returnBooleanValue(item, 'visible') !== false && !item.options) {\n <po-item-list\n [p-disabled]=\"returnBooleanValue(item, 'disabled')\"\n [p-visible]=\"returnBooleanValue(item, 'visible')\"\n [p-checkbox-value]=\"isSelectedItem(item)\"\n [attr.data-item-list]=\"formatItemList(item)\"\n [p-label]=\"item[fieldLabel]\"\n [p-value]=\"item[fieldValue]\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n [p-active-tabs]=\"item.active\"\n [p-separator]=\"item.separator || separator\"\n [p-danger]=\"item.danger || item.type === 'danger'\"\n [p-icon]=\"item.icon\"\n [p-type]=\"type\"\n [p-item]=\"item\"\n [p-tab-hide]=\"item.hide\"\n [p-is-tabs]=\"isTabs\"\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(item)\"\n (p-emit-item-tabs)=\"onSelectTabs($event)\"\n (p-activated-tabs)=\"onActivatedTabs($event)\"\n [p-search-value]=\"searchValue\"\n [p-filter-mode]=\"filterMode\"\n [p-filtering]=\"isFiltering\"\n [p-size]=\"size\"\n [p-should-mark-letter]=\"shouldMarkLetters\"\n [p-compare-cache]=\"compareCache\"\n [p-combo-service]=\"comboService\"\n [p-keys-label]=\"keysLabel\"\n ></po-item-list>\n }\n </li>\n }\n\n @if (footerActionListbox) {\n @if (placeholderListbox) {\n <div class=\"po-item-list\" [class.po-item-list-aa]=\"size === 'small'\" aria-hidden=\"true\">\n <span>{{ placeholderListbox }}</span>\n </div>\n }\n\n @if (!placeholderListbox && !items.length) {\n <div class=\"po-item-list\" [class.po-item-list-aa]=\"size === 'small'\" aria-hidden=\"true\">\n <span>{{ literals.noItems }}</span>\n </div>\n }\n\n <li\n class=\"po-listbox-item\"\n (click)=\"handleFooterActionListbox()\"\n (keydown)=\"onKeyDown({ type: 'footerAction' }, $event)\"\n cdkOption=\"footerActionListbox\"\n >\n <po-item-list [p-label]=\"literals.footerActionListbox\" p-separator [p-size]=\"size\" />\n </li>\n }\n </ul>\n } @else {\n @if (!items.length && !isServerSearching && type !== 'action' && !footerActionListbox) {\n <div class=\"po-listbox-container-no-data po-text-center\">\n <span> {{ literals.noItems }}</span>\n </div>\n }\n }\n\n @if (isServerSearching && type !== 'action') {\n <div [class.po-listbox-container-loading-default]=\"!infiniteLoading\">\n <po-loading-overlay [p-size]=\"getSizeLoading()\" [p-text]=\"getTextLoading()\"></po-loading-overlay>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: PoLoadingOverlayComponent, selector: "po-loading-overlay" }, { kind: "directive", type: i2.CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: i2.CdkOption, selector: "[cdkOption]", inputs: ["id", "cdkOption", "cdkOptionTypeaheadLabel", "cdkOptionDisabled", "tabindex"], exportAs: ["cdkOption"] }, { kind: "component", type: PoItemListComponent, selector: "po-item-list" }, { kind: "component", type: PoSearchListComponent, selector: "po-search-list", inputs: ["p-literals", "p-field-value", "p-size", "p-placeholder"], outputs: ["p-change"] }] });
|
|
6622
6669
|
}
|
|
6623
6670
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoListBoxComponent, decorators: [{
|
|
6624
6671
|
type: Component,
|
|
6625
|
-
args: [{ selector: 'po-listbox', standalone: false, 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 <div #popupHeaderContainer>\n <ng-content select=\"[p-popup-header-template]\"></ng-content>\n </div>\n\n @if (!hideSearch && type === 'check') {\n <po-search-list\n #searchElement\n (p-change)=\"callChangeSearch($event)\"\n [p-literals]=\"literalSearch\"\n [p-field-value]=\"fieldValueSearch\"\n [p-placeholder]=\"placeholderSearch\"\n [p-size]=\"size\"\n ></po-search-list>\n }\n\n @if (checkTemplate()) {\n <ul #listboxItemList cdkListbox [cdkListboxMultiple]=\"type === 'check'\" class=\"po-listbox-list\">\n @if (type === 'check' && items.length && !searchElement?.inputValue && !hideSelectAll) {\n <li\n cdkOption=\"selectAll\"\n [attr.aria-checked]=\"checkboxAllValue === null ? 'mixed' : checkboxAllValue\"\n class=\"po-listbox-item-type-check\"\n (click)=\"changeAll.emit()\"\n (keydown)=\"changeAllEmit($event)\"\n (keydown)=\"onSelectAllCheckboxKeyDown($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 [p-size]=\"size\"\n >\n </po-item-list>\n </li>\n }\n @for (item of items; track item) {\n <li\n [class.po-listbox-item]=\"visible\"\n [class.po-listbox-item-type-check]=\"type === 'check'\"\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 @if (item.options) {\n <label class=\"po-combo-item-title\">\n {{ item.label }}\n </label>\n }\n @if (returnBooleanValue(item, 'visible') !== false && !item.options) {\n <po-item-list\n [p-disabled]=\"returnBooleanValue(item, 'disabled')\"\n [p-visible]=\"returnBooleanValue(item, 'visible')\"\n [p-checkbox-value]=\"isSelectedItem(item)\"\n [attr.data-item-list]=\"formatItemList(item)\"\n [p-label]=\"item[fieldLabel]\"\n [p-value]=\"item[fieldValue]\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n [p-active-tabs]=\"item.active\"\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-tab-hide]=\"item.hide\"\n [p-is-tabs]=\"isTabs\"\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(item)\"\n (p-emit-item-tabs)=\"onSelectTabs($event)\"\n (p-activated-tabs)=\"onActivatedTabs($event)\"\n [p-search-value]=\"searchValue\"\n [p-filter-mode]=\"filterMode\"\n [p-filtering]=\"isFiltering\"\n [p-size]=\"size\"\n [p-should-mark-letter]=\"shouldMarkLetters\"\n [p-compare-cache]=\"compareCache\"\n [p-combo-service]=\"comboService\"\n ></po-item-list>\n }\n </li>\n }\n </ul>\n } @else {\n @if (!items.length && !isServerSearching && type !== 'action') {\n <div class=\"po-listbox-container-no-data po-text-center\">\n <span> {{ literals.noItems }}</span>\n </div>\n }\n }\n\n @if (isServerSearching && type !== 'action') {\n <div [class.po-listbox-container-loading-default]=\"!infiniteLoading\">\n <po-loading-overlay [p-size]=\"getSizeLoading()\" [p-text]=\"getTextLoading()\"></po-loading-overlay>\n </div>\n }\n</div>\n" }]
|
|
6672
|
+
args: [{ selector: 'po-listbox', standalone: false, 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 <div #popupHeaderContainer>\n <ng-content select=\"[p-popup-header-template]\"></ng-content>\n </div>\n\n @if (!hideSearch && type === 'check') {\n <po-search-list\n #searchElement\n (p-change)=\"callChangeSearch($event)\"\n [p-literals]=\"literalSearch\"\n [p-field-value]=\"fieldValueSearch\"\n [p-placeholder]=\"placeholderSearch\"\n [p-size]=\"size\"\n ></po-search-list>\n }\n\n @if (checkTemplate()) {\n <ul #listboxItemList cdkListbox [cdkListboxMultiple]=\"type === 'check'\" class=\"po-listbox-list\">\n @if (type === 'check' && items.length && !searchElement?.inputValue && !hideSelectAll) {\n <li\n cdkOption=\"selectAll\"\n [attr.aria-checked]=\"checkboxAllValue === null ? 'mixed' : checkboxAllValue\"\n class=\"po-listbox-item-type-check\"\n (click)=\"changeAll.emit()\"\n (keydown)=\"changeAllEmit($event)\"\n (keydown)=\"onSelectAllCheckboxKeyDown($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 [p-size]=\"size\"\n >\n </po-item-list>\n </li>\n }\n @for (item of items; track item) {\n <li\n [class.po-listbox-item]=\"visible\"\n [class.po-listbox-item-type-check]=\"type === 'check'\"\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 @if (item.options) {\n <label class=\"po-combo-item-title\">\n {{ item.label }}\n </label>\n }\n @if (returnBooleanValue(item, 'visible') !== false && !item.options) {\n <po-item-list\n [p-disabled]=\"returnBooleanValue(item, 'disabled')\"\n [p-visible]=\"returnBooleanValue(item, 'visible')\"\n [p-checkbox-value]=\"isSelectedItem(item)\"\n [attr.data-item-list]=\"formatItemList(item)\"\n [p-label]=\"item[fieldLabel]\"\n [p-value]=\"item[fieldValue]\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n [p-active-tabs]=\"item.active\"\n [p-separator]=\"item.separator || separator\"\n [p-danger]=\"item.danger || item.type === 'danger'\"\n [p-icon]=\"item.icon\"\n [p-type]=\"type\"\n [p-item]=\"item\"\n [p-tab-hide]=\"item.hide\"\n [p-is-tabs]=\"isTabs\"\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(item)\"\n (p-emit-item-tabs)=\"onSelectTabs($event)\"\n (p-activated-tabs)=\"onActivatedTabs($event)\"\n [p-search-value]=\"searchValue\"\n [p-filter-mode]=\"filterMode\"\n [p-filtering]=\"isFiltering\"\n [p-size]=\"size\"\n [p-should-mark-letter]=\"shouldMarkLetters\"\n [p-compare-cache]=\"compareCache\"\n [p-combo-service]=\"comboService\"\n [p-keys-label]=\"keysLabel\"\n ></po-item-list>\n }\n </li>\n }\n\n @if (footerActionListbox) {\n @if (placeholderListbox) {\n <div class=\"po-item-list\" [class.po-item-list-aa]=\"size === 'small'\" aria-hidden=\"true\">\n <span>{{ placeholderListbox }}</span>\n </div>\n }\n\n @if (!placeholderListbox && !items.length) {\n <div class=\"po-item-list\" [class.po-item-list-aa]=\"size === 'small'\" aria-hidden=\"true\">\n <span>{{ literals.noItems }}</span>\n </div>\n }\n\n <li\n class=\"po-listbox-item\"\n (click)=\"handleFooterActionListbox()\"\n (keydown)=\"onKeyDown({ type: 'footerAction' }, $event)\"\n cdkOption=\"footerActionListbox\"\n >\n <po-item-list [p-label]=\"literals.footerActionListbox\" p-separator [p-size]=\"size\" />\n </li>\n }\n </ul>\n } @else {\n @if (!items.length && !isServerSearching && type !== 'action' && !footerActionListbox) {\n <div class=\"po-listbox-container-no-data po-text-center\">\n <span> {{ literals.noItems }}</span>\n </div>\n }\n }\n\n @if (isServerSearching && type !== 'action') {\n <div [class.po-listbox-container-loading-default]=\"!infiniteLoading\">\n <po-loading-overlay [p-size]=\"getSizeLoading()\" [p-text]=\"getTextLoading()\"></po-loading-overlay>\n </div>\n }\n</div>\n" }]
|
|
6626
6673
|
}], ctorParameters: () => [], propDecorators: { listbox: [{
|
|
6627
6674
|
type: ViewChild,
|
|
6628
6675
|
args: ['listbox', { static: true }]
|
|
@@ -10422,6 +10469,7 @@ class PoChartComponent extends PoChartBaseComponent {
|
|
|
10422
10469
|
this.checkShowCEcharts();
|
|
10423
10470
|
}
|
|
10424
10471
|
ngOnDestroy() {
|
|
10472
|
+
/* istanbul ignore next */
|
|
10425
10473
|
if (this.resizeObserver?.disconnect) {
|
|
10426
10474
|
this.resizeObserver?.disconnect();
|
|
10427
10475
|
}
|
|
@@ -10486,7 +10534,7 @@ class PoChartComponent extends PoChartBaseComponent {
|
|
|
10486
10534
|
observeContainerResize() {
|
|
10487
10535
|
if (!this.series?.length)
|
|
10488
10536
|
return;
|
|
10489
|
-
if (this.resizeObserver) {
|
|
10537
|
+
if (this.resizeObserver?.disconnect) {
|
|
10490
10538
|
this.resizeObserver.disconnect();
|
|
10491
10539
|
this.resizeObserver = undefined;
|
|
10492
10540
|
}
|
|
@@ -22755,7 +22803,9 @@ const poSearchLiteralsDefault = {
|
|
|
22755
22803
|
of: 'of',
|
|
22756
22804
|
next: 'Next result',
|
|
22757
22805
|
previous: 'Previous result',
|
|
22758
|
-
result: 'Result'
|
|
22806
|
+
result: 'Result',
|
|
22807
|
+
footerActionListbox: 'See all results',
|
|
22808
|
+
placeholderListbox: 'Search'
|
|
22759
22809
|
},
|
|
22760
22810
|
es: {
|
|
22761
22811
|
search: 'Buscar',
|
|
@@ -22764,7 +22814,9 @@ const poSearchLiteralsDefault = {
|
|
|
22764
22814
|
of: 'de',
|
|
22765
22815
|
next: 'Siguiente resultado',
|
|
22766
22816
|
previous: 'Resultado anterior',
|
|
22767
|
-
result: 'Resultado'
|
|
22817
|
+
result: 'Resultado',
|
|
22818
|
+
footerActionListbox: 'Ver todos los resultados',
|
|
22819
|
+
placeholderListbox: 'Buscar'
|
|
22768
22820
|
},
|
|
22769
22821
|
pt: {
|
|
22770
22822
|
search: 'Pesquisar',
|
|
@@ -22773,7 +22825,9 @@ const poSearchLiteralsDefault = {
|
|
|
22773
22825
|
of: 'de',
|
|
22774
22826
|
next: 'Próximo resultado',
|
|
22775
22827
|
previous: 'Resultado anterior',
|
|
22776
|
-
result: 'Resultado'
|
|
22828
|
+
result: 'Resultado',
|
|
22829
|
+
footerActionListbox: 'Ver todos os resultados',
|
|
22830
|
+
placeholderListbox: 'Pesquisar'
|
|
22777
22831
|
},
|
|
22778
22832
|
ru: {
|
|
22779
22833
|
search: 'Поиск',
|
|
@@ -22782,7 +22836,27 @@ const poSearchLiteralsDefault = {
|
|
|
22782
22836
|
of: 'из',
|
|
22783
22837
|
next: 'Следующий результат',
|
|
22784
22838
|
previous: 'Предыдущий результат',
|
|
22785
|
-
result: 'Результат'
|
|
22839
|
+
result: 'Результат',
|
|
22840
|
+
footerActionListbox: 'Посмотреть все результаты',
|
|
22841
|
+
placeholderListbox: 'Поиск'
|
|
22842
|
+
}
|
|
22843
|
+
};
|
|
22844
|
+
const poSearchLiteralsDefaultExecute = {
|
|
22845
|
+
en: {
|
|
22846
|
+
search: 'Search and Execute',
|
|
22847
|
+
placeholderListbox: 'Search and Execute'
|
|
22848
|
+
},
|
|
22849
|
+
es: {
|
|
22850
|
+
search: 'Buscar y ejecutar',
|
|
22851
|
+
placeholderListbox: 'Buscar y ejecutar'
|
|
22852
|
+
},
|
|
22853
|
+
pt: {
|
|
22854
|
+
search: 'Pesquisar e Executar ',
|
|
22855
|
+
placeholderListbox: 'Pesquisar e Executar '
|
|
22856
|
+
},
|
|
22857
|
+
ru: {
|
|
22858
|
+
search: 'Поиск и выполнение',
|
|
22859
|
+
placeholderListbox: 'Поиск и выполнение'
|
|
22786
22860
|
}
|
|
22787
22861
|
};
|
|
22788
22862
|
|
|
@@ -22861,6 +22935,7 @@ class PoSearchBaseComponent {
|
|
|
22861
22935
|
language;
|
|
22862
22936
|
_filterSelect;
|
|
22863
22937
|
_size = undefined;
|
|
22938
|
+
_keysLabel = [];
|
|
22864
22939
|
/**
|
|
22865
22940
|
* @optional
|
|
22866
22941
|
*
|
|
@@ -23021,15 +23096,22 @@ class PoSearchBaseComponent {
|
|
|
23021
23096
|
this._literals = {
|
|
23022
23097
|
...poSearchLiteralsDefault[poLocaleDefault],
|
|
23023
23098
|
...poSearchLiteralsDefault[this.language],
|
|
23099
|
+
...(this.type === 'execute' ? poSearchLiteralsDefaultExecute[this.language] : {}),
|
|
23024
23100
|
...value
|
|
23025
23101
|
};
|
|
23026
23102
|
}
|
|
23027
23103
|
else {
|
|
23028
|
-
this._literals =
|
|
23104
|
+
this._literals = {
|
|
23105
|
+
...poSearchLiteralsDefault[this.language],
|
|
23106
|
+
...(this.type === 'execute' ? poSearchLiteralsDefaultExecute[this.language] : {})
|
|
23107
|
+
};
|
|
23029
23108
|
}
|
|
23030
23109
|
}
|
|
23031
23110
|
get literals() {
|
|
23032
|
-
return this._literals ||
|
|
23111
|
+
return (this._literals || {
|
|
23112
|
+
...poSearchLiteralsDefault[this.language],
|
|
23113
|
+
...(this.type === 'execute' ? poSearchLiteralsDefaultExecute[this.language] : {})
|
|
23114
|
+
});
|
|
23033
23115
|
}
|
|
23034
23116
|
/**
|
|
23035
23117
|
* @optional
|
|
@@ -23055,6 +23137,8 @@ class PoSearchBaseComponent {
|
|
|
23055
23137
|
* - `action`: Realiza a busca a cada caractere digitado.
|
|
23056
23138
|
* - `trigger`: Realiza a busca ao pressionar `enter` ou clicar no ícone de busca.
|
|
23057
23139
|
* - `locate`: Modo manual. Exibe botões e contador, mas não executa buscas — controle é do desenvolvedor.
|
|
23140
|
+
* - `execute`: Executa uma ação ou realiza um redirecionamento ao selecionar um item no `listbox`.
|
|
23141
|
+
* Para este tipo, é necessário informar as propriedades `action` ou `url` nos itens definidos em `p-items`.
|
|
23058
23142
|
*
|
|
23059
23143
|
* @default `action`
|
|
23060
23144
|
*/
|
|
@@ -23092,6 +23176,32 @@ class PoSearchBaseComponent {
|
|
|
23092
23176
|
get size() {
|
|
23093
23177
|
return this._size ?? getDefaultSizeFn(PoFieldSize);
|
|
23094
23178
|
}
|
|
23179
|
+
/**
|
|
23180
|
+
* @optional
|
|
23181
|
+
*
|
|
23182
|
+
* @description
|
|
23183
|
+
*
|
|
23184
|
+
* Define os nomes das propriedades do objeto que serão exibidos como rótulos (labels) no `listbox` quando a propriedade
|
|
23185
|
+
* `p-show-listbox` estiver habilitada.
|
|
23186
|
+
*
|
|
23187
|
+
* Deve ser informado um array de strings contendo até **3 propriedades**.
|
|
23188
|
+
*
|
|
23189
|
+
* Exemplo de uso:
|
|
23190
|
+
* ```ts
|
|
23191
|
+
* keysLabel: Array<string> = ['nome', 'email', 'country'];
|
|
23192
|
+
* ```
|
|
23193
|
+
*/
|
|
23194
|
+
set keysLabel(value) {
|
|
23195
|
+
if (value && value.length > 3) {
|
|
23196
|
+
this._keysLabel = value.slice(0, 3);
|
|
23197
|
+
}
|
|
23198
|
+
else {
|
|
23199
|
+
this._keysLabel = value;
|
|
23200
|
+
}
|
|
23201
|
+
}
|
|
23202
|
+
get keysLabel() {
|
|
23203
|
+
return this._keysLabel;
|
|
23204
|
+
}
|
|
23095
23205
|
/**
|
|
23096
23206
|
* @optional
|
|
23097
23207
|
*
|
|
@@ -23158,6 +23268,15 @@ class PoSearchBaseComponent {
|
|
|
23158
23268
|
* > Compatível com a propriedade `p-search-type` do tipo `locate`.
|
|
23159
23269
|
*/
|
|
23160
23270
|
locatePrevious = new EventEmitter();
|
|
23271
|
+
/**
|
|
23272
|
+
* @optional
|
|
23273
|
+
*
|
|
23274
|
+
* @description
|
|
23275
|
+
*
|
|
23276
|
+
* Evento disparado ao clicar no botão de ação exibido no rodapé do `listbox`.
|
|
23277
|
+
* O texto exibido pode ser configurado por meio do literal `footerActionListbox`.
|
|
23278
|
+
*/
|
|
23279
|
+
footerAction = new EventEmitter();
|
|
23161
23280
|
constructor(languageService) {
|
|
23162
23281
|
this.language = languageService.getShortLanguage();
|
|
23163
23282
|
}
|
|
@@ -23166,7 +23285,7 @@ class PoSearchBaseComponent {
|
|
|
23166
23285
|
return _values.map(value => (typeof value === 'object' ? value : { label: value, value }));
|
|
23167
23286
|
}
|
|
23168
23287
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoSearchBaseComponent, deps: [{ token: PoLanguageService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
23169
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.7", type: PoSearchBaseComponent, isStandalone: true, inputs: { ariaLabel: ["p-aria-label", "ariaLabel"], disabled: ["p-disabled", "disabled", convertToBoolean], filterKeys: ["p-filter-keys", "filterKeys"], filterSelect: ["p-filter-select", "filterSelect"], filterType: ["p-filter-type", "filterType"], icon: ["p-icon", "icon"], items: ["p-items", "items"], literals: ["p-literals", "literals"], locateSummary: ["p-locate-summary", "locateSummary"], type: ["p-search-type", "type"], showListbox: ["p-show-listbox", "showListbox", convertToBoolean], size: ["p-size", "size"] }, outputs: { blur: "p-blur", changeModel: "p-change-model", filter: "p-filter", filteredItemsChange: "p-filtered-items-change", listboxOnClick: "p-listbox-onclick", locateNext: "p-locate-next", locatePrevious: "p-locate-previous" }, ngImport: i0 });
|
|
23288
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.7", type: PoSearchBaseComponent, isStandalone: true, inputs: { ariaLabel: ["p-aria-label", "ariaLabel"], disabled: ["p-disabled", "disabled", convertToBoolean], filterKeys: ["p-filter-keys", "filterKeys"], filterSelect: ["p-filter-select", "filterSelect"], filterType: ["p-filter-type", "filterType"], icon: ["p-icon", "icon"], items: ["p-items", "items"], literals: ["p-literals", "literals"], locateSummary: ["p-locate-summary", "locateSummary"], type: ["p-search-type", "type"], showListbox: ["p-show-listbox", "showListbox", convertToBoolean], size: ["p-size", "size"], keysLabel: ["p-keys-label", "keysLabel"] }, outputs: { blur: "p-blur", changeModel: "p-change-model", filter: "p-filter", filteredItemsChange: "p-filtered-items-change", listboxOnClick: "p-listbox-onclick", locateNext: "p-locate-next", locatePrevious: "p-locate-previous", footerAction: "p-footer-action-listbox" }, ngImport: i0 });
|
|
23170
23289
|
}
|
|
23171
23290
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoSearchBaseComponent, decorators: [{
|
|
23172
23291
|
type: Directive
|
|
@@ -23206,6 +23325,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
23206
23325
|
}], size: [{
|
|
23207
23326
|
type: Input,
|
|
23208
23327
|
args: ['p-size']
|
|
23328
|
+
}], keysLabel: [{
|
|
23329
|
+
type: Input,
|
|
23330
|
+
args: ['p-keys-label']
|
|
23209
23331
|
}], blur: [{
|
|
23210
23332
|
type: Output,
|
|
23211
23333
|
args: ['p-blur']
|
|
@@ -23227,10 +23349,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
|
|
|
23227
23349
|
}], locatePrevious: [{
|
|
23228
23350
|
type: Output,
|
|
23229
23351
|
args: ['p-locate-previous']
|
|
23352
|
+
}], footerAction: [{
|
|
23353
|
+
type: Output,
|
|
23354
|
+
args: ['p-footer-action-listbox']
|
|
23230
23355
|
}] } });
|
|
23231
23356
|
|
|
23232
23357
|
const poSearchContainerOffset = 8;
|
|
23233
23358
|
const poSearchContainerPositionDefault = 'bottom';
|
|
23359
|
+
const ID_SEARCH_BUTTON_CLEAN = 'search-button-clean';
|
|
23234
23360
|
/**
|
|
23235
23361
|
* @docsExtends PoSearchBaseComponent
|
|
23236
23362
|
*
|
|
@@ -23264,6 +23390,11 @@ const poSearchContainerPositionDefault = 'bottom';
|
|
|
23264
23390
|
* <file name="sample-po-search-filter-select/sample-po-search-filter-select.component.ts"> </file>
|
|
23265
23391
|
* </example>
|
|
23266
23392
|
*
|
|
23393
|
+
* <example name="po-search-execute" title="PO Search Form Fields with Execute">
|
|
23394
|
+
* <file name="sample-po-search-execute/sample-po-search-execute.component.html"> </file>
|
|
23395
|
+
* <file name="sample-po-search-execute/sample-po-search-execute.component.ts"> </file>
|
|
23396
|
+
* </example>
|
|
23397
|
+
*
|
|
23267
23398
|
* <example name="po-search-fields-locate" title="PO Search Form Fields with Locate">
|
|
23268
23399
|
* <file name="sample-po-search-fields-locate/sample-po-search-fields-locate.component.html"> </file>
|
|
23269
23400
|
* <file name="sample-po-search-fields-locate/sample-po-search-fields-locate.component.ts"> </file>
|
|
@@ -23310,6 +23441,11 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23310
23441
|
searchFilter = {};
|
|
23311
23442
|
searchFilterSelectLabel;
|
|
23312
23443
|
searchFilterSelectActions;
|
|
23444
|
+
idSearchButtonClean = ID_SEARCH_BUTTON_CLEAN;
|
|
23445
|
+
showFooterActionListbox = false;
|
|
23446
|
+
showSeparator = false;
|
|
23447
|
+
placeholderListbox;
|
|
23448
|
+
modelSelected;
|
|
23313
23449
|
constructor() {
|
|
23314
23450
|
const languageService = inject(PoLanguageService);
|
|
23315
23451
|
super(languageService);
|
|
@@ -23318,11 +23454,12 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23318
23454
|
ngOnInit() {
|
|
23319
23455
|
this.filteredItems = this.items;
|
|
23320
23456
|
if (this.showListbox) {
|
|
23321
|
-
this.listboxFilteredItems = this.listboxItems;
|
|
23457
|
+
this.listboxFilteredItems = this.keysLabel.length === 0 ? this.listboxItems : this.items;
|
|
23322
23458
|
}
|
|
23323
23459
|
if (this.filterSelect) {
|
|
23324
23460
|
this.createDropdownFilterSelect();
|
|
23325
23461
|
}
|
|
23462
|
+
this.showFooterActionListbox = this.footerAction.observed;
|
|
23326
23463
|
}
|
|
23327
23464
|
ngOnChanges(changes) {
|
|
23328
23465
|
if (changes.filterSelect?.currentValue) {
|
|
@@ -23332,6 +23469,18 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23332
23469
|
this.updateShowSearchLocateControls();
|
|
23333
23470
|
this.updatePaddingRightLocate(true);
|
|
23334
23471
|
}
|
|
23472
|
+
if (changes.keysLabel) {
|
|
23473
|
+
this.showSeparator = this.keysLabel.length > 1;
|
|
23474
|
+
}
|
|
23475
|
+
this.configureSearchModeExecute(changes);
|
|
23476
|
+
}
|
|
23477
|
+
configureSearchModeExecute(changes) {
|
|
23478
|
+
if (changes.type?.currentValue === 'execute') {
|
|
23479
|
+
this.showListbox = true;
|
|
23480
|
+
if (!this.keysLabel.length && this.filterKeys?.length) {
|
|
23481
|
+
this.keysLabel = [...this.filterKeys.slice(0, 3)];
|
|
23482
|
+
}
|
|
23483
|
+
}
|
|
23335
23484
|
}
|
|
23336
23485
|
ngOnDestroy() {
|
|
23337
23486
|
this.removeListeners();
|
|
@@ -23342,8 +23491,11 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23342
23491
|
clearSearch() {
|
|
23343
23492
|
this.poSearchInput.nativeElement.value = '';
|
|
23344
23493
|
this.onSearchChange('', true);
|
|
23345
|
-
this.
|
|
23346
|
-
this.
|
|
23494
|
+
this.adjustContainerPosition();
|
|
23495
|
+
this.changeDetector.detectChanges();
|
|
23496
|
+
if (!this.showFooterActionListbox) {
|
|
23497
|
+
this.onCloseListbox();
|
|
23498
|
+
}
|
|
23347
23499
|
}
|
|
23348
23500
|
onCleanKeydown(event) {
|
|
23349
23501
|
const isEsc = event.key === 'Escape';
|
|
@@ -23357,7 +23509,9 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23357
23509
|
onEnterKey(event) {
|
|
23358
23510
|
if (this.type !== 'locate') {
|
|
23359
23511
|
if (this.listboxOpen) {
|
|
23360
|
-
this.
|
|
23512
|
+
if (!this.showFooterActionListbox) {
|
|
23513
|
+
this.closeListbox();
|
|
23514
|
+
}
|
|
23361
23515
|
}
|
|
23362
23516
|
else {
|
|
23363
23517
|
this.onSearchChange(event.target.value, this.type === 'trigger', true);
|
|
@@ -23369,19 +23523,13 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23369
23523
|
const searchTextInitial = searchText;
|
|
23370
23524
|
if (this.type === 'locate' && this.changeModel.observed) {
|
|
23371
23525
|
this.changeModel.emit(searchTextInitial);
|
|
23526
|
+
this.modelSelected = searchTextInitial;
|
|
23372
23527
|
return;
|
|
23373
23528
|
}
|
|
23374
23529
|
if (searchText !== undefined) {
|
|
23375
23530
|
searchText = searchText.toLowerCase();
|
|
23376
23531
|
}
|
|
23377
23532
|
this.isFiltering = true;
|
|
23378
|
-
if (this.showListbox && !buttonClick && searchText.length > 0) {
|
|
23379
|
-
this.openListbox();
|
|
23380
|
-
this.listboxFilteredItems = this.getListboxFilteredItems(searchText);
|
|
23381
|
-
}
|
|
23382
|
-
if (searchText.length === 0) {
|
|
23383
|
-
this.listboxFilteredItems = this.listboxItems;
|
|
23384
|
-
}
|
|
23385
23533
|
if (activated && !this.listboxItemclicked) {
|
|
23386
23534
|
this.updateFilteredItems(searchText);
|
|
23387
23535
|
this.filteredItemsChange.emit(this.filteredItems);
|
|
@@ -23399,6 +23547,17 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23399
23547
|
}
|
|
23400
23548
|
this.filter.emit(this.searchFilter);
|
|
23401
23549
|
this.changeModel.emit(searchText);
|
|
23550
|
+
this.modelSelected = searchTextInitial;
|
|
23551
|
+
}
|
|
23552
|
+
if (this.showListbox && !buttonClick && (searchText.length > 0 || this.showFooterActionListbox)) {
|
|
23553
|
+
this.openListbox();
|
|
23554
|
+
this.listboxFilteredItems = this.getListboxFilteredItems(searchText);
|
|
23555
|
+
this.handlerPlaceholderListbox();
|
|
23556
|
+
}
|
|
23557
|
+
else {
|
|
23558
|
+
if (searchText.length === 0) {
|
|
23559
|
+
this.listboxFilteredItems = this.keysLabel.length === 0 ? this.listboxItems : this.items;
|
|
23560
|
+
}
|
|
23402
23561
|
}
|
|
23403
23562
|
if (this.listboxItemclicked) {
|
|
23404
23563
|
this.listboxItemclicked = false;
|
|
@@ -23423,6 +23582,9 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23423
23582
|
return valuesToSearch.some(value => this.filterValue(value, searchText));
|
|
23424
23583
|
}
|
|
23425
23584
|
getListboxFilteredItems(searchText) {
|
|
23585
|
+
if (this.keysLabel.length > 0) {
|
|
23586
|
+
return searchText.length ? this.filteredItems : [];
|
|
23587
|
+
}
|
|
23426
23588
|
return this.listboxItems.filter(item => this.filterValue(item.value, searchText));
|
|
23427
23589
|
}
|
|
23428
23590
|
filterValue(value, searchText) {
|
|
@@ -23457,12 +23619,19 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23457
23619
|
if (!event || event.code === 'Enter') {
|
|
23458
23620
|
this.listboxItemclicked = true;
|
|
23459
23621
|
}
|
|
23460
|
-
|
|
23461
|
-
this.
|
|
23622
|
+
let value = option.value;
|
|
23623
|
+
if (this.keysLabel.length) {
|
|
23624
|
+
value = option[this.keysLabel[0]];
|
|
23625
|
+
}
|
|
23626
|
+
this.poSearchInput.nativeElement.value = value;
|
|
23627
|
+
this.listboxOnClick.emit(value);
|
|
23628
|
+
if (this.keysLabel.length) {
|
|
23629
|
+
this.items.forEach(item => delete item.selected);
|
|
23630
|
+
}
|
|
23462
23631
|
this.onCloseListbox();
|
|
23463
23632
|
if (this.type === 'action') {
|
|
23464
23633
|
this.listboxItemclicked = false;
|
|
23465
|
-
this.onSearchChange(
|
|
23634
|
+
this.onSearchChange(value.toString(), true, true);
|
|
23466
23635
|
}
|
|
23467
23636
|
}
|
|
23468
23637
|
onBlur() {
|
|
@@ -23474,7 +23643,7 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23474
23643
|
if (this.blur.observed) {
|
|
23475
23644
|
this.blur.emit();
|
|
23476
23645
|
}
|
|
23477
|
-
if (this.listboxOpen) {
|
|
23646
|
+
if (this.listboxOpen && !this.showFooterActionListbox) {
|
|
23478
23647
|
if (!this.poListbox.items.length) {
|
|
23479
23648
|
this.closeListbox();
|
|
23480
23649
|
}
|
|
@@ -23489,6 +23658,7 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23489
23658
|
this.updateShowSearchLocateControls();
|
|
23490
23659
|
this.updatePaddingRightLocate(false);
|
|
23491
23660
|
}
|
|
23661
|
+
this.openListboxFooterAction();
|
|
23492
23662
|
}
|
|
23493
23663
|
onInputHandler(value) {
|
|
23494
23664
|
if (this.type === 'locate') {
|
|
@@ -23498,7 +23668,9 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23498
23668
|
}
|
|
23499
23669
|
else {
|
|
23500
23670
|
this.onSearchChange(value, false);
|
|
23501
|
-
this.onSearchChange(value, this.type
|
|
23671
|
+
this.onSearchChange(value, ['action', 'execute'].includes(this.type));
|
|
23672
|
+
this.adjustContainerPosition();
|
|
23673
|
+
this.changeDetector.detectChanges();
|
|
23502
23674
|
}
|
|
23503
23675
|
}
|
|
23504
23676
|
onKeyDown(event) {
|
|
@@ -23531,7 +23703,7 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23531
23703
|
}
|
|
23532
23704
|
}
|
|
23533
23705
|
focusItem() {
|
|
23534
|
-
const listboxItemList =
|
|
23706
|
+
const listboxItemList = this.poListboxElement?.nativeElement?.querySelectorAll('.po-listbox-item');
|
|
23535
23707
|
setTimeout(() => {
|
|
23536
23708
|
Array.from(listboxItemList).forEach((el) => {
|
|
23537
23709
|
el.tabIndex = -1;
|
|
@@ -23554,11 +23726,13 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23554
23726
|
}
|
|
23555
23727
|
}
|
|
23556
23728
|
openListbox() {
|
|
23557
|
-
this.listboxOpen
|
|
23558
|
-
|
|
23559
|
-
|
|
23560
|
-
|
|
23561
|
-
|
|
23729
|
+
if (!this.listboxOpen) {
|
|
23730
|
+
this.listboxOpen = true;
|
|
23731
|
+
this.changeDetector.detectChanges();
|
|
23732
|
+
this.initializeListeners();
|
|
23733
|
+
this.poSearchInput.nativeElement.focus();
|
|
23734
|
+
this.setContainerPosition();
|
|
23735
|
+
}
|
|
23562
23736
|
}
|
|
23563
23737
|
closeListbox() {
|
|
23564
23738
|
this.listboxOpen = false;
|
|
@@ -23568,7 +23742,8 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23568
23742
|
clickedOutsideInput(event) {
|
|
23569
23743
|
if (this.listboxOpen &&
|
|
23570
23744
|
!this.poSearchInput?.nativeElement?.contains(event.target) &&
|
|
23571
|
-
!this.poListboxElement?.nativeElement?.contains(event.target)
|
|
23745
|
+
!this.poListboxElement?.nativeElement?.contains(event.target) &&
|
|
23746
|
+
!(this.showFooterActionListbox && event.target.closest(`#${this.idSearchButtonClean}`))) {
|
|
23572
23747
|
this.closeListbox();
|
|
23573
23748
|
}
|
|
23574
23749
|
}
|
|
@@ -23657,12 +23832,30 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
23657
23832
|
this.onSearchChange(this.getInputValue(), true);
|
|
23658
23833
|
}
|
|
23659
23834
|
}
|
|
23835
|
+
handlerFooterActionListbox() {
|
|
23836
|
+
this.footerAction.emit();
|
|
23837
|
+
this.closeListbox();
|
|
23838
|
+
}
|
|
23839
|
+
openListboxFooterAction() {
|
|
23840
|
+
if (this.showFooterActionListbox && this.showListbox && !this.modelSelected) {
|
|
23841
|
+
this.listboxFilteredItems = [];
|
|
23842
|
+
this.handlerPlaceholderListbox();
|
|
23843
|
+
this.openListbox();
|
|
23844
|
+
}
|
|
23845
|
+
}
|
|
23846
|
+
handlerPlaceholderListbox() {
|
|
23847
|
+
if (this.showFooterActionListbox && !this.listboxFilteredItems.length && this.getInputValue().length == 0) {
|
|
23848
|
+
this.placeholderListbox = this.literals.placeholderListbox;
|
|
23849
|
+
return;
|
|
23850
|
+
}
|
|
23851
|
+
this.placeholderListbox = null;
|
|
23852
|
+
}
|
|
23660
23853
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23661
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.7", type: PoSearchComponent, isStandalone: false, selector: "po-search", providers: [PoControlPositionService], viewQueries: [{ propertyName: "locateCounter", first: true, predicate: ["locateCounter"], descendants: true }, { propertyName: "poSearchInput", first: true, predicate: ["poSearchInput"], descendants: true, read: ElementRef, static: true }, { propertyName: "poListboxContainerElement", first: true, predicate: ["poListboxContainerElement"], descendants: true, read: ElementRef }, { propertyName: "poListboxElement", first: true, predicate: ["poListboxElement"], descendants: true, read: ElementRef }, { propertyName: "poListbox", first: true, predicate: ["poListbox"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"po-search\"\n [class.po-search-disabled]=\"disabled\"\n [class.po-search-filter-locate]=\"type === 'locate'\"\n [attr.p-search-type]=\"type === 'locate'\"\n [attr.p-size]=\"size\"\n>\n @if (filterSelect && type !== 'locate') {\n <div class=\"po-search-select\">\n <po-dropdown\n [p-label]=\"searchFilterSelectLabel\"\n [p-disabled]=\"disabled\"\n [p-actions]=\"searchFilterSelectActions\"\n [p-size]=\"size\"\n >\n </po-dropdown>\n </div>\n }\n\n @if (type === 'action' || type === 'locate') {\n <div class=\"po-search-icon\">\n <po-icon [p-icon]=\"icon ? icon : 'ICON_SEARCH'\"></po-icon>\n </div>\n }\n\n <input\n #poSearchInput\n class=\"po-search-input\"\n type=\"text\"\n [ariaLabel]=\"ariaLabel\"\n [class.po-search-input-clean]=\"!!poSearchInput.value && !disabled && type !== 'locate'\"\n [class.po-search-input-trigger]=\"type === 'trigger'\"\n [style.padding-right.px]=\"dynamicPaddingRight\"\n [disabled]=\"disabled\"\n [placeholder]=\"literals.search\"\n (input)=\"onInputHandler($event.target.value)\"\n (keyup.enter)=\"onEnterKey($event)\"\n (keydown)=\"onKeyDown($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n />\n\n <div class=\"po-search-buttons\">\n @if (type === 'locate' && poSearchInput.value && !disabled) {\n <span\n #locateCounter\n class=\"po-search-locate-counter\"\n id=\"summary\"\n [attr.aria-label]=\"\n literals.result +\n ' ' +\n (locateSummary?.currentIndex ?? 0) +\n ' ' +\n literals.of +\n ' ' +\n (locateSummary?.total ?? 0)\n \"\n >\n {{ locateSummary?.currentIndex ?? 0 }}/{{ locateSummary?.total ?? 0 }}\n </span>\n }\n\n @if (!!poSearchInput.value && !disabled) {\n <button\n
|
|
23854
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.7", type: PoSearchComponent, isStandalone: false, selector: "po-search", providers: [PoControlPositionService], viewQueries: [{ propertyName: "locateCounter", first: true, predicate: ["locateCounter"], descendants: true }, { propertyName: "poSearchInput", first: true, predicate: ["poSearchInput"], descendants: true, read: ElementRef, static: true }, { propertyName: "poListboxContainerElement", first: true, predicate: ["poListboxContainerElement"], descendants: true, read: ElementRef }, { propertyName: "poListboxElement", first: true, predicate: ["poListboxElement"], descendants: true, read: ElementRef }, { propertyName: "poListbox", first: true, predicate: ["poListbox"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"po-search\"\n [class.po-search-disabled]=\"disabled\"\n [class.po-search-filter-locate]=\"type === 'locate'\"\n [attr.p-search-type]=\"type === 'locate'\"\n [attr.p-size]=\"size\"\n>\n @if (filterSelect && type !== 'locate') {\n <div class=\"po-search-select\">\n <po-dropdown\n [p-label]=\"searchFilterSelectLabel\"\n [p-disabled]=\"disabled\"\n [p-actions]=\"searchFilterSelectActions\"\n [p-size]=\"size\"\n >\n </po-dropdown>\n </div>\n }\n\n @if (type === 'action' || type === 'locate' || type === 'execute') {\n <div class=\"po-search-icon\">\n <po-icon [p-icon]=\"icon ? icon : 'ICON_SEARCH'\"></po-icon>\n </div>\n }\n\n <input\n #poSearchInput\n class=\"po-search-input\"\n type=\"text\"\n [ariaLabel]=\"ariaLabel\"\n [class.po-search-input-clean]=\"!!poSearchInput.value && !disabled && type !== 'locate'\"\n [class.po-search-input-trigger]=\"type === 'trigger'\"\n [style.padding-right.px]=\"dynamicPaddingRight\"\n [disabled]=\"disabled\"\n [placeholder]=\"literals.search\"\n (input)=\"onInputHandler($event.target.value)\"\n (keyup.enter)=\"onEnterKey($event)\"\n (keydown)=\"onKeyDown($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n />\n\n <div class=\"po-search-buttons\">\n @if (type === 'locate' && poSearchInput.value && !disabled) {\n <span\n #locateCounter\n class=\"po-search-locate-counter\"\n id=\"summary\"\n [attr.aria-label]=\"\n literals.result +\n ' ' +\n (locateSummary?.currentIndex ?? 0) +\n ' ' +\n literals.of +\n ' ' +\n (locateSummary?.total ?? 0)\n \"\n >\n {{ locateSummary?.currentIndex ?? 0 }}/{{ locateSummary?.total ?? 0 }}\n </span>\n }\n\n @if (!!poSearchInput.value && !disabled) {\n <div [id]=\"idSearchButtonClean\">\n <button\n class=\"po-search-button po-search-button-clean\"\n type=\"button\"\n [ariaLabel]=\"literals.clean\"\n (click)=\"clearSearch()\"\n (keydown.enter)=\"clearSearch()\"\n (keydown)=\"onCleanKeydown($event)\"\n >\n <po-clean class=\"po-icon-input\" [p-size]=\"size\"></po-clean>\n </button>\n </div>\n }\n\n @if (type === 'trigger') {\n <button\n class=\"po-search-button po-search-button-trigger\"\n type=\"button\"\n [ariaLabel]=\"literals.search\"\n [disabled]=\"disabled\"\n (click)=\"onSearchChange(poSearchInput.value, true, true)\"\n (keydown.enter)=\"onSearchChange(poSearchInput.value, true, true)\"\n >\n <po-icon [p-icon]=\"icon ? icon : 'ICON_SEARCH'\"> </po-icon>\n </button>\n }\n\n @if (showSearchLocateControls) {\n <div class=\"po-search-locate-controls\">\n <div class=\"po-search-divider\"></div>\n <button\n name=\"btnArrowUp\"\n class=\"po-search-button\"\n [ariaLabel]=\"literals.next\"\n [disabled]=\"disabled || !locateSummary?.total\"\n (click)=\"locateNext.emit()\"\n >\n <po-icon p-icon=\"ICON_ARROW_DOWN\"> </po-icon>\n </button>\n\n <button\n name=\"btnArrowDown\"\n class=\"po-search-button\"\n [ariaLabel]=\"literals.previous\"\n [disabled]=\"disabled || !locateSummary?.total\"\n (click)=\"locatePrevious.emit()\"\n >\n <po-icon p-icon=\"ICON_ARROW_UP\"> </po-icon>\n </button>\n </div>\n }\n </div>\n</div>\n\n@if (type !== 'locate') {\n <div #poListboxContainerElement class=\"po-search-listbox-container\" [hidden]=\"!listboxOpen\">\n <po-listbox\n #poListbox\n #poListboxElement\n p-type=\"option\"\n [p-items]=\"listboxFilteredItems\"\n (p-selectcombo-item)=\"onListboxClick($event, $event.event)\"\n [p-visible]=\"listboxOpen\"\n [p-filter-mode]=\"filterType\"\n [p-should-mark-letter]=\"shouldMarkLetters\"\n [p-filtering]=\"isFiltering\"\n [p-search-value]=\"getInputValue()\"\n [p-size]=\"size\"\n (p-close)=\"onCloseListbox()\"\n [p-literals]=\"literals\"\n [p-separator]=\"showSeparator\"\n [p-keys-label]=\"keysLabel\"\n [p-footer-action-listbox]=\"showFooterActionListbox\"\n (p-footer-action-listbox-event)=\"handlerFooterActionListbox()\"\n [p-placeholder-listbox]=\"placeholderListbox\"\n ></po-listbox>\n </div>\n}\n", dependencies: [{ kind: "component", type: PoCleanComponent, selector: "po-clean" }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "component", type: PoListBoxComponent, selector: "po-listbox" }, { kind: "component", type: PoDropdownComponent, selector: "po-dropdown" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
23662
23855
|
}
|
|
23663
23856
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: PoSearchComponent, decorators: [{
|
|
23664
23857
|
type: Component,
|
|
23665
|
-
args: [{ selector: 'po-search', providers: [PoControlPositionService], changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div\n class=\"po-search\"\n [class.po-search-disabled]=\"disabled\"\n [class.po-search-filter-locate]=\"type === 'locate'\"\n [attr.p-search-type]=\"type === 'locate'\"\n [attr.p-size]=\"size\"\n>\n @if (filterSelect && type !== 'locate') {\n <div class=\"po-search-select\">\n <po-dropdown\n [p-label]=\"searchFilterSelectLabel\"\n [p-disabled]=\"disabled\"\n [p-actions]=\"searchFilterSelectActions\"\n [p-size]=\"size\"\n >\n </po-dropdown>\n </div>\n }\n\n @if (type === 'action' || type === 'locate') {\n <div class=\"po-search-icon\">\n <po-icon [p-icon]=\"icon ? icon : 'ICON_SEARCH'\"></po-icon>\n </div>\n }\n\n <input\n #poSearchInput\n class=\"po-search-input\"\n type=\"text\"\n [ariaLabel]=\"ariaLabel\"\n [class.po-search-input-clean]=\"!!poSearchInput.value && !disabled && type !== 'locate'\"\n [class.po-search-input-trigger]=\"type === 'trigger'\"\n [style.padding-right.px]=\"dynamicPaddingRight\"\n [disabled]=\"disabled\"\n [placeholder]=\"literals.search\"\n (input)=\"onInputHandler($event.target.value)\"\n (keyup.enter)=\"onEnterKey($event)\"\n (keydown)=\"onKeyDown($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n />\n\n <div class=\"po-search-buttons\">\n @if (type === 'locate' && poSearchInput.value && !disabled) {\n <span\n #locateCounter\n class=\"po-search-locate-counter\"\n id=\"summary\"\n [attr.aria-label]=\"\n literals.result +\n ' ' +\n (locateSummary?.currentIndex ?? 0) +\n ' ' +\n literals.of +\n ' ' +\n (locateSummary?.total ?? 0)\n \"\n >\n {{ locateSummary?.currentIndex ?? 0 }}/{{ locateSummary?.total ?? 0 }}\n </span>\n }\n\n @if (!!poSearchInput.value && !disabled) {\n <button\n
|
|
23858
|
+
args: [{ selector: 'po-search', providers: [PoControlPositionService], changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div\n class=\"po-search\"\n [class.po-search-disabled]=\"disabled\"\n [class.po-search-filter-locate]=\"type === 'locate'\"\n [attr.p-search-type]=\"type === 'locate'\"\n [attr.p-size]=\"size\"\n>\n @if (filterSelect && type !== 'locate') {\n <div class=\"po-search-select\">\n <po-dropdown\n [p-label]=\"searchFilterSelectLabel\"\n [p-disabled]=\"disabled\"\n [p-actions]=\"searchFilterSelectActions\"\n [p-size]=\"size\"\n >\n </po-dropdown>\n </div>\n }\n\n @if (type === 'action' || type === 'locate' || type === 'execute') {\n <div class=\"po-search-icon\">\n <po-icon [p-icon]=\"icon ? icon : 'ICON_SEARCH'\"></po-icon>\n </div>\n }\n\n <input\n #poSearchInput\n class=\"po-search-input\"\n type=\"text\"\n [ariaLabel]=\"ariaLabel\"\n [class.po-search-input-clean]=\"!!poSearchInput.value && !disabled && type !== 'locate'\"\n [class.po-search-input-trigger]=\"type === 'trigger'\"\n [style.padding-right.px]=\"dynamicPaddingRight\"\n [disabled]=\"disabled\"\n [placeholder]=\"literals.search\"\n (input)=\"onInputHandler($event.target.value)\"\n (keyup.enter)=\"onEnterKey($event)\"\n (keydown)=\"onKeyDown($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n />\n\n <div class=\"po-search-buttons\">\n @if (type === 'locate' && poSearchInput.value && !disabled) {\n <span\n #locateCounter\n class=\"po-search-locate-counter\"\n id=\"summary\"\n [attr.aria-label]=\"\n literals.result +\n ' ' +\n (locateSummary?.currentIndex ?? 0) +\n ' ' +\n literals.of +\n ' ' +\n (locateSummary?.total ?? 0)\n \"\n >\n {{ locateSummary?.currentIndex ?? 0 }}/{{ locateSummary?.total ?? 0 }}\n </span>\n }\n\n @if (!!poSearchInput.value && !disabled) {\n <div [id]=\"idSearchButtonClean\">\n <button\n class=\"po-search-button po-search-button-clean\"\n type=\"button\"\n [ariaLabel]=\"literals.clean\"\n (click)=\"clearSearch()\"\n (keydown.enter)=\"clearSearch()\"\n (keydown)=\"onCleanKeydown($event)\"\n >\n <po-clean class=\"po-icon-input\" [p-size]=\"size\"></po-clean>\n </button>\n </div>\n }\n\n @if (type === 'trigger') {\n <button\n class=\"po-search-button po-search-button-trigger\"\n type=\"button\"\n [ariaLabel]=\"literals.search\"\n [disabled]=\"disabled\"\n (click)=\"onSearchChange(poSearchInput.value, true, true)\"\n (keydown.enter)=\"onSearchChange(poSearchInput.value, true, true)\"\n >\n <po-icon [p-icon]=\"icon ? icon : 'ICON_SEARCH'\"> </po-icon>\n </button>\n }\n\n @if (showSearchLocateControls) {\n <div class=\"po-search-locate-controls\">\n <div class=\"po-search-divider\"></div>\n <button\n name=\"btnArrowUp\"\n class=\"po-search-button\"\n [ariaLabel]=\"literals.next\"\n [disabled]=\"disabled || !locateSummary?.total\"\n (click)=\"locateNext.emit()\"\n >\n <po-icon p-icon=\"ICON_ARROW_DOWN\"> </po-icon>\n </button>\n\n <button\n name=\"btnArrowDown\"\n class=\"po-search-button\"\n [ariaLabel]=\"literals.previous\"\n [disabled]=\"disabled || !locateSummary?.total\"\n (click)=\"locatePrevious.emit()\"\n >\n <po-icon p-icon=\"ICON_ARROW_UP\"> </po-icon>\n </button>\n </div>\n }\n </div>\n</div>\n\n@if (type !== 'locate') {\n <div #poListboxContainerElement class=\"po-search-listbox-container\" [hidden]=\"!listboxOpen\">\n <po-listbox\n #poListbox\n #poListboxElement\n p-type=\"option\"\n [p-items]=\"listboxFilteredItems\"\n (p-selectcombo-item)=\"onListboxClick($event, $event.event)\"\n [p-visible]=\"listboxOpen\"\n [p-filter-mode]=\"filterType\"\n [p-should-mark-letter]=\"shouldMarkLetters\"\n [p-filtering]=\"isFiltering\"\n [p-search-value]=\"getInputValue()\"\n [p-size]=\"size\"\n (p-close)=\"onCloseListbox()\"\n [p-literals]=\"literals\"\n [p-separator]=\"showSeparator\"\n [p-keys-label]=\"keysLabel\"\n [p-footer-action-listbox]=\"showFooterActionListbox\"\n (p-footer-action-listbox-event)=\"handlerFooterActionListbox()\"\n [p-placeholder-listbox]=\"placeholderListbox\"\n ></po-listbox>\n </div>\n}\n" }]
|
|
23666
23859
|
}], ctorParameters: () => [], propDecorators: { locateCounter: [{
|
|
23667
23860
|
type: ViewChild,
|
|
23668
23861
|
args: ['locateCounter', { static: false }]
|