@sankhyalabs/ezui 2.3.1 → 2.3.2

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 (155) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/ez-actions-button.cjs.entry.js +12 -8
  3. package/dist/cjs/ez-button.cjs.entry.js +5 -5
  4. package/dist/cjs/ez-calendar.cjs.entry.js +10 -13
  5. package/dist/cjs/ez-check.cjs.entry.js +5 -8
  6. package/dist/cjs/ez-chip.cjs.entry.js +4 -4
  7. package/dist/cjs/ez-collapsible-box.cjs.entry.js +14 -14
  8. package/dist/cjs/ez-combo-box.cjs.entry.js +11 -11
  9. package/dist/cjs/ez-date-input.cjs.entry.js +5 -5
  10. package/dist/cjs/ez-date-time-input.cjs.entry.js +7 -7
  11. package/dist/cjs/ez-dialog.cjs.entry.js +4 -7
  12. package/dist/cjs/ez-filter-input.cjs.entry.js +6 -6
  13. package/dist/cjs/ez-form.cjs.entry.js +3 -6
  14. package/dist/cjs/ez-grid.cjs.entry.js +16 -17
  15. package/dist/cjs/ez-icon.cjs.entry.js +3 -3
  16. package/dist/cjs/ez-list.cjs.entry.js +71 -71
  17. package/dist/cjs/ez-loading-bar.cjs.entry.js +8 -4
  18. package/dist/cjs/ez-modal-container.cjs.entry.js +2 -2
  19. package/dist/cjs/ez-modal.cjs.entry.js +6 -6
  20. package/dist/cjs/ez-number-input.cjs.entry.js +5 -5
  21. package/dist/cjs/ez-popover.cjs.entry.js +8 -10
  22. package/dist/cjs/ez-popup.cjs.entry.js +4 -5
  23. package/dist/cjs/ez-radio-button.cjs.entry.js +3 -3
  24. package/dist/cjs/ez-scroller.cjs.entry.js +2 -7
  25. package/dist/cjs/ez-search.cjs.entry.js +13 -14
  26. package/dist/cjs/ez-text-area.cjs.entry.js +7 -7
  27. package/dist/cjs/ez-text-edit.cjs.entry.js +1 -1
  28. package/dist/cjs/ez-text-input.cjs.entry.js +7 -7
  29. package/dist/cjs/ez-time-input.cjs.entry.js +6 -6
  30. package/dist/cjs/ez-toast.cjs.entry.js +5 -5
  31. package/dist/cjs/ez-upload.cjs.entry.js +5 -5
  32. package/dist/cjs/ez-view-stack.cjs.entry.js +2 -2
  33. package/dist/cjs/ezui.cjs.js +1 -1
  34. package/dist/cjs/loader.cjs.js +1 -1
  35. package/dist/collection/components/ez-actions-button/ez-actions-button.js +27 -22
  36. package/dist/collection/components/ez-button/ez-button.js +15 -15
  37. package/dist/collection/components/ez-calendar/ez-calendar.js +18 -21
  38. package/dist/collection/components/ez-card-item/ez-card-item.js +2 -2
  39. package/dist/collection/components/ez-check/ez-check.js +28 -22
  40. package/dist/collection/components/ez-chip/ez-chip.js +15 -15
  41. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +28 -28
  42. package/dist/collection/components/ez-combo-box/ez-combo-box.js +42 -33
  43. package/dist/collection/components/ez-date-input/ez-date-input.js +18 -18
  44. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +21 -21
  45. package/dist/collection/components/ez-dialog/ez-dialog.js +13 -35
  46. package/dist/collection/components/ez-filter-input/ez-filter-input.js +18 -35
  47. package/dist/collection/components/ez-form/ez-form.js +7 -42
  48. package/dist/collection/components/ez-grid/ez-grid.js +41 -42
  49. package/dist/collection/components/ez-icon/ez-icon.js +11 -11
  50. package/dist/collection/components/ez-list/ez-list.js +112 -93
  51. package/dist/collection/components/ez-loading-bar/ez-loading-bar.js +10 -6
  52. package/dist/collection/components/ez-modal/ez-modal.js +14 -14
  53. package/dist/collection/components/ez-modal-container/ez-modal-container.js +16 -16
  54. package/dist/collection/components/ez-number-input/ez-number-input.js +20 -20
  55. package/dist/collection/components/ez-popover/ez-popover.js +22 -24
  56. package/dist/collection/components/ez-popup/ez-popup.js +16 -17
  57. package/dist/collection/components/ez-radio-button/ez-radio-button.js +8 -8
  58. package/dist/collection/components/ez-scroller/ez-scroller.js +6 -12
  59. package/dist/collection/components/ez-search/ez-search.js +42 -46
  60. package/dist/collection/components/ez-tabselector/ez-tabselector.js +2 -2
  61. package/dist/collection/components/ez-text-area/ez-text-area.js +20 -37
  62. package/dist/collection/components/ez-text-edit/ez-text-edit.js +6 -6
  63. package/dist/collection/components/ez-text-input/ez-text-input.js +21 -38
  64. package/dist/collection/components/ez-time-input/ez-time-input.js +20 -20
  65. package/dist/collection/components/ez-toast/ez-toast.js +12 -12
  66. package/dist/collection/components/ez-upload/ez-upload.js +14 -14
  67. package/dist/collection/components/ez-view-stack/ez-view-stack.js +4 -4
  68. package/dist/custom-elements/index.js +265 -279
  69. package/dist/esm/ez-actions-button.entry.js +12 -8
  70. package/dist/esm/ez-button.entry.js +5 -5
  71. package/dist/esm/ez-calendar.entry.js +10 -13
  72. package/dist/esm/ez-check.entry.js +5 -8
  73. package/dist/esm/ez-chip.entry.js +4 -4
  74. package/dist/esm/ez-collapsible-box.entry.js +14 -14
  75. package/dist/esm/ez-combo-box.entry.js +11 -11
  76. package/dist/esm/ez-date-input.entry.js +5 -5
  77. package/dist/esm/ez-date-time-input.entry.js +7 -7
  78. package/dist/esm/ez-dialog.entry.js +4 -7
  79. package/dist/esm/ez-filter-input.entry.js +6 -6
  80. package/dist/esm/ez-form.entry.js +3 -6
  81. package/dist/esm/ez-grid.entry.js +16 -17
  82. package/dist/esm/ez-icon.entry.js +3 -3
  83. package/dist/esm/ez-list.entry.js +71 -71
  84. package/dist/esm/ez-loading-bar.entry.js +8 -4
  85. package/dist/esm/ez-modal-container.entry.js +2 -2
  86. package/dist/esm/ez-modal.entry.js +6 -6
  87. package/dist/esm/ez-number-input.entry.js +5 -5
  88. package/dist/esm/ez-popover.entry.js +8 -10
  89. package/dist/esm/ez-popup.entry.js +4 -5
  90. package/dist/esm/ez-radio-button.entry.js +3 -3
  91. package/dist/esm/ez-scroller.entry.js +2 -7
  92. package/dist/esm/ez-search.entry.js +13 -14
  93. package/dist/esm/ez-text-area.entry.js +7 -7
  94. package/dist/esm/ez-text-edit.entry.js +1 -1
  95. package/dist/esm/ez-text-input.entry.js +7 -7
  96. package/dist/esm/ez-time-input.entry.js +6 -6
  97. package/dist/esm/ez-toast.entry.js +5 -5
  98. package/dist/esm/ez-upload.entry.js +5 -5
  99. package/dist/esm/ez-view-stack.entry.js +2 -2
  100. package/dist/esm/ezui.js +1 -1
  101. package/dist/esm/loader.js +1 -1
  102. package/dist/ezui/ezui.esm.js +1 -1
  103. package/dist/ezui/p-1214c5ce.entry.js +1 -0
  104. package/dist/ezui/p-2af9fe67.entry.js +1 -0
  105. package/dist/ezui/p-642c530f.entry.js +1 -0
  106. package/dist/ezui/p-96265e26.entry.js +1 -0
  107. package/dist/ezui/p-b47eb5d4.entry.js +1 -0
  108. package/dist/ezui/{p-855f99f8.entry.js → p-ccbe8272.entry.js} +1 -1
  109. package/dist/ezui/p-e60e7308.entry.js +1 -0
  110. package/dist/ezui/p-ede1328a.entry.js +1 -0
  111. package/dist/ezui/p-f6111077.entry.js +1 -0
  112. package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +15 -14
  113. package/dist/types/components/ez-button/ez-button.d.ts +10 -10
  114. package/dist/types/components/ez-calendar/ez-calendar.d.ts +11 -14
  115. package/dist/types/components/ez-card-item/ez-card-item.d.ts +7 -0
  116. package/dist/types/components/ez-check/ez-check.d.ts +11 -13
  117. package/dist/types/components/ez-chip/ez-chip.d.ts +15 -14
  118. package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +25 -25
  119. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +21 -20
  120. package/dist/types/components/ez-date-input/ez-date-input.d.ts +16 -17
  121. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +18 -19
  122. package/dist/types/components/ez-dialog/ez-dialog.d.ts +13 -16
  123. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +12 -17
  124. package/dist/types/components/ez-form/ez-form.d.ts +7 -5
  125. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +2 -2
  126. package/dist/types/components/ez-grid/ez-grid.d.ts +37 -39
  127. package/dist/types/components/ez-icon/ez-icon.d.ts +4 -4
  128. package/dist/types/components/ez-list/ez-list.d.ts +29 -32
  129. package/dist/types/components/ez-loading-bar/ez-loading-bar.d.ts +6 -0
  130. package/dist/types/components/ez-modal/ez-modal.d.ts +15 -15
  131. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +10 -10
  132. package/dist/types/components/ez-number-input/ez-number-input.d.ts +18 -24
  133. package/dist/types/components/ez-popover/ez-popover.d.ts +13 -16
  134. package/dist/types/components/ez-popup/ez-popup.d.ts +12 -13
  135. package/dist/types/components/ez-radio-button/ez-radio-button.d.ts +8 -8
  136. package/dist/types/components/ez-scroller/ez-scroller.d.ts +3 -4
  137. package/dist/types/components/ez-search/ez-search.d.ts +27 -31
  138. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +4 -7
  139. package/dist/types/components/ez-text-area/ez-text-area.d.ts +12 -16
  140. package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +5 -5
  141. package/dist/types/components/ez-text-input/ez-text-input.d.ts +14 -19
  142. package/dist/types/components/ez-time-input/ez-time-input.d.ts +16 -17
  143. package/dist/types/components/ez-toast/ez-toast.d.ts +7 -7
  144. package/dist/types/components/ez-upload/ez-upload.d.ts +11 -12
  145. package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +2 -2
  146. package/dist/types/components.d.ts +514 -529
  147. package/package.json +2 -2
  148. package/dist/ezui/p-0fb5f4be.entry.js +0 -1
  149. package/dist/ezui/p-1ba371a3.entry.js +0 -1
  150. package/dist/ezui/p-42c6493e.entry.js +0 -1
  151. package/dist/ezui/p-6700360e.entry.js +0 -1
  152. package/dist/ezui/p-89b2a151.entry.js +0 -1
  153. package/dist/ezui/p-8c2105a5.entry.js +0 -1
  154. package/dist/ezui/p-ed2135a5.entry.js +0 -1
  155. package/dist/ezui/p-f6afdc4d.entry.js +0 -1
