@sankhyalabs/ezui 5.20.0-dev.10 → 5.20.0-dev.11

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 (66) hide show
  1. package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
  2. package/dist/cjs/ez-date-input.cjs.entry.js +3 -0
  3. package/dist/cjs/ez-date-time-input.cjs.entry.js +3 -0
  4. package/dist/cjs/ez-grid.cjs.entry.js +7 -0
  5. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -10
  6. package/dist/cjs/ez-number-input.cjs.entry.js +3 -0
  7. package/dist/cjs/ez-split-button.cjs.entry.js +147 -0
  8. package/dist/cjs/ez-split-item.cjs.entry.js +3 -2
  9. package/dist/cjs/ez-split-panel.cjs.entry.js +6 -5
  10. package/dist/cjs/ezui.cjs.js +1 -1
  11. package/dist/cjs/index-a7b0c73d.js +8 -4
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/collection/collection-manifest.json +1 -0
  14. package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -1
  15. package/dist/collection/components/ez-date-input/ez-date-input.js +3 -0
  16. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +3 -0
  17. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +4 -0
  18. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +3 -0
  19. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +2 -10
  20. package/dist/collection/components/ez-number-input/ez-number-input.js +3 -0
  21. package/dist/collection/components/ez-split-button/ez-split-button.css +229 -0
  22. package/dist/collection/components/ez-split-button/ez-split-button.js +436 -0
  23. package/dist/collection/components/ez-split-button/test/dropdownItems.js +42 -0
  24. package/dist/collection/components/ez-split-panel/ez-split-panel.css +0 -1
  25. package/dist/collection/components/ez-split-panel/ez-split-panel.js +5 -4
  26. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +7 -3
  27. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +23 -2
  28. package/dist/custom-elements/index.d.ts +6 -0
  29. package/dist/custom-elements/index.js +173 -20
  30. package/dist/esm/ez-combo-box.entry.js +1 -1
  31. package/dist/esm/ez-date-input.entry.js +3 -0
  32. package/dist/esm/ez-date-time-input.entry.js +3 -0
  33. package/dist/esm/ez-grid.entry.js +7 -0
  34. package/dist/esm/ez-multi-selection-list.entry.js +2 -10
  35. package/dist/esm/ez-number-input.entry.js +3 -0
  36. package/dist/esm/ez-split-button.entry.js +143 -0
  37. package/dist/esm/ez-split-item.entry.js +4 -3
  38. package/dist/esm/ez-split-panel.entry.js +6 -5
  39. package/dist/esm/ezui.js +1 -1
  40. package/dist/esm/index-baa5e267.js +8 -4
  41. package/dist/esm/loader.js +1 -1
  42. package/dist/ezui/ezui.esm.js +1 -1
  43. package/dist/ezui/{p-300bf244.entry.js → p-07cbffce.entry.js} +1 -1
  44. package/dist/ezui/{p-c0f1715f.entry.js → p-18e7870d.entry.js} +1 -1
  45. package/dist/ezui/p-25ed09c6.entry.js +1 -0
  46. package/dist/ezui/p-50186acb.entry.js +1 -0
  47. package/dist/ezui/{p-ab629244.entry.js → p-661f6820.entry.js} +1 -1
  48. package/dist/ezui/p-672dd122.entry.js +1 -0
  49. package/dist/ezui/{p-40f72de4.entry.js → p-784fe207.entry.js} +1 -1
  50. package/dist/ezui/p-b9fbf4e7.entry.js +1 -0
  51. package/dist/ezui/p-e562d05e.entry.js +1 -0
  52. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -0
  53. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
  54. package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +0 -1
  55. package/dist/types/components/ez-split-button/ez-split-button.d.ts +89 -0
  56. package/dist/types/components/ez-split-button/test/dropdownItems.d.ts +2 -0
  57. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +5 -0
  58. package/dist/types/components.d.ts +123 -0
  59. package/package.json +2 -1
  60. package/react/components.d.ts +1 -0
  61. package/react/components.js +1 -0
  62. package/react/components.js.map +1 -1
  63. package/dist/ezui/p-133fae4a.entry.js +0 -1
  64. package/dist/ezui/p-24d3fede.entry.js +0 -1
  65. package/dist/ezui/p-596634e9.entry.js +0 -1
  66. package/dist/ezui/p-cd0499a2.entry.js +0 -1
