@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-76362.1 → 0.0.0-bugfix-dev-KB-79020.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/dist/cjs/DataBinder-3b083480.js +445 -0
  2. package/dist/cjs/FocusResolver-885f2173.js +35 -0
  3. package/dist/cjs/ez-actions-button.cjs.entry.js +4 -3
  4. package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-alert.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-badge.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-button.cjs.entry.js +2 -2
  10. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-card-item_3.cjs.entry.js +13 -20
  12. package/dist/cjs/ez-chart.cjs.entry.js +2 -2
  13. package/dist/cjs/ez-check.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-chip.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
  16. package/dist/cjs/ez-combo-box.cjs.entry.js +49 -13
  17. package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +5 -4
  18. package/dist/cjs/ez-date-input.cjs.entry.js +9 -3
  19. package/dist/cjs/ez-date-time-input.cjs.entry.js +9 -3
  20. package/dist/cjs/ez-dialog.cjs.entry.js +11 -3
  21. package/dist/cjs/ez-dropdown_2.cjs.entry.js +1 -1
  22. package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
  23. package/dist/cjs/ez-form-view.cjs.entry.js +3 -3
  24. package/dist/cjs/ez-form.cjs.entry.js +6 -326
  25. package/dist/cjs/ez-grid.cjs.entry.js +14620 -70502
  26. package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
  27. package/dist/cjs/ez-icon.cjs.entry.js +2 -2
  28. package/dist/cjs/ez-list.cjs.entry.js +152 -101
  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 +1 -1
  33. package/dist/cjs/ez-number-input.cjs.entry.js +9 -2
  34. package/dist/cjs/ez-popover.cjs.entry.js +2 -2
  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_2.cjs.entry.js +1 -1
  38. package/dist/cjs/ez-search.cjs.entry.js +68 -23
  39. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
  40. package/dist/cjs/ez-split-button.cjs.entry.js +2 -2
  41. package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
  42. package/dist/cjs/ez-split-panel.cjs.entry.js +15 -5
  43. package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
  44. package/dist/cjs/ez-text-area.cjs.entry.js +67 -5
  45. package/dist/cjs/ez-text-input.cjs.entry.js +80 -8
  46. package/dist/cjs/ez-time-input.cjs.entry.js +7 -1
  47. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  48. package/dist/cjs/ez-tree.cjs.entry.js +1 -1
  49. package/dist/cjs/ez-upload.cjs.entry.js +1 -1
  50. package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
  51. package/dist/cjs/ezui.cjs.js +2 -2
  52. package/dist/cjs/filter-column.cjs.entry.js +1 -1
  53. package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +0 -3
  54. package/dist/cjs/loader.cjs.js +2 -2
  55. package/dist/collection/collection-manifest.json +1 -1
  56. package/dist/collection/components/ez-actions-button/ez-actions-button.js +3 -2
  57. package/dist/collection/components/ez-button/ez-button.css +2 -2
  58. package/dist/collection/components/ez-card-item/ez-card-item.css +14 -5
  59. package/dist/collection/components/ez-combo-box/ez-combo-box.css +12 -0
  60. package/dist/collection/components/ez-combo-box/ez-combo-box.js +76 -15
  61. package/dist/collection/components/ez-date-input/ez-date-input.js +35 -4
  62. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +35 -4
  63. package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
  64. package/dist/collection/components/ez-dialog/ez-dialog.js +9 -1
  65. package/dist/collection/components/ez-filter-input/ez-filter-input.css +0 -11
  66. package/dist/collection/components/ez-filter-input/ez-filter-input.js +22 -52
  67. package/dist/collection/components/ez-form/ez-form.js +1 -0
  68. package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +3 -2
  69. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
  70. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +100 -27
  71. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +8 -0
  72. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +164 -46
  73. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +7 -0
  74. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +1 -0
  75. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +1 -0
  76. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +1 -0
  77. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +1 -0
  78. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +4 -1
  79. package/dist/collection/components/ez-grid/ez-grid.js +90 -3
  80. package/dist/collection/components/ez-icon/ez-icon.css +153 -149
  81. package/dist/collection/components/ez-list/ez-list.css +5 -5
  82. package/dist/collection/components/ez-list/ez-list.js +152 -170
  83. package/dist/collection/components/ez-modal/ez-modal.css +4 -0
  84. package/dist/collection/components/ez-modal/ez-modal.js +2 -2
  85. package/dist/collection/components/ez-number-input/ez-number-input.css +8 -0
  86. package/dist/collection/components/ez-number-input/ez-number-input.js +25 -0
  87. package/dist/collection/components/ez-popover/ez-popover.css +3 -10
  88. package/dist/collection/components/ez-popup/ez-popup.css +4 -8
  89. package/dist/collection/components/ez-search/ez-search.css +1 -1
  90. package/dist/collection/components/ez-search/ez-search.js +94 -24
  91. package/dist/collection/components/ez-split-button/ez-split-button.css +2 -2
  92. package/dist/collection/components/ez-split-panel/ez-split-panel.js +35 -4
  93. package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js +1 -0
  94. package/dist/collection/components/ez-text-area/ez-text-area.css +49 -0
  95. package/dist/collection/components/ez-text-area/ez-text-area.js +102 -2
  96. package/dist/collection/components/ez-text-input/ez-text-input.css +33 -53
  97. package/dist/collection/components/ez-text-input/ez-text-input.js +88 -6
  98. package/dist/collection/components/ez-time-input/ez-time-input.js +24 -0
  99. package/dist/collection/utils/FocusResolver.js +31 -0
  100. package/dist/collection/utils/ResponsiveInputUtils.js +26 -0
  101. package/dist/collection/utils/form/DataBinder.js +18 -3
  102. package/dist/collection/utils/form/FormMetadata.js +1 -1
  103. package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
  104. package/dist/custom-elements/index.js +15381 -70913
  105. package/dist/esm/DataBinder-02fa9bb9.js +441 -0
  106. package/dist/esm/FocusResolver-1ccbf850.js +33 -0
  107. package/dist/esm/ez-actions-button.entry.js +4 -3
  108. package/dist/esm/ez-alert-list.entry.js +1 -1
  109. package/dist/esm/ez-alert.entry.js +1 -1
  110. package/dist/esm/ez-application.entry.js +1 -1
  111. package/dist/esm/ez-badge.entry.js +1 -1
  112. package/dist/esm/ez-breadcrumb.entry.js +1 -1
  113. package/dist/esm/ez-button.entry.js +2 -2
  114. package/dist/esm/ez-calendar.entry.js +1 -1
  115. package/dist/esm/ez-card-item_3.entry.js +13 -20
  116. package/dist/esm/ez-chart.entry.js +2 -2
  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 +1 -1
  120. package/dist/esm/ez-combo-box.entry.js +50 -14
  121. package/dist/esm/ez-custom-form-input_2.entry.js +5 -4
  122. package/dist/esm/ez-date-input.entry.js +9 -3
  123. package/dist/esm/ez-date-time-input.entry.js +9 -3
  124. package/dist/esm/ez-dialog.entry.js +11 -3
  125. package/dist/esm/ez-dropdown_2.entry.js +1 -1
  126. package/dist/esm/ez-file-item.entry.js +1 -1
  127. package/dist/esm/ez-form-view.entry.js +3 -3
  128. package/dist/esm/ez-form.entry.js +5 -325
  129. package/dist/esm/ez-grid.entry.js +14589 -70471
  130. package/dist/esm/ez-guide-navigator.entry.js +1 -1
  131. package/dist/esm/ez-icon.entry.js +2 -2
  132. package/dist/esm/ez-list.entry.js +153 -102
  133. package/dist/esm/ez-loading-bar.entry.js +1 -1
  134. package/dist/esm/ez-modal-container.entry.js +1 -1
  135. package/dist/esm/ez-modal.entry.js +2 -2
  136. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  137. package/dist/esm/ez-number-input.entry.js +9 -2
  138. package/dist/esm/ez-popover.entry.js +2 -2
  139. package/dist/esm/ez-popup.entry.js +2 -2
  140. package/dist/esm/ez-radio-button.entry.js +1 -1
  141. package/dist/esm/ez-scroller_2.entry.js +1 -1
  142. package/dist/esm/ez-search.entry.js +68 -23
  143. package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
  144. package/dist/esm/ez-split-button.entry.js +2 -2
  145. package/dist/esm/ez-split-item.entry.js +1 -1
  146. package/dist/esm/ez-split-panel.entry.js +15 -5
  147. package/dist/esm/ez-tabselector.entry.js +1 -1
  148. package/dist/esm/ez-text-area.entry.js +67 -5
  149. package/dist/esm/ez-text-input.entry.js +80 -8
  150. package/dist/esm/ez-time-input.entry.js +7 -1
  151. package/dist/esm/ez-toast.entry.js +1 -1
  152. package/dist/esm/ez-tree.entry.js +1 -1
  153. package/dist/esm/ez-upload.entry.js +1 -1
  154. package/dist/esm/ez-view-stack.entry.js +1 -1
  155. package/dist/esm/ezui.js +3 -3
  156. package/dist/esm/filter-column.entry.js +1 -1
  157. package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +1 -3
  158. package/dist/esm/loader.js +3 -3
  159. package/dist/ezui/ezui.esm.js +1 -1
  160. package/dist/ezui/{p-e6b38ade.entry.js → p-0306dff7.entry.js} +1 -1
  161. package/dist/ezui/p-039a95bd.entry.js +1 -0
  162. package/dist/ezui/{p-91ccae0c.entry.js → p-09de35a2.entry.js} +1 -1
  163. package/dist/ezui/p-0a75bb05.entry.js +1 -0
  164. package/dist/ezui/p-0db68715.entry.js +1 -0
  165. package/dist/ezui/p-151fc744.entry.js +1 -0
  166. package/dist/ezui/p-15d7af92.entry.js +1 -0
  167. package/dist/ezui/{p-b2f6bc0a.entry.js → p-17be134a.entry.js} +1 -1
  168. package/dist/ezui/p-19098a3f.entry.js +1 -0
  169. package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
  170. package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
  171. package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
  172. package/dist/ezui/p-2b46b37b.entry.js +1 -0
  173. package/dist/ezui/p-2bb2a0c4.entry.js +1 -0
  174. package/dist/ezui/p-3175fe8c.entry.js +1 -0
  175. package/dist/ezui/p-43b41d3e.entry.js +309 -0
  176. package/dist/ezui/{p-0378416a.entry.js → p-44caad9a.entry.js} +1 -1
  177. package/dist/ezui/p-455e737c.js +1 -0
  178. package/dist/ezui/p-4575d511.entry.js +1 -0
  179. package/dist/ezui/{p-7567ccdd.entry.js → p-555c9018.entry.js} +1 -1
  180. package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
  181. package/dist/ezui/{p-f1c2c19e.entry.js → p-650e4b6d.entry.js} +1 -1
  182. package/dist/ezui/{p-554522db.entry.js → p-6d79930d.entry.js} +1 -1
  183. package/dist/ezui/{p-fc194825.entry.js → p-6e429cff.entry.js} +1 -1
  184. package/dist/ezui/{p-3b546374.entry.js → p-7409eeaa.entry.js} +1 -1
  185. package/dist/ezui/{p-11bfeca3.entry.js → p-77a4bd35.entry.js} +1 -1
  186. package/dist/ezui/p-783ea398.entry.js +1 -0
  187. package/dist/ezui/p-7ed30844.entry.js +1 -0
  188. package/dist/ezui/{p-e18d9e6a.entry.js → p-7fdd479f.entry.js} +1 -1
  189. package/dist/ezui/p-7fde6c1d.entry.js +1 -0
  190. package/dist/ezui/p-8481a08a.entry.js +1 -0
  191. package/dist/ezui/{p-1b08bf3c.entry.js → p-8888d9ed.entry.js} +1 -1
  192. package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
  193. package/dist/ezui/{p-e7395eae.entry.js → p-90bcd2ba.entry.js} +1 -1
  194. package/dist/ezui/{p-a921e3e7.entry.js → p-990b4318.entry.js} +1 -1
  195. package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
  196. package/dist/ezui/p-a5b91a77.entry.js +1 -0
  197. package/dist/ezui/p-a80b1287.entry.js +1 -0
  198. package/dist/ezui/{p-30951bd7.entry.js → p-baf80b13.entry.js} +1 -1
  199. package/dist/ezui/p-bc2f844e.entry.js +1 -0
  200. package/dist/ezui/p-bfad39eb.entry.js +1 -0
  201. package/dist/ezui/{p-92748142.entry.js → p-c0d9c4f8.entry.js} +1 -1
  202. package/dist/ezui/{p-b858fc6e.entry.js → p-c3045972.entry.js} +1 -1
  203. package/dist/ezui/{p-a563df31.entry.js → p-c4320a39.entry.js} +1 -1
  204. package/dist/ezui/p-cd2e78f0.entry.js +1 -0
  205. package/dist/ezui/p-d0ca26fe.entry.js +1 -0
  206. package/dist/ezui/p-dc628ed3.js +1 -0
  207. package/dist/ezui/p-dc8b36c3.entry.js +1 -0
  208. package/dist/ezui/{p-bef7daac.entry.js → p-e347df9c.entry.js} +1 -1
  209. package/dist/ezui/{p-70f1c812.entry.js → p-f9e551de.entry.js} +1 -1
  210. package/dist/ezui/p-fec696ab.entry.js +1 -0
  211. package/dist/ezui/p-ffd246f5.entry.js +1 -0
  212. package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +1 -0
  213. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +7 -1
  214. package/dist/types/components/ez-date-input/ez-date-input.d.ts +6 -1
  215. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +6 -1
  216. package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -0
  217. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +4 -11
  218. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
  219. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +12 -0
  220. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +7 -2
  221. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +2 -1
  222. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +19 -7
  223. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +3 -1
  224. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
  225. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  226. package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
  227. package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
  228. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +1 -1
  229. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
  230. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +1 -0
  231. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
  232. package/dist/types/components/ez-grid/ez-grid.d.ts +11 -1
  233. package/dist/types/components/ez-list/ez-list.d.ts +3 -26
  234. package/dist/types/components/ez-modal/ez-modal.d.ts +1 -1
  235. package/dist/types/components/ez-number-input/ez-number-input.d.ts +4 -0
  236. package/dist/types/components/ez-search/ez-search.d.ts +10 -2
  237. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +4 -0
  238. package/dist/types/components/ez-split-panel/interfaces/IPanelSizeInfo.d.ts +9 -0
  239. package/dist/types/components/ez-text-area/ez-text-area.d.ts +17 -0
  240. package/dist/types/components/ez-text-input/ez-text-input.d.ts +9 -0
  241. package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
  242. package/dist/types/components.d.ts +114 -44
  243. package/dist/types/utils/FocusResolver.d.ts +5 -0
  244. package/dist/types/utils/ResponsiveInputUtils.d.ts +6 -0
  245. package/dist/types/utils/form/DataBinder.d.ts +3 -0
  246. package/package.json +11 -4
  247. package/dist/cjs/RecordValidationProcessor-10846595.js +0 -108
  248. package/dist/esm/RecordValidationProcessor-9c6cc267.js +0 -105
  249. package/dist/ezui/p-00687830.entry.js +0 -1
  250. package/dist/ezui/p-044d46d5.entry.js +0 -1
  251. package/dist/ezui/p-11b09aa1.entry.js +0 -1
  252. package/dist/ezui/p-190c190f.entry.js +0 -304
  253. package/dist/ezui/p-2de9f0aa.entry.js +0 -1
  254. package/dist/ezui/p-36180f4d.entry.js +0 -1
  255. package/dist/ezui/p-3f8c33e0.entry.js +0 -1
  256. package/dist/ezui/p-52100a6e.entry.js +0 -1
  257. package/dist/ezui/p-5a40c77a.entry.js +0 -1
  258. package/dist/ezui/p-61059f6b.entry.js +0 -1
  259. package/dist/ezui/p-68267f59.entry.js +0 -1
  260. package/dist/ezui/p-6ec40dec.entry.js +0 -1
  261. package/dist/ezui/p-823cc11b.entry.js +0 -1
  262. package/dist/ezui/p-85b500bb.entry.js +0 -1
  263. package/dist/ezui/p-868b56f7.entry.js +0 -1
  264. package/dist/ezui/p-8ac13678.entry.js +0 -1
  265. package/dist/ezui/p-940760bf.entry.js +0 -1
  266. package/dist/ezui/p-9e08ddb0.entry.js +0 -1
  267. package/dist/ezui/p-b2a1398f.entry.js +0 -1
  268. package/dist/ezui/p-ba5f4ee7.entry.js +0 -1
  269. package/dist/ezui/p-d40b93a7.entry.js +0 -1
  270. package/dist/ezui/p-d4aba783.entry.js +0 -1
  271. package/dist/ezui/p-e3ec7422.entry.js +0 -1
  272. package/dist/ezui/p-f291db18.entry.js +0 -1
  273. package/dist/ezui/p-f42855b9.js +0 -1