@@ -10,64 +10,42 @@ let EzList = class {
10
10
  this._listGroupItems = [];
11
11
  this._listItemsHistory = [];
12
12
  /**
13
- * Define a lista inicial do componente.
14
- */
13
+ * Define a lista inicial do componente.
14
+ */
15
15
  this.dataSource = [];
16
16
  /**
17
- * Define se o componente renderizará os itens separados em grupos..
18
- */
17
+ * Se true os grupos serão exibidos.
18
+ */
19
19
  this.useGroups = false;
20
20
  /**
21
- * Define se o componente terá o comportamento de arrasto de linhas.
22
- */
21
+ * Se true habilita `drag and drop` para os itens.
22
+ */
23
23
  this.ezDraggable = false;
24
24
  /**
25
- * Define se os items da lista serão selecionáveis.
26
- */
25
+ * Se true os itens serão selecionáveis.
26
+ */
27
27
  this.ezSelectable = false;
28
28
  }
29
- createList() {
30
- if (this.useGroups) {
31
- let list = [...this.dataSource];
32
- list.forEach(itemGroup => {
33
- this.sortGroup(itemGroup);
34
- });
35
- this._listGroupItems = list;
36
- }
37
- else {
38
- this._listItems = this._listItemsHistory.length > 0 ? this._listItemsHistory : [...this.dataSource];
39
- }
40
- }
41
- sortGroup(itemGroup) {
42
- if (itemGroup.sort) {
43
- itemGroup.items.sort(function (a, b) {
44
- return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
45
- });
46
- if (itemGroup.sort === "DSC") {
47
- itemGroup.items.reverse();
48
- }
49
- }
50
- }
51
29
  /**
52
- * Responsável por limpar a lista de histórico do componente.
53
- */
30
+ * Limpa o histórico da lista.
31
+ */
54
32
  async clearHistory() {
55
33
  this._listItemsHistory = [];
56
34
  }
