@po-ui/ng-components 21.33.0 → 21.34.1

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.
Files changed (29) hide show
  1. package/fesm2022/po-ui-ng-components.mjs +1779 -1266
  2. package/fesm2022/po-ui-ng-components.mjs.map +1 -1
  3. package/lib/components/po-chart/po-chart-base.component.d.ts +1 -1
  4. package/lib/components/po-dropdown/po-dropdown-base.component.d.ts +41 -2
  5. package/lib/components/po-dropdown/po-dropdown.component.d.ts +13 -5
  6. package/lib/components/po-listbox/interfaces/po-listbox-literals.interface.d.ts +6 -0
  7. package/lib/components/po-listbox/po-listbox-base.component.d.ts +1 -0
  8. package/lib/components/po-listbox/po-listbox.component.d.ts +31 -5
  9. package/lib/components/po-popup/po-popup-action.interface.d.ts +29 -0
  10. package/lib/components/po-popup/po-popup-base.component.d.ts +38 -2
  11. package/lib/components/po-popup/po-popup.component.d.ts +16 -1
  12. package/package.json +4 -4
  13. package/po-ui-ng-components-21.34.1.tgz +0 -0
  14. package/schematics/ng-add/index.js +1 -1
  15. package/schematics/ng-update/v14/index.js +1 -1
  16. package/schematics/ng-update/v15/index.js +1 -1
  17. package/schematics/ng-update/v16/index.js +1 -1
  18. package/schematics/ng-update/v17/index.js +1 -1
  19. package/schematics/ng-update/v18/index.js +2 -2
  20. package/schematics/ng-update/v19/index.js +2 -2
  21. package/schematics/ng-update/v2/index.js +1 -1
  22. package/schematics/ng-update/v20/index.js +2 -2
  23. package/schematics/ng-update/v21/index.js +1 -1
  24. package/schematics/ng-update/v3/index.js +1 -1
  25. package/schematics/ng-update/v4/index.js +1 -1
  26. package/schematics/ng-update/v5/index.js +1 -1
  27. package/schematics/ng-update/v6/index.js +1 -1
  28. package/types/po-ui-ng-components.d.ts +506 -348
  29. package/po-ui-ng-components-21.33.0.tgz +0 -0
@@ -5,10 +5,10 @@ import { CommonModule, DOCUMENT, CurrencyPipe, DecimalPipe, TitleCasePipe, DateP
5
5
  import * as i2 from '@angular/platform-browser';
6
6
  import { DomSanitizer, Title } from '@angular/platform-browser';
7
7
  import { trigger, transition, style, animate, group, query, animateChild, AnimationBuilder, keyframes } from '@angular/animations';
8
- import { Subject, filter, Subscription, fromEvent, debounceTime, switchMap, isObservable, of, Observable, timer, ReplaySubject, throwError, map as map$1, catchError as catchError$1, startWith, delay as delay$1 } from 'rxjs';
8
+ import { Subject, filter, Subscription, takeUntil, finalize, fromEvent, debounceTime, switchMap, isObservable, of, Observable, timer, ReplaySubject, throwError, map as map$1, catchError as catchError$1, startWith, delay as delay$1 } from 'rxjs';
9
9
  import * as i1$1 from '@angular/router';
10
10
  import { RouterModule, Router, NavigationEnd, NavigationCancel } from '@angular/router';
11
- import * as i5 from '@angular/cdk/listbox';
11
+ import * as i7 from '@angular/cdk/listbox';
12
12
  import { CdkListbox, CdkOption, CdkListboxModule } from '@angular/cdk/listbox';
13
13
  import * as i1$2 from '@angular/forms';
14
14
  import { NG_VALUE_ACCESSOR, FormsModule, Validators, NG_VALIDATORS, NgControl, NgForm, ControlContainer } from '@angular/forms';
@@ -18,7 +18,7 @@ import * as i6 from '@angular/cdk/drag-drop';
18
18
  import { CdkDropList, moveItemInArray, transferArrayItem, CdkDragHandle, CdkDrag, DragDropModule } from '@angular/cdk/drag-drop';
19
19
  import * as i1$3 from '@angular/common/http';
20
20
  import { HttpClient, HttpHeaders, HttpEventType, HttpResponse, HttpRequest, HTTP_INTERCEPTORS } from '@angular/common/http';
21
- import { tap, map, debounceTime as debounceTime$1, filter as filter$1, distinctUntilChanged, takeWhile, take, delay, timeout, catchError, switchMap as switchMap$1, finalize, mergeMap } from 'rxjs/operators';
21
+ import { tap, map, debounceTime as debounceTime$1, filter as filter$1, distinctUntilChanged, takeWhile, take, delay, timeout, catchError, switchMap as switchMap$1, finalize as finalize$1, mergeMap } from 'rxjs/operators';
22
22
  import { BarChart, CustomChart, GaugeChart, LineChart, PieChart, RadarChart } from 'echarts/charts';
23
23
  import { GraphicComponent, BrushComponent, DataZoomComponent, GridComponent, LegendComponent, MarkLineComponent, ToolboxComponent, TooltipComponent } from 'echarts/components';
24
24
  import * as echarts from 'echarts/core';
@@ -4684,19 +4684,34 @@ class PoPopupBaseComponent {
4684
4684
  _position = poPopupDefaultPosition;
4685
4685
  _size = undefined;
4686
4686
  _target;
4687
+ rootLazyLoad;
4687
4688
  // Determina se o modo de subníveis deve ser ativado.
4688
- // Retorna true se alguma ação possuir subItems não vazio ou $subItemTemplate.
4689
4689
  get computedListboxSubitems() {
4690
+ if (this.rootLazyLoad) {
4691
+ return true;
4692
+ }
4690
4693
  if (!this._actions || this._actions.length === 0) {
4691
4694
  return false;
4692
4695
  }
4693
- return this._actions.some(action => (action.subItems && action.subItems.length > 0) || !!action.$subItemTemplate);
4696
+ return this._actions.some(action => typeof action.subItemsLazy === 'function' ||
4697
+ (Array.isArray(action.subItems) && action.subItems.length > 0) ||
4698
+ !!action.$subItemTemplate);
4694
4699
  }
4695
4700
  // template-icon
4696
4701
  templateIcon = false;
4697
- /** Lista de ações que serão exibidas no componente. */
4702
+ /**
4703
+ * Lista de ações que serão exibidas no componente.
4704
+ * Aceita um *array* de `PoPopupAction`.
4705
+ */
4698
4706
  set actions(value) {
4699
- this._actions = Array.isArray(value) ? value : [];
4707
+ if (typeof value === 'function') {
4708
+ this.rootLazyLoad = value;
4709
+ this._actions = [];
4710
+ }
4711
+ else {
4712
+ this.rootLazyLoad = undefined;
4713
+ this._actions = Array.isArray(value) ? value : [];
4714
+ }
4700
4715
  }
4701
4716
  get actions() {
4702
4717
  return this._actions;
@@ -4852,10 +4867,41 @@ class PoPopupBaseComponent {
4852
4867
  return this._target;
4853
4868
  }
4854
4869
  closeEvent = new EventEmitter();
4870
+ /**
4871
+ * @optional
4872
+ *
4873
+ * @description
4874
+ *
4875
+ * Evento disparado a cada clique em um item do menu.
4876
+ * Retorna o item clicado (`PoDropdownAction`).
4877
+ *
4878
+ * > Não é disparado para a ação interna de voltar (`goBack`).
4879
+ */
4855
4880
  clickItem = new EventEmitter();
4856
4881
  openEvent = new EventEmitter();
4882
+ /**
4883
+ * @optional
4884
+ *
4885
+ * @description
4886
+ *
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.
4889
+ *
4890
+ * > Compatível com a propriedade PoPopupAction.subItemsLazy
4891
+ */
4892
+ subItemsLoad = new EventEmitter();
4893
+ /**
4894
+ * @optional
4895
+ *
4896
+ * @description
4897
+ *
4898
+ * Evento disparado no momento em que a requisição assíncrona do nível raiz é iniciada
4899
+ *
4900
+ * > Compatível com a propriedade PoPopupAction.subItemsLazy
4901
+ */
4902
+ rootItemsLoad = new EventEmitter();
4857
4903
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoPopupBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4858
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: PoPopupBaseComponent, isStandalone: true, inputs: { templateIcon: ["p-template-icon", "templateIcon"], actions: ["p-actions", "actions"], hideArrow: ["p-hide-arrow", "hideArrow"], isCornerAlign: ["p-is-corner-align", "isCornerAlign"], position: ["p-position", "position"], customPositions: ["p-custom-positions", "customPositions"], size: ["p-size", "size"], target: ["p-target", "target"] }, outputs: { closeEvent: "p-close", clickItem: "p-click-item", openEvent: "p-open" }, ngImport: i0 });
4904
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: PoPopupBaseComponent, isStandalone: true, inputs: { templateIcon: ["p-template-icon", "templateIcon"], actions: ["p-actions", "actions"], hideArrow: ["p-hide-arrow", "hideArrow"], isCornerAlign: ["p-is-corner-align", "isCornerAlign"], position: ["p-position", "position"], customPositions: ["p-custom-positions", "customPositions"], size: ["p-size", "size"], target: ["p-target", "target"] }, outputs: { closeEvent: "p-close", clickItem: "p-click-item", openEvent: "p-open", subItemsLoad: "p-sub-items-load", rootItemsLoad: "p-root-items-load" }, ngImport: i0 });
4859
4905
  }
4860
4906
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoPopupBaseComponent, decorators: [{
4861
4907
  type: Directive
@@ -4892,6 +4938,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
4892
4938
  }], openEvent: [{
4893
4939
  type: Output,
4894
4940
  args: ['p-open']
4941
+ }], subItemsLoad: [{
4942
+ type: Output,
4943
+ args: ['p-sub-items-load']
4944
+ }], rootItemsLoad: [{
4945
+ type: Output,
4946
+ args: ['p-root-items-load']
4895
4947
  }] } });
4896
4948
 
4897
4949
  var PoItemListType;
@@ -4915,19 +4967,31 @@ var PoItemListFilterMode;
4915
4967
  const poListBoxLiteralsDefault = {
4916
4968
  en: {
4917
4969
  backToPreviousGroup: 'Go back to the previous list',
4918
- noItems: 'No items found'
4970
+ noItems: 'No items found',
4971
+ subItemsErrorMessage: 'Unable to load the items.',
4972
+ subItemsLoading: 'Loading items.',
4973
+ retry: 'Retry'
4919
4974
  },
4920
4975
  es: {
4921
4976
  backToPreviousGroup: 'Volver a la lista anterior',
4922
- noItems: 'No se encontraron artículos'
4977
+ noItems: 'No se encontraron artículos',
4978
+ subItemsErrorMessage: 'No se pudieron cargar los elementos.',
4979
+ subItemsLoading: 'Cargando elementos.',
4980
+ retry: 'Reintentar'
4923
4981
  },
4924
4982
  pt: {
4925
4983
  backToPreviousGroup: 'Voltar para a lista anterior',
4926
- noItems: 'Nenhum item encontrado'
4984
+ noItems: 'Nenhum item encontrado',
4985
+ subItemsErrorMessage: 'Não foi possível carregar os itens.',
4986
+ subItemsLoading: 'Carregando itens.',
4987
+ retry: 'Tentar novamente'
4927
4988
  },
4928
4989
  ru: {
4929
4990
  backToPreviousGroup: 'Вернуться к предыдущему списку',
4930
- noItems: 'ничего не найдено'
4991
+ noItems: 'ничего не найдено',
4992
+ subItemsErrorMessage: 'Не удалось загрузить элементы.',
4993
+ subItemsLoading: 'Загрузка элементов.',
4994
+ retry: 'Повторить попытку'
4931
4995
  }
4932
4996
  };
4933
4997
  /**
@@ -5041,6 +5105,7 @@ class PoListBoxBaseComponent {
5041
5105
  clickTab = new EventEmitter();
5042
5106
  changeStateTabs = new EventEmitter();
5043
5107
  clickItem = new EventEmitter();
5108
+ subItemsLoad = new EventEmitter();
5044
5109
  // Evento disparado ao clicar na ação do rodapé do listbox
5045
5110
  footerActionListboxEvent = new EventEmitter();
5046
5111
  constructor(languageService) {
@@ -5054,7 +5119,7 @@ class PoListBoxBaseComponent {
5054
5119
  this._size = size;
5055
5120
  }
5056
5121
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoListBoxBaseComponent, deps: [{ token: PoLanguageService }], target: i0.ɵɵFactoryTarget.Directive });
5057
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: PoListBoxBaseComponent, isStandalone: true, inputs: { listboxSubitems: { classPropertyName: "listboxSubitems", publicName: "p-listbox-subitems", isSignal: false, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "p-visible", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "p-type", isSignal: false, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "p-items", isSignal: false, isRequired: false, transformFunction: null }, literals: { classPropertyName: "literals", publicName: "p-literals", isSignal: false, isRequired: false, transformFunction: null }, isTabs: { classPropertyName: "isTabs", publicName: "p-is-tabs", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, param: { classPropertyName: "param", publicName: "p-param", isSignal: false, isRequired: false, transformFunction: null }, checkboxAllValue: { classPropertyName: "checkboxAllValue", publicName: "p-checkboxAllValue", isSignal: false, isRequired: false, transformFunction: null }, selectedOptions: { classPropertyName: "selectedOptions", publicName: "p-selected-options", isSignal: false, isRequired: false, transformFunction: null }, selectedOption: { classPropertyName: "selectedOption", publicName: "p-selected-option", isSignal: false, isRequired: false, transformFunction: null }, fieldValue: { classPropertyName: "fieldValue", publicName: "p-field-value", isSignal: false, isRequired: false, transformFunction: null }, fieldLabel: { classPropertyName: "fieldLabel", publicName: "p-field-label", isSignal: false, isRequired: false, transformFunction: null }, literalSearch: { classPropertyName: "literalSearch", publicName: "p-literal-search", isSignal: false, isRequired: false, transformFunction: null }, fieldValueSearch: { classPropertyName: "fieldValueSearch", publicName: "p-field-value-search", isSignal: false, isRequired: false, transformFunction: null }, hideSearch: { classPropertyName: "hideSearch", publicName: "p-hide-search", isSignal: false, isRequired: false, transformFunction: null }, hideSelectAll: { classPropertyName: "hideSelectAll", publicName: "p-hide-select-all", isSignal: false, isRequired: false, transformFunction: null }, multiselectTemplate: { classPropertyName: "multiselectTemplate", publicName: "p-multiselect-template", isSignal: false, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "p-template", isSignal: false, isRequired: false, transformFunction: null }, placeholderSearch: { classPropertyName: "placeholderSearch", publicName: "p-placeholder-search", isSignal: false, isRequired: false, transformFunction: null }, searchValue: { classPropertyName: "searchValue", publicName: "p-search-value", isSignal: false, isRequired: false, transformFunction: null }, isServerSearching: { classPropertyName: "isServerSearching", publicName: "p-is-searching", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, infiniteLoading: { classPropertyName: "infiniteLoading", publicName: "p-infinite-loading", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, infiniteScroll: { classPropertyName: "infiniteScroll", publicName: "p-infinite-scroll", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, cache: { classPropertyName: "cache", publicName: "p-cache", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, infiniteScrollDistance: { classPropertyName: "infiniteScrollDistance", publicName: "p-infinite-scroll-distance", isSignal: false, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "p-filter-mode", isSignal: false, isRequired: false, transformFunction: null }, isFiltering: { classPropertyName: "isFiltering", publicName: "p-filtering", isSignal: false, isRequired: false, transformFunction: null }, shouldMarkLetters: { classPropertyName: "shouldMarkLetters", publicName: "p-should-mark-letter", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: false, isRequired: false, transformFunction: null }, compareCache: { classPropertyName: "compareCache", publicName: "p-compare-cache", isSignal: false, isRequired: false, transformFunction: null }, comboService: { classPropertyName: "comboService", publicName: "p-combo-service", isSignal: false, isRequired: false, transformFunction: null }, containerWidth: { classPropertyName: "containerWidth", publicName: "p-container-width", isSignal: false, isRequired: false, transformFunction: null }, keysLabel: { classPropertyName: "keysLabel", publicName: "p-keys-label", isSignal: false, isRequired: false, transformFunction: null }, footerActionListbox: { classPropertyName: "footerActionListbox", publicName: "p-footer-action-listbox", isSignal: false, isRequired: false, transformFunction: null }, placeholderListbox: { classPropertyName: "placeholderListbox", publicName: "p-placeholder-listbox", isSignal: false, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "p-separator", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { changeSearch: "p-change-search", selectItem: "p-select-item", closeEvent: "p-close", change: "p-change", selectCombo: "p-selectcombo-item", changeAll: "p-change-all", UpdateInfiniteScroll: "p-update-infinite-scroll", activatedTab: "p-activated-tabs", clickTab: "p-click-tabs", changeStateTabs: "p-change-state-tabs", clickItem: "p-click-item", footerActionListboxEvent: "p-footer-action-listbox-event" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-size": "this.size" } }, ngImport: i0 });
5122
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: PoListBoxBaseComponent, isStandalone: true, inputs: { listboxSubitems: { classPropertyName: "listboxSubitems", publicName: "p-listbox-subitems", isSignal: false, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "p-visible", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "p-type", isSignal: false, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "p-items", isSignal: false, isRequired: false, transformFunction: null }, literals: { classPropertyName: "literals", publicName: "p-literals", isSignal: false, isRequired: false, transformFunction: null }, isTabs: { classPropertyName: "isTabs", publicName: "p-is-tabs", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, param: { classPropertyName: "param", publicName: "p-param", isSignal: false, isRequired: false, transformFunction: null }, checkboxAllValue: { classPropertyName: "checkboxAllValue", publicName: "p-checkboxAllValue", isSignal: false, isRequired: false, transformFunction: null }, selectedOptions: { classPropertyName: "selectedOptions", publicName: "p-selected-options", isSignal: false, isRequired: false, transformFunction: null }, selectedOption: { classPropertyName: "selectedOption", publicName: "p-selected-option", isSignal: false, isRequired: false, transformFunction: null }, fieldValue: { classPropertyName: "fieldValue", publicName: "p-field-value", isSignal: false, isRequired: false, transformFunction: null }, fieldLabel: { classPropertyName: "fieldLabel", publicName: "p-field-label", isSignal: false, isRequired: false, transformFunction: null }, literalSearch: { classPropertyName: "literalSearch", publicName: "p-literal-search", isSignal: false, isRequired: false, transformFunction: null }, fieldValueSearch: { classPropertyName: "fieldValueSearch", publicName: "p-field-value-search", isSignal: false, isRequired: false, transformFunction: null }, hideSearch: { classPropertyName: "hideSearch", publicName: "p-hide-search", isSignal: false, isRequired: false, transformFunction: null }, hideSelectAll: { classPropertyName: "hideSelectAll", publicName: "p-hide-select-all", isSignal: false, isRequired: false, transformFunction: null }, multiselectTemplate: { classPropertyName: "multiselectTemplate", publicName: "p-multiselect-template", isSignal: false, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "p-template", isSignal: false, isRequired: false, transformFunction: null }, placeholderSearch: { classPropertyName: "placeholderSearch", publicName: "p-placeholder-search", isSignal: false, isRequired: false, transformFunction: null }, searchValue: { classPropertyName: "searchValue", publicName: "p-search-value", isSignal: false, isRequired: false, transformFunction: null }, isServerSearching: { classPropertyName: "isServerSearching", publicName: "p-is-searching", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, infiniteLoading: { classPropertyName: "infiniteLoading", publicName: "p-infinite-loading", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, infiniteScroll: { classPropertyName: "infiniteScroll", publicName: "p-infinite-scroll", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, cache: { classPropertyName: "cache", publicName: "p-cache", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, infiniteScrollDistance: { classPropertyName: "infiniteScrollDistance", publicName: "p-infinite-scroll-distance", isSignal: false, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "p-filter-mode", isSignal: false, isRequired: false, transformFunction: null }, isFiltering: { classPropertyName: "isFiltering", publicName: "p-filtering", isSignal: false, isRequired: false, transformFunction: null }, shouldMarkLetters: { classPropertyName: "shouldMarkLetters", publicName: "p-should-mark-letter", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: false, isRequired: false, transformFunction: null }, compareCache: { classPropertyName: "compareCache", publicName: "p-compare-cache", isSignal: false, isRequired: false, transformFunction: null }, comboService: { classPropertyName: "comboService", publicName: "p-combo-service", isSignal: false, isRequired: false, transformFunction: null }, containerWidth: { classPropertyName: "containerWidth", publicName: "p-container-width", isSignal: false, isRequired: false, transformFunction: null }, keysLabel: { classPropertyName: "keysLabel", publicName: "p-keys-label", isSignal: false, isRequired: false, transformFunction: null }, footerActionListbox: { classPropertyName: "footerActionListbox", publicName: "p-footer-action-listbox", isSignal: false, isRequired: false, transformFunction: null }, placeholderListbox: { classPropertyName: "placeholderListbox", publicName: "p-placeholder-listbox", isSignal: false, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "p-separator", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { changeSearch: "p-change-search", selectItem: "p-select-item", closeEvent: "p-close", change: "p-change", selectCombo: "p-selectcombo-item", changeAll: "p-change-all", UpdateInfiniteScroll: "p-update-infinite-scroll", activatedTab: "p-activated-tabs", clickTab: "p-click-tabs", changeStateTabs: "p-change-state-tabs", clickItem: "p-click-item", subItemsLoad: "p-sub-items-load", footerActionListboxEvent: "p-footer-action-listbox-event" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-size": "this.size" } }, ngImport: i0 });
5058
5123
  }
5059
5124
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoListBoxBaseComponent, decorators: [{
5060
5125
  type: Directive
@@ -5199,6 +5264,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
5199
5264
  }], clickItem: [{
5200
5265
  type: Output,
5201
5266
  args: ['p-click-item']
5267
+ }], subItemsLoad: [{
5268
+ type: Output,
5269
+ args: ['p-sub-items-load']
5202
5270
  }], footerActionListboxEvent: [{
5203
5271
  type: Output,
5204
5272
  args: ['p-footer-action-listbox-event']
@@ -5207,187 +5275,362 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
5207
5275
  args: ['window:PoUiThemeChange']
5208
5276
  }] } });
5209
5277
 
5210
- const poLoadingOverlayLiteralsDefault = {
5211
- en: {
5212
- loading: 'Loading'
5213
- },
5214
- es: {
5215
- loading: 'Cargando'
5216
- },
5217
- pt: {
5218
- loading: 'Carregando'
5219
- },
5220
- ru: {
5221
- loading: 'Загрузка'
5222
- }
5223
- };
5224
5278
  /**
5279
+ * @usedBy PoButtonComponent, PoWidgetComponent
5225
5280
  *
5226
5281
  * @description
5227
5282
  *
5228
- * Este componente mostra ao usuário uma imagem de _loading_ e bloqueia a página inteira ou o container escolhido,
5229
- * enquanto aguarda a resposta de alguma requisição.
5283
+ * Estilos disponíveis do button.
5284
+ */
5285
+ var PoButtonKind;
5286
+ (function (PoButtonKind) {
5287
+ /** Estilo primário, usado para ações principais que requerem maior destaque. */
5288
+ PoButtonKind["primary"] = "primary";
5289
+ /** Estilo secundário, usado como padrão, para ações comuns. */
5290
+ PoButtonKind["secondary"] = "secondary";
5291
+ /** Estilo terciário, ideal para ações menos importantes, sem fundo preenchido. */
5292
+ PoButtonKind["tertiary"] = "tertiary";
5293
+ })(PoButtonKind || (PoButtonKind = {}));
5294
+
5295
+ /**
5296
+ * @description
5297
+ *
5298
+ * Tamanhos da propriedade `p-size`. A medida `small` está disponível apenas para acessibilidade AA.
5299
+ */
5300
+ var PoButtonSize;
5301
+ (function (PoButtonSize) {
5302
+ /** Define a altura do button como 32px. */
5303
+ PoButtonSize["Small"] = "small";
5304
+ /** Define a altura do button como 44px. */
5305
+ PoButtonSize["Medium"] = "medium";
5306
+ /** Define a altura do button como 56px. */
5307
+ PoButtonSize["Large"] = "large";
5308
+ })(PoButtonSize || (PoButtonSize = {}));
5309
+
5310
+ /**
5311
+ * @usedBy PoButtonComponent
5312
+ *
5313
+ * @description
5314
+ *
5315
+ * Enumeração que define os tipos possíveis para o `PoButtonComponent`. Estes tipos estão relacionados ao comportamento
5316
+ * do botão quando utilizado dentro de um formulário HTML.
5317
+ *
5318
+ * @example
5319
+ * No uso com o `PoButtonComponent`, a propriedade `p-type` pode ser utilizada para configurar o comportamento:
5320
+ *
5321
+ * ```
5322
+ * <po-button p-label="Enviar" p-type="submit"></po-button>
5323
+ * <po-button p-label="Cancelar" p-type="button"></po-button>
5324
+ * <po-button p-label="Redefinir" p-type="reset"></po-button>
5325
+ * ```
5326
+ */
5327
+ var PoButtonType;
5328
+ (function (PoButtonType) {
5329
+ /**
5330
+ * Define o botão como do tipo `submit`. Quando clicado, o formulário é enviado automaticamente,
5331
+ * disparando o evento `submit`.
5332
+ */
5333
+ PoButtonType["Submit"] = "submit";
5334
+ /**
5335
+ * Define o botão como do tipo `button`. Este tipo de botão não possui comportamento padrão associado
5336
+ * e é utilizado principalmente para ações programáticas como cliques e disparos de eventos customizados.
5337
+ */
5338
+ PoButtonType["Button"] = "button";
5339
+ /**
5340
+ * Define o botão como do tipo `reset`. Quando clicado, redefine os campos do formulário ao qual pertence
5341
+ * para seus valores iniciais.
5342
+ */
5343
+ PoButtonType["Reset"] = "reset";
5344
+ })(PoButtonType || (PoButtonType = {}));
5345
+
5346
+ /**
5347
+ * @description
5348
+ *
5349
+ * O `po-button` permite que o usuário execute ações predefinidas pelo desenvolvedor.
5350
+ *
5351
+ * Através dos tipos, é possível identificar a importância de cada ação.
5352
+ *
5353
+ * #### Boas práticas
5354
+ *
5355
+ * - Evite `labels` extensos que quebram o layout do `po-button`, use `labels` diretos, curtos e intuitivos.
5356
+ * - Utilize apenas um `po-button` configurado como `primary` por página.
5357
+ * - Para ações irreversíveis use sempre a propriedade `p-danger`.
5358
+ *
5359
+ * #### Acessibilidade tratada no componente
5360
+ *
5361
+ * Algumas diretrizes de acessibilidade já são tratadas no componente, internamente, e não podem ser alteradas pelo proprietário do conteúdo. São elas:
5362
+ *
5363
+ * - Quando em foco, o botão é ativado usando as teclas de Espaço e Enter do teclado. [W3C WAI-ARIA 3.5 Button - Keyboard Interaction](https://www.w3.org/WAI/ARIA/apg/#keyboard-interaction-3)
5364
+ * - A área do foco precisar ter uma espessura de pelo menos 2 pixels CSS e o foco não pode ficar escondido por outros elementos da tela. [WCAG 2.4.12: Focus Appearance](https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance-enhanced)
5230
5365
  *
5231
5366
  * #### Tokens customizáveis
5232
5367
  *
5233
- * É possível alterar o estilo do componente usando os seguintes tokens (CSS): <br>
5234
- * Obs: Só é possível realizar alterações ao adicionar a classe `.po-loading`
5368
+ * É possível alterar o estilo do componente usando os seguintes tokens (CSS):
5235
5369
  *
5236
5370
  * > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
5237
5371
  *
5238
- * | Propriedade | Descrição | Valor Padrão |
5239
- * |----------------------------------------|-------------------------------------------------------|---------------------------------------------------|
5240
- * | **Default Values** | | |
5241
- * | `--font-family` | Família tipográfica usada | `var(--font-family-theme)` |
5242
- * | `--font-weight` | Peso da fonte | `var(--font-weight-normal)` |
5243
- * | `--text-color` | Cor do texto | `var(--color-neutral-dark-70)` |
5244
- * | `--border-radius` | Contém o valor do raio dos cantos do elemento&nbsp; | `var(--border-radius-md)` |
5245
- * | `--border-width` | Contém o valor da largura dos cantos do elemento&nbsp;| `var(--border-width-sm)` |
5246
- * | `--border-color` | Cor da borda | `var(--color-neutral-light-20)` |
5247
- * | `--background` | Cor de background | `var(--color-neutral-light-00)` |
5248
- * | `--shadow` | Contém o valor da sombra do elemento | `var(--shadow-md)` |
5249
- * | **po-loading-icon** | | |
5250
- * | `--color` | Cor principal do spinner | `var(--color-action-default)` |
5372
+ * | Propriedade | Descrição | Valor Padrão |
5373
+ * |------------------------------------------|-------------------------------------------------------|---------------------------------------------------|
5374
+ * | `--font-family` | Família tipográfica usada | `var(--font-family-theme)` |
5375
+ * | `--font-size` | Tamanho da fonte | `var(--font-size-default)` |
5376
+ * | `--font-weight` | Peso da fonte | `var(--font-weight-bold)` |
5377
+ * | `--line-height` | Tamanho da label | `var(--line-height-none)` |
5378
+ * | `--border-radius` | Contém o valor do raio dos cantos do elemento&nbsp; | `var(--border-radius-md)` |
5379
+ * | `--border-width` | Contém o valor da largura dos cantos do elemento&nbsp;| `var(--border-width-md)` |
5380
+ * | `--padding` | Preenchimento | `0 1em` | | --- |
5381
+ * | **Danger** | | |
5382
+ * | `--text-color-danger` | Cor do texto no estado danger | `var(--color-neutral-light-00)` |
5383
+ * | `--color-button-danger` | Cor do botão no estado danger | `var(--color-feedback-negative-dark)` |
5384
+ * | `--color-danger-hover` | Cor de hover no estado danger | `var(--color-feedback-negative-darker)` |
5385
+ * | `--color-danger-pressed` | Cor pressionada no estado danger | `var(--color-feedback-negative-darkest)` |
5386
+ * | `--background-danger-hover` | Cor de background de hover no estado danger | `var(--color-feedback-negative-lighter)` |
5387
+ * | `--border-color-danger-hover` | Cor da borda de hover no estado danger | `var(--color-feedback-negative-darkest)` |
5388
+ * | `--background-danger-pressed` | Cor de background pressionado no estado danger | `var(--color-feedback-negative-light)` |
5389
+ * | `--background-color-button-danger`&nbsp; | Cor de background do botão no estado danger | `var(--color-transparent)` |
5390
+ * | **Default Values** | | |
5391
+ * | `--text-color` | Cor do texto | `var(--color-neutral-light-00)` |
5392
+ * | `--color` | Cor principal do botão | `var(--color-action-default)` |
5393
+ * | `--background-color` | Cor de background | `var(--color-transparent)` |
5394
+ * | `--border-color` | Cor da borda | `var(--color-transparent)` |
5395
+ * | `--shadow` | Contém o valor da sombra do elemento | `var(--shadow-none)` |
5396
+ * | **Hover** | | |
5397
+ * | `--color-hover` | Cor principal no estado hover | `var(--color-action-hover)` |
5398
+ * | `--background-hover` | Cor de background no estado hover | `var(--color-brand-01-lighter)` |
5399
+ * | `--border-color-hover` | Cor da borda no estado hover | `var(--color-brand-01-darkest)` |
5400
+ * | **Focused** | | |
5401
+ * | `--outline-color-focused` | Cor do outline do estado de focus | `var(--color-action-focus)` |
5402
+ * | **Pressed** | | |
5403
+ * | `--color-pressed` | Cor principal no estado de pressionado | `var(--color-action-pressed)` |
5404
+ * | `--background-pressed` | Cor de background no estado de pressionado&nbsp; | `var(--color-brand-01-light)` |
5405
+ * | **Disabled** | | |
5406
+ * | `--text-color-disabled` | Cor do texto no estado disabled | `var(--color-neutral-dark-70)` |
5407
+ * | `--color-disabled` | Cor principal no estado disabled | `var(--color-action-disabled)` |
5408
+ * | `--background-color-disabled` | Cor de background no estado disabled | `var(--color-transparent)` |
5251
5409
  *
5252
5410
  */
