@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-9999.0 → 0.0.0-bugfix-dev-KB-46291.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/dist/cjs/{CSSVarsUtils-b136a156.js → CSSVarsUtils-10c9d5b4.js} +13 -0
  2. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
  3. package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-card-item_3.cjs.entry.js +6 -5
  5. package/dist/cjs/ez-combo-box.cjs.entry.js +7 -6
  6. package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-form-view.cjs.entry.js +30 -13
  9. package/dist/cjs/ez-grid.cjs.entry.js +90 -10
  10. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +2 -10
  12. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-search.cjs.entry.js +4 -5
  15. package/dist/cjs/ez-split-button.cjs.entry.js +147 -0
  16. package/dist/cjs/ez-split-item.cjs.entry.js +11 -2
  17. package/dist/cjs/ez-split-panel.cjs.entry.js +6 -5
  18. package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
  19. package/dist/cjs/ezui.cjs.js +1 -1
  20. package/dist/cjs/index-a7b0c73d.js +8 -4
  21. package/dist/cjs/loader.cjs.js +1 -1
  22. package/dist/collection/collection-manifest.json +1 -0
  23. package/dist/collection/components/ez-alert-list/ez-alert-list.css +1 -1
  24. package/dist/collection/components/ez-card-item/ez-card-item.css +19 -5
  25. package/dist/collection/components/ez-card-item/ez-card-item.js +22 -3
  26. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +1 -0
  27. package/dist/collection/components/ez-combo-box/ez-combo-box.js +6 -5
  28. package/dist/collection/components/ez-form-view/ez-form-view.css +17 -1
  29. package/dist/collection/components/ez-form-view/ez-form-view.js +22 -5
  30. package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
  31. package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
  32. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +3 -3
  33. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
  34. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +1 -1
  35. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +1 -1
  36. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +5 -1
  37. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +2 -0
  38. package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js +21 -0
  39. package/dist/collection/components/ez-grid/ez-grid.css +25 -2
  40. package/dist/collection/components/ez-grid/ez-grid.js +65 -8
  41. package/dist/collection/components/ez-icon/ez-icon.css +118 -116
  42. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +2 -10
  43. package/dist/collection/components/ez-popup/ez-popup.css +2 -4
  44. package/dist/collection/components/ez-search/ez-search.js +3 -4
  45. package/dist/collection/components/ez-split-button/ez-split-button.css +229 -0
  46. package/dist/collection/components/ez-split-button/ez-split-button.js +436 -0
  47. package/dist/collection/components/ez-split-button/test/dropdownItems.js +42 -0
  48. package/dist/collection/components/ez-split-panel/ez-split-panel.css +0 -1
  49. package/dist/collection/components/ez-split-panel/ez-split-panel.js +5 -4
  50. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +15 -4
  51. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +27 -2
  52. package/dist/collection/utils/CSSVarsUtils.js +13 -0
  53. package/dist/custom-elements/index.d.ts +6 -0
  54. package/dist/custom-elements/index.js +309 -58
  55. package/dist/esm/{CSSVarsUtils-a97cfa29.js → CSSVarsUtils-71ce76be.js} +13 -0
  56. package/dist/esm/ez-actions-button.entry.js +1 -1
  57. package/dist/esm/ez-alert-list.entry.js +1 -1
  58. package/dist/esm/ez-card-item_3.entry.js +6 -5
  59. package/dist/esm/ez-combo-box.entry.js +7 -6
  60. package/dist/esm/ez-date-input.entry.js +1 -1
  61. package/dist/esm/ez-date-time-input.entry.js +1 -1
  62. package/dist/esm/ez-form-view.entry.js +31 -14
  63. package/dist/esm/ez-grid.entry.js +91 -11
  64. package/dist/esm/ez-icon.entry.js +1 -1
  65. package/dist/esm/ez-multi-selection-list.entry.js +2 -10
  66. package/dist/esm/ez-number-input.entry.js +1 -1
  67. package/dist/esm/ez-popup.entry.js +1 -1
  68. package/dist/esm/ez-search.entry.js +4 -5
  69. package/dist/esm/ez-split-button.entry.js +143 -0
  70. package/dist/esm/ez-split-item.entry.js +12 -3
  71. package/dist/esm/ez-split-panel.entry.js +6 -5
  72. package/dist/esm/ez-time-input.entry.js +1 -1
  73. package/dist/esm/ezui.js +1 -1
  74. package/dist/esm/index-baa5e267.js +8 -4
  75. package/dist/esm/loader.js +1 -1
  76. package/dist/ezui/ezui.esm.js +1 -1
  77. package/dist/ezui/{p-300bf244.entry.js → p-07cbffce.entry.js} +1 -1
  78. package/dist/ezui/p-248319e4.entry.js +1 -0
  79. package/dist/ezui/p-2eb8f73b.entry.js +1 -0
  80. package/dist/ezui/{p-40f72de4.entry.js → p-784fe207.entry.js} +1 -1
  81. package/dist/ezui/p-7af81663.entry.js +1 -0
  82. package/dist/ezui/p-7bc07c31.entry.js +1 -0
  83. package/dist/ezui/p-801fd0f8.entry.js +1 -0
  84. package/dist/ezui/{p-940ed30b.entry.js → p-8e7031a0.entry.js} +1 -1
  85. package/dist/ezui/{p-eb36f072.entry.js → p-99ead599.entry.js} +1 -1
  86. package/dist/ezui/{p-7eb3e1a5.js → p-9e11fc7b.js} +1 -1
  87. package/dist/ezui/{p-672dd122.entry.js → p-9f1e89c9.entry.js} +1 -1
  88. package/dist/ezui/{p-ab629244.entry.js → p-a332a654.entry.js} +2 -2
  89. package/dist/ezui/{p-02c8831a.entry.js → p-abc23d6f.entry.js} +1 -1
  90. package/dist/ezui/{p-50186acb.entry.js → p-af95cd16.entry.js} +1 -1
  91. package/dist/ezui/{p-18e7870d.entry.js → p-b567fa8c.entry.js} +1 -1
  92. package/dist/ezui/p-b9fbf4e7.entry.js +1 -0
  93. package/dist/ezui/p-db77a984.entry.js +1 -0
  94. package/dist/ezui/{p-9cad9b6e.entry.js → p-e85c48d7.entry.js} +1 -1
  95. package/dist/types/components/ez-card-item/ez-card-item.d.ts +4 -0
  96. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -0
  97. package/dist/types/components/ez-form-view/ez-form-view.d.ts +3 -0
  98. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -0
  99. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
  100. package/dist/types/components/ez-grid/controller/ag-grid/DataSourceInterceptor.d.ts +8 -0
  101. package/dist/types/components/ez-grid/ez-grid.d.ts +15 -2
  102. package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +0 -1
  103. package/dist/types/components/ez-split-button/ez-split-button.d.ts +89 -0
  104. package/dist/types/components/ez-split-button/test/dropdownItems.d.ts +2 -0
  105. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +10 -0
  106. package/dist/types/components.d.ts +131 -0
  107. package/dist/types/utils/CSSVarsUtils.d.ts +1 -0
  108. package/package.json +3 -2
  109. package/react/components.d.ts +1 -0
  110. package/react/components.js +1 -0
  111. package/react/components.js.map +1 -1
  112. package/dist/ezui/p-13dbad96.entry.js +0 -1
  113. package/dist/ezui/p-428a05fe.entry.js +0 -1
  114. package/dist/ezui/p-60848ef6.entry.js +0 -1
  115. package/dist/ezui/p-cd0499a2.entry.js +0 -1
  116. package/dist/ezui/p-e52cbcc7.entry.js +0 -1
  117. package/dist/ezui/p-e562d05e.entry.js +0 -1
