@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-46510.0 → 0.0.0-bugfix-dev-KB-49747.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/cjs/ez-grid.cjs.entry.js +21 -16
  2. package/dist/cjs/ez-modal-container.cjs.entry.js +6 -0
  3. package/dist/cjs/ez-popup.cjs.entry.js +7 -0
  4. package/dist/cjs/ez-search.cjs.entry.js +12 -11
  5. package/dist/cjs/ez-split-panel.cjs.entry.js +36 -1
  6. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  7. package/dist/cjs/ezui.cjs.js +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +1 -1
  10. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +1 -1
  11. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +4 -4
  12. package/dist/collection/components/ez-grid/ez-grid.js +15 -10
  13. package/dist/collection/components/ez-modal-container/ez-modal-container.js +15 -0
  14. package/dist/collection/components/ez-popup/ez-popup.js +31 -1
  15. package/dist/collection/components/ez-search/ez-search.js +12 -11
  16. package/dist/collection/components/ez-split-panel/ez-split-panel.js +52 -1
  17. package/dist/collection/components/ez-toast/ez-toast.css +1 -1
  18. package/dist/custom-elements/index.js +85 -31
  19. package/dist/esm/ez-grid.entry.js +21 -16
  20. package/dist/esm/ez-modal-container.entry.js +6 -0
  21. package/dist/esm/ez-popup.entry.js +7 -0
  22. package/dist/esm/ez-search.entry.js +12 -11
  23. package/dist/esm/ez-split-panel.entry.js +36 -1
  24. package/dist/esm/ez-toast.entry.js +1 -1
  25. package/dist/esm/ezui.js +1 -1
  26. package/dist/esm/loader.js +1 -1
  27. package/dist/ezui/ezui.esm.js +1 -1
  28. package/dist/ezui/{p-1e367a93.entry.js → p-1dede1b2.entry.js} +1 -1
  29. package/dist/ezui/p-21d595fd.entry.js +1 -0
  30. package/dist/ezui/p-58fae29b.entry.js +1 -0
  31. package/dist/ezui/p-8c82374d.entry.js +1 -0
  32. package/dist/ezui/{p-8becebf8.entry.js → p-8df1ca33.entry.js} +1 -1
  33. package/dist/ezui/{p-07cbffce.entry.js → p-d7d7423a.entry.js} +1 -1
  34. package/dist/types/components/ez-grid/ez-grid.d.ts +1 -0
  35. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +1 -0
  36. package/dist/types/components/ez-popup/ez-popup.d.ts +6 -1
  37. package/dist/types/components/ez-search/ez-search.d.ts +2 -2
  38. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +5 -0
  39. package/dist/types/components.d.ts +6 -1
  40. package/package.json +1 -1
  41. package/dist/ezui/p-2eb8f73b.entry.js +0 -1
  42. package/dist/ezui/p-5d692ed1.entry.js +0 -1
  43. package/dist/ezui/p-abc23d6f.entry.js +0 -1
@@ -19,6 +19,12 @@ export class EzPopup {
19
19
  observeConfig() {
20
20
  this.manageOverflow();
21
21
  }
22
+ handleKeyDown(event) {
23
+ if (event.key === 'Escape' || event.key === 'Esc')
24
+ this.opened = false;
25
+ if (event.key === 'Enter')
26
+ this.ezPopupAction.emit("OK");
27
+ }
22
28
  manageOverflow() {
23
29
  if (this.opened) {
24
30
  window.document.body.style.overflow = "hidden";
@@ -162,13 +168,28 @@ export class EzPopup {
162
168
  "composed": true,
163
169
  "docs": {
164
170
  "tags": [],
165
- "text": "Emitido ao clicar no bot\u00E3o de fechar (onEzClosePopup)."
171
+ "text": "Evento emitido ao clicar no bot\u00E3o de fechar (onEzClosePopup)."
166
172
  },
167
173
  "complexType": {
168
174
  "original": "any",
169
175
  "resolved": "any",
170
176
  "references": {}
171
177
  }
178
+ }, {
179
+ "method": "ezPopupAction",
180
+ "name": "ezPopupAction",
181
+ "bubbles": true,
182
+ "cancelable": true,
183
+ "composed": true,
184
+ "docs": {
185
+ "tags": [],
186
+ "text": "Evento emitido ao clicar no bot\u00E3o de fechar (ezPopupAction = OK)"
187
+ },
188
+ "complexType": {
189
+ "original": "string",
190
+ "resolved": "string",
191
+ "references": {}
192
+ }
172
193
  }];
173
194
  }
174
195
  static get watchers() {
@@ -177,4 +198,13 @@ export class EzPopup {
177
198
  "methodName": "observeConfig"
178
199
  }];
179
200
  }