5253
- class PoLoadingOverlayBaseComponent {
5254
- languageService;
5255
- _screenLock = false;
5256
- _text;
5257
- _size;
5411
+ class PoButtonBaseComponent {
5258
5412
  /**
5259
5413
  * @optional
5260
5414
  *
5261
5415
  * @description
5262
5416
  *
5263
- * Define se o *overlay* será aplicado a um *container* ou à página inteira.
5417
+ * Label do botão.
5418
+ */
5419
+ label = input(undefined, { ...(ngDevMode ? { debugName: "label" } : /* istanbul ignore next */ {}), alias: 'p-label' });
5420
+ /**
5421
+ * @optional
5264
5422
  *
5265
- * Para utilizar o componente como um *container*, o elemento pai deverá receber uma posição relativa, por exemplo:
5423
+ * @description
5424
+ * Ícone exibido ao lado esquerdo do label do botão.
5266
5425
  *
5426
+ * É possível usar qualquer um dos ícones da [Biblioteca de ícones](https://po-ui.io/icons), conforme exemplo:
5267
5427
  * ```
5268
- * <div style="position: relative">
5269
- *
5270
- * <po-chart [p-series]="[{ value: 10, category: 'Example' }]">
5271
- * </po-chart>
5428
+ * <po-button p-icon="an an-user" p-label="PO button"></po-button>
5429
+ * ```
5430
+ * Também é possível utilizar outras fontes de ícones, por exemplo a biblioteca *Font Awesome*, desde que a biblioteca
5431
+ * esteja carregada no projeto:
5432
+ * ```
5433
+ * <po-button p-icon="fa fa-podcast" p-label="PO button"></po-button>
5434
+ * ```
5435
+ * Outra opção seria a customização do ícone através do `TemplateRef`, conforme exemplo abaixo:
5436
+ * ```
5437
+ * <po-button [p-icon]="template" p-label="button template ionic"></po-button>
5272
5438
  *
5273
- * <po-loading-overlay>
5274
- * </po-loading-overlay>
5275
- * </div>
5439
+ * <ng-template #template>
5440
+ * <ion-icon style="font-size: inherit" name="heart"></ion-icon>
5441
+ * </ng-template>
5276
5442
  * ```
5443
+ * > Para o ícone enquadrar corretamente, deve-se utilizar `font-size: inherit` caso o ícone utilizado não aplique-o.
5444
+ */
5445
+ icon = input(undefined, { ...(ngDevMode ? { debugName: "icon" } : /* istanbul ignore next */ {}), alias: 'p-icon' });
5446
+ /**
5447
+ * @optional
5448
+ *
5449
+ * @description
5450
+ * Define o tipo do botão.
5451
+ *
5452
+ * @default `PoButtonType.Button`
5453
+ */
5454
+ type = input(PoButtonType.Button, { ...(ngDevMode ? { debugName: "type" } : /* istanbul ignore next */ {}), alias: 'p-type' });
5455
+ // Evento disparado ao sair do campo.
5456
+ blur = new EventEmitter();
5457
+ /** Ação que será executada quando o usuário clicar sobre o `po-button`. */
5458
+ click = new EventEmitter();
5459
+ _danger = false;
5460
+ _disabled = false;
5461
+ _loading = false;
5462
+ _kind = PoButtonKind.secondary;
5463
+ _size = undefined;
5464
+ _initialSize = undefined;
5465
+ hasSize = false;
5466
+ /**
5467
+ * @optional
5468
+ *
5469
+ * @description
5470
+ *
5471
+ * Exibe um ícone de carregamento à esquerda do _label_ do botão.
5472
+ *
5473
+ * > Quando esta propriedade estiver habilitada, desabilitará o botão.
5277
5474
  *
5278
5475
  * @default `false`
5279
5476
  */
5280
- set screenLock(screenLock) {
5281
- this._screenLock = convertToBoolean(screenLock);
5477
+ set loading(value) {
5478
+ this._loading = convertToBoolean(value);
5282
5479
  }
5283
- get screenLock() {
5284
- return this._screenLock;
5480
+ get loading() {
5481
+ return this._loading;
5285
5482
  }
5286
5483
  /**
5287
5484
  * @optional
5288
5485
  *
5289
5486
  * @description
5290
5487
  *
5291
- * Texto a ser exibido no componente.
5292
- *
5293
- * > O valor padrão será traduzido de acordo com o idioma configurado no [**PoI18n**](/documentation/po-i18n) ou navegador.
5488
+ * Deve ser usado em ações irreversíveis que o usuário precisa ter cuidado ao executá-la, como a exclusão de um registro.
5294
5489
  *
5295
- * @default `Carregando`
5490
+ * > A propriedade `p-kind="tertiary"` será inativada ao utilizar esta propriedade.
5296
5491
  */
5297
- set text(value) {
5298
- this._text = value || this.getTextDefault();
5492
+ set danger(value) {
5493
+ this._danger = this.kind !== PoButtonKind.tertiary ? value : false;
5299
5494
  }
5300
- get text() {
5301
- return this._text;
5495
+ get danger() {
5496
+ return this._danger;
5302
5497
  }
5303
5498
  /**
5304
5499
  * @optional
5305
5500
  *
5306
5501
  * @description
5307
5502
  *
5308
- * Define o tamanho do componente com base no tamanho do ícone de *loading*.
5309
- *
5310
- * Tamanhos disponíveis para o *loading*:
5311
- * - `xs`: 1rem
5312
- * - `sm`: 1.5rem
5313
- * - `md`: 3rem
5314
- * - `lg`: 5rem (valor padrão)
5503
+ * Define o estilo visual do componente conforme valores especificados no enum `PoButtonKind`:
5504
+ * - `primary`: destaca o botão, sendo recomendado para ações principais.
5505
+ * - `secondary`: estilo padrão, ideal para ações secundárias.
5506
+ * - `tertiary`: exibe o botão sem preenchimento no fundo, indicado para ações opcionais.
5315
5507
  *
5316
- * @default `lg`
5508
+ * @default `secondary`
5317
5509
  */
5318
- set size(value) {
5319
- this._size = value === '' || !value ? 'lg' : value;
5510
+ set kind(value) {
5511
+ this._kind = PoButtonKind[value] ? PoButtonKind[value] : PoButtonKind.secondary;
5320
5512
  }
5321
- get size() {
5322
- return this._size;
5513
+ get kind() {
5514
+ return this._kind;
5323
5515
  }
5324
- constructor(languageService) {
5325
- this.languageService = languageService;
5326
- this.text = this.getTextDefault();
5516
+ /**
5517
+ * @optional
5518
+ *
5519
+ * @description
5520
+ *
5521
+ * Desabilita o `po-button` e não permite que o usuário interaja com o mesmo.
5522
+ *
5523
+ * @default `false`
5524
+ */
5525
+ set disabled(value) {
5526
+ this._disabled = value === '' ? true : convertToBoolean(value);
5327
5527
  }
5328
- getTextDefault() {
5329
- const language = this.languageService.getShortLanguage();
5330
- return poLoadingOverlayLiteralsDefault[language].loading;
5528
+ get disabled() {
5529
+ return this._disabled;
5331
5530
  }
5332
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingOverlayBaseComponent, deps: [{ token: PoLanguageService }], target: i0.ɵɵFactoryTarget.Directive });
5333
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: PoLoadingOverlayBaseComponent, isStandalone: true, inputs: { screenLock: ["p-screen-lock", "screenLock"], text: ["p-text", "text"], size: ["p-size", "size"] }, ngImport: i0 });
5334
- }
5335
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingOverlayBaseComponent, decorators: [{
5336
- type: Directive
5337
- }], ctorParameters: () => [{ type: PoLanguageService }], propDecorators: { screenLock: [{
5338
- type: Input,
5339
- args: ['p-screen-lock']
5340
- }], text: [{
5341
- type: Input,
5342
- args: ['p-text']
5343
- }], size: [{
5344
- type: Input,
5345
- args: ['p-size']
5346
- }] } });
5347
-
5348
- class PoOverlayBaseComponent {
5349
5531
  /**
5350
5532
  * @optional
5351
5533
  *
5352
5534
  * @description
5353
5535
  *
5354
- * Define se o *overlay* será aplicado a um *container* ou a página inteira.
5536
+ * Define um `aria-label` para o `po-button`.
5355
5537
  *
5356
- * Para utilizar o componente como um *container*, o elemento pai deverá receber uma posição relativa, por exemplo:
5538
+ * Caso esta propriedade não seja informada será considerada a label do botão.
5357
5539
  *
5358
- * ```
5359
- * <div style="position: relative">
5540
+ * > Em caso de botões com apenas ícone a atribuição de valor à esta propriedade é muito importante para acessibilidade.
5541
+ */
5542
+ ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'p-aria-label' });
5543
+ ariaExpanded = null;
5544
+ /**
5545
+ * @optional
5360
5546
  *
5361
- * <po-chart [p-series]="[{ value: 10, category: 'Example' }]">
5362
- * </po-chart>
5547
+ * @description
5363
5548
  *
5364
- * <po-overlay>
5365
- * </po-overlay>
5366
- * </div>
5367
- * ```
5549
+ * Define o `tabindex` do elemento `<button>` nativo interno.
5368
5550
  *
5369
- * @default `false`
5551
+ * Use `[tabindex]="-1"` para remover o botão da ordem de foco do teclado.
5370
5552
  */
5371
- screenLock = false;
5372
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoOverlayBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5373
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.2.25", type: PoOverlayBaseComponent, isStandalone: true, inputs: { screenLock: ["p-screen-lock", "screenLock", convertToBoolean] }, ngImport: i0 });
5553
+ tabindex = null;
5554
+ /**
5555
+ * @optional
5556
+ *
5557
+ * @description
5558
+ *
5559
+ * Define o tamanho do componente:
5560
+ * - `small`: altura de 32px (disponível apenas para acessibilidade AA).
5561
+ * - `medium`: altura de 44px.
5562
+ * - `large`: altura de 56px.
5563
+ *
5564
+ * > Caso a acessibilidade AA não esteja configurada, o tamanho `medium` será mantido.
5565
+ * Para mais detalhes, consulte a documentação do [po-theme](https://po-ui.io/documentation/po-theme).
5566
+ *
5567
+ * @default `medium`
5568
+ */
5569
+ set size(value) {
5570
+ this._initialSize = value;
5571
+ this.applySizeBasedOnA11y();
5572
+ }
5573
+ get size() {
5574
+ return this._size ?? getDefaultSizeFn(PoButtonSize);
5575
+ }
5576
+ onThemeChange() {
5577
+ this.applySizeBasedOnA11y();
5578
+ }
5579
+ applySizeBasedOnA11y() {
5580
+ const size = validateSizeFn(this._initialSize, PoButtonSize);
5581
+ this._size = size;
5582
+ }
5583
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoButtonBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5584
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.25", type: PoButtonBaseComponent, isStandalone: false, selector: "po-button-base", inputs: { label: { classPropertyName: "label", publicName: "p-label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "p-icon", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "p-type", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "p-loading", isSignal: false, isRequired: false, transformFunction: null }, danger: { classPropertyName: "danger", publicName: "p-danger", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, kind: { classPropertyName: "kind", publicName: "p-kind", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "p-disabled", isSignal: false, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "p-aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "p-aria-expanded", isSignal: false, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "p-tabindex", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { blur: "p-blur", click: "p-click" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-danger": "this.danger", "attr.p-kind": "this.kind", "attr.p-size": "this.size" } }, ngImport: i0, template: '', isInline: true });
5374
5585
  }
5375
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoOverlayBaseComponent, decorators: [{
5376
- type: Directive
5377
- }], propDecorators: { screenLock: [{
5586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoButtonBaseComponent, decorators: [{
5587
+ type: Component,
5588
+ args: [{
5589
+ selector: 'po-button-base',
5590
+ template: '',
5591
+ standalone: false
5592
+ }]
5593
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-icon", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-type", required: false }] }], blur: [{
5594
+ type: Output,
5595
+ args: ['p-blur']
5596
+ }], click: [{
5597
+ type: Output,
5598
+ args: ['p-click']
5599
+ }], loading: [{
5378
5600
  type: Input,
5379
- args: [{ alias: 'p-screen-lock', transform: convertToBoolean }]
5601
+ args: ['p-loading']
5602
+ }], danger: [{
5603
+ type: HostBinding,
5604
+ args: ['attr.p-danger']
5605
+ }, {
5606
+ type: Input,
5607
+ args: [{ alias: 'p-danger', transform: convertToBoolean }]
5608
+ }], kind: [{
5609
+ type: HostBinding,
5610
+ args: ['attr.p-kind']
5611
+ }, {
5612
+ type: Input,
5613
+ args: ['p-kind']
5614
+ }], disabled: [{
5615
+ type: Input,
5616
+ args: ['p-disabled']
5617
+ }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-aria-label", required: false }] }], ariaExpanded: [{
5618
+ type: Input,
5619
+ args: ['p-aria-expanded']
5620
+ }], tabindex: [{
5621
+ type: Input,
5622
+ args: ['p-tabindex']
5623
+ }], size: [{
5624
+ type: Input,
5625
+ args: ['p-size']
5626
+ }, {
5627
+ type: HostBinding,
5628
+ args: ['attr.p-size']
5629
+ }], onThemeChange: [{
5630
+ type: HostListener,
5631
+ args: ['window:PoUiThemeChange']
5380
5632
  }] } });
5381
5633
 
5382
- class PoOverlayComponent extends PoOverlayBaseComponent {
5383
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoOverlayComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5384
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: PoOverlayComponent, isStandalone: false, selector: "po-overlay", usesInheritance: true, ngImport: i0, template: "<div class=\"po-overlay\" [class.po-overlay-fixed]=\"screenLock\" role=\"alert\" aria-busy=\"true\">\n <div class=\"po-overlay-content\">\n <ng-content></ng-content>\n </div>\n</div>\n" });
5385
- }
5386
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoOverlayComponent, decorators: [{
5387
- type: Component,
5388
- args: [{ selector: 'po-overlay', standalone: false, template: "<div class=\"po-overlay\" [class.po-overlay-fixed]=\"screenLock\" role=\"alert\" aria-busy=\"true\">\n <div class=\"po-overlay-content\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
5389
- }] });
5390
-
5391
5634
  var PoLoadingIconSize;
5392
5635
  (function (PoLoadingIconSize) {
5393
5636
  /** Extra small */
@@ -5400,79 +5643,95 @@ var PoLoadingIconSize;
5400
5643
  PoLoadingIconSize["lg"] = "lg";
5401
5644
  })(PoLoadingIconSize || (PoLoadingIconSize = {}));
5402
5645
 
5403
- const poLoadingLiteralsDefault = {
5404
- en: {
5405
- loading: 'Loading'
5406
- },
5407
- es: {
5408
- loading: 'Cargando'
5409
- },
5410
- pt: {
5411
- loading: 'Carregando'
5412
- },
5413
- ru: {
5414
- loading: 'Загрузка'
5415
- }
5416
- };
5646
+ const LOADING_ICON_COMPONENT = new InjectionToken('LOADING_ICON_COMPONENT');
5647
+
5417
5648
  /**
5418
5649
  * @docsPrivate
5419
5650
  *
5420
5651
  * @description
5421
5652
  *
5422
- * Este componente tem o objetivo de mostrar visualmente aos usuários que a aplicação está processando
5423
- * ou aguardando a resposta de alguma requisição.
5653
+ * Componente que exibe um ícone de carregamento de conteúdo. A cor padrão para ele é a primária conforme o tema utilizado.
5654
+ * É possível alterá-la para um tom cinza conforme a necessidade.
5424
5655
  */