@@ -1,6 +1,22 @@
1
1
  :host {
2
2
  display: flex;
3
- flex-direction: row;
4
3
  flex-wrap: wrap;
5
4
  width: 100%;
5
+
6
+ /*@doc Define o tamanho mínimo dos itens do formulário.*/
7
+ --ez-form-view__item--min-width: 220px;
8
+ /*@doc Define o espaçamento entre itens do formulário.*/
9
+ --ez-form-view__item--sapce-width: 5px;
10
+ }
11
+
12
+ .form-view__content{
13
+ display: grid;
14
+ grid-template-columns: repeat(auto-fill, minmax(var(--ez-form-view__item--min-width), 1fr));
15
+ gap: var(--ez-form-view__item--sapce-width);
16
+ width: 100%;
17
+ }
18
+
19
+ .input-full_width {
20
+ grid-column: 1 / -1;
21
+ width: 100%;
6
22
  }
@@ -1,6 +1,6 @@
1
1
  import { Host, h } from '@stencil/core';
2
2
  import { fieldBuilder } from './fieldbuilder/FieldBuilder';
3
- import { ElementIDUtils } from '@sankhyalabs/core';
3
+ import { ElementIDUtils, UserInterface } from '@sankhyalabs/core';
4
4
  import { FormItems } from './structure';
5
5
  export class EzFormView {
6
6
  constructor() {
@@ -32,19 +32,36 @@ export class EzFormView {
32
32
  const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
33
33
  this.formItemsReady.emit(formItems);
34
34
  }
35
+ isItemFullWidth(userInterface) {
36
+ return [
37
+ UserInterface.FILE,
38
+ UserInterface.LONGTEXT
39
+ ].includes(userInterface);
40
+ }
41
+ buildFormItemElement(item, classItem = "") {
42
+ if (this.isItemFullWidth(item.userInterface)) {
43
+ classItem += " input-full_width";
44
+ }
45
+ return h("div", { class: classItem }, fieldBuilder(item));
46
+ }
35
47
  render() {
36
48
  ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
37
49
  if (this.fields == undefined) {
38
50
  return;
39
51
  }
40
- return (h(Host, null, Array.from(this.groupFields(this.fields).entries()).map(([label, value]) => {
52
+ let nonArrayGrup = [];
53
+ let formContent = Array.from(this.groupFields(this.fields).entries()).map(([label, value]) => {
41
54
  if (Array.isArray(value)) {
42
- return (h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, value.map(fi => fieldBuilder(fi))));
55
+ return (h("ez-collapsible-box", { id: `group-${label}`, label: label, "header-size": "large", key: label }, h("div", { class: "form-view__content" }, value.map(fi => (this.buildFormItemElement(fi))))));
43
56
  }
44
57
  else {
45
- return fieldBuilder(value);
58
+ nonArrayGrup.push(value);
46
59
  }
47
- })));
60
+ });
61
+ // Filtra os elementos que não são arrays e os coloca dentro de uma única div
62
+ let nonArrayElements = nonArrayGrup.map((value) => this.buildFormItemElement(value));
63
+ let groupedNonArrayElements = h("div", { class: "form-view__content" }, nonArrayElements);
64
+ return (h(Host, null, groupedNonArrayElements, formContent));
48
65
  }
49
66
  static get is() { return "ez-form-view"; }
50
67
  static get encapsulation() { return "scoped"; }
@@ -7,5 +7,5 @@ export const buildCheckBox = (field) => {
7
7
  return buildField(field.name, field.label, field.readOnly, field.contextName, false);
8
8
  };
9
9
  function buildField(fieldName, fieldLabel, readOnly, contextName, switchMode) {
10
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large" }, h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.SWITCH : CheckMode.REGULAR, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName })));
10
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-align--middle ez-padding-horizontal--small ez-padding-bottom--large" }, h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.SWITCH : CheckMode.REGULAR, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName })));
11
11
  }
@@ -9,5 +9,5 @@ export const buildComboBox = ({ name, label, readOnly, required, props, contextN
9
9
  else {
10
10
  options = prop;
11
11
  }
12
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, options: options, canShowError: canShowError })));
12
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, options: options, canShowError: canShowError })));
13
13
  };