201
+ static get listeners() {
202
+ return [{
203
+ "name": "keydown",
204
+ "method": "handleKeyDown",
205
+ "target": "window",
206
+ "capture": false,
207
+ "passive": false
208
+ }];
209
+ }
180
210
  }
@@ -5,9 +5,9 @@ import { ApplicationUtils } from "../../utils";
5
5
  import { REQUIRED_INFO } from "../../utils/constants";
6
6
  export class EzSearch {
7
7
  constructor() {
8
- this._changeDeboucingTimeout = null;
9
- this._limitCharsToSearch = 3;
10
- this._deboucingTime = 300;
8
+ this._changeDebouncingTimeout = null;
9
+ this._limitCharsToSearch = 2;
10
+ this._debouncingTime = 300;
11
11
  this._maxWidthValue = 0;
12
12
  this._tabPressed = false;
13
13
  this._textEmptyList = "Nenhum resultado encontrado";
@@ -380,7 +380,7 @@ export class EzSearch {
380
380
  else {
381
381
  window.setTimeout(() => {
382
382
  this.setInputValue();
383
- }, this._deboucingTime);
383
+ }, this._debouncingTime);
384
384
  }
385
385
  this.resetOptions();
386
386
  }
@@ -554,9 +554,9 @@ export class EzSearch {
554
554
  var _a;
555
555
  this.clearDeboucingTimeout();
556
556
  if (this._startLoading) {
557
- this._changeDeboucingTimeout = window.setTimeout(() => {
557
+ this._changeDebouncingTimeout = window.setTimeout(() => {
558
558
  this.onTextInputChangeHandler(event);
559
- }, this._deboucingTime);
559
+ }, this._debouncingTime);
560
560
  return;
561
561
  }
562
562
  const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
@@ -570,9 +570,9 @@ export class EzSearch {
570
570
  this.clearSource();
571
571
  if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
572
572
  this._showLoading = true;
573
- this._changeDeboucingTimeout = window.setTimeout(() => {
573
+ this._changeDebouncingTimeout = window.setTimeout(() => {
574
574
  this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
575
- }, this._deboucingTime);
575
+ }, this._debouncingTime);
576
576
  this.showOptions();
577
577
  }
578
578
  else {
@@ -586,9 +586,9 @@ export class EzSearch {
586
586
  }
587
587
  }
588
588
  clearDeboucingTimeout() {
589
- if (this._changeDeboucingTimeout) {
590
- window.clearTimeout(this._changeDeboucingTimeout);
591
- this._changeDeboucingTimeout = null;
589
+ if (this._changeDebouncingTimeout) {
590
+ window.clearTimeout(this._changeDebouncingTimeout);
591
+ this._changeDebouncingTimeout = null;
592
592
  }
593
593
  }
594
594
  keyDownHandler(event) {
@@ -639,6 +639,7 @@ export class EzSearch {
639
639
  }
640
640
  render() {
641
641
  var _a;
642
+ console.log(this.optionLoader);
642
643
  ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
643
644
  return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "search" })), ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
644
645
  ? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
@@ -4,12 +4,24 @@ import Split from 'split-grid';
4
4
  export class SplitPanel {
5
5
  constructor() {
6
6
  this._items = [];
7
+ this._buildInProgress = false;
7
8
  this.direction = 'column';
8
9
  this.anchorToExpand = false;
9
10
  }
10
- componentDidLoad() {
11
+ rebuildLayout() {
12
+ Array.from(this._element.querySelectorAll(".ez-split-gutter")).reverse().forEach(el => {
13
+ el.remove();
14
+ });
15
+ Array.from(this._element.getElementsByTagName("EzSplitPanel")).reverse().forEach(el => {
16
+ el['rebuildLayout']();
17
+ });
18
+ this.buildItems();
19
+ this.initSplit();
20
+ }
21
+ buildItems() {
11
22
  this._panelID = StringUtils.generateUUID();
12
23
  this._element.dataset.panelId = this._panelID;
24
+ this._element.dataset.uniqueId = "EzSplitPanel";
13
25
  let itemsElements = Array.from(this._element.children);
14
26
  this._items = itemsElements.filter(child => { var _a; return ((_a = child.tagName) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'EZ-SPLIT-ITEM'; });
15
27
  let trackCount = 1;
@@ -20,7 +32,30 @@ export class SplitPanel {
20
32
  }
21
33
  trackCount += 2;
22
34
  });
35
+ }
36
+ componentDidLoad() {
37
+ this.buildItems();
23
38
  this.initSplit();
39
+ this._mutationObserver = new MutationObserver((mutationsList) => {
40
+ for (const mutation of mutationsList) {
41
+ if (mutation.type === 'childList' && this._buildInProgress === false) {
42
+ this._buildInProgress = true;
43
+ window.requestAnimationFrame(() => {
44
+ this.rebuildLayout();
45
+ });
46
+ window.requestAnimationFrame(() => this._buildInProgress = false);
47
+ break;
48
+ }
49
+ }
50
+ });
51
+ // Configure o observer para observar mudanças nos filhos
52
+ this._mutationObserver.observe(this._element, { childList: true, subtree: false });
53
+ }
54
+ disconnectedCallback() {
55
+ //disconect o _mutationObserver
56
+ if (this._mutationObserver != undefined) {
57
+ this._mutationObserver.disconnect();
58
+ }
24
59
  }
25
60
  initSplit() {
26
61
  if (!this._items.length) {
@@ -139,5 +174,21 @@ export class SplitPanel {
139
174
  }
140
175
  };
141
176
  }
177
+ static get methods() {
178
+ return {
179
+ "rebuildLayout": {
180
+ "complexType": {
181
+ "signature": "() => Promise<void>",
182
+ "parameters": [],
183
+ "references": {},
184
+ "return": "Promise<void>"
185
+ },
186
+ "docs": {
187
+ "text": "",
188
+ "tags": []
189
+ }
190
+ }
191
+ };
192
+ }
142
193
  static get elementRef() { return "_element"; }
143
194
  }
@@ -6,7 +6,7 @@
6
6
 
7
7
  /* Container */
8
8
  /*@doc Define a camada em que o container será exibido.*/
9
- --ez-toast__container--z-index: var(--most-visible, 3);
9
+ --ez-toast__container--z-index: var(--elevation--100, 100);
10
10
  /*@doc Define a cor de fundo do container.*/
11
11
  --ez-toast__container--background-color: var(--color--secondary, #383c45);
12
12
  /*@doc Define a posição esquerda do container.*/
@@ -123800,7 +123800,7 @@ class DataSource {
123800
123800
  this._waitingForLoad = false;
123801
123801
  this.callbackGetRows(this._lastLoadingParams);
123802
123802
  if (this._options) {
123803
- this._options.onPaginationChange(this._dataUnit.getPaginationInfo());
123803
+ this._options.onPaginationChange(this._dataUnit.getPaginationInfo(), action.payload.selectFirstRecord);
123804
123804
  }
123805
123805
  this.updateSelection();
123806
123806
  break;
@@ -123911,8 +123911,8 @@ class EzGridCustomHeader {
123911
123911
  </div>
123912
123912
  <div id='ez-header-container' class='ez-flex ez-flex--justify-between ag-header-cell-text'>
123913
123913
  <span class='ag-header-cell-text'>${this.params.displayName}</span>
123914
- <i id='ez-grid-sort-icon-down' class='ez-icon-arrow_downward' style='display: none;margin-left: 4px;font-size: var(--text--medium, 14px);align-self: center;'></i>
123915
- <i id='ez-grid-sort-icon-up' class='ez-icon-arrow_downward' style='display: none; transform: rotate(180deg);margin-left: 4px;font-size: var(--text--medium, 14px);align-self: center;'></i>
123914
+ <i id='ez-grid-sort-icon-descendente' class='ez-icon-ordem-descendente' style='display: none;font-weight: 100;margin-left: 4px;font-size: var(--text--large, 14px);align-self: center;'></i>
123915
+ <i id='ez-grid-sort-icon-ascendente' class='ez-icon-ordem-ascendente' style='display: none;font-weight: 100;margin-left: 4px;font-size: var(--text--large, 14px);align-self: center;'></i>
123916
123916
  </div>
123917
123917
  `;
123918
123918
  this.configMenuClick();
@@ -123941,8 +123941,8 @@ class EzGridCustomHeader {
123941
123941
  }
123942
123942
  configSortListener() {
123943
123943
  if (this.params.enableSorting) {
123944
- this.sortUpIcon = this.element.querySelector('#ez-grid-sort-icon-up');
123945
- this.sortDownIcon = this.element.querySelector('#ez-grid-sort-icon-down');
123944
+ this.sortUpIcon = this.element.querySelector('#ez-grid-sort-icon-ascendente');
123945
+ this.sortDownIcon = this.element.querySelector('#ez-grid-sort-icon-descendente');
123946
123946
  this.onSortChangedListener = this.configSortIcon.bind(this);
123947
123947
  this.params.column.addEventListener('sortChanged', this.onSortChangedListener);
123948
123948
  this.configSortIcon();
@@ -124779,7 +124779,7 @@ class AgGridController {
124779
124779
  }
124780
124780
  buildMenuItemOptionSort(params, sortOrder) {
124781
124781
  return {
124782
- icon: `<i class='ez-icon-arrow_downward'></i>`,
124782
+ icon: sortOrder === 'asc' ? `<i class='ez-icon-ordem-ascendente'></i>` : `<i class='ez-icon-ordem-descendente'></i>`,
124783
124783
  name: sortOrder === 'asc' ? 'Ordenar Ascendente' : 'Ordenar Descendente',
124784
124784
  action: () => this.sortDataByColumn(params, sortOrder),
124785
124785
  };
@@ -125857,16 +125857,8 @@ const EzGrid$1 = class extends HTMLElement$1 {
125857
125857
  this._gridController.initDatagrid(this._container, {
125858
125858
  onColumnStateChange: (type, state, info) => this.onColumnStateChange(type, state, info),
125859
125859
  onSelectionChange: (selection) => this.ezSelectionChange.emit(selection),
125860
- onPaginationChange: (paginationInfo) => {
125861
- var _a;
125862
- if (((_a = this._paginationInfo) === null || _a === void 0 ? void 0 : _a.currentPage) > (paginationInfo === null || paginationInfo === void 0 ? void 0 : paginationInfo.currentPage) && this._paginationChangedByKeyboard) {
125863
- this._gridController.setFocusLastRow();
125864
- }
125865
- else {
125866
- this._gridController.setFocusFirstRow();
125867
- this._paginationChangedByKeyboard = true;
125868
- }
125869
- this._paginationInfo = paginationInfo;
125860
+ onPaginationChange: (paginationInfo, selectFirstRecord) => {
125861
+ this.handlePaginationChange(selectFirstRecord, paginationInfo);
125870
125862
  },
125871
125863
  onPaginationUpdate: (paginationInfo) => {
125872
125864
  this._paginationInfo = paginationInfo;
@@ -125894,6 +125886,19 @@ const EzGrid$1 = class extends HTMLElement$1 {
125894
125886
  this._gridController.configFilterColumn(this._filterColumn);
125895
125887
  this._initHeaderOverflowWatcher();
125896
125888
  }
125889
+ handlePaginationChange(selectFirstRecord, paginationInfo) {
125890
+ var _a;
125891
+ if (selectFirstRecord !== false) {
125892
+ if (((_a = this._paginationInfo) === null || _a === void 0 ? void 0 : _a.currentPage) > (paginationInfo === null || paginationInfo === void 0 ? void 0 : paginationInfo.currentPage) && this._paginationChangedByKeyboard) {
125893
+ this._gridController.setFocusLastRow();
125894
+ }
125895
+ else {
125896
+ this._gridController.setFocusFirstRow();
125897
+ this._paginationChangedByKeyboard = true;
125898
+ }
125899
+ }
125900
+ this._paginationInfo = paginationInfo;
125901
+ }
125897
125902
  _getActualPageLabel() {
125898
125903
  const { firstRecord, lastRecord } = this._paginationInfo;
125899
125904
  return `${firstRecord}-${lastRecord}`;
@@ -126794,6 +126799,12 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
126794
126799
  this.cancelButtonStatus = undefined;
126795
126800
  this.okButtonStatus = undefined;
126796
126801
  }
126802
+ handleKeyDown(event) {
126803
+ if (event.key === 'Escape' || event.key === 'Esc')
126804
+ this.ezModalAction.emit(ModalAction$1.CANCEL);
126805
+ if (event.key === 'Enter')
126806
+ this.ezModalAction.emit(ModalAction$1.OK);
126807
+ }
126797
126808
  cancelIsVisible() {
126798
126809
  return (this.cancelButtonStatus !== ModalButtonStatus$1.HIDDEN && this.cancelButtonLabel != undefined);
126799
126810
  }
@@ -127334,6 +127345,7 @@ const EzPopup$1 = class extends HTMLElement$1 {
127334
127345
  this.__registerHost();
127335
127346
  this.__attachShadow();
127336
127347
  this.ezClosePopup = createEvent(this, "ezClosePopup", 7);
127348
+ this.ezPopupAction = createEvent(this, "ezPopupAction", 7);
127337
127349
  this._sizeClasses = {
127338
127350
  "x-small": "col--sd-3 ez-popup__size-limit--x-small",
127339
127351
  "small": "col--sd-5",
@@ -127351,6 +127363,12 @@ const EzPopup$1 = class extends HTMLElement$1 {
127351
127363
  observeConfig() {
127352
127364
  this.manageOverflow();
127353
127365
  }
127366
+ handleKeyDown(event) {
127367
+ if (event.key === 'Escape' || event.key === 'Esc')
127368
+ this.opened = false;
127369
+ if (event.key === 'Enter')
127370
+ this.ezPopupAction.emit("OK");
127371
+ }
127354
127372
  manageOverflow() {
127355
127373
  if (this.opened) {
127356
127374
  window.document.body.style.overflow = "hidden";
@@ -127627,9 +127645,9 @@ const EzSearch$1 = class extends HTMLElement$1 {
127627
127645
  this.__registerHost();
127628
127646
  this.__attachShadow();
127629
127647
  this.ezChange = createEvent(this, "ezChange", 7);
127630
- this._changeDeboucingTimeout = null;
127631
- this._limitCharsToSearch = 3;
127632
- this._deboucingTime = 300;
127648
+ this._changeDebouncingTimeout = null;
127649
+ this._limitCharsToSearch = 2;
127650
+ this._debouncingTime = 300;
127633
127651
  this._maxWidthValue = 0;
127634
127652
  this._tabPressed = false;
127635
127653
  this._textEmptyList = "Nenhum resultado encontrado";
@@ -128002,7 +128020,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
128002
128020
  else {
128003
128021
  window.setTimeout(() => {
128004
128022
  this.setInputValue();
128005
- }, this._deboucingTime);
128023
+ }, this._debouncingTime);
128006
128024
  }
128007
128025
  this.resetOptions();
128008
128026
  }
@@ -128176,9 +128194,9 @@ const EzSearch$1 = class extends HTMLElement$1 {
128176
128194
  var _a;
128177
128195
  this.clearDeboucingTimeout();
128178
128196
  if (this._startLoading) {
128179
- this._changeDeboucingTimeout = window.setTimeout(() => {
128197
+ this._changeDebouncingTimeout = window.setTimeout(() => {
128180
128198
  this.onTextInputChangeHandler(event);
128181
- }, this._deboucingTime);
128199
+ }, this._debouncingTime);
128182
128200
  return;
128183
128201
  }
128184
128202
  const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
@@ -128192,9 +128210,9 @@ const EzSearch$1 = class extends HTMLElement$1 {
128192
128210
  this.clearSource();
128193
128211
  if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
128194
128212
  this._showLoading = true;
128195
- this._changeDeboucingTimeout = window.setTimeout(() => {
128213
+ this._changeDebouncingTimeout = window.setTimeout(() => {
128196
128214
  this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
128197
- }, this._deboucingTime);
128215
+ }, this._debouncingTime);
128198
128216
  this.showOptions();
128199
128217
  }
128200
128218
  else {
@@ -128208,9 +128226,9 @@ const EzSearch$1 = class extends HTMLElement$1 {
128208
128226
  }
128209
128227
  }
128210
128228
  clearDeboucingTimeout() {
128211
- if (this._changeDeboucingTimeout) {
128212
- window.clearTimeout(this._changeDeboucingTimeout);
128213
- this._changeDeboucingTimeout = null;
128229
+ if (this._changeDebouncingTimeout) {
128230
+ window.clearTimeout(this._changeDebouncingTimeout);
128231
+ this._changeDebouncingTimeout = null;
128214
128232
  }
128215
128233
  }
128216
128234
  keyDownHandler(event) {
@@ -128261,6 +128279,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
128261
128279
  }
128262
128280
  render() {
128263
128281
  var _a;
128282
+ console.log(this.optionLoader);
128264
128283
  ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
128265
128284
  return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "search" })), ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
128266
128285
  ? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
@@ -129221,12 +129240,24 @@ const SplitPanel = class extends HTMLElement$1 {
129221
129240
  super();
129222
129241
  this.__registerHost();
129223
129242
  this._items = [];
129243
+ this._buildInProgress = false;
129224
129244
  this.direction = 'column';
129225
129245
  this.anchorToExpand = false;
129226
129246
  }
129227
- componentDidLoad() {
129247
+ rebuildLayout() {
129248
+ Array.from(this._element.querySelectorAll(".ez-split-gutter")).reverse().forEach(el => {
129249
+ el.remove();
129250
+ });
129251
+ Array.from(this._element.getElementsByTagName("EzSplitPanel")).reverse().forEach(el => {
129252
+ el['rebuildLayout']();
129253
+ });
129254
+ this.buildItems();
129255
+ this.initSplit();
129256
+ }
129257
+ buildItems() {
129228
129258
  this._panelID = StringUtils$1.generateUUID();
129229
129259
  this._element.dataset.panelId = this._panelID;
129260
+ this._element.dataset.uniqueId = "EzSplitPanel";
129230
129261
  let itemsElements = Array.from(this._element.children);
129231
129262
  this._items = itemsElements.filter(child => { var _a; return ((_a = child.tagName) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'EZ-SPLIT-ITEM'; });
129232
129263
  let trackCount = 1;
@@ -129237,7 +129268,30 @@ const SplitPanel = class extends HTMLElement$1 {
129237
129268
  }
129238
129269
  trackCount += 2;
129239
129270
  });
129271
+ }
129272
+ componentDidLoad() {
129273
+ this.buildItems();
129240
129274
  this.initSplit();
129275
+ this._mutationObserver = new MutationObserver((mutationsList) => {
129276
+ for (const mutation of mutationsList) {
129277
+ if (mutation.type === 'childList' && this._buildInProgress === false) {
129278
+ this._buildInProgress = true;
129279
+ window.requestAnimationFrame(() => {
129280
+ this.rebuildLayout();
129281
+ });
129282
+ window.requestAnimationFrame(() => this._buildInProgress = false);
129283
+ break;
129284
+ }
129285
+ }
129286
+ });
129287
+ // Configure o observer para observar mudanças nos filhos
129288
+ this._mutationObserver.observe(this._element, { childList: true, subtree: false });
129289
+ }
129290
+ disconnectedCallback() {
129291
+ //disconect o _mutationObserver
129292
+ if (this._mutationObserver != undefined) {
129293
+ this._mutationObserver.disconnect();
129294
+ }
129241
129295
  }
129242
129296
  initSplit() {
129243
129297
  if (!this._items.length) {
@@ -130205,7 +130259,7 @@ const EzTimeInput$1 = class extends HTMLElement$1 {
130205
130259
  static get style() { return ezTimeInputCss; }
130206
130260
  };
130207
130261
 
130208
- const ezToastCss = ":host{--ez-toast__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--ez-toast__container--z-index:var(--most-visible, 3);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__container--left:var(--space--large, 24px);--ez-toast__container--bottom:var(--space--large, 24px);--ez-toast__container--width:400px;--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;box-sizing:border-box;border-radius:6px;align-items:center;padding:12px;visibility:hidden;width:var(--ez-toast__container--width);left:var(--ez-toast__container--left);bottom:var(--ez-toast__container--bottom);z-index:var(--ez-toast__container--z-index);background-color:var(--ez-toast__container--background-color)}.message__container{text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:4;display:-webkit-box;text-overflow:ellipsis;font-family:var(--font-pattern, \"Roboto\")}.message__container--icon{width:80%;padding-left:var(--ez-toast__icon--padding-left)}.btn-close{margin-top:3px;display:flex;justify-content:flex-end;align-self:flex-start;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--ez-toast__btn__close__image);mask-image:var(--ez-toast__btn__close__image)}.toast__container--opened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@-webkit-keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}@keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}";
130262
+ const ezToastCss = ":host{--ez-toast__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--ez-toast__container--z-index:var(--elevation--100, 100);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__container--left:var(--space--large, 24px);--ez-toast__container--bottom:var(--space--large, 24px);--ez-toast__container--width:400px;--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;box-sizing:border-box;border-radius:6px;align-items:center;padding:12px;visibility:hidden;width:var(--ez-toast__container--width);left:var(--ez-toast__container--left);bottom:var(--ez-toast__container--bottom);z-index:var(--ez-toast__container--z-index);background-color:var(--ez-toast__container--background-color)}.message__container{text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:4;display:-webkit-box;text-overflow:ellipsis;font-family:var(--font-pattern, \"Roboto\")}.message__container--icon{width:80%;padding-left:var(--ez-toast__icon--padding-left)}.btn-close{margin-top:3px;display:flex;justify-content:flex-end;align-self:flex-start;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--ez-toast__btn__close__image);mask-image:var(--ez-toast__btn__close__image)}.toast__container--opened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@keyframes fadein{from{opacity:0;left:calc(var(--ez-toast__container--left) * -1)}to{opacity:1;left:var(--ez-toast__container--left)}}@-webkit-keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}@keyframes fadeout{from{opacity:1;left:var(--ez-toast__container--left)}to{bottom:0;opacity:0}}";
130209
130263
 
130210
130264
  const EzToast$1 = class extends HTMLElement$1 {
130211
130265
  constructor() {
@@ -131547,11 +131601,11 @@ const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[5
131547
131601
  const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"_listItems":[32],"_listGroupItems":[32]}]);
131548
131602
  const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
131549
131603
  const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"scrim":[1]}]);
131550
- const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]);
131604
+ const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]},[[8,"keydown","handleKeyDown"]]]);
131551
131605
  const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[1040],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
131552
131606
  const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513]}]);
131553
131607
  const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"]}]);
131554
- const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]);
131608
+ const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]},[[8,"keydown","handleKeyDown"]]]);
131555
131609
  const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
131556
131610
  const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]);
131557
131611
  const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
@@ -118884,7 +118884,7 @@ class DataSource {
118884
118884
  this._waitingForLoad = false;
118885
118885
  this.callbackGetRows(this._lastLoadingParams);
118886
118886
  if (this._options) {
118887
- this._options.onPaginationChange(this._dataUnit.getPaginationInfo());
118887
+ this._options.onPaginationChange(this._dataUnit.getPaginationInfo(), action.payload.selectFirstRecord);
118888
118888
  }
118889
118889
  this.updateSelection();
118890
118890
  break;
@@ -118995,8 +118995,8 @@ class EzGridCustomHeader {
118995
118995
  </div>
118996
118996
  <div id='ez-header-container' class='ez-flex ez-flex--justify-between ag-header-cell-text'>
118997
118997
  <span class='ag-header-cell-text'>${this.params.displayName}</span>
118998
- <i id='ez-grid-sort-icon-down' class='ez-icon-arrow_downward' style='display: none;margin-left: 4px;font-size: var(--text--medium, 14px);align-self: center;'></i>
118999
- <i id='ez-grid-sort-icon-up' class='ez-icon-arrow_downward' style='display: none; transform: rotate(180deg);margin-left: 4px;font-size: var(--text--medium, 14px);align-self: center;'></i>
118998
+ <i id='ez-grid-sort-icon-descendente' class='ez-icon-ordem-descendente' style='display: none;font-weight: 100;margin-left: 4px;font-size: var(--text--large, 14px);align-self: center;'></i>
118999
+ <i id='ez-grid-sort-icon-ascendente' class='ez-icon-ordem-ascendente' style='display: none;font-weight: 100;margin-left: 4px;font-size: var(--text--large, 14px);align-self: center;'></i>
119000
119000
  </div>
119001
119001
  `;
119002
119002
  this.configMenuClick();
@@ -119025,8 +119025,8 @@ class EzGridCustomHeader {
119025
119025
  }
119026
119026
  configSortListener() {
119027
119027
  if (this.params.enableSorting) {
119028
- this.sortUpIcon = this.element.querySelector('#ez-grid-sort-icon-up');
119029
- this.sortDownIcon = this.element.querySelector('#ez-grid-sort-icon-down');
119028
+ this.sortUpIcon = this.element.querySelector('#ez-grid-sort-icon-ascendente');
119029
+ this.sortDownIcon = this.element.querySelector('#ez-grid-sort-icon-descendente');
119030
119030
  this.onSortChangedListener = this.configSortIcon.bind(this);
119031
119031
  this.params.column.addEventListener('sortChanged', this.onSortChangedListener);
119032
119032
  this.configSortIcon();
@@ -119863,7 +119863,7 @@ class AgGridController {
119863
119863
  }
119864
119864
  buildMenuItemOptionSort(params, sortOrder) {
119865
119865
  return {
119866
- icon: `<i class='ez-icon-arrow_downward'></i>`,
119866
+ icon: sortOrder === 'asc' ? `<i class='ez-icon-ordem-ascendente'></i>` : `<i class='ez-icon-ordem-descendente'></i>`,
119867
119867
  name: sortOrder === 'asc' ? 'Ordenar Ascendente' : 'Ordenar Descendente',
119868
119868
  action: () => this.sortDataByColumn(params, sortOrder),
119869
119869
  };
@@ -120940,16 +120940,8 @@ const EzGrid = class {
120940
120940
  this._gridController.initDatagrid(this._container, {
120941
120941
  onColumnStateChange: (type, state, info) => this.onColumnStateChange(type, state, info),
120942
120942
  onSelectionChange: (selection) => this.ezSelectionChange.emit(selection),
120943
- onPaginationChange: (paginationInfo) => {
120944
- var _a;
120945
- if (((_a = this._paginationInfo) === null || _a === void 0 ? void 0 : _a.currentPage) > (paginationInfo === null || paginationInfo === void 0 ? void 0 : paginationInfo.currentPage) && this._paginationChangedByKeyboard) {
120946
- this._gridController.setFocusLastRow();
120947
- }
120948
- else {
120949
- this._gridController.setFocusFirstRow();
120950
- this._paginationChangedByKeyboard = true;
120951
- }
120952
- this._paginationInfo = paginationInfo;
120943
+ onPaginationChange: (paginationInfo, selectFirstRecord) => {
120944
+ this.handlePaginationChange(selectFirstRecord, paginationInfo);
120953
120945
  },
120954
120946
  onPaginationUpdate: (paginationInfo) => {
120955
120947
  this._paginationInfo = paginationInfo;
@@ -120977,6 +120969,19 @@ const EzGrid = class {
120977
120969
  this._gridController.configFilterColumn(this._filterColumn);
120978
120970
  this._initHeaderOverflowWatcher();
120979
120971
  }
120972
+ handlePaginationChange(selectFirstRecord, paginationInfo) {
120973
+ var _a;
120974
+ if (selectFirstRecord !== false) {
120975
+ if (((_a = this._paginationInfo) === null || _a === void 0 ? void 0 : _a.currentPage) > (paginationInfo === null || paginationInfo === void 0 ? void 0 : paginationInfo.currentPage) && this._paginationChangedByKeyboard) {
120976
+ this._gridController.setFocusLastRow();
120977
+ }
120978
+ else {
120979
+ this._gridController.setFocusFirstRow();
120980
+ this._paginationChangedByKeyboard = true;
120981
+ }
120982
+ }
120983
+ this._paginationInfo = paginationInfo;
120984
+ }
120980
120985
  _getActualPageLabel() {
120981
120986
  const { firstRecord, lastRecord } = this._paginationInfo;
120982
120987
  return `${firstRecord}-${lastRecord}`;
@@ -31,6 +31,12 @@ const EzModalContainer = class {
31
31
  this.cancelButtonStatus = undefined;
32
32
  this.okButtonStatus = undefined;
33
33
  }
34
+ handleKeyDown(event) {
35
+ if (event.key === 'Escape' || event.key === 'Esc')
36
+ this.ezModalAction.emit(ModalAction$1.CANCEL);
37
+ if (event.key === 'Enter')
38
+ this.ezModalAction.emit(ModalAction$1.OK);
39
+ }
34
40
  cancelIsVisible() {
35
41
  return (this.cancelButtonStatus !== ModalButtonStatus$1.HIDDEN && this.cancelButtonLabel != undefined);
36
42
  }
@@ -7,6 +7,7 @@ const EzPopup = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
9
  this.ezClosePopup = createEvent(this, "ezClosePopup", 7);
10
+ this.ezPopupAction = createEvent(this, "ezPopupAction", 7);
10
11
  this._sizeClasses = {
11
12
  "x-small": "col--sd-3 ez-popup__size-limit--x-small",
12
13
  "small": "col--sd-5",
@@ -24,6 +25,12 @@ const EzPopup = class {
24
25
  observeConfig() {
25
26
  this.manageOverflow();
26
27
  }
28
+ handleKeyDown(event) {
29
+ if (event.key === 'Escape' || event.key === 'Esc')
30
+ this.opened = false;
31
+ if (event.key === 'Enter')
32
+ this.ezPopupAction.emit("OK");
33
+ }
27
34
  manageOverflow() {
28
35
  if (this.opened) {
29
36
  window.document.body.style.overflow = "hidden";