5425
- class PoLoadingBaseComponent {
5426
- languageService;
5427
- _text;
5428
- _size;
5656
+ class PoLoadingIconComponent {
5657
+ loadingIconComponent;
5658
+ _neutralColor;
5659
+ _size = 'md';
5660
+ createdRef;
5661
+ id = uuid();
5662
+ loadingContainer;
5429
5663
  /**
5430
- * Texto a ser exibido no componente.
5664
+ * @optional
5665
+ *
5666
+ * @description
5667
+ *
5668
+ * Definição para cor neutra (cinza) para o ícone de carregamento.
5669
+ *
5670
+ * @default `false`
5431
5671
  */
5432
- set text(value) {
5433
- this._text = value || (value === '' ? '' : this.getTextDefault());
5672
+ set neutralColor(value) {
5673
+ this._neutralColor = convertToBoolean(value);
5434
5674
  }
5435
- get text() {
5436
- return this._text;
5675
+ get neutralColor() {
5676
+ return this._neutralColor;
5437
5677
  }
5438
5678
  /**
5439
- * Define o tamanho do ícone.
5679
+ * @optional
5680
+ *
5681
+ * @description
5682
+ *
5683
+ * Definição do tamanho do ícone.
5684
+ *
5440
5685
  * Valores válidos:
5441
- * - `xs`: 16px
5442
- * - `sm`: 24px
5443
- * - `md`: 32px
5444
- * - `lg`: 80px
5686
+ * - `xs`: tamanho `extra small`
5687
+ * - `sm`: tamanho `small`
5688
+ * - `md`: tamanho `medium`
5689
+ * - `lg`: tamanho `large`
5445
5690
  *
5446
- * @default `lg`
5691
+ * @default `md`
5447
5692
  */
5448
5693
  set size(value) {
5449
- if (value && PoLoadingIconSize[value]) {
5450
- this._size = PoLoadingIconSize[value];
5451
- }
5452
- else {
5453
- this._size = PoLoadingIconSize.lg;
5694
+ this._size = PoLoadingIconSize[value] ? PoLoadingIconSize[value] : PoLoadingIconSize.md;
5695
+ if (this.createdRef) {
5696
+ this.createdRef.instance.size = this.size;
5454
5697
  }
5455
5698
  }
5456
5699
  get size() {
5457
5700
  return this._size;
5458
5701
  }
5459
5702
  inOverlay = false;
5460
- constructor(languageService) {
5461
- this.languageService = languageService;
5462
- this.text = this.getTextDefault();
5703
+ constructor(loadingIconComponent) {
5704
+ this.loadingIconComponent = loadingIconComponent;
5463
5705
  }
5464
- getTextDefault() {
5465
- const language = this.languageService.getShortLanguage();
5466
- return poLoadingLiteralsDefault[language].loading;
5706
+ ngOnDestroy() {
5707
+ if (this.createdRef) {
5708
+ this.createdRef.destroy();
5709
+ }
5467
5710
  }
5468
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingBaseComponent, deps: [{ token: PoLanguageService }], target: i0.ɵɵFactoryTarget.Directive });
5469
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: PoLoadingBaseComponent, isStandalone: true, inputs: { text: ["p-text", "text"], size: ["p-size", "size"], inOverlay: ["p-in-overlay", "inOverlay"] }, ngImport: i0 });
5711
+ ngAfterViewInit() {
5712
+ if (this.loadingIconComponent && this.loadingContainer && this.inOverlay) {
5713
+ this.loadingContainer.clear();
5714
+ this.createdRef = this.loadingContainer.createComponent(this.loadingIconComponent);
5715
+ this.createdRef.instance.size = this.size;
5716
+ }
5717
+ }
5718
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingIconComponent, deps: [{ token: LOADING_ICON_COMPONENT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
5719
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PoLoadingIconComponent, isStandalone: false, selector: "po-loading-icon", inputs: { neutralColor: ["p-neutral-color", "neutralColor"], size: ["p-size", "size"], inOverlay: ["p-in-overlay", "inOverlay"] }, viewQueries: [{ propertyName: "loadingContainer", first: true, predicate: ["loadingContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "@if (inOverlay && loadingIconComponent) {\n <ng-template #loadingContainer></ng-template>\n} @else {\n <div class=\"po-loading-icon-container po-loading-svg-{{ size }}\">\n <svg\n [ngClass]=\"neutralColor ? 'po-loading-icon-neutral' : 'po-loading-icon'\"\n class=\"po-loading-icon-animated\"\n viewBox=\"0 0 200 200\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <linearGradient [id]=\"'first' + id\">\n <stop offset=\"0\" stop-opacity=\"0\" stop-color=\"currentColor\" />\n <stop offset=\"1\" stop-opacity=\"0.5\" stop-color=\"currentColor\" />\n </linearGradient>\n <linearGradient [id]=\"'second' + id\">\n <stop offset=\"0\" stop-opacity=\"1\" stop-color=\"currentColor\" />\n <stop offset=\"1\" stop-opacity=\"0.5\" stop-color=\"currentColor\" />\n </linearGradient>\n </defs>\n <g stroke-width=\"24\" transform=\"matrix(0.876218, 0, 0, 0.87855, 12.377892, 12.144993)\">\n <path [attr.stroke]=\"'url(#' + 'first' + id + ')'\" d=\"M 4 100 A 96 96 0 0 1 196 100\" />\n <path [attr.stroke]=\"'url(#' + 'second' + id + ')'\" d=\"M 196 100 A 96 96 0 0 1 4 100\" />\n <path stroke=\"currentColor\" d=\"M 4 100 A 96 96 0 0 1 4 98\" />\n </g>\n </svg>\n </div>\n}\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
5470
5720
  }
5471
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingBaseComponent, decorators: [{
5472
- type: Directive
5473
- }], ctorParameters: () => [{ type: PoLanguageService }], propDecorators: { text: [{
5721
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingIconComponent, decorators: [{
5722
+ type: Component,
5723
+ args: [{ selector: 'po-loading-icon', standalone: false, template: "@if (inOverlay && loadingIconComponent) {\n <ng-template #loadingContainer></ng-template>\n} @else {\n <div class=\"po-loading-icon-container po-loading-svg-{{ size }}\">\n <svg\n [ngClass]=\"neutralColor ? 'po-loading-icon-neutral' : 'po-loading-icon'\"\n class=\"po-loading-icon-animated\"\n viewBox=\"0 0 200 200\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <linearGradient [id]=\"'first' + id\">\n <stop offset=\"0\" stop-opacity=\"0\" stop-color=\"currentColor\" />\n <stop offset=\"1\" stop-opacity=\"0.5\" stop-color=\"currentColor\" />\n </linearGradient>\n <linearGradient [id]=\"'second' + id\">\n <stop offset=\"0\" stop-opacity=\"1\" stop-color=\"currentColor\" />\n <stop offset=\"1\" stop-opacity=\"0.5\" stop-color=\"currentColor\" />\n </linearGradient>\n </defs>\n <g stroke-width=\"24\" transform=\"matrix(0.876218, 0, 0, 0.87855, 12.377892, 12.144993)\">\n <path [attr.stroke]=\"'url(#' + 'first' + id + ')'\" d=\"M 4 100 A 96 96 0 0 1 196 100\" />\n <path [attr.stroke]=\"'url(#' + 'second' + id + ')'\" d=\"M 196 100 A 96 96 0 0 1 4 100\" />\n <path stroke=\"currentColor\" d=\"M 4 100 A 96 96 0 0 1 4 98\" />\n </g>\n </svg>\n </div>\n}\n" }]
5724
+ }], ctorParameters: () => [{ type: i0.Type, decorators: [{
5725
+ type: Optional
5726
+ }, {
5727
+ type: Inject,
5728
+ args: [LOADING_ICON_COMPONENT]
5729
+ }] }], propDecorators: { loadingContainer: [{
5730
+ type: ViewChild,
5731
+ args: ['loadingContainer', { read: ViewContainerRef, static: false }]
5732
+ }], neutralColor: [{
5474
5733
  type: Input,
5475
- args: ['p-text']
5734
+ args: ['p-neutral-color']
5476
5735
  }], size: [{
5477
5736
  type: Input,
5478
5737
  args: ['p-size']
@@ -5481,95 +5740,334 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
5481
5740
  args: ['p-in-overlay']
5482
5741
  }] } });
5483
5742
 
5484
- const LOADING_ICON_COMPONENT = new InjectionToken('LOADING_ICON_COMPONENT');
5743
+ /**
5744
+ * @docsExtends PoButtonBaseComponent
5745
+ *
5746
+ * @example
5747
+ *
5748
+ * <example name="po-button-basic" title="PO Button Basic">
5749
+ * <file name="sample-po-button-basic/sample-po-button-basic.component.html"> </file>
5750
+ * <file name="sample-po-button-basic/sample-po-button-basic.component.ts"> </file>
5751
+ * </example>
5752
+ *
5753
+ * <example name="po-button-labs" title="PO Button Labs">
5754
+ * <file name="sample-po-button-labs/sample-po-button-labs.component.html"> </file>
5755
+ * <file name="sample-po-button-labs/sample-po-button-labs.component.ts"> </file>
5756
+ * </example>
5757
+ *
5758
+ * <example name="po-button-social-network" title="PO Button Social Network">
5759
+ * <file name="sample-po-button-social-network/sample-po-button-social-network.component.html"> </file>
5760
+ * <file name="sample-po-button-social-network/sample-po-button-social-network.component.ts"> </file>
5761
+ * </example>
5762
+ */
5763
+ class PoButtonComponent extends PoButtonBaseComponent {
5764
+ elementRef;
5765
+ buttonElement;
5766
+ constructor(elementRef) {
5767
+ super();
5768
+ this.elementRef = elementRef;
5769
+ }
5770
+ onBlur() {
5771
+ this.blur.emit();
5772
+ }
5773
+ /**
5774
+ * Função que atribui foco ao componente.
5775
+ *
5776
+ * Para utilizá-la é necessário ter a instância do componente no DOM, podendo ser utilizado o ViewChild da seguinte forma:
5777
+ *
5778
+ * ```
5779
+ * import { PoButtonComponent } from '@po-ui/ng-components';
5780
+ *
5781
+ * ...
5782
+ *
5783
+ * @ViewChild(PoButtonComponent, { static: true }) button: PoButtonComponent;
5784
+ *
5785
+ * focusButton() {
5786
+ * this.button.focus();
5787
+ * }
5788
+ * ```
5789
+ */
5790
+ focus() {
5791
+ if (!this.disabled) {
5792
+ this.buttonElement.nativeElement.focus();
5793
+ }
5794
+ }
5795
+ mapSizeToIcon(size) {
5796
+ const sizeMap = {
5797
+ small: 'xs',
5798
+ medium: 'sm',
5799
+ large: 'sm'
5800
+ };
5801
+ return sizeMap[size] || 'sm';
5802
+ }
5803
+ onClick() {
5804
+ this.click.emit(null);
5805
+ }
5806
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoButtonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
5807
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PoButtonComponent, isStandalone: false, selector: "po-button", viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<button\n #button\n class=\"po-button\"\n [type]=\"type()\"\n [attr.p-kind]=\"kind\"\n [attr.p-danger]=\"danger\"\n [disabled]=\"disabled || loading\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.tabindex]=\"tabindex\"\n (blur)=\"onBlur()\"\n (click)=\"onClick()\"\n>\n @if (loading) {\n <div class=\"po-button-loading-icon\">\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n }\n\n <div class=\"po-button-container\">\n @if (icon()) {\n <po-icon class=\"po-button-icon\" [p-icon]=\"icon()\"></po-icon>\n }\n @if (label()) {\n <span class=\"po-button-label\">{{ label() }}</span>\n }\n </div>\n</button>\n", dependencies: [{ kind: "component", type: PoLoadingIconComponent, selector: "po-loading-icon", inputs: ["p-neutral-color", "p-size", "p-in-overlay"] }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5808
+ }
5809
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoButtonComponent, decorators: [{
5810
+ type: Component,
5811
+ args: [{ selector: 'po-button', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<button\n #button\n class=\"po-button\"\n [type]=\"type()\"\n [attr.p-kind]=\"kind\"\n [attr.p-danger]=\"danger\"\n [disabled]=\"disabled || loading\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.tabindex]=\"tabindex\"\n (blur)=\"onBlur()\"\n (click)=\"onClick()\"\n>\n @if (loading) {\n <div class=\"po-button-loading-icon\">\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n }\n\n <div class=\"po-button-container\">\n @if (icon()) {\n <po-icon class=\"po-button-icon\" [p-icon]=\"icon()\"></po-icon>\n }\n @if (label()) {\n <span class=\"po-button-label\">{{ label() }}</span>\n }\n </div>\n</button>\n" }]
5812
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { buttonElement: [{
5813
+ type: ViewChild,
5814
+ args: ['button', { static: true }]
5815
+ }] } });
5485
5816
 
5817
+ const poLoadingOverlayLiteralsDefault = {
5818
+ en: {
5819
+ loading: 'Loading'
5820
+ },
5821
+ es: {
5822
+ loading: 'Cargando'
5823
+ },
5824
+ pt: {
5825
+ loading: 'Carregando'
5826
+ },
5827
+ ru: {
5828
+ loading: 'Загрузка'
5829
+ }
5830
+ };
5486
5831
  /**
5487
- * @docsPrivate
5488
5832
  *
5489
5833
  * @description
5490
5834
  *
5491
- * Componente que exibe um ícone de carregamento de conteúdo. A cor padrão para ele é a primária conforme o tema utilizado.
5492
- * É possível alterá-la para um tom cinza conforme a necessidade.
5835
+ * Este componente mostra ao usuário uma imagem de _loading_ e bloqueia a página inteira ou o container escolhido,
5836
+ * enquanto aguarda a resposta de alguma requisição.
5837
+ *
5838
+ * #### Tokens customizáveis
5839
+ *
5840
+ * É possível alterar o estilo do componente usando os seguintes tokens (CSS): <br>
5841
+ * Obs: Só é possível realizar alterações ao adicionar a classe `.po-loading`
5842
+ *
5843
+ * > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
5844
+ *
5845
+ * | Propriedade | Descrição | Valor Padrão |
5846
+ * |----------------------------------------|-------------------------------------------------------|---------------------------------------------------|
5847
+ * | **Default Values** | | |
5848
+ * | `--font-family` | Família tipográfica usada | `var(--font-family-theme)` |
5849
+ * | `--font-weight` | Peso da fonte | `var(--font-weight-normal)` |
5850
+ * | `--text-color` | Cor do texto | `var(--color-neutral-dark-70)` |
5851
+ * | `--border-radius` | Contém o valor do raio dos cantos do elemento&nbsp; | `var(--border-radius-md)` |
5852
+ * | `--border-width` | Contém o valor da largura dos cantos do elemento&nbsp;| `var(--border-width-sm)` |
5853
+ * | `--border-color` | Cor da borda | `var(--color-neutral-light-20)` |
5854
+ * | `--background` | Cor de background | `var(--color-neutral-light-00)` |
5855
+ * | `--shadow` | Contém o valor da sombra do elemento | `var(--shadow-md)` |
5856
+ * | **po-loading-icon** | | |
5857
+ * | `--color` | Cor principal do spinner | `var(--color-action-default)` |
5858
+ *
5493
5859
  */
5494
- class PoLoadingIconComponent {
5495
- loadingIconComponent;
5496
- _neutralColor;
5497
- _size = 'md';
5498
- createdRef;
5499
- id = uuid();
5500
- loadingContainer;
5860
+ class PoLoadingOverlayBaseComponent {
5861
+ languageService;
5862
+ _screenLock = false;
5863
+ _text;
5864
+ _size;
5501
5865
  /**
5502
5866
  * @optional
5503
5867
  *
5504
5868
  * @description
5505
5869
  *
5506
- * Definição para cor neutra (cinza) para o ícone de carregamento.
5870
+ * Define se o *overlay* será aplicado a um *container* ou à página inteira.
5871
+ *
5872
+ * Para utilizar o componente como um *container*, o elemento pai deverá receber uma posição relativa, por exemplo:
5873
+ *
5874
+ * ```
5875
+ * <div style="position: relative">
5876
+ *
5877
+ * <po-chart [p-series]="[{ value: 10, category: 'Example' }]">
5878
+ * </po-chart>
5879
+ *
5880
+ * <po-loading-overlay>
5881
+ * </po-loading-overlay>
5882
+ * </div>
5883
+ * ```
5507
5884
  *
5508
5885
  * @default `false`
5509
5886
  */
5510
- set neutralColor(value) {
5511
- this._neutralColor = convertToBoolean(value);
5887
+ set screenLock(screenLock) {
5888
+ this._screenLock = convertToBoolean(screenLock);
5512
5889
  }
5513
- get neutralColor() {
5514
- return this._neutralColor;
5890
+ get screenLock() {
5891
+ return this._screenLock;
5515
5892
  }
5516
5893
  /**
5517
5894
  * @optional
5518
5895
  *
5519
5896
  * @description
5520
5897
  *
5521
- * Definição do tamanho do ícone.
5898
+ * Texto a ser exibido no componente.
5522
5899
  *
5900
+ * > O valor padrão será traduzido de acordo com o idioma configurado no [**PoI18n**](/documentation/po-i18n) ou navegador.
5901
+ *
5902
+ * @default `Carregando`
5903
+ */
5904
+ set text(value) {
5905
+ this._text = value || this.getTextDefault();
5906
+ }
5907
+ get text() {
5908
+ return this._text;
5909
+ }
5910
+ /**
5911
+ * @optional
5912
+ *
5913
+ * @description
5914
+ *
5915
+ * Define o tamanho do componente com base no tamanho do ícone de *loading*.
5916
+ *
5917
+ * Tamanhos disponíveis para o *loading*:
5918
+ * - `xs`: 1rem
5919
+ * - `sm`: 1.5rem
5920
+ * - `md`: 3rem
5921
+ * - `lg`: 5rem (valor padrão)
5922
+ *
5923
+ * @default `lg`
5924
+ */
5925
+ set size(value) {
5926
+ this._size = value === '' || !value ? 'lg' : value;
5927
+ }
5928
+ get size() {
5929
+ return this._size;
5930
+ }
5931
+ constructor(languageService) {
5932
+ this.languageService = languageService;
5933
+ this.text = this.getTextDefault();
5934
+ }
5935
+ getTextDefault() {
5936
+ const language = this.languageService.getShortLanguage();
5937
+ return poLoadingOverlayLiteralsDefault[language].loading;
5938
+ }
5939
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingOverlayBaseComponent, deps: [{ token: PoLanguageService }], target: i0.ɵɵFactoryTarget.Directive });
5940
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: PoLoadingOverlayBaseComponent, isStandalone: true, inputs: { screenLock: ["p-screen-lock", "screenLock"], text: ["p-text", "text"], size: ["p-size", "size"] }, ngImport: i0 });
5941
+ }
5942
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingOverlayBaseComponent, decorators: [{
5943
+ type: Directive
5944
+ }], ctorParameters: () => [{ type: PoLanguageService }], propDecorators: { screenLock: [{
5945
+ type: Input,
5946
+ args: ['p-screen-lock']
5947
+ }], text: [{
5948
+ type: Input,
5949
+ args: ['p-text']
5950
+ }], size: [{
5951
+ type: Input,
5952
+ args: ['p-size']
5953
+ }] } });
5954
+
5955
+ class PoOverlayBaseComponent {
5956
+ /**
5957
+ * @optional
5958
+ *
5959
+ * @description
5960
+ *
5961
+ * Define se o *overlay* será aplicado a um *container* ou a página inteira.
5962
+ *
5963
+ * Para utilizar o componente como um *container*, o elemento pai deverá receber uma posição relativa, por exemplo:
5964
+ *
5965
+ * ```
5966
+ * <div style="position: relative">
5967
+ *
5968
+ * <po-chart [p-series]="[{ value: 10, category: 'Example' }]">
5969
+ * </po-chart>
5970
+ *
5971
+ * <po-overlay>
5972
+ * </po-overlay>
5973
+ * </div>
5974
+ * ```
5975
+ *
5976
+ * @default `false`
5977
+ */
5978
+ screenLock = false;
5979
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoOverlayBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5980
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.2.25", type: PoOverlayBaseComponent, isStandalone: true, inputs: { screenLock: ["p-screen-lock", "screenLock", convertToBoolean] }, ngImport: i0 });
5981
+ }
5982
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoOverlayBaseComponent, decorators: [{
5983
+ type: Directive
5984
+ }], propDecorators: { screenLock: [{
5985
+ type: Input,
5986
+ args: [{ alias: 'p-screen-lock', transform: convertToBoolean }]
5987
+ }] } });
5988
+
5989
+ class PoOverlayComponent extends PoOverlayBaseComponent {
5990
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoOverlayComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
5991
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: PoOverlayComponent, isStandalone: false, selector: "po-overlay", usesInheritance: true, ngImport: i0, template: "<div class=\"po-overlay\" [class.po-overlay-fixed]=\"screenLock\" role=\"alert\" aria-busy=\"true\">\n <div class=\"po-overlay-content\">\n <ng-content></ng-content>\n </div>\n</div>\n" });
5992
+ }
5993
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoOverlayComponent, decorators: [{
5994
+ type: Component,
5995
+ args: [{ selector: 'po-overlay', standalone: false, template: "<div class=\"po-overlay\" [class.po-overlay-fixed]=\"screenLock\" role=\"alert\" aria-busy=\"true\">\n <div class=\"po-overlay-content\">\n <ng-content></ng-content>\n </div>\n</div>\n" }]
5996
+ }] });
5997
+
5998
+ const poLoadingLiteralsDefault = {
5999
+ en: {
6000
+ loading: 'Loading'
6001
+ },
6002
+ es: {
6003
+ loading: 'Cargando'
6004
+ },
6005
+ pt: {
6006
+ loading: 'Carregando'
6007
+ },
6008
+ ru: {
6009
+ loading: 'Загрузка'
6010
+ }
6011
+ };
6012
+ /**
6013
+ * @docsPrivate
6014
+ *
6015
+ * @description
6016
+ *
6017
+ * Este componente tem o objetivo de mostrar visualmente aos usuários que a aplicação está processando
6018
+ * ou aguardando a resposta de alguma requisição.
6019
+ */
6020
+ class PoLoadingBaseComponent {
6021
+ languageService;
6022
+ _text;
6023
+ _size;
6024
+ /**
6025
+ * Texto a ser exibido no componente.
6026
+ */
6027
+ set text(value) {
6028
+ this._text = value || (value === '' ? '' : this.getTextDefault());
6029
+ }
6030
+ get text() {
6031
+ return this._text;
6032
+ }
6033
+ /**
6034
+ * Define o tamanho do ícone.
5523
6035
  * Valores válidos:
5524
- * - `xs`: tamanho `extra small`
5525
- * - `sm`: tamanho `small`
5526
- * - `md`: tamanho `medium`
5527
- * - `lg`: tamanho `large`
6036
+ * - `xs`: 16px
6037
+ * - `sm`: 24px
6038
+ * - `md`: 32px
6039
+ * - `lg`: 80px
5528
6040
  *
5529
- * @default `md`
6041
+ * @default `lg`
5530
6042
  */
5531
6043
  set size(value) {
5532
- this._size = PoLoadingIconSize[value] ? PoLoadingIconSize[value] : PoLoadingIconSize.md;
5533
- if (this.createdRef) {
5534
- this.createdRef.instance.size = this.size;
6044
+ if (value && PoLoadingIconSize[value]) {
6045
+ this._size = PoLoadingIconSize[value];
6046
+ }
6047
+ else {
6048
+ this._size = PoLoadingIconSize.lg;
5535
6049
  }
5536
6050
  }
5537
6051
  get size() {
5538
6052
  return this._size;
5539
6053
  }
5540
6054
  inOverlay = false;
5541
- constructor(loadingIconComponent) {
5542
- this.loadingIconComponent = loadingIconComponent;
5543
- }
5544
- ngOnDestroy() {
5545
- if (this.createdRef) {
5546
- this.createdRef.destroy();
5547
- }
6055
+ constructor(languageService) {
6056
+ this.languageService = languageService;
6057
+ this.text = this.getTextDefault();
5548
6058
  }
5549
- ngAfterViewInit() {
5550
- if (this.loadingIconComponent && this.loadingContainer && this.inOverlay) {
5551
- this.loadingContainer.clear();
5552
- this.createdRef = this.loadingContainer.createComponent(this.loadingIconComponent);
5553
- this.createdRef.instance.size = this.size;
5554
- }
6059
+ getTextDefault() {
6060
+ const language = this.languageService.getShortLanguage();
6061
+ return poLoadingLiteralsDefault[language].loading;
5555
6062
  }
5556
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingIconComponent, deps: [{ token: LOADING_ICON_COMPONENT, optional: true }], target: i0.ɵɵFactoryTarget.Component });
5557
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PoLoadingIconComponent, isStandalone: false, selector: "po-loading-icon", inputs: { neutralColor: ["p-neutral-color", "neutralColor"], size: ["p-size", "size"], inOverlay: ["p-in-overlay", "inOverlay"] }, viewQueries: [{ propertyName: "loadingContainer", first: true, predicate: ["loadingContainer"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "@if (inOverlay && loadingIconComponent) {\n <ng-template #loadingContainer></ng-template>\n} @else {\n <div class=\"po-loading-icon-container po-loading-svg-{{ size }}\">\n <svg\n [ngClass]=\"neutralColor ? 'po-loading-icon-neutral' : 'po-loading-icon'\"\n class=\"po-loading-icon-animated\"\n viewBox=\"0 0 200 200\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <linearGradient [id]=\"'first' + id\">\n <stop offset=\"0\" stop-opacity=\"0\" stop-color=\"currentColor\" />\n <stop offset=\"1\" stop-opacity=\"0.5\" stop-color=\"currentColor\" />\n </linearGradient>\n <linearGradient [id]=\"'second' + id\">\n <stop offset=\"0\" stop-opacity=\"1\" stop-color=\"currentColor\" />\n <stop offset=\"1\" stop-opacity=\"0.5\" stop-color=\"currentColor\" />\n </linearGradient>\n </defs>\n <g stroke-width=\"24\" transform=\"matrix(0.876218, 0, 0, 0.87855, 12.377892, 12.144993)\">\n <path [attr.stroke]=\"'url(#' + 'first' + id + ')'\" d=\"M 4 100 A 96 96 0 0 1 196 100\" />\n <path [attr.stroke]=\"'url(#' + 'second' + id + ')'\" d=\"M 196 100 A 96 96 0 0 1 4 100\" />\n <path stroke=\"currentColor\" d=\"M 4 100 A 96 96 0 0 1 4 98\" />\n </g>\n </svg>\n </div>\n}\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
6063
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingBaseComponent, deps: [{ token: PoLanguageService }], target: i0.ɵɵFactoryTarget.Directive });
6064
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: PoLoadingBaseComponent, isStandalone: true, inputs: { text: ["p-text", "text"], size: ["p-size", "size"], inOverlay: ["p-in-overlay", "inOverlay"] }, ngImport: i0 });
5558
6065
  }
5559
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingIconComponent, decorators: [{
5560
- type: Component,
5561
- args: [{ selector: 'po-loading-icon', standalone: false, template: "@if (inOverlay && loadingIconComponent) {\n <ng-template #loadingContainer></ng-template>\n} @else {\n <div class=\"po-loading-icon-container po-loading-svg-{{ size }}\">\n <svg\n [ngClass]=\"neutralColor ? 'po-loading-icon-neutral' : 'po-loading-icon'\"\n class=\"po-loading-icon-animated\"\n viewBox=\"0 0 200 200\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <defs>\n <linearGradient [id]=\"'first' + id\">\n <stop offset=\"0\" stop-opacity=\"0\" stop-color=\"currentColor\" />\n <stop offset=\"1\" stop-opacity=\"0.5\" stop-color=\"currentColor\" />\n </linearGradient>\n <linearGradient [id]=\"'second' + id\">\n <stop offset=\"0\" stop-opacity=\"1\" stop-color=\"currentColor\" />\n <stop offset=\"1\" stop-opacity=\"0.5\" stop-color=\"currentColor\" />\n </linearGradient>\n </defs>\n <g stroke-width=\"24\" transform=\"matrix(0.876218, 0, 0, 0.87855, 12.377892, 12.144993)\">\n <path [attr.stroke]=\"'url(#' + 'first' + id + ')'\" d=\"M 4 100 A 96 96 0 0 1 196 100\" />\n <path [attr.stroke]=\"'url(#' + 'second' + id + ')'\" d=\"M 196 100 A 96 96 0 0 1 4 100\" />\n <path stroke=\"currentColor\" d=\"M 4 100 A 96 96 0 0 1 4 98\" />\n </g>\n </svg>\n </div>\n}\n" }]
5562
- }], ctorParameters: () => [{ type: i0.Type, decorators: [{
5563
- type: Optional
5564
- }, {
5565
- type: Inject,
5566
- args: [LOADING_ICON_COMPONENT]
5567
- }] }], propDecorators: { loadingContainer: [{
5568
- type: ViewChild,
5569
- args: ['loadingContainer', { read: ViewContainerRef, static: false }]
5570
- }], neutralColor: [{
6066
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingBaseComponent, decorators: [{
6067
+ type: Directive
6068
+ }], ctorParameters: () => [{ type: PoLanguageService }], propDecorators: { text: [{
5571
6069
  type: Input,
5572
- args: ['p-neutral-color']
6070
+ args: ['p-text']
5573
6071
  }], size: [{
5574
6072
  type: Input,
5575
6073
  args: ['p-size']
@@ -5610,24 +6108,391 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
5610
6108
  * <file name="sample-po-loading-overlay-labs/sample-po-loading-overlay-labs.component.css"> </file>
5611
6109
  * </example>
5612
6110
  *
5613
- * <example name="po-loading-overlay-connection-test" title="PO Loading Overlay - Connection Test">
5614
- * <file name="sample-po-loading-overlay-connection-test/sample-po-loading-overlay-connection-test.component.html"> </file>
5615
- * <file name="sample-po-loading-overlay-connection-test/sample-po-loading-overlay-connection-test.component.ts"> </file>
6111
+ * <example name="po-loading-overlay-connection-test" title="PO Loading Overlay - Connection Test">
6112
+ * <file name="sample-po-loading-overlay-connection-test/sample-po-loading-overlay-connection-test.component.html"> </file>
6113
+ * <file name="sample-po-loading-overlay-connection-test/sample-po-loading-overlay-connection-test.component.ts"> </file>
6114
+ * </example>
6115
+ */
6116
+ class PoLoadingOverlayComponent extends PoLoadingOverlayBaseComponent {
6117
+ changeDetector = inject(ChangeDetectorRef);
6118
+ constructor() {
6119
+ const languageService = inject(PoLanguageService);
6120
+ super(languageService);
6121
+ }
6122
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6123
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: PoLoadingOverlayComponent, isStandalone: false, selector: "po-loading-overlay", usesInheritance: true, ngImport: i0, template: "<po-overlay [p-screen-lock]=\"screenLock\">\n <po-loading [p-text]=\"text\" [p-size]=\"size\" [p-in-overlay]=\"true\"></po-loading>\n</po-overlay>\n", dependencies: [{ kind: "component", type: PoOverlayComponent, selector: "po-overlay" }, { kind: "component", type: PoLoadingComponent, selector: "po-loading" }] });
6124
+ }
6125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingOverlayComponent, decorators: [{
6126
+ type: Component,
6127
+ args: [{ selector: 'po-loading-overlay', standalone: false, template: "<po-overlay [p-screen-lock]=\"screenLock\">\n <po-loading [p-text]=\"text\" [p-size]=\"size\" [p-in-overlay]=\"true\"></po-loading>\n</po-overlay>\n" }]
6128
+ }], ctorParameters: () => [] });
6129
+
6130
+ /**
6131
+ * @usedBy PoSkeletonComponent
6132
+ *
6133
+ * @description
6134
+ *
6135
+ * Define os tipos de animação do componente `po-skeleton`.
6136
+ */
6137
+ var PoSkeletonAnimation;
6138
+ (function (PoSkeletonAnimation) {
6139
+ /** Sem animação */
6140
+ PoSkeletonAnimation["none"] = "none";
6141
+ /** Animação de pulsação */
6142
+ PoSkeletonAnimation["pulse"] = "pulse";
6143
+ /** Animação de brilho deslizante */
6144
+ PoSkeletonAnimation["shimmer"] = "shimmer";
6145
+ })(PoSkeletonAnimation || (PoSkeletonAnimation = {}));
6146
+
6147
+ /**
6148
+ * @usedBy PoSkeletonComponent
6149
+ *
6150
+ * @description
6151
+ *
6152
+ * Define os tamanhos disponíveis para o componente `po-skeleton`.
6153
+ */
6154
+ var PoSkeletonSize;
6155
+ (function (PoSkeletonSize) {
6156
+ /** Tamanho extra pequeno */
6157
+ PoSkeletonSize["xs"] = "xs";
6158
+ /** Tamanho pequeno */
6159
+ PoSkeletonSize["sm"] = "sm";
6160
+ /** Tamanho médio */
6161
+ PoSkeletonSize["md"] = "md";
6162
+ /** Tamanho grande */
6163
+ PoSkeletonSize["lg"] = "lg";
6164
+ /** Tamanho extra grande */
6165
+ PoSkeletonSize["xl"] = "xl";
6166
+ /** Tamanho extra extra grande */
6167
+ PoSkeletonSize["xxl"] = "2xl";
6168
+ })(PoSkeletonSize || (PoSkeletonSize = {}));
6169
+
6170
+ /**
6171
+ * @usedBy PoSkeletonComponent
6172
+ *
6173
+ * @description
6174
+ *
6175
+ * Define os tipos visuais disponíveis para o componente `po-skeleton`.
6176
+ */
6177
+ var PoSkeletonType;
6178
+ (function (PoSkeletonType) {
6179
+ /** Tipo padrão com cor neutra clara */
6180
+ PoSkeletonType["normal"] = "normal";
6181
+ /** Tipo primário com cor neutra média */
6182
+ PoSkeletonType["primary"] = "primary";
6183
+ /** Tipo de conteúdo com fundo branco */
6184
+ PoSkeletonType["content"] = "content";
6185
+ })(PoSkeletonType || (PoSkeletonType = {}));
6186
+
6187
+ /**
6188
+ * @usedBy PoSkeletonComponent
6189
+ *
6190
+ * @description
6191
+ *
6192
+ * Define as variantes visuais do componente `po-skeleton`.
6193
+ */
6194
+ var PoSkeletonVariant;
6195
+ (function (PoSkeletonVariant) {
6196
+ /** Variante para simular texto */
6197
+ PoSkeletonVariant["text"] = "text";
6198
+ /** Variante retangular (largura maior que altura) */
6199
+ PoSkeletonVariant["rectangle"] = "rectangle";
6200
+ /** Variante quadrada (largura igual à altura) */
6201
+ PoSkeletonVariant["square"] = "square";
6202
+ /** Variante circular */
6203
+ PoSkeletonVariant["circle"] = "circle";
6204
+ })(PoSkeletonVariant || (PoSkeletonVariant = {}));
6205
+
6206
+ /**
6207
+ * @description
6208
+ *
6209
+ * O componente `po-skeleton` é utilizado para exibir placeholders durante o carregamento de conteúdo,
6210
+ * melhorando a experiência do usuário ao indicar que a informação está sendo processada.
6211
+ *
6212
+ * Ele oferece diferentes variantes visuais (texto, retângulo, círculo) e animações (pulse, shimmer)
6213
+ * para simular diversos tipos de conteúdo em estado de carregamento.
6214
+ *
6215
+ * #### Tokens customizáveis
6216
+ *
6217
+ * É possível alterar o estilo do componente usando os seguintes tokens (CSS):
6218
+ *
6219
+ * > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
6220
+ *
6221
+ * | Propriedade | Descrição | Valor Padrão |
6222
+ * |----------------------------------------|------------------------------------------------------|---------------------------------|
6223
+ * | **Cores** | | |
6224
+ * | `--color` | Cor de fundo do skeleton (tipo normal) | `var(--color-neutral-light-20)` |
6225
+ * | `--color-primary` | Cor de fundo do skeleton (tipo primary) | `var(--color-neutral-mid-40)` |
6226
+ * | `--color-content` | Cor de fundo do skeleton (tipo content) | `var(--color-neutral-light-00)` |
6227
+ * | `--shimmer-highlight` | Cor de destaque do shimmer (tipo normal) | `var(--color-neutral-light-30)` |
6228
+ * | `--shimmer-highlight-primary` | Cor de destaque do shimmer (tipo primary) | `var(--color-neutral-light-20)` |
6229
+ * | `--shimmer-highlight-content` | Cor de destaque do shimmer (tipo content) | `var(--color-neutral-light-05)` |
6230
+ * | **Espaçamento** | | |
6231
+ * | `--margin-bottom` | Margem inferior do skeleton | `var(--spacing-xs)` |
6232
+ * | **Bordas** | | |
6233
+ * | `--border-radius` | Raio da borda do skeleton | `var(--border-radius-md)` |
6234
+ * | `--border-radius-text` | Raio da borda para a variante text | `var(--border-radius-md)` |
6235
+ * | `--border-radius-primary` | Raio da borda do skeleton (tipo primary) | `var(--border-radius-md)` |
6236
+ * | `--border-radius-content` | Raio da borda do skeleton (tipo content) | `var(--border-radius-lg)` |
6237
+ * | **Transições** | | |
6238
+ * | `--transition-property` | Propriedade CSS da transição | `all` |
6239
+ * | `--transition-duration` | Duração da transição de cor | `var(--duration-moderate)` |
6240
+ * | `--transition-timing` | Função de temporização da transição/animação | `var(--timing-continuous)` |
6241
+ * | **Animações** | | |
6242
+ * | `--animation-duration-pulse` | Duração da animação de pulsação | `var(--duration-very-slow)` |
6243
+ * | `--animation-duration-shimmer` | Duração da animação de brilho deslizante | `var(--duration-ultra-slow)` |
6244
+ *
6245
+ */
6246
+ class PoSkeletonBaseComponent {
6247
+ /**
6248
+ * @optional
6249
+ *
6250
+ * @description
6251
+ *
6252
+ * Define a variante visual do skeleton.
6253
+ *
6254
+ * Valores válidos:
6255
+ * - `text`: Simula uma linha de texto (altura padrão: 1em)
6256
+ * - `rectangle`: Forma retangular (proporção 3:1 por padrão)
6257
+ * - `square`: Forma quadrada (largura e altura iguais)
6258
+ * - `circle`: Forma circular (largura e altura iguais)
6259
+ *
6260
+ * @default `text`
6261
+ */
6262
+ variant = input(PoSkeletonVariant.text, { ...(ngDevMode ? { debugName: "variant" } : /* istanbul ignore next */ {}), alias: 'p-variant' });
6263
+ /**
6264
+ * @optional
6265
+ *
6266
+ * @description
6267
+ *
6268
+ * Define o tipo visual do skeleton, alterando sua cor de fundo.
6269
+ *
6270
+ * Valores válidos:
6271
+ * - `normal`: Cor neutra clara (padrão)
6272
+ * - `primary`: Cor neutra média
6273
+ * - `content`: Fundo branco
6274
+ *
6275
+ * @default `normal`
6276
+ */
6277
+ type = input(PoSkeletonType.normal, { ...(ngDevMode ? { debugName: "type" } : /* istanbul ignore next */ {}), alias: 'p-type' });
6278
+ /**
6279
+ * @optional
6280
+ *
6281
+ * @description
6282
+ *
6283
+ * Define o tipo de animação do skeleton.
6284
+ *
6285
+ * Valores válidos:
6286
+ * - `none`: Sem animação
6287
+ * - `pulse`: Animação de pulsação
6288
+ * - `shimmer`: Animação de brilho deslizante
6289
+ *
6290
+ * @default `shimmer`
6291
+ */
6292
+ animation = input(PoSkeletonAnimation.shimmer, { ...(ngDevMode ? { debugName: "animation" } : /* istanbul ignore next */ {}), alias: 'p-animation' });
6293
+ /**
6294
+ * @optional
6295
+ *
6296
+ * @description
6297
+ *
6298
+ * Define o tamanho do skeleton para as variantes pré-definidas (`rectangle`, `square`, `circle`).
6299
+ *
6300
+ * Valores válidos:
6301
+ * - `xs`: Extra pequeno (24px para square/circle, 72px x 24px para rectangle)
6302
+ * - `sm`: Pequeno (32px para square/circle, 96px x 32px para rectangle)
6303
+ * - `md`: Médio (48px para square/circle, 144px x 48px para rectangle)
6304
+ * - `lg`: Grande (64px para square/circle, 192px x 64px para rectangle)
6305
+ * - `xl`: Extra grande (96px para square/circle, 288px x 96px para rectangle)
6306
+ * - `2xl`: Extra extra grande (144px para square/circle, 432px x 144px para rectangle)
6307
+ *
6308
+ * Esta propriedade é ignorada quando `p-width` ou `p-height` são definidos explicitamente.
6309
+ *
6310
+ * @default `md`
6311
+ */
6312
+ size = input(PoSkeletonSize.md, { ...(ngDevMode ? { debugName: "size" } : /* istanbul ignore next */ {}), alias: 'p-size' });
6313
+ /**
6314
+ * @optional
6315
+ *
6316
+ * @description
6317
+ *
6318
+ * Define a largura do skeleton.
6319
+ * Aceita valores CSS válidos (px, %, em, rem).
6320
+ *
6321
+ * Quando definido, sobrescreve a largura padrão da variante.
6322
+ *
6323
+ * @default `100%` para variante `text`, tamanho baseado em `p-size` para outras variantes
6324
+ */
6325
+ width = input('', { ...(ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {}), alias: 'p-width' });
6326
+ /**
6327
+ * @optional
6328
+ *
6329
+ * @description
6330
+ *
6331
+ * Define a altura do skeleton.
6332
+ * Aceita valores CSS válidos (px, %, em, rem).
6333
+ *
6334
+ * Quando definido, sobrescreve a altura padrão da variante.
6335
+ */
6336
+ height = input('', { ...(ngDevMode ? { debugName: "height" } : /* istanbul ignore next */ {}), alias: 'p-height' });
6337
+ /**
6338
+ * @optional
6339
+ *
6340
+ * @description
6341
+ *
6342
+ * Define o raio da borda do skeleton.
6343
+ * Aceita valores CSS válidos (px, %, em, rem).
6344
+ *
6345
+ * Esta propriedade sobrescreve o border-radius padrão de cada variante.
6346
+ */
6347
+ borderRadius = input('', { ...(ngDevMode ? { debugName: "borderRadius" } : /* istanbul ignore next */ {}), alias: 'p-border-radius' });
6348
+ /**
6349
+ * @optional
6350
+ *
6351
+ * @description
6352
+ *
6353
+ * Define a descrição acessível do conteúdo que está sendo carregado.
6354
+ *
6355
+ * Este texto será anunciado por leitores de tela, garantindo que usuários de tecnologias assistivas
6356
+ * sejam informados sobre o estado de carregamento.
6357
+ *
6358
+ * **Quando usar:**
6359
+ * - Use em **skeletons únicos** ou no **primeiro skeleton de um grupo** com descrição contextual
6360
+ * - Evite usar em múltiplos skeletons dentro da mesma área sem contexto, para não causar repetição excessiva
6361
+ *
6362
+ * **Exemplos de uso:**
6363
+ *
6364
+ * ```html
6365
+ * <!-- ✅ BOM: Skeleton único com contexto -->
6366
+ * <po-skeleton p-aria-label="Carregando perfil do usuário"></po-skeleton>
6367
+ *
6368
+ * <!-- ✅ BOM: Grupo de skeletons - apenas o primeiro anuncia -->
6369
+ * <po-skeleton p-aria-label="Carregando lista de produtos"></po-skeleton>
6370
+ * <po-skeleton p-type="primary"></po-skeleton>
6371
+ * <po-skeleton p-variant="circle"></po-skeleton>
6372
+ *
6373
+ * <!-- ❌ EVITE: Múltiplos skeletons com a mesma label -->
6374
+ * <po-skeleton p-aria-label="Carregando"></po-skeleton> <!-- "Carregando" -->
6375
+ * <po-skeleton p-aria-label="Carregando"></po-skeleton> <!-- "Carregando" -->
6376
+ * <po-skeleton p-aria-label="Carregando"></po-skeleton> <!-- "Carregando" (repetitivo!) -->
6377
+ * ```
6378
+ *
6379
+ * > **Boas práticas de acessibilidade:**
6380
+ * > - Forneça contexto específico na label para que os usuários entendam o que está carregando
6381
+ *
6382
+ * > - Em casos complexos, considere usar um único `<div role="status">` para todo o grupo
6383
+ * > de skeletons, ao invés de múltiplas labels idênticas, para evitar repetição excessiva de anúncios
6384
+ */
6385
+ ariaLabel = input('', { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'p-aria-label' });
6386
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6387
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: PoSkeletonBaseComponent, isStandalone: true, inputs: { variant: { classPropertyName: "variant", publicName: "p-variant", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "p-type", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "p-animation", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "p-width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "p-height", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "p-border-radius", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "p-aria-label", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
6388
+ }
6389
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonBaseComponent, decorators: [{
6390
+ type: Directive
6391
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-variant", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-type", required: false }] }], animation: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-animation", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-size", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-height", required: false }] }], borderRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-border-radius", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-aria-label", required: false }] }] } });
6392
+
6393
+ /**
6394
+ * @docsExtends PoSkeletonBaseComponent
6395
+ *
6396
+ * @example
6397
+ *
6398
+ * <example name="po-skeleton-basic" title="PO Skeleton Basic">
6399
+ * <file name="sample-po-skeleton-basic/sample-po-skeleton-basic.component.html"> </file>
6400
+ * <file name="sample-po-skeleton-basic/sample-po-skeleton-basic.component.ts"> </file>
6401
+ * </example>
6402
+ *
6403
+ * <example name="po-skeleton-labs" title="PO Skeleton Labs">
6404
+ * <file name="sample-po-skeleton-labs/sample-po-skeleton-labs.component.html"> </file>
6405
+ * <file name="sample-po-skeleton-labs/sample-po-skeleton-labs.component.ts"> </file>
6406
+ * </example>
6407
+ *
6408
+ * <example name="po-skeleton-credit-card" title="PO Skeleton - Credit Card">
6409
+ * <file name="sample-po-skeleton-credit-card/sample-po-skeleton-credit-card.component.html"> </file>
6410
+ * <file name="sample-po-skeleton-credit-card/sample-po-skeleton-credit-card.component.ts"> </file>
6411
+ * <file name="sample-po-skeleton-credit-card/sample-po-skeleton-credit-card.component.css"> </file>
6412
+ * </example>
6413
+ *
6414
+ * <example name="po-skeleton-widget-card" title="PO Skeleton - Widget Card">
6415
+ * <file name="sample-po-skeleton-widget-card/sample-po-skeleton-widget-card.component.html"> </file>
6416
+ * <file name="sample-po-skeleton-widget-card/sample-po-skeleton-widget-card.component.ts"> </file>
6417
+ * <file name="sample-po-skeleton-widget-card/sample-po-skeleton-widget-card.component.css"> </file>
6418
+ * </example>
6419
+ *
6420
+ * <example name="po-skeleton-user-profile" title="PO Skeleton - User Profile">
6421
+ * <file name="sample-po-skeleton-user-profile/sample-po-skeleton-user-profile.component.html"> </file>
6422
+ * <file name="sample-po-skeleton-user-profile/sample-po-skeleton-user-profile.component.ts"> </file>
6423
+ * <file name="sample-po-skeleton-user-profile/sample-po-skeleton-user-profile.component.css"> </file>
6424
+ * </example>
6425
+ *
6426
+ * <example name="po-skeleton-social-post" title="PO Skeleton - Social Post">
6427
+ * <file name="sample-po-skeleton-social-post/sample-po-skeleton-social-post.component.html"> </file>
6428
+ * <file name="sample-po-skeleton-social-post/sample-po-skeleton-social-post.component.ts"> </file>
6429
+ * <file name="sample-po-skeleton-social-post/sample-po-skeleton-social-post.component.css"> </file>
6430
+ * </example>
6431
+ *
6432
+ * <example name="po-skeleton-article" title="PO Skeleton - Article">
6433
+ * <file name="sample-po-skeleton-article/sample-po-skeleton-article.component.html"> </file>
6434
+ * <file name="sample-po-skeleton-article/sample-po-skeleton-article.component.ts"> </file>
6435
+ * <file name="sample-po-skeleton-article/sample-po-skeleton-article.component.css"> </file>
5616
6436
  * </example>
5617
6437
  */
5618
- class PoLoadingOverlayComponent extends PoLoadingOverlayBaseComponent {
5619
- changeDetector = inject(ChangeDetectorRef);
5620
- constructor() {
5621
- const languageService = inject(PoLanguageService);
5622
- super(languageService);
6438
+ class PoSkeletonComponent extends PoSkeletonBaseComponent {
6439
+ sizeMap = {
6440
+ [PoSkeletonSize.xs]: { square: 24, circle: 24, rectangleWidth: 72, rectangleHeight: 24 },
6441
+ [PoSkeletonSize.sm]: { square: 32, circle: 32, rectangleWidth: 96, rectangleHeight: 32 },
6442
+ [PoSkeletonSize.md]: { square: 48, circle: 48, rectangleWidth: 144, rectangleHeight: 48 },
6443
+ [PoSkeletonSize.lg]: { square: 64, circle: 64, rectangleWidth: 192, rectangleHeight: 64 },
6444
+ [PoSkeletonSize.xl]: { square: 96, circle: 96, rectangleWidth: 288, rectangleHeight: 96 },
6445
+ [PoSkeletonSize.xxl]: { square: 144, circle: 144, rectangleWidth: 432, rectangleHeight: 144 }
6446
+ };
6447
+ defaultTextDimensions = { width: '100%', height: '1em' };
6448
+ defaultBorderRadius = {
6449
+ [PoSkeletonVariant.text]: undefined,
6450
+ [PoSkeletonVariant.square]: undefined,
6451
+ [PoSkeletonVariant.rectangle]: undefined,
6452
+ [PoSkeletonVariant.circle]: '50%'
6453
+ };
6454
+ computedStyles = computed(() => {
6455
+ const styles = {};
6456
+ const variant = this.variant();
6457
+ const size = this.size();
6458
+ const sizeConfig = this.sizeMap[size];
6459
+ const defaultDimensions = this.getDimensions(variant, sizeConfig);
6460
+ styles['width'] = this.width() || defaultDimensions.width || '';
6461
+ styles['height'] = this.height() || defaultDimensions.height || '';
6462
+ const borderRadiusValue = this.borderRadius();
6463
+ const defaultRadius = this.defaultBorderRadius[variant];
6464
+ if (borderRadiusValue || defaultRadius) {
6465
+ styles['border-radius'] = borderRadiusValue || defaultRadius;
6466
+ }
6467
+ return styles;
6468
+ }, ...(ngDevMode ? [{ debugName: "computedStyles" }] : /* istanbul ignore next */ []));
6469
+ computedClasses = computed(() => ({
6470
+ 'po-skeleton': true,
6471
+ [`po-skeleton-${this.variant()}`]: true,
6472
+ [`po-skeleton-type-${this.type()}`]: true,
6473
+ [`po-skeleton-animation-${this.animation()}`]: true
6474
+ }), ...(ngDevMode ? [{ debugName: "computedClasses" }] : /* istanbul ignore next */ []));
6475
+ getDimensions(variant, sizeConfig) {
6476
+ switch (variant) {
6477
+ case PoSkeletonVariant.text:
6478
+ return this.defaultTextDimensions;
6479
+ case PoSkeletonVariant.square:
6480
+ return { width: `${sizeConfig.square}px`, height: `${sizeConfig.square}px` };
6481
+ case PoSkeletonVariant.circle:
6482
+ return { width: `${sizeConfig.circle}px`, height: `${sizeConfig.circle}px` };
6483
+ case PoSkeletonVariant.rectangle:
6484
+ return { width: `${sizeConfig.rectangleWidth}px`, height: `${sizeConfig.rectangleHeight}px` };
6485
+ default:
6486
+ return { width: '', height: '' };
6487
+ }
5623
6488
  }
5624
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5625
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: PoLoadingOverlayComponent, isStandalone: false, selector: "po-loading-overlay", usesInheritance: true, ngImport: i0, template: "<po-overlay [p-screen-lock]=\"screenLock\">\n <po-loading [p-text]=\"text\" [p-size]=\"size\" [p-in-overlay]=\"true\"></po-loading>\n</po-overlay>\n", dependencies: [{ kind: "component", type: PoOverlayComponent, selector: "po-overlay" }, { kind: "component", type: PoLoadingComponent, selector: "po-loading" }] });
6489
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6490
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PoSkeletonComponent, isStandalone: false, selector: "po-skeleton", usesInheritance: true, ngImport: i0, template: "<div class=\"po-skeleton-wrapper\" [ngClass]=\"computedClasses()\" [ngStyle]=\"computedStyles()\" aria-hidden=\"true\"></div>\n@if (ariaLabel()) {\n <span class=\"po-skeleton-aria-label\" role=\"status\" aria-live=\"polite\">{{ ariaLabel() }}</span>\n}\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5626
6491
  }
5627
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLoadingOverlayComponent, decorators: [{
6492
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonComponent, decorators: [{
5628
6493
  type: Component,
5629
- args: [{ selector: 'po-loading-overlay', standalone: false, template: "<po-overlay [p-screen-lock]=\"screenLock\">\n <po-loading [p-text]=\"text\" [p-size]=\"size\" [p-in-overlay]=\"true\"></po-loading>\n</po-overlay>\n" }]
5630
- }], ctorParameters: () => [] });
6494
+ args: [{ selector: 'po-skeleton', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"po-skeleton-wrapper\" [ngClass]=\"computedClasses()\" [ngStyle]=\"computedStyles()\" aria-hidden=\"true\"></div>\n@if (ariaLabel()) {\n <span class=\"po-skeleton-aria-label\" role=\"status\" aria-live=\"polite\">{{ ariaLabel() }}</span>\n}\n" }]
6495
+ }] });
5631
6496
 