@@ -1,10 +1,10 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const buildDate = ({ name, label, readOnly, canShowError }) => {
3
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
3
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
4
4
  };
5
5
  export const buildTime = ({ name, label, readOnly, canShowError }) => {
6
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
6
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
7
7
  };
8
8
  export const buildDateTime = ({ name, label, readOnly, contextName, canShowError }) => {
9
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError })));
9
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError })));
10
10
  };
@@ -8,5 +8,5 @@ export const buildInteger = ({ name, label, readOnly, contextName, canShowError
8
8
  return buildNumeric(name, label, readOnly, 0, 0, contextName, canShowError);
9
9
  };
10
10
  function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision, contextName, canShowError) {
11
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName, canShowError: canShowError })));
11
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName, canShowError: canShowError })));
12
12
  }
@@ -1,4 +1,4 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const buildSearch = ({ name, label, readOnly, required, contextName, canShowError, optionLoader }) => {
3
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader })));
3
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader })));
4
4
  };
@@ -1,4 +1,4 @@
1
1
  import { h } from "@stencil/core";
2
2
  export const buildTextInput = ({ name, label, readOnly, contextName, canShowError }) => {
3
- return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" }, h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError })));
3
+ return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError })));
4
4
  };
@@ -19,6 +19,10 @@ export default class AgGridController {
19
19
  this._gridOptions.api.refreshHeader();
20
20
  this._dataUnit.loadData(undefined, undefined, undefined, EZ_GRID_LOADING_SOURCE);
21
21
  }
22
+ clearFilter() {
23
+ this._filteredColumns.clear();
24
+ this._gridOptions.api.refreshHeader();
25
+ }
22
26
  showFilterColumn(configs) {
23
27
  var _a;
24
28
  (_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
@@ -608,7 +612,7 @@ export default class AgGridController {
608
612
  showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon: true }),
609
613
  },