@@ -0,0 +1,42 @@
1
+ export const dropdownItems = [
2
+ {
3
+ id: "1",
4
+ label: "label1",
5
+ type: 'item',
6
+ iconName: "iconName1",
7
+ subAction: {
8
+ id: "1",
9
+ label: "subActionLabel1",
10
+ type: "primary"
11
+ },
12
+ group: "group"
13
+ }, {
14
+ id: "2",
15
+ label: "label2",
16
+ type: 'item',
17
+ iconName: "iconName2",
18
+ subAction: null,
19
+ group: null,
20
+ }, {
21
+ id: "3",
22
+ label: "label3",
23
+ type: 'item',
24
+ iconName: "iconName3",
25
+ subAction: null,
26
+ group: null,
27
+ }, {
28
+ id: "",
29
+ label: "",
30
+ type: 'divider',
31
+ iconName: "",
32
+ subAction: null,
33
+ group: null,
34
+ }, {
35
+ id: "4",
36
+ label: "label4",
37
+ type: 'item',
38
+ iconName: "iconName4",
39
+ subAction: null,
40
+ group: null,
41
+ }
42
+ ];
@@ -1,5 +1,4 @@
1
1
  :host {
2
- height: 100%;
3
2
  }
4
3
 
5
4
  .ez-split-gutter {
@@ -71,16 +71,17 @@ export class SplitPanel {
71
71
  }
72
72
  getGridTemplate() {
73
73
  let template = '';
74
- this._items.forEach((_col, index) => {
74
+ this._items.forEach((col, index) => {
75
+ const size = col.size || '1fr';
75
76
  if (index === this._items.length - 1) {
76
- template += ` 1fr`;
77
+ template += ` ${size}`;
77
78
  return;
78
79
  }
79
80
  if (index === 0) {
80
- template += `1fr 5px`;
81
+ template += `${size} 5px`;
81
82
  return;
82
83
  }
83
- template += ` 1fr 5px`;
84
+ template += ` ${size} 5px`;
84
85
  });
85
86
  return template;
86
87
  }
@@ -1,12 +1,16 @@
1
1
  .box_split-item {
2
2
  background-color: var(--background--xlight);
3
- padding: var(--space--nano);
4
3
  width: 100%;
5
4
  height: 100%;
6
5
  border-radius: var(--border--radius-medium);
7
6
  box-shadow: var(--shadow);
8
- display: flex;
9
7
  flex-direction: column;
8
+ overflow: hidden;
9
+ display: flex;
10
+ padding: var(--space--nano);
11
+ }
12
+
13
+ .box_split-item > .ez-split-item--content {
10
14
  overflow: auto;
11
15
  }
12
16
 
@@ -32,5 +36,5 @@
32
36
 
33
37
  .ez-split-item--content {
34
38
  display: block;
35
- height: -webkit-fill-available;
39
+ height: 100%;
36
40
  }
@@ -1,9 +1,10 @@
1
- import { h } from '@stencil/core';
1
+ import { Host, h } from '@stencil/core';
2
2
  export class SplitItem {
3
3
  constructor() {
4
4
  this.label = undefined;
5
5
  this.enableExpand = true;
6
6
  this._expanded = false;
7
+ this.size = undefined;
7
8
  }
8
9
  /**
9
10
  * Alterna a visibilidade do painel.
@@ -12,7 +13,7 @@ export class SplitItem {
12
13
  this._expanded = !this._expanded;
13
14
  }
14
15
  render() {
15
- return (h("div", { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("div", null, this.label && (h("div", { class: "ez-margin--small" }, h("h3", { class: " ez-title ez-title--small" }, this.label)))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "medium", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content" }, h("slot", null))));
16
+ return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("div", null, this.label && (h("div", { class: "ez-margin--small" }, h("h3", { class: " ez-title ez-title--small" }, this.label)))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "medium", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content" }, h("slot", null))));
16
17
  }
17
18
  static get is() { return "ez-split-item"; }
18
19
  static get originalStyleUrls() {
@@ -61,6 +62,26 @@ export class SplitItem {
61
62
  "attribute": "enable-expand",
62
63
  "reflect": true,
63
64
  "defaultValue": "true"
65
+ },
66
+ "size": {
67
+ "type": "string",
68
+ "mutable": false,
69
+ "complexType": {
70
+ "original": "string",
71
+ "resolved": "string",
72
+ "references": {}
73
+ },
74
+ "required": false,
75
+ "optional": true,
76
+ "docs": {
77
+ "tags": [{
78
+ "name": "values",
79
+ "text": "'%', 'fr'"
80
+ }],
81
+ "text": "Define o tamanho inicial do painel."
82
+ },
83
+ "attribute": "size",
84
+ "reflect": false
64
85
  }
65
86
  };
66
87
  }
@@ -224,6 +224,12 @@ export const EzSkeleton: {
224
224
  new (): EzSkeleton;
225
225
  };
226
226
 
227
+ interface EzSplitButton extends Components.EzSplitButton, HTMLElement {}
228
+ export const EzSplitButton: {
229
+ prototype: EzSplitButton;
230
+ new (): EzSplitButton;
231
+ };
232
+
227
233
  interface EzSplitItem extends Components.EzSplitItem, HTMLElement {}
228
234
  export const EzSplitItem: {
229
235
  prototype: EzSplitItem;
@@ -2716,7 +2716,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2716
2716
  }
2717
2717
  else {
2718
2718
  window.setTimeout(() => {
2719
- this.setInputValue();
2719
+ this.setInputValue(false);
2720
2720
  }, this._deboucingTime);
2721
2721
  }
2722
2722
  this.resetOptions();
@@ -2997,6 +2997,9 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2997
2997
  this._calendar.hide();
2998
2998
  }
2999
2999
  handleBlur() {
3000
+ if (!this._changePending) {
3001
+ return;
3002
+ }
3000
3003
  try {
3001
3004
  const strValue = this._textInput.value;
3002
3005
  const newValue = DateUtils$1.strToDate(strValue);
@@ -3230,6 +3233,9 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
3230
3233
  }
3231
3234
  handleBlur() {
3232
3235
  var _a, _b;
3236
+ if (!this._changePending) {
3237
+ return;
3238
+ }
3233
3239
  try {
3234
3240
  const strValue = ((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
3235
3241
  const newValue = this.getParsedDateTime();
@@ -123736,6 +123742,9 @@ class DataSource {
123736
123742
  break;
123737
123743
  case Action.LOADING_DATA:
123738
123744
  this._waitingForLoad = true;
123745
+ if (EZ_GRID_LOADING_SOURCE !== action.payload.source) {
123746
+ this._controller.clearFilter();
123747
+ }
123739
123748
  this._controller.refresh();
123740
123749
  break;
123741
123750
  case Action.DATA_LOADED:
@@ -124533,6 +124542,10 @@ class AgGridController {
124533
124542
  this._gridOptions.api.refreshHeader();
124534
124543
  this._dataUnit.loadData(undefined, undefined, undefined, EZ_GRID_LOADING_SOURCE);
124535
124544
  }
124545
+ clearFilter() {
124546
+ this._filteredColumns.clear();
124547
+ this._gridOptions.api.refreshHeader();
124548
+ }
124536
124549
  showFilterColumn(configs) {
124537
124550
  var _a;
124538
124551
  (_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
@@ -126829,16 +126842,8 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
126829
126842
  }
126830
126843
  handleChangeSelectedItem(event) {
126831
126844
  const { detail: itemCheckSelected } = event;
126832
- this.filteredOptions = this.filteredOptions.map(item => {
126833
- if (item.label === itemCheckSelected.label) {
126834
- return Object.assign(Object.assign({}, item), { check: itemCheckSelected.check });
126835
- }
126836
- return item;
126837
- });
126838
- this.clearInputs();
126839
- }
126840
- clearInputs() {
126841
- this.filterInput ? (this.filterInput.value = '') : (this.searchInput.value = '');
126845
+ const itemSelected = this.filteredOptions.find(item => item.label === itemCheckSelected.label);
126846
+ itemSelected.check = itemCheckSelected.check;
126842
126847
  }
126843
126848
  buildViewList(hasDelete) {
126844
126849
  return (h(Fragment, null, this.displayOptionToCheckAllItems && (h("ez-check", { ref: (element) => (this.checkInput = element), label: "Selecionar todos", class: "multi-selection__select-all", onEzChange: this.handleChangeSelectAllItems.bind(this) })), h("ez-list", { class: "multi-selection__list", dataSource: this.displayOptions, listMode: "check", hoverFeedback: true, onEzCheckChange: this.handleChangeSelectedItem.bind(this), itemSlotBuilder: hasDelete ? this.buildDeleteIconSlot.bind(this) : null })));
@@ -126988,6 +126993,9 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
126988
126993
  this.ezCancelWaitingChange.emit();
126989
126994
  }
126990
126995
  handleBlur() {
126996
+ if (!this._changePending) {
126997
+ return;
126998
+ }
126991
126999
  try {
126992
127000
  const parsedNumber = this.getParsedNumber();
126993
127001
  if (parsedNumber !== undefined && isNaN(parsedNumber)) {
@@ -128243,7 +128251,148 @@ const EzSkeleton$1 = class extends HTMLElement$1 {
128243
128251
  static get style() { return ezSkeletonCss; }
128244
128252
  };
128245
128253
 
128246
- const ezSplitItemCss = ".box_split-item{background-color:var(--background--xlight);padding:var(--space--nano);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:-webkit-fill-available}";
128254
+ const ezSplitButtonCss = ":host{--ez-split-button--min-width:24;--ez-split-button--width:'auto';--ez-split-button__medium--height:32px;--ez-split-button__large--height:42px;--ez-split-button__medium-icon--width:40px;--ez-split-button__large-icon--width:44px;--ez-split-button__inline__icon--gap:6px;--ez-split-button__label--padding-top:0px;--ez-split-button__label--padding-bottom:0px;--ez-split-button__right-button--padding-left:8px;--ez-split-button--color:var(--title--primary, #FFF);--ez-split-button--font-size:var(--text--medium, 14px);--ez-split-button--font-family:var(--font-pattern, Arial);--ez-split-button--font-weight:var(--text-weight--large);--ez-split-button--background-color:var(--background--medium, #008561);--ez-split-button--border-radius:var(--border--radius-large, 12px);--ez-split-button--border:none;--ez-split-button--justify-content:center;--ez-split-button--hover-color:var(--color--primary-600);--ez-split-button--hover--background-color:var(--background--medium, var(--ez-split-button--background-color));--ez-split-button--disabled-color:var(--text--disable);--ez-split-button--disabled--background-color:var(--color--disable-secondary);--ez-split-button--focus--border:var(--border--medium, 2px) var(--color--primary-300);--ez-split-button--focus--box-shadow:none;--ez-split-button--active-color:var(--color--primary-700);--ez-split-button--active--background-color:var(--background--strong)}ez-icon{--ez-icon--color:inherit}button{position:relative;display:flex;align-items:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;white-space:nowrap;min-width:var(--ez-split-button--min-width);width:var(--ez-split-button--width);height:var(--ez-split-button__medium--height);font-family:var(--ez-split-button--font-family);font-size:var(--ez-split-button--font-size);font-weight:var(--ez-split-button--font-weight);padding:var(--ez-split-button__label--padding-top) 0 var(--ez-split-button__label--padding-bottom) 0;border-top-left-radius:var(--ez-split-button--border-radius);border-bottom-left-radius:var(--ez-split-button--border-radius);background-color:var(--ez-split-button--background-color);color:var(--ez-split-button--color);fill:var(--ez-split-button--color);border:var(--ez-split-button--border);justify-content:var(--ez-split-button--justify-content)}label{cursor:pointer}button:active{outline:none;box-shadow:none;background-color:var(--ez-split-button--active--background-color);color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.ez-split-button__left-button:focus,.ez-split-button__right-button:focus{outline:var(--ez-split-button--focus--border);box-shadow:var(--ez-split-button--focus--box-shadow)}.ez-split-button__left-button:hover,.ez-split-button__right-button:hover{outline:none;background-color:var(--ez-split-button--hover--background-color);color:var(--ez-split-button--hover-color);fill:var(--ez-split-button--hover-color);--ez-icon--color:var(--ez-split-button--hover-color)}.ez-split-button__left-button:disabled,.ez-split-button__left-button:disabled label,.ez-split-button__right-button:disabled{background-color:var(--ez-split-button--disabled--background-color);color:var(--ez-split-button--disabled-color);fill:var(--ez-split-button--disabled-color);border:none;--ez-icon--color:var(--ez-split-button--disabled-color);cursor:not-allowed}button.large{height:var(--ez-split-button__large--height)}button.medium{height:var(--ez-split-button__medium--height)}.default label{padding:var(--ez-split-button__label--padding-top) 12px var(--ez-split-button__label--padding-bottom) 20px}.icon-left{gap:var(--ez-split-button__inline__icon--gap)}.icon-left label{padding-right:12px}.icon-left ez-icon{padding-left:20px}.icon-only{padding-left:12px;padding-right:12px}.ez-split-button__right-button{border-top-right-radius:var(--ez-split-button--border-radius);border-bottom-right-radius:var(--ez-split-button--border-radius);border-top-left-radius:0;border-bottom-left-radius:0}.ez-split-button__right-button--medium{min-width:var(--ez-split-button__medium-icon--width)}.ez-split-button__right-button--large{min-width:var(--ez-split-button__large-icon--width)}.ez-split-button__right-button--divider{top:10%;bottom:10%}.ez-split-button__right-button--divider:before{content:\"\";position:absolute;left:0;border-left:1px solid rgba(0, 0, 0, 20%);border-radius:2px;height:75%}.btn-icon--medium{min-width:--ez-split-button__medium-icon--width}.btn-icon--large{min-width:--ez-split-button__large-icon--width}.ez-split-button__right-button-container{position:absolute;left:0;padding-left:var(--ez-split-button__right-button--padding-left)}.label-icon{display:flex;flex-direction:row;align-items:center;color:var(--ez-split-button--color)}.label-icon:active{color:var(--ez-split-button--active-color);fill:var(--ez-split-button--active-color);--ez-icon--color:var(--ez-split-button--active-color)}.dropdown{display:flex}.dropdown-content{display:block;position:absolute;background-color:#f1f1f1;min-width:160px;z-index:--ez-elevation--8;border-radius:var(--ez-split-button--border-radius)}.dropdown-content>ez-dropdown{position:relative}";
128255
+
128256
+ const EzSplitButton$1 = class extends HTMLElement$1 {
128257
+ constructor() {
128258
+ super();
128259
+ this.__registerHost();
128260
+ this.__attachShadow();
128261
+ this.buttonClick = createEvent(this, "buttonClick", 7);
128262
+ this.dropdownItemClick = createEvent(this, "dropdownItemClick", 7);
128263
+ this.dropdownSubActionClick = createEvent(this, "dropdownSubActionClick", 7);
128264
+ this.rightDefaultTitle = 'Mais opções';
128265
+ this.show = false;
128266
+ this.enabled = true;
128267
+ this.iconName = undefined;
128268
+ this.image = undefined;
128269
+ this.items = undefined;
128270
+ this.label = undefined;
128271
+ this.leftTitle = undefined;
128272
+ this.rightTitle = 'Mais opções';
128273
+ this.mode = 'default';
128274
+ this.size = 'medium';
128275
+ }
128276
+ /**
128277
+ * Remove o foco de ambos os botões.
128278
+ */
128279
+ async setBlur() {
128280
+ this.leftButton.blur();
128281
+ this.rightButton.blur();
128282
+ }
128283
+ /**
128284
+ * Aplica o foco no botão principal.
128285
+ */
128286
+ async setLeftButtonFocus() {
128287
+ this.leftButton.focus();
128288
+ }
128289
+ /**
128290
+ * Aplica o foco no botão do dropdown.
128291
+ */
128292
+ async setRightButtonFocus() {
128293
+ this.rightButton.focus();
128294
+ }
128295
+ clickListener(evt) {
128296
+ if (!this.enabled) {
128297
+ evt.preventDefault();
128298
+ evt.stopPropagation();
128299
+ evt.stopImmediatePropagation();
128300
+ }
128301
+ }
128302
+ getIconSize(sizeParam = 'medium') {
128303
+ var _a;
128304
+ const sizeList = ['medium', 'large'];
128305
+ const sizeLowerCase = (_a = this.size) === null || _a === void 0 ? void 0 : _a.toLowerCase();
128306
+ return sizeList.includes(sizeLowerCase) ? sizeLowerCase : sizeParam;
128307
+ }
128308
+ closeDropdown() {
128309
+ this.show = false;
128310
+ }
128311
+ toggleDropdown() {
128312
+ this.show = !this.show;
128313
+ }
128314
+ handleButtonClick() {
128315
+ this.buttonClick.emit();
128316
+ }
128317
+ handleDropdownItemClick(evt) {
128318
+ this.dropdownItemClick.emit(evt.detail);
128319
+ evt.stopPropagation();
128320
+ this.closeDropdown();
128321
+ }
128322
+ handleDropdownSubActionClick(evt) {
128323
+ this.dropdownSubActionClick.emit(evt.detail);
128324
+ evt.stopPropagation();
128325
+ this.closeDropdown();
128326
+ }
128327
+ /**
128328
+ * Método responsável em posicionar o dropdown na tela.
128329
+ * Faz com que o dropdown se ajuste automaticamente ao espaco na tela
128330
+ */
128331
+ positionDropdown() {
128332
+ const { rightButton: _rightButton, dropdownParent: _dropdownParent } = this;
128333
+ const rightButtonRect = _rightButton.getBoundingClientRect();
128334
+ const dropdownParentRect = _dropdownParent.getBoundingClientRect();
128335
+ const spaceBelow = window.innerHeight - rightButtonRect.bottom;
128336
+ const spaceAbove = rightButtonRect.top;
128337
+ const spaceRight = window.innerWidth - rightButtonRect.right;
128338
+ const spaceLeft = rightButtonRect.left;
128339
+ const hasSpaceBelow = spaceBelow < dropdownParentRect.height && spaceAbove > dropdownParentRect.height;
128340
+ const hasSpaceRight = spaceRight < dropdownParentRect.width && spaceLeft > dropdownParentRect.width;
128341
+ let top = `${rightButtonRect.bottom + window.scrollY}px`;
128342
+ let left = `${rightButtonRect.left + window.scrollX}px`;
128343
+ let bottom = 'auto';
128344
+ if (hasSpaceBelow) {
128345
+ bottom = `${window.innerHeight - rightButtonRect.top - window.scrollY}px`;
128346
+ top = 'auto';
128347
+ _dropdownParent.style.maxHeight = `${spaceAbove}px`;
128348
+ }
128349
+ if (hasSpaceRight) {
128350
+ left = `${rightButtonRect.right - dropdownParentRect.width + window.scrollX}px`;
128351
+ }
128352
+ _dropdownParent.style.top = top;
128353
+ _dropdownParent.style.bottom = bottom;
128354
+ _dropdownParent.style.left = left;
128355
+ }
128356
+ setEvents() {
128357
+ window.removeEventListener('scroll', this.positionDropdown.bind(this));
128358
+ window.addEventListener('scroll', this.positionDropdown.bind(this));
128359
+ }
128360
+ componentWillLoad() {
128361
+ this.setEvents();
128362
+ }
128363
+ componentDidLoad() {
128364
+ if (this._element)
128365
+ ElementIDUtils.addIDInfo(this._element);
128366
+ if (this.leftButton) {
128367
+ const dataInfo = { id: 'embedded' };
128368
+ ElementIDUtils.addIDInfo(this.leftButton, 'left-button', dataInfo);
128369
+ }
128370
+ if (this.rightButton) {
128371
+ const dataInfo = { id: 'embedded' };
128372
+ ElementIDUtils.addIDInfo(this.rightButton, 'right-button', dataInfo);
128373
+ }
128374
+ this.positionDropdown();
128375
+ }
128376
+ componentDidUpdate() {
128377
+ this.positionDropdown();
128378
+ }
128379
+ render() {
128380
+ const hasIconButton = this.shouldShowIconOnLeftButton();
128381
+ const hasLabelButton = this.shouldShowLabelOnLeftButton();
128382
+ const iconSize = this.getIconSize();
128383
+ return (h("div", { class: "label-icon" }, h("button", { class: `ez-split-button__left-button ${iconSize} ${this.mode}`, title: this.leftTitle || this.label, type: "button", disabled: !this.enabled, onClick: () => { this.handleButtonClick(); }, ref: el => (this.leftButton = el) }, hasIconButton && h("ez-icon", { href: this.image, iconName: this.iconName, size: iconSize }), hasLabelButton && h("label", { title: this.leftTitle || this.label }, this.label)), h("div", { class: "dropdown" }, h("button", { class: `ez-split-button__right-button ${iconSize} ez-split-button__right-button--${iconSize} ez-split-button__right-button--divider`, title: this.rightTitle || this.rightDefaultTitle, type: "button", disabled: !this.enabled, onClick: () => { this.toggleDropdown(); }, ref: el => (this.rightButton = el) }, h("ez-icon", { class: `ez-split-button__right-button-container ` + (iconSize ? `btn-icon--${iconSize}` : ''), iconName: 'chevron-down', size: iconSize })), h("div", { class: `dropdown-content dropdown-content--${this.size}`, ref: (ref) => (this.dropdownParent = ref) }, this.show && (h("ez-dropdown", { items: this.items, onClick: evt => { evt.stopPropagation(); }, onEzOutsideClick: () => { this.closeDropdown(); }, onEzClick: evt => { this.handleDropdownItemClick(evt); }, onEzSubActionClick: evt => { this.handleDropdownSubActionClick(evt); } }))))));
128384
+ }
128385
+ shouldShowLabelOnLeftButton() {
128386
+ return ['icon-left', 'default'].includes(this.mode);
128387
+ }
128388
+ shouldShowIconOnLeftButton() {
128389
+ return ['icon-left', 'icon-only'].includes(this.mode);
128390
+ }
128391
+ get _element() { return this; }
128392
+ static get style() { return ezSplitButtonCss; }
128393
+ };
128394
+
128395
+ const ezSplitItemCss = ".box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:100%}";
128247
128396
 
128248
128397
  const SplitItem = class extends HTMLElement$1 {
128249
128398
  constructor() {
@@ -128252,6 +128401,7 @@ const SplitItem = class extends HTMLElement$1 {
128252
128401
  this.label = undefined;
128253
128402
  this.enableExpand = true;
128254
128403
  this._expanded = false;
128404
+ this.size = undefined;
128255
128405
  }
128256
128406
  /**
128257
128407
  * Alterna a visibilidade do painel.
@@ -128260,7 +128410,7 @@ const SplitItem = class extends HTMLElement$1 {
128260
128410
  this._expanded = !this._expanded;
128261
128411
  }
128262
128412
  render() {
128263
- return (h("div", { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("div", null, this.label && (h("div", { class: "ez-margin--small" }, h("h3", { class: " ez-title ez-title--small" }, this.label)))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "medium", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content" }, h("slot", null))));
128413
+ return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("div", null, this.label && (h("div", { class: "ez-margin--small" }, h("h3", { class: " ez-title ez-title--small" }, this.label)))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "medium", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content" }, h("slot", null))));
128264
128414
  }
128265
128415
  static get style() { return ezSplitItemCss; }
128266
128416
  };
@@ -128942,7 +129092,7 @@ Grid.prototype.destroy = function destroy (immediate) {
128942
129092
 
128943
129093
  function index (options) { return new Grid(options); }
128944
129094
 
128945
- const ezSplitPanelCss = ":host{height:100%}.ez-split-gutter{cursor:grab;background-color:transparent}";
129095
+ const ezSplitPanelCss = ".ez-split-gutter{cursor:grab;background-color:transparent}";
128946
129096
 
128947
129097
  const SplitPanel = class extends HTMLElement$1 {
128948
129098
  constructor() {
@@ -129016,16 +129166,17 @@ const SplitPanel = class extends HTMLElement$1 {
129016
129166
  }
129017
129167
  getGridTemplate() {
129018
129168
  let template = '';
129019
- this._items.forEach((_col, index) => {
129169
+ this._items.forEach((col, index) => {
129170
+ const size = col.size || '1fr';
129020
129171
  if (index === this._items.length - 1) {
129021
- template += ` 1fr`;
129172
+ template += ` ${size}`;
129022
129173
  return;
129023
129174
  }
129024
129175
  if (index === 0) {
129025
- template += `1fr 5px`;
129176
+ template += `${size} 5px`;
129026
129177
  return;
129027
129178
  }
129028
- template += ` 1fr 5px`;
129179
+ template += ` ${size} 5px`;
129029
129180
  });
129030
129181
  return template;
129031
129182
  }
@@ -131284,7 +131435,8 @@ const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller
131284
131435
  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"]]]);
131285
131436
  const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
131286
131437
  const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
131287
- const EzSplitItem = /*@__PURE__*/proxyCustomElement(SplitItem, [4,"ez-split-item",{"label":[1],"enableExpand":[516,"enable-expand"],"_expanded":[32]}]);
131438
+ const EzSplitButton = /*@__PURE__*/proxyCustomElement(EzSplitButton$1, [1,"ez-split-button",{"enabled":[516],"iconName":[513,"icon-name"],"image":[513],"items":[16],"label":[513],"leftTitle":[513,"left-title"],"rightTitle":[513,"right-title"],"mode":[513],"size":[513],"show":[32]},[[2,"click","clickListener"]]]);
131439
+ const EzSplitItem = /*@__PURE__*/proxyCustomElement(SplitItem, [4,"ez-split-item",{"label":[1],"enableExpand":[516,"enable-expand"],"size":[1],"_expanded":[32]}]);
131288
131440
  const EzSplitPanel = /*@__PURE__*/proxyCustomElement(SplitPanel, [0,"ez-split-panel",{"direction":[1],"anchorToExpand":[4,"anchor-to-expand"]}]);
131289
131441
  const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
131290
131442
  const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"]}]);
@@ -131337,6 +131489,7 @@ const defineCustomElements = (opts) => {
131337
131489
  EzSearch,
131338
131490
  EzSidebarButton,
131339
131491
  EzSkeleton,
131492
+ EzSplitButton,
131340
131493
  EzSplitItem,
131341
131494
  EzSplitPanel,
131342
131495
  EzTabselector,
@@ -131358,4 +131511,4 @@ const defineCustomElements = (opts) => {
131358
131511
  }
131359
131512
  };
131360
131513
 
131361
- export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSkeleton, EzSplitItem, EzSplitPanel, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };
131514
+ export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSkeleton, EzSplitButton, EzSplitItem, EzSplitPanel, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };
@@ -366,7 +366,7 @@ const EzComboBox = class {
366
366
  }
367
367
  else {
368
368
  window.setTimeout(() => {
369
- this.setInputValue();
369
+ this.setInputValue(false);
370
370
  }, this._deboucingTime);
371
371
  }
372
372
  this.resetOptions();
@@ -107,6 +107,9 @@ const EzDateInput = class {
107
107
  this._calendar.hide();
108
108
  }
109
109
  handleBlur() {
110
+ if (!this._changePending) {
111
+ return;
112
+ }
110
113
  try {
111
114
  const strValue = this._textInput.value;
112
115
  const newValue = DateUtils.strToDate(strValue);
@@ -159,6 +159,9 @@ const EzDateTimeInput = class {
159
159
  }
160
160
  handleBlur() {
161
161
  var _a, _b;
162
+ if (!this._changePending) {
163
+ return;
164
+ }
162
165
  try {
163
166
  const strValue = ((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
164
167
  const newValue = this.getParsedDateTime();
@@ -118858,6 +118858,9 @@ class DataSource {
118858
118858
  break;
118859
118859
  case Action.LOADING_DATA:
118860
118860
  this._waitingForLoad = true;
118861
+ if (EZ_GRID_LOADING_SOURCE !== action.payload.source) {
118862
+ this._controller.clearFilter();
118863
+ }
118861
118864
  this._controller.refresh();
118862
118865
  break;
118863
118866
  case Action.DATA_LOADED:
@@ -119655,6 +119658,10 @@ class AgGridController {
119655
119658
  this._gridOptions.api.refreshHeader();
119656
119659
  this._dataUnit.loadData(undefined, undefined, undefined, EZ_GRID_LOADING_SOURCE);
119657
119660
  }
119661
+ clearFilter() {
119662
+ this._filteredColumns.clear();
119663
+ this._gridOptions.api.refreshHeader();
119664
+ }
119658
119665
  showFilterColumn(configs) {
119659
119666
  var _a;
119660
119667
  (_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
@@ -142,16 +142,8 @@ const EzMuiltiSelectionList = class {
142
142
  }
143
143
  handleChangeSelectedItem(event) {
144
144
  const { detail: itemCheckSelected } = event;
145
- this.filteredOptions = this.filteredOptions.map(item => {
146
- if (item.label === itemCheckSelected.label) {
147
- return Object.assign(Object.assign({}, item), { check: itemCheckSelected.check });
148
- }
149
- return item;
150
- });
151
- this.clearInputs();
152
- }
153
- clearInputs() {
154
- this.filterInput ? (this.filterInput.value = '') : (this.searchInput.value = '');
145
+ const itemSelected = this.filteredOptions.find(item => item.label === itemCheckSelected.label);
146
+ itemSelected.check = itemCheckSelected.check;
155
147
  }
156
148
  buildViewList(hasDelete) {
157
149
  return (h(Fragment, null, this.displayOptionToCheckAllItems && (h("ez-check", { ref: (element) => (this.checkInput = element), label: "Selecionar todos", class: "multi-selection__select-all", onEzChange: this.handleChangeSelectAllItems.bind(this) })), h("ez-list", { class: "multi-selection__list", dataSource: this.displayOptions, listMode: "check", hoverFeedback: true, onEzCheckChange: this.handleChangeSelectedItem.bind(this), itemSlotBuilder: hasDelete ? this.buildDeleteIconSlot.bind(this) : null })));
@@ -114,6 +114,9 @@ const EzNumberInput = class {
114
114
  this.ezCancelWaitingChange.emit();
115
115
  }
116
116
  handleBlur() {
117
+ if (!this._changePending) {
118
+ return;
119
+ }
117
120
  try {
118
121
  const parsedNumber = this.getParsedNumber();
119
122
  if (parsedNumber !== undefined && isNaN(parsedNumber)) {