@@ -38,7 +38,8 @@ export class EzSearch {
38
38
  this.options = undefined;
39
39
  this.suppressSearch = false;
40
40
  this.ensureClearButtonVisible = false;
41
- this.suppressPreLoad = false;
41
+ this.suppressPreLoad = true;
42
+ this.autoFocus = false;
42
43
  }
43
44
  observeErrorMessage() {
44
45
  var _a;
@@ -49,12 +50,21 @@ export class EzSearch {
49
50
  }
50
51
  }
51
52
  }
53
+ getValue(val) {
54
+ return typeof val === 'object' ? val === null || val === void 0 ? void 0 : val.value : val;
55
+ }
52
56
  validateNewValue(newValue, oldValue) {
53
- const getValue = (val) => typeof val === 'object' ? val === null || val === void 0 ? void 0 : val.value : val;
54
- return (getValue(newValue) !== getValue(oldValue));
57
+ const parsedNewValue = this.getValue(newValue);
58
+ const parsedOldValue = this.getValue(oldValue);
59
+ const newValueIsValid = parsedNewValue !== "[object Object]";
60
+ const valuesIsDifferent = parsedNewValue !== parsedOldValue;
61
+ if (newValueIsValid && valuesIsDifferent) {
62
+ return true;
63
+ }
64
+ return false;
55
65
  }