610
614
  valueFormatter: params => {
611
- if (params.value == undefined) {
615
+ if (params.value === undefined) {
612
616
  return "";
613
617
  }
614
618
  if (params.value instanceof Promise) {
@@ -1,5 +1,6 @@
1
1
  import { Action, ObjectUtils } from '@sankhyalabs/core';
2
2
  import { EZ_GRID_LOADING_SOURCE } from "../../../../utils/constants";
3
+ import { DataSourceInterceptor } from "./DataSourceInterceptor";
3
4
  export default class DataSource {
4
5
  updateLoadedRecords(action) {
5
6
  const records = action.payload;
@@ -71,6 +72,7 @@ export default class DataSource {
71
72
  this._controller.setColumnsDef(this.buildColumnDefs());
72
73
  this._options = options;
73
74
  this._dataUnit.subscribe(this.duObserver);
75
+ this._dataUnit.addInterceptor(new DataSourceInterceptor(this._controller));
74
76
  }
75
77
  updateSelection() {
76
78
  const selectionInfo = this._dataUnit.getSelectionInfo();
@@ -0,0 +1,21 @@
1
+ import { Action } from "@sankhyalabs/core";
2
+ import { DISTINCT_FILTER_NAME_PREFIX, EZ_GRID_LOADING_SOURCE } from "../../../../utils/constants";
3
+ export class DataSourceInterceptor {
4
+ constructor(controller) {
5
+ this._controller = controller;
6
+ }
7
+ clearColumnFilter(filters) {
8
+ var _a;
9
+ return (_a = filters.filter(filter => !filter.name.startsWith(DISTINCT_FILTER_NAME_PREFIX))) !== null && _a !== void 0 ? _a : [];
10
+ }
11
+ interceptAction(action) {
12
+ var _a;
13
+ if (action.type === Action.LOADING_DATA) {
14
+ if (EZ_GRID_LOADING_SOURCE !== action.payload.source) {
15
+ action.payload.filters = ((_a = action.payload) === null || _a === void 0 ? void 0 : _a.filters) !== undefined ? this.clearColumnFilter(action.payload.filters) : action.payload.filters;
16
+ this._controller.clearFilter();
17
+ }
18
+ }
19
+ return action;
20
+ }
21
+ }
@@ -4,8 +4,7 @@
4
4
  grid-template-rows: auto 1fr auto;
5
5
  height: 100%;
6
6
  width: 100%;
7
- min-height: 300px;
8
-
7
+
9
8
  /*public*/
10
9
  /*@doc Define a cor de fundo do header do componente.*/
11
10
  --ez-grid__header--background-color: var(--background--xlight, #FFF);
@@ -13,6 +12,10 @@
13
12
  --ez-grid__selection-counter--z-index: var(--visible, 1);
14
13
  /*@doc Define o sombreamento usado como borda.*/
15
14
  --ez-grid__container--shadow: 0 0 16px 0 rgb(0 38 111 / 12%);
15
+ /*@doc Define altura mínima da grid */
16
+ --ez-grid--min-height: 300px;
17
+
18
+ min-height: var(--ez-grid--min-height);
16
19
  }
17
20
 
18
21
  .grid-header {
@@ -93,3 +96,23 @@
93
96
  height: 0;
94
97
  padding: 0;
95
98
  }
99
+
100
+ .grid-header__pagination{
101
+ width: 30%;
102
+ min-width: 100px;
103
+ justify-content: flex-end;
104
+ flex-wrap: wrap;
105
+ }
106
+
107
+ .grid-header__left-container{
108
+ width: 70%
109
+ }
110
+
111
+ .grid-header__pagination-label {
112
+ width: 100%;
113
+ white-space: nowrap
114
+ }
115
+
116
+ .overflowed {
117
+ display: none;
118
+ }
@@ -1,9 +1,9 @@
1
- import { ElementIDUtils, JSUtils, StringUtils, } from '@sankhyalabs/core';
1
+ import { ElementIDUtils, JSUtils, OverflowWatcher, OVERFLOWED_CLASS_NAME, StringUtils, } from '@sankhyalabs/core';
2
2
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
3
- import { h, Host } from '@stencil/core';
3
+ import { Host, h } from '@stencil/core';
4
+ import { ApplicationUtils } from '../../utils';
4
5
  import AgGridController from './controller/ag-grid/AgGridController';
5
6
  import { SelectionCounter } from './subcomponents/selection-counter';
6
- import { ApplicationUtils } from '../../utils';
7
7
  import InMemoryFilterColumnDataSource from './utils/InMemoryFilterColumnDataSource';
8
8
  const windowInstace = window;
9
9
  const matches = (text, filter) => {
@@ -96,6 +96,14 @@ export class EzGrid {
96
96
  observeConfig(config) {
97
97
  this._gridController.setColumnsState(config.columns);
98
98
  }
99
+ updatePaginationTooltip() {
100
+ if (!this._refPaginationLabelTooltip)
101
+ return;
102
+ const alreadyDefined = this._refPaginationLabelTooltip.getAttribute('data-tooltip');
103
+ if (alreadyDefined) {
104
+ this._refPaginationLabelTooltip.setAttribute('data-tooltip', this._getPaginationTooltip());
105
+ }
106
+ }
99
107
  onSelectionChange(evt) {
100
108
  this._currentPageSelected = evt.detail.selectionHeaderStatus === true;
101
109
  if (this.dataUnit) {
@@ -251,11 +259,10 @@ export class EzGrid {
251
259
  }
252
260
  getPaginationControl() {
253
261
  if (this._paginationInfo) {
254
- const { firstRecord, lastRecord, total, count, currentPage, hasMore } = this._paginationInfo;
262
+ const { currentPage, hasMore } = this._paginationInfo;
255
263
  return [
256
- h("div", { class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium" }, h("strong", { class: "ez-text ez-text--primary ez-text--medium" }, `${firstRecord}-${lastRecord}`), total == undefined ? ` de ${count + 1} ou mais` : ` de ${total}`),
257
- h("ez-button", { size: "small", iconName: "chevron-left", class: "ez-margin-right--medium", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: "P\u00E1gina anterior" }),
258
- h("ez-button", { size: "small", iconName: "chevron-right", class: "ez-margin-right--medium", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" }),
264
+ h("div", { class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium", ref: (element) => (this._refPaginationLabel = element) }, h("span", { class: "grid-header__pagination-label" }, h("strong", { class: "ez-text ez-text--primary ez-text--medium" }, this._getActualPageLabel()), this._getRemainingPageLabel())),
265
+ h("div", { id: "grid-pagination-tooltip", ref: (element) => (this._refPaginationLabelTooltip = element), class: "ez-flex ez-margin-right--medium" }, h("ez-button", { size: "small", class: "ez-margin-right--medium", iconName: "chevron-left", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: "P\u00E1gina anterior" }), h("ez-button", { size: "small", iconName: "chevron-right", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: "Pr\u00F3xima P\u00E1gina" })),
259
266
  ];
260
267
  }
261
268
  return null;
@@ -299,6 +306,53 @@ export class EzGrid {
299
306
  this.setEvents();
300
307
  this.componentReady.emit();
301
308
  this._gridController.configFilterColumn(this._filterColumn);
309
+ this._initHeaderOverflowWatcher();
310
+ }
311
+ _getActualPageLabel() {
312
+ const { firstRecord, lastRecord } = this._paginationInfo;
313
+ return `${firstRecord}-${lastRecord}`;
314
+ }
315
+ _getRemainingPageLabel() {
316
+ const { total, count } = this._paginationInfo;
317
+ return `${total == undefined ? ` de ${count + 1} ou mais` : ` de ${total}`}`;
318
+ }
319
+ _getPaginationTooltip() {
320
+ return this._getActualPageLabel() + this._getRemainingPageLabel();
321
+ }
322
+ _initHeaderOverflowWatcher() {
323
+ this._headerOverflowWatcher = new OverflowWatcher(this.buildOverFlowWatcherParams());
324
+ }
325
+ buildOverFlowWatcherParams() {
326
+ return {
327
+ element: this._refPaginationControl,
328
+ callback: this.handleOverFlow.bind(this),
329
+ notOverFlow: ["grid-pagination-tooltip"]
330
+ };
331
+ }
332
+ handleOverFlow(elementsOverflow) {
333
+ if (!this._refPaginationLabel)
334
+ return;
335
+ if (elementsOverflow.length > 0) {
336
+ this._hidePaginationDescription();
337
+ }
338
+ else {
339
+ this._showPaginationDescription();
340
+ }
341
+ }
342
+ _hidePaginationDescription() {
343
+ this._refPaginationLabel.classList.add(OVERFLOWED_CLASS_NAME);
344
+ this._refPaginationLabelTooltip.setAttribute('data-flow', 'bottom');
345
+ this._refPaginationLabelTooltip.setAttribute('data-tooltip', this._getPaginationTooltip());
346
+ }
347
+ ;
348
+ _showPaginationDescription() {
349
+ this._refPaginationLabel.classList.remove(OVERFLOWED_CLASS_NAME);
350
+ this._refPaginationLabelTooltip.removeAttribute('data-flow');
351
+ this._refPaginationLabelTooltip.removeAttribute('data-tooltip');
352
+ }
353
+ disconnectedCallback() {
354
+ var _a;
355
+ (_a = this._headerOverflowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
302
356
  }
303
357
  componentWillRender() {
304
358
  this.configSelectionCounter();
@@ -322,7 +376,7 @@ export class EzGrid {
322
376
  }
323
377
  render() {
324
378
  var _a;
325
- return (h(Host, { "no-header": this.hideHeader() }, h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container", ref: ref => (this._refPaginationControl = ref) }, this.getPaginationControl()))), h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
379
+ return (h(Host, { "no-header": this.hideHeader() }, h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: "grid-header__container grid-header__left-container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container grid-header__pagination", ref: ref => (this._refPaginationControl = ref) }, this.getPaginationControl()))), h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
326
380
  ${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
327
381
  ` }, h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, paginationInfo: this._paginationInfo, canSelectAll: (_a = this.selectionToastConfig) === null || _a === void 0 ? void 0 : _a.canSelectAll, allRecordSelected: this._isAllSelection, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => (this._showSelectionCounter = false) })), h("div", { class: "grid__footer" }, h("slot", { name: "footer" }))));
328
382
  }
@@ -887,6 +941,9 @@ export class EzGrid {
887
941
  return [{
888
942
  "propName": "config",
889
943
  "methodName": "observeConfig"
944
+ }, {
945
+ "propName": "_paginationInfo",
946
+ "methodName": "updatePaginationTooltip"
890
947
  }];
891
948
  }
892
949
  static get listeners() {
@@ -54,6 +54,7 @@ svg {
54
54
  -moz-osx-font-smoothing: grayscale;
55
55
  }
56
56
 
57
+
57
58
  .ez-icon-2chevron-down:before { content: "\ea01"; }
58
59
  .ez-icon-2chevron-up:before { content: "\ea02"; }
59
60
  .ez-icon-acao:before { content: "\ea03"; }
@@ -91,122 +92,123 @@ svg {
91
92
  .ez-icon-circle:before { content: "\ea23"; }
92
93
  .ez-icon-cleaning:before { content: "\ea24"; }
93
94
  .ez-icon-clipboard:before { content: "\ea25"; }
94
- .ez-icon-close:before { content: "\ea26"; }
95
- .ez-icon-cobrar:before { content: "\ea27"; }
96
- .ez-icon-code:before { content: "\ea28"; }
97
- .ez-icon-configuration:before { content: "\ea29"; }
98
- .ez-icon-content-cut:before { content: "\ea2a"; }
99
- .ez-icon-copy:before { content: "\ea2b"; }
100
- .ez-icon-credit_card:before { content: "\ea2c"; }
101
- .ez-icon-crop:before { content: "\ea2d"; }
102
- .ez-icon-custom:before { content: "\ea2e"; }
103
- .ez-icon-delete-file:before { content: "\ea2f"; }
104
- .ez-icon-delete:before { content: "\ea30"; }
105
- .ez-icon-description:before { content: "\ea31"; }
106
- .ez-icon-dividir:before { content: "\ea32"; }
107
- .ez-icon-docx:before { content: "\ea33"; }
108
- .ez-icon-dot-notification:before { content: "\ea34"; }
109
- .ez-icon-dots-horizontal:before { content: "\ea35"; }
110
- .ez-icon-dots-vertical:before { content: "\ea36"; }
111
- .ez-icon-drag-indicator:before { content: "\ea37"; }
112
- .ez-icon-dual-chevron-down:before { content: "\ea38"; }
113
- .ez-icon-dual-chevron-left:before { content: "\ea39"; }
114
- .ez-icon-dual-chevron-right:before { content: "\ea3a"; }
115
- .ez-icon-dual-chevron-up:before { content: "\ea3b"; }
116
- .ez-icon-edit-file:before { content: "\ea3c"; }
117
- .ez-icon-edit-table:before { content: "\ea3d"; }
118
- .ez-icon-edit-time:before { content: "\ea3e"; }
119
- .ez-icon-edit-value:before { content: "\ea3f"; }
120
- .ez-icon-edit:before { content: "\ea40"; }
121
- .ez-icon-email:before { content: "\ea41"; }
122
- .ez-icon-estorno:before { content: "\ea42"; }
123
- .ez-icon-exe:before { content: "\ea43"; }
124
- .ez-icon-expand:before { content: "\ea44"; }
125
- .ez-icon-expandir_card:before { content: "\ea45"; }
126
- .ez-icon-extrato:before { content: "\ea46"; }
127
- .ez-icon-eye-off:before { content: "\ea47"; }
128
- .ez-icon-eye:before { content: "\ea48"; }
129
- .ez-icon-favorite:before { content: "\ea49"; }
130
- .ez-icon-figma:before { content: "\ea4a"; }
131
- .ez-icon-file-download:before { content: "\ea4b"; }
132
- .ez-icon-file-upload:before { content: "\ea4c"; }
133
- .ez-icon-filter:before { content: "\ea4d"; }
134
- .ez-icon-find-file:before { content: "\ea4e"; }
135
- .ez-icon-find-page:before { content: "\ea4f"; }
136
- .ez-icon-format-color-fill:before { content: "\ea50"; }
137
- .ez-icon-generic:before { content: "\ea51"; }
138
- .ez-icon-gif:before { content: "\ea52"; }
139
- .ez-icon-graph_bar:before { content: "\ea53"; }
140
- .ez-icon-handshake:before { content: "\ea54"; }
141
- .ez-icon-help-inverted:before { content: "\ea55"; }
142
- .ez-icon-help:before { content: "\ea56"; }
143
- .ez-icon-hide_menu:before { content: "\ea57"; }
144
- .ez-icon-home:before { content: "\ea58"; }
145
- .ez-icon-icons104:before { content: "\ea59"; }
146
- .ez-icon-language:before { content: "\ea5a"; }
147
- .ez-icon-launch:before { content: "\ea5b"; }
148
- .ez-icon-lightbulb:before { content: "\ea5c"; }
149
- .ez-icon-list:before { content: "\ea5d"; }
150
- .ez-icon-location:before { content: "\ea5e"; }
151
- .ez-icon-lock-outline:before { content: "\ea5f"; }
152
- .ez-icon-lock:before { content: "\ea60"; }
153
- .ez-icon-menu:before { content: "\ea61"; }
154
- .ez-icon-mid:before { content: "\ea62"; }
155
- .ez-icon-minus:before { content: "\ea63"; }
156
- .ez-icon-money-off:before { content: "\ea64"; }
157
- .ez-icon-money:before { content: "\ea65"; }
158
- .ez-icon-more:before { content: "\ea66"; }
159
- .ez-icon-mp3:before { content: "\ea67"; }
160
- .ez-icon-mp4:before { content: "\ea68"; }
161
- .ez-icon-multiple-files:before { content: "\ea69"; }
162
- .ez-icon-north-west:before { content: "\ea6a"; }
163
- .ez-icon-number:before { content: "\ea6b"; }
164
- .ez-icon-ordem-ascendente:before { content: "\ea6c"; }
165
- .ez-icon-ordem-descendente:before { content: "\ea6d"; }
166
- .ez-icon-parcelar:before { content: "\ea6e"; }
167
- .ez-icon-pause:before { content: "\ea6f"; }
168
- .ez-icon-payments:before { content: "\ea70"; }
169
- .ez-icon-pdf:before { content: "\ea71"; }
170
- .ez-icon-play:before { content: "\ea72"; }
171
- .ez-icon-plus:before { content: "\ea73"; }
172
- .ez-icon-png:before { content: "\ea74"; }
173
- .ez-icon-power:before { content: "\ea75"; }
174
- .ez-icon-pptx:before { content: "\ea76"; }
175
- .ez-icon-preview:before { content: "\ea77"; }
176
- .ez-icon-print:before { content: "\ea78"; }
177
- .ez-icon-push-pin:before { content: "\ea79"; }
178
- .ez-icon-rateio:before { content: "\ea7a"; }
179
- .ez-icon-receipt:before { content: "\ea7b"; }
180
- .ez-icon-recolher_card:before { content: "\ea7c"; }
181
- .ez-icon-restore:before { content: "\ea7d"; }
182
- .ez-icon-return:before { content: "\ea7e"; }
183
- .ez-icon-sankhya-place:before { content: "\ea7f"; }
184
- .ez-icon-save:before { content: "\ea80"; }
185
- .ez-icon-search:before { content: "\ea81"; }
186
- .ez-icon-settings-inverted:before { content: "\ea82"; }
187
- .ez-icon-settings:before { content: "\ea83"; }
188
- .ez-icon-share:before { content: "\ea84"; }
189
- .ez-icon-shield:before { content: "\ea85"; }
190
- .ez-icon-show_menu:before { content: "\ea86"; }
191
- .ez-icon-south-east:before { content: "\ea87"; }
192
- .ez-icon-sync:before { content: "\ea88"; }
193
- .ez-icon-table:before { content: "\ea89"; }
194
- .ez-icon-tag_code:before { content: "\ea8a"; }
195
- .ez-icon-text:before { content: "\ea8b"; }
196
- .ez-icon-timeline:before { content: "\ea8c"; }
197
- .ez-icon-timer-outline:before { content: "\ea8d"; }
198
- .ez-icon-trending-up:before { content: "\ea8e"; }
199
- .ez-icon-tune:before { content: "\ea8f"; }
200
- .ez-icon-txt:before { content: "\ea90"; }
201
- .ez-icon-un-pin:before { content: "\ea91"; }
202
- .ez-icon-unfold_less:before { content: "\ea92"; }
203
- .ez-icon-unfold_more:before { content: "\ea93"; }
204
- .ez-icon-user-circle:before { content: "\ea94"; }
205
- .ez-icon-warning-outline:before { content: "\ea95"; }
206
- .ez-icon-warning_triangle:before { content: "\ea96"; }
207
- .ez-icon-whatshot:before { content: "\ea97"; }
208
- .ez-icon-xlsx:before { content: "\ea98"; }
209
- .ez-icon-zip:before { content: "\ea99"; }
95
+ .ez-icon-clock-rotate-left:before { content: "\ea26"; }
96
+ .ez-icon-close:before { content: "\ea27"; }
97
+ .ez-icon-cobrar:before { content: "\ea28"; }
98
+ .ez-icon-code:before { content: "\ea29"; }
99
+ .ez-icon-configuration:before { content: "\ea2a"; }
100
+ .ez-icon-content-cut:before { content: "\ea2b"; }
101
+ .ez-icon-copy:before { content: "\ea2c"; }
102
+ .ez-icon-credit_card:before { content: "\ea2d"; }
103
+ .ez-icon-crop:before { content: "\ea2e"; }
104
+ .ez-icon-custom:before { content: "\ea2f"; }
105
+ .ez-icon-delete-file:before { content: "\ea30"; }
106
+ .ez-icon-delete:before { content: "\ea31"; }
107
+ .ez-icon-description:before { content: "\ea32"; }
108
+ .ez-icon-dividir:before { content: "\ea33"; }
109
+ .ez-icon-docx:before { content: "\ea34"; }
110
+ .ez-icon-dot-notification:before { content: "\ea35"; }
111
+ .ez-icon-dots-horizontal:before { content: "\ea36"; }
112
+ .ez-icon-dots-vertical:before { content: "\ea37"; }
113
+ .ez-icon-drag-indicator:before { content: "\ea38"; }
114
+ .ez-icon-dual-chevron-down:before { content: "\ea39"; }
115
+ .ez-icon-dual-chevron-left:before { content: "\ea3a"; }
116
+ .ez-icon-dual-chevron-right:before { content: "\ea3b"; }
117
+ .ez-icon-dual-chevron-up:before { content: "\ea3c"; }
118
+ .ez-icon-edit-file:before { content: "\ea3d"; }
119
+ .ez-icon-edit-table:before { content: "\ea3e"; }
120
+ .ez-icon-edit-time:before { content: "\ea3f"; }
121
+ .ez-icon-edit-value:before { content: "\ea40"; }
122
+ .ez-icon-edit:before { content: "\ea41"; }
123
+ .ez-icon-email:before { content: "\ea42"; }
124
+ .ez-icon-estorno:before { content: "\ea43"; }
125
+ .ez-icon-exe:before { content: "\ea44"; }
126
+ .ez-icon-expand:before { content: "\ea45"; }
127
+ .ez-icon-expandir_card:before { content: "\ea46"; }
128
+ .ez-icon-extrato:before { content: "\ea47"; }
129
+ .ez-icon-eye-off:before { content: "\ea48"; }
130
+ .ez-icon-eye:before { content: "\ea49"; }
131
+ .ez-icon-favorite:before { content: "\ea4a"; }
132
+ .ez-icon-figma:before { content: "\ea4b"; }
133
+ .ez-icon-file-download:before { content: "\ea4c"; }
134
+ .ez-icon-file-upload:before { content: "\ea4d"; }
135
+ .ez-icon-filter:before { content: "\ea4e"; }
136
+ .ez-icon-find-file:before { content: "\ea4f"; }
137
+ .ez-icon-find-page:before { content: "\ea50"; }
138
+ .ez-icon-format-color-fill:before { content: "\ea51"; }
139
+ .ez-icon-generic:before { content: "\ea52"; }
140
+ .ez-icon-gif:before { content: "\ea53"; }
141
+ .ez-icon-graph_bar:before { content: "\ea54"; }
142
+ .ez-icon-handshake:before { content: "\ea55"; }
143
+ .ez-icon-help-inverted:before { content: "\ea56"; }
144
+ .ez-icon-help:before { content: "\ea57"; }
145
+ .ez-icon-hide_menu:before { content: "\ea58"; }
146
+ .ez-icon-home:before { content: "\ea59"; }
147
+ .ez-icon-icons104:before { content: "\ea5a"; }
148
+ .ez-icon-language:before { content: "\ea5b"; }
149
+ .ez-icon-launch:before { content: "\ea5c"; }
150
+ .ez-icon-lightbulb:before { content: "\ea5d"; }
151
+ .ez-icon-list:before { content: "\ea5e"; }
152
+ .ez-icon-location:before { content: "\ea5f"; }
153
+ .ez-icon-lock-outline:before { content: "\ea60"; }
154
+ .ez-icon-lock:before { content: "\ea61"; }
155
+ .ez-icon-menu:before { content: "\ea62"; }
156
+ .ez-icon-mid:before { content: "\ea63"; }
157
+ .ez-icon-minus:before { content: "\ea64"; }
158
+ .ez-icon-money-off:before { content: "\ea65"; }
159
+ .ez-icon-money:before { content: "\ea66"; }
160
+ .ez-icon-more:before { content: "\ea67"; }
161
+ .ez-icon-mp3:before { content: "\ea68"; }
162
+ .ez-icon-mp4:before { content: "\ea69"; }
163
+ .ez-icon-multiple-files:before { content: "\ea6a"; }
164
+ .ez-icon-north-west:before { content: "\ea6b"; }
165
+ .ez-icon-number:before { content: "\ea6c"; }
166
+ .ez-icon-ordem-ascendente:before { content: "\ea6d"; }
167
+ .ez-icon-ordem-descendente:before { content: "\ea6e"; }
168
+ .ez-icon-parcelar:before { content: "\ea6f"; }
169
+ .ez-icon-pause:before { content: "\ea70"; }
170
+ .ez-icon-payments:before { content: "\ea71"; }
171
+ .ez-icon-pdf:before { content: "\ea72"; }
172
+ .ez-icon-play:before { content: "\ea73"; }
173
+ .ez-icon-plus:before { content: "\ea74"; }
174
+ .ez-icon-png:before { content: "\ea75"; }
175
+ .ez-icon-power:before { content: "\ea76"; }
176
+ .ez-icon-pptx:before { content: "\ea77"; }
177
+ .ez-icon-preview:before { content: "\ea78"; }
178
+ .ez-icon-print:before { content: "\ea79"; }
179
+ .ez-icon-push-pin:before { content: "\ea7a"; }
180
+ .ez-icon-rateio:before { content: "\ea7b"; }
181
+ .ez-icon-receipt:before { content: "\ea7c"; }
182
+ .ez-icon-recolher_card:before { content: "\ea7d"; }
183
+ .ez-icon-restore:before { content: "\ea7e"; }
184
+ .ez-icon-return:before { content: "\ea7f"; }
185
+ .ez-icon-sankhya-place:before { content: "\ea80"; }
186
+ .ez-icon-save:before { content: "\ea81"; }
187
+ .ez-icon-search:before { content: "\ea82"; }
188
+ .ez-icon-settings-inverted:before { content: "\ea83"; }
189
+ .ez-icon-settings:before { content: "\ea84"; }
190
+ .ez-icon-share:before { content: "\ea85"; }
191
+ .ez-icon-shield:before { content: "\ea86"; }
192
+ .ez-icon-show_menu:before { content: "\ea87"; }
193
+ .ez-icon-south-east:before { content: "\ea88"; }
194
+ .ez-icon-sync:before { content: "\ea89"; }
195
+ .ez-icon-table:before { content: "\ea8a"; }
196
+ .ez-icon-tag_code:before { content: "\ea8b"; }
197
+ .ez-icon-text:before { content: "\ea8c"; }
198
+ .ez-icon-timeline:before { content: "\ea8d"; }
199
+ .ez-icon-timer-outline:before { content: "\ea8e"; }
200
+ .ez-icon-trending-up:before { content: "\ea8f"; }
201
+ .ez-icon-tune:before { content: "\ea90"; }
202
+ .ez-icon-txt:before { content: "\ea91"; }
203
+ .ez-icon-un-pin:before { content: "\ea92"; }
204
+ .ez-icon-unfold_less:before { content: "\ea93"; }
205
+ .ez-icon-unfold_more:before { content: "\ea94"; }
206
+ .ez-icon-user-circle:before { content: "\ea95"; }
207
+ .ez-icon-warning-outline:before { content: "\ea96"; }
208
+ .ez-icon-warning_triangle:before { content: "\ea97"; }
209
+ .ez-icon-whatshot:before { content: "\ea98"; }
210
+ .ez-icon-xlsx:before { content: "\ea99"; }
211
+ .ez-icon-zip:before { content: "\ea9a"; }
210
212
  /*
211
213
  END CSS GENERATED BY EZ-DESIGN ICONS
212
214
  */
@@ -137,16 +137,8 @@ export class EzMuiltiSelectionList {
137
137
  }
138
138
  handleChangeSelectedItem(event) {
139
139
  const { detail: itemCheckSelected } = event;
140
- this.filteredOptions = this.filteredOptions.map(item => {
141
- if (item.label === itemCheckSelected.label) {
142
- return Object.assign(Object.assign({}, item), { check: itemCheckSelected.check });
143
- }
144
- return item;
145
- });
146
- this.clearInputs();
147
- }
148
- clearInputs() {
149
- this.filterInput ? (this.filterInput.value = '') : (this.searchInput.value = '');
140
+ const itemSelected = this.filteredOptions.find(item => item.label === itemCheckSelected.label);
141
+ itemSelected.check = itemCheckSelected.check;
150
142
  }
151
143
  buildViewList(hasDelete) {
152
144
  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 })));