@po-ui/ng-components 21.33.0-beta.1 → 21.34.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 +197 -75
- package/fesm2022/po-ui-ng-components.mjs.map +1 -1
- package/lib/components/po-chart/po-chart-base.component.d.ts +1 -1
- package/lib/components/po-dropdown/po-dropdown-base.component.d.ts +12 -10
- package/lib/components/po-dropdown/po-dropdown.component.d.ts +11 -10
- package/lib/components/po-listbox/po-listbox.component.d.ts +3 -0
- package/lib/components/po-popup/po-popup-action.interface.d.ts +24 -18
- package/lib/components/po-popup/po-popup-base.component.d.ts +8 -24
- package/lib/components/po-popup/po-popup.component.d.ts +9 -0
- package/package.json +4 -4
- package/po-ui-ng-components-21.34.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/v20/index.js +2 -2
- package/schematics/ng-update/v21/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/types/po-ui-ng-components.d.ts +69 -64
- package/po-ui-ng-components-21.33.0-beta.1.tgz +0 -0
|
@@ -4693,7 +4693,7 @@ class PoPopupBaseComponent {
|
|
|
4693
4693
|
if (!this._actions || this._actions.length === 0) {
|
|
4694
4694
|
return false;
|
|
4695
4695
|
}
|
|
4696
|
-
return this._actions.some(action => typeof action.
|
|
4696
|
+
return this._actions.some(action => typeof action.subItemsLazy === 'function' ||
|
|
4697
4697
|
(Array.isArray(action.subItems) && action.subItems.length > 0) ||
|
|
4698
4698
|
!!action.$subItemTemplate);
|
|
4699
4699
|
}
|
|
@@ -4701,9 +4701,7 @@ class PoPopupBaseComponent {
|
|
|
4701
4701
|
templateIcon = false;
|
|
4702
4702
|
/**
|
|
4703
4703
|
* Lista de ações que serão exibidas no componente.
|
|
4704
|
-
*
|
|
4705
|
-
* Aceita um *array* de `PoPopupAction` (carregado imediatamente) ou uma função que retorna um
|
|
4706
|
-
* `Observable<Array<PoPopupAction>>`, carregando o nível raiz de forma assíncrona na abertura.
|
|
4704
|
+
* Aceita um *array* de `PoPopupAction`.
|
|
4707
4705
|
*/
|
|
4708
4706
|
set actions(value) {
|
|
4709
4707
|
if (typeof value === 'function') {
|
|
@@ -4868,13 +4866,6 @@ class PoPopupBaseComponent {
|
|
|
4868
4866
|
get target() {
|
|
4869
4867
|
return this._target;
|
|
4870
4868
|
}
|
|
4871
|
-
/**
|
|
4872
|
-
* @optional
|
|
4873
|
-
*
|
|
4874
|
-
* @description
|
|
4875
|
-
*
|
|
4876
|
-
* Evento disparado ao fechar o popup.
|
|
4877
|
-
*/
|
|
4878
4869
|
closeEvent = new EventEmitter();
|
|
4879
4870
|
/**
|
|
4880
4871
|
* @optional
|
|
@@ -4882,29 +4873,21 @@ class PoPopupBaseComponent {
|
|
|
4882
4873
|
* @description
|
|
4883
4874
|
*
|
|
4884
4875
|
* Evento disparado a cada clique em um item do menu.
|
|
4885
|
-
*
|
|
4886
|
-
* Recebe o item clicado (`PoPopupAction`).
|
|
4876
|
+
* Retorna o item clicado (`PoDropdownAction`).
|
|
4887
4877
|
*
|
|
4888
4878
|
* > Não é disparado para a ação interna de voltar (`goBack`).
|
|
4889
4879
|
*/
|
|
4890
4880
|
clickItem = new EventEmitter();
|
|
4891
|
-
/**
|
|
4892
|
-
* @optional
|
|
4893
|
-
*
|
|
4894
|
-
* @description
|
|
4895
|
-
*
|
|
4896
|
-
* Evento disparado ao abrir o popup.
|
|
4897
|
-
*/
|
|
4898
4881
|
openEvent = new EventEmitter();
|
|
4899
4882
|
/**
|
|
4900
4883
|
* @optional
|
|
4901
4884
|
*
|
|
4902
4885
|
* @description
|
|
4903
4886
|
*
|
|
4904
|
-
* Evento disparado no momento em que a requisição assíncrona de um subnível é iniciada
|
|
4905
|
-
*
|
|
4887
|
+
* Evento disparado no momento em que a requisição assíncrona de um subnível é iniciada.
|
|
4888
|
+
* Retorna o item agrupador (`PoPopupAction`) que originou o carregamento.
|
|
4906
4889
|
*
|
|
4907
|
-
*
|
|
4890
|
+
* > Compatível com a propriedade PoPopupAction.subItemsLazy
|
|
4908
4891
|
*/
|
|
4909
4892
|
subItemsLoad = new EventEmitter();
|
|
4910
4893
|
/**
|
|
@@ -4913,7 +4896,8 @@ class PoPopupBaseComponent {
|
|
|
4913
4896
|
* @description
|
|
4914
4897
|
*
|
|
4915
4898
|
* Evento disparado no momento em que a requisição assíncrona do nível raiz é iniciada
|
|
4916
|
-
*
|
|
4899
|
+
*
|
|
4900
|
+
* > Compatível com a propriedade PoPopupAction.subItemsLazy
|
|
4917
4901
|
*/
|
|
4918
4902
|
rootItemsLoad = new EventEmitter();
|
|
4919
4903
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoPopupBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -9601,6 +9585,7 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
9601
9585
|
subItemsSkeletonPlaceholders = Array.from({ length: 3 }, (_, index) => index);
|
|
9602
9586
|
rootLazyLoad;
|
|
9603
9587
|
rootItemsLoad = new EventEmitter();
|
|
9588
|
+
contentChange = new EventEmitter();
|
|
9604
9589
|
loadedSubItems = {};
|
|
9605
9590
|
lastLoadedGroup = null;
|
|
9606
9591
|
rootLoaded = false;
|
|
@@ -9681,7 +9666,7 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
9681
9666
|
items: this.currentItems
|
|
9682
9667
|
});
|
|
9683
9668
|
this.currentGroup = group;
|
|
9684
|
-
if (typeof group.
|
|
9669
|
+
if (typeof group.subItemsLazy === 'function') {
|
|
9685
9670
|
this.loadSubItemsAsync(group, key);
|
|
9686
9671
|
}
|
|
9687
9672
|
else {
|
|
@@ -9702,11 +9687,12 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
9702
9687
|
this.lastLoadedGroup = group;
|
|
9703
9688
|
this.subItemsLoad.emit(group);
|
|
9704
9689
|
this.focusGroupHeader();
|
|
9705
|
-
const request$ = group.
|
|
9690
|
+
const request$ = group.subItemsLazy(group);
|
|
9706
9691
|
request$
|
|
9707
9692
|
.pipe(takeUntil(this.destroySubItems$), finalize(() => {
|
|
9708
9693
|
this.setSubItemsState(this.subItemsLoading, key, false);
|
|
9709
9694
|
this.changeDetector.detectChanges();
|
|
9695
|
+
this.contentChange.emit();
|
|
9710
9696
|
}))
|
|
9711
9697
|
.subscribe({
|
|
9712
9698
|
next: subItems => {
|
|
@@ -9728,6 +9714,16 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
9728
9714
|
}
|
|
9729
9715
|
});
|
|
9730
9716
|
}
|
|
9717
|
+
onRetryKeydown(event, scope) {
|
|
9718
|
+
event.preventDefault();
|
|
9719
|
+
event.stopPropagation();
|
|
9720
|
+
if (scope === 'root') {
|
|
9721
|
+
this.retryRootItems(event);
|
|
9722
|
+
}
|
|
9723
|
+
else {
|
|
9724
|
+
this.retrySubItems(event);
|
|
9725
|
+
}
|
|
9726
|
+
}
|
|
9731
9727
|
retrySubItems(event) {
|
|
9732
9728
|
event?.stopPropagation();
|
|
9733
9729
|
if (!this.currentGroup) {
|
|
@@ -9735,7 +9731,7 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
9735
9731
|
return;
|
|
9736
9732
|
}
|
|
9737
9733
|
const group = this.lastLoadedGroup;
|
|
9738
|
-
if (!group || typeof group.
|
|
9734
|
+
if (!group || typeof group.subItemsLazy !== 'function') {
|
|
9739
9735
|
return;
|
|
9740
9736
|
}
|
|
9741
9737
|
const key = this.getGroupKey(group);
|
|
@@ -9763,6 +9759,7 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
9763
9759
|
.pipe(takeUntil(this.destroySubItems$), finalize(() => {
|
|
9764
9760
|
this.setSubItemsState(this.subItemsLoading, key, false);
|
|
9765
9761
|
this.changeDetector.detectChanges();
|
|
9762
|
+
this.contentChange.emit();
|
|
9766
9763
|
}))
|
|
9767
9764
|
.subscribe({
|
|
9768
9765
|
next: items => {
|
|
@@ -9799,7 +9796,10 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
9799
9796
|
return typeof value === 'function';
|
|
9800
9797
|
}
|
|
9801
9798
|
isGroupItem(item) {
|
|
9802
|
-
return !!item && (!!item.subItems?.length || typeof item.
|
|
9799
|
+
return !!item && (!!item.subItems?.length || typeof item.subItemsLazy === 'function');
|
|
9800
|
+
}
|
|
9801
|
+
hasSubItems(item) {
|
|
9802
|
+
return !!item?.subItems?.length || typeof item?.subItemsLazy === 'function' || !!item?.$subItemTemplate;
|
|
9803
9803
|
}
|
|
9804
9804
|
getGroupKey(group) {
|
|
9805
9805
|
if (!group.$id) {
|
|
@@ -9859,6 +9859,9 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
9859
9859
|
if (event.code === 'Tab' && !event.shiftKey && currentGroup?.$subItemTemplate) {
|
|
9860
9860
|
return;
|
|
9861
9861
|
}
|
|
9862
|
+
if (!event.shiftKey && currentGroup && this.isSubItemsError(currentGroup)) {
|
|
9863
|
+
return;
|
|
9864
|
+
}
|
|
9862
9865
|
this.closeEvent.emit();
|
|
9863
9866
|
}
|
|
9864
9867
|
}
|
|
@@ -9891,9 +9894,7 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
9891
9894
|
if (itemListAction?.url && !isDisabled && isVisible) {
|
|
9892
9895
|
return this.openUrl(itemListAction.url);
|
|
9893
9896
|
}
|
|
9894
|
-
if (itemListAction
|
|
9895
|
-
typeof itemListAction?.subItems === 'function' ||
|
|
9896
|
-
itemListAction?.$subItemTemplate) {
|
|
9897
|
+
if (this.hasSubItems(itemListAction)) {
|
|
9897
9898
|
this.openGroup(itemListAction, event);
|
|
9898
9899
|
}
|
|
9899
9900
|
else if (this.listboxSubitems) {
|
|
@@ -9931,10 +9932,7 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
9931
9932
|
}
|
|
9932
9933
|
}
|
|
9933
9934
|
handleArrowRightKey(itemListAction, event) {
|
|
9934
|
-
|
|
9935
|
-
typeof itemListAction?.subItems === 'function' ||
|
|
9936
|
-
!!itemListAction?.$subItemTemplate;
|
|
9937
|
-
if (hasSubItems) {
|
|
9935
|
+
if (this.hasSubItems(itemListAction)) {
|
|
9938
9936
|
this.onSelectItem(itemListAction, event);
|
|
9939
9937
|
}
|
|
9940
9938
|
}
|
|
@@ -10141,17 +10139,20 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
|
|
|
10141
10139
|
this.closeEvent.emit();
|
|
10142
10140
|
}
|
|
10143
10141
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoListBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10144
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PoListBoxComponent, isStandalone: false, selector: "po-listbox", inputs: { rootLazyLoad: ["p-root-lazy-load", "rootLazyLoad"] }, outputs: { rootItemsLoad: "p-root-items-load" }, viewQueries: [{ propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true, static: true }, { propertyName: "listboxItemList", first: true, predicate: ["listboxItemList"], descendants: true }, { propertyName: "listboxGroupHeader", first: true, predicate: ["listboxGroupHeader"], descendants: true }, { propertyName: "searchElement", first: true, predicate: ["searchElement"], descendants: true }, { propertyName: "popupHeaderContainer", first: true, predicate: ["popupHeaderContainer"], descendants: true }, { propertyName: "cdkListbox", first: true, predicate: ["listboxItemList"], descendants: true, read: CdkListbox }, { propertyName: "listboxItems", predicate: ["listboxItem"], descendants: true }, { propertyName: "cdkOptions", predicate: CdkOption, 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() && !listboxSubitems) {\n <ul\n #listboxItemList\n cdkListbox\n [cdkListboxMultiple]=\"type === 'check'\"\n class=\"po-listbox-list\"\n (focusin)=\"onListboxFocusIn($event)\"\n >\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 #listboxItem\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) {\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\" aria-hidden=\"true\">\n <span>{{ placeholderListbox }}</span>\n </div>\n }\n\n @if (!placeholderListbox && !items.length) {\n <div class=\"po-item-list\" 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 (listboxSubitems) {\n <ul cdkListbox class=\"po-listbox-list po-listbox-dropdown\">\n @if (!currentGroup) {\n @if (isRootLoading()) {\n <div\n class=\"po-listbox-subitems-loading\"\n role=\"status\"\n aria-live=\"polite\"\n [attr.aria-busy]=\"true\"\n [attr.aria-label]=\"literals.subItemsLoading\"\n >\n @for (skeletonItem of subItemsSkeletonPlaceholders; track skeletonItem) {\n <po-skeleton class=\"po-listbox-subitems-skeleton\" p-variant=\"text\" p-width=\"100%\"></po-skeleton>\n }\n </div>\n } @else if (isRootError()) {\n <div\n class=\"po-listbox-subitems-error\"\n role=\"alert\"\n aria-live=\"assertive\"\n (pointerdown)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n >\n <span class=\"po-listbox-subitems-error-message\">{{ literals.subItemsErrorMessage }}</span>\n <po-button\n class=\"po-listbox-subitems-retry\"\n [p-label]=\"literals.retry\"\n p-kind=\"secondary\"\n [p-size]=\"size\"\n (click)=\"$event.stopPropagation()\"\n (p-click)=\"retryRootItems($event)\"\n ></po-button>\n </div>\n } @else {\n @for (item of currentItems; track item) {\n <li\n #listboxItem\n [class.po-listbox-item]=\"visible()\"\n [cdkOption]=\"item[fieldLabel]\"\n [cdkOptionDisabled]=\"\n returnBooleanValue(item, 'disabled') || returnBooleanValue(item, 'visible') === false\n \"\n [attr.aria-selected]=\"isSelectedItem(item) || item.selected\"\n [attr.aria-expanded]=\"isGroupItem(item) ? currentGroup === item : null\"\n (click)=\"onSelectItem(item, $event)\"\n (keydown)=\"onKeyDown(item, $event)\"\n >\n @if (item.subItems?.length || isFunction(item.subItems) || item.$subItemTemplate) {\n <po-item-list\n [p-label]=\"item.label\"\n [p-item]=\"item\"\n [p-separator]=\"item.separator || separator\"\n [p-icon]=\"item.icon\"\n [p-icon-arrow-right]=\"'ICON_ARROW_RIGHT'\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n >\n </po-item-list>\n } @else if (!item.subItems?.length && returnBooleanValue(item, 'visible') !== false) {\n <po-item-list\n class=\"po-listbox-item-sub\"\n [p-disabled]=\"returnBooleanValue(item, 'disabled')\"\n [p-visible]=\"returnBooleanValue(item, 'visible')\"\n [p-label]=\"item[fieldLabel]\"\n [p-item]=\"item\"\n [p-icon]=\"item.icon\"\n [p-separator]=\"item.separator || separator\"\n [p-danger]=\"item.type === 'danger'\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n >\n </po-item-list>\n }\n </li>\n }\n }\n }\n\n @if (currentGroup) {\n <li\n #listboxGroupHeader\n class=\"po-listbox-group-header\"\n [cdkOption]=\"'back-option'\"\n [attr.aria-label]=\"literals?.backToPreviousGroup\"\n [attr.aria-busy]=\"isSubItemsLoading(currentGroup) ? 'true' : null\"\n (click)=\"goBack($event)\"\n (keydown)=\"onKeydownGoBack($event, currentGroup)\"\n >\n <po-icon class=\"po-field-icon\" [p-icon]=\"'ICON_ARROW_LEFT'\"></po-icon>\n <po-tag [p-value]=\"currentGroup.label\"></po-tag>\n </li>\n\n @if (currentGroup.$subItemTemplate) {\n <div\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onKeydownTemplate($event)\"\n (keydown.space)=\"$event.stopPropagation()\"\n >\n <ng-container\n *ngTemplateOutlet=\"currentGroup.$subItemTemplate; context: { $implicit: currentGroup }\"\n ></ng-container>\n </div>\n } @else if (isSubItemsLoading(currentGroup)) {\n <div\n class=\"po-listbox-subitems-loading\"\n role=\"status\"\n aria-live=\"polite\"\n [attr.aria-busy]=\"true\"\n [attr.aria-label]=\"literals.subItemsLoading\"\n >\n @for (skeletonItem of subItemsSkeletonPlaceholders; track skeletonItem) {\n <po-skeleton class=\"po-listbox-subitems-skeleton\" p-variant=\"text\" p-width=\"100%\"></po-skeleton>\n }\n </div>\n } @else if (isSubItemsError(currentGroup)) {\n <div\n class=\"po-listbox-subitems-error\"\n role=\"alert\"\n aria-live=\"assertive\"\n (pointerdown)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n >\n <span class=\"po-listbox-subitems-error-message\">{{ literals.subItemsErrorMessage }}</span>\n <po-button\n class=\"po-listbox-subitems-retry\"\n [p-label]=\"literals.retry\"\n p-kind=\"secondary\"\n [p-size]=\"size\"\n (click)=\"$event.stopPropagation()\"\n (p-click)=\"retrySubItems($event)\"\n ></po-button>\n </div>\n } @else {\n @for (subItem of currentItems; track subItem.label) {\n @if (subItem.subItems?.length || isFunction(subItem.subItems)) {\n <li\n [cdkOption]=\"subItem[fieldLabel]\"\n (click)=\"onSelectItem(subItem, $event)\"\n (keydown)=\"onKeyDown(subItem, $event)\"\n >\n <po-item-list\n [p-label]=\"subItem.label\"\n [p-item]=\"subItem\"\n [p-separator]=\"subItem.separator || separator\"\n [p-icon]=\"'ICON_ARROW_RIGHT'\"\n [p-icon-position]=\"'right'\"\n >\n </po-item-list>\n </li>\n } @else if (!subItem.subItems?.length && returnBooleanValue(subItem, 'visible') !== false) {\n <li\n [cdkOption]=\"subItem[fieldLabel]\"\n (click)=\"onSelectItem(subItem, $event)\"\n (keydown)=\"onKeyDown(subItem, $event)\"\n >\n <po-item-list\n class=\"po-listbox-item-sub\"\n [p-disabled]=\"returnBooleanValue(subItem, 'disabled')\"\n [p-visible]=\"returnBooleanValue(subItem, 'visible')\"\n [p-label]=\"subItem[fieldLabel]\"\n [p-item]=\"subItem\"\n [p-icon]=\"subItem.icon\"\n [p-separator]=\"subItem.separator || separator\"\n [p-danger]=\"subItem.type === 'danger'\"\n [p-selected]=\"isSelectedItem(subItem) || subItem.selected\"\n >\n </po-item-list>\n </li>\n }\n }\n }\n }\n </ul>\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: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PoButtonComponent, selector: "po-button" }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "component", type: PoLoadingOverlayComponent, selector: "po-loading-overlay" }, { kind: "component", type: PoSkeletonComponent, selector: "po-skeleton" }, { kind: "component", type: PoTagComponent, selector: "po-tag" }, { kind: "directive", type: i7.CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: i7.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"] }] });
|
|
10142
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PoListBoxComponent, isStandalone: false, selector: "po-listbox", inputs: { rootLazyLoad: ["p-root-lazy-load", "rootLazyLoad"] }, outputs: { rootItemsLoad: "p-root-items-load", contentChange: "p-content-change" }, viewQueries: [{ propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true, static: true }, { propertyName: "listboxItemList", first: true, predicate: ["listboxItemList"], descendants: true }, { propertyName: "listboxGroupHeader", first: true, predicate: ["listboxGroupHeader"], descendants: true }, { propertyName: "searchElement", first: true, predicate: ["searchElement"], descendants: true }, { propertyName: "popupHeaderContainer", first: true, predicate: ["popupHeaderContainer"], descendants: true }, { propertyName: "cdkListbox", first: true, predicate: ["listboxItemList"], descendants: true, read: CdkListbox }, { propertyName: "listboxItems", predicate: ["listboxItem"], descendants: true }, { propertyName: "cdkOptions", predicate: CdkOption, 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() && !listboxSubitems) {\n <ul\n #listboxItemList\n cdkListbox\n [cdkListboxMultiple]=\"type === 'check'\"\n class=\"po-listbox-list\"\n (focusin)=\"onListboxFocusIn($event)\"\n >\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 #listboxItem\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) {\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\" aria-hidden=\"true\">\n <span>{{ placeholderListbox }}</span>\n </div>\n }\n\n @if (!placeholderListbox && !items.length) {\n <div class=\"po-item-list\" 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 (listboxSubitems) {\n @if (!currentGroup) {\n @if (isRootLoading()) {\n <div\n class=\"po-listbox-subitems-loading\"\n role=\"status\"\n aria-live=\"polite\"\n [attr.aria-busy]=\"true\"\n [attr.aria-label]=\"literals.subItemsLoading\"\n >\n @for (skeletonItem of subItemsSkeletonPlaceholders; track skeletonItem) {\n <po-skeleton class=\"po-listbox-subitems-skeleton\" p-variant=\"text\" p-width=\"100%\"></po-skeleton>\n }\n </div>\n } @else if (isRootError()) {\n <div\n class=\"po-listbox-subitems-error\"\n role=\"alert\"\n aria-live=\"assertive\"\n (pointerdown)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n >\n <span class=\"po-listbox-subitems-error-message\">{{ literals.subItemsErrorMessage }}</span>\n <po-button\n class=\"po-listbox-subitems-retry\"\n [p-label]=\"literals.retry\"\n p-kind=\"secondary\"\n [p-size]=\"size\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"onRetryKeydown($event, 'root')\"\n (keydown.space)=\"onRetryKeydown($event, 'root')\"\n (p-click)=\"retryRootItems($event)\"\n ></po-button>\n </div>\n } @else {\n <ul cdkListbox class=\"po-listbox-list po-listbox-dropdown\">\n @for (item of currentItems; track item) {\n <li\n #listboxItem\n [class.po-listbox-item]=\"visible()\"\n [cdkOption]=\"item[fieldLabel]\"\n [cdkOptionDisabled]=\"\n returnBooleanValue(item, 'disabled') || returnBooleanValue(item, 'visible') === false\n \"\n [attr.aria-selected]=\"isSelectedItem(item) || item.selected\"\n [attr.aria-expanded]=\"isGroupItem(item) ? currentGroup === item : null\"\n (click)=\"onSelectItem(item, $event)\"\n (keydown)=\"onKeyDown(item, $event)\"\n >\n @if (item.subItems?.length || isFunction(item.subItemsLazy) || item.$subItemTemplate) {\n <po-item-list\n [p-label]=\"item.label\"\n [p-item]=\"item\"\n [p-separator]=\"item.separator || separator\"\n [p-icon]=\"item.icon\"\n [p-icon-arrow-right]=\"'ICON_ARROW_RIGHT'\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n >\n </po-item-list>\n } @else if (!item.subItems?.length && returnBooleanValue(item, 'visible') !== false) {\n <po-item-list\n class=\"po-listbox-item-sub\"\n [p-disabled]=\"returnBooleanValue(item, 'disabled')\"\n [p-visible]=\"returnBooleanValue(item, 'visible')\"\n [p-label]=\"item[fieldLabel]\"\n [p-item]=\"item\"\n [p-icon]=\"item.icon\"\n [p-separator]=\"item.separator || separator\"\n [p-danger]=\"item.type === 'danger'\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n >\n </po-item-list>\n }\n </li>\n }\n </ul>\n }\n }\n\n @if (currentGroup) {\n <ul cdkListbox class=\"po-listbox-list po-listbox-dropdown\">\n <li\n #listboxGroupHeader\n class=\"po-listbox-group-header\"\n [cdkOption]=\"'back-option'\"\n [attr.aria-label]=\"literals?.backToPreviousGroup\"\n [attr.aria-busy]=\"isSubItemsLoading(currentGroup) ? 'true' : null\"\n (click)=\"goBack($event)\"\n (keydown)=\"onKeydownGoBack($event, currentGroup)\"\n >\n <po-icon class=\"po-field-icon\" [p-icon]=\"'ICON_ARROW_LEFT'\"></po-icon>\n <po-tag [p-value]=\"currentGroup.label\"></po-tag>\n </li>\n\n @if (!currentGroup.$subItemTemplate && !isSubItemsLoading(currentGroup) && !isSubItemsError(currentGroup)) {\n @for (subItem of currentItems; track subItem.label) {\n @if (subItem.subItems?.length || isFunction(subItem.subItemsLazy)) {\n <li\n [cdkOption]=\"subItem[fieldLabel]\"\n (click)=\"onSelectItem(subItem, $event)\"\n (keydown)=\"onKeyDown(subItem, $event)\"\n >\n <po-item-list\n [p-label]=\"subItem.label\"\n [p-item]=\"subItem\"\n [p-separator]=\"subItem.separator || separator\"\n [p-icon]=\"'ICON_ARROW_RIGHT'\"\n [p-icon-position]=\"'right'\"\n >\n </po-item-list>\n </li>\n } @else if (!subItem.subItems?.length && returnBooleanValue(subItem, 'visible') !== false) {\n <li\n [cdkOption]=\"subItem[fieldLabel]\"\n (click)=\"onSelectItem(subItem, $event)\"\n (keydown)=\"onKeyDown(subItem, $event)\"\n >\n <po-item-list\n class=\"po-listbox-item-sub\"\n [p-disabled]=\"returnBooleanValue(subItem, 'disabled')\"\n [p-visible]=\"returnBooleanValue(subItem, 'visible')\"\n [p-label]=\"subItem[fieldLabel]\"\n [p-item]=\"subItem\"\n [p-icon]=\"subItem.icon\"\n [p-separator]=\"subItem.separator || separator\"\n [p-danger]=\"subItem.type === 'danger'\"\n [p-selected]=\"isSelectedItem(subItem) || subItem.selected\"\n >\n </po-item-list>\n </li>\n }\n }\n }\n </ul>\n\n @if (currentGroup.$subItemTemplate) {\n <div\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onKeydownTemplate($event)\"\n (keydown.space)=\"$event.stopPropagation()\"\n >\n <ng-container\n *ngTemplateOutlet=\"currentGroup.$subItemTemplate; context: { $implicit: currentGroup }\"\n ></ng-container>\n </div>\n } @else if (isSubItemsLoading(currentGroup)) {\n <div\n class=\"po-listbox-subitems-loading\"\n role=\"status\"\n aria-live=\"polite\"\n [attr.aria-busy]=\"true\"\n [attr.aria-label]=\"literals.subItemsLoading\"\n >\n @for (skeletonItem of subItemsSkeletonPlaceholders; track skeletonItem) {\n <po-skeleton class=\"po-listbox-subitems-skeleton\" p-variant=\"text\" p-width=\"100%\"></po-skeleton>\n }\n </div>\n } @else if (isSubItemsError(currentGroup)) {\n <div\n class=\"po-listbox-subitems-error\"\n role=\"alert\"\n aria-live=\"assertive\"\n (pointerdown)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n >\n <span class=\"po-listbox-subitems-error-message\">{{ literals.subItemsErrorMessage }}</span>\n <po-button\n class=\"po-listbox-subitems-retry\"\n [p-label]=\"literals.retry\"\n p-kind=\"secondary\"\n [p-size]=\"size\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"onRetryKeydown($event, 'subItems')\"\n (keydown.space)=\"onRetryKeydown($event, 'subItems')\"\n (p-click)=\"retrySubItems($event)\"\n ></po-button>\n </div>\n }\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: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PoButtonComponent, selector: "po-button" }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "component", type: PoLoadingOverlayComponent, selector: "po-loading-overlay" }, { kind: "component", type: PoSkeletonComponent, selector: "po-skeleton" }, { kind: "component", type: PoTagComponent, selector: "po-tag" }, { kind: "directive", type: i7.CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: i7.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"] }] });
|
|
10145
10143
|
}
|
|
10146
10144
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoListBoxComponent, decorators: [{
|
|
10147
10145
|
type: Component,
|
|
10148
|
-
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() && !listboxSubitems) {\n <ul\n #listboxItemList\n cdkListbox\n [cdkListboxMultiple]=\"type === 'check'\"\n class=\"po-listbox-list\"\n (focusin)=\"onListboxFocusIn($event)\"\n >\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 #listboxItem\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) {\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\" aria-hidden=\"true\">\n <span>{{ placeholderListbox }}</span>\n </div>\n }\n\n @if (!placeholderListbox && !items.length) {\n <div class=\"po-item-list\" 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 (listboxSubitems) {\n <ul cdkListbox class=\"po-listbox-list po-listbox-dropdown\">\n @if (!currentGroup) {\n @if (isRootLoading()) {\n <div\n class=\"po-listbox-subitems-loading\"\n role=\"status\"\n aria-live=\"polite\"\n [attr.aria-busy]=\"true\"\n [attr.aria-label]=\"literals.subItemsLoading\"\n >\n @for (skeletonItem of subItemsSkeletonPlaceholders; track skeletonItem) {\n <po-skeleton class=\"po-listbox-subitems-skeleton\" p-variant=\"text\" p-width=\"100%\"></po-skeleton>\n }\n </div>\n } @else if (isRootError()) {\n <div\n class=\"po-listbox-subitems-error\"\n role=\"alert\"\n aria-live=\"assertive\"\n (pointerdown)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n >\n <span class=\"po-listbox-subitems-error-message\">{{ literals.subItemsErrorMessage }}</span>\n <po-button\n class=\"po-listbox-subitems-retry\"\n [p-label]=\"literals.retry\"\n p-kind=\"secondary\"\n [p-size]=\"size\"\n (click)=\"$event.stopPropagation()\"\n (p-click)=\"retryRootItems($event)\"\n ></po-button>\n </div>\n } @else {\n @for (item of currentItems; track item) {\n <li\n #listboxItem\n [class.po-listbox-item]=\"visible()\"\n [cdkOption]=\"item[fieldLabel]\"\n [cdkOptionDisabled]=\"\n returnBooleanValue(item, 'disabled') || returnBooleanValue(item, 'visible') === false\n \"\n [attr.aria-selected]=\"isSelectedItem(item) || item.selected\"\n [attr.aria-expanded]=\"isGroupItem(item) ? currentGroup === item : null\"\n (click)=\"onSelectItem(item, $event)\"\n (keydown)=\"onKeyDown(item, $event)\"\n >\n @if (item.subItems?.length || isFunction(item.subItems) || item.$subItemTemplate) {\n <po-item-list\n [p-label]=\"item.label\"\n [p-item]=\"item\"\n [p-separator]=\"item.separator || separator\"\n [p-icon]=\"item.icon\"\n [p-icon-arrow-right]=\"'ICON_ARROW_RIGHT'\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n >\n </po-item-list>\n } @else if (!item.subItems?.length && returnBooleanValue(item, 'visible') !== false) {\n <po-item-list\n class=\"po-listbox-item-sub\"\n [p-disabled]=\"returnBooleanValue(item, 'disabled')\"\n [p-visible]=\"returnBooleanValue(item, 'visible')\"\n [p-label]=\"item[fieldLabel]\"\n [p-item]=\"item\"\n [p-icon]=\"item.icon\"\n [p-separator]=\"item.separator || separator\"\n [p-danger]=\"item.type === 'danger'\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n >\n </po-item-list>\n }\n </li>\n }\n }\n }\n\n @if (currentGroup) {\n <li\n #listboxGroupHeader\n class=\"po-listbox-group-header\"\n [cdkOption]=\"'back-option'\"\n [attr.aria-label]=\"literals?.backToPreviousGroup\"\n [attr.aria-busy]=\"isSubItemsLoading(currentGroup) ? 'true' : null\"\n (click)=\"goBack($event)\"\n (keydown)=\"onKeydownGoBack($event, currentGroup)\"\n >\n <po-icon class=\"po-field-icon\" [p-icon]=\"'ICON_ARROW_LEFT'\"></po-icon>\n <po-tag [p-value]=\"currentGroup.label\"></po-tag>\n </li>\n\n @if (currentGroup.$subItemTemplate) {\n <div\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onKeydownTemplate($event)\"\n (keydown.space)=\"$event.stopPropagation()\"\n >\n <ng-container\n *ngTemplateOutlet=\"currentGroup.$subItemTemplate; context: { $implicit: currentGroup }\"\n ></ng-container>\n </div>\n } @else if (isSubItemsLoading(currentGroup)) {\n <div\n class=\"po-listbox-subitems-loading\"\n role=\"status\"\n aria-live=\"polite\"\n [attr.aria-busy]=\"true\"\n [attr.aria-label]=\"literals.subItemsLoading\"\n >\n @for (skeletonItem of subItemsSkeletonPlaceholders; track skeletonItem) {\n <po-skeleton class=\"po-listbox-subitems-skeleton\" p-variant=\"text\" p-width=\"100%\"></po-skeleton>\n }\n </div>\n } @else if (isSubItemsError(currentGroup)) {\n <div\n class=\"po-listbox-subitems-error\"\n role=\"alert\"\n aria-live=\"assertive\"\n (pointerdown)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n >\n <span class=\"po-listbox-subitems-error-message\">{{ literals.subItemsErrorMessage }}</span>\n <po-button\n class=\"po-listbox-subitems-retry\"\n [p-label]=\"literals.retry\"\n p-kind=\"secondary\"\n [p-size]=\"size\"\n (click)=\"$event.stopPropagation()\"\n (p-click)=\"retrySubItems($event)\"\n ></po-button>\n </div>\n } @else {\n @for (subItem of currentItems; track subItem.label) {\n @if (subItem.subItems?.length || isFunction(subItem.subItems)) {\n <li\n [cdkOption]=\"subItem[fieldLabel]\"\n (click)=\"onSelectItem(subItem, $event)\"\n (keydown)=\"onKeyDown(subItem, $event)\"\n >\n <po-item-list\n [p-label]=\"subItem.label\"\n [p-item]=\"subItem\"\n [p-separator]=\"subItem.separator || separator\"\n [p-icon]=\"'ICON_ARROW_RIGHT'\"\n [p-icon-position]=\"'right'\"\n >\n </po-item-list>\n </li>\n } @else if (!subItem.subItems?.length && returnBooleanValue(subItem, 'visible') !== false) {\n <li\n [cdkOption]=\"subItem[fieldLabel]\"\n (click)=\"onSelectItem(subItem, $event)\"\n (keydown)=\"onKeyDown(subItem, $event)\"\n >\n <po-item-list\n class=\"po-listbox-item-sub\"\n [p-disabled]=\"returnBooleanValue(subItem, 'disabled')\"\n [p-visible]=\"returnBooleanValue(subItem, 'visible')\"\n [p-label]=\"subItem[fieldLabel]\"\n [p-item]=\"subItem\"\n [p-icon]=\"subItem.icon\"\n [p-separator]=\"subItem.separator || separator\"\n [p-danger]=\"subItem.type === 'danger'\"\n [p-selected]=\"isSelectedItem(subItem) || subItem.selected\"\n >\n </po-item-list>\n </li>\n }\n }\n }\n }\n </ul>\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" }]
|
|
10146
|
+
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() && !listboxSubitems) {\n <ul\n #listboxItemList\n cdkListbox\n [cdkListboxMultiple]=\"type === 'check'\"\n class=\"po-listbox-list\"\n (focusin)=\"onListboxFocusIn($event)\"\n >\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 #listboxItem\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) {\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\" aria-hidden=\"true\">\n <span>{{ placeholderListbox }}</span>\n </div>\n }\n\n @if (!placeholderListbox && !items.length) {\n <div class=\"po-item-list\" 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 (listboxSubitems) {\n @if (!currentGroup) {\n @if (isRootLoading()) {\n <div\n class=\"po-listbox-subitems-loading\"\n role=\"status\"\n aria-live=\"polite\"\n [attr.aria-busy]=\"true\"\n [attr.aria-label]=\"literals.subItemsLoading\"\n >\n @for (skeletonItem of subItemsSkeletonPlaceholders; track skeletonItem) {\n <po-skeleton class=\"po-listbox-subitems-skeleton\" p-variant=\"text\" p-width=\"100%\"></po-skeleton>\n }\n </div>\n } @else if (isRootError()) {\n <div\n class=\"po-listbox-subitems-error\"\n role=\"alert\"\n aria-live=\"assertive\"\n (pointerdown)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n >\n <span class=\"po-listbox-subitems-error-message\">{{ literals.subItemsErrorMessage }}</span>\n <po-button\n class=\"po-listbox-subitems-retry\"\n [p-label]=\"literals.retry\"\n p-kind=\"secondary\"\n [p-size]=\"size\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"onRetryKeydown($event, 'root')\"\n (keydown.space)=\"onRetryKeydown($event, 'root')\"\n (p-click)=\"retryRootItems($event)\"\n ></po-button>\n </div>\n } @else {\n <ul cdkListbox class=\"po-listbox-list po-listbox-dropdown\">\n @for (item of currentItems; track item) {\n <li\n #listboxItem\n [class.po-listbox-item]=\"visible()\"\n [cdkOption]=\"item[fieldLabel]\"\n [cdkOptionDisabled]=\"\n returnBooleanValue(item, 'disabled') || returnBooleanValue(item, 'visible') === false\n \"\n [attr.aria-selected]=\"isSelectedItem(item) || item.selected\"\n [attr.aria-expanded]=\"isGroupItem(item) ? currentGroup === item : null\"\n (click)=\"onSelectItem(item, $event)\"\n (keydown)=\"onKeyDown(item, $event)\"\n >\n @if (item.subItems?.length || isFunction(item.subItemsLazy) || item.$subItemTemplate) {\n <po-item-list\n [p-label]=\"item.label\"\n [p-item]=\"item\"\n [p-separator]=\"item.separator || separator\"\n [p-icon]=\"item.icon\"\n [p-icon-arrow-right]=\"'ICON_ARROW_RIGHT'\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n >\n </po-item-list>\n } @else if (!item.subItems?.length && returnBooleanValue(item, 'visible') !== false) {\n <po-item-list\n class=\"po-listbox-item-sub\"\n [p-disabled]=\"returnBooleanValue(item, 'disabled')\"\n [p-visible]=\"returnBooleanValue(item, 'visible')\"\n [p-label]=\"item[fieldLabel]\"\n [p-item]=\"item\"\n [p-icon]=\"item.icon\"\n [p-separator]=\"item.separator || separator\"\n [p-danger]=\"item.type === 'danger'\"\n [p-selected]=\"isSelectedItem(item) || item.selected\"\n >\n </po-item-list>\n }\n </li>\n }\n </ul>\n }\n }\n\n @if (currentGroup) {\n <ul cdkListbox class=\"po-listbox-list po-listbox-dropdown\">\n <li\n #listboxGroupHeader\n class=\"po-listbox-group-header\"\n [cdkOption]=\"'back-option'\"\n [attr.aria-label]=\"literals?.backToPreviousGroup\"\n [attr.aria-busy]=\"isSubItemsLoading(currentGroup) ? 'true' : null\"\n (click)=\"goBack($event)\"\n (keydown)=\"onKeydownGoBack($event, currentGroup)\"\n >\n <po-icon class=\"po-field-icon\" [p-icon]=\"'ICON_ARROW_LEFT'\"></po-icon>\n <po-tag [p-value]=\"currentGroup.label\"></po-tag>\n </li>\n\n @if (!currentGroup.$subItemTemplate && !isSubItemsLoading(currentGroup) && !isSubItemsError(currentGroup)) {\n @for (subItem of currentItems; track subItem.label) {\n @if (subItem.subItems?.length || isFunction(subItem.subItemsLazy)) {\n <li\n [cdkOption]=\"subItem[fieldLabel]\"\n (click)=\"onSelectItem(subItem, $event)\"\n (keydown)=\"onKeyDown(subItem, $event)\"\n >\n <po-item-list\n [p-label]=\"subItem.label\"\n [p-item]=\"subItem\"\n [p-separator]=\"subItem.separator || separator\"\n [p-icon]=\"'ICON_ARROW_RIGHT'\"\n [p-icon-position]=\"'right'\"\n >\n </po-item-list>\n </li>\n } @else if (!subItem.subItems?.length && returnBooleanValue(subItem, 'visible') !== false) {\n <li\n [cdkOption]=\"subItem[fieldLabel]\"\n (click)=\"onSelectItem(subItem, $event)\"\n (keydown)=\"onKeyDown(subItem, $event)\"\n >\n <po-item-list\n class=\"po-listbox-item-sub\"\n [p-disabled]=\"returnBooleanValue(subItem, 'disabled')\"\n [p-visible]=\"returnBooleanValue(subItem, 'visible')\"\n [p-label]=\"subItem[fieldLabel]\"\n [p-item]=\"subItem\"\n [p-icon]=\"subItem.icon\"\n [p-separator]=\"subItem.separator || separator\"\n [p-danger]=\"subItem.type === 'danger'\"\n [p-selected]=\"isSelectedItem(subItem) || subItem.selected\"\n >\n </po-item-list>\n </li>\n }\n }\n }\n </ul>\n\n @if (currentGroup.$subItemTemplate) {\n <div\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"onKeydownTemplate($event)\"\n (keydown.space)=\"$event.stopPropagation()\"\n >\n <ng-container\n *ngTemplateOutlet=\"currentGroup.$subItemTemplate; context: { $implicit: currentGroup }\"\n ></ng-container>\n </div>\n } @else if (isSubItemsLoading(currentGroup)) {\n <div\n class=\"po-listbox-subitems-loading\"\n role=\"status\"\n aria-live=\"polite\"\n [attr.aria-busy]=\"true\"\n [attr.aria-label]=\"literals.subItemsLoading\"\n >\n @for (skeletonItem of subItemsSkeletonPlaceholders; track skeletonItem) {\n <po-skeleton class=\"po-listbox-subitems-skeleton\" p-variant=\"text\" p-width=\"100%\"></po-skeleton>\n }\n </div>\n } @else if (isSubItemsError(currentGroup)) {\n <div\n class=\"po-listbox-subitems-error\"\n role=\"alert\"\n aria-live=\"assertive\"\n (pointerdown)=\"$event.stopPropagation()\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation()\"\n >\n <span class=\"po-listbox-subitems-error-message\">{{ literals.subItemsErrorMessage }}</span>\n <po-button\n class=\"po-listbox-subitems-retry\"\n [p-label]=\"literals.retry\"\n p-kind=\"secondary\"\n [p-size]=\"size\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"onRetryKeydown($event, 'subItems')\"\n (keydown.space)=\"onRetryKeydown($event, 'subItems')\"\n (p-click)=\"retrySubItems($event)\"\n ></po-button>\n </div>\n }\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" }]
|
|
10149
10147
|
}], ctorParameters: () => [], propDecorators: { rootLazyLoad: [{
|
|
10150
10148
|
type: Input,
|
|
10151
10149
|
args: ['p-root-lazy-load']
|
|
10152
10150
|
}], rootItemsLoad: [{
|
|
10153
10151
|
type: Output,
|
|
10154
10152
|
args: ['p-root-items-load']
|
|
10153
|
+
}], contentChange: [{
|
|
10154
|
+
type: Output,
|
|
10155
|
+
args: ['p-content-change']
|
|
10155
10156
|
}], listbox: [{
|
|
10156
10157
|
type: ViewChild,
|
|
10157
10158
|
args: ['listbox', { static: true }]
|
|
@@ -10178,6 +10179,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
10178
10179
|
args: [CdkOption]
|
|
10179
10180
|
}] } });
|
|
10180
10181
|
|
|
10182
|
+
const PO_POPUP_ARROW_TO_CORNER_POSITION = {
|
|
10183
|
+
'bottom-left': 'top-left',
|
|
10184
|
+
'bottom-right': 'top-right',
|
|
10185
|
+
'top-right': 'bottom-right',
|
|
10186
|
+
'top-left': 'bottom-left'
|
|
10187
|
+
};
|
|
10188
|
+
const PO_POPUP_ARROW_TO_POSITION = {
|
|
10189
|
+
bottom: 'top',
|
|
10190
|
+
'bottom-right': 'top-left',
|
|
10191
|
+
'bottom-left': 'top-right',
|
|
10192
|
+
left: 'right',
|
|
10193
|
+
'left-bottom': 'right-top',
|
|
10194
|
+
'left-top': 'right-bottom',
|
|
10195
|
+
top: 'bottom',
|
|
10196
|
+
'top-left': 'bottom-right',
|
|
10197
|
+
'top-right': 'bottom-left',
|
|
10198
|
+
right: 'left',
|
|
10199
|
+
'right-top': 'left-bottom',
|
|
10200
|
+
'right-bottom': 'left-top'
|
|
10201
|
+
};
|
|
10181
10202
|
/**
|
|
10182
10203
|
*
|
|
10183
10204
|
* @docsExtends PoPopupBaseComponent
|
|
@@ -10210,6 +10231,8 @@ class PoPopupComponent extends PoPopupBaseComponent {
|
|
|
10210
10231
|
changeDetector = inject(ChangeDetectorRef);
|
|
10211
10232
|
popupRef;
|
|
10212
10233
|
listbox;
|
|
10234
|
+
popupOffset = 8;
|
|
10235
|
+
viewportMargin = 8;
|
|
10213
10236
|
//utilizado apenas no theme builder
|
|
10214
10237
|
poListBoxRef;
|
|
10215
10238
|
ngAfterViewInit() {
|
|
@@ -10251,8 +10274,8 @@ class PoPopupComponent extends PoPopupBaseComponent {
|
|
|
10251
10274
|
this.param = param;
|
|
10252
10275
|
this.showPopup = true;
|
|
10253
10276
|
this.changeDetector.detectChanges();
|
|
10254
|
-
this.validateInitialContent();
|
|
10255
10277
|
this.openEvent.emit();
|
|
10278
|
+
this.validateInitialContent();
|
|
10256
10279
|
}
|
|
10257
10280
|
returnBooleanValue(popupAction, property) {
|
|
10258
10281
|
return PoUtils.isTypeof(popupAction[property], 'function')
|
|
@@ -10278,6 +10301,15 @@ class PoPopupComponent extends PoPopupBaseComponent {
|
|
|
10278
10301
|
this.validateInitialContent();
|
|
10279
10302
|
}
|
|
10280
10303
|
}
|
|
10304
|
+
onContentChange() {
|
|
10305
|
+
if (!this.showPopup) {
|
|
10306
|
+
return;
|
|
10307
|
+
}
|
|
10308
|
+
this.changeDetector.detectChanges();
|
|
10309
|
+
if (this.hasContentToShow()) {
|
|
10310
|
+
this.setPosition(this.getStickyPositions());
|
|
10311
|
+
}
|
|
10312
|
+
}
|
|
10281
10313
|
checkAllActionIsInvisible() {
|
|
10282
10314
|
if (this.rootLazyLoad && !this.actions.length) {
|
|
10283
10315
|
return false;
|
|
@@ -10355,19 +10387,92 @@ class PoPopupComponent extends PoPopupBaseComponent {
|
|
|
10355
10387
|
}
|
|
10356
10388
|
window.removeEventListener('scroll', this.onScroll, true);
|
|
10357
10389
|
}
|
|
10358
|
-
setPosition() {
|
|
10390
|
+
setPosition(preferredPositions) {
|
|
10359
10391
|
if (this.listbox.nativeElement.querySelector('.po-listbox')) {
|
|
10360
|
-
|
|
10392
|
+
const customPositions = this.resolvePositions(preferredPositions);
|
|
10393
|
+
this.poControlPosition.setElements(this.popupRef.nativeElement, this.popupOffset, this.target, customPositions, false, this.isCornerAlign);
|
|
10361
10394
|
this.poControlPosition.adjustPosition(this.position);
|
|
10362
10395
|
this.arrowDirection = this.poControlPosition.getArrowDirection();
|
|
10396
|
+
this.clampHeightToViewport();
|
|
10397
|
+
}
|
|
10398
|
+
}
|
|
10399
|
+
resolvePositions(preferredPositions) {
|
|
10400
|
+
if (preferredPositions?.length) {
|
|
10401
|
+
return preferredPositions;
|
|
10363
10402
|
}
|
|
10403
|
+
if (this.customPositions?.length) {
|
|
10404
|
+
return this.customPositions;
|
|
10405
|
+
}
|
|
10406
|
+
return this.getVerticalFirstPositions();
|
|
10407
|
+
}
|
|
10408
|
+
getVerticalFirstPositions() {
|
|
10409
|
+
return this.isCornerAlign
|
|
10410
|
+
? ['bottom-left', 'top-left', 'bottom-right', 'top-right']
|
|
10411
|
+
: ['bottom-left', 'top-left', 'bottom-right', 'top-right', 'bottom', 'top', 'right', 'left'];
|
|
10412
|
+
}
|
|
10413
|
+
clampHeightToViewport() {
|
|
10414
|
+
const popupElement = this.popupRef?.nativeElement;
|
|
10415
|
+
const targetElement = this.target;
|
|
10416
|
+
const scrollElement = this.getScrollableListboxElement();
|
|
10417
|
+
if (!popupElement || !targetElement || !scrollElement) {
|
|
10418
|
+
return;
|
|
10419
|
+
}
|
|
10420
|
+
const targetRect = targetElement.getBoundingClientRect();
|
|
10421
|
+
const viewportHeight = window.innerHeight;
|
|
10422
|
+
const popupHeight = popupElement.offsetHeight;
|
|
10423
|
+
const spaceAbove = targetRect.top - this.popupOffset - this.viewportMargin;
|
|
10424
|
+
const spaceBelow = viewportHeight - targetRect.bottom - this.popupOffset - this.viewportMargin;
|
|
10425
|
+
const fitsBelow = popupHeight > 0 && popupHeight <= spaceBelow;
|
|
10426
|
+
const shouldOpenUp = this.isOpeningUp() || (!fitsBelow && spaceAbove > spaceBelow);
|
|
10427
|
+
if (!shouldOpenUp) {
|
|
10428
|
+
this.renderer.removeStyle(scrollElement, 'maxHeight');
|
|
10429
|
+
this.renderer.removeStyle(popupElement, 'bottom');
|
|
10430
|
+
return;
|
|
10431
|
+
}
|
|
10432
|
+
if (spaceAbove <= 0) {
|
|
10433
|
+
return;
|
|
10434
|
+
}
|
|
10435
|
+
if (popupHeight > spaceAbove) {
|
|
10436
|
+
const nonScrollableHeight = popupHeight - scrollElement.offsetHeight;
|
|
10437
|
+
const maxScrollHeight = Math.max(spaceAbove - nonScrollableHeight, 0);
|
|
10438
|
+
this.renderer.setStyle(scrollElement, 'maxHeight', `${maxScrollHeight}px`);
|
|
10439
|
+
this.poControlPosition.adjustPosition(this.position);
|
|
10440
|
+
this.arrowDirection = this.poControlPosition.getArrowDirection();
|
|
10441
|
+
}
|
|
10442
|
+
const popupBottomFromViewport = viewportHeight - (targetRect.top - this.popupOffset);
|
|
10443
|
+
this.renderer.setStyle(popupElement, 'bottom', `${popupBottomFromViewport}px`);
|
|
10444
|
+
this.renderer.removeStyle(popupElement, 'top');
|
|
10445
|
+
}
|
|
10446
|
+
getScrollableListboxElement() {
|
|
10447
|
+
const listboxElement = this.listbox?.nativeElement;
|
|
10448
|
+
if (!listboxElement) {
|
|
10449
|
+
return null;
|
|
10450
|
+
}
|
|
10451
|
+
return listboxElement.querySelector('ul[role=listbox]') ?? listboxElement;
|
|
10452
|
+
}
|
|
10453
|
+
isOpeningUp() {
|
|
10454
|
+
const currentPosition = this.isCornerAlign
|
|
10455
|
+
? PO_POPUP_ARROW_TO_CORNER_POSITION[this.arrowDirection]
|
|
10456
|
+
: PO_POPUP_ARROW_TO_POSITION[this.arrowDirection];
|
|
10457
|
+
return !!currentPosition && currentPosition.startsWith('top');
|
|
10458
|
+
}
|
|
10459
|
+
getStickyPositions() {
|
|
10460
|
+
const positions = this.customPositions?.length ? this.customPositions : this.getVerticalFirstPositions();
|
|
10461
|
+
const currentPosition = this.isCornerAlign
|
|
10462
|
+
? PO_POPUP_ARROW_TO_CORNER_POSITION[this.arrowDirection]
|
|
10463
|
+
: PO_POPUP_ARROW_TO_POSITION[this.arrowDirection];
|
|
10464
|
+
const currentIndex = currentPosition ? positions.indexOf(currentPosition) : -1;
|
|
10465
|
+
if (currentIndex <= 0) {
|
|
10466
|
+
return positions;
|
|
10467
|
+
}
|
|
10468
|
+
return [...positions.slice(currentIndex), ...positions.slice(0, currentIndex)];
|
|
10364
10469
|
}
|
|
10365
10470
|
validateInitialContent() {
|
|
10366
10471
|
if (this.hasContentToShow()) {
|
|
10367
10472
|
this.setPosition();
|
|
10368
10473
|
this.initializeListeners();
|
|
10369
10474
|
}
|
|
10370
|
-
else {
|
|
10475
|
+
else if (!this.rootLazyLoad) {
|
|
10371
10476
|
this.close();
|
|
10372
10477
|
}
|
|
10373
10478
|
}
|
|
@@ -10378,11 +10483,11 @@ class PoPopupComponent extends PoPopupBaseComponent {
|
|
|
10378
10483
|
}
|
|
10379
10484
|
}
|
|
10380
10485
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
10381
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PoPopupComponent, isStandalone: false, selector: "po-popup", providers: [PoControlPositionService], viewQueries: [{ propertyName: "popupRef", first: true, predicate: ["popupRef"], descendants: true, read: ElementRef }, { propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true, read: ElementRef }, { propertyName: "poListBoxRef", first: true, predicate: ["poListBoxRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (showPopup && (actions.length || rootLazyLoad) && !checkAllActionIsInvisible()) {\n <div #popupRef class=\"po-popup\">\n @if (!hideArrow) {\n <div class=\"po-popup-arrow po-arrow-{{ arrowDirection }}\"></div>\n }\n <div class=\"po-popup-container\">\n <po-listbox\n #listbox\n #poListBoxRef\n p-type=\"action\"\n [p-items]=\"actions\"\n [p-param]=\"param\"\n [p-size]=\"size\"\n [p-listbox-subitems]=\"computedListboxSubitems\"\n [p-root-lazy-load]=\"rootLazyLoad\"\n (p-close)=\"close($event)\"\n (p-click-item)=\"onClickItem($event)\"\n (p-sub-items-load)=\"subItemsLoad.emit($event)\"\n (p-root-items-load)=\"rootItemsLoad.emit()\"\n >\n <ng-content p-popup-header-template select=\"[p-popup-header-template]\"></ng-content>\n </po-listbox>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: PoListBoxComponent, selector: "po-listbox", inputs: ["p-root-lazy-load"], outputs: ["p-root-items-load"] }] });
|
|
10486
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PoPopupComponent, isStandalone: false, selector: "po-popup", providers: [PoControlPositionService], viewQueries: [{ propertyName: "popupRef", first: true, predicate: ["popupRef"], descendants: true, read: ElementRef }, { propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true, read: ElementRef }, { propertyName: "poListBoxRef", first: true, predicate: ["poListBoxRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (showPopup && (actions.length || rootLazyLoad) && !checkAllActionIsInvisible()) {\n <div #popupRef class=\"po-popup\">\n @if (!hideArrow) {\n <div class=\"po-popup-arrow po-arrow-{{ arrowDirection }}\"></div>\n }\n <div class=\"po-popup-container\">\n <po-listbox\n #listbox\n #poListBoxRef\n p-type=\"action\"\n [p-items]=\"actions\"\n [p-param]=\"param\"\n [p-size]=\"size\"\n [p-listbox-subitems]=\"computedListboxSubitems\"\n [p-root-lazy-load]=\"rootLazyLoad\"\n (p-close)=\"close($event)\"\n (p-click-item)=\"onClickItem($event)\"\n (p-content-change)=\"onContentChange()\"\n (p-sub-items-load)=\"subItemsLoad.emit($event)\"\n (p-root-items-load)=\"rootItemsLoad.emit()\"\n >\n <ng-content p-popup-header-template select=\"[p-popup-header-template]\"></ng-content>\n </po-listbox>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: PoListBoxComponent, selector: "po-listbox", inputs: ["p-root-lazy-load"], outputs: ["p-root-items-load", "p-content-change"] }] });
|
|
10382
10487
|
}
|
|
10383
10488
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoPopupComponent, decorators: [{
|
|
10384
10489
|
type: Component,
|
|
10385
|
-
args: [{ selector: 'po-popup', providers: [PoControlPositionService], standalone: false, template: "@if (showPopup && (actions.length || rootLazyLoad) && !checkAllActionIsInvisible()) {\n <div #popupRef class=\"po-popup\">\n @if (!hideArrow) {\n <div class=\"po-popup-arrow po-arrow-{{ arrowDirection }}\"></div>\n }\n <div class=\"po-popup-container\">\n <po-listbox\n #listbox\n #poListBoxRef\n p-type=\"action\"\n [p-items]=\"actions\"\n [p-param]=\"param\"\n [p-size]=\"size\"\n [p-listbox-subitems]=\"computedListboxSubitems\"\n [p-root-lazy-load]=\"rootLazyLoad\"\n (p-close)=\"close($event)\"\n (p-click-item)=\"onClickItem($event)\"\n (p-sub-items-load)=\"subItemsLoad.emit($event)\"\n (p-root-items-load)=\"rootItemsLoad.emit()\"\n >\n <ng-content p-popup-header-template select=\"[p-popup-header-template]\"></ng-content>\n </po-listbox>\n </div>\n </div>\n}\n" }]
|
|
10490
|
+
args: [{ selector: 'po-popup', providers: [PoControlPositionService], standalone: false, template: "@if (showPopup && (actions.length || rootLazyLoad) && !checkAllActionIsInvisible()) {\n <div #popupRef class=\"po-popup\">\n @if (!hideArrow) {\n <div class=\"po-popup-arrow po-arrow-{{ arrowDirection }}\"></div>\n }\n <div class=\"po-popup-container\">\n <po-listbox\n #listbox\n #poListBoxRef\n p-type=\"action\"\n [p-items]=\"actions\"\n [p-param]=\"param\"\n [p-size]=\"size\"\n [p-listbox-subitems]=\"computedListboxSubitems\"\n [p-root-lazy-load]=\"rootLazyLoad\"\n (p-close)=\"close($event)\"\n (p-click-item)=\"onClickItem($event)\"\n (p-content-change)=\"onContentChange()\"\n (p-sub-items-load)=\"subItemsLoad.emit($event)\"\n (p-root-items-load)=\"rootItemsLoad.emit()\"\n >\n <ng-content p-popup-header-template select=\"[p-popup-header-template]\"></ng-content>\n </po-listbox>\n </div>\n </div>\n}\n" }]
|
|
10386
10491
|
}], propDecorators: { popupRef: [{
|
|
10387
10492
|
type: ViewChild,
|
|
10388
10493
|
args: ['popupRef', { read: ElementRef }]
|
|
@@ -16580,7 +16685,7 @@ class PoComboComponent extends PoComboBaseComponent {
|
|
|
16580
16685
|
useExisting: forwardRef(() => PoComboComponent),
|
|
16581
16686
|
multi: true
|
|
16582
16687
|
}
|
|
16583
|
-
], queries: [{ propertyName: "comboOptionTemplate", first: true, predicate: PoComboOptionTemplateDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "outerContainer", first: true, predicate: ["outerContainer "], descendants: true, read: ElementRef }, { propertyName: "containerElement", first: true, predicate: ["containerElement"], descendants: true, read: ElementRef }, { propertyName: "contentElement", first: true, predicate: ["contentElement"], descendants: true, read: ElementRef }, { propertyName: "fieldContainerInput", first: true, predicate: ["fieldContainerInput"], descendants: true, read: ElementRef }, { propertyName: "iconElement", first: true, predicate: ["iconArrow"], descendants: true, read: ElementRef, static: true }, { propertyName: "inputEl", first: true, predicate: ["inp"], descendants: true, read: ElementRef, static: true }, { propertyName: "poListbox", first: true, predicate: ["poListbox"], descendants: true }, { propertyName: "helperEl", first: true, predicate: ["helperEl"], descendants: true, read: PoHelperComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n@let needsHelper = !label && (poHelperComponent() || poHelper.hideAdditionalHelp);\n<div #outerContainer>\n <po-field-container\n [p-disabled]=\"isDisabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n >\n <div\n #searchContainer\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n class=\"po-field-container-content po-combo-container-content\"\n >\n <div class=\"po-field-container-content-helper-wrapper\">\n <div #fieldContainerInput class=\"po-field-container-input\">\n @if (icon) {\n <div class=\"po-field-icon-container-left\">\n <po-icon\n class=\"po-field-icon po-icon-input\"\n [class.po-field-icon-disabled]=\"isDisabled\"\n [class.po-field-icon-aa]=\"size === 'small'\"\n [p-icon]=\"icon\"\n ></po-icon>\n </div>\n }\n\n <input\n #inp\n class=\"po-combo-input\"\n [ngClass]=\"\n clean && inp.value\n ? size === 'small'\n ? 'po-input-double-icon-right-aa'\n : 'po-input-double-icon-right'\n : size === 'small'\n ? 'po-input-icon-right-aa'\n : 'po-input-icon-right'\n \"\n [class.po-input-icon-left]=\"icon\"\n [class.po-input-icon-left-aa]=\"icon && size === 'small'\"\n autocomplete=\"off\"\n type=\"text\"\n [attr.data-focused-element]=\"!isDisabled\"\n [attr.data-inactive-component]=\"isDisabled\"\n [attr.name]=\"name\"\n [disabled]=\"isDisabled\"\n [id]=\"id\"\n [placeholder]=\"isDisabled ? '' : placeholder\"\n [required]=\"required\"\n [attr.data-append-in-body]=\"appendBox\"\n [attr.p-size]=\"size\"\n (click)=\"!isDisabled && toggleComboVisibility()\"\n (keyup)=\"onKeyUp($event)\"\n (blur)=\"onBlur($event)\"\n (keyup)=\"searchOnEnterOrArrow($event, $event.target.value)\"\n (keydown)=\"onKeyDown($event)\"\n />\n\n <div class=\"po-field-icon-container-right\">\n @if (loading) {\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n } @else {\n @if (!loading && isCleanVisible()) {\n <po-clean\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"literals.clean\"\n class=\"po-combo-clean po-icon-input\"\n [class.po-combo-clean-aa]=\"size === 'small'\"\n [p-element-ref]=\"inputEl\"\n [p-size]=\"size\"\n (p-change-event)=\"clear($event)\"\n (click)=\"clear(null); $event.preventDefault()\"\n (keydown.enter)=\"clearAndFocus(); $event.preventDefault()\"\n (keydown.tab)=\"handleCleanKeyboardTab($event)\"\n >\n </po-clean>\n }\n }\n <div\n #iconArrow\n class=\"po-combo-arrow po-field-icon\"\n [class.po-field-icon-disabled]=\"isDisabled\"\n [class.po-field-icon-disabled-aa]=\"isDisabled && size === 'small'\"\n (click)=\"!isDisabled && toggleComboVisibility(true)\"\n >\n <po-icon\n [p-icon]=\"comboOpen ? 'ICON_ARROW_UP po-icon-input' : 'ICON_ARROW_DOWN po-icon-input'\"\n [class.po-field-icon]=\"!isDisabled\"\n [class.po-field-icon-aa]=\"size === 'small'\"\n [class.po-combo-default-border]=\"!isDisabled && inp.value\"\n [class.po-combo-background-arrow-up]=\"!isDisabled && comboOpen\"\n ></po-icon>\n </div>\n </div>\n </div>\n @if ((!this.label && poHelperComponent()) || (!this.label && poHelper.hideAdditionalHelp)) {\n <po-helper\n #helperEl\n class=\"po-field-helper-button\"\n [p-size]=\"size\"\n [p-helper]=\"poHelper.helperSettings\"\n [p-disabled]=\"isDisabled\"\n [p-append-in-body]=\"appendBox\"\n >\n </po-helper>\n }\n </div>\n </div>\n\n @if (appendBox) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"true\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownListbox\"></ng-container>\n </ng-template>\n } @else {\n <ng-container *ngTemplateOutlet=\"dropdownListbox\"> </ng-container>\n }\n\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"isDisabled\"\n [p-error-pattern]=\"getErrorPattern()\"\n [p-error-limit]=\"errorLimit\"\n [p-size]=\"size\"\n ></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-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-size]=\"size\"\n [p-container-width]=\"containerWidth\"\n (p-selectcombo-item)=\"onOptionClick($event, $event.event)\"\n (p-update-infinite-scroll)=\"showMoreInfiniteScroll()\"\n (p-close)=\"onCloseCombo()\"\n (keydown)=\"onListboxKeyDown($event)\"\n ></po-listbox>\n </div>\n </ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: PoFieldContainerBottomComponent, selector: "po-field-container-bottom", inputs: ["p-append-in-body", "p-disabled", "p-error-pattern", "p-error-limit", "p-help", "p-size", "p-helper", "p-show-helper"] }, { kind: "component", type: PoFieldContainerComponent, selector: "po-field-container", inputs: ["p-disabled", "p-id", "p-label", "p-help", "p-helper", "p-show-helper", "p-text-wrap", "p-optional", "p-required", "p-show-required", "p-size", "p-compact-label"] }, { kind: "component", type: PoListBoxComponent, selector: "po-listbox", inputs: ["p-root-lazy-load"], outputs: ["p-root-items-load"] }, { kind: "component", type: PoHelperComponent, selector: "po-helper" }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "component", type: PoCleanComponent, selector: "po-clean" }, { kind: "component", type: PoLoadingIconComponent, selector: "po-loading-icon", inputs: ["p-neutral-color", "p-size", "p-in-overlay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16688
|
+
], queries: [{ propertyName: "comboOptionTemplate", first: true, predicate: PoComboOptionTemplateDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "outerContainer", first: true, predicate: ["outerContainer "], descendants: true, read: ElementRef }, { propertyName: "containerElement", first: true, predicate: ["containerElement"], descendants: true, read: ElementRef }, { propertyName: "contentElement", first: true, predicate: ["contentElement"], descendants: true, read: ElementRef }, { propertyName: "fieldContainerInput", first: true, predicate: ["fieldContainerInput"], descendants: true, read: ElementRef }, { propertyName: "iconElement", first: true, predicate: ["iconArrow"], descendants: true, read: ElementRef, static: true }, { propertyName: "inputEl", first: true, predicate: ["inp"], descendants: true, read: ElementRef, static: true }, { propertyName: "poListbox", first: true, predicate: ["poListbox"], descendants: true }, { propertyName: "helperEl", first: true, predicate: ["helperEl"], descendants: true, read: PoHelperComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@let poHelper = setHelper(label, additionalHelpTooltip);\n@let needsHelper = !label && (poHelperComponent() || poHelper.hideAdditionalHelp);\n<div #outerContainer>\n <po-field-container\n [p-disabled]=\"isDisabled\"\n [p-id]=\"id\"\n [p-label]=\"label\"\n [p-optional]=\"optional\"\n [p-required]=\"required\"\n [p-show-required]=\"showRequired\"\n [p-helper]=\"label ? poHelper.helperSettings : undefined\"\n [p-show-helper]=\"label ? displayAdditionalHelp : undefined\"\n [p-size]=\"size\"\n [p-text-wrap]=\"labelTextWrap()\"\n [p-compact-label]=\"compactLabel()\"\n >\n <div\n #searchContainer\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n class=\"po-field-container-content po-combo-container-content\"\n >\n <div class=\"po-field-container-content-helper-wrapper\">\n <div #fieldContainerInput class=\"po-field-container-input\">\n @if (icon) {\n <div class=\"po-field-icon-container-left\">\n <po-icon\n class=\"po-field-icon po-icon-input\"\n [class.po-field-icon-disabled]=\"isDisabled\"\n [class.po-field-icon-aa]=\"size === 'small'\"\n [p-icon]=\"icon\"\n ></po-icon>\n </div>\n }\n\n <input\n #inp\n class=\"po-combo-input\"\n [ngClass]=\"\n clean && inp.value\n ? size === 'small'\n ? 'po-input-double-icon-right-aa'\n : 'po-input-double-icon-right'\n : size === 'small'\n ? 'po-input-icon-right-aa'\n : 'po-input-icon-right'\n \"\n [class.po-input-icon-left]=\"icon\"\n [class.po-input-icon-left-aa]=\"icon && size === 'small'\"\n autocomplete=\"off\"\n type=\"text\"\n [attr.data-focused-element]=\"!isDisabled\"\n [attr.data-inactive-component]=\"isDisabled\"\n [attr.name]=\"name\"\n [disabled]=\"isDisabled\"\n [id]=\"id\"\n [placeholder]=\"isDisabled ? '' : placeholder\"\n [required]=\"required\"\n [attr.data-append-in-body]=\"appendBox\"\n [attr.p-size]=\"size\"\n (click)=\"!isDisabled && toggleComboVisibility()\"\n (keyup)=\"onKeyUp($event)\"\n (blur)=\"onBlur($event)\"\n (keyup)=\"searchOnEnterOrArrow($event, $event.target.value)\"\n (keydown)=\"onKeyDown($event)\"\n />\n\n <div class=\"po-field-icon-container-right\">\n @if (loading) {\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n } @else {\n @if (!loading && isCleanVisible()) {\n <po-clean\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"literals.clean\"\n class=\"po-combo-clean po-icon-input\"\n [class.po-combo-clean-aa]=\"size === 'small'\"\n [p-element-ref]=\"inputEl\"\n [p-size]=\"size\"\n (p-change-event)=\"clear($event)\"\n (click)=\"clear(null); $event.preventDefault()\"\n (keydown.enter)=\"clearAndFocus(); $event.preventDefault()\"\n (keydown.tab)=\"handleCleanKeyboardTab($event)\"\n >\n </po-clean>\n }\n }\n <div\n #iconArrow\n class=\"po-combo-arrow po-field-icon\"\n [class.po-field-icon-disabled]=\"isDisabled\"\n [class.po-field-icon-disabled-aa]=\"isDisabled && size === 'small'\"\n (click)=\"!isDisabled && toggleComboVisibility(true)\"\n >\n <po-icon\n [p-icon]=\"comboOpen ? 'ICON_ARROW_UP po-icon-input' : 'ICON_ARROW_DOWN po-icon-input'\"\n [class.po-field-icon]=\"!isDisabled\"\n [class.po-field-icon-aa]=\"size === 'small'\"\n [class.po-combo-default-border]=\"!isDisabled && inp.value\"\n [class.po-combo-background-arrow-up]=\"!isDisabled && comboOpen\"\n ></po-icon>\n </div>\n </div>\n </div>\n @if ((!this.label && poHelperComponent()) || (!this.label && poHelper.hideAdditionalHelp)) {\n <po-helper\n #helperEl\n class=\"po-field-helper-button\"\n [p-size]=\"size\"\n [p-helper]=\"poHelper.helperSettings\"\n [p-disabled]=\"isDisabled\"\n [p-append-in-body]=\"appendBox\"\n >\n </po-helper>\n }\n </div>\n </div>\n\n @if (appendBox) {\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"true\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n >\n <ng-container *ngTemplateOutlet=\"dropdownListbox\"></ng-container>\n </ng-template>\n } @else {\n <ng-container *ngTemplateOutlet=\"dropdownListbox\"> </ng-container>\n }\n\n <po-field-container-bottom\n [p-append-in-body]=\"appendBox\"\n [p-help]=\"help\"\n [p-disabled]=\"isDisabled\"\n [p-error-pattern]=\"getErrorPattern()\"\n [p-error-limit]=\"errorLimit\"\n [p-size]=\"size\"\n ></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-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-size]=\"size\"\n [p-container-width]=\"containerWidth\"\n (p-selectcombo-item)=\"onOptionClick($event, $event.event)\"\n (p-update-infinite-scroll)=\"showMoreInfiniteScroll()\"\n (p-close)=\"onCloseCombo()\"\n (keydown)=\"onListboxKeyDown($event)\"\n ></po-listbox>\n </div>\n </ng-template>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: PoFieldContainerBottomComponent, selector: "po-field-container-bottom", inputs: ["p-append-in-body", "p-disabled", "p-error-pattern", "p-error-limit", "p-help", "p-size", "p-helper", "p-show-helper"] }, { kind: "component", type: PoFieldContainerComponent, selector: "po-field-container", inputs: ["p-disabled", "p-id", "p-label", "p-help", "p-helper", "p-show-helper", "p-text-wrap", "p-optional", "p-required", "p-show-required", "p-size", "p-compact-label"] }, { kind: "component", type: PoListBoxComponent, selector: "po-listbox", inputs: ["p-root-lazy-load"], outputs: ["p-root-items-load", "p-content-change"] }, { kind: "component", type: PoHelperComponent, selector: "po-helper" }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "component", type: PoCleanComponent, selector: "po-clean" }, { kind: "component", type: PoLoadingIconComponent, selector: "po-loading-icon", inputs: ["p-neutral-color", "p-size", "p-in-overlay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16584
16689
|
}
|
|
16585
16690
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoComboComponent, decorators: [{
|
|
16586
16691
|
type: Component,
|
|
@@ -18736,7 +18841,7 @@ class PoChartBaseComponent {
|
|
|
18736
18841
|
* - Os marcadores (*bullets*) terão seu estilo ajustado.
|
|
18737
18842
|
* - As outras séries ficarão com opacidade reduzida ao passar o mouse sobre a série ativa.
|
|
18738
18843
|
*
|
|
18739
|
-
* > Disponível para gráficos do tipo `line` e `radar`.
|
|
18844
|
+
* > Disponível para gráficos do tipo `line`, `area`, `column`, `bar` e `radar`.
|
|
18740
18845
|
*
|
|
18741
18846
|
* #### Exemplo de utilização:
|
|
18742
18847
|
* ```typescript
|
|
@@ -19073,8 +19178,7 @@ class PoChartGridUtils {
|
|
|
19073
19178
|
this.component.boundaryGap = true;
|
|
19074
19179
|
if (this.component.options?.stacked || serie.stackGroupName) {
|
|
19075
19180
|
serie.stack = this.component.options?.stacked ? 'total' : serie.stackGroupName;
|
|
19076
|
-
if (this.component.dataLabel?.fixed
|
|
19077
|
-
this.component.dataLabel = { fixed: true };
|
|
19181
|
+
if (this.component.dataLabel?.fixed === true) {
|
|
19078
19182
|
serie.label = { show: true };
|
|
19079
19183
|
}
|
|
19080
19184
|
}
|
|
@@ -20095,7 +20199,9 @@ class PoChartComponent extends PoChartBaseComponent {
|
|
|
20095
20199
|
this.series.some(serie => serie.type === 'area') ||
|
|
20096
20200
|
this.options?.areaStyle ||
|
|
20097
20201
|
this.series.some(serie => serie.areaStyle === true);
|
|
20098
|
-
const newSeries =
|
|
20202
|
+
const newSeries = this.colorService
|
|
20203
|
+
.getColors(this.series, true, hasArea)
|
|
20204
|
+
.map(serie => ({ ...serie }));
|
|
20099
20205
|
const tokenBorderWidthMd = this.chartGridUtils.resolvePx('--border-width-md');
|
|
20100
20206
|
const findType = this.series.find(serie => serie.type)?.type;
|
|
20101
20207
|
let serieGauge = {};
|
|
@@ -21509,28 +21615,32 @@ class PoDropdownBaseComponent {
|
|
|
21509
21615
|
label;
|
|
21510
21616
|
icon = 'ICON_ARROW_DOWN';
|
|
21511
21617
|
open = false;
|
|
21512
|
-
_actions;
|
|
21618
|
+
_actions = [];
|
|
21619
|
+
_rootLazyLoad;
|
|
21513
21620
|
_disabled = false;
|
|
21514
21621
|
_size = undefined;
|
|
21515
21622
|
_initialSize = undefined;
|
|
21516
21623
|
_position = poDropdownDefaultPosition;
|
|
21517
21624
|
/**
|
|
21518
21625
|
* Lista de ações que serão exibidas no componente.
|
|
21519
|
-
*
|
|
21520
|
-
* Aceita um *array* de `PoDropdownAction` (carregado imediatamente) ou uma função que retorna um
|
|
21521
|
-
* `Observable<Array<PoDropdownAction>>`, carregando o nível raiz de forma assíncrona na abertura.
|
|
21626
|
+
* Aceita um *array* de `PoDropdownAction`.
|
|
21522
21627
|
*/
|
|
21523
21628
|
set actions(value) {
|
|
21524
21629
|
if (typeof value === 'function') {
|
|
21525
|
-
this.
|
|
21630
|
+
this._rootLazyLoad = value;
|
|
21631
|
+
this._actions = [];
|
|
21526
21632
|
}
|
|
21527
21633
|
else {
|
|
21634
|
+
this._rootLazyLoad = undefined;
|
|
21528
21635
|
this._actions = Array.isArray(value) ? value : [];
|
|
21529
21636
|
}
|
|
21530
21637
|
}
|
|
21531
21638
|
get actions() {
|
|
21532
21639
|
return this._actions;
|
|
21533
21640
|
}
|
|
21641
|
+
get popupActions() {
|
|
21642
|
+
return this._rootLazyLoad ?? this._actions;
|
|
21643
|
+
}
|
|
21534
21644
|
/**
|
|
21535
21645
|
* @optional
|
|
21536
21646
|
*
|
|
@@ -21603,9 +21713,10 @@ class PoDropdownBaseComponent {
|
|
|
21603
21713
|
*
|
|
21604
21714
|
* @description
|
|
21605
21715
|
*
|
|
21606
|
-
* Evento disparado a
|
|
21716
|
+
* Evento disparado a cada clique em um item do menu.
|
|
21717
|
+
* Retorna o item clicado (`PoDropdownAction`).
|
|
21607
21718
|
*
|
|
21608
|
-
*
|
|
21719
|
+
* > Não é disparado para a ação interna de voltar (`goBack`).
|
|
21609
21720
|
*/
|
|
21610
21721
|
clickItem = new EventEmitter();
|
|
21611
21722
|
/**
|
|
@@ -21613,10 +21724,10 @@ class PoDropdownBaseComponent {
|
|
|
21613
21724
|
*
|
|
21614
21725
|
* @description
|
|
21615
21726
|
*
|
|
21616
|
-
* Evento disparado no momento em que a requisição assíncrona de um subnível é iniciada
|
|
21617
|
-
*
|
|
21727
|
+
* Evento disparado no momento em que a requisição assíncrona de um subnível é iniciada.
|
|
21728
|
+
* Retorna o item agrupador (`PoDropdownAction`) que originou o carregamento.
|
|
21618
21729
|
*
|
|
21619
|
-
*
|
|
21730
|
+
* > Compatível com a propriedade PoPopupAction.subItemsLazy
|
|
21620
21731
|
*/
|
|
21621
21732
|
subItemsLoad = new EventEmitter();
|
|
21622
21733
|
/**
|
|
@@ -21625,7 +21736,8 @@ class PoDropdownBaseComponent {
|
|
|
21625
21736
|
* @description
|
|
21626
21737
|
*
|
|
21627
21738
|
* Evento disparado no momento em que a requisição assíncrona do nível raiz é iniciada
|
|
21628
|
-
*
|
|
21739
|
+
*
|
|
21740
|
+
* > Compatível com a propriedade PoPopupAction.subItemsLazy
|
|
21629
21741
|
*/
|
|
21630
21742
|
rootItemsLoad = new EventEmitter();
|
|
21631
21743
|
get popupCustomPositions() {
|
|
@@ -21694,16 +21806,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
21694
21806
|
* <file name="sample-po-dropdown-basic/sample-po-dropdown-basic.component.ts"> </file>
|
|
21695
21807
|
* </example>
|
|
21696
21808
|
*
|
|
21697
|
-
* <example name="po-dropdown-subitems" title="PO Dropdown Subitems" >
|
|
21698
|
-
* <file name="sample-po-dropdown-subitems/sample-po-dropdown-subitems.component.html"> </file>
|
|
21699
|
-
* <file name="sample-po-dropdown-subitems/sample-po-dropdown-subitems.component.ts"> </file>
|
|
21700
|
-
* </example>
|
|
21701
|
-
*
|
|
21702
|
-
* <example name="po-dropdown-lazy-subitems" title="PO Dropdown Lazy Subitems" >
|
|
21703
|
-
* <file name="sample-po-dropdown-lazy-subitems/sample-po-dropdown-lazy-subitems.component.html"> </file>
|
|
21704
|
-
* <file name="sample-po-dropdown-lazy-subitems/sample-po-dropdown-lazy-subitems.component.ts"> </file>
|
|
21705
|
-
* </example>
|
|
21706
|
-
*
|
|
21707
21809
|
* <example name="po-dropdown-labs" title="PO Dropdown Labs" >
|
|
21708
21810
|
* <file name="sample-po-dropdown-labs/sample-po-dropdown-labs.component.html"> </file>
|
|
21709
21811
|
* <file name="sample-po-dropdown-labs/sample-po-dropdown-labs.component.ts"> </file>
|
|
@@ -21713,6 +21815,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
21713
21815
|
* <file name="sample-po-dropdown-social-network/sample-po-dropdown-social-network.component.html"> </file>
|
|
21714
21816
|
* <file name="sample-po-dropdown-social-network/sample-po-dropdown-social-network.component.ts"> </file>
|
|
21715
21817
|
* </example>
|
|
21818
|
+
*
|
|
21819
|
+
* <example name="po-dropdown-subitems" title="PO Dropdown Subitems" >
|
|
21820
|
+
* <file name="sample-po-dropdown-subitems/sample-po-dropdown-subitems.component.html"> </file>
|
|
21821
|
+
* <file name="sample-po-dropdown-subitems/sample-po-dropdown-subitems.component.ts"> </file>
|
|
21822
|
+
* </example>
|
|
21823
|
+
*
|
|
21824
|
+
* <example name="po-dropdown-lazy-subitems" title="PO Dropdown Lazy Subitems" >
|
|
21825
|
+
* <file name="sample-po-dropdown-lazy-subitems/sample-po-dropdown-lazy-subitems.component.html"> </file>
|
|
21826
|
+
* <file name="sample-po-dropdown-lazy-subitems/sample-po-dropdown-lazy-subitems.component.ts"> </file>
|
|
21827
|
+
* </example>
|
|
21716
21828
|
*/
|
|
21717
21829
|
class PoDropdownComponent extends PoDropdownBaseComponent {
|
|
21718
21830
|
renderer = inject(Renderer2);
|
|
@@ -21766,10 +21878,20 @@ class PoDropdownComponent extends PoDropdownBaseComponent {
|
|
|
21766
21878
|
window.addEventListener('scroll', this.onScroll, true);
|
|
21767
21879
|
}
|
|
21768
21880
|
onScroll = ({ target }) => {
|
|
21769
|
-
if (this.open
|
|
21881
|
+
if (!this.open) {
|
|
21882
|
+
return;
|
|
21883
|
+
}
|
|
21884
|
+
if (this.isScrollInsidePopup(target)) {
|
|
21885
|
+
return;
|
|
21886
|
+
}
|
|
21887
|
+
if (!this.isDropdownClosed()) {
|
|
21770
21888
|
this.hideDropdown();
|
|
21771
21889
|
}
|
|
21772
21890
|
};
|
|
21891
|
+
isScrollInsidePopup(target) {
|
|
21892
|
+
const popupElement = this.popupRef?.popupRef?.nativeElement;
|
|
21893
|
+
return !!(popupElement && target instanceof Node && popupElement.contains(target));
|
|
21894
|
+
}
|
|
21773
21895
|
isDropdownClosed() {
|
|
21774
21896
|
const dropdownRect = this.dropdownRef.nativeElement.getBoundingClientRect();
|
|
21775
21897
|
return dropdownRect.top >= 0 && dropdownRect.bottom <= window.innerHeight;
|
|
@@ -21797,11 +21919,11 @@ class PoDropdownComponent extends PoDropdownBaseComponent {
|
|
|
21797
21919
|
}
|
|
21798
21920
|
}
|
|
21799
21921
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
21800
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: PoDropdownComponent, isStandalone: false, selector: "po-dropdown", viewQueries: [{ propertyName: "dropdownRef", first: true, predicate: ["dropdownRef"], descendants: true, read: ElementRef, static: true }, { propertyName: "popupRef", first: true, predicate: ["popupRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n #dropdownRef\n class=\"po-dropdown\"\n [attr.disabled]=\"disabled\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n (click)=\"toggleDropdown()\"\n (keydown)=\"onKeyDown($event)\"\n>\n <div\n class=\"po-dropdown-button\"\n [ngClass]=\"{ 'po-dropdown-button-disabled': disabled, 'po-dropdown-button-open': open }\"\n >\n <span>{{ label }}</span>\n <po-icon class=\"po-dropdown-icon\" [p-icon]=\"icon\"></po-icon>\n </div>\n</div>\n\n<po-popup\n #popupRef\n p-hide-arrow\n p-is-corner-align\n [p-position]=\"position\"\n [p-actions]=\"
|
|
21922
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: PoDropdownComponent, isStandalone: false, selector: "po-dropdown", viewQueries: [{ propertyName: "dropdownRef", first: true, predicate: ["dropdownRef"], descendants: true, read: ElementRef, static: true }, { propertyName: "popupRef", first: true, predicate: ["popupRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n #dropdownRef\n class=\"po-dropdown\"\n [attr.disabled]=\"disabled\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n (click)=\"toggleDropdown()\"\n (keydown)=\"onKeyDown($event)\"\n>\n <div\n class=\"po-dropdown-button\"\n [ngClass]=\"{ 'po-dropdown-button-disabled': disabled, 'po-dropdown-button-open': open }\"\n >\n <span>{{ label }}</span>\n <po-icon class=\"po-dropdown-icon\" [p-icon]=\"icon\"></po-icon>\n </div>\n</div>\n\n<po-popup\n #popupRef\n p-hide-arrow\n p-is-corner-align\n [p-position]=\"position\"\n [p-actions]=\"popupActions\"\n [p-custom-positions]=\"popupCustomPositions\"\n [p-size]=\"size\"\n [p-target]=\"dropdownRef\"\n (p-close)=\"onPopupClose()\"\n (p-click-item)=\"clickItem.emit($event)\"\n (p-sub-items-load)=\"subItemsLoad.emit($event)\"\n (p-root-items-load)=\"rootItemsLoad.emit()\"\n>\n</po-popup>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PoPopupComponent, selector: "po-popup" }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
21801
21923
|
}
|
|
21802
21924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoDropdownComponent, decorators: [{
|
|
21803
21925
|
type: Component,
|
|
21804
|
-
args: [{ selector: 'po-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div\n #dropdownRef\n class=\"po-dropdown\"\n [attr.disabled]=\"disabled\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n (click)=\"toggleDropdown()\"\n (keydown)=\"onKeyDown($event)\"\n>\n <div\n class=\"po-dropdown-button\"\n [ngClass]=\"{ 'po-dropdown-button-disabled': disabled, 'po-dropdown-button-open': open }\"\n >\n <span>{{ label }}</span>\n <po-icon class=\"po-dropdown-icon\" [p-icon]=\"icon\"></po-icon>\n </div>\n</div>\n\n<po-popup\n #popupRef\n p-hide-arrow\n p-is-corner-align\n [p-position]=\"position\"\n [p-actions]=\"
|
|
21926
|
+
args: [{ selector: 'po-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div\n #dropdownRef\n class=\"po-dropdown\"\n [attr.disabled]=\"disabled\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n (click)=\"toggleDropdown()\"\n (keydown)=\"onKeyDown($event)\"\n>\n <div\n class=\"po-dropdown-button\"\n [ngClass]=\"{ 'po-dropdown-button-disabled': disabled, 'po-dropdown-button-open': open }\"\n >\n <span>{{ label }}</span>\n <po-icon class=\"po-dropdown-icon\" [p-icon]=\"icon\"></po-icon>\n </div>\n</div>\n\n<po-popup\n #popupRef\n p-hide-arrow\n p-is-corner-align\n [p-position]=\"position\"\n [p-actions]=\"popupActions\"\n [p-custom-positions]=\"popupCustomPositions\"\n [p-size]=\"size\"\n [p-target]=\"dropdownRef\"\n (p-close)=\"onPopupClose()\"\n (p-click-item)=\"clickItem.emit($event)\"\n (p-sub-items-load)=\"subItemsLoad.emit($event)\"\n (p-root-items-load)=\"rootItemsLoad.emit()\"\n>\n</po-popup>\n" }]
|
|
21805
21927
|
}], propDecorators: { dropdownRef: [{
|
|
21806
21928
|
type: ViewChild,
|
|
21807
21929
|
args: ['dropdownRef', { read: ElementRef, static: true }]
|
|
@@ -42743,7 +42865,7 @@ class PoSearchComponent extends PoSearchBaseComponent {
|
|
|
42743
42865
|
this.placeholderListbox = null;
|
|
42744
42866
|
}
|
|
42745
42867
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
42746
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", 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-loading]=\"loading && type !== 'locate'\"\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]=\"isDisabled\"\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 [attr.id]=\"id || null\"\n [autocomplete]=\"autocomplete\"\n [attr.name]=\"name\"\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]=\"isDisabled\"\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 <div [id]=\"idSearchButtonClean\">\n @if (loading && type !== 'locate') {\n <div class=\"po-search-button po-search-button-loading\">\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n } @else if (!!poSearchInput.value) {\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 }\n </div>\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]=\"isDisabled\"\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: PoLoadingIconComponent, selector: "po-loading-icon", inputs: ["p-neutral-color", "p-size", "p-in-overlay"] }, { kind: "component", type: PoListBoxComponent, selector: "po-listbox", inputs: ["p-root-lazy-load"], outputs: ["p-root-items-load"] }, { kind: "component", type: PoDropdownComponent, selector: "po-dropdown" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
42868
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", 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-loading]=\"loading && type !== 'locate'\"\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]=\"isDisabled\"\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 [attr.id]=\"id || null\"\n [autocomplete]=\"autocomplete\"\n [attr.name]=\"name\"\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]=\"isDisabled\"\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 <div [id]=\"idSearchButtonClean\">\n @if (loading && type !== 'locate') {\n <div class=\"po-search-button po-search-button-loading\">\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n } @else if (!!poSearchInput.value) {\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 }\n </div>\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]=\"isDisabled\"\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: PoLoadingIconComponent, selector: "po-loading-icon", inputs: ["p-neutral-color", "p-size", "p-in-overlay"] }, { kind: "component", type: PoListBoxComponent, selector: "po-listbox", inputs: ["p-root-lazy-load"], outputs: ["p-root-items-load", "p-content-change"] }, { kind: "component", type: PoDropdownComponent, selector: "po-dropdown" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
42747
42869
|
}
|
|
42748
42870
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSearchComponent, decorators: [{
|
|
42749
42871
|
type: Component,
|
|
@@ -51068,7 +51190,7 @@ class PoMultiselectDropdownComponent {
|
|
|
51068
51190
|
return newSelectedOptions;
|
|
51069
51191
|
}
|
|
51070
51192
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoMultiselectDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
51071
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: PoMultiselectDropdownComponent, isStandalone: false, selector: "po-multiselect-dropdown", inputs: { isServerSearching: ["p-searching", "isServerSearching"], hideSearch: ["p-hide-search", "hideSearch"], literals: ["p-literals", "literals"], placeholderSearch: ["p-placeholder-search", "placeholderSearch"], selectedOptions: ["p-selected-options", "selectedOptions"], options: ["p-options", "options"], visibleOptions: ["p-visible-options", "visibleOptions"], hideSelectAll: ["p-hide-select-all", "hideSelectAll"], fieldValue: ["p-field-value", "fieldValue"], fieldLabel: ["p-field-label", "fieldLabel"], multiselectTemplate: ["p-multiselect-template", "multiselectTemplate"], containerWidth: ["p-container-width", "containerWidth"], size: ["p-size", "size"] }, outputs: { changeSearch: "p-change-search", change: "p-change", closeDropdown: "p-close-dropdown" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ElementRef, static: true }, { propertyName: "divElement", first: true, predicate: ["divElement"], descendants: true, read: ElementRef, static: true }, { propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true }], ngImport: i0, template: "<div #container class=\"po-multiselect-container\" [hidden]=\"!show\">\n <div [scrollTop]=\"scrollTop\" #divElement>\n <ng-container>\n <po-listbox\n #listbox\n p-type=\"check\"\n [p-items]=\"visibleOptions\"\n [p-selected-options]=\"selectedOptions\"\n [p-checkboxAllValue]=\"getStateSelectAll()\"\n [p-field-value]=\"fieldValue\"\n [p-field-value-search]=\"fieldValue\"\n [p-field-label]=\"fieldLabel\"\n [p-literal-search]=\"literals\"\n [p-literals]=\"literals\"\n [p-is-searching]=\"isServerSearching\"\n [p-hide-search]=\"hideSearch\"\n [p-hide-select-all]=\"hideSelectAll\"\n [p-template]=\"multiselectTemplate\"\n [p-placeholder-search]=\"placeholderSearch\"\n [p-size]=\"size\"\n (p-change)=\"clickItem($event)\"\n (p-change-all)=\"onClickSelectAll()\"\n (p-change-search)=\"callChangeSearch($event)\"\n (p-close)=\"closeDropdown.emit()\"\n [p-container-width]=\"containerWidth\"\n >\n </po-listbox>\n </ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: PoListBoxComponent, selector: "po-listbox", inputs: ["p-root-lazy-load"], outputs: ["p-root-items-load"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
51193
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: PoMultiselectDropdownComponent, isStandalone: false, selector: "po-multiselect-dropdown", inputs: { isServerSearching: ["p-searching", "isServerSearching"], hideSearch: ["p-hide-search", "hideSearch"], literals: ["p-literals", "literals"], placeholderSearch: ["p-placeholder-search", "placeholderSearch"], selectedOptions: ["p-selected-options", "selectedOptions"], options: ["p-options", "options"], visibleOptions: ["p-visible-options", "visibleOptions"], hideSelectAll: ["p-hide-select-all", "hideSelectAll"], fieldValue: ["p-field-value", "fieldValue"], fieldLabel: ["p-field-label", "fieldLabel"], multiselectTemplate: ["p-multiselect-template", "multiselectTemplate"], containerWidth: ["p-container-width", "containerWidth"], size: ["p-size", "size"] }, outputs: { changeSearch: "p-change-search", change: "p-change", closeDropdown: "p-close-dropdown" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ElementRef, static: true }, { propertyName: "divElement", first: true, predicate: ["divElement"], descendants: true, read: ElementRef, static: true }, { propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true }], ngImport: i0, template: "<div #container class=\"po-multiselect-container\" [hidden]=\"!show\">\n <div [scrollTop]=\"scrollTop\" #divElement>\n <ng-container>\n <po-listbox\n #listbox\n p-type=\"check\"\n [p-items]=\"visibleOptions\"\n [p-selected-options]=\"selectedOptions\"\n [p-checkboxAllValue]=\"getStateSelectAll()\"\n [p-field-value]=\"fieldValue\"\n [p-field-value-search]=\"fieldValue\"\n [p-field-label]=\"fieldLabel\"\n [p-literal-search]=\"literals\"\n [p-literals]=\"literals\"\n [p-is-searching]=\"isServerSearching\"\n [p-hide-search]=\"hideSearch\"\n [p-hide-select-all]=\"hideSelectAll\"\n [p-template]=\"multiselectTemplate\"\n [p-placeholder-search]=\"placeholderSearch\"\n [p-size]=\"size\"\n (p-change)=\"clickItem($event)\"\n (p-change-all)=\"onClickSelectAll()\"\n (p-change-search)=\"callChangeSearch($event)\"\n (p-close)=\"closeDropdown.emit()\"\n [p-container-width]=\"containerWidth\"\n >\n </po-listbox>\n </ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: PoListBoxComponent, selector: "po-listbox", inputs: ["p-root-lazy-load"], outputs: ["p-root-items-load", "p-content-change"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
51072
51194
|
}
|
|
51073
51195
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoMultiselectDropdownComponent, decorators: [{
|
|
51074
51196
|
type: Component,
|
|
@@ -71059,7 +71181,7 @@ class PoTabDropdownComponent {
|
|
|
71059
71181
|
}
|
|
71060
71182
|
}
|
|
71061
71183
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoTabDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
71062
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PoTabDropdownComponent, isStandalone: false, selector: "po-tab-dropdown", inputs: { label: ["p-label", "label"], tabs: ["p-tabs", "tabs"], size: ["p-size", "size"] }, outputs: { activated: "p-activated", changeState: "p-change-state", click: "p-click" }, host: { listeners: { "document:click": "onClickOutside($event)" } }, viewQueries: [{ propertyName: "popover", first: true, predicate: ["popover"], descendants: true, static: true }, { propertyName: "button", first: true, predicate: PoButtonComponent, descendants: true, static: true }], ngImport: i0, template: "<div class=\"po-tab-dropdown-content po-tab-button-default\">\n <po-button\n #button\n p-kind=\"tertiary\"\n [p-aria-label]=\"label\"\n p-icon=\"ICON_ARROW_DOWN\"\n [p-size]=\"size\"\n (p-click)=\"toggleDropdown()\"\n >\n </po-button>\n</div>\n\n@if (isDropdownOpen) {\n <div class=\"po-tab-dropdown-container\" [ngStyle]=\"dropdownStyles\">\n <po-listbox\n #listbox\n #poListBoxRef\n p-type=\"action\"\n [p-items]=\"tabs\"\n [p-is-tabs]=\"true\"\n [p-size]=\"size\"\n (p-activated-tabs)=\"activated.emit($event)\"\n (p-change-state-tabs)=\"changeState.emit($event)\"\n (p-click-tabs)=\"closeDropdown(); click.emit($event)\"\n (p-close)=\"closeAndReturnToButtom()\"\n >\n </po-listbox>\n </div>\n}\n", dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: PoButtonComponent, selector: "po-button" }, { kind: "component", type: PoListBoxComponent, selector: "po-listbox", inputs: ["p-root-lazy-load"], outputs: ["p-root-items-load"] }] });
|
|
71184
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PoTabDropdownComponent, isStandalone: false, selector: "po-tab-dropdown", inputs: { label: ["p-label", "label"], tabs: ["p-tabs", "tabs"], size: ["p-size", "size"] }, outputs: { activated: "p-activated", changeState: "p-change-state", click: "p-click" }, host: { listeners: { "document:click": "onClickOutside($event)" } }, viewQueries: [{ propertyName: "popover", first: true, predicate: ["popover"], descendants: true, static: true }, { propertyName: "button", first: true, predicate: PoButtonComponent, descendants: true, static: true }], ngImport: i0, template: "<div class=\"po-tab-dropdown-content po-tab-button-default\">\n <po-button\n #button\n p-kind=\"tertiary\"\n [p-aria-label]=\"label\"\n p-icon=\"ICON_ARROW_DOWN\"\n [p-size]=\"size\"\n (p-click)=\"toggleDropdown()\"\n >\n </po-button>\n</div>\n\n@if (isDropdownOpen) {\n <div class=\"po-tab-dropdown-container\" [ngStyle]=\"dropdownStyles\">\n <po-listbox\n #listbox\n #poListBoxRef\n p-type=\"action\"\n [p-items]=\"tabs\"\n [p-is-tabs]=\"true\"\n [p-size]=\"size\"\n (p-activated-tabs)=\"activated.emit($event)\"\n (p-change-state-tabs)=\"changeState.emit($event)\"\n (p-click-tabs)=\"closeDropdown(); click.emit($event)\"\n (p-close)=\"closeAndReturnToButtom()\"\n >\n </po-listbox>\n </div>\n}\n", dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: PoButtonComponent, selector: "po-button" }, { kind: "component", type: PoListBoxComponent, selector: "po-listbox", inputs: ["p-root-lazy-load"], outputs: ["p-root-items-load", "p-content-change"] }] });
|
|
71063
71185
|
}
|
|
71064
71186
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoTabDropdownComponent, decorators: [{
|
|
71065
71187
|
type: Component,
|