5632
6497
  /**
5633
6498
  * @description
@@ -6114,460 +6979,40 @@ class PoCheckboxBaseComponent {
6114
6979
  *
6115
6980
  * Não emite quando o novo valor é idêntico ao anterior (deduplicação automática).
6116
6981
  */
6117
- changeModel = new EventEmitter();
6118
- /**
6119
- * @optional
6120
- *
6121
- * @description
6122
- * Evento disparado quando uma tecla é pressionada enquanto o foco está no componente.
6123
- * Retorna um objeto `KeyboardEvent` com informações sobre a tecla.
6124
- */
6125
- keydown = new EventEmitter();
6126
- //propriedade interna recebida do checkbox-group para verificar se o checkbox está ativo, inativo ou indeterminate
6127
- checkboxValue;
6128
- //propriedade interna recebida do checkbox-group para verificar se o checkbox é required
6129
- checkBoxRequired;
6130
- //propriedade interna recebida para desabilitar o tabindex do checkbox na utilização dentro de um list-box
6131
- disabladTabindex = false;
6132
- displayAdditionalHelp = false;
6133
- id = uuid();
6134
- modelLastUpdate;
6135
- propagateChange;
6136
- onTouched;
6137
- _disabled = false;
6138
- _size = undefined;
6139
- _initialSize = undefined;
6140
- /**
6141
- * @optional
6142
- *
6143
- * @description
6144
- *
6145
- * Define o estado do *checkbox* como desabilitado.
6146
- *
6147
- * @default `false`
6148
- */
6149
- set disabled(value) {
6150
- this._disabled = value;
6151
- }
6152
- get disabled() {
6153
- return this._disabled;
6154
- }
6155
- /**
6156
- * @optional
6157
- *
6158
- * @description
6159
- *
6160
- * Define o tamanho da caixa de seleção do componente:
6161
- * - `small`: 16x16 (disponível apenas para acessibilidade AA).
6162
- * - `medium`: 24x24.
6163
- * - `large`: 32x32.
6164
- *
6165
- * > Caso a acessibilidade AA não esteja configurada, o tamanho `medium` será mantido.
6166
- * Para mais detalhes, consulte a documentação do [po-theme](https://po-ui.io/documentation/po-theme).
6167
- *
6168
- * @default `medium`
6169
- *
6170
- */
6171
- set size(value) {
6172
- this._initialSize = value;
6173
- this.applySizeBasedOnA11y();
6174
- }
6175
- get size() {
6176
- return this._size ?? getDefaultSizeFn(PoCheckboxSize);
6177
- }
6178
- /**
6179
- * @optional
6180
- *
6181
- * @description
6182
- *
6183
- * Define as opções do componente de ajuda (po-helper) que será exibido ao lado do label quando a propriedade `p-label` for definida, ou, ao lado do componente na ausência da propriedade `p-label`.
6184
- * > Para mais informações acesse: https://po-ui.io/documentation/po-helper.
6185
- *
6186
- * > Ao configurar esta propriedade, o antigo ícone de ajuda adicional (`p-additional-help-tooltip` e `p-additional-help`) será ignorado.
6187
- */
6188
- poHelperComponent = input(undefined, { ...(ngDevMode ? { debugName: "poHelperComponent" } : /* istanbul ignore next */ {}), alias: 'p-helper' });
6189
- /**
6190
- * @optional
6191
- *
6192
- * @description
6193
- *
6194
- * Habilita a quebra automática do texto da propriedade `p-label`. Quando `p-label-text-wrap` for verdadeiro, o texto que excede
6195
- * o espaço disponível é transferido para a próxima linha em pontos apropriados para uma
6196
- * leitura clara.
6197
- *
6198
- * @default `false`
6199
- */
6200
- labelTextWrap = input(false, { ...(ngDevMode ? { debugName: "labelTextWrap" } : /* istanbul ignore next */ {}), alias: 'p-label-text-wrap' });
6201
- constructor(cd) {
6202
- this.cd = cd;
6203
- }
6204
- onThemeChange() {
6205
- this.applySizeBasedOnA11y();
6206
- }
6207
- changeValue() {
6208
- if (this.propagateChange) {
6209
- this.propagateChange(this.checkboxValue);
6210
- }
6211
- this.change.emit(this.checkboxValue);
6212
- this.controlChangeModelEmitter(this.checkboxValue);
6213
- }
6214
- checkOption(event, value) {
6215
- const target = event.target;
6216
- if (target.closest('po-helper')) {
6217
- return;
6218
- }
6219
- if (!this.disabled) {
6220
- value === 'mixed' ? this.changeModelValue(true) : this.changeModelValue(!value);
6221
- this.changeValue();
6222
- }
6223
- }
6224
- // Função implementada do ControlValueAccessor
6225
- // Usada para interceptar os estados de habilitado via forms api
6226
- setDisabledState(isDisabled) {
6227
- this.disabled = isDisabled;
6228
- this.cd.markForCheck();
6229
- }
6230
- registerOnChange(fn) {
6231
- this.propagateChange = fn;
6232
- }
6233
- registerOnTouched(fn) {
6234
- this.onTouched = fn;
6235
- }
6236
- writeValue(value) {
6237
- if (value !== this.checkboxValue) {
6238
- this.changeModelValue(value);
6239
- }
6240
- if (value != null) {
6241
- this.controlChangeModelEmitter(this.checkboxValue);
6242
- }
6243
- }
6244
- controlChangeModelEmitter(value) {
6245
- if (this.modelLastUpdate !== value) {
6246
- this.changeModel.emit(value);
6247
- this.modelLastUpdate = value;
6248
- }
6249
- }
6250
- applySizeBasedOnA11y() {
6251
- const size = validateSizeFn(this._initialSize, PoCheckboxSize);
6252
- this._size = size;
6253
- }
6254
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoCheckboxBaseComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
6255
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.25", type: PoCheckboxBaseComponent, isStandalone: false, selector: "po-checkbox-base", inputs: { additionalHelpEventTrigger: { classPropertyName: "additionalHelpEventTrigger", publicName: "additionalHelpEventTrigger", isSignal: false, isRequired: false, transformFunction: null }, additionalHelpTooltip: { classPropertyName: "additionalHelpTooltip", publicName: "p-additional-help-tooltip", isSignal: false, isRequired: false, transformFunction: null }, appendBox: { classPropertyName: "appendBox", publicName: "p-append-in-body", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, compactLabel: { classPropertyName: "compactLabel", publicName: "p-compact-label", isSignal: true, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "p-help", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "p-auto-focus", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, label: { classPropertyName: "label", publicName: "p-label", isSignal: false, isRequired: false, transformFunction: null }, checkboxValue: { classPropertyName: "checkboxValue", publicName: "p-checkboxValue", isSignal: false, isRequired: false, transformFunction: null }, checkBoxRequired: { classPropertyName: "checkBoxRequired", publicName: "p-required", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, disabladTabindex: { classPropertyName: "disabladTabindex", publicName: "p-disabled-tabindex", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, disabled: { classPropertyName: "disabled", publicName: "p-disabled", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, size: { classPropertyName: "size", publicName: "p-size", isSignal: false, isRequired: false, transformFunction: null }, poHelperComponent: { classPropertyName: "poHelperComponent", publicName: "p-helper", isSignal: true, isRequired: false, transformFunction: null }, labelTextWrap: { classPropertyName: "labelTextWrap", publicName: "p-label-text-wrap", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { additionalHelp: "p-additional-help", blur: "p-blur", change: "p-change", changeModel: "p-change-model", keydown: "p-keydown" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-size": "this.size" } }, ngImport: i0, template: '', isInline: true });
6256
- }
6257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoCheckboxBaseComponent, decorators: [{
6258
- type: Component,
6259
- args: [{
6260
- selector: 'po-checkbox-base',
6261
- template: '',
6262
- standalone: false
6263
- }]
6264
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { additionalHelpEventTrigger: [{
6265
- type: Input
6266
- }], additionalHelpTooltip: [{
6267
- type: Input,
6268
- args: ['p-additional-help-tooltip']
6269
- }], appendBox: [{
6270
- type: Input,
6271
- args: [{ alias: 'p-append-in-body', transform: convertToBoolean }]
6272
- }], compactLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-compact-label", required: false }] }], help: [{
6273
- type: Input,
6274
- args: ['p-help']
6275
- }], name: [{
6276
- type: Input,
6277
- args: ['name']
6278
- }], autoFocus: [{
6279
- type: Input,
6280
- args: [{ alias: 'p-auto-focus', transform: convertToBoolean }]
6281
- }], label: [{
6282
- type: Input,
6283
- args: ['p-label']
6284
- }], additionalHelp: [{
6285
- type: Output,
6286
- args: ['p-additional-help']
6287
- }], blur: [{
6288
- type: Output,
6289
- args: ['p-blur']
6290
- }], change: [{
6291
- type: Output,
6292
- args: ['p-change']
6293
- }], changeModel: [{
6294
- type: Output,
6295
- args: ['p-change-model']
6296
- }], keydown: [{
6297
- type: Output,
6298
- args: ['p-keydown']
6299
- }], checkboxValue: [{
6300
- type: Input,
6301
- args: ['p-checkboxValue']
6302
- }], checkBoxRequired: [{
6303
- type: Input,
6304
- args: [{ alias: 'p-required', transform: convertToBoolean }]
6305
- }], disabladTabindex: [{
6306
- type: Input,
6307
- args: [{ alias: 'p-disabled-tabindex', transform: convertToBoolean }]
6308
- }], disabled: [{
6309
- type: Input,
6310
- args: [{ alias: 'p-disabled', transform: convertToBoolean }]
6311
- }], size: [{
6312
- type: Input,
6313
- args: ['p-size']
6314
- }, {
6315
- type: HostBinding,
6316
- args: ['attr.p-size']
6317
- }], poHelperComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-helper", required: false }] }], labelTextWrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-label-text-wrap", required: false }] }], onThemeChange: [{
6318
- type: HostListener,
6319
- args: ['window:PoUiThemeChange']
6320
- }] } });
6321
-
6322
- /**
6323
- * @usedBy PoButtonComponent, PoWidgetComponent
6324
- *
6325
- * @description
6326
- *
6327
- * Estilos disponíveis do button.
6328
- */
6329
- var PoButtonKind;
6330
- (function (PoButtonKind) {
6331
- /** Estilo primário, usado para ações principais que requerem maior destaque. */
6332
- PoButtonKind["primary"] = "primary";
6333
- /** Estilo secundário, usado como padrão, para ações comuns. */
6334
- PoButtonKind["secondary"] = "secondary";
6335
- /** Estilo terciário, ideal para ações menos importantes, sem fundo preenchido. */
6336
- PoButtonKind["tertiary"] = "tertiary";
6337
- })(PoButtonKind || (PoButtonKind = {}));
6338
-
6339
- /**
6340
- * @description
6341
- *
6342
- * Tamanhos da propriedade `p-size`. A medida `small` está disponível apenas para acessibilidade AA.
6343
- */
6344
- var PoButtonSize;
6345
- (function (PoButtonSize) {
6346
- /** Define a altura do button como 32px. */
6347
- PoButtonSize["Small"] = "small";
6348
- /** Define a altura do button como 44px. */
6349
- PoButtonSize["Medium"] = "medium";
6350
- /** Define a altura do button como 56px. */
6351
- PoButtonSize["Large"] = "large";
6352
- })(PoButtonSize || (PoButtonSize = {}));
6353
-
6354
- /**
6355
- * @usedBy PoButtonComponent
6356
- *
6357
- * @description
6358
- *
6359
- * Enumeração que define os tipos possíveis para o `PoButtonComponent`. Estes tipos estão relacionados ao comportamento
6360
- * do botão quando utilizado dentro de um formulário HTML.
6361
- *
6362
- * @example
6363
- * No uso com o `PoButtonComponent`, a propriedade `p-type` pode ser utilizada para configurar o comportamento:
6364
- *
6365
- * ```
6366
- * <po-button p-label="Enviar" p-type="submit"></po-button>
6367
- * <po-button p-label="Cancelar" p-type="button"></po-button>
6368
- * <po-button p-label="Redefinir" p-type="reset"></po-button>
6369
- * ```
6370
- */
6371
- var PoButtonType;
6372
- (function (PoButtonType) {
6373
- /**
6374
- * Define o botão como do tipo `submit`. Quando clicado, o formulário é enviado automaticamente,
6375
- * disparando o evento `submit`.
6376
- */
6377
- PoButtonType["Submit"] = "submit";
6378
- /**
6379
- * Define o botão como do tipo `button`. Este tipo de botão não possui comportamento padrão associado
6380
- * e é utilizado principalmente para ações programáticas como cliques e disparos de eventos customizados.
6381
- */
6382
- PoButtonType["Button"] = "button";
6383
- /**
6384
- * Define o botão como do tipo `reset`. Quando clicado, redefine os campos do formulário ao qual pertence
6385
- * para seus valores iniciais.
6386
- */
6387
- PoButtonType["Reset"] = "reset";
6388
- })(PoButtonType || (PoButtonType = {}));
6389
-
6390
- /**
6391
- * @description
6392
- *
6393
- * O `po-button` permite que o usuário execute ações predefinidas pelo desenvolvedor.
6394
- *
6395
- * Através dos tipos, é possível identificar a importância de cada ação.
6396
- *
6397
- * #### Boas práticas
6398
- *
6399
- * - Evite `labels` extensos que quebram o layout do `po-button`, use `labels` diretos, curtos e intuitivos.
6400
- * - Utilize apenas um `po-button` configurado como `primary` por página.
6401
- * - Para ações irreversíveis use sempre a propriedade `p-danger`.
6402
- *
6403
- * #### Acessibilidade tratada no componente
6404
- *
6405
- * Algumas diretrizes de acessibilidade já são tratadas no componente, internamente, e não podem ser alteradas pelo proprietário do conteúdo. São elas:
6406
- *
6407
- * - Quando em foco, o botão é ativado usando as teclas de Espaço e Enter do teclado. [W3C WAI-ARIA 3.5 Button - Keyboard Interaction](https://www.w3.org/WAI/ARIA/apg/#keyboard-interaction-3)
6408
- * - A área do foco precisar ter uma espessura de pelo menos 2 pixels CSS e o foco não pode ficar escondido por outros elementos da tela. [WCAG 2.4.12: Focus Appearance](https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance-enhanced)
6409
- *
6410
- * #### Tokens customizáveis
6411
- *
6412
- * É possível alterar o estilo do componente usando os seguintes tokens (CSS):
6413
- *
6414
- * > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
6415
- *
6416
- * | Propriedade | Descrição | Valor Padrão |
6417
- * |------------------------------------------|-------------------------------------------------------|---------------------------------------------------|
6418
- * | `--font-family` | Família tipográfica usada | `var(--font-family-theme)` |
6419
- * | `--font-size` | Tamanho da fonte | `var(--font-size-default)` |
6420
- * | `--font-weight` | Peso da fonte | `var(--font-weight-bold)` |
6421
- * | `--line-height` | Tamanho da label | `var(--line-height-none)` |
6422
- * | `--border-radius` | Contém o valor do raio dos cantos do elemento&nbsp; | `var(--border-radius-md)` |
6423
- * | `--border-width` | Contém o valor da largura dos cantos do elemento&nbsp;| `var(--border-width-md)` |
6424
- * | `--padding` | Preenchimento | `0 1em` | | --- |
6425
- * | **Danger** | | |
6426
- * | `--text-color-danger` | Cor do texto no estado danger | `var(--color-neutral-light-00)` |
6427
- * | `--color-button-danger` | Cor do botão no estado danger | `var(--color-feedback-negative-dark)` |
6428
- * | `--color-danger-hover` | Cor de hover no estado danger | `var(--color-feedback-negative-darker)` |
6429
- * | `--color-danger-pressed` | Cor pressionada no estado danger | `var(--color-feedback-negative-darkest)` |
6430
- * | `--background-danger-hover` | Cor de background de hover no estado danger | `var(--color-feedback-negative-lighter)` |
6431
- * | `--border-color-danger-hover` | Cor da borda de hover no estado danger | `var(--color-feedback-negative-darkest)` |
6432
- * | `--background-danger-pressed` | Cor de background pressionado no estado danger | `var(--color-feedback-negative-light)` |
6433
- * | `--background-color-button-danger`&nbsp; | Cor de background do botão no estado danger | `var(--color-transparent)` |
6434
- * | **Default Values** | | |
6435
- * | `--text-color` | Cor do texto | `var(--color-neutral-light-00)` |
6436
- * | `--color` | Cor principal do botão | `var(--color-action-default)` |
6437
- * | `--background-color` | Cor de background | `var(--color-transparent)` |
6438
- * | `--border-color` | Cor da borda | `var(--color-transparent)` |
6439
- * | `--shadow` | Contém o valor da sombra do elemento | `var(--shadow-none)` |
6440
- * | **Hover** | | |
6441
- * | `--color-hover` | Cor principal no estado hover | `var(--color-action-hover)` |
6442
- * | `--background-hover` | Cor de background no estado hover | `var(--color-brand-01-lighter)` |
6443
- * | `--border-color-hover` | Cor da borda no estado hover | `var(--color-brand-01-darkest)` |
6444
- * | **Focused** | | |
6445
- * | `--outline-color-focused` | Cor do outline do estado de focus | `var(--color-action-focus)` |
6446
- * | **Pressed** | | |
6447
- * | `--color-pressed` | Cor principal no estado de pressionado | `var(--color-action-pressed)` |
6448
- * | `--background-pressed` | Cor de background no estado de pressionado&nbsp; | `var(--color-brand-01-light)` |
6449
- * | **Disabled** | | |
6450
- * | `--text-color-disabled` | Cor do texto no estado disabled | `var(--color-neutral-dark-70)` |
6451
- * | `--color-disabled` | Cor principal no estado disabled | `var(--color-action-disabled)` |
6452
- * | `--background-color-disabled` | Cor de background no estado disabled | `var(--color-transparent)` |
6453
- *
6454
- */
6455
- class PoButtonBaseComponent {
6456
- /**
6457
- * @optional
6458
- *
6459
- * @description
6460
- *
6461
- * Label do botão.
6462
- */
6463
- label = input(undefined, { ...(ngDevMode ? { debugName: "label" } : /* istanbul ignore next */ {}), alias: 'p-label' });
6464
- /**
6465
- * @optional
6466
- *
6467
- * @description
6468
- * Ícone exibido ao lado esquerdo do label do botão.
6469
- *
6470
- * É possível usar qualquer um dos ícones da [Biblioteca de ícones](https://po-ui.io/icons), conforme exemplo:
6471
- * ```
6472
- * <po-button p-icon="an an-user" p-label="PO button"></po-button>
6473
- * ```
6474
- * Também é possível utilizar outras fontes de ícones, por exemplo a biblioteca *Font Awesome*, desde que a biblioteca
6475
- * esteja carregada no projeto:
6476
- * ```
6477
- * <po-button p-icon="fa fa-podcast" p-label="PO button"></po-button>
6478
- * ```
6479
- * Outra opção seria a customização do ícone através do `TemplateRef`, conforme exemplo abaixo:
6480
- * ```
6481
- * <po-button [p-icon]="template" p-label="button template ionic"></po-button>
6482
- *
6483
- * <ng-template #template>
6484
- * <ion-icon style="font-size: inherit" name="heart"></ion-icon>
6485
- * </ng-template>
6486
- * ```
6487
- * > Para o ícone enquadrar corretamente, deve-se utilizar `font-size: inherit` caso o ícone utilizado não aplique-o.
6488
- */
6489
- icon = input(undefined, { ...(ngDevMode ? { debugName: "icon" } : /* istanbul ignore next */ {}), alias: 'p-icon' });
6490
- /**
6491
- * @optional
6492
- *
6493
- * @description
6494
- * Define o tipo do botão.
6495
- *
6496
- * @default `PoButtonType.Button`
6497
- */
6498
- type = input(PoButtonType.Button, { ...(ngDevMode ? { debugName: "type" } : /* istanbul ignore next */ {}), alias: 'p-type' });
6499
- // Evento disparado ao sair do campo.
6500
- blur = new EventEmitter();
6501
- /** Ação que será executada quando o usuário clicar sobre o `po-button`. */
6502
- click = new EventEmitter();
6503
- _danger = false;
6504
- _disabled = false;
6505
- _loading = false;
6506
- _kind = PoButtonKind.secondary;
6507
- _size = undefined;
6508
- _initialSize = undefined;
6509
- hasSize = false;
6510
- /**
6511
- * @optional
6512
- *
6513
- * @description
6514
- *
6515
- * Exibe um ícone de carregamento à esquerda do _label_ do botão.
6516
- *
6517
- * > Quando esta propriedade estiver habilitada, desabilitará o botão.
6518
- *
6519
- * @default `false`
6520
- */
6521
- set loading(value) {
6522
- this._loading = convertToBoolean(value);
6523
- }
6524
- get loading() {
6525
- return this._loading;
6526
- }
6527
- /**
6528
- * @optional
6529
- *
6530
- * @description
6531
- *
6532
- * Deve ser usado em ações irreversíveis que o usuário precisa ter cuidado ao executá-la, como a exclusão de um registro.
6533
- *
6534
- * > A propriedade `p-kind="tertiary"` será inativada ao utilizar esta propriedade.
6535
- */
6536
- set danger(value) {
6537
- this._danger = this.kind !== PoButtonKind.tertiary ? value : false;
6538
- }
6539
- get danger() {
6540
- return this._danger;
6541
- }
6542
- /**
6543
- * @optional
6544
- *
6545
- * @description
6546
- *
6547
- * Define o estilo visual do componente conforme valores especificados no enum `PoButtonKind`:
6548
- * - `primary`: destaca o botão, sendo recomendado para ações principais.
6549
- * - `secondary`: estilo padrão, ideal para ações secundárias.
6550
- * - `tertiary`: exibe o botão sem preenchimento no fundo, indicado para ações opcionais.
6982
+ changeModel = new EventEmitter();
6983
+ /**
6984
+ * @optional
6551
6985
  *
6552
- * @default `secondary`
6986
+ * @description
6987
+ * Evento disparado quando uma tecla é pressionada enquanto o foco está no componente.
6988
+ * Retorna um objeto `KeyboardEvent` com informações sobre a tecla.
6553
6989
  */
6554
- set kind(value) {
6555
- this._kind = PoButtonKind[value] ? PoButtonKind[value] : PoButtonKind.secondary;
6556
- }
6557
- get kind() {
6558
- return this._kind;
6559
- }
6990
+ keydown = new EventEmitter();
6991
+ //propriedade interna recebida do checkbox-group para verificar se o checkbox está ativo, inativo ou indeterminate
6992
+ checkboxValue;
6993
+ //propriedade interna recebida do checkbox-group para verificar se o checkbox é required
6994
+ checkBoxRequired;
6995
+ //propriedade interna recebida para desabilitar o tabindex do checkbox na utilização dentro de um list-box
6996
+ disabladTabindex = false;
6997
+ displayAdditionalHelp = false;
6998
+ id = uuid();
6999
+ modelLastUpdate;
7000
+ propagateChange;
7001
+ onTouched;
7002
+ _disabled = false;
7003
+ _size = undefined;
7004
+ _initialSize = undefined;
6560
7005
  /**
6561
7006
  * @optional
6562
7007
  *
6563
7008
  * @description
6564
7009
  *
6565
- * Desabilita o `po-button` e não permite que o usuário interaja com o mesmo.
7010
+ * Define o estado do *checkbox* como desabilitado.
6566
7011
  *
6567
7012
  * @default `false`
6568
7013
  */
6569
7014
  set disabled(value) {
6570
- this._disabled = value === '' ? true : convertToBoolean(value);
7015
+ this._disabled = value;
6571
7016
  }
6572
7017
  get disabled() {
6573
7018
  return this._disabled;
@@ -6577,178 +7022,168 @@ class PoButtonBaseComponent {
6577
7022
  *
6578
7023
  * @description
6579
7024
  *
6580
- * Define um `aria-label` para o `po-button`.
7025
+ * Define o tamanho da caixa de seleção do componente:
7026
+ * - `small`: 16x16 (disponível apenas para acessibilidade AA).
7027
+ * - `medium`: 24x24.
7028
+ * - `large`: 32x32.
6581
7029
  *
6582
- * Caso esta propriedade não seja informada será considerada a label do botão.
7030
+ * > Caso a acessibilidade AA não esteja configurada, o tamanho `medium` será mantido.
7031
+ * Para mais detalhes, consulte a documentação do [po-theme](https://po-ui.io/documentation/po-theme).
7032
+ *
7033
+ * @default `medium`
6583
7034
  *
6584
- * > Em caso de botões com apenas ícone a atribuição de valor à esta propriedade é muito importante para acessibilidade.
6585
7035
  */
6586
- ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'p-aria-label' });
6587
- ariaExpanded = null;
7036
+ set size(value) {
7037
+ this._initialSize = value;
7038
+ this.applySizeBasedOnA11y();
7039
+ }
7040
+ get size() {
7041
+ return this._size ?? getDefaultSizeFn(PoCheckboxSize);
7042
+ }
6588
7043
  /**
6589
7044
  * @optional
6590
7045
  *
6591
7046
  * @description
6592
7047
  *
6593
- * Define o `tabindex` do elemento `<button>` nativo interno.
7048
+ * Define as opções do componente de ajuda (po-helper) que será exibido ao lado do label quando a propriedade `p-label` for definida, ou, ao lado do componente na ausência da propriedade `p-label`.
7049
+ * > Para mais informações acesse: https://po-ui.io/documentation/po-helper.
6594
7050
  *
6595
- * Use `[tabindex]="-1"` para remover o botão da ordem de foco do teclado.
7051
+ * > Ao configurar esta propriedade, o antigo ícone de ajuda adicional (`p-additional-help-tooltip` e `p-additional-help`) será ignorado.
6596
7052
  */
6597
- tabindex = null;
7053
+ poHelperComponent = input(undefined, { ...(ngDevMode ? { debugName: "poHelperComponent" } : /* istanbul ignore next */ {}), alias: 'p-helper' });
6598
7054
  /**
6599
7055
  * @optional
6600
7056
  *
6601
7057
  * @description
6602
7058
  *
6603
- * Define o tamanho do componente:
6604
- * - `small`: altura de 32px (disponível apenas para acessibilidade AA).
6605
- * - `medium`: altura de 44px.
6606
- * - `large`: altura de 56px.
6607
- *
6608
- * > Caso a acessibilidade AA não esteja configurada, o tamanho `medium` será mantido.
6609
- * Para mais detalhes, consulte a documentação do [po-theme](https://po-ui.io/documentation/po-theme).
7059
+ * Habilita a quebra automática do texto da propriedade `p-label`. Quando `p-label-text-wrap` for verdadeiro, o texto que excede
7060
+ * o espaço disponível é transferido para a próxima linha em pontos apropriados para uma
7061
+ * leitura clara.
6610
7062
  *
6611
- * @default `medium`
7063
+ * @default `false`
6612
7064
  */
6613
- set size(value) {
6614
- this._initialSize = value;
6615
- this.applySizeBasedOnA11y();
6616
- }
6617
- get size() {
6618
- return this._size ?? getDefaultSizeFn(PoButtonSize);
7065
+ labelTextWrap = input(false, { ...(ngDevMode ? { debugName: "labelTextWrap" } : /* istanbul ignore next */ {}), alias: 'p-label-text-wrap' });
7066
+ constructor(cd) {
7067
+ this.cd = cd;
6619
7068
  }
6620
7069
  onThemeChange() {
6621
7070
  this.applySizeBasedOnA11y();
6622
7071
  }
7072
+ changeValue() {
7073
+ if (this.propagateChange) {
7074
+ this.propagateChange(this.checkboxValue);
7075
+ }
7076
+ this.change.emit(this.checkboxValue);
7077
+ this.controlChangeModelEmitter(this.checkboxValue);
7078
+ }
7079
+ checkOption(event, value) {
7080
+ const target = event.target;
7081
+ if (target.closest('po-helper')) {
7082
+ return;
7083
+ }
7084
+ if (!this.disabled) {
7085
+ value === 'mixed' ? this.changeModelValue(true) : this.changeModelValue(!value);
7086
+ this.changeValue();
7087
+ }
7088
+ }
7089
+ // Função implementada do ControlValueAccessor
7090
+ // Usada para interceptar os estados de habilitado via forms api
7091
+ setDisabledState(isDisabled) {
7092
+ this.disabled = isDisabled;
7093
+ this.cd.markForCheck();
7094
+ }
7095
+ registerOnChange(fn) {
7096
+ this.propagateChange = fn;
7097
+ }
7098
+ registerOnTouched(fn) {
7099
+ this.onTouched = fn;
7100
+ }
7101
+ writeValue(value) {
7102
+ if (value !== this.checkboxValue) {
7103
+ this.changeModelValue(value);
7104
+ }
7105
+ if (value != null) {
7106
+ this.controlChangeModelEmitter(this.checkboxValue);
7107
+ }
7108
+ }
7109
+ controlChangeModelEmitter(value) {
7110
+ if (this.modelLastUpdate !== value) {
7111
+ this.changeModel.emit(value);
7112
+ this.modelLastUpdate = value;
7113
+ }
7114
+ }
6623
7115
  applySizeBasedOnA11y() {
6624
- const size = validateSizeFn(this._initialSize, PoButtonSize);
7116
+ const size = validateSizeFn(this._initialSize, PoCheckboxSize);
6625
7117
  this._size = size;
6626
7118
  }
6627
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoButtonBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6628
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.25", type: PoButtonBaseComponent, isStandalone: false, selector: "po-button-base", inputs: { label: { classPropertyName: "label", publicName: "p-label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "p-icon", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "p-type", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "p-loading", isSignal: false, isRequired: false, transformFunction: null }, danger: { classPropertyName: "danger", publicName: "p-danger", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, kind: { classPropertyName: "kind", publicName: "p-kind", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "p-disabled", isSignal: false, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "p-aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaExpanded: { classPropertyName: "ariaExpanded", publicName: "p-aria-expanded", isSignal: false, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "p-tabindex", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { blur: "p-blur", click: "p-click" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-danger": "this.danger", "attr.p-kind": "this.kind", "attr.p-size": "this.size" } }, ngImport: i0, template: '', isInline: true });
7119
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoCheckboxBaseComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
7120
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.25", type: PoCheckboxBaseComponent, isStandalone: false, selector: "po-checkbox-base", inputs: { additionalHelpEventTrigger: { classPropertyName: "additionalHelpEventTrigger", publicName: "additionalHelpEventTrigger", isSignal: false, isRequired: false, transformFunction: null }, additionalHelpTooltip: { classPropertyName: "additionalHelpTooltip", publicName: "p-additional-help-tooltip", isSignal: false, isRequired: false, transformFunction: null }, appendBox: { classPropertyName: "appendBox", publicName: "p-append-in-body", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, compactLabel: { classPropertyName: "compactLabel", publicName: "p-compact-label", isSignal: true, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "p-help", isSignal: false, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: false, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "p-auto-focus", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, label: { classPropertyName: "label", publicName: "p-label", isSignal: false, isRequired: false, transformFunction: null }, checkboxValue: { classPropertyName: "checkboxValue", publicName: "p-checkboxValue", isSignal: false, isRequired: false, transformFunction: null }, checkBoxRequired: { classPropertyName: "checkBoxRequired", publicName: "p-required", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, disabladTabindex: { classPropertyName: "disabladTabindex", publicName: "p-disabled-tabindex", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, disabled: { classPropertyName: "disabled", publicName: "p-disabled", isSignal: false, isRequired: false, transformFunction: convertToBoolean }, size: { classPropertyName: "size", publicName: "p-size", isSignal: false, isRequired: false, transformFunction: null }, poHelperComponent: { classPropertyName: "poHelperComponent", publicName: "p-helper", isSignal: true, isRequired: false, transformFunction: null }, labelTextWrap: { classPropertyName: "labelTextWrap", publicName: "p-label-text-wrap", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { additionalHelp: "p-additional-help", blur: "p-blur", change: "p-change", changeModel: "p-change-model", keydown: "p-keydown" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-size": "this.size" } }, ngImport: i0, template: '', isInline: true });
6629
7121
  }
