@sankhyalabs/ezui 1.1.149 → 1.1.152

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-button.cjs.entry.js +1 -1
  2. package/dist/cjs/ez-combo-box.cjs.entry.js +15 -3
  3. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-grid.cjs.entry.js +49 -18
  5. package/dist/cjs/ez-view-stack.cjs.entry.js +6 -0
  6. package/dist/cjs/ezui.cjs.js +1 -1
  7. package/dist/cjs/grid-config.cjs.entry.js +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/collection/components/ez-button/ez-button.css +2 -2
  10. package/dist/collection/components/ez-combo-box/ez-combo-box.css +40 -0
  11. package/dist/collection/components/ez-combo-box/ez-combo-box.js +20 -3
  12. package/dist/collection/components/ez-dialog/ez-dialog.css +1 -1
  13. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +44 -17
  14. package/dist/collection/components/ez-grid/controller/ag-grid/template/HeaderColumnTemplate.js +6 -2
  15. package/dist/collection/components/ez-grid/ez-grid.js +7 -6
  16. package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +1 -1
  17. package/dist/collection/components/ez-view-stack/ez-view-stack.js +22 -0
  18. package/dist/custom-elements/index.js +75 -26
  19. package/dist/esm/ez-button.entry.js +1 -1
  20. package/dist/esm/ez-combo-box.entry.js +15 -3
  21. package/dist/esm/ez-dialog.entry.js +1 -1
  22. package/dist/esm/ez-grid.entry.js +50 -19
  23. package/dist/esm/ez-view-stack.entry.js +6 -0
  24. package/dist/esm/ezui.js +1 -1
  25. package/dist/esm/grid-config.entry.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-1941aef7.entry.js +1 -0
  29. package/dist/ezui/p-2f34453f.entry.js +1 -0
  30. package/dist/ezui/p-4f2e5cf4.entry.js +1 -0
  31. package/dist/ezui/p-905688e6.entry.js +1 -0
  32. package/dist/ezui/{p-298ff75d.entry.js → p-e3c485e5.entry.js} +11 -11
  33. package/dist/ezui/{p-33cb1991.entry.js → p-ec7b7e26.entry.js} +1 -1
  34. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +2 -0
  35. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -1
  36. package/dist/types/components/ez-grid/ez-grid.d.ts +2 -2
  37. package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +4 -0
  38. package/dist/types/components.d.ts +6 -2
  39. package/package.json +1 -1
  40. package/dist/ezui/p-517d7759.entry.js +0 -1
  41. package/dist/ezui/p-6395ed55.entry.js +0 -1
  42. package/dist/ezui/p-793a28cc.entry.js +0 -1
  43. package/dist/ezui/p-c15d4d6f.entry.js +0 -1
@@ -1,11 +1,11 @@
1
1
  import { Grid as EnterpriseGrid, LicenseManager } from "ag-grid-enterprise";
2
2
  import { Grid } from "ag-grid-community";
3
3
  import gridTerms from "./i18n/pt-BR.js";
4
- import HeaderColumnTemplate from "./template/HeaderColumnTemplate.js";
4
+ import getHeaderColumnTemplate from "./template/HeaderColumnTemplate.js";
5
5
  import DataSource from "./DataSource";
6
6
  import { ApplicationContext, DataType } from "@sankhyalabs/core";
7
7
  import { SortMode, UserInterface } from "@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";
8
- import { NumberUtils } from "@sankhyalabs/core";
8
+ import { NumberUtils, StringUtils } from "@sankhyalabs/core";
9
9
  export default class AgGridController {
10
10
  constructor(enterprise) {
11
11
  this.DEFAULT_ROW_HEIGHT = 25;
@@ -82,6 +82,9 @@ export default class AgGridController {
82
82
  else {
83
83
  this._grid = new Grid(container, this._gridOptions);
84
84
  }
85
+ this._lastPageStatus = this.getPaginationStatus();
86
+ //Atualiza estado da seleção inicial
87
+ this.onSelectionChange();
85
88
  }
86
89
  }
87
90
  setOptionsEvents(opt) {
@@ -90,7 +93,7 @@ export default class AgGridController {
90
93
  opt.onColumnPinned = e => this.onCallStateChange("columnPinned", e);
91
94
  opt.onColumnMoved = e => this.onCallStateChange("columnMoved", e);
92
95
  opt.onColumnVisible = e => this.onCallStateChange("visibleChange", e);
93
- opt.onSelectionChanged = e => this.onSelectionChange(e);
96
+ opt.onSelectionChanged = () => this.onSelectionChange();
94
97
  opt.onPaginationChanged = () => this.onPaginationChange();
95
98
  opt.onRowDoubleClicked = evt => this.onRowDoubleClick(evt);
96
99
  opt.onDragStopped = evt => this.onCallStateChange("columnMovedEnd", evt);
@@ -254,6 +257,9 @@ export default class AgGridController {
254
257
  this.conditionalSet(colState, "width", s.width);
255
258
  this.conditionalSet(colState, "pinned", s.pinned !== null);
256
259
  this.conditionalSet(colState, "hidden", s.hide);
260
+ const props = new Map();
261
+ props.set('sortable', def.sortable);
262
+ this.conditionalSet(colState, "props", props);
257
263
  return colState;
258
264
  }).filter(c => c.name !== "__SELECTION__");
259
265
  }
@@ -264,9 +270,11 @@ export default class AgGridController {
264
270
  this._menuItems.push(item);
265
271
  }
266
272
  nextPage() {
273
+ this._lastPageStatus = this.getPaginationStatus();
267
274
  this._gridOptions.api.paginationGoToNextPage();
268
275
  }
269
276
  previousPage() {
277
+ this._lastPageStatus = this.getPaginationStatus();
270
278
  this._gridOptions.api.paginationGoToPreviousPage();
271
279
  }
272
280
  goToPage(page) {
@@ -316,9 +324,8 @@ export default class AgGridController {
316
324
  }
317
325
  }
318
326
  }