57
35
  /**
58
- * Responsável por dar um scroll top no componente da lista.
59
- */
36
+ * Traz o conteúdo da lista para a área visível.
37
+ */
60
38
  async scrollToTop() {
61
39
  if (this.useGroups) {
62
- this._element.shadowRoot.querySelector('.group-container').scrollTop = 0;
40
+ this._element.shadowRoot.querySelector(".group-container").scrollTop = 0;
63
41
  }
64
42
  else {
65
- this._element.shadowRoot.querySelector('.items-container').scrollTop = 0;
43
+ this._element.shadowRoot.querySelector(".items-container").scrollTop = 0;
66
44
  }
67
45
  }
68
46
  /**
69
- * Recebe como argumento um ListItem {label: string} e um booleano que define se o componente deve fazer scroll para exibir o item específico (opcional).
70
- */
47
+ * Aplica seleção nas linhas da lista.
48
+ */
71
49
  async setSelection(selectedItem, scrollToOption) {
72
50
  if (selectedItem && this.ezSelectable) {
73
51
  if (this.useGroups) {
@@ -98,8 +76,8 @@ let EzList = class {
98
76
  }
99
77
  if (scrollToOption) {
100
78
  let liElem = this.useGroups ?
101
- this._groupContainer.querySelector('li#item_' + this.getItemId(selectedItem.label))
102
- : this._itemContainer.querySelector('li#item_' + this.getItemId(selectedItem.label));
79
+ this._groupContainer.querySelector("li#item_" + this.getItemId(selectedItem.label))
80
+ : this._itemContainer.querySelector("li#item_" + this.getItemId(selectedItem.label));
103
81
  if (liElem) {
104
82
  liElem.scrollIntoView();
105
83
  }
@@ -109,27 +87,9 @@ let EzList = class {
109
87
  this.removeSelection();
110
88
  }
111
89
  }
112
- removeSelection() {
113
- if (this.useGroups) {
114
- let newList = [...this._listGroupItems];
115
- newList.forEach(groupItem => {
116
- groupItem.items.forEach(item => {
117
- item.selected = false;
118
- });
119
- });
120
- this._listGroupItems = newList;
121
- }
122
- else {
123
- let newList = [...this._listItems];
124
- newList.forEach(item => {
125
- item.selected = false;
126
- });
127
- this._listItems = newList;
128
- }
129
- }
130
90
  /**
131
- * Retorna o item selecionado.
132
- */
91
+ * Obtém o item selecionado.
92
+ */
133
93
  async getSelection() {
134
94
  let selectedItem;
135
95
  if (this.useGroups) {
@@ -148,7 +108,7 @@ let EzList = class {
148
108
  return selectedItem;
149
109
  }
150
110
  /**
151
- * Retorna a lista de items conforme o modo de uso.
111
+ * Obtém a lista de items ou grupos.
152
112
  */
153
113
  async getList() {
154
114
  if (this.useGroups) {
@@ -156,6 +116,46 @@ let EzList = class {
156
116
  }
157
117
  return this._listItems;
158
118
  }
119
+ createList() {
120
+ if (this.useGroups) {
121
+ let list = this.dataSource.map(item => item);
122
+ list.forEach(itemGroup => {
123
+ this.sortGroup(itemGroup);
124
+ });
125
+ this._listGroupItems = list;
126
+ }
127
+ else {
128
+ this._listItems = this._listItemsHistory.length > 0 ? this._listItemsHistory : this.dataSource.map(item => item);
129
+ }
130
+ }
131
+ sortGroup(itemGroup) {
132
+ if (itemGroup.sort) {
133
+ itemGroup.items.sort(function (a, b) {
134
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
135
+ });
136
+ if (itemGroup.sort === "DSC") {
137
+ itemGroup.items.reverse();
138
+ }
139
+ }
140
+ }
141
+ removeSelection() {
142
+ if (this.useGroups) {
143
+ let newList = [...this._listGroupItems];
144
+ newList.forEach(groupItem => {
145
+ groupItem.items.forEach(item => {
146
+ item.selected = false;
147
+ });
148
+ });
149
+ this._listGroupItems = newList;
150
+ }
151
+ else {
152
+ let newList = [...this._listItems];
153
+ newList.forEach(item => {
154
+ item.selected = false;
155
+ });
156
+ this._listItems = newList;
157
+ }
158
+ }
159
159
  componentWillLoad() {
160
160
  this._listItemsHistory = [];
161
161
  }
@@ -278,7 +278,7 @@ let EzList = class {
278
278
  }
279
279
  addOverClass(element) {
280
280
  if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains("draggable")) {
281
- element.classList.add('over');
281
+ element.classList.add("over");
282
282
  }
283
283
  else if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains("draggable-list")) {
284
284
  this.addOverClass(element.parentElement);
@@ -303,21 +303,21 @@ let EzList = class {
303
303
  let overCollection;
304
304
  let overLastDroppableCollection;
305
305
  if (this.useGroups) {
306
- overCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName('over');
307
- overLastDroppableCollection = this._groupContainer.getElementsByClassName('last-droppable-space');
306
+ overCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName("over");
307
+ overLastDroppableCollection = this._groupContainer.getElementsByClassName("last-droppable-space");
308
308
  }
309
309
  else {
310
- overCollection = (_b = this._itemContainer) === null || _b === void 0 ? void 0 : _b.getElementsByClassName('over');
311
- overLastDroppableCollection = this._itemContainer.getElementsByClassName('last-droppable-space');
310
+ overCollection = (_b = this._itemContainer) === null || _b === void 0 ? void 0 : _b.getElementsByClassName("over");
311
+ overLastDroppableCollection = this._itemContainer.getElementsByClassName("last-droppable-space");
312
312
  }
313
313
  if (overCollection) {
314
314
  Array.from(overCollection).forEach(function (element) {
315
- element.classList.remove('over');
315
+ element.classList.remove("over");
316
316
  });
317
317
  }
318
318
  if (overLastDroppableCollection) {
319
319
  Array.from(overLastDroppableCollection).forEach(function (element) {
320
- element.classList.remove('over');
320
+ element.classList.remove("over");
321
321
  });
322
322
  }
323
323
  }
@@ -468,7 +468,7 @@ let EzList = class {
468
468
  onDragOverLastIndex(ev) {
469
469
  ev.preventDefault();
470
470
  if (this._dragStartItem) {
471
- ev.target.classList.add('over');
471
+ ev.target.classList.add("over");
472
472
  ev.stopPropagation();
473
473
  }
474
474
  }
@@ -494,7 +494,7 @@ let EzList = class {
494
494
  return (h(Host, { ref: (el) => this._element = el }, this.useGroups ?
495
495
  h("div", { class: "group-container", ref: (el) => this._groupContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, this._listGroupItems.map(group => {
496
496
  return h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, h("label", { draggable: false, class: "group-name" }, group.group), h("section", { class: "section-container", onDragOver: (ev) => ev.preventDefault() }, h("div", { class: "group-items-container" }, h("div", { class: "draggable-list" }, group.items.map((item, index) => {
497
- return h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onClick: () => { this.setSelection(item); }, onDragLeave: () => { group.sort ? undefined : this.removeOverClass(); }, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index), onDragOver: (event) => { group.sort ? undefined : this.onDragOverItem(event); }, onDrop: (event) => this.onDrop(event, { groupName: group.group, item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
497
+ return h("li", { id: "item_" + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: "item_" + this.getItemId(item.label) }, h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onClick: () => { this.setSelection(item); }, onDragLeave: () => { group.sort ? undefined : this.removeOverClass(); }, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index), onDragOver: (event) => { group.sort ? undefined : this.onDragOverItem(event); }, onDrop: (event) => this.onDrop(event, { groupName: group.group, item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
498
498
  h("div", { class: "slot-item" }, this.itemSlotBuilder(item, group))
499
499
  : undefined));
500
500
  })), h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: (event) => { this.onDragOverLastIndex(event); }, onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDropLastIndex(event, group) })), group.sort ?
@@ -503,7 +503,7 @@ let EzList = class {
503
503
  }))
504
504
  :
505
505
  h("div", { class: "items-container", ref: (el) => this._itemContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, h("div", { class: "draggable-list" }, this._listItems.map((item, index) => {
506
- return h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onDragStart: () => this.onDragStart({ item: item, index: index }), onClick: () => { this.setSelection(item); }, onDragLeave: () => this.removeOverClass(), onDragOver: (event) => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDrop(event, { item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
506
+ return h("li", { id: "item_" + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: "item_" + this.getItemId(item.label) }, h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onDragStart: () => this.onDragStart({ item: item, index: index }), onClick: () => { this.setSelection(item); }, onDragLeave: () => this.removeOverClass(), onDragOver: (event) => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDrop(event, { item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
507
507
  h("div", null, this.itemSlotBuilder(item))
508
508
  : undefined));
509
509
  }), h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: (event) => { this.onDragOverLastIndex(event); }, onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDropLastIndex(event) })))));
@@ -7,13 +7,17 @@ let EzLoadingBar = class {
7
7
  registerInstance(this, hostRef);
8
8
  this._showLoading = true;
9
9
  }
10
- hide() {
10
+ /**
11
+ * Oculta o ez-loading-bar.
12
+ */
13
+ async hide() {
11
14
  this._showLoading = false;
12
- return Promise.resolve();
13
15
  }
14
- show() {
16
+ /**
17
+ * Exibe o ez-loading-bar.
18
+ */
19
+ async show() {
15
20
  this._showLoading = true;
16
- return Promise.resolve();
17
21
  }
18
22
  render() {
19
23
  return (h(Host, null, this._showLoading && h("div", { class: "loading-bar" }, h("div", { class: "loading-bar__container" }))));
@@ -24,7 +24,7 @@ let EzModalContainer = class {
24
24
  registerInstance(this, hostRef);
25
25
  this.ezModalAction = createEvent(this, "ezModalAction", 7);
26
26
  /**
27
- * Determina se o cabeçalho com o título deverá ser mostrado
27
+ * Define se o cabeçalho será mostrado.
28
28
  */
29
29
  this.showTitleBar = true;
30
30
  }
@@ -46,7 +46,7 @@ let EzModalContainer = class {
46
46
  this._closeButton.focus();
47
47
  }
48
48
  render() {
49
- return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: evt => this.focusLast(evt) }), this.showTitleBar && h("div", { class: "ez-modal-container__header ez-margin-bottom--large ez-align--middle" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle) : undefined), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))), h("div", null, h("slot", null)), h("div", { class: 'ez-col ez-margin-left--auto' }, this.cancelIsVisible() ? h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) }) : undefined, this.okIsVisible() ? h("ez-button", { ref: ref => this._okButton = ref, label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, class: "ez-button--primary ez-margin-left--medium", onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }) : undefined), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: evt => this.focusFirst(evt) })));
49
+ return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: evt => this.focusLast(evt) }), this.showTitleBar && h("div", { class: "ez-modal-container__header ez-margin-bottom--large ez-align--middle" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle) : undefined), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))), h("div", null, h("slot", null)), h("div", { class: "ez-col ez-margin-left--auto" }, this.cancelIsVisible() ? h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) }) : undefined, this.okIsVisible() ? h("ez-button", { ref: ref => this._okButton = ref, label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, class: "ez-button--primary ez-margin-left--medium", onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }) : undefined), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: evt => this.focusFirst(evt) })));
50
50
  }
