@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-6165.0 → 0.0.0-bugfix-dev-KB-17130.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 (273) hide show
  1. package/README.md +8 -10
  2. package/dist/cjs/{ApplicationUtils-2e444734.js → ApplicationUtils-c9d1205c.js} +56 -6
  3. package/dist/cjs/{RecordValidationProcessor-edd23705.js → RecordValidationProcessor-4c893e04.js} +1 -1
  4. package/dist/cjs/{constants-3a1d64fb.js → constants-2714478b.js} +2 -0
  5. package/dist/cjs/ez-actions-button.cjs.entry.js +56 -28
  6. package/dist/cjs/ez-alert-list.cjs.entry.js +148 -0
  7. package/dist/cjs/ez-alert.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-badge.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-button.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-card-item_3.cjs.entry.js +182 -0
  14. package/dist/cjs/ez-check.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-chip.cjs.entry.js +1 -1
  16. package/dist/cjs/ez-collapsible-box.cjs.entry.js +3 -4
  17. package/dist/cjs/ez-combo-box.cjs.entry.js +17 -152
  18. package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
  19. package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
  20. package/dist/cjs/ez-dialog.cjs.entry.js +31 -5
  21. package/dist/cjs/ez-dropdown.cjs.entry.js +12 -6
  22. package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
  23. package/dist/cjs/ez-form-view.cjs.entry.js +44 -3
  24. package/dist/cjs/ez-form.cjs.entry.js +36 -4
  25. package/dist/cjs/ez-grid.cjs.entry.js +246 -64
  26. package/dist/cjs/ez-guide-navigator.cjs.entry.js +7 -1
  27. package/dist/cjs/ez-icon.cjs.entry.js +2 -2
  28. package/dist/cjs/ez-list.cjs.entry.js +5 -3
  29. package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
  31. package/dist/cjs/ez-modal.cjs.entry.js +2 -2
  32. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +23 -10
  33. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  34. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  35. package/dist/cjs/ez-popup.cjs.entry.js +2 -2
  36. package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
  37. package/dist/cjs/ez-scroller_3.cjs.entry.js +8 -6
  38. package/dist/cjs/ez-search.cjs.entry.js +615 -32
  39. package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
  40. package/dist/cjs/ez-split-item.cjs.entry.js +19 -0
  41. package/dist/cjs/ez-split-panel.cjs.entry.js +776 -0
  42. package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
  43. package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
  44. package/dist/cjs/ez-text-edit.cjs.entry.js +2 -2
  45. package/dist/cjs/ez-text-input.cjs.entry.js +3 -2
  46. package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
  47. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  48. package/dist/cjs/ez-upload.cjs.entry.js +2 -2
  49. package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
  50. package/dist/cjs/ezui.cjs.js +2 -2
  51. package/dist/cjs/filter-column.cjs.entry.js +47 -12
  52. package/dist/cjs/{index-1064511f.js → index-a7b0c73d.js} +16 -6
  53. package/dist/cjs/loader.cjs.js +2 -2
  54. package/dist/collection/collection-manifest.json +6 -3
  55. package/dist/collection/components/ez-actions-button/ez-actions-button.css +17 -3
  56. package/dist/collection/components/ez-actions-button/ez-actions-button.js +105 -27
  57. package/dist/collection/components/ez-alert-list/ez-alert-list.css +87 -0
  58. package/dist/collection/components/ez-alert-list/ez-alert-list.js +268 -0
  59. package/dist/collection/components/ez-card-item/ez-card-item.css +17 -0
  60. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +1 -1
  61. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +0 -1
  62. package/dist/collection/components/ez-combo-box/ez-combo-box.js +71 -169
  63. package/dist/collection/components/ez-dialog/ez-dialog.css +1 -1
  64. package/dist/collection/components/ez-dialog/ez-dialog.js +39 -4
  65. package/dist/collection/components/ez-dropdown/ez-dropdown.css +4 -3
  66. package/dist/collection/components/ez-dropdown/ez-dropdown.js +33 -4
  67. package/dist/collection/components/ez-form/ez-form.js +93 -0
  68. package/dist/collection/components/ez-form-view/ez-form-view.js +23 -0
  69. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +4 -1
  70. package/dist/collection/components/ez-form-view/structure/index.js +34 -0
  71. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +21 -9
  72. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +23 -1
  73. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -1
  74. package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRendererStatus.js +1 -1
  75. package/dist/collection/components/ez-grid/ez-grid.css +1 -4
  76. package/dist/collection/components/ez-grid/ez-grid.js +91 -51
  77. package/dist/collection/components/ez-grid/interfaces/IColumnFilter.js +1 -0
  78. package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
  79. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +66 -12
  80. package/dist/collection/components/ez-grid/utils/ColumnFilterManager.js +62 -0
  81. package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js +94 -0
  82. package/dist/collection/components/ez-grid/utils/index.js +1 -0
  83. package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js +22 -0
  84. package/dist/collection/components/ez-icon/ez-icon.css +148 -139
  85. package/dist/collection/components/ez-list/ez-list.css +12 -7
  86. package/dist/collection/components/ez-list/ez-list.js +3 -1
  87. package/dist/collection/components/ez-modal/ez-modal.css +1 -1
  88. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +41 -10
  89. package/dist/collection/components/ez-popup/ez-popup.css +2 -2
  90. package/dist/collection/components/ez-search/ez-search.css +330 -0
  91. package/dist/collection/components/ez-search/ez-search.js +746 -55
  92. package/dist/collection/components/ez-split-panel/ez-split-panel.css +8 -0
  93. package/dist/collection/components/ez-split-panel/ez-split-panel.js +122 -0
  94. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +12 -0
  95. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +17 -0
  96. package/dist/collection/components/ez-text-input/ez-text-input.js +20 -1
  97. package/dist/collection/components/ez-tree/ez-tree.css +33 -0
  98. package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +3 -3
  99. package/dist/collection/utils/ApplicationUtils.js +56 -6
  100. package/dist/collection/utils/constants.js +1 -0
  101. package/dist/collection/utils/form/DataBinder.js +12 -1
  102. package/dist/collection/utils/interfaces/IAction.js +1 -0
  103. package/dist/custom-elements/index.d.ts +18 -0
  104. package/dist/custom-elements/index.js +2138 -339
  105. package/dist/esm/{ApplicationUtils-d9a34a16.js → ApplicationUtils-eaf91331.js} +56 -6
  106. package/dist/esm/{RecordValidationProcessor-abc814af.js → RecordValidationProcessor-b00b8b77.js} +1 -1
  107. package/dist/esm/constants-4e0d35b7.js +5 -0
  108. package/dist/esm/ez-actions-button.entry.js +56 -28
  109. package/dist/esm/ez-alert-list.entry.js +144 -0
  110. package/dist/esm/ez-alert.entry.js +1 -1
  111. package/dist/esm/ez-application.entry.js +1 -1
  112. package/dist/esm/ez-badge.entry.js +1 -1
  113. package/dist/esm/ez-breadcrumb.entry.js +1 -1
  114. package/dist/esm/ez-button.entry.js +1 -1
  115. package/dist/esm/ez-calendar.entry.js +1 -1
  116. package/dist/esm/ez-card-item_3.entry.js +176 -0
  117. package/dist/esm/ez-check.entry.js +1 -1
  118. package/dist/esm/ez-chip.entry.js +1 -1
  119. package/dist/esm/ez-collapsible-box.entry.js +3 -4
  120. package/dist/esm/ez-combo-box.entry.js +18 -153
  121. package/dist/esm/ez-date-input.entry.js +1 -1
  122. package/dist/esm/ez-date-time-input.entry.js +1 -1
  123. package/dist/esm/ez-dialog.entry.js +31 -5
  124. package/dist/esm/ez-dropdown.entry.js +12 -6
  125. package/dist/esm/ez-file-item.entry.js +1 -1
  126. package/dist/esm/ez-form-view.entry.js +44 -3
  127. package/dist/esm/ez-form.entry.js +36 -4
  128. package/dist/esm/ez-grid.entry.js +247 -65
  129. package/dist/esm/ez-guide-navigator.entry.js +7 -1
  130. package/dist/esm/ez-icon.entry.js +2 -2
  131. package/dist/esm/ez-list.entry.js +5 -3
  132. package/dist/esm/ez-loading-bar.entry.js +1 -1
  133. package/dist/esm/ez-modal-container.entry.js +1 -1
  134. package/dist/esm/ez-modal.entry.js +2 -2
  135. package/dist/esm/ez-multi-selection-list.entry.js +23 -10
  136. package/dist/esm/ez-number-input.entry.js +1 -1
  137. package/dist/esm/ez-popover.entry.js +1 -1
  138. package/dist/esm/ez-popup.entry.js +2 -2
  139. package/dist/esm/ez-radio-button.entry.js +1 -1
  140. package/dist/esm/ez-scroller_3.entry.js +8 -6
  141. package/dist/esm/ez-search.entry.js +616 -33
  142. package/dist/esm/ez-skeleton.entry.js +1 -1
  143. package/dist/esm/ez-split-item.entry.js +15 -0
  144. package/dist/esm/ez-split-panel.entry.js +772 -0
  145. package/dist/esm/ez-tabselector.entry.js +1 -1
  146. package/dist/esm/ez-text-area.entry.js +1 -1
  147. package/dist/esm/ez-text-edit.entry.js +2 -2
  148. package/dist/esm/ez-text-input.entry.js +3 -2
  149. package/dist/esm/ez-time-input.entry.js +1 -1
  150. package/dist/esm/ez-toast.entry.js +1 -1
  151. package/dist/esm/ez-upload.entry.js +2 -2
  152. package/dist/esm/ez-view-stack.entry.js +1 -1
  153. package/dist/esm/ezui.js +3 -3
  154. package/dist/esm/filter-column.entry.js +47 -12
  155. package/dist/esm/{index-296b8458.js → index-baa5e267.js} +16 -6
  156. package/dist/esm/loader.js +3 -3
  157. package/dist/ezui/ezui.esm.js +1 -1
  158. package/dist/ezui/{p-5cef0264.entry.js → p-0306dff7.entry.js} +1 -1
  159. package/dist/ezui/p-0447d17c.entry.js +1 -0
  160. package/dist/ezui/{p-86a2036d.js → p-04f24913.js} +1 -1
  161. package/dist/ezui/p-05e1f4e7.js +1 -0
  162. package/dist/ezui/p-072e6347.entry.js +1 -0
  163. package/dist/ezui/p-133fae4a.entry.js +1 -0
  164. package/dist/ezui/{p-f4208819.entry.js → p-17be134a.entry.js} +1 -1
  165. package/dist/ezui/{p-cd19a6f8.entry.js → p-1e7a8633.entry.js} +1 -1
  166. package/dist/ezui/{p-60ba28ea.entry.js → p-1f50fa05.entry.js} +1 -1
  167. package/dist/ezui/{p-a5e09759.entry.js → p-20ec22c0.entry.js} +1 -1
  168. package/dist/ezui/p-2187f86c.js +1 -0
  169. package/dist/ezui/{p-e318d280.js → p-23a36bb6.js} +1 -1
  170. package/dist/ezui/{p-ce035beb.entry.js → p-24d3fede.entry.js} +1 -1
  171. package/dist/ezui/p-2a1a0e04.entry.js +1 -0
  172. package/dist/ezui/p-40f72de4.entry.js +1 -0
  173. package/dist/ezui/p-43b03119.entry.js +1 -0
  174. package/dist/ezui/{p-9b347f04.entry.js → p-44caad9a.entry.js} +1 -1
  175. package/dist/ezui/p-49456b34.entry.js +1 -0
  176. package/dist/ezui/p-4a7f113d.entry.js +1 -0
  177. package/dist/ezui/p-51c5e071.entry.js +1 -0
  178. package/dist/ezui/{p-ccb4ccd9.entry.js → p-555c9018.entry.js} +1 -1
  179. package/dist/ezui/{p-d43b22f3.entry.js → p-596634e9.entry.js} +1 -1
  180. package/dist/ezui/p-5bd5e68f.entry.js +1 -0
  181. package/dist/ezui/{p-a01068e1.entry.js → p-5d692ed1.entry.js} +1 -1
  182. package/dist/ezui/{p-95426f93.entry.js → p-5d86cca9.entry.js} +1 -1
  183. package/dist/ezui/p-5e1d036e.entry.js +1 -0
  184. package/dist/ezui/{p-7525e604.entry.js → p-5ed81457.entry.js} +1 -1
  185. package/dist/ezui/{p-c49dbf23.entry.js → p-650e4b6d.entry.js} +1 -1
  186. package/dist/ezui/{p-fd54b5b4.entry.js → p-6e2f8e6b.entry.js} +2 -2
  187. package/dist/ezui/p-6e429cff.entry.js +1 -0
  188. package/dist/ezui/p-76ba9d67.entry.js +1 -0
  189. package/dist/ezui/{p-37673563.entry.js → p-77a4bd35.entry.js} +1 -1
  190. package/dist/ezui/p-796c1a88.entry.js +1 -0
  191. package/dist/ezui/{p-5d6f2550.entry.js → p-85c8baae.entry.js} +1 -1
  192. package/dist/ezui/{p-fa571a4e.entry.js → p-8becebf8.entry.js} +1 -1
  193. package/dist/ezui/p-8defa6d3.entry.js +1 -0
  194. package/dist/ezui/{p-391de0e4.entry.js → p-9050d2cd.entry.js} +1 -1
  195. package/dist/ezui/{p-028f264f.entry.js → p-9cad9b6e.entry.js} +1 -1
  196. package/dist/ezui/{p-b11f035c.entry.js → p-9f5fa3f9.entry.js} +1 -1
  197. package/dist/ezui/p-a08b309b.entry.js +1 -0
  198. package/dist/ezui/{p-2da09f70.entry.js → p-a80b1287.entry.js} +1 -1
  199. package/dist/ezui/p-af15c277.entry.js +1 -0
  200. package/dist/ezui/{p-32b4163f.entry.js → p-b041333c.entry.js} +1 -1
  201. package/dist/ezui/p-ba875f37.entry.js +1 -0
  202. package/dist/ezui/p-bc2f844e.entry.js +1 -0
  203. package/dist/ezui/{p-e2dfd935.entry.js → p-c0f1715f.entry.js} +1 -1
  204. package/dist/ezui/{p-83885b21.entry.js → p-cc2dc4f4.entry.js} +1 -1
  205. package/dist/ezui/p-d6ffe679.entry.js +1 -0
  206. package/dist/ezui/p-eb36f072.entry.js +1 -0
  207. package/dist/ezui/p-f56dd1da.entry.js +1 -0
  208. package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +15 -7
  209. package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +76 -0
  210. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +12 -15
  211. package/dist/types/components/ez-dialog/ez-dialog.d.ts +8 -2
  212. package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +5 -0
  213. package/dist/types/components/ez-form/ez-form.d.ts +19 -1
  214. package/dist/types/components/ez-form-view/ez-form-view.d.ts +5 -0
  215. package/dist/types/components/ez-form-view/structure/index.d.ts +15 -0
  216. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +9 -6
  217. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -3
  218. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -0
  219. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  220. package/dist/types/components/ez-grid/ez-grid.d.ts +13 -5
  221. package/dist/types/components/ez-grid/interfaces/IColumnFilter.d.ts +4 -0
  222. package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
  223. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +8 -0
  224. package/dist/types/components/ez-grid/utils/ColumnFilterManager.d.ts +9 -0
  225. package/dist/types/components/ez-grid/utils/InMemoryFilterColumnDataSource.d.ts +19 -0
  226. package/dist/types/components/ez-grid/utils/index.d.ts +1 -0
  227. package/dist/types/components/ez-guide-navigator/ez-guide-navigator.d.ts +4 -0
  228. package/dist/types/components/ez-guide-navigator/interfaces/IGuideItem.d.ts +1 -0
  229. package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +4 -0
  230. package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.d.ts +2 -0
  231. package/dist/types/components/ez-search/ez-search.d.ts +112 -10
  232. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +3 -0
  233. package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -0
  234. package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +1 -0
  235. package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +1 -0
  236. package/dist/types/components.d.ts +236 -17
  237. package/dist/types/utils/ApplicationUtils.d.ts +24 -0
  238. package/dist/types/utils/constants.d.ts +1 -0
  239. package/dist/types/utils/form/DataBinder.d.ts +1 -0
  240. package/dist/types/utils/index.d.ts +1 -0
  241. package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +2 -1
  242. package/dist/types/utils/interfaces/IAction.d.ts +7 -0
  243. package/package.json +4 -3
  244. package/react/components.d.ts +3 -0
  245. package/react/components.js +3 -0
  246. package/react/components.js.map +1 -1
  247. package/dist/cjs/ez-card-item.cjs.entry.js +0 -52
  248. package/dist/cjs/ez-filter-input_2.cjs.entry.js +0 -137
  249. package/dist/esm/constants-6dab64f7.js +0 -4
  250. package/dist/esm/ez-card-item.entry.js +0 -48
  251. package/dist/esm/ez-filter-input_2.entry.js +0 -132
  252. package/dist/ezui/p-050247dc.entry.js +0 -1
  253. package/dist/ezui/p-1e7c4986.entry.js +0 -1
  254. package/dist/ezui/p-244dfe8a.entry.js +0 -1
  255. package/dist/ezui/p-27a01a26.js +0 -1
  256. package/dist/ezui/p-2a0e1679.entry.js +0 -1
  257. package/dist/ezui/p-4535da17.entry.js +0 -1
  258. package/dist/ezui/p-4c8b029b.entry.js +0 -1
  259. package/dist/ezui/p-4e31b69b.entry.js +0 -1
  260. package/dist/ezui/p-5495fa45.entry.js +0 -1
  261. package/dist/ezui/p-5ce6548c.entry.js +0 -1
  262. package/dist/ezui/p-68352e41.entry.js +0 -1
  263. package/dist/ezui/p-87e85160.entry.js +0 -1
  264. package/dist/ezui/p-8bd3903b.entry.js +0 -1
  265. package/dist/ezui/p-90fa4cb3.entry.js +0 -1
  266. package/dist/ezui/p-9285b53e.entry.js +0 -1
  267. package/dist/ezui/p-a510a4c5.entry.js +0 -1
  268. package/dist/ezui/p-d51aa09b.entry.js +0 -1
  269. package/dist/ezui/p-db528b31.entry.js +0 -1
  270. package/dist/ezui/p-e67d0bd5.entry.js +0 -1
  271. package/dist/ezui/p-e7fa0ad6.entry.js +0 -1
  272. package/dist/ezui/p-f15ec3bb.js +0 -1
  273. package/dist/ezui/p-ff82b176.entry.js +0 -1