319
- setSelectedIndex(index) {
320
- var _a;
321
- (_a = this._gridOptions.api.getDisplayedRowAtIndex(index)) === null || _a === void 0 ? void 0 : _a.setSelected(true);
327
+ selectFirstRow() {
328
+ this._dataUnit.selectFirst();
322
329
  }
323
330
  hasPreviousRecord() {
324
331
  const pagination = this.getPaginationStatus();
@@ -349,14 +356,29 @@ export default class AgGridController {
349
356
  }
350
357
  }
351
358
  }
359
+ selectLastRow() {
360
+ this._dataUnit.selectLast();
361
+ }
362
+ setSelectedIndex(index) {
363
+ var _a;
364
+ (_a = this._gridOptions.api.getDisplayedRowAtIndex(index)) === null || _a === void 0 ? void 0 : _a.setSelected(true);
365
+ }
352
366
  buildColDef(source) {
367
+ let tooltip = undefined;
368
+ const propSortable = StringUtils.getBooleanValue(source.props.get("gridSortable"), true);
369
+ if (source.props.get("gridHeaderTooltip")) {
370
+ tooltip = source.props.get("gridHeaderTooltip");
371
+ }
372
+ else if (propSortable === false) {
373
+ tooltip = "Coluna não pode ser ordenada";
374
+ }
353
375
  return {
354
376
  headerName: source.label,
355
377
  field: source.name,
356
- sortable: true,
378
+ sortable: propSortable,
357
379
  resizable: true,
358
380
  headerComponentParams: {
359
- template: HeaderColumnTemplate
381
+ template: getHeaderColumnTemplate(tooltip)
360
382
  },
361
383
  valueFormatter: params => {
362
384
  return this.getFormatterByColumn(params, source);
@@ -392,17 +414,17 @@ export default class AgGridController {
392
414
  }
393
415
  }
394
416
  if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.SEARCH) {
395
- if (params.value !== undefined) {
417
+ if (params.value != undefined) {
396
418
  return ((_a = params === null || params === void 0 ? void 0 : params.value) === null || _a === void 0 ? void 0 : _a.value) + " - " + ((_b = params === null || params === void 0 ? void 0 : params.value) === null || _b === void 0 ? void 0 : _b.label);
397
419
  }
398
420
  }
399
421
  if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.DECIMALNUMBER) {
400
- if (params.value !== undefined) {
422
+ if (params.value != undefined) {
401
423
  return NumberUtils.format(params.value.toString(), 2, 2);
402
424
  }
403
425
  }
404
426
  if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.DATE || (source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.DATETIME) {
405
- if (params.value !== undefined) {
427
+ if (params.value != undefined) {
406
428
  return params.value.toLocaleDateString();
407
429
  }
408
430
  }
@@ -429,25 +451,30 @@ export default class AgGridController {
429
451
  }
430
452
  return false;
431
453
  }
432
- onSelectionChange(e) {
433
- const selectedNodes = e.api.getSelectedNodes();
454
+ onSelectionChange() {
455
+ const selectedNodes = this._gridOptions.api.getSelectedNodes();
434
456
  if (selectedNodes.length > 0) {
435
- this._isFirstRecordOfPage = selectedNodes[0].rowIndex === e.api.getFirstDisplayedRow();
436
- this._isLastRecordOfPage = selectedNodes[0].rowIndex === e.api.getLastDisplayedRow();
457
+ this._isFirstRecordOfPage = selectedNodes[0].rowIndex === this._gridOptions.api.getFirstDisplayedRow();
458
+ this._isLastRecordOfPage = selectedNodes[0].rowIndex === this._gridOptions.api.getLastDisplayedRow();
437
459
  }
438
460
  if (this._selectionChangeCallback) {
439
461
  this._selectionChangeCallback({
440
- selection: e.api.getSelectedRows(),
462
+ selection: this._gridOptions.api.getSelectedRows(),
441
463
  isFirstOfPage: this._isFirstRecordOfPage,
442
464
  isLastOfPage: this._isLastRecordOfPage
443
465
  });
444
466
  }
445
467
  }
446
468
  onPaginationChange() {
469
+ var _a, _b;
470
+ const currentPageStatus = this.getPaginationStatus();
471
+ if (((_a = this._lastPageStatus) === null || _a === void 0 ? void 0 : _a.currentPage) != (currentPageStatus === null || currentPageStatus === void 0 ? void 0 : currentPageStatus.currentPage)) {
472
+ ((_b = this._lastPageStatus) === null || _b === void 0 ? void 0 : _b.currentPage) < (currentPageStatus === null || currentPageStatus === void 0 ? void 0 : currentPageStatus.currentPage) ? this.selectFirstRow() : this.selectLastRow();
473
+ }
447
474
  this.syncSelection();
448
475
  if (this._paginationChangeCallback) {
449
476
  if (this._gridOptions.api) {
450
- this._paginationChangeCallback(this.getPaginationStatus());
477
+ this._paginationChangeCallback(currentPageStatus);
451
478
  }
452
479
  }
453
480
  }
@@ -1,4 +1,4 @@
1
- const HeaderColumnTemplate = `<div class="ag-cell-label-container" role="presentation">
1
+ const HeaderColumnTemplate = `<div class="ag-cell-label-container" role="presentation" title="{{HEADER_TITLE}}">
2
2
  <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
3
3
  <div ref="eLabel" class="ag-header-cell-label" role="presentation" unselectable="on">
4
4
  <span ref="eText" class="ag-header-cell-text" unselectable="on"></span>
@@ -9,4 +9,8 @@ const HeaderColumnTemplate = `<div class="ag-cell-label-container" role="present
9
9
  </div>
10
10
  </div>`;
11
11
 
12
- export default HeaderColumnTemplate;
12
+ function getHeaderColumnTemplate(headerTooltip = "") {
13
+ return HeaderColumnTemplate.replaceAll("{{HEADER_TITLE}}", headerTooltip)
14
+ }
15
+
16
+ export default getHeaderColumnTemplate;
@@ -137,7 +137,7 @@ export class EzGrid {
137
137
  componentWillLoad() {
138
138
  if (this.dataUnit) {
139
139
  this._dataUnitBridge = new DataUnitBridge(this._gridController, this.dataUnit);
140
- addEventListener("ezSelectionChange", (evt) => this.dataUnit.setSelection(evt.detail.map((r) => r.__record__id__)));
140
+ addEventListener("ezSelectionChange", (evt) => this.dataUnit.setSelection(evt.detail.selection.map((r) => r.__record__id__)));
141
141
  }
142
142
  }
143
143
  onColumnStateChange(type, state, info) {
@@ -206,7 +206,7 @@ export class EzGrid {
206
206
  componentDidLoad() {
207
207
  this._gridController.initDatagrid(this._container, {
208
208
  onColumnStateChange: (type, state, info) => this.onColumnStateChange(type, state, info),
209
- onSelectionChange: (state) => this.ezSelectionChange.emit(state.selection),
209
+ onSelectionChange: (state) => this.ezSelectionChange.emit(state),
210
210
  onPaginationChange: (status) => {
211
211
  this._navigationHasPrevious = status.hasPrevious;
212
212
  this._navigationHasNext = status.hasNext;
@@ -411,11 +411,12 @@ export class EzGrid {
411
411
  "text": "Evento disparado ao selecionar linhas da grade."
412
412
  },
413
413
  "complexType": {
414
- "original": "Array<any>",
415
- "resolved": "any[]",
414
+ "original": "EzGridSelectionStatus",
415
+ "resolved": "EzGridSelectionStatus",
416
416
  "references": {
417
- "Array": {
418
- "location": "global"
417
+ "EzGridSelectionStatus": {
418
+ "location": "import",
419
+ "path": "./controller/EzGridController"
419
420
  }
420
421
  }
421
422
  }
@@ -13,7 +13,7 @@ export class GridConfig {
13
13
  /* Creation Methods */
14
14
  createOrderList() {
15
15
  let newList = [];
16
- this.columns.forEach(column => {
16
+ this.columns.filter(col => { var _a; return StringUtils.getBooleanValue((_a = col === null || col === void 0 ? void 0 : col.props) === null || _a === void 0 ? void 0 : _a.get("sortable"), true); }).forEach(column => {
17
17
  var _a;
18
18
  let configItem = (_a = this.config) === null || _a === void 0 ? void 0 : _a.columns.find(item => item.name === column.name);
19
19
  let item = { name: column.name, label: column.label };
@@ -10,6 +10,12 @@ export class EzViewStack {
10
10
  this._focusedIndex = index;
11
11
  }
12
12
  }
13
+ /**
14
+ * Retorna o index que est� atualmente ativo e sendo exibido.
15
+ */
16
+ async getSelectedIndex() {
17
+ return this._focusedIndex;
18
+ }
13
19
  policyHideRemove() {
14
20
  let element = this._hostElem.querySelector(`#el_${this._focusedIndex}`);
15
21
  this.checkElementVisibility(element);
@@ -81,6 +87,22 @@ export class EzViewStack {
81
87
  "text": "Exibe a aba desejada de acordo com o index passado na tela fazendo com a ativa atual seja removida ou oculta dependendo da hidePolicy.",
82
88
  "tags": []
83
89
  }
90
+ },
91
+ "getSelectedIndex": {
92
+ "complexType": {
93
+ "signature": "() => Promise<number>",
94
+ "parameters": [],
95
+ "references": {
96
+ "Promise": {
97
+ "location": "global"
98
+ }
99
+ },
100
+ "return": "Promise<number>"
101
+ },
102
+ "docs": {
103
+ "text": "Retorna o index que est\uFFFD atualmente ativo e sendo exibido.",
104
+ "tags": []
105
+ }
84
106
  }
85
107
  }; }
86
108
  static get elementRef() { return "_hostElem"; }
@@ -1,6 +1,6 @@
1
1
  import { HTMLElement as HTMLElement$1, createEvent, h, forceUpdate, Host, proxyCustomElement } from '@stencil/core/internal/client';
2
2
  export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
3
- import { FloatingManager, DateUtils, TimeFormatter, UserInterface, Action, WaitingChangeException, ApplicationContext, DataUnitAction, DataUnit, NumberUtils, DataType, StringUtils, MaskFormatter } from '@sankhyalabs/core';
3
+ import { FloatingManager, DateUtils, TimeFormatter, UserInterface, Action, WaitingChangeException, ApplicationContext, DataUnitAction, DataUnit, StringUtils, NumberUtils, DataType, MaskFormatter } from '@sankhyalabs/core';
4
4
  import { UserInterface as UserInterface$1, SortMode } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
5
5
 
6
6
  const ezApplicationCss = "";
@@ -23,7 +23,7 @@ let EzApplication$1 = class extends HTMLElement$1 {
23
23
  static get style() { return ezApplicationCss; }
24
24
  };
25
25
 
26
- const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:var(--space--medium, 12px);--ez-button--padding-bottom:var(--space--medium, 12px);--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;min-width:var(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:focus{outline:none;outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";
26
+ const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:0px;--ez-button--padding-bottom:0px;--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--title--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover-color:var(--color--primary-600);--ez-button--hover--background-color:var(--background--medium, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--border--xlarge, 4px solid) var(--color--primary-300);--ez-button--focus--box-shadow:none;--ez-button--active-color:var(--color--primary-700);--ez-button--active--background-color:var(--background--strong);--ez-button--link-color:var(--color--primary, '#008561');--ez-button--link--hover-color:var(--color--primary-700, '#1C1D22');--ez-button--link--small--font-size:var(--text--small, 12px);--ez-button--link--medium--font-size:var(--text--medium, 14px);--ez-button--link--large--font-size:var(--text--large, 16px)}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;min-width:var(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:focus{outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:hover{outline:none;background-color:var(--ez-button--hover--background-color);color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}button:focus{outline:none;outline:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:active{outline:none;box-shadow:none;background-color:var(--ez-button--active--background-color);color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;--ez-icon--color:var(--ez-button--disabled-color);cursor:no-drop}.small{height:32px;--ez-button--font-size:var(--text--small, 12px)}.medium{height:42px}.large{height:46px}.btn-icon{padding:0px}.btn-icon--medium{width:42px;min-width:42px;height:42px}.btn-icon--small{width:32px;min-width:32px;height:32px}.btn-icon--large{width:46px;min-width:46px;height:46px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon:hover{color:var(--ez-button--hover-color);fill:var(--ez-button--hover-color);--ez-icon--color:var(--ez-button--hover-color)}.label-icon:active{color:var(--ez-button--active-color);fill:var(--ez-button--active-color);--ez-icon--color:var(--ez-button--active-color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);user-select:none}button:disabled+label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--disabled-color);cursor:no-drop}div.label-icon{cursor:pointer}div.label-icon,button:disabled{cursor:no-drop}a{font-family:var(--ez-button--font-family);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}a:hover{color:var(--ez-button--link--hover-color)}a.small{font-size:var(--ez-button--link--small--font-size);line-height:var(--ez-button--link--small--font-size)}a.medium{font-size:var(--ez-button--link--medium--font-size);line-height:var(--ez-button--link--medium--font-size)}a.large{font-size:var(--ez-button--link--large--font-size);line-height:var(--ez-button--link--large--font-size)}";
27
27
 
28
28
  let EzButton$1 = class extends HTMLElement$1 {
29
29
  constructor() {
@@ -592,7 +592,7 @@ class CSSVarsUtils {
592
592
  }
593
593
  }
594
594
 
595
- const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--text--primary, #626e82);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #919191);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium));--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #000)}.list-container{position:relative;width:100%}.options-list{box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-combo-box--background-color--xlight);padding:var(--ez-combo-box--space--small);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);scroll-behavior:smooth;max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small));overflow:auto}.item{text-align:left;display:flex;justify-content:space-between;align-items:center;border-radius:var(--ez-combo-box--border-radius-small);padding:0 var(--ez-combo-box--space--small);list-style-type:none;min-height:var(--ez-combo-box__list-height)}.item--label{text-align:left;flex-basis:85%;flex-grow:1;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item--value{text-align:right;flex-basis:15%;flex-grow:0;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{color:var(--ez-combo-box__btn-disabled--color);cursor:unset}.btn:disabled:hover{color:var(--ez-combo-box__btn-disabled--color);cursor:unset}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}";
595
+ const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--text--primary, #626e82);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #919191);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium));--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #000)}.list-container{position:relative;width:100%}.options-list{box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-combo-box--background-color--xlight);padding:var(--ez-combo-box--space--small);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);scroll-behavior:smooth;max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small));overflow:auto}.item{text-align:left;display:flex;justify-content:space-between;align-items:center;border-radius:var(--ez-combo-box--border-radius-small);padding:0 var(--ez-combo-box--space--small);list-style-type:none;min-height:var(--ez-combo-box__list-height)}.item--label{text-align:left;flex-basis:85%;flex-grow:1;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item--value{text-align:right;flex-basis:15%;flex-grow:0;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;padding:var(--ez-combo-box--space--small);border-radius:var(--ez-combo-box--border-radius-small);min-height:var(--ez-combo-box__list-height)}.message--no-result{color:var(--ez-combo-box__list-text--primary);font-family:var(--ez-combo-box--font-family)}.message--loading{border:2px solid var(--color--secondary-700);border-top:2px solid transparent;border-radius:50%;width:20px;height:20px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{color:var(--ez-combo-box__btn-disabled--color);cursor:unset}.btn:disabled:hover{color:var(--ez-combo-box__btn-disabled--color);cursor:unset}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
596
596
 
597
597
  let EzComboBox$1 = class extends HTMLElement$1 {
598
598
  constructor() {
@@ -603,6 +603,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
603
603
  this._limitCharsToSearch = 3;
604
604
  this._deboucingTime = 300;
605
605
  this._startLoading = false;
606
+ this._showLoading = true;
606
607
  /**
607
608
  * Deixa o campo disponível ou não para interação com usuário.
608
609
  */
@@ -742,10 +743,15 @@ let EzComboBox$1 = class extends HTMLElement$1 {
742
743
  updateSource(source) {
743
744
  this._startLoading = false;
744
745
  if (source instanceof Promise) {
745
- source.then(result => this.updateSource(result));
746
+ this._showLoading = true;
747
+ source.then(result => {
748
+ this._showLoading = false;
749
+ this.updateSource(result);
750
+ }).catch(() => this._showLoading = false);
746
751
  this.updateVisibleOptions();
747
752
  }
748
753
  else {
754
+ this._showLoading = false;
749
755
  if (Array.isArray(source)) {
750
756
  this._source = source;
751
757
  this.updateVisibleOptions();
@@ -755,6 +761,10 @@ let EzComboBox$1 = class extends HTMLElement$1 {
755
761
  }
756
762
  }
757
763
  }
764
+ clearSource() {
765
+ this._source = [];
766
+ this.updateVisibleOptions();
767
+ }
758
768
  selectOption(newOption) {
759
769
  var _a, _b;
760
770
  const currentOpt = this.getSelectedOption();
@@ -843,6 +853,8 @@ let EzComboBox$1 = class extends HTMLElement$1 {
843
853
  this._criteria = argument;
844
854
  if (argument && (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch)) {
845
855
  if (this.searchMode) {
856
+ this._showLoading = true;
857
+ this.clearSource();
846
858
  this._changeDeboucingTimeout = window.setTimeout(() => {
847
859
  this.loadOptions("PREDICTIVE", isNaN(argumentNumber) ? argument : argumentNumber.toString());
848
860
  }, this._deboucingTime);
@@ -888,7 +900,7 @@ let EzComboBox$1 = class extends HTMLElement$1 {
888
900
  this.cancelPreselection();
889
901
  }
890
902
  render() {
891
- return (h(Host, null, h("ez-text-input", { class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._inputElement = elem, enabled: this.enabled && !this.suppressSearch, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }, h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { slot: "icon", "icon-name": this.searchMode ? "search" : "chevron-down" }))), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "options-list", ref: elem => this._optionsList = elem }, this._visibleOptions.map((opt, index) => this.buildItem(opt, index))))));
903
+ return (h(Host, null, h("ez-text-input", { class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._inputElement = elem, enabled: this.enabled && !this.suppressSearch, onInput: evt => this.onTextInputChangeHandler(evt), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, value: this.getText(), canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode, slaveMode: true }, h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { slot: "icon", "icon-name": this.searchMode ? "search" : "chevron-down" }))), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "options-list", ref: elem => this._optionsList = elem }, this._visibleOptions.length === 0 && h("div", { class: "message" }, !this._showLoading && h("span", { class: "message--no-result" }, "Nenhum resultado encontrado"), this._showLoading && h("div", { class: "message--loading" })), this._visibleOptions.length > 0 && this._visibleOptions.map((opt, index) => this.buildItem(opt, index))))));
892
904
  }
893
905
  get el() { return this; }
894
906
  static get watchers() { return {
@@ -1155,7 +1167,7 @@ let EzDateTimeInput$1 = class extends HTMLElement$1 {
1155
1167
  static get style() { return ezDateTimeInputCss; }
1156
1168
  };
1157
1169
 
1158
- const ezDialogCss = ":host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__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>');--dialog__title--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__body--text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog-z-index:var(--most-visible, 3);--dialog--warning__image:url('data: image/svg+xml;utf8,<svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895\"/></svg>');--dialog--critical__image:url('data: image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z\"/></svg>')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{background:var(--dialog__warning--background-color);--ez-icon--color:var(--dialog__icon--color);display:grid;place-items:center;width:26px;height:26px;border-radius:50%}.changeable__icon.critical{background:var(--dialog__critical--background-color)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:1.3}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title--label{padding-left:var(--dialog__title--padding-left)}.title-icon{outline:none;border:none;background-color:var(--dialog__warning--background-color);width:26px;height:26px;border-radius:100%;padding:0;display:flex;justify-content:center;align-items:center}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:'';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.title-icon--critical::after{content:'';display:flex;background-color:#FFFF;width:13px;height:13px;-webkit-mask-image:var(--dialog--critical__image);mask-image:var(--dialog--critical__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__cancel{padding-right:var(--dialog__btn__no--padding-right)}.button__confirm{--ez-button--background-color:var(--color--primary);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color--primary-600);--ez-button--hover-color:var(--color--inverted)}.button__confirm--danger{--ez-button--background-color:var(--color--alert-error-800, #BD0025);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color-alert--error-900, #a10020);--ez-button--hover-color:var(--color--inverted)}.button__confirm--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
1170
+ const ezDialogCss = ":host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__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>');--dialog__title--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, \"'Sora', 'Algerian'\");--dialog__body--text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog-z-index:var(--most-visible, 3);--dialog--warning__image:url('data: image/svg+xml;utf8,<svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895\"/></svg>');--dialog--critical__image:url('data: image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z\"/></svg>')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{background:var(--dialog__warning--background-color);--ez-icon--color:var(--dialog__icon--color);display:grid;place-items:center;width:26px;height:26px;border-radius:50%}.changeable__icon.critical{background:var(--dialog__critical--background-color)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:0}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title--label{padding-left:var(--dialog__title--padding-left)}.title-icon{outline:none;border:none;background-color:var(--dialog__warning--background-color);width:26px;height:26px;border-radius:100%;padding:0;display:flex;justify-content:center;align-items:center}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:'';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.title-icon--critical::after{content:'';display:flex;background-color:#FFFF;width:13px;height:13px;-webkit-mask-image:var(--dialog--critical__image);mask-image:var(--dialog--critical__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__cancel{padding-right:var(--dialog__btn__no--padding-right)}.button__confirm{--ez-button--background-color:var(--color--primary);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color--primary-600);--ez-button--hover-color:var(--color--inverted)}.button__confirm--danger{--ez-button--background-color:var(--color--alert-error-800, #BD0025);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color-alert--error-900, #a10020);--ez-button--hover-color:var(--color--inverted)}.button__confirm--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
1159
1171
 
1160
1172
  class Message {
1161
1173
  constructor(title, message, critical, confirm, icon, labelCancel, labelConfirm, btnConfirmDanger, callBack) {
@@ -112199,7 +112211,7 @@ const gridTerms = {
112199
112211
  ctrlV: "Ctrl+V"
112200
112212
  };
112201
112213
 
112202
- const HeaderColumnTemplate = `<div class="ag-cell-label-container" role="presentation">
112214
+ const HeaderColumnTemplate = `<div class="ag-cell-label-container" role="presentation" title="{{HEADER_TITLE}}">
112203
112215
  <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>
112204
112216
  <div ref="eLabel" class="ag-header-cell-label" role="presentation" unselectable="on">
112205
112217
  <span ref="eText" class="ag-header-cell-text" unselectable="on"></span>
@@ -112210,6 +112222,10 @@ const HeaderColumnTemplate = `<div class="ag-cell-label-container" role="present
112210
112222
  </div>
112211
112223
  </div>`;
112212
112224
 
112225
+ function getHeaderColumnTemplate(headerTooltip = "") {
112226
+ return HeaderColumnTemplate.replaceAll("{{HEADER_TITLE}}", headerTooltip)
112227
+ }
112228
+
112213
112229
  class Server {
112214
112230
  constructor(data) {
112215
112231
  this._data = data;
@@ -112400,6 +112416,9 @@ class AgGridController {
112400
112416
  else {
112401
112417
  this._grid = new agGridCommunity_cjs.Grid(container, this._gridOptions);
112402
112418
  }
112419
+ this._lastPageStatus = this.getPaginationStatus();
112420
+ //Atualiza estado da seleção inicial
112421
+ this.onSelectionChange();
112403
112422
  }
112404
112423
  }
112405
112424
  setOptionsEvents(opt) {
@@ -112408,7 +112427,7 @@ class AgGridController {
112408
112427
  opt.onColumnPinned = e => this.onCallStateChange("columnPinned", e);
112409
112428
  opt.onColumnMoved = e => this.onCallStateChange("columnMoved", e);
112410
112429
  opt.onColumnVisible = e => this.onCallStateChange("visibleChange", e);
112411
- opt.onSelectionChanged = e => this.onSelectionChange(e);
112430
+ opt.onSelectionChanged = () => this.onSelectionChange();
112412
112431
  opt.onPaginationChanged = () => this.onPaginationChange();
112413
112432
  opt.onRowDoubleClicked = evt => this.onRowDoubleClick(evt);
112414
112433
  opt.onDragStopped = evt => this.onCallStateChange("columnMovedEnd", evt);
@@ -112572,6 +112591,9 @@ class AgGridController {
112572
112591
  this.conditionalSet(colState, "width", s.width);
112573
112592
  this.conditionalSet(colState, "pinned", s.pinned !== null);
112574
112593
  this.conditionalSet(colState, "hidden", s.hide);
112594
+ const props = new Map();
112595
+ props.set('sortable', def.sortable);
112596
+ this.conditionalSet(colState, "props", props);
112575
112597
  return colState;
112576
112598
  }).filter(c => c.name !== "__SELECTION__");
112577
112599
  }
@@ -112582,9 +112604,11 @@ class AgGridController {
112582
112604
  this._menuItems.push(item);
112583
112605
  }
112584
112606
  nextPage() {
112607
+ this._lastPageStatus = this.getPaginationStatus();
112585
112608
  this._gridOptions.api.paginationGoToNextPage();
112586
112609
  }
112587
112610
  previousPage() {
112611
+ this._lastPageStatus = this.getPaginationStatus();
112588
112612
  this._gridOptions.api.paginationGoToPreviousPage();
112589
112613
  }
112590
112614
  goToPage(page) {
@@ -112634,9 +112658,8 @@ class AgGridController {
112634
112658
  }
112635
112659
  }
112636
112660
  }
112637
- setSelectedIndex(index) {
112638
- var _a;
112639
- (_a = this._gridOptions.api.getDisplayedRowAtIndex(index)) === null || _a === void 0 ? void 0 : _a.setSelected(true);
112661
+ selectFirstRow() {
112662
+ this._dataUnit.selectFirst();
112640
112663
  }
112641
112664
  hasPreviousRecord() {
112642
112665
  const pagination = this.getPaginationStatus();
@@ -112667,14 +112690,29 @@ class AgGridController {
112667
112690
  }
112668
112691
  }
112669
112692
  }
112693
+ selectLastRow() {
112694
+ this._dataUnit.selectLast();
112695
+ }
112696
+ setSelectedIndex(index) {
112697
+ var _a;
112698
+ (_a = this._gridOptions.api.getDisplayedRowAtIndex(index)) === null || _a === void 0 ? void 0 : _a.setSelected(true);
112699
+ }
112670
112700
  buildColDef(source) {
112701
+ let tooltip = undefined;
112702
+ const propSortable = StringUtils.getBooleanValue(source.props.get("gridSortable"), true);
112703
+ if (source.props.get("gridHeaderTooltip")) {
112704
+ tooltip = source.props.get("gridHeaderTooltip");
112705
+ }
112706
+ else if (propSortable === false) {
112707
+ tooltip = "Coluna não pode ser ordenada";
112708
+ }
112671
112709
  return {
112672
112710
  headerName: source.label,
112673
112711
  field: source.name,
112674
- sortable: true,
112712
+ sortable: propSortable,
112675
112713
  resizable: true,
112676
112714
  headerComponentParams: {
112677
- template: HeaderColumnTemplate
112715
+ template: getHeaderColumnTemplate(tooltip)
112678
112716
  },
112679
112717
  valueFormatter: params => {
112680
112718
  return this.getFormatterByColumn(params, source);
@@ -112710,17 +112748,17 @@ class AgGridController {
112710
112748
  }
112711
112749
  }
112712
112750
  if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface$1.SEARCH) {
112713
- if (params.value !== undefined) {
112751
+ if (params.value != undefined) {
112714
112752
  return ((_a = params === null || params === void 0 ? void 0 : params.value) === null || _a === void 0 ? void 0 : _a.value) + " - " + ((_b = params === null || params === void 0 ? void 0 : params.value) === null || _b === void 0 ? void 0 : _b.label);
112715
112753
  }
112716
112754
  }
112717
112755
  if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface$1.DECIMALNUMBER) {
112718
- if (params.value !== undefined) {
112756
+ if (params.value != undefined) {
112719
112757
  return NumberUtils.format(params.value.toString(), 2, 2);
112720
112758
  }
112721
112759
  }
112722
112760
  if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface$1.DATE || (source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface$1.DATETIME) {
112723
- if (params.value !== undefined) {
112761
+ if (params.value != undefined) {
112724
112762
  return params.value.toLocaleDateString();
112725
112763
  }
112726
112764
  }
@@ -112747,25 +112785,30 @@ class AgGridController {
112747
112785
  }
112748
112786
  return false;
112749
112787
  }
112750
- onSelectionChange(e) {
112751
- const selectedNodes = e.api.getSelectedNodes();
112788
+ onSelectionChange() {
112789
+ const selectedNodes = this._gridOptions.api.getSelectedNodes();
112752
112790
  if (selectedNodes.length > 0) {
112753
- this._isFirstRecordOfPage = selectedNodes[0].rowIndex === e.api.getFirstDisplayedRow();
112754
- this._isLastRecordOfPage = selectedNodes[0].rowIndex === e.api.getLastDisplayedRow();
112791
+ this._isFirstRecordOfPage = selectedNodes[0].rowIndex === this._gridOptions.api.getFirstDisplayedRow();
112792
+ this._isLastRecordOfPage = selectedNodes[0].rowIndex === this._gridOptions.api.getLastDisplayedRow();
112755
112793
  }
112756
112794
  if (this._selectionChangeCallback) {
112757
112795
  this._selectionChangeCallback({
112758
- selection: e.api.getSelectedRows(),
112796
+ selection: this._gridOptions.api.getSelectedRows(),
112759
112797
  isFirstOfPage: this._isFirstRecordOfPage,
112760
112798
  isLastOfPage: this._isLastRecordOfPage
112761
112799
  });
112762
112800
  }
112763
112801
  }
112764
112802
  onPaginationChange() {
112803
+ var _a, _b;
112804
+ const currentPageStatus = this.getPaginationStatus();
112805
+ if (((_a = this._lastPageStatus) === null || _a === void 0 ? void 0 : _a.currentPage) != (currentPageStatus === null || currentPageStatus === void 0 ? void 0 : currentPageStatus.currentPage)) {
112806
+ ((_b = this._lastPageStatus) === null || _b === void 0 ? void 0 : _b.currentPage) < (currentPageStatus === null || currentPageStatus === void 0 ? void 0 : currentPageStatus.currentPage) ? this.selectFirstRow() : this.selectLastRow();
112807
+ }
112765
112808
  this.syncSelection();
112766
112809
  if (this._paginationChangeCallback) {
112767
112810
  if (this._gridOptions.api) {
112768
- this._paginationChangeCallback(this.getPaginationStatus());
112811
+ this._paginationChangeCallback(currentPageStatus);
112769
112812
  }
112770
112813
  }
112771
112814
  }
@@ -112998,7 +113041,7 @@ let EzGrid$1 = class extends HTMLElement$1 {
112998
113041
  componentWillLoad() {
112999
113042
  if (this.dataUnit) {
113000
113043
  this._dataUnitBridge = new DataUnitBridge(this._gridController, this.dataUnit);
113001
- addEventListener("ezSelectionChange", (evt) => this.dataUnit.setSelection(evt.detail.map((r) => r.__record__id__)));
113044
+ addEventListener("ezSelectionChange", (evt) => this.dataUnit.setSelection(evt.detail.selection.map((r) => r.__record__id__)));
113002
113045
  }
113003
113046
  }
113004
113047
  onColumnStateChange(type, state, info) {
@@ -113067,7 +113110,7 @@ let EzGrid$1 = class extends HTMLElement$1 {
113067
113110
  componentDidLoad() {
113068
113111
  this._gridController.initDatagrid(this._container, {
113069
113112
  onColumnStateChange: (type, state, info) => this.onColumnStateChange(type, state, info),
113070
- onSelectionChange: (state) => this.ezSelectionChange.emit(state.selection),
113113
+ onSelectionChange: (state) => this.ezSelectionChange.emit(state),
113071
113114
  onPaginationChange: (status) => {
113072
113115
  this._navigationHasPrevious = status.hasPrevious;
113073
113116
  this._navigationHasNext = status.hasNext;
@@ -115265,6 +115308,12 @@ let EzViewStack$1 = class extends HTMLElement$1 {
115265
115308
  this._focusedIndex = index;
115266
115309
  }
115267
115310
  }
115311
+ /**
115312
+ * Retorna o index que est� atualmente ativo e sendo exibido.
115313
+ */
115314
+ async getSelectedIndex() {
115315
+ return this._focusedIndex;
115316
+ }
115268
115317
  policyHideRemove() {
115269
115318
  let element = this._hostElem.querySelector(`#el_${this._focusedIndex}`);
115270
115319
  this.checkElementVisibility(element);
@@ -115331,7 +115380,7 @@ let GridConfig$1 = class extends HTMLElement$1 {
115331
115380
  /* Creation Methods */
115332
115381
  createOrderList() {
115333
115382
  let newList = [];
115334
- this.columns.forEach(column => {
115383
+ this.columns.filter(col => { var _a; return StringUtils.getBooleanValue((_a = col === null || col === void 0 ? void 0 : col.props) === null || _a === void 0 ? void 0 : _a.get("sortable"), true); }).forEach(column => {
115335
115384
  var _a;
115336
115385
  let configItem = (_a = this.config) === null || _a === void 0 ? void 0 : _a.columns.find(item => item.name === column.name);
115337
115386
  let item = { name: column.name, label: column.label };
@@ -115858,7 +115907,7 @@ const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-ite
115858
115907
  const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513]}]);
115859
115908
  const EzChip = /*@__PURE__*/proxyCustomElement(EzChip$1, [1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540]}]);
115860
115909
  const EzCollapsibleBox = /*@__PURE__*/proxyCustomElement(EzCollapsibleBox$1, [1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"]}]);
115861
- const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32]}]);
115910
+ const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32]}]);
115862
115911
  const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513]}]);
115863
115912
  const EzDateTimeInput = /*@__PURE__*/proxyCustomElement(EzDateTimeInput$1, [1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513]}]);
115864
115913
  const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"]}]);