6630
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoButtonBaseComponent, decorators: [{
7122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoCheckboxBaseComponent, decorators: [{
6631
7123
  type: Component,
6632
7124
  args: [{
6633
- selector: 'po-button-base',
7125
+ selector: 'po-checkbox-base',
6634
7126
  template: '',
6635
7127
  standalone: false
6636
7128
  }]
6637
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-icon", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-type", required: false }] }], blur: [{
7129
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { additionalHelpEventTrigger: [{
7130
+ type: Input
7131
+ }], additionalHelpTooltip: [{
7132
+ type: Input,
7133
+ args: ['p-additional-help-tooltip']
7134
+ }], appendBox: [{
7135
+ type: Input,
7136
+ args: [{ alias: 'p-append-in-body', transform: convertToBoolean }]
7137
+ }], compactLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-compact-label", required: false }] }], help: [{
7138
+ type: Input,
7139
+ args: ['p-help']
7140
+ }], name: [{
7141
+ type: Input,
7142
+ args: ['name']
7143
+ }], autoFocus: [{
7144
+ type: Input,
7145
+ args: [{ alias: 'p-auto-focus', transform: convertToBoolean }]
7146
+ }], label: [{
7147
+ type: Input,
7148
+ args: ['p-label']
7149
+ }], additionalHelp: [{
7150
+ type: Output,
7151
+ args: ['p-additional-help']
7152
+ }], blur: [{
6638
7153
  type: Output,
6639
7154
  args: ['p-blur']
6640
- }], click: [{
7155
+ }], change: [{
6641
7156
  type: Output,
6642
- args: ['p-click']
6643
- }], loading: [{
7157
+ args: ['p-change']
7158
+ }], changeModel: [{
7159
+ type: Output,
7160
+ args: ['p-change-model']
7161
+ }], keydown: [{
7162
+ type: Output,
7163
+ args: ['p-keydown']
7164
+ }], checkboxValue: [{
6644
7165
  type: Input,
6645
- args: ['p-loading']
6646
- }], danger: [{
6647
- type: HostBinding,
6648
- args: ['attr.p-danger']
6649
- }, {
7166
+ args: ['p-checkboxValue']
7167
+ }], checkBoxRequired: [{
6650
7168
  type: Input,
6651
- args: [{ alias: 'p-danger', transform: convertToBoolean }]
6652
- }], kind: [{
6653
- type: HostBinding,
6654
- args: ['attr.p-kind']
6655
- }, {
7169
+ args: [{ alias: 'p-required', transform: convertToBoolean }]
7170
+ }], disabladTabindex: [{
6656
7171
  type: Input,
6657
- args: ['p-kind']
7172
+ args: [{ alias: 'p-disabled-tabindex', transform: convertToBoolean }]
6658
7173
  }], disabled: [{
6659
7174
  type: Input,
6660
- args: ['p-disabled']
6661
- }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-aria-label", required: false }] }], ariaExpanded: [{
6662
- type: Input,
6663
- args: ['p-aria-expanded']
6664
- }], tabindex: [{
6665
- type: Input,
6666
- args: ['p-tabindex']
7175
+ args: [{ alias: 'p-disabled', transform: convertToBoolean }]
6667
7176
  }], size: [{
6668
7177
  type: Input,
6669
7178
  args: ['p-size']
6670
7179
  }, {
6671
7180
  type: HostBinding,
6672
7181
  args: ['attr.p-size']
6673
- }], onThemeChange: [{
7182
+ }], poHelperComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-helper", required: false }] }], labelTextWrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-label-text-wrap", required: false }] }], onThemeChange: [{
6674
7183
  type: HostListener,
6675
7184
  args: ['window:PoUiThemeChange']
6676
7185
  }] } });