@@ -1,28 +1,25 @@
1
- import { ElementIDUtils, FloatingManager, ObjectUtils, StringUtils } from "@sankhyalabs/core";
1
+ import { ElementIDUtils, FloatingManager, ObjectUtils } from "@sankhyalabs/core";
2
2
  import { h, Host } from "@stencil/core";
3
- import { ApplicationUtils, CSSVarsUtils } from "../../utils";
4
- import { REQUIRED_INFO } from "../../utils/constants";
3
+ import { CSSVarsUtils } from "../../utils";
5
4
  export class EzComboBox {
6
5
  constructor() {
7
6
  this._changeDeboucingTimeout = null;
8
- this._limitCharsToSearch = 3;
9
7
  this._deboucingTime = 300;
10
8
  this._maxWidthValue = 0;
11
9
  this._tabPressed = false;
12
10
  this._textEmptyList = "Nenhum resultado encontrado";
13
- this._textEmptySearch = "Nenhum resultado de {0} encontrado";
14
11
  this._lookupMode = false;
15
12
  this._preSelection = undefined;
16
13
  this._visibleOptions = undefined;
17
14
  this._startLoading = false;
18
15
  this._showLoading = true;
19
16
  this._criteria = undefined;
17
+ this.limitCharsToSearch = 3;
20
18
  this.value = undefined;
21
19
  this.label = undefined;
22
20
  this.enabled = true;
23
21
  this.options = undefined;
24
22
  this.errorMessage = undefined;
25
- this.searchMode = undefined;
26
23
  this.showSelectedValue = false;
27
24
  this.showOptionValue = false;
28
25
  this.suppressSearch = false;
@@ -30,7 +27,9 @@ export class EzComboBox {
30
27
  this.suppressEmptyOption = false;
31
28
  this.canShowError = true;
32
29
  this.mode = "regular";
30
+ this.hideErrorOnFocusOut = true;
33
31
  this.listOptionsPosition = undefined;
32
+ this.isTextSearch = false;
34
33
  }
35
34
  observeErrorMessage() {
36
35
  var _a;
@@ -44,7 +43,7 @@ export class EzComboBox {
44
43
  observeValue(newValue, oldValue) {
45
44
  if (this._textInput && newValue != oldValue) {
46
45
  try {
47
- if (this.searchMode && typeof newValue === "string") {
46
+ if (typeof newValue === "string") {
48
47
  this.setInputValue();
49
48
  return;
50
49
  }
@@ -207,7 +206,7 @@ export class EzComboBox {
207
206
  }
208
207
  updateVisibleOptions() {
209
208
  let opts = this._source || [];
210
- if (!this.searchMode && this._criteria) {
209
+ if (this._criteria) {
211
210
  const upperCriteria = this._criteria.toUpperCase();
212
211
  opts = opts.filter(opt => opt.label.toLocaleUpperCase().indexOf(upperCriteria) > -1);
213
212
  }
@@ -282,7 +281,7 @@ export class EzComboBox {
282
281
  return this._floatingID !== undefined && FloatingManager.isFloating(this._floatingID);
283
282
  }
284
283
  nextOption() {
285
- if (this.searchMode && !this.isOptionsVisible()) {
284
+ if (!this.isOptionsVisible()) {
286
285
  return;
287
286
  }
288
287
  this.showOptions();
@@ -305,9 +304,6 @@ export class EzComboBox {
305
304
  this.selectOption(this._visibleOptions[this._preSelection]);
306
305
  this._preSelection = undefined;
307
306
  }
308
- else {
309
- this.controlListWithOnlyOne();
310
- }
311
307
  }
312
308
  updateSource(source) {
313
309
  this._startLoading = false;
@@ -326,7 +322,6 @@ export class EzComboBox {
326
322
  this.updateVisibleOptions();
327
323
  if (this._tabPressed) {
328
324
  this._tabPressed = false;
329
- this.controlEmptySearch();
330
325
  }
331
326
  }
332
327
  else {
@@ -334,10 +329,6 @@ export class EzComboBox {
334
329
  }
335
330
  }
336
331
  }
337
- clearSource() {
338
- this._source = [];
339
- this.updateVisibleOptions();
340
- }
341
332
  selectOption(newOption) {
342
333
  var _a, _b;
343
334
  const currentValue = this.getSelectedOption(this.value);
@@ -349,11 +340,6 @@ export class EzComboBox {
349
340
  else {
350
341
  this.resetOptions();
351
342
  }
352
- if (this.searchMode) {
353
- this._visibleOptions = [];
354
- this.clearSource();
355
- }
356
- this.setFocus();
357
343
  }
358
344
  loadOptions(mode, argument = "") {
359
345
  this._criteria = argument;
@@ -389,93 +375,6 @@ export class EzComboBox {
389
375
  clearSearch() {
390
376
  this.value = null;
391
377
  }
392
- controlListWithOnlyOne() {
393
- var _a;
394
- if (this.searchMode) {
395
- const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
396
- if ((source === null || source === void 0 ? void 0 : source.length) === 1) {
397
- this.selectOption(source[0]);
398
- }
399
- }
400
- }
401
- controlEmptySearch() {
402
- var _a;
403
- if (this.searchMode) {
404
- if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
405
- this.clearSearch();
406
- ApplicationUtils.info(this._textEmptyList);
407
- }
408
- else {
409
- this.controlListWithOnlyOne();
410
- }
411
- }
412
- }
413
- validateDescriptionValue() {
414
- if (!this.searchMode || StringUtils.isEmpty(this.value)) {
415
- return;
416
- }
417
- let value = this.value;
418
- if (typeof value === "object") {
419
- return;
420
- }
421
- if (StringUtils.isEmpty(value)) {
422
- return;
423
- }
424
- this.loadDescriptionValue(value);
425
- }
426
- async loadDescriptionValue(argument) {
427
- var _a, _b;
428
- if (argument == undefined) {
429
- return;
430
- }
431
- if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0) {
432
- this.loadOptionValue(argument);
433
- return;
434
- }
435
- const searchArgument = {
436
- mode: SearchMode.PREDICTIVE,
437
- argument
438
- };
439
- const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument));
440
- if (source == undefined) {
441
- return;
442
- }
443
- if (source instanceof Promise) {
444
- source.then((result) => {
445
- this.setDescriptionValue(result);
446
- });
447
- }
448
- else {
449
- this.setDescriptionValue(source);
450
- }
451
- }
452
- setDescriptionValue(source) {
453
- const value = (source === null || source === void 0 ? void 0 : source[0]) || source;
454
- if (value == undefined || !Object.keys(value).length) {
455
- this.showNoResultMessage();
456
- return;
457
- }
458
- this._lookupMode = true;
459
- this.value = value;
460
- }
461
- loadOptionValue(argument) {
462
- var _a;
463
- const source = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((opt) => opt.value === argument);
464
- if (source != undefined) {
465
- this.selectOption(source);
466
- }
467
- else {
468
- this.showNoResultMessage();
469
- }
470
- }
471
- async showNoResultMessage() {
472
- this.clearSearch();
473
- ApplicationUtils.info(this._textEmptySearch.replace("{0}", this.getFieldLabel()));
474
- }
475
- getFieldLabel() {
476
- var _a;
477
- return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(REQUIRED_INFO, "").toUpperCase();
478
- }
479
378
  resetOptions() {
480
379
  this.hideOptions();
481
380
  this._criteria = undefined;
@@ -501,12 +400,7 @@ export class EzComboBox {
501
400
  });
502
401
  }
503
402
  }
504
- if (this.searchMode) {
505
- this.updateSource([]);
506
- }
507
- else {
508
- this.loadOptions(SearchMode.PRELOAD);
509
- }
403
+ this.loadOptions(SearchMode.PRELOAD);
510
404
  }
511
405
  componentDidRender() {
512
406
  var _a;
@@ -516,7 +410,6 @@ export class EzComboBox {
516
410
  (_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
517
411
  ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
518
412
  });
519
- this.validateDescriptionValue();
520
413
  }
521
414
  componentDidLoad() {
522
415
  CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
@@ -536,7 +429,7 @@ export class EzComboBox {
536
429
  // Event handlers
537
430
  //---------------------------------------------
538
431
  handlerIconClick() {
539
- this.searchMode ? this.loadOptions(SearchMode.ADVANCED) : this.showOptions();
432
+ this.showOptions();
540
433
  }
541
434
  onTextInputChangeHandler(event) {
542
435
  var _a;
@@ -548,40 +441,17 @@ export class EzComboBox {
548
441
  return;
549
442
  }
550
443
  const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
551
- const argumentNumber = Number(argument || undefined);
552
444
  if (!this._criteria) {
553
445
  this._textInput.value = event.data || argument;
554
446
  }
555
447
  this._criteria = argument;
556
448
  if (argument) {
557
- if (this.searchMode) {
558
- this._showLoading = false;
559
- this.clearSource();
560
- if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
561
- this._showLoading = true;
562
- this._changeDeboucingTimeout = window.setTimeout(() => {
563
- this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
564
- }, this._deboucingTime);
565
- this.showOptions();
566
- }
567
- else {
568
- this.hideOptions();
569
- }
570
- }
571
- else {
572
- this.updateVisibleOptions();
573
- this.showOptions();
574
- }
449
+ this.updateVisibleOptions();
450
+ this.showOptions();
575
451
  }
576
452
  else {
577
453
  this.hideOptions();
578
- if (this.searchMode) {
579
- this._showLoading = false;
580
- this.clearSource();
581
- }
582
- else {
583
- this.updateVisibleOptions();
584
- }
454
+ this.updateVisibleOptions();
585
455
  }
586
456
  }
587
457
  clearDeboucingTimeout() {
@@ -591,9 +461,7 @@ export class EzComboBox {
591
461
  }
592
462
  }
593
463
  onTextInputClickHandler() {
594
- if (!this.searchMode) {
595
- this.showOptions();
596
- }
464
+ this.showOptions();
597
465
  }
598
466
  keyDownHandler(event) {
599
467
  this._tabPressed = false;
@@ -625,7 +493,6 @@ export class EzComboBox {
625
493
  break;
626
494
  case "Tab":
627
495
  this._tabPressed = true;
628
- this.controlListWithOnlyOne();
629
496
  break;
630
497
  }
631
498
  //ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
@@ -635,17 +502,15 @@ export class EzComboBox {
635
502
  //event.stopPropagation();
636
503
  }
637
504
  onTextInputFocusOutHandler() {
638
- this.cancelPreselection();
505
+ if (this.hideErrorOnFocusOut)
506
+ this.cancelPreselection();
639
507
  }
640
508
  canShowListOptions() {
641
509
  return !this._showLoading && this._visibleOptions.length > 0;
642
510
  }
643
511
  render() {
644
- var _a;
645
512
  ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
646
- return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })), this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
647
- ? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
648
- : undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
513
+ return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "chevron-down" }))), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
649
514
  && this._visibleOptions.length === 0
650
515
  && h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
651
516
  && h("div", { class: "message" }, h("div", { class: "message__loading" })), this.showOptionValue
@@ -666,6 +531,24 @@ export class EzComboBox {
666
531
  }
667
532
  static get properties() {
668
533
  return {
534
+ "limitCharsToSearch": {
535
+ "type": "number",
536
+ "mutable": false,
537
+ "complexType": {
538
+ "original": "number",
539
+ "resolved": "number",
540
+ "references": {}
541
+ },
542
+ "required": false,
543
+ "optional": false,
544
+ "docs": {
545
+ "tags": [],
546
+ "text": "Define o limite de caracteres m\u00EDnimo para realizar uma pesquisa"
547
+ },
548
+ "attribute": "limit-chars-to-search",
549
+ "reflect": false,
550
+ "defaultValue": "3"
551
+ },
669
552
  "value": {
670
553
  "type": "string",
671
554
  "mutable": true,
@@ -761,23 +644,6 @@ export class EzComboBox {
761
644
  "attribute": "error-message",
762
645
  "reflect": true
763
646
  },
764
- "searchMode": {
765
- "type": "boolean",
766
- "mutable": false,
767
- "complexType": {
768
- "original": "boolean",
769
- "resolved": "boolean",
770
- "references": {}
771
- },
772
- "required": false,
773
- "optional": false,
774
- "docs": {
775
- "tags": [],
776
- "text": "Se true ativa o modo pesquisa do ez-combo-box."
777
- },
778
- "attribute": "search-mode",
779
- "reflect": false
780
- },
781
647
  "showSelectedValue": {
782
648
  "type": "boolean",
783
649
  "mutable": false,
@@ -914,6 +780,24 @@ export class EzComboBox {
914
780
  "reflect": true,
915
781
  "defaultValue": "\"regular\""
916
782
  },
783
+ "hideErrorOnFocusOut": {
784
+ "type": "boolean",
785
+ "mutable": false,
786
+ "complexType": {
787
+ "original": "boolean",
788
+ "resolved": "boolean",
789
+ "references": {}
790
+ },
791
+ "required": false,
792
+ "optional": false,
793
+ "docs": {
794
+ "tags": [],
795
+ "text": "Quando verdadeiro deixa de exibir a mensagem de erro (se existente) quando focar em um elemento diferente."
796
+ },
797
+ "attribute": "hide-error-on-focus-out",
798
+ "reflect": false,
799
+ "defaultValue": "true"
800
+ },
917
801
  "listOptionsPosition": {
918
802
  "type": "unknown",
919
803
  "mutable": false,
@@ -932,6 +816,24 @@ export class EzComboBox {
932
816
  "tags": [],
933
817
  "text": "Define um posicionamento fixo para a lista de op\u00E7\u00F5es do CheckBox."
934
818
  }
819
+ },
820
+ "isTextSearch": {
821
+ "type": "boolean",
822
+ "mutable": false,
823
+ "complexType": {
824
+ "original": "boolean",
825
+ "resolved": "boolean",
826
+ "references": {}
827
+ },
828
+ "required": false,
829
+ "optional": false,
830
+ "docs": {
831
+ "tags": [],
832
+ "text": "Informa se a pesquisa \u00E9 do tipo texto."
833
+ },
834
+ "attribute": "is-text-search",
835
+ "reflect": false,
836
+ "defaultValue": "false"
935
837
  }
936
838
  };
937
839
  }
@@ -48,7 +48,7 @@
48
48
  --dialog__success--background-color: var(--color--alert-success-500, #00523c);
49
49
 
50
50
  /*@doc Define a camada que o dialog será exibido.*/
51
- --dialog-z-index: var(--most-visible, 3);
51
+ --dialog-z-index: var(--elevation--100, 100);
52
52
  /*@doc Contém a imagem do ícone de alerta.*/
53
53
  --dialog--warning__image: url('data: image/svg+xml;utf8,<svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><path d="M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895"/></svg>');
54
54
  /*@doc Contém a imagem do ícone crítico.*/
@@ -1,4 +1,4 @@
1
- import { h, forceUpdate } from "@stencil/core";
1
+ import { h, forceUpdate, } from '@stencil/core';
2
2
  import { DialogType } from "./DialogType";
3
3
  import { ElementIDUtils, FloatingManager } from "@sankhyalabs/core";
4
4
  class Message {
@@ -17,10 +17,12 @@ class Message {
17
17
  }
18
18
  export class EzDialog {
19
19
  constructor() {
20
+ this.PRIMARY_BUTTON_ID = "EZ_DIALOG_PRIMARY_BUTTON";
20
21
  this.labelConfirm = 'Sim';
21
22
  this.labelCancel = 'Não';
22
23
  this.btnConfirmDanger = false;
23
24
  this._messageQueue = [];
25
+ this._canFocusOnPrimaryBtn = false;
24
26
  this.confirm = false;
25
27
  this.dialogType = undefined;
26
28
  this.message = undefined;
@@ -29,8 +31,17 @@ export class EzDialog {
29
31
  this.ezTitle = undefined;
30
32
  this.beforeClose = undefined;
31
33
  }
32
- observeConfig() {
34
+ observeConfig(newValue, oldValue) {
33
35
  this.manageOverflow();
36
+ //Eh preciso verificar se gouve de fato mudança do estado opened de FALSE para TRUE
37
+ if (newValue && !oldValue) {
38
+ this._canFocusOnPrimaryBtn = true;
39
+ }
40
+ }
41
+ handleKeyDown(event) {
42
+ if (event.key === 'Escape' || event.key === 'Esc') {
43
+ this.handleButtonClick(false);
44
+ }
34
45
  }
35
46
  manageOverflow() {
36
47
  if (this.opened) {
@@ -146,17 +157,32 @@ export class EzDialog {
146
157
  }
147
158
  componentDidRender() {
148
159
  this.manageOverlay();
160
+ this.focusOnDialog();
161
+ this.handleFocusOnPrimaryButton();
162
+ }
163
+ focusOnDialog() {
149
164
  const dialog = this._element.shadowRoot.querySelector('.overlay .dialog');
150
165
  if (dialog instanceof HTMLDivElement) {
151
166
  dialog.style.outline = 'none';
152
167
  dialog.focus();
153
168
  }
154
169
  }
170
+ handleFocusOnPrimaryButton() {
171
+ if (this._canFocusOnPrimaryBtn) {
172
+ this.focusOnPrimaryButton();
173
+ this._canFocusOnPrimaryBtn = false;
174
+ }
175
+ }
176
+ focusOnPrimaryButton() {
177
+ const btnConfirm = this._element.shadowRoot.querySelector(`#${this.PRIMARY_BUTTON_ID}`);
178
+ const buttonElement = btnConfirm === null || btnConfirm === void 0 ? void 0 : btnConfirm.shadowRoot.querySelector('button');
179
+ buttonElement === null || buttonElement === void 0 ? void 0 : buttonElement.focus();
180
+ }
155
181
  render() {
156
182
  if (this.opened && this._currentMessage) {
157
183
  return (h("div", { class: "overlay", ref: ref => this._overlayRef = ref }, h("div", { tabindex: "-1", class: "dialog" }, this.getTypeIndicatorElement(this._currentMessage), h("div", { class: this.getClassContainer(this._currentMessage) }, h("div", { class: "title__container" }, h("div", { class: "title__box" }, this.getIconElement(this._currentMessage), h("div", { class: this.getClassTitleLabel(this._currentMessage), innerHTML: this._currentMessage.title, "data-element-id": ElementIDUtils.getInternalIDInfo("title") })), h("button", { class: "btn-close", onClick: () => this.handleButtonClick(false), "data-element-id": ElementIDUtils.getInternalIDInfo("buttonClose") })), h("div", { class: "message", innerHTML: this._currentMessage.message, "data-element-id": ElementIDUtils.getInternalIDInfo("message") }), this._currentMessage.confirm &&
158
- h("div", { class: "button-yes-no__container" }, h("ez-button", { class: "button__cancel", "data-element-id": ElementIDUtils.getInternalIDInfo("cancel"), label: this._currentMessage.labelCancel, onClick: () => this.handleButtonClick(false) }), h("ez-button", { class: !this._currentMessage.btnConfirmDanger ? "button__confirm" : "button__confirm--danger", "data-element-id": ElementIDUtils.getInternalIDInfo("confirm"), label: this._currentMessage.labelConfirm, onClick: () => this.handleButtonClick(true) })), !this._currentMessage.confirm &&
159
- h("div", { class: "button__confirm--container" }, h("ez-button", { label: 'Ok', "data-element-id": ElementIDUtils.getInternalIDInfo("ok"), class: "button__confirm", onClick: () => this.handleButtonClick(true) }))))));
184
+ h("div", { class: "button-yes-no__container" }, h("ez-button", { class: "button__cancel", "data-element-id": ElementIDUtils.getInternalIDInfo("cancel"), label: this._currentMessage.labelCancel, onClick: () => this.handleButtonClick(false) }), h("ez-button", { id: this.PRIMARY_BUTTON_ID, class: !this._currentMessage.btnConfirmDanger ? "button__confirm" : "button__confirm--danger", "data-element-id": ElementIDUtils.getInternalIDInfo("confirm"), label: this._currentMessage.labelConfirm, onClick: () => this.handleButtonClick(true) })), !this._currentMessage.confirm &&
185
+ h("div", { class: "button__confirm--container" }, h("ez-button", { id: this.PRIMARY_BUTTON_ID, label: 'Ok', "data-element-id": ElementIDUtils.getInternalIDInfo("ok"), class: "button__confirm", onClick: () => this.handleButtonClick(true) }))))));
160
186
  }
161
187
  return null;
162
188
  }
@@ -398,4 +424,13 @@ export class EzDialog {
398
424
  "methodName": "observeConfig"
399
425
  }];
400
426
  }
427
+ static get listeners() {
428
+ return [{
429
+ "name": "keydown",
430
+ "method": "handleKeyDown",
431
+ "target": "window",
432
+ "capture": false,
433
+ "passive": false
434
+ }];
435
+ }
401
436
  }
@@ -12,10 +12,8 @@
12
12
  --ez-dropdown--background-color: var(--background--xlight, #fff);
13
13
  /*@doc Define a fonte do componente.*/
14
14
  --ez-dropdown--font-family: var(--font-pattern, 'Roboto');
15
- /*@doc Define a largura máxima do componente.*/
16
- --ez-dropdown--max-width: 320px;
17
15
  /*@doc Define a altura máxima do componente.*/
18
- --ez-dropdown--max-height: 440px;
16
+ --ez-dropdown--max-height: 415px;
19
17
 
20
18
  /* item*/
21
19
  /*@doc Define o espaçamento interno de cada item do componente.*/
@@ -120,6 +118,9 @@
120
118
  border-radius: var(--ez-dropdown--border-radius);
121
119
  background-color: var(--ez-dropdown--background-color);
122
120
  max-width: var(--ez-dropdown--max-width);
121
+ }
122
+
123
+ .ez-dropdown__max-height {
123
124
  max-height: var(--ez-dropdown--max-height);
124
125
  }
125
126
 
@@ -16,6 +16,11 @@ export class EzDropdown {
16
16
  this.value = undefined;
17
17
  this.itemBuilder = undefined;
18
18
  }
19
+ handleClickOutside(event) {
20
+ if (!this._element.contains(event.target)) {
21
+ this.ezOutsideClick.emit();
22
+ }
23
+ }
19
24
  //---------------------------------------------
20
25
  // Private methods
21
26
  //---------------------------------------------
@@ -94,13 +99,13 @@ export class EzDropdown {
94
99
  this._itemList[item.id] = {};
95
100
  }
96
101
  }
97
- getContainerItemBuilder(item, level) {
102
+ getContainerItemBuilder(item, level, isLockedLevels, hasIcon, hasChildren) {
98
103
  if (this.itemBuilder == undefined) {
99
104
  return;
100
105
  }
101
106
  const customContent = this.itemBuilder(item, level);
102
107
  if (customContent == undefined) {
103
- return;
108
+ return this.defaultItemBuilder(item, isLockedLevels, hasIcon, hasChildren);
104
109
  }
105
110
  if (typeof customContent !== "string") {
106
111
  return (h("div", { class: "ez-dropdown__item-builder" }, customContent));
@@ -121,7 +126,7 @@ export class EzDropdown {
121
126
  var _a;
122
127
  return (item.type !== "divider"
123
128
  ? h("div", Object.assign({ ref: (ref) => this._itemList[item.id] = ref, class: "ez-dropdown__item", "data-level": level }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`${item.id}_ezDropdownItem`) }), h("div", { class: "ez-dropdown__item-content", onClick: (evt) => this.onItemClick(evt, item), onMouseOver: (evt) => this.onShowSubmenu(evt, item) }, this.itemBuilder
124
- ? this.getContainerItemBuilder(item, level)
129
+ ? this.getContainerItemBuilder(item, level, isLockedLevels, hasIcon, hasChildren)
125
130
  : this.defaultItemBuilder(item, isLockedLevels, hasIcon, hasChildren)), ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
126
131
  !isLockedLevels &&
127
132
  hasChildren &&
@@ -137,7 +142,7 @@ export class EzDropdown {
137
142
  const hasGroup = this.hasGroup(branchItems);
138
143
  const hasIcon = this.hasIcon(branchItems);
139
144
  const hasChildren = this.hasChildren(branchItems);
140
- return (h("div", { class: "ez-dropdown", "data-level": level }, h("div", { class: "ez-dropdown__container" }, Object.keys(itemsByGroup)
145
+ return (h("div", { class: "ez-dropdown ez-dropdown__max-height", "data-level": level }, h("div", { class: "ez-dropdown__container" }, Object.keys(itemsByGroup)
141
146
  .map((groupLabel) => {
142
147
  return (h("div", Object.assign({ class: "ez-dropdown__group" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`${groupLabel}_ezDropdownGroup`) }), groupLabel !== "noGroup" &&
143
148
  h("label", { class: "ez-dropdown__group-label", title: groupLabel }, groupLabel), hasGroup &&
@@ -350,7 +355,31 @@ export class EzDropdown {
350
355
  }
351
356
  }
352
357
  }
358
+ }, {
359
+ "method": "ezOutsideClick",
360
+ "name": "ezOutsideClick",
361
+ "bubbles": true,
362
+ "cancelable": true,
363
+ "composed": true,
364
+ "docs": {
365
+ "tags": [],
366
+ "text": "Emitido quando ocorrer um click fora do componente."
367
+ },
368
+ "complexType": {
369
+ "original": "void",
370
+ "resolved": "void",
371
+ "references": {}
372
+ }
353
373
  }];
354
374
  }
355
375
  static get elementRef() { return "_element"; }
376
+ static get listeners() {
377
+ return [{
378
+ "name": "click",
379
+ "method": "handleClickOutside",
380
+ "target": "document",
381
+ "capture": false,
382
+ "passive": false
383
+ }];
384
+ }
356
385
  }