56
66
  async observeValue(newValue, oldValue) {
57
- if (this._textInput && newValue !== oldValue && this.validateNewValue(newValue, oldValue)) {
67
+ if (this._textInput && this.validateNewValue(newValue, oldValue)) {
58
68
  if (typeof newValue === "string") {
59
69
  await this.handleValueAsString(newValue);
60
70
  return;
@@ -97,9 +107,9 @@ export class EzSearch {
97
107
  /**
98
108
  * Aplica o foco no campo.
99
109
  */
100
- async setFocus() {
110
+ async setFocus(options) {
101
111
  if (this._textInput) {
102
- this._textInput.setFocus();
112
+ this._textInput.setFocus(options);
103
113
  }
104
114
  }
105
115
  /**
@@ -142,6 +152,9 @@ export class EzSearch {
142
152
  return;
143
153
  }
144
154
  await this.loadDescriptionValue(value);
155
+ if (!this._currentValue) {
156
+ return;
157
+ }
145
158
  this.setInputValue();
146
159
  this.ezChange.emit(this.value);
147
160
  this._currentValue = this.value;
@@ -197,7 +210,7 @@ export class EzSearch {
197
210
  return;
198
211
  }
199
212
  let text = (!this.showSelectedValue || currentValue.value == undefined) ? currentValue.label : currentValue.label ? `${currentValue.value} - ${currentValue.label}` : currentValue.value;
200
- text = text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
213
+ text = text === null || text === void 0 ? void 0 : text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
201
214
  return text;
202
215
  }
203
216
  getText() {
@@ -357,7 +370,7 @@ export class EzSearch {
357
370
  this.updateVisibleOptions();
358
371
  if (this._tabPressed) {
359
372
  this._tabPressed = false;
360
- this.controlEmptySearch();
373
+ this.controlEmptySearch(false);
361
374
  }
362
375
  }
363
376
  else {
@@ -372,15 +385,16 @@ export class EzSearch {
372
385
  replaceHighlight(value) {
373
386
  const startHighlight = new RegExp(this._startHighlightTag, 'g');
374
387
  const endHighlight = new RegExp(this._endHighlightTag, 'g');
375
- return (value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
388
+ return String(value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
376
389
  }
377
- selectOption(newOption) {
390
+ selectOption(newOption, focusOnInput = true) {
378
391
  var _a, _b;
379
392
  const currentValue = this.getSelectedOption(this.value);
380
393
  const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.value), label: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.label) });
381
- if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) === null || _b === void 0 ? void 0 : _b.toString()))
382
- || (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
383
- const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
394
+ const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: this.replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value), label: this.replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label) });
395
+ if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) === null || _b === void 0 ? void 0 : _b.toString()))
396
+ || (currentValue == undefined && newOptionsFormatted != undefined && "value" in newOptionsFormatted)) {
397
+ const adjustedOpt = !(newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) ? undefined : newOptionsFormatted;
384
398
  this.value = adjustedOpt;
385
399
  this._currentValue = adjustedOpt;
386
400
  }
@@ -390,6 +404,11 @@ export class EzSearch {
390
404
  }
391
405
  this._visibleOptions = [];
392
406
  this.clearSource();
407
+ if (focusOnInput) {
408
+ setTimeout(() => {
409
+ this.setFocus();
410
+ }, 0);
411
+ }
393
412
  }
394
413
  loadOptions(mode, argument = "") {
395
414
  this._criteria = argument;
@@ -426,7 +445,7 @@ export class EzSearch {
426
445
  this.value = null;
427
446
  this._currentValue = null;
428
447
  }
429
- controlListWithOnlyOne() {
448
+ controlListWithOnlyOne(focusOnInput = true) {
430
449
  var _a, _b;
431
450
  const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
432
451
  if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
@@ -437,17 +456,17 @@ export class EzSearch {
437
456
  value: (_b = source[0].value) === null || _b === void 0 ? void 0 : _b.replace(startHighlight, '').replace(endHighlight, ''),
438
457
  label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
439
458
  };
440
- this.selectOption(option);
459
+ this.selectOption(option, focusOnInput);
441
460
  }
442
461
  }
443
- controlEmptySearch() {
462
+ controlEmptySearch(focusOnInput = true) {
444
463
  var _a;
445
464
  if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
446
465
  this.clearSearch();
447
466
  ApplicationUtils.info(this._textEmptyList);
448
467
  }
449
468
  else {
450
- this.controlListWithOnlyOne();
469
+ this.controlListWithOnlyOne(focusOnInput);
451
470
  }
452
471
  }
453
472
  async loadDescriptionValue(argument) {
@@ -518,6 +537,19 @@ export class EzSearch {
518
537
  this._preSelection = undefined;
519
538
  this.updateVisibleOptions();
520
539
  }
540
+ async handleInitialValue() {
541
+ const valueIsValid = !!this.getValue(this.value);
542
+ if (!valueIsValid) {
543
+ return;
544
+ }
545
+ if (typeof this.value === "string") {
546
+ await this.handleValueAsString(this.value);
547
+ return;
548
+ }
549
+ let text = this.getFormattedText(this.value);
550
+ text = this.replaceQuotes(text);
551
+ this._textInput.value = text;
552
+ }
521
553
  //---------------------------------------------
522
554
  // Lifecycle web component
523
555
  //---------------------------------------------
@@ -549,10 +581,9 @@ export class EzSearch {
549
581
  ElementIDUtils.addIDInfoIfNotExists(elem, "itemSearch");
550
582
  });
551
583
  }
552
- componentDidLoad() {
584
+ async componentDidLoad() {
553
585
  this._currentValue = this.value;
554
586
  CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
555
- this.setInputValue(false);
556
587
  this._resizeObserver = new ResizeObserver((entries) => {
557
588
  window.requestAnimationFrame(() => {
558
589
  if (!Array.isArray(entries) || !entries.length)
@@ -563,6 +594,16 @@ export class EzSearch {
563
594
  }
564
595
  });
565
596
  });
597
+ await this.handleInitialValue();
598
+ if (this.autoFocus) {
599
+ requestAnimationFrame(() => {
600
+ this.setFocus({ selectText: true });
601
+ });
602
+ }
603
+ }
604
+ disconnectedCallback() {
605
+ var _a;
606
+ (_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
566
607
  }
567
608
  //---------------------------------------------
568
609
  // Event handlers
@@ -632,12 +673,16 @@ export class EzSearch {
632
673
  }
633
674
  switch (event.key) {
634
675
  case "ArrowDown":
635
- this.nextOption();
636
676
  event.stopPropagation();
677
+ if (this.canShowListOptions())
678
+ event.preventDefault();
679
+ this.nextOption();
637
680
  break;
638
681
  case "ArrowUp":
639
- this.previousOption();
640
682
  event.stopPropagation();
683
+ if (this.canShowListOptions())
684
+ event.preventDefault();
685
+ this.previousOption();
641
686
  break;
642
687
  case "Enter":
643
688
  this.handleEventPropagation(event);
@@ -648,7 +693,7 @@ export class EzSearch {
648
693
  break;
649
694
  case "Tab":
650
695
  this._tabPressed = true;
651
- this.controlListWithOnlyOne();
696
+ this.controlListWithOnlyOne(false);
652
697
  break;
653
698
  }
654
699
  //ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
@@ -1054,6 +1099,24 @@ export class EzSearch {
1054
1099
  },
1055
1100
  "attribute": "suppress-pre-load",
1056
1101
  "reflect": false,
1102
+ "defaultValue": "true"
1103
+ },
1104
+ "autoFocus": {
1105
+ "type": "boolean",
1106
+ "mutable": false,
1107
+ "complexType": {
1108
+ "original": "boolean",
1109
+ "resolved": "boolean",
1110
+ "references": {}
1111
+ },
1112
+ "required": false,
1113
+ "optional": false,
1114
+ "docs": {
1115
+ "tags": [],
1116
+ "text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
1117
+ },
1118
+ "attribute": "auto-focus",
1119
+ "reflect": false,
1057
1120
  "defaultValue": "false"
1058
1121
  }
1059
1122
  };
@@ -1110,11 +1173,18 @@ export class EzSearch {
1110
1173
  },
1111
1174
  "setFocus": {
1112
1175
  "complexType": {
1113
- "signature": "() => Promise<void>",
1114
- "parameters": [],
1176
+ "signature": "(options?: TFocusOptions) => Promise<void>",
1177
+ "parameters": [{
1178
+ "tags": [],
1179
+ "text": ""
1180
+ }],
1115
1181
  "references": {
1116
1182
  "Promise": {
1117
1183
  "location": "global"
1184
+ },
1185
+ "TFocusOptions": {
1186
+ "location": "import",
1187
+ "path": "../ez-text-input/ez-text-input"
1118
1188
  }
1119
1189
  },
1120
1190
  "return": "Promise<void>"
@@ -41,9 +41,9 @@
41
41
  /*@doc Define a cor de fundo quando o cursor está sobre o botão.*/
42
42
  --ez-split-button--hover--background-color: var(--background--light, #ffffff);
43
43
  /*@doc Define a cor do texto quando o botão está desabilitado.*/
44
- --ez-split-button--disabled-color: var(--text--disable);
44
+ --ez-split-button--disabled-color: var(--text--primary);
45
45
  /*@doc Define a cor de fundo quando o botão está desabilitado.*/
46
- --ez-split-button--disabled--background-color: var(--color--disable-secondary);
46
+ --ez-split-button--disabled--background-color: var(--background--medium);
47
47
  /*@doc Define o estido da borda quando o botão está selecionado.*/
48
48
  --ez-split-button--focus--border: var(--border--medium, 2px) var(--color--primary-300);
49
49
  /*@doc Define a sombra do botão quando selecionado.*/
@@ -38,7 +38,7 @@ export class SplitPanel {
38
38
  this.initSplit();
39
39
  this._mutationObserver = new MutationObserver((mutationsList) => {
40
40
  for (const mutation of mutationsList) {
41
- if (mutation.type === 'childList' && this._buildInProgress === false) {
41
+ if (mutation.type === 'childList' && !this._buildInProgress) {
42
42
  this._buildInProgress = true;
43
43
  window.requestAnimationFrame(() => {
44
44
  this.rebuildLayout();
@@ -61,20 +61,29 @@ export class SplitPanel {
61
61
  if (!this._items.length) {
62
62
  return;
63
63
  }
64
- this._element.style[this.direction == 'row' ? 'grid-template-rows' : 'grid-template-columns'] = this.getGridTemplate();
64
+ this._element.style[this.direction === 'row' ? 'grid-template-rows' : 'grid-template-columns'] = this.getGridTemplate();
65
65
  Split(this.getGutters());
66
66
  }
67
+ handlePanelDragEnd() {
68
+ const items = this._items.map(item => ({
69
+ id: item.id,
70
+ height: item.clientHeight,
71
+ width: item.clientWidth,
72
+ }));
73
+ this.resizeEnd.emit({ panelId: this._element.id, items });
74
+ }
67
75
  getGutters() {
68
76
  const gutters = {
69
77
  columnGutters: [],
70
78
  rowGutters: [],
79
+ onDragEnd: () => this.handlePanelDragEnd()
71
80
  };
72
81
  if (!this._items.length) {
73
82
  return gutters;
74
83
  }
75
- const proToChange = this.direction == 'row' ? 'rowGutters' : 'columnGutters';
84
+ const proToChange = this.direction === 'row' ? 'rowGutters' : 'columnGutters';
76
85
  this._items.forEach((item, index) => {
77
- if (index == this._items.length - 1)
86
+ if (index === this._items.length - 1)
78
87
  return;
79
88
  let gutterTrack = item.dataset.trackNumber;
80
89
  if (index === this._items.length - 1) {
@@ -190,6 +199,28 @@ export class SplitPanel {
190
199
  }
191
200
  };
192
201
  }
202
+ static get events() {
203
+ return [{
204
+ "method": "resizeEnd",
205
+ "name": "resizeEnd",
206
+ "bubbles": true,
207
+ "cancelable": true,
208
+ "composed": true,
209
+ "docs": {
210
+ "tags": [],
211
+ "text": ""
212
+ },
213
+ "complexType": {
214
+ "original": "IPanelSizeInfo",
215
+ "resolved": "IPanelSizeInfo",
216
+ "references": {
217
+ "IPanelSizeInfo": {
218
+ "location": "global"
219
+ }
220
+ }
221
+ }
222
+ }];
223
+ }
193
224
  static get methods() {
194
225
  return {
195
226
  "rebuildLayout": {
@@ -51,6 +51,20 @@
51
51
  /*@doc Define o espaçamento direito do label.*/
52
52
  --text-area__label--padding-right: 12px;
53
53
 
54
+ /* scrollbar */
55
+ /*@doc Define a cor da barra de rolagem do componente.*/
56
+ --text-area__scrollbar--color-default: var(--scrollbar--default, #626e82);
57
+ /*@doc Define a cor de fundo da barra de rolagem do componente.*/
58
+ --text-area__scrollbar--color-background: var(--scrollbar--background, #E5EAF0);
59
+ /*@doc Define a cor do hover na barra de rolagem do componente.*/
60
+ --text-area__scrollbar--color-hover: var(--scrollbar--hover, #2B3A54);
61
+ /*@doc Define a cor do active na barra de rolagem do componente.*/
62
+ --text-area__scrollbar--color-clicked: var(--scrollbar--clicked, #a2abb9);
63
+ /*@doc Define o raio da borda da barra de rolagem do componente.*/
64
+ --text-area__scrollbar--border-radius: var(--border--radius-small, 6px);
65
+ /*@doc Define a largura da barra de rolagem do componente.*/
66
+ --text-area__scrollbar--width: var(--space--medium, 12px);
67
+
54
68
  /***************
55
69
  host style
56
70
  ***************/
@@ -77,6 +91,9 @@ textarea {
77
91
  font-size: var(--text-area--font-size);
78
92
  color: var(--text-area--color);
79
93
  margin-top: calc(var(--space--medium, 12px) + 4px);
94
+
95
+ scrollbar-width: thin;
96
+ scrollbar-color: var(--text-area__scrollbar--color-clicked) var(--text-area__scrollbar--color-background);
80
97
  }
81
98
 
82
99
  textarea:focus {
@@ -92,6 +109,38 @@ textarea:disabled {
92
109
  cursor: not-allowed;
93
110
  }
94
111
 
112
+ textarea::-webkit-scrollbar {
113
+ background-color: var(--text-area__scrollbar--color-background);
114
+
115
+ width: var(--text-area__scrollbar--width);
116
+ max-width: var(--text-area__scrollbar--width);
117
+ min-width: var(--text-area__scrollbar--width);
118
+ }
119
+
120
+ textarea::-webkit-scrollbar-thumb {
121
+ /*public*/
122
+ background-color: var(--text-area__scrollbar--color-default);
123
+ border-radius: var(--text-area__scrollbar--border-radius);
124
+ }
125
+
126
+ textarea::-webkit-scrollbar-track {
127
+ /*public*/
128
+ background-color: var(--text-area__scrollbar--color-background);
129
+ border-radius: var(--text-area__scrollbar--border-radius);
130
+ }
131
+
132
+ textarea::-webkit-scrollbar-thumb:vertical:hover,
133
+ textarea::-webkit-scrollbar-thumb:horizontal:hover {
134
+ /*public*/
135
+ background-color: var(--text-area__scrollbar--color-hover);
136
+ }
137
+
138
+ textarea::-webkit-scrollbar-thumb:vertical:active,
139
+ textarea::-webkit-scrollbar-thumb:horizontal:active {
140
+ /*public*/
141
+ background-color: var(--text-area__scrollbar--color-clicked);
142
+ }
143
+
95
144
  .textarea {
96
145
  /*private*/
97
146
  width: 100%;
@@ -2,6 +2,8 @@ import { ElementIDUtils } from '@sankhyalabs/core';
2
2
  import { h, Host } from '@stencil/core';
3
3
  export class EzTextArea {
4
4
  constructor() {
5
+ this.LINE_HEIGHT = 24;
6
+ this.HEIGHT_RATIO = 1.4;
5
7
  this.label = undefined;
6
8
  this.value = undefined;
7
9
  this.enabled = true;
@@ -10,6 +12,8 @@ export class EzTextArea {
10
12
  this.canShowError = true;
11
13
  this.mode = "regular";
12
14
  this.enableResize = false;
15
+ this.autoRows = false;
16
+ this.autoFocus = false;
13
17
  }
14
18
  observeErrorMessage() {
15
19
  var _a, _b, _c, _d;
@@ -47,8 +51,17 @@ export class EzTextArea {
47
51
  observeRows() {
48
52
  const rows = this.rows > 0 ? this.rows : this.mode != "slim" ? 4 : 2;
49
53
  if (rows !== this.rows) {
50
- this.rows = rows;
51
- this._initialRows = rows;
54
+ this.updateRows(rows);
55
+ }
56
+ }
57
+ observeAutoRows() {
58
+ var _a, _b;
59
+ if (this.autoRows) {
60
+ (_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
61
+ this.initializeResizeObserver();
62
+ }
63
+ else {
64
+ (_b = this._resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
52
65
  }
53
66
  }
54
67
  //---------------------------------------------
@@ -117,6 +130,42 @@ export class EzTextArea {
117
130
  isFocused() {
118
131
  return this._hostElement.shadowRoot.activeElement !== null;
119
132
  }
133
+ updateRows(newRows) {
134
+ this.rows = newRows;
135
+ this._initialRows = newRows;
136
+ }
137
+ calculateMaxRows() {
138
+ const parentElement = this._hostElement.parentElement;
139
+ if (!parentElement) {
140
+ return;
141
+ }
142
+ const height = Math.max((parentElement === null || parentElement === void 0 ? void 0 : parentElement.clientHeight) || 0, this.LINE_HEIGHT);
143
+ if (height > 0) {
144
+ const maxRows = Math.floor(height / this.LINE_HEIGHT * this.HEIGHT_RATIO);
145
+ if (maxRows !== this.rows) {
146
+ this.updateRows(maxRows);
147
+ }
148
+ }
149
+ }
150
+ initializeResizeObserver() {
151
+ if (!this.autoRows) {
152
+ return;
153
+ }
154
+ const parentElement = this._hostElement.parentElement;
155
+ if (parentElement) {
156
+ try {
157
+ if (this._resizeObserver != undefined) {
158
+ this._resizeObserver.unobserve(parentElement);
159
+ }
160
+ this._resizeObserver = new ResizeObserver(this.calculateMaxRows.bind(this));
161
+ this._resizeObserver.observe(parentElement);
162
+ }
163
+ catch (e) {
164
+ console.warn(e);
165
+ }
166
+ this.calculateMaxRows();
167
+ }
168
+ }
120
169
  //---------------------------------------------
121
170
  // Event handlers
122
171
  //---------------------------------------------
@@ -139,6 +188,13 @@ export class EzTextArea {
139
188
  this._container.classList.add("textarea--focus");
140
189
  }
141
190
  }
191
+ connectedCallback() {
192
+ this.initializeResizeObserver();
193
+ }
194
+ disconnectedCallback() {
195
+ var _a;
196
+ (_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
197
+ }
142
198
  //---------------------------------------------
143
199
  // Lifecycle web component
144
200
  //---------------------------------------------
@@ -146,6 +202,11 @@ export class EzTextArea {
146
202
  this.observeErrorMessage();
147
203
  this.adjustFloatingLabel();
148
204
  this.observeMode();
205
+ if (this.autoFocus) {
206
+ requestAnimationFrame(() => {
207
+ this.setFocus();
208
+ });
209
+ }
149
210
  }
150
211
  render() {
151
212
  ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
@@ -311,6 +372,42 @@ export class EzTextArea {
311
372
  "attribute": "enable-resize",
312
373
  "reflect": true,
313
374
  "defaultValue": "false"
375
+ },
376
+ "autoRows": {
377
+ "type": "boolean",
378
+ "mutable": false,
379
+ "complexType": {
380
+ "original": "boolean",
381
+ "resolved": "boolean",
382
+ "references": {}
383
+ },
384
+ "required": false,
385
+ "optional": false,
386
+ "docs": {
387
+ "tags": [],
388
+ "text": "Ativa a op\u00E7\u00E3o de fazer as linhas do componente serem baseados na altura m\u00E1xima."
389
+ },
390
+ "attribute": "auto-rows",
391
+ "reflect": true,
392
+ "defaultValue": "false"
393
+ },
394
+ "autoFocus": {
395
+ "type": "boolean",
396
+ "mutable": false,
397
+ "complexType": {
398
+ "original": "boolean",
399
+ "resolved": "boolean",
400
+ "references": {}
401
+ },
402
+ "required": false,
403
+ "optional": false,
404
+ "docs": {
405
+ "tags": [],
406
+ "text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
407
+ },
408
+ "attribute": "auto-focus",
409
+ "reflect": false,
410
+ "defaultValue": "false"
314
411
  }
315
412
  };
316
413
  }
@@ -423,6 +520,9 @@ export class EzTextArea {
423
520
  }, {
424
521
  "propName": "rows",
425
522
  "methodName": "observeRows"
523
+ }, {
524
+ "propName": "autoRows",
525
+ "methodName": "observeAutoRows"
426
526
  }];
427
527
  }
428
528
  }