6677
7186
 
6678
- /**
6679
- * @docsExtends PoButtonBaseComponent
6680
- *
6681
- * @example
6682
- *
6683
- * <example name="po-button-basic" title="PO Button Basic">
6684
- * <file name="sample-po-button-basic/sample-po-button-basic.component.html"> </file>
6685
- * <file name="sample-po-button-basic/sample-po-button-basic.component.ts"> </file>
6686
- * </example>
6687
- *
6688
- * <example name="po-button-labs" title="PO Button Labs">
6689
- * <file name="sample-po-button-labs/sample-po-button-labs.component.html"> </file>
6690
- * <file name="sample-po-button-labs/sample-po-button-labs.component.ts"> </file>
6691
- * </example>
6692
- *
6693
- * <example name="po-button-social-network" title="PO Button Social Network">
6694
- * <file name="sample-po-button-social-network/sample-po-button-social-network.component.html"> </file>
6695
- * <file name="sample-po-button-social-network/sample-po-button-social-network.component.ts"> </file>
6696
- * </example>
6697
- */
6698
- class PoButtonComponent extends PoButtonBaseComponent {
6699
- elementRef;
6700
- buttonElement;
6701
- constructor(elementRef) {
6702
- super();
6703
- this.elementRef = elementRef;
6704
- }
6705
- onBlur() {
6706
- this.blur.emit();
6707
- }
6708
- /**
6709
- * Função que atribui foco ao componente.
6710
- *
6711
- * Para utilizá-la é necessário ter a instância do componente no DOM, podendo ser utilizado o ViewChild da seguinte forma:
6712
- *
6713
- * ```
6714
- * import { PoButtonComponent } from '@po-ui/ng-components';
6715
- *
6716
- * ...
6717
- *
6718
- * @ViewChild(PoButtonComponent, { static: true }) button: PoButtonComponent;
6719
- *
6720
- * focusButton() {
6721
- * this.button.focus();
6722
- * }
6723
- * ```
6724
- */
6725
- focus() {
6726
- if (!this.disabled) {
6727
- this.buttonElement.nativeElement.focus();
6728
- }
6729
- }
6730
- mapSizeToIcon(size) {
6731
- const sizeMap = {
6732
- small: 'xs',
6733
- medium: 'sm',
6734
- large: 'sm'
6735
- };
6736
- return sizeMap[size] || 'sm';
6737
- }
6738
- onClick() {
6739
- this.click.emit(null);
6740
- }
6741
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoButtonComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
6742
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PoButtonComponent, isStandalone: false, selector: "po-button", viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<button\n #button\n class=\"po-button\"\n [type]=\"type()\"\n [attr.p-kind]=\"kind\"\n [attr.p-danger]=\"danger\"\n [disabled]=\"disabled || loading\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.tabindex]=\"tabindex\"\n (blur)=\"onBlur()\"\n (click)=\"onClick()\"\n>\n @if (loading) {\n <div class=\"po-button-loading-icon\">\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n }\n\n <div class=\"po-button-container\">\n @if (icon()) {\n <po-icon class=\"po-button-icon\" [p-icon]=\"icon()\"></po-icon>\n }\n @if (label()) {\n <span class=\"po-button-label\">{{ label() }}</span>\n }\n </div>\n</button>\n", dependencies: [{ kind: "component", type: PoLoadingIconComponent, selector: "po-loading-icon", inputs: ["p-neutral-color", "p-size", "p-in-overlay"] }, { kind: "component", type: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6743
- }
6744
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoButtonComponent, decorators: [{
6745
- type: Component,
6746
- args: [{ selector: 'po-button', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<button\n #button\n class=\"po-button\"\n [type]=\"type()\"\n [attr.p-kind]=\"kind\"\n [attr.p-danger]=\"danger\"\n [disabled]=\"disabled || loading\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.tabindex]=\"tabindex\"\n (blur)=\"onBlur()\"\n (click)=\"onClick()\"\n>\n @if (loading) {\n <div class=\"po-button-loading-icon\">\n <po-loading-icon [p-size]=\"mapSizeToIcon(size)\"></po-loading-icon>\n </div>\n }\n\n <div class=\"po-button-container\">\n @if (icon()) {\n <po-icon class=\"po-button-icon\" [p-icon]=\"icon()\"></po-icon>\n }\n @if (label()) {\n <span class=\"po-button-label\">{{ label() }}</span>\n }\n </div>\n</button>\n" }]
6747
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { buttonElement: [{
6748
- type: ViewChild,
6749
- args: ['button', { static: true }]
6750
- }] } });
6751
-
6752
7187
  class PoOverlayModule {
6753
7188
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoOverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
6754
7189
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: PoOverlayModule, declarations: [PoOverlayComponent], imports: [CommonModule], exports: [PoOverlayComponent] });
@@ -9140,10 +9575,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
9140
9575
  args: ['p-placeholder']
9141
9576
  }] } });
9142
9577
 