51
51
  };
52
52
  EzModalContainer.style = ezModalContainerCss;
@@ -8,16 +8,16 @@ let EzModal = class {
8
8
  this.ezCloseModal = createEvent(this, "ezCloseModal", 7);
9
9
  this.ezOpenModal = createEvent(this, "ezOpenModal", 7);
10
10
  /**
11
- * Controle de exibição do Modal
12
- */
11
+ * Define se o ez-modal está aberto.
12
+ */
13
13
  this.opened = true;
14
14
  /**
15
- * Define se o modal será fechado ao clicar ESC
16
- */
15
+ * Define se o ez-modal será fechado ao clicar `ESC`.
16
+ */
17
17
  this.closeEsc = false;
18
18
  /**
19
- * Define se o modal será fechado ao clicar fora do conteúdo.
20
- */
19
+ * Define se o modal será fechado ao clicar fora do conteúdo.
20
+ */
21
21
  this.closeOutsideClick = false;
22
22
  this.handleKeyboardEvent = (ev) => {
23
23
  if ((ev === null || ev === void 0 ? void 0 : ev.key) === "Escape" && this.closeEsc) {
@@ -12,28 +12,28 @@ let EzNumberInput = class {
12
12
  this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
13
13
  this._focused = false;
14
14
  /**
15
- * Deixa o campo disponível ou não para uso.
15
+ * Se false, o usuário não pode interagir com o campo.
16
16
  */
17
17
  this.enabled = true;
18
18
  /**
19
- * Define o modo do tamanho do campo; opções: slim e regular.
19
+ * Define o tamanho do campo.
20
20
  */
21
21
  this.mode = "regular";
22
22
  }
23
23
  /**
24
- * Realiza o foco no componente de input
24
+ * Aplica o foco no campo.
25
25
  */
26
26
  async setFocus() {
27
27
  this._textInput.setFocus();
28
28
  }
29
29
  /**
30
- * Remove o foco no componente de input
30
+ * Remove o foco do campo.
31
31
  */
32
32
  async setBlur() {
33
33
  this._textInput.setBlur();
34
34
  }
35
35
  /**
36
- * Retorna informando se o campo está inválido (true | false)
36
+ * Retorna se o conteúdo é inválido.
37
37
  */
38
38
  async isInvalid() {
39
39
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
@@ -9,29 +9,27 @@ let EzPopover = class {
9
9
  this.ezVisibilityChange = createEvent(this, "ezVisibilityChange", 7);
10
10
  this._firstRender = true;
11
11
  /**
12
- * No modo floating = false o popover se tornará visível
13
- * quando o método show() for acionado.
12
+ * Define que será fechado automaticamente quando o usuário clicar fora do conteúdo.
14
13
  */
15
14
  this.autoClose = true;
16
15
  /**
17
- * Offset top do popover em relação ao componente pai
16
+ * Define a distância do topo. Devem ser usados valores válidos de CSS.
18
17
  */
19
18
  this.top = "0px";
20
19
  /**
21
- * Offset left do popover em relação ao componente pai
20
+ * Define a distância do lado esquerdo. Devem ser usados valores válidos de CSS.
22
21
  */
23
22
  this.left = "0px";
24
23
  /**
25
- * Offset bottom do popover em relação ao componente pai
24
+ * Define a distância de baixo. Devem ser usados valores válidos de CSS.
26
25
  */
27
26
  this.bottom = "0px";
28
27
  /**
29
- * Offset right do popover em relação ao componente pai
28
+ * Define a distância do lado direito. Devem ser usados valores válidos de CSS.
30
29
  */
31
30
  this.right = "0px";
32
31
  /**
33
32
  * Ajusta o comportamento da largura do popover.
34
- * Opções: "100% e "fit-content" (default)
35
33
  */
36
34
  this.boxWidth = "fit-content";
37
35
  this.innerClickTest = (_popOvercontainer, node, eventOrigin) => {
@@ -82,7 +80,7 @@ let EzPopover = class {
82
80
  }
83
81
  }
84
82
  /**
85
- * Atualiza a posição do popover em relação ao componente pai.
83
+ * Atualiza a posição do popover.
86
84
  */
87
85
  async updatePosition(top = this.top, left = this.left, bottom = this.bottom, right = this.right) {
88
86
  const floatingOptions = {
@@ -97,7 +95,7 @@ let EzPopover = class {
97
95
  FloatingManager.updateFloatPosition(this._box, this._container, floatingOptions);
98
96
  }
99
97
  /**
100
- * Faz com que o popover seja renderizado na DOM.
98
+ * Exibe o ez-popover.
101
99
  */
102
100
  async show(top = this.top, left = this.left, bottom = this.bottom, right = this.right) {
103
101
  const floatingOptions = {
@@ -113,7 +111,7 @@ let EzPopover = class {
113
111
  this.opened = true;
114
112
  }
115
113
  /**
116
- * Usado no modo floating. Faz com que o componente seja ocultado.
114
+ * Oculta o ez-popover.
117
115
  */
118
116
  async hide() {
119
117
  if (this._floatingID !== undefined) {
@@ -14,20 +14,19 @@ let EzPopup = class {
14
14
  "x-large": "col--sd-11"
15
15
  };
16
16
  /**
17
- * Define o width que o componente deve ter, seguindo o grid system. Os valores devem estar
18
- * compreendidos em [x-small | small | medium | large | x-large].
17
+ * Define a largura do ez-popup.
19
18
  */
20
19
  this.size = "medium";
21
20
  /**
22
- * Controla a exibição do componente.
21
+ * Define se o ez-popover está aberto.
23
22
  */
24
23
  this.opened = false;
25
24
  /**
26
- * Define se o componente utilizará um cabeçalho com botão de fechamento.
25
+ * Define se o componente utilizará cabeçalho.
27
26
  */
28
27
  this.useHeader = true;
29
28
  /**
30
- * Define se o componente utilizará um cabeçalho com botão de fechamento.
29
+ * Define altura do componente.
31
30
  */
32
31
  this.heightMode = "full";
33
32
  }
@@ -12,11 +12,11 @@ let EzRadioButton = class {
12
12
  */
13
13
  this.options = [];
14
14
  /**
15
- * Define se o componente está habilitado ou desabilitado
16
- */
15
+ * Se false o usuário não pode interagir com o campo.
16
+ */
17
17
  this.enabled = true;
18
18
  /**
19
- * Define a direção em que os itens são apresentadoss, podendo ser horizontal ou vertical.
19
+ * Define a direção dos itens.
20
20
  */
21
21
  this.direction = "vertical";
22
22
  }
@@ -16,16 +16,11 @@ let EzScroller = class {
16
16
  this._classHidden = "ez-scroller__shadow--hidden";
17
17
  this.isFirefox = false;
18
18
  /**
19
- * Determina se haverá scroll na direção Vertical, Horizontal ou Ambos.
20
- * Por padrão, a direção é "Ambos".
21
- */
22
- this.direction = EzScrollDirection.BOTH;
23
- /**
24
- * Determina se o scroll estará bloqueado quando necessário.
19
+ * Define se o `scroll` estará bloqueado.
25
20
  */
26
21
  this.locked = false;
27
22
  /**
28
- * Determina de o efeito de sombreado está ativo.
23
+ * Define se haverá efeito de sombreado.
29
24
  */
30
25
  this.activeShadow = false;
31
26
  }
@@ -8,26 +8,25 @@ let EzSearch = class {
8
8
  constructor(hostRef) {
9
9
  registerInstance(this, hostRef);
10
10
  this.ezChange = createEvent(this, "ezChange", 7);
11
- this.showPopup = createEvent(this, "showPopup", 7);
12
11
  /**
13
- * Deixa o campo disponível ou não.
14
- */
12
+ * Se false o usuário não pode interagir com o campo.
13
+ */
15
14
  this.enabled = true;
16
15
  /**
17
- * Ajusta a opção de mostrar o "value" ao selecionar uma opção.
18
- */
16
+ * Se false a opção selecionada deve exibir somente o `label`.
17
+ */
19
18
  this.showSelectedValue = true;
20
19
  /**
21
- * Ajusta a opção de mostrar o "value" para cada opção.
22
- */
20
+ * Se false cada opção na lista deve exibir somente o `label`.
21
+ */
23
22
  this.showOptionValue = true;
24
23
  /**
25
- * Remove a opção vazia da lista de opções
26
- */
24
+ * Se true remove a opção vazia da lista.
25
+ */
27
26
  this.suppressEmptyOption = false;
28
27
  /**
29
- * Define o modo do tamanho do campo; opções: slim e regular.
30
- */
28
+ * Define o tamanho do campo.
29
+ */
31
30
  this.mode = "regular";
32
31
  }
33
32
  observeErrorMessage() {
@@ -41,19 +40,19 @@ let EzSearch = class {
41
40
  }
42
41
  }
43
42
  /**
44
- * Realiza o foco no componente de pesquisa
43
+ * Aplica o foco no campo.
45
44
  */
46
45
  async setFocus() {
47
46
  this._comboElement.setFocus();
48
47
  }
49
48
  /**
50
- * Remove o foco no componente de pesquisa
49
+ * Remove o foco do campo.
51
50
  */
52
51
  async setBlur() {
53
52
  this._comboElement.setBlur();
54
53
  }
55
54
  /**
56
- * Retorna informando se o campo está inválido (true | false)
55
+ * Retorna se o conteúdo é inválido.
57
56
  */
58
57
  async isInvalid() {
59
58
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
@@ -8,19 +8,19 @@ let EzTextArea = class {
8
8
  registerInstance(this, hostRef);
9
9
  this.ezChange = createEvent(this, "ezChange", 7);
10
10
  /**
11
- * Deixa o campo disponível ou não para digitação.
11
+ * Se false o usuário não pode interagir com o campo.
12
12
  */
13
13
  this.enabled = true;
14
14
  /**
15
- * Ajusta o número de linhas e consequentemente o height do textarea. Valor default: 4
15
+ * Define o número de linhas.
16
16
  */
17
17
  this.rows = 4;
18
18
  /**
19
- * Permite exibir a mensagem de erro.
19
+ * Se false deixa de exibir a mensagem de erro dentro do campo.
20
20
  */
21
21
  this.canShowError = true;
22
22
  /**
23
- * Define o modo do tamanho do campo; opções: slim e regular.
23
+ * Define o tamanho do campo.
24
24
  */
25
25
  this.mode = "regular";
26
26
  }
@@ -68,19 +68,19 @@ let EzTextArea = class {
68
68
  // Public methods
69
69
  //---------------------------------------------
70
70
  /**
71
- * Faz o foco no componente de input
71
+ * Aplica o foco no campo.
72
72
  */
73
73
  async setFocus() {
74
74
  this._inputElem.focus();
75
75
  }
76
76
  /**
77
- * Remove o foco no componente de input
77
+ * Remove o foco do campo.
78
78
  */
79
79
  async setBlur() {
80
80
  this._inputElem.blur();
81
81
  }
82
82
  /**
83
- * Retorna informando se o campo está inválido (true | false)
83
+ * Retorna se o conteúdo é inválido.
84
84
  */
85
85
  async isInvalid() {
86
86
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
@@ -13,7 +13,7 @@ let EzTextEdit = class {
13
13
  this.cancelEdition = createEvent(this, "cancelEdition", 7);
14
14
  }
15
15
  /**
16
- * Aplica focus no campo.
16
+ * Aplica foco no campo.
17
17
  */
18
18
  async applyFocusSelect() {
19
19
  this.calcSizeInput(this.value, true);
@@ -8,19 +8,19 @@ let EzTextInput = class {
8
8
  registerInstance(this, hostRef);
9
9
  this.ezChange = createEvent(this, "ezChange", 7);
10
10
  /**
11
- * Deixa o campo disponível ou não para digitação.
11
+ * Se false o usuário não pode interagir com o campo.
12
12
  */
13
13
  this.enabled = true;
14
14
  /**
15
- * Permite exibir a mensagem de erro.
15
+ * Se false deixa de exibir a mensagem de erro dentro do campo.
16
16
  */
17
17
  this.canShowError = true;
18
18
  /**
19
- * Define o modo do tamanho do campo; opções: slim e regular.
19
+ * Define o tamanho do campo.
20
20
  */
21
21
  this.mode = "regular";
22
22
  /**
23
- * Define se o campo contará com bordas ou não
23
+ * Se true o campo não terá bordas.
24
24
  */
25
25
  this.noBorder = false;
26
26
  }
@@ -105,19 +105,19 @@ let EzTextInput = class {
105
105
  // Public methods
106
106
  //---------------------------------------------
107
107
  /**
108
- * Faz o foco no componente de input
108
+ * Aplica o foco no campo.
109
109
  */
110
110
  async setFocus() {
111
111
  this._inputElem.focus();
112
112
  }
113
113
  /**
114
- * Remove o foco no componente de input
114
+ * Remove o foco do campo.
115
115
  */
116
116
  async setBlur() {
117
117
  this._inputElem.blur();
118
118
  }
119
119
  /**
120
- * Retorna informando se o campo está inválido (true | false)
120
+ * Retorna se o conteúdo é inválido.
121
121
  */
122
122
  async isInvalid() {
123
123
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";