9578
+ const PO_LISTBOX_ROOT_KEY = 'ROOT';
9143
9579
  class PoListBoxComponent extends PoListBoxBaseComponent {
9144
9580
  element = inject(ElementRef);
9145
9581
  currentItems = [];
9146
9582
  currentGroup = null;
9583
+ subItemsLoading = signal({}, ...(ngDevMode ? [{ debugName: "subItemsLoading" }] : /* istanbul ignore next */ []));
9584
+ subItemsError = signal({}, ...(ngDevMode ? [{ debugName: "subItemsError" }] : /* istanbul ignore next */ []));
9585
+ subItemsSkeletonPlaceholders = Array.from({ length: 3 }, (_, index) => index);
9586
+ rootLazyLoad;
9587
+ rootItemsLoad = new EventEmitter();
9588
+ contentChange = new EventEmitter();
9589
+ loadedSubItems = {};
9590
+ lastLoadedGroup = null;
9591
+ rootLoaded = false;
9592
+ destroySubItems$ = new Subject();
9147
9593
  navigationStack = [];
9148
9594
  renderer = inject(Renderer2);
9149
9595
  router = inject(Router);
@@ -9171,6 +9617,9 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
9171
9617
  ngOnInit() {
9172
9618
  if (this.listboxSubitems) {
9173
9619
  this.currentItems = this.items;
9620
+ if (this.rootLazyLoad && !this.rootLoaded) {
9621
+ this.loadRootItemsAsync();
9622
+ }
9174
9623
  }
9175
9624
  }
9176
9625
  ngAfterViewInit() {
@@ -9179,7 +9628,7 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
9179
9628
  this.listboxItemList?.nativeElement.focus();
9180
9629
  if (this.listboxSubitems) {
9181
9630
  requestAnimationFrame(() => {
9182
- const firstItem = this.listboxItems?.first.nativeElement;
9631
+ const firstItem = this.listboxItems?.first?.nativeElement;
9183
9632
  if (firstItem) {
9184
9633
  firstItem.focus();
9185
9634
  setTimeout(() => {
@@ -9203,15 +9652,169 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
9203
9652
  if (this.subscriptionScrollEvent?.unsubscribe) {
9204
9653
  this.subscriptionScrollEvent.unsubscribe();
9205
9654
  }
9655
+ this.destroySubItems$.next();
9656
+ this.destroySubItems$.complete();
9206
9657
  }
9207
9658
  openGroup(group, event) {
9208
9659
  event?.stopPropagation();
9660
+ const key = this.getGroupKey(group);
9661
+ if (this.subItemsLoading()[key]) {
9662
+ return;
9663
+ }
9209
9664
  this.navigationStack.push({
9210
9665
  group: this.currentGroup,
9211
9666
  items: this.currentItems
9212
9667
  });
9213
9668
  this.currentGroup = group;
9214
- this.currentItems = group.subItems || [];
9669
+ if (typeof group.subItemsLazy === 'function') {
9670
+ this.loadSubItemsAsync(group, key);
9671
+ }
9672
+ else {
9673
+ this.currentItems = group.subItems || [];
9674
+ this.focusGroupHeader();
9675
+ }
9676
+ }
9677
+ loadSubItemsAsync(group, key) {
9678
+ if (this.loadedSubItems[key]) {
9679
+ this.currentItems = this.loadedSubItems[key];
9680
+ this.clearSubItemsState(key);
9681
+ this.focusGroupHeader();
9682
+ return;
9683
+ }
9684
+ this.currentItems = [];
9685
+ this.setSubItemsState(this.subItemsLoading, key, true);
9686
+ this.setSubItemsState(this.subItemsError, key, false);
9687
+ this.lastLoadedGroup = group;
9688
+ this.subItemsLoad.emit(group);
9689
+ this.focusGroupHeader();
9690
+ const request$ = group.subItemsLazy(group);
9691
+ request$
9692
+ .pipe(takeUntil(this.destroySubItems$), finalize(() => {
9693
+ this.setSubItemsState(this.subItemsLoading, key, false);
9694
+ this.changeDetector.detectChanges();
9695
+ this.contentChange.emit();
9696
+ }))
9697
+ .subscribe({
9698
+ next: subItems => {
9699
+ if (this.currentGroup !== group) {
9700
+ return;
9701
+ }
9702
+ const items = Array.isArray(subItems) ? subItems : [];
9703
+ this.loadedSubItems[key] = items;
9704
+ this.currentItems = items;
9705
+ this.setSubItemsState(this.subItemsError, key, false);
9706
+ this.focusGroupHeader();
9707
+ },
9708
+ error: () => {
9709
+ if (this.currentGroup !== group) {
9710
+ return;
9711
+ }
9712
+ this.setSubItemsState(this.subItemsError, key, true);
9713
+ this.focusGroupHeader();
9714
+ }
9715
+ });
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
+ }
9727
+ retrySubItems(event) {
9728
+ event?.stopPropagation();
9729
+ if (!this.currentGroup) {
9730
+ this.retryRootItems(event);
9731
+ return;
9732
+ }
9733
+ const group = this.lastLoadedGroup;
9734
+ if (!group || typeof group.subItemsLazy !== 'function') {
9735
+ return;
9736
+ }
9737
+ const key = this.getGroupKey(group);
9738
+ delete this.loadedSubItems[key];
9739
+ this.loadSubItemsAsync(group, key);
9740
+ }
9741
+ loadRootItemsAsync() {
9742
+ if (!this.rootLazyLoad) {
9743
+ return;
9744
+ }
9745
+ const key = PO_LISTBOX_ROOT_KEY;
9746
+ if (this.subItemsLoading()[key]) {
9747
+ return;
9748
+ }
9749
+ if (this.rootLoaded && this.loadedSubItems[key]) {
9750
+ this.currentItems = this.loadedSubItems[key];
9751
+ this.clearSubItemsState(key);
9752
+ return;
9753
+ }
9754
+ this.currentItems = [];
9755
+ this.setSubItemsState(this.subItemsLoading, key, true);
9756
+ this.setSubItemsState(this.subItemsError, key, false);
9757
+ this.rootItemsLoad.emit();
9758
+ this.rootLazyLoad()
9759
+ .pipe(takeUntil(this.destroySubItems$), finalize(() => {
9760
+ this.setSubItemsState(this.subItemsLoading, key, false);
9761
+ this.changeDetector.detectChanges();
9762
+ this.contentChange.emit();
9763
+ }))
9764
+ .subscribe({
9765
+ next: items => {
9766
+ const resolved = Array.isArray(items) ? items : [];
9767
+ this.loadedSubItems[key] = resolved;
9768
+ this.currentItems = resolved;
9769
+ this.rootLoaded = true;
9770
+ this.setSubItemsState(this.subItemsError, key, false);
9771
+ },
9772
+ error: () => {
9773
+ this.setSubItemsState(this.subItemsError, key, true);
9774
+ }
9775
+ });
9776
+ }
9777
+ retryRootItems(event) {
9778
+ event?.stopPropagation();
9779
+ this.rootLoaded = false;
9780
+ delete this.loadedSubItems[PO_LISTBOX_ROOT_KEY];
9781
+ this.loadRootItemsAsync();
9782
+ }
9783
+ isRootLoading() {
9784
+ return !!this.subItemsLoading()[PO_LISTBOX_ROOT_KEY];
9785
+ }
9786
+ isRootError() {
9787
+ return !!this.subItemsError()[PO_LISTBOX_ROOT_KEY];
9788
+ }
9789
+ isSubItemsLoading(group) {
9790
+ return !!group && !!this.subItemsLoading()[this.getGroupKey(group)];
9791
+ }
9792
+ isSubItemsError(group) {
9793
+ return !!group && !!this.subItemsError()[this.getGroupKey(group)];
9794
+ }
9795
+ isFunction(value) {
9796
+ return typeof value === 'function';
9797
+ }
9798
+ isGroupItem(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
+ }
9804
+ getGroupKey(group) {
9805
+ if (!group.$id) {
9806
+ group.$id = uuid();
9807
+ }
9808
+ return group.$id;
9809
+ }
9810
+ setSubItemsState(state, key, value) {
9811
+ state.update(current => ({ ...current, [key]: value }));
9812
+ }
9813
+ clearSubItemsState(key) {
9814
+ this.setSubItemsState(this.subItemsLoading, key, false);
9815
+ this.setSubItemsState(this.subItemsError, key, false);
9816
+ }
9817
+ focusGroupHeader() {
9215
9818
  requestAnimationFrame(() => {
9216
9819
  const firstItem = this.listboxGroupHeader?.nativeElement;
9217
9820
  if (firstItem) {
@@ -9245,13 +9848,20 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
9245
9848
  });
9246
9849
  }
9247
9850
  onKeydownGoBack(event, currentGroup) {
9248
- if (event.key === 'Enter') {
9851
+ if (event.key === 'Enter' || event.code === 'ArrowLeft') {
9249
9852
  this.goBack(event);
9250
9853
  }
9251
- if (event?.code === 'Escape' || event.code === 'Tab') {
9854
+ if (event?.code === 'Escape') {
9855
+ this.closeEvent.emit({ reason: 'escape', origin: 'keyboard' });
9856
+ return;
9857
+ }
9858
+ if (event.code === 'Tab') {
9252
9859
  if (event.code === 'Tab' && !event.shiftKey && currentGroup?.$subItemTemplate) {
9253
9860
  return;
9254
9861
  }
9862
+ if (!event.shiftKey && currentGroup && this.isSubItemsError(currentGroup)) {
9863
+ return;
9864
+ }
9255
9865
  this.closeEvent.emit();
9256
9866
  }
9257
9867
  }
@@ -9284,7 +9894,7 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
9284
9894
  if (itemListAction?.url && !isDisabled && isVisible) {
9285
9895
  return this.openUrl(itemListAction.url);
9286
9896
  }
9287
- if (itemListAction?.subItems?.length || itemListAction?.$subItemTemplate) {
9897
+ if (this.hasSubItems(itemListAction)) {
9288
9898
  this.openGroup(itemListAction, event);
9289
9899
  }
9290
9900
  else if (this.listboxSubitems) {
@@ -9301,33 +9911,54 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
9301
9911
  }
9302
9912
  onKeyDown(itemListAction, event) {
9303
9913
  event?.preventDefault();
9914
+ if (event?.code === 'ArrowRight') {
9915
+ this.handleArrowRightKey(itemListAction, event);
9916
+ return;
9917
+ }
9918
+ if (event?.code === 'ArrowLeft' && this.listboxSubitems && this.currentGroup) {
9919
+ this.goBack(event);
9920
+ return;
9921
+ }
9304
9922
  if ((event && event.code === 'Enter') || event.code === 'Space') {
9305
- if (itemListAction.type === 'footerAction') {
9306
- this.handleFooterActionListbox();
9307
- return;
9308
- }
9309
- // Cenário em que o `Po-Search` (com listbox) tem nos items ação ou url
9310
- if (this.type === 'option' && (itemListAction?.action || itemListAction?.url)) {
9311
- this.onSelectItem(itemListAction);
9312
- this.optionClicked(itemListAction);
9313
- return;
9314
- }
9315
- switch (this.type) {
9316
- case 'check':
9317
- this.onSelectCheckBoxItem(itemListAction);
9318
- break;
9319
- case 'option':
9320
- this.optionClicked(itemListAction);
9321
- break;
9322
- case 'action':
9323
- this.onSelectItem(itemListAction);
9324
- break;
9325
- }
9923
+ this.handleEnterOrSpaceKey(itemListAction);
9924
+ return;
9925
+ }
9926
+ if (event?.code === 'Escape') {
9927
+ this.closeEvent.emit({ reason: 'escape', origin: 'keyboard' });
9928
+ return;
9326
9929
  }
9327
- if ((event && event.code === 'Escape') || event.code === 'Tab') {
9930
+ if (event.code === 'Tab') {
9328
9931
  this.closeEvent.emit();
9329
9932
  }
9330
9933
  }
9934
+ handleArrowRightKey(itemListAction, event) {
9935
+ if (this.hasSubItems(itemListAction)) {
9936
+ this.onSelectItem(itemListAction, event);
9937
+ }
9938
+ }
9939
+ handleEnterOrSpaceKey(itemListAction) {
9940
+ if (itemListAction.type === 'footerAction') {
9941
+ this.handleFooterActionListbox();
9942
+ return;
9943
+ }
9944
+ // Cenário em que o `Po-Search` (com listbox) tem nos items ação ou url
9945
+ if (this.type === 'option' && (itemListAction?.action || itemListAction?.url)) {
9946
+ this.onSelectItem(itemListAction);
9947
+ this.optionClicked(itemListAction);
9948
+ return;
9949
+ }
9950
+ switch (this.type) {
9951
+ case 'check':
9952
+ this.onSelectCheckBoxItem(itemListAction);
9953
+ break;
9954
+ case 'option':
9955
+ this.optionClicked(itemListAction);
9956
+ break;
9957
+ case 'action':
9958
+ this.onSelectItem(itemListAction);
9959
+ break;
9960
+ }
9961
+ }
9331
9962
  checkboxClicked({ option, selected }) {
9332
9963
  if (this.type === 'check') {
9333
9964
  this.change.emit({ selected, option });
@@ -9508,12 +10139,21 @@ class PoListBoxComponent extends PoListBoxBaseComponent {
9508
10139
  this.closeEvent.emit();
9509
10140
  }
9510
10141
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoListBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9511
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PoListBoxComponent, isStandalone: false, selector: "po-listbox", viewQueries: [{ propertyName: "listbox", first: true, predicate: ["listbox"], descendants: true, static: true }, { propertyName: "listboxItemList", first: true, predicate: ["listboxItemList"], descendants: true }, { propertyName: "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 @for (item of currentItems; track item) {\n <li\n #listboxItem\n [class.po-listbox-item]=\"visible()\"\n [cdkOption]=\"item[fieldLabel]\"\n [cdkOptionDisabled]=\"returnBooleanValue(item, 'disabled') || returnBooleanValue(item, 'visible') === false\"\n [attr.aria-selected]=\"isSelectedItem(item) || item.selected\"\n (click)=\"onSelectItem(item, $event)\"\n (keydown)=\"onKeyDown(item, $event)\"\n >\n @if (item.subItems?.length || 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 @if (currentGroup) {\n <li\n #listboxGroupHeader\n class=\"po-listbox-group-header\"\n [cdkOption]=\"'back-option'\"\n [attr.aria-label]=\"literals?.backToPreviousGroup\"\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 {\n @for (subItem of currentItems; track subItem.label) {\n @if (subItem.subItems?.length) {\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: PoIconComponent, selector: "po-icon", inputs: ["p-icon"] }, { kind: "component", type: PoLoadingOverlayComponent, selector: "po-loading-overlay" }, { kind: "component", type: PoTagComponent, selector: "po-tag" }, { kind: "directive", type: i5.CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: i5.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"] }] });
9512
10143
  }
9513
10144
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoListBoxComponent, decorators: [{
9514
10145
  type: Component,
9515
- 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 @for (item of currentItems; track item) {\n <li\n #listboxItem\n [class.po-listbox-item]=\"visible()\"\n [cdkOption]=\"item[fieldLabel]\"\n [cdkOptionDisabled]=\"returnBooleanValue(item, 'disabled') || returnBooleanValue(item, 'visible') === false\"\n [attr.aria-selected]=\"isSelectedItem(item) || item.selected\"\n (click)=\"onSelectItem(item, $event)\"\n (keydown)=\"onKeyDown(item, $event)\"\n >\n @if (item.subItems?.length || 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 @if (currentGroup) {\n <li\n #listboxGroupHeader\n class=\"po-listbox-group-header\"\n [cdkOption]=\"'back-option'\"\n [attr.aria-label]=\"literals?.backToPreviousGroup\"\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 {\n @for (subItem of currentItems; track subItem.label) {\n @if (subItem.subItems?.length) {\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" }]
9516
- }], ctorParameters: () => [], propDecorators: { listbox: [{
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" }]
10147
+ }], ctorParameters: () => [], propDecorators: { rootLazyLoad: [{
10148
+ type: Input,
10149
+ args: ['p-root-lazy-load']
10150
+ }], rootItemsLoad: [{
10151
+ type: Output,
10152
+ args: ['p-root-items-load']
10153
+ }], contentChange: [{
10154
+ type: Output,
10155
+ args: ['p-content-change']
10156
+ }], listbox: [{
9517
10157
  type: ViewChild,
9518
10158
  args: ['listbox', { static: true }]
9519
10159
  }], listboxItemList: [{
@@ -9539,6 +10179,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
9539
10179
  args: [CdkOption]
9540
10180
  }] } });
9541
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
+ };
9542
10202
  /**
9543
10203
  *
9544
10204
  * @docsExtends PoPopupBaseComponent
@@ -9571,6 +10231,8 @@ class PoPopupComponent extends PoPopupBaseComponent {
9571
10231
  changeDetector = inject(ChangeDetectorRef);
9572
10232
  popupRef;
9573
10233
  listbox;
10234
+ popupOffset = 8;
10235
+ viewportMargin = 8;
9574
10236
  //utilizado apenas no theme builder
9575
10237
  poListBoxRef;
9576
10238
  ngAfterViewInit() {
@@ -9583,10 +10245,13 @@ class PoPopupComponent extends PoPopupBaseComponent {
9583
10245
  *
9584
10246
  * > Por padrão, este comportamento é acionado somente ao clicar fora do componente ou em determinada ação / url.
9585
10247
  */
9586
- close() {
10248
+ close(closeEvent) {
9587
10249
  this.removeListeners();
9588
10250
  this.showPopup = false;
9589
10251
  this.closeEvent.emit();
10252
+ if (closeEvent?.reason === 'escape') {
10253
+ this.focusTarget();
10254
+ }
9590
10255
  }
9591
10256
  onActionClick(popupAction) {
9592
10257
  const actionNoDisabled = popupAction && !this.returnBooleanValue(popupAction, 'disabled');
@@ -9609,8 +10274,8 @@ class PoPopupComponent extends PoPopupBaseComponent {
9609
10274
  this.param = param;
9610
10275
  this.showPopup = true;
9611
10276
  this.changeDetector.detectChanges();
9612
- this.validateInitialContent();
9613
10277
  this.openEvent.emit();
10278
+ this.validateInitialContent();
9614
10279
  }
9615
10280
  returnBooleanValue(popupAction, property) {
9616
10281
  return PoUtils.isTypeof(popupAction[property], 'function')
@@ -9636,7 +10301,19 @@ class PoPopupComponent extends PoPopupBaseComponent {
9636
10301
  this.validateInitialContent();
9637
10302
  }
9638
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
+ }
9639
10313
  checkAllActionIsInvisible() {
10314
+ if (this.rootLazyLoad && !this.actions.length) {
10315
+ return false;
10316
+ }
9640
10317
  if (this.actions.every(item => item.visible === false)) {
9641
10318
  return true;
9642
10319
  }
@@ -9651,11 +10328,24 @@ class PoPopupComponent extends PoPopupBaseComponent {
9651
10328
  const popupHeaderTemplate = this.popupRef && this.popupRef.nativeElement.querySelector('[p-popup-header-template]');
9652
10329
  return !(popupHeaderTemplate && popupHeaderTemplate.contains(event.target));
9653
10330
  }
10331
+ isEventInsideElement(event, element) {
10332
+ if (!element) {
10333
+ return false;
10334
+ }
10335
+ const path = typeof event.composedPath === 'function' ? event.composedPath() : [];
10336
+ return path.length ? path.includes(element) : element.contains(event.target);
10337
+ }
9654
10338
  clickedOutTarget(event) {
9655
- return this.target && !this.target.contains(event.target);
10339
+ return this.target && !this.isEventInsideElement(event, this.target);
10340
+ }
10341
+ clickedOutPopup(event) {
10342
+ return this.popupRef?.nativeElement && !this.isEventInsideElement(event, this.popupRef.nativeElement);
9656
10343
  }
9657
10344
  closePopupOnClickout(event) {
9658
- if (this.clickedOutTarget(event) && this.clickedOutDisabledItem(event) && this.clickedOutHeaderTemplate(event)) {
10345
+ if (this.clickedOutTarget(event) &&
10346
+ this.clickedOutPopup(event) &&
10347
+ this.clickedOutDisabledItem(event) &&
10348
+ this.clickedOutHeaderTemplate(event)) {
9659
10349
  this.close();
9660
10350
  }
9661
10351
  }
@@ -9697,28 +10387,107 @@ class PoPopupComponent extends PoPopupBaseComponent {
9697
10387
  }
9698
10388
  window.removeEventListener('scroll', this.onScroll, true);
9699
10389
  }
9700
- setPosition() {
10390
+ setPosition(preferredPositions) {
9701
10391
  if (this.listbox.nativeElement.querySelector('.po-listbox')) {
9702
- this.poControlPosition.setElements(this.popupRef.nativeElement, 8, this.target, this.customPositions, false, this.isCornerAlign);
10392
+ const customPositions = this.resolvePositions(preferredPositions);
10393
+ this.poControlPosition.setElements(this.popupRef.nativeElement, this.popupOffset, this.target, customPositions, false, this.isCornerAlign);
10394
+ this.poControlPosition.adjustPosition(this.position);
10395
+ this.arrowDirection = this.poControlPosition.getArrowDirection();
10396
+ this.clampHeightToViewport();
10397
+ }
10398
+ }
10399
+ resolvePositions(preferredPositions) {
10400
+ if (preferredPositions?.length) {
10401
+ return preferredPositions;
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`);
9703
10439
  this.poControlPosition.adjustPosition(this.position);
9704
10440
  this.arrowDirection = this.poControlPosition.getArrowDirection();
9705
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)];
9706
10469
  }
9707
10470
  validateInitialContent() {
9708
10471
  if (this.hasContentToShow()) {
9709
10472
  this.setPosition();
9710
10473
  this.initializeListeners();
9711
10474
  }
9712
- else {
10475
+ else if (!this.rootLazyLoad) {
9713
10476
  this.close();
9714
10477
  }
9715
10478
  }
10479
+ focusTarget() {
10480
+ const focusableTarget = this.target;
10481
+ if (focusableTarget && typeof focusableTarget.focus === 'function') {
10482
+ focusableTarget.focus();
10483
+ }
10484
+ }
9716
10485
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
9717
- 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 && !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-close)=\"close()\"\n (p-click-item)=\"onClickItem($event)\"\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" }] });
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"] }] });
9718
10487
  }
9719
10488
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoPopupComponent, decorators: [{
9720
10489
  type: Component,
9721
- args: [{ selector: 'po-popup', providers: [PoControlPositionService], standalone: false, template: "@if (showPopup && actions.length && !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-close)=\"close()\"\n (p-click-item)=\"onClickItem($event)\"\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" }]
9722
10491
  }], propDecorators: { popupRef: [{
9723
10492
  type: ViewChild,
9724
10493
  args: ['popupRef', { read: ElementRef }]
@@ -10062,6 +10831,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
10062
10831
  args: ['popup']
10063
10832
  }] } });
10064
10833
 
10834
+ /**
10835
+ * @description
10836
+ *
10837
+ * Módulo do componente po-skeleton.
10838
+ */
10839
+ class PoSkeletonModule {
10840
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10841
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonModule, declarations: [PoSkeletonComponent], imports: [CommonModule], exports: [PoSkeletonComponent] });
10842
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonModule, imports: [CommonModule] });
10843
+ }
10844
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonModule, decorators: [{
10845
+ type: NgModule,
10846
+ args: [{
10847
+ imports: [CommonModule],
10848
+ declarations: [PoSkeletonComponent],
10849
+ exports: [PoSkeletonComponent]
10850
+ }]
10851
+ }] });
10852
+
10065
10853
  class PoLabelModule {
10066
10854
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10067
10855
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: PoLabelModule, declarations: [PoLabelComponent], imports: [CommonModule, PoHelperModule], exports: [PoLabelComponent] });
@@ -10111,15 +10899,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
10111
10899
 
10112
10900
  class PoListBoxModule {
10113
10901
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoListBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10114
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: PoListBoxModule, declarations: [PoListBoxComponent, PoItemListComponent, PoSearchListComponent], imports: [CommonModule, PoCheckboxModule, PoIconModule, PoLoadingModule, PoTagModule, CdkListboxModule], exports: [PoListBoxComponent] });
10115
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoListBoxModule, imports: [CommonModule, PoCheckboxModule, PoIconModule, PoLoadingModule, PoTagModule, CdkListboxModule] });
10902
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: PoListBoxModule, declarations: [PoListBoxComponent, PoItemListComponent, PoSearchListComponent], imports: [CommonModule,
10903
+ PoButtonModule,
10904
+ PoCheckboxModule,
10905
+ PoIconModule,
10906
+ PoLoadingModule,
10907
+ PoSkeletonModule,
10908
+ PoTagModule,
10909
+ CdkListboxModule], exports: [PoListBoxComponent] });
10910
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoListBoxModule, imports: [CommonModule,
10911
+ PoButtonModule,
10912
+ PoCheckboxModule,
10913
+ PoIconModule,
10914
+ PoLoadingModule,
10915
+ PoSkeletonModule,
10916
+ PoTagModule,
10917
+ CdkListboxModule] });
10116
10918
  }
10117
10919
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoListBoxModule, decorators: [{
10118
10920
  type: NgModule,
10119
10921
  args: [{
10120
10922
  declarations: [PoListBoxComponent, PoItemListComponent, PoSearchListComponent],
10121
10923
  exports: [PoListBoxComponent],
10122
- imports: [CommonModule, PoCheckboxModule, PoIconModule, PoLoadingModule, PoTagModule, CdkListboxModule]
10924
+ imports: [
10925
+ CommonModule,
10926
+ PoButtonModule,
10927
+ PoCheckboxModule,
10928
+ PoIconModule,
10929
+ PoLoadingModule,
10930
+ PoSkeletonModule,
10931
+ PoTagModule,
10932
+ CdkListboxModule
10933
+ ]
10123
10934
  }]
10124
10935
  }] });
10125
10936
 
@@ -15874,7 +16685,7 @@ class PoComboComponent extends PoComboBaseComponent {
15874
16685
  useExisting: forwardRef(() => PoComboComponent),
15875
16686
  multi: true
15876
16687
  }
15877
- ], 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" }, { 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 });
15878
16689
  }
15879
16690
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoComboComponent, decorators: [{
15880
16691
  type: Component,
@@ -18030,7 +18841,7 @@ class PoChartBaseComponent {
18030
18841
  * - Os marcadores (*bullets*) terão seu estilo ajustado.
18031
18842
  * - As outras séries ficarão com opacidade reduzida ao passar o mouse sobre a série ativa.
18032
18843
  *
18033
- * > Disponível para gráficos do tipo `line` e `radar`.
18844
+ * > Disponível para gráficos do tipo `line`, `area`, `column`, `bar` e `radar`.
18034
18845
  *
18035
18846
  * #### Exemplo de utilização:
18036
18847
  * ```typescript
@@ -18367,8 +19178,7 @@ class PoChartGridUtils {
18367
19178
  this.component.boundaryGap = true;
18368
19179
  if (this.component.options?.stacked || serie.stackGroupName) {
18369
19180
  serie.stack = this.component.options?.stacked ? 'total' : serie.stackGroupName;
18370
- if (this.component.dataLabel?.fixed !== false) {
18371
- this.component.dataLabel = { fixed: true };
19181
+ if (this.component.dataLabel?.fixed === true) {
18372
19182
  serie.label = { show: true };
18373
19183
  }
18374
19184
  }
@@ -19389,7 +20199,9 @@ class PoChartComponent extends PoChartBaseComponent {
19389
20199
  this.series.some(serie => serie.type === 'area') ||
19390
20200
  this.options?.areaStyle ||
19391
20201
  this.series.some(serie => serie.areaStyle === true);
19392
- const newSeries = [...this.colorService.getColors(this.series, true, hasArea)];
20202
+ const newSeries = this.colorService
20203
+ .getColors(this.series, true, hasArea)
20204
+ .map(serie => ({ ...serie }));
19393
20205
  const tokenBorderWidthMd = this.chartGridUtils.resolvePx('--border-width-md');
19394
20206
  const findType = this.series.find(serie => serie.type)?.type;
19395
20207
  let serieGauge = {};
@@ -20803,18 +21615,32 @@ class PoDropdownBaseComponent {
20803
21615
  label;
20804
21616
  icon = 'ICON_ARROW_DOWN';
20805
21617
  open = false;
20806
- _actions;
21618
+ _actions = [];
21619
+ _rootLazyLoad;
20807
21620
  _disabled = false;
20808
21621
  _size = undefined;
20809
21622
  _initialSize = undefined;
20810
21623
  _position = poDropdownDefaultPosition;
20811
- /** Lista de ações que serão exibidas no componente. */
21624
+ /**
21625
+ * Lista de ações que serão exibidas no componente.
21626
+ * Aceita um *array* de `PoDropdownAction`.
21627
+ */
20812
21628
  set actions(value) {
20813
- this._actions = Array.isArray(value) ? value : [];
21629
+ if (typeof value === 'function') {
21630
+ this._rootLazyLoad = value;
21631
+ this._actions = [];
21632
+ }
21633
+ else {
21634
+ this._rootLazyLoad = undefined;
21635
+ this._actions = Array.isArray(value) ? value : [];
21636
+ }
20814
21637
  }
20815
21638
  get actions() {
20816
21639
  return this._actions;
20817
21640
  }
21641
+ get popupActions() {
21642
+ return this._rootLazyLoad ?? this._actions;
21643
+ }
20818
21644
  /**
20819
21645
  * @optional
20820
21646
  *
@@ -20882,6 +21708,38 @@ class PoDropdownBaseComponent {
20882
21708
  get position() {
20883
21709
  return this._position;
20884
21710
  }
21711
+ /**
21712
+ * @optional
21713
+ *
21714
+ * @description
21715
+ *
21716
+ * Evento disparado a cada clique em um item do menu.
21717
+ * Retorna o item clicado (`PoDropdownAction`).
21718
+ *
21719
+ * > Não é disparado para a ação interna de voltar (`goBack`).
21720
+ */
21721
+ clickItem = new EventEmitter();
21722
+ /**
21723
+ * @optional
21724
+ *
21725
+ * @description
21726
+ *
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.
21729
+ *
21730
+ * > Compatível com a propriedade PoPopupAction.subItemsLazy
21731
+ */
21732
+ subItemsLoad = new EventEmitter();
21733
+ /**
21734
+ * @optional
21735
+ *
21736
+ * @description
21737
+ *
21738
+ * Evento disparado no momento em que a requisição assíncrona do nível raiz é iniciada
21739
+ *
21740
+ * > Compatível com a propriedade PoPopupAction.subItemsLazy
21741
+ */
21742
+ rootItemsLoad = new EventEmitter();
20885
21743
  get popupCustomPositions() {
20886
21744
  if (this._position === 'bottom-right') {
20887
21745
  return ['bottom-right', 'top-right'];
@@ -20902,7 +21760,7 @@ class PoDropdownBaseComponent {
20902
21760
  this._size = size;
20903
21761
  }
20904
21762
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoDropdownBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
20905
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: PoDropdownBaseComponent, isStandalone: true, inputs: { label: ["p-label", "label"], actions: ["p-actions", "actions"], disabled: ["p-disabled", "disabled"], size: ["p-size", "size"], position: ["p-position", "position"] }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-size": "this.size" } }, ngImport: i0 });
21763
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: PoDropdownBaseComponent, isStandalone: true, inputs: { label: ["p-label", "label"], actions: ["p-actions", "actions"], disabled: ["p-disabled", "disabled"], size: ["p-size", "size"], position: ["p-position", "position"] }, outputs: { clickItem: "p-click-item", subItemsLoad: "p-sub-items-load", rootItemsLoad: "p-root-items-load" }, host: { listeners: { "window:PoUiThemeChange": "onThemeChange()" }, properties: { "attr.p-size": "this.size" } }, ngImport: i0 });
20906
21764
  }
20907
21765
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoDropdownBaseComponent, decorators: [{
20908
21766
  type: Directive
@@ -20924,6 +21782,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
20924
21782
  }], position: [{
20925
21783
  type: Input,
20926
21784
  args: ['p-position']
21785
+ }], clickItem: [{
21786
+ type: Output,
21787
+ args: ['p-click-item']
21788
+ }], subItemsLoad: [{
21789
+ type: Output,
21790
+ args: ['p-sub-items-load']
21791
+ }], rootItemsLoad: [{
21792
+ type: Output,
21793
+ args: ['p-root-items-load']
20927
21794
  }], onThemeChange: [{
20928
21795
  type: HostListener,
20929
21796
  args: ['window:PoUiThemeChange']
@@ -20939,11 +21806,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
20939
21806
  * <file name="sample-po-dropdown-basic/sample-po-dropdown-basic.component.ts"> </file>
20940
21807
  * </example>
20941
21808
  *
20942
- * <example name="po-dropdown-subitems" title="PO Dropdown Subitems" >
20943
- * <file name="sample-po-dropdown-subitems/sample-po-dropdown-subitems.component.html"> </file>
20944
- * <file name="sample-po-dropdown-subitems/sample-po-dropdown-subitems.component.ts"> </file>
20945
- * </example>
20946
- *
20947
21809
  * <example name="po-dropdown-labs" title="PO Dropdown Labs" >
20948
21810
  * <file name="sample-po-dropdown-labs/sample-po-dropdown-labs.component.html"> </file>
20949
21811
  * <file name="sample-po-dropdown-labs/sample-po-dropdown-labs.component.ts"> </file>
@@ -20953,6 +21815,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
20953
21815
  * <file name="sample-po-dropdown-social-network/sample-po-dropdown-social-network.component.html"> </file>
20954
21816
  * <file name="sample-po-dropdown-social-network/sample-po-dropdown-social-network.component.ts"> </file>
20955
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>
20956
21828
  */
20957
21829
  class PoDropdownComponent extends PoDropdownBaseComponent {
20958
21830
  renderer = inject(Renderer2);
@@ -20969,15 +21841,32 @@ class PoDropdownComponent extends PoDropdownBaseComponent {
20969
21841
  toggleDropdown() {
20970
21842
  this.dropdownRef && !this.open && !this.disabled ? this.showDropdown() : this.hideDropdown();
20971
21843
  }
21844
+ onPopupClose() {
21845
+ if (!this.open) {
21846
+ return;
21847
+ }
21848
+ this.hideDropdown(false);
21849
+ }
21850
+ isEventInsideElement(event, element) {
21851
+ if (!element) {
21852
+ return false;
21853
+ }
21854
+ const path = typeof event.composedPath === 'function' ? event.composedPath() : [];
21855
+ return path.length ? path.includes(element) : element.contains(event.target);
21856
+ }
20972
21857
  checkClickArea(event) {
20973
- return this.dropdownRef?.nativeElement.contains(event.target);
21858
+ const clickedOnTrigger = this.isEventInsideElement(event, this.dropdownRef?.nativeElement);
21859
+ const clickedOnPopup = this.isEventInsideElement(event, this.popupRef?.popupRef?.nativeElement);
21860
+ return clickedOnTrigger || clickedOnPopup;
20974
21861
  }
20975
- hideDropdown() {
21862
+ hideDropdown(shouldClosePopup = true) {
20976
21863
  this.icon = 'ICON_ARROW_DOWN';
20977
21864
  this.removeListeners();
20978
- this.popupRef.close();
20979
21865
  this.open = false;
20980
21866
  this.changeDetector.detectChanges();
21867
+ if (shouldClosePopup) {
21868
+ this.popupRef.close();
21869
+ }
20981
21870
  }
20982
21871
  initializeListeners() {
20983
21872
  this.clickoutListener = this.renderer.listen('document', 'click', (event) => {
@@ -20989,10 +21878,20 @@ class PoDropdownComponent extends PoDropdownBaseComponent {
20989
21878
  window.addEventListener('scroll', this.onScroll, true);
20990
21879
  }
20991
21880
  onScroll = ({ target }) => {
20992
- if (this.open && target.className !== 'po-popup-container' && !this.isDropdownClosed()) {
21881
+ if (!this.open) {
21882
+ return;
21883
+ }
21884
+ if (this.isScrollInsidePopup(target)) {
21885
+ return;
21886
+ }
21887
+ if (!this.isDropdownClosed()) {
20993
21888
  this.hideDropdown();
20994
21889
  }
20995
21890
  };
21891
+ isScrollInsidePopup(target) {
21892
+ const popupElement = this.popupRef?.popupRef?.nativeElement;
21893
+ return !!(popupElement && target instanceof Node && popupElement.contains(target));
21894
+ }
20996
21895
  isDropdownClosed() {
20997
21896
  const dropdownRect = this.dropdownRef.nativeElement.getBoundingClientRect();
20998
21897
  return dropdownRect.top >= 0 && dropdownRect.bottom <= window.innerHeight;
@@ -21020,11 +21919,11 @@ class PoDropdownComponent extends PoDropdownBaseComponent {
21020
21919
  }
21021
21920
  }
21022
21921
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoDropdownComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
21023
- 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]=\"actions\"\n [p-custom-positions]=\"popupCustomPositions\"\n [p-size]=\"size\"\n [p-target]=\"dropdownRef\"\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 });
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 });
21024
21923
  }
21025
21924
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoDropdownComponent, decorators: [{
21026
21925
  type: Component,
21027
- 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]=\"actions\"\n [p-custom-positions]=\"popupCustomPositions\"\n [p-size]=\"size\"\n [p-target]=\"dropdownRef\"\n>\n</po-popup>\n" }]
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" }]
21028
21927
  }], propDecorators: { dropdownRef: [{
21029
21928
  type: ViewChild,
21030
21929
  args: ['dropdownRef', { read: ElementRef, static: true }]
@@ -41966,7 +42865,7 @@ class PoSearchComponent extends PoSearchBaseComponent {
41966
42865
  this.placeholderListbox = null;
41967
42866
  }
41968
42867
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
41969
- 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" }, { 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 });
41970
42869
  }
41971
42870
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSearchComponent, decorators: [{
41972
42871
  type: Component,
@@ -48229,7 +49128,7 @@ class PoLookupBaseComponent {
48229
49128
  }
48230
49129
  this.getSubscription = this.service
48231
49130
  .getObjectByValue(value, this.filterParams)
48232
- .pipe(finalize(() => {
49131
+ .pipe(finalize$1(() => {
48233
49132
  this.disabled = oldDisable;
48234
49133
  if (this.control) {
48235
49134
  this.control.updateValueAndValidity();
@@ -50291,7 +51190,7 @@ class PoMultiselectDropdownComponent {
50291
51190
  return newSelectedOptions;
50292
51191
  }
50293
51192
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoMultiselectDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
50294
- 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" }], 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 });
50295
51194
  }
50296
51195
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoMultiselectDropdownComponent, decorators: [{
50297
51196
  type: Component,
@@ -68022,392 +68921,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
68022
68921
  }]
68023
68922
  }] });
68024
68923
 
68025
- /**
68026
- * @usedBy PoSkeletonComponent
68027
- *
68028
- * @description
68029
- *
68030
- * Define os tipos de animação do componente `po-skeleton`.
68031
- */
68032
- var PoSkeletonAnimation;
68033
- (function (PoSkeletonAnimation) {
68034
- /** Sem animação */
68035
- PoSkeletonAnimation["none"] = "none";
68036
- /** Animação de pulsação */
68037
- PoSkeletonAnimation["pulse"] = "pulse";
68038
- /** Animação de brilho deslizante */
68039
- PoSkeletonAnimation["shimmer"] = "shimmer";
68040
- })(PoSkeletonAnimation || (PoSkeletonAnimation = {}));
68041
-
68042
- /**
68043
- * @usedBy PoSkeletonComponent
68044
- *
68045
- * @description
68046
- *
68047
- * Define os tamanhos disponíveis para o componente `po-skeleton`.
68048
- */
68049
- var PoSkeletonSize;
68050
- (function (PoSkeletonSize) {
68051
- /** Tamanho extra pequeno */
68052
- PoSkeletonSize["xs"] = "xs";
68053
- /** Tamanho pequeno */
68054
- PoSkeletonSize["sm"] = "sm";
68055
- /** Tamanho médio */
68056
- PoSkeletonSize["md"] = "md";
68057
- /** Tamanho grande */
68058
- PoSkeletonSize["lg"] = "lg";
68059
- /** Tamanho extra grande */
68060
- PoSkeletonSize["xl"] = "xl";
68061
- /** Tamanho extra extra grande */
68062
- PoSkeletonSize["xxl"] = "2xl";
68063
- })(PoSkeletonSize || (PoSkeletonSize = {}));
68064
-
68065
- /**
68066
- * @usedBy PoSkeletonComponent
68067
- *
68068
- * @description
68069
- *
68070
- * Define os tipos visuais disponíveis para o componente `po-skeleton`.
68071
- */
68072
- var PoSkeletonType;
68073
- (function (PoSkeletonType) {
68074
- /** Tipo padrão com cor neutra clara */
68075
- PoSkeletonType["normal"] = "normal";
68076
- /** Tipo primário com cor neutra média */
68077
- PoSkeletonType["primary"] = "primary";
68078
- /** Tipo de conteúdo com fundo branco */
68079
- PoSkeletonType["content"] = "content";
68080
- })(PoSkeletonType || (PoSkeletonType = {}));
68081
-
68082
- /**
68083
- * @usedBy PoSkeletonComponent
68084
- *
68085
- * @description
68086
- *
68087
- * Define as variantes visuais do componente `po-skeleton`.
68088
- */
68089
- var PoSkeletonVariant;
68090
- (function (PoSkeletonVariant) {
68091
- /** Variante para simular texto */
68092
- PoSkeletonVariant["text"] = "text";
68093
- /** Variante retangular (largura maior que altura) */
68094
- PoSkeletonVariant["rectangle"] = "rectangle";
68095
- /** Variante quadrada (largura igual à altura) */
68096
- PoSkeletonVariant["square"] = "square";
68097
- /** Variante circular */
68098
- PoSkeletonVariant["circle"] = "circle";
68099
- })(PoSkeletonVariant || (PoSkeletonVariant = {}));
68100
-
68101
- /**
68102
- * @description
68103
- *
68104
- * O componente `po-skeleton` é utilizado para exibir placeholders durante o carregamento de conteúdo,
68105
- * melhorando a experiência do usuário ao indicar que a informação está sendo processada.
68106
- *
68107
- * Ele oferece diferentes variantes visuais (texto, retângulo, círculo) e animações (pulse, shimmer)
68108
- * para simular diversos tipos de conteúdo em estado de carregamento.
68109
- *
68110
- * #### Tokens customizáveis
68111
- *
68112
- * É possível alterar o estilo do componente usando os seguintes tokens (CSS):
68113
- *
68114
- * > Para maiores informações, acesse o guia [Personalizando o Tema Padrão com Tokens CSS](https://po-ui.io/guides/theme-customization).
68115
- *
68116
- * | Propriedade | Descrição | Valor Padrão |
68117
- * |----------------------------------------|------------------------------------------------------|---------------------------------|
68118
- * | **Cores** | | |
68119
- * | `--color` | Cor de fundo do skeleton (tipo normal) | `var(--color-neutral-light-20)` |
68120
- * | `--color-primary` | Cor de fundo do skeleton (tipo primary) | `var(--color-neutral-mid-40)` |
68121
- * | `--color-content` | Cor de fundo do skeleton (tipo content) | `var(--color-neutral-light-00)` |
68122
- * | `--shimmer-highlight` | Cor de destaque do shimmer (tipo normal) | `var(--color-neutral-light-30)` |
68123
- * | `--shimmer-highlight-primary` | Cor de destaque do shimmer (tipo primary) | `var(--color-neutral-light-20)` |
68124
- * | `--shimmer-highlight-content` | Cor de destaque do shimmer (tipo content) | `var(--color-neutral-light-05)` |
68125
- * | **Espaçamento** | | |
68126
- * | `--margin-bottom` | Margem inferior do skeleton | `var(--spacing-xs)` |
68127
- * | **Bordas** | | |
68128
- * | `--border-radius` | Raio da borda do skeleton | `var(--border-radius-md)` |
68129
- * | `--border-radius-text` | Raio da borda para a variante text | `var(--border-radius-md)` |
68130
- * | `--border-radius-primary` | Raio da borda do skeleton (tipo primary) | `var(--border-radius-md)` |
68131
- * | `--border-radius-content` | Raio da borda do skeleton (tipo content) | `var(--border-radius-lg)` |
68132
- * | **Transições** | | |
68133
- * | `--transition-property` | Propriedade CSS da transição | `all` |
68134
- * | `--transition-duration` | Duração da transição de cor | `var(--duration-moderate)` |
68135
- * | `--transition-timing` | Função de temporização da transição/animação | `var(--timing-continuous)` |
68136
- * | **Animações** | | |
68137
- * | `--animation-duration-pulse` | Duração da animação de pulsação | `var(--duration-very-slow)` |
68138
- * | `--animation-duration-shimmer` | Duração da animação de brilho deslizante | `var(--duration-ultra-slow)` |
68139
- *
68140
- */
68141
- class PoSkeletonBaseComponent {
68142
- /**
68143
- * @optional
68144
- *
68145
- * @description
68146
- *
68147
- * Define a variante visual do skeleton.
68148
- *
68149
- * Valores válidos:
68150
- * - `text`: Simula uma linha de texto (altura padrão: 1em)
68151
- * - `rectangle`: Forma retangular (proporção 3:1 por padrão)
68152
- * - `square`: Forma quadrada (largura e altura iguais)
68153
- * - `circle`: Forma circular (largura e altura iguais)
68154
- *
68155
- * @default `text`
68156
- */
68157
- variant = input(PoSkeletonVariant.text, { ...(ngDevMode ? { debugName: "variant" } : /* istanbul ignore next */ {}), alias: 'p-variant' });
68158
- /**
68159
- * @optional
68160
- *
68161
- * @description
68162
- *
68163
- * Define o tipo visual do skeleton, alterando sua cor de fundo.
68164
- *
68165
- * Valores válidos:
68166
- * - `normal`: Cor neutra clara (padrão)
68167
- * - `primary`: Cor neutra média
68168
- * - `content`: Fundo branco
68169
- *
68170
- * @default `normal`
68171
- */
68172
- type = input(PoSkeletonType.normal, { ...(ngDevMode ? { debugName: "type" } : /* istanbul ignore next */ {}), alias: 'p-type' });
68173
- /**
68174
- * @optional
68175
- *
68176
- * @description
68177
- *
68178
- * Define o tipo de animação do skeleton.
68179
- *
68180
- * Valores válidos:
68181
- * - `none`: Sem animação
68182
- * - `pulse`: Animação de pulsação
68183
- * - `shimmer`: Animação de brilho deslizante
68184
- *
68185
- * @default `shimmer`
68186
- */
68187
- animation = input(PoSkeletonAnimation.shimmer, { ...(ngDevMode ? { debugName: "animation" } : /* istanbul ignore next */ {}), alias: 'p-animation' });
68188
- /**
68189
- * @optional
68190
- *
68191
- * @description
68192
- *
68193
- * Define o tamanho do skeleton para as variantes pré-definidas (`rectangle`, `square`, `circle`).
68194
- *
68195
- * Valores válidos:
68196
- * - `xs`: Extra pequeno (24px para square/circle, 72px x 24px para rectangle)
68197
- * - `sm`: Pequeno (32px para square/circle, 96px x 32px para rectangle)
68198
- * - `md`: Médio (48px para square/circle, 144px x 48px para rectangle)
68199
- * - `lg`: Grande (64px para square/circle, 192px x 64px para rectangle)
68200
- * - `xl`: Extra grande (96px para square/circle, 288px x 96px para rectangle)
68201
- * - `2xl`: Extra extra grande (144px para square/circle, 432px x 144px para rectangle)
68202
- *
68203
- * Esta propriedade é ignorada quando `p-width` ou `p-height` são definidos explicitamente.
68204
- *
68205
- * @default `md`
68206
- */
68207
- size = input(PoSkeletonSize.md, { ...(ngDevMode ? { debugName: "size" } : /* istanbul ignore next */ {}), alias: 'p-size' });
68208
- /**
68209
- * @optional
68210
- *
68211
- * @description
68212
- *
68213
- * Define a largura do skeleton.
68214
- * Aceita valores CSS válidos (px, %, em, rem).
68215
- *
68216
- * Quando definido, sobrescreve a largura padrão da variante.
68217
- *
68218
- * @default `100%` para variante `text`, tamanho baseado em `p-size` para outras variantes
68219
- */
68220
- width = input('', { ...(ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {}), alias: 'p-width' });
68221
- /**
68222
- * @optional
68223
- *
68224
- * @description
68225
- *
68226
- * Define a altura do skeleton.
68227
- * Aceita valores CSS válidos (px, %, em, rem).
68228
- *
68229
- * Quando definido, sobrescreve a altura padrão da variante.
68230
- */
68231
- height = input('', { ...(ngDevMode ? { debugName: "height" } : /* istanbul ignore next */ {}), alias: 'p-height' });
68232
- /**
68233
- * @optional
68234
- *
68235
- * @description
68236
- *
68237
- * Define o raio da borda do skeleton.
68238
- * Aceita valores CSS válidos (px, %, em, rem).
68239
- *
68240
- * Esta propriedade sobrescreve o border-radius padrão de cada variante.
68241
- */
68242
- borderRadius = input('', { ...(ngDevMode ? { debugName: "borderRadius" } : /* istanbul ignore next */ {}), alias: 'p-border-radius' });
68243
- /**
68244
- * @optional
68245
- *
68246
- * @description
68247
- *
68248
- * Define a descrição acessível do conteúdo que está sendo carregado.
68249
- *
68250
- * Este texto será anunciado por leitores de tela, garantindo que usuários de tecnologias assistivas
68251
- * sejam informados sobre o estado de carregamento.
68252
- *
68253
- * **Quando usar:**
68254
- * - Use em **skeletons únicos** ou no **primeiro skeleton de um grupo** com descrição contextual
68255
- * - Evite usar em múltiplos skeletons dentro da mesma área sem contexto, para não causar repetição excessiva
68256
- *
68257
- * **Exemplos de uso:**
68258
- *
68259
- * ```html
68260
- * <!-- ✅ BOM: Skeleton único com contexto -->
68261
- * <po-skeleton p-aria-label="Carregando perfil do usuário"></po-skeleton>
68262
- *
68263
- * <!-- ✅ BOM: Grupo de skeletons - apenas o primeiro anuncia -->
68264
- * <po-skeleton p-aria-label="Carregando lista de produtos"></po-skeleton>
68265
- * <po-skeleton p-type="primary"></po-skeleton>
68266
- * <po-skeleton p-variant="circle"></po-skeleton>
68267
- *
68268
- * <!-- ❌ EVITE: Múltiplos skeletons com a mesma label -->
68269
- * <po-skeleton p-aria-label="Carregando"></po-skeleton> <!-- "Carregando" -->
68270
- * <po-skeleton p-aria-label="Carregando"></po-skeleton> <!-- "Carregando" -->
68271
- * <po-skeleton p-aria-label="Carregando"></po-skeleton> <!-- "Carregando" (repetitivo!) -->
68272
- * ```
68273
- *
68274
- * > **Boas práticas de acessibilidade:**
68275
- * > - Forneça contexto específico na label para que os usuários entendam o que está carregando
68276
- *
68277
- * > - Em casos complexos, considere usar um único `<div role="status">` para todo o grupo
68278
- * > de skeletons, ao invés de múltiplas labels idênticas, para evitar repetição excessiva de anúncios
68279
- */
68280
- ariaLabel = input('', { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'p-aria-label' });
68281
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
68282
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: PoSkeletonBaseComponent, isStandalone: true, inputs: { variant: { classPropertyName: "variant", publicName: "p-variant", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "p-type", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "p-animation", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "p-size", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "p-width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "p-height", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "p-border-radius", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "p-aria-label", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
68283
- }
68284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonBaseComponent, decorators: [{
68285
- type: Directive
68286
- }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-variant", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-type", required: false }] }], animation: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-animation", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-size", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-height", required: false }] }], borderRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-border-radius", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "p-aria-label", required: false }] }] } });
68287
-
68288
- /**
68289
- * @docsExtends PoSkeletonBaseComponent
68290
- *
68291
- * @example
68292
- *
68293
- * <example name="po-skeleton-basic" title="PO Skeleton Basic">
68294
- * <file name="sample-po-skeleton-basic/sample-po-skeleton-basic.component.html"> </file>
68295
- * <file name="sample-po-skeleton-basic/sample-po-skeleton-basic.component.ts"> </file>
68296
- * </example>
68297
- *
68298
- * <example name="po-skeleton-labs" title="PO Skeleton Labs">
68299
- * <file name="sample-po-skeleton-labs/sample-po-skeleton-labs.component.html"> </file>
68300
- * <file name="sample-po-skeleton-labs/sample-po-skeleton-labs.component.ts"> </file>
68301
- * </example>
68302
- *
68303
- * <example name="po-skeleton-credit-card" title="PO Skeleton - Credit Card">
68304
- * <file name="sample-po-skeleton-credit-card/sample-po-skeleton-credit-card.component.html"> </file>
68305
- * <file name="sample-po-skeleton-credit-card/sample-po-skeleton-credit-card.component.ts"> </file>
68306
- * <file name="sample-po-skeleton-credit-card/sample-po-skeleton-credit-card.component.css"> </file>
68307
- * </example>
68308
- *
68309
- * <example name="po-skeleton-widget-card" title="PO Skeleton - Widget Card">
68310
- * <file name="sample-po-skeleton-widget-card/sample-po-skeleton-widget-card.component.html"> </file>
68311
- * <file name="sample-po-skeleton-widget-card/sample-po-skeleton-widget-card.component.ts"> </file>
68312
- * <file name="sample-po-skeleton-widget-card/sample-po-skeleton-widget-card.component.css"> </file>
68313
- * </example>
68314
- *
68315
- * <example name="po-skeleton-user-profile" title="PO Skeleton - User Profile">
68316
- * <file name="sample-po-skeleton-user-profile/sample-po-skeleton-user-profile.component.html"> </file>
68317
- * <file name="sample-po-skeleton-user-profile/sample-po-skeleton-user-profile.component.ts"> </file>
68318
- * <file name="sample-po-skeleton-user-profile/sample-po-skeleton-user-profile.component.css"> </file>
68319
- * </example>
68320
- *
68321
- * <example name="po-skeleton-social-post" title="PO Skeleton - Social Post">
68322
- * <file name="sample-po-skeleton-social-post/sample-po-skeleton-social-post.component.html"> </file>
68323
- * <file name="sample-po-skeleton-social-post/sample-po-skeleton-social-post.component.ts"> </file>
68324
- * <file name="sample-po-skeleton-social-post/sample-po-skeleton-social-post.component.css"> </file>
68325
- * </example>
68326
- *
68327
- * <example name="po-skeleton-article" title="PO Skeleton - Article">
68328
- * <file name="sample-po-skeleton-article/sample-po-skeleton-article.component.html"> </file>
68329
- * <file name="sample-po-skeleton-article/sample-po-skeleton-article.component.ts"> </file>
68330
- * <file name="sample-po-skeleton-article/sample-po-skeleton-article.component.css"> </file>
68331
- * </example>
68332
- */
68333
- class PoSkeletonComponent extends PoSkeletonBaseComponent {
68334
- sizeMap = {
68335
- [PoSkeletonSize.xs]: { square: 24, circle: 24, rectangleWidth: 72, rectangleHeight: 24 },
68336
- [PoSkeletonSize.sm]: { square: 32, circle: 32, rectangleWidth: 96, rectangleHeight: 32 },
68337
- [PoSkeletonSize.md]: { square: 48, circle: 48, rectangleWidth: 144, rectangleHeight: 48 },
68338
- [PoSkeletonSize.lg]: { square: 64, circle: 64, rectangleWidth: 192, rectangleHeight: 64 },
68339
- [PoSkeletonSize.xl]: { square: 96, circle: 96, rectangleWidth: 288, rectangleHeight: 96 },
68340
- [PoSkeletonSize.xxl]: { square: 144, circle: 144, rectangleWidth: 432, rectangleHeight: 144 }
68341
- };
68342
- defaultTextDimensions = { width: '100%', height: '1em' };
68343
- defaultBorderRadius = {
68344
- [PoSkeletonVariant.text]: undefined,
68345
- [PoSkeletonVariant.square]: undefined,
68346
- [PoSkeletonVariant.rectangle]: undefined,
68347
- [PoSkeletonVariant.circle]: '50%'
68348
- };
68349
- computedStyles = computed(() => {
68350
- const styles = {};
68351
- const variant = this.variant();
68352
- const size = this.size();
68353
- const sizeConfig = this.sizeMap[size];
68354
- const defaultDimensions = this.getDimensions(variant, sizeConfig);
68355
- styles['width'] = this.width() || defaultDimensions.width || '';
68356
- styles['height'] = this.height() || defaultDimensions.height || '';
68357
- const borderRadiusValue = this.borderRadius();
68358
- const defaultRadius = this.defaultBorderRadius[variant];
68359
- if (borderRadiusValue || defaultRadius) {
68360
- styles['border-radius'] = borderRadiusValue || defaultRadius;
68361
- }
68362
- return styles;
68363
- }, ...(ngDevMode ? [{ debugName: "computedStyles" }] : /* istanbul ignore next */ []));
68364
- computedClasses = computed(() => ({
68365
- 'po-skeleton': true,
68366
- [`po-skeleton-${this.variant()}`]: true,
68367
- [`po-skeleton-type-${this.type()}`]: true,
68368
- [`po-skeleton-animation-${this.animation()}`]: true
68369
- }), ...(ngDevMode ? [{ debugName: "computedClasses" }] : /* istanbul ignore next */ []));
68370
- getDimensions(variant, sizeConfig) {
68371
- switch (variant) {
68372
- case PoSkeletonVariant.text:
68373
- return this.defaultTextDimensions;
68374
- case PoSkeletonVariant.square:
68375
- return { width: `${sizeConfig.square}px`, height: `${sizeConfig.square}px` };
68376
- case PoSkeletonVariant.circle:
68377
- return { width: `${sizeConfig.circle}px`, height: `${sizeConfig.circle}px` };
68378
- case PoSkeletonVariant.rectangle:
68379
- return { width: `${sizeConfig.rectangleWidth}px`, height: `${sizeConfig.rectangleHeight}px` };
68380
- default:
68381
- return { width: '', height: '' };
68382
- }
68383
- }
68384
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
68385
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PoSkeletonComponent, isStandalone: false, selector: "po-skeleton", usesInheritance: true, ngImport: i0, template: "<div class=\"po-skeleton-wrapper\" [ngClass]=\"computedClasses()\" [ngStyle]=\"computedStyles()\" aria-hidden=\"true\"></div>\n@if (ariaLabel()) {\n <span class=\"po-skeleton-aria-label\" role=\"status\" aria-live=\"polite\">{{ ariaLabel() }}</span>\n}\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
68386
- }
68387
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonComponent, decorators: [{
68388
- type: Component,
68389
- args: [{ selector: 'po-skeleton', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"po-skeleton-wrapper\" [ngClass]=\"computedClasses()\" [ngStyle]=\"computedStyles()\" aria-hidden=\"true\"></div>\n@if (ariaLabel()) {\n <span class=\"po-skeleton-aria-label\" role=\"status\" aria-live=\"polite\">{{ ariaLabel() }}</span>\n}\n" }]
68390
- }] });
68391
-
68392
- /**
68393
- * @description
68394
- *
68395
- * Módulo do componente po-skeleton.
68396
- */
68397
- class PoSkeletonModule {
68398
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
68399
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonModule, declarations: [PoSkeletonComponent], imports: [CommonModule], exports: [PoSkeletonComponent] });
68400
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonModule, imports: [CommonModule] });
68401
- }
68402
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoSkeletonModule, decorators: [{
68403
- type: NgModule,
68404
- args: [{
68405
- imports: [CommonModule],
68406
- declarations: [PoSkeletonComponent],
68407
- exports: [PoSkeletonComponent]
68408
- }]
68409
- }] });
68410
-
68411
68924
  /**
68412
68925
  * @docsPrivate
68413
68926
  *
@@ -70668,7 +71181,7 @@ class PoTabDropdownComponent {
70668
71181
  }
70669
71182
  }
70670
71183
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoTabDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
70671
- 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" }] });
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"] }] });
70672
71185
  }
70673
71186
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PoTabDropdownComponent, decorators: [{
70674
71187
  type: Component,
@@ -75011,7 +75524,7 @@ class PoHttpRequestInterceptorService {
75011
75524
  request = this.requestCloneWithoutHeaderParam([noCountPendingRequests, screenLock], request);
75012
75525
  this.setCountPendingRequests(true, requestClone);
75013
75526
  this.setCountOverlayRequests(true, requestClone);
75014
- return next.handle(request).pipe(finalize(() => {
75527
+ return next.handle(request).pipe(finalize$1(() => {
75015
75528
  this.setCountPendingRequests(false, requestClone);
75016
75529
  this.setCountOverlayRequests(false, requestClone);
75017
75530
  }));