@sankhyalabs/ezui 5.21.0-dev.2 → 5.21.0-dev.21

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 (283) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/ICustomRender-6fafffce.js +13 -0
  3. package/dist/cjs/ez-actions-button.cjs.entry.js +2 -1
  4. package/dist/cjs/ez-alert-list.cjs.entry.js +7 -5
  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 +3 -3
  10. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-card-item_3.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-chart.cjs.entry.js +433 -0
  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 +2 -1
  16. package/dist/cjs/ez-combo-box.cjs.entry.js +2 -1
  17. package/dist/cjs/{ez-text-edit.cjs.entry.js → ez-custom-form-input_2.cjs.entry.js} +95 -1
  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 +1 -1
  21. package/dist/cjs/ez-dropdown.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 +34 -4
  24. package/dist/cjs/ez-form.cjs.entry.js +78 -3
  25. package/dist/cjs/ez-grid.cjs.entry.js +333 -33
  26. package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
  27. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  28. package/dist/cjs/ez-list.cjs.entry.js +2 -2
  29. package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/ez-modal-container.cjs.entry.js +16 -5
  31. package/dist/cjs/ez-modal.cjs.entry.js +8 -9
  32. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  33. package/dist/cjs/ez-number-input.cjs.entry.js +35 -29
  34. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  35. package/dist/cjs/ez-popup.cjs.entry.js +15 -9
  36. package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
  37. package/dist/cjs/ez-scroller_3.cjs.entry.js +1 -1
  38. package/dist/cjs/ez-search.cjs.entry.js +18 -6
  39. package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
  40. package/dist/cjs/ez-split-button.cjs.entry.js +1 -1
  41. package/dist/cjs/ez-split-item.cjs.entry.js +2 -1
  42. package/dist/cjs/ez-split-panel.cjs.entry.js +2 -2
  43. package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
  44. package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
  45. package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
  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 +1 -1
  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 +1 -1
  52. package/dist/cjs/{index-a7b0c73d.js → index-9e5554cb.js} +11 -4
  53. package/dist/cjs/loader.cjs.js +2 -2
  54. package/dist/collection/collection-manifest.json +2 -0
  55. package/dist/collection/components/ez-alert-list/ez-alert-list.js +6 -4
  56. package/dist/collection/components/ez-button/ez-button.css +7 -0
  57. package/dist/collection/components/ez-button/ez-button.js +1 -1
  58. package/dist/collection/components/ez-chart/components/BarChart.js +27 -0
  59. package/dist/collection/components/ez-chart/components/ColumnChart.js +27 -0
  60. package/dist/collection/components/ez-chart/components/DonutChart.js +42 -0
  61. package/dist/collection/components/ez-chart/components/LineChart.js +27 -0
  62. package/dist/collection/components/ez-chart/components/PieChart.js +45 -0
  63. package/dist/collection/components/ez-chart/components/index.js +5 -0
  64. package/dist/collection/components/ez-chart/ez-chart.css +5 -0
  65. package/dist/collection/components/ez-chart/ez-chart.js +284 -0
  66. package/dist/collection/components/ez-chart/interfaces/ChartAxis.js +1 -0
  67. package/dist/collection/components/ez-chart/interfaces/ChartContext.js +14 -0
  68. package/dist/collection/components/ez-chart/interfaces/ChartOptions.js +1 -0
  69. package/dist/collection/components/ez-chart/interfaces/ChartSerie.js +1 -0
  70. package/dist/collection/components/ez-chart/interfaces/ChartStrategies.js +1 -0
  71. package/dist/collection/components/ez-chart/interfaces/ChartType.js +8 -0
  72. package/dist/collection/components/ez-chart/interfaces/index.js +5 -0
  73. package/dist/collection/components/ez-chart/test/mock-chart.js +137 -0
  74. package/dist/collection/components/ez-chart/types/BaseHighChartsRender.js +146 -0
  75. package/dist/collection/components/ez-form/ez-form.js +130 -4
  76. package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +253 -0
  77. package/dist/collection/components/ez-form-view/ez-form-view.js +89 -1
  78. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +3 -2
  79. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +56 -5
  80. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +1 -0
  81. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +35 -1
  82. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +58 -0
  83. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.js +40 -0
  84. package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.js +11 -0
  85. package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.js +11 -0
  86. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +6 -3
  87. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellRender.js +40 -0
  88. package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellRender.js +1 -0
  89. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +3 -2
  90. package/dist/collection/components/ez-grid/ez-grid.css +1 -0
  91. package/dist/collection/components/ez-grid/ez-grid.js +233 -11
  92. package/dist/collection/components/ez-grid/interfaces/ICustomFormatter.js +1 -0
  93. package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
  94. package/dist/collection/components/ez-grid/subcomponents/selection-counter.js +3 -11
  95. package/dist/collection/components/ez-grid/subcomponents/utils/selectionCounterUtils.js +22 -0
  96. package/dist/collection/components/ez-grid/test/resources/gridDataUnit.js +19 -0
  97. package/dist/collection/components/ez-list/ez-list.css +6 -2
  98. package/dist/collection/components/ez-modal/ez-modal.js +22 -9
  99. package/dist/collection/components/ez-modal-container/ez-modal-container.css +4 -0
  100. package/dist/collection/components/ez-modal-container/ez-modal-container.js +23 -3
  101. package/dist/collection/components/ez-number-input/ez-number-input.js +42 -27
  102. package/dist/collection/components/ez-popup/ez-popup.js +14 -8
  103. package/dist/collection/components/ez-search/ez-search.js +16 -5
  104. package/dist/collection/components/ez-split-panel/ez-split-panel.css +1 -0
  105. package/dist/collection/utils/customEditor/interfaces/ICustomEditor.js +5 -0
  106. package/dist/collection/utils/customEditor/interfaces/ICustomEditorInfo.js +1 -0
  107. package/dist/collection/utils/customRender/interfaces/ICustomRender.js +5 -0
  108. package/dist/collection/utils/customRender/interfaces/ICustomRenderInfo.js +1 -0
  109. package/dist/collection/utils/form/DataBinder.js +26 -0
  110. package/dist/collection/utils/form/test/DataBinder.test.js +41 -4
  111. package/dist/collection/utils/form/test/resources/metadataTest.js +15 -0
  112. package/dist/collection/utils/index.js +2 -0
  113. package/dist/custom-elements/index.d.ts +12 -0
  114. package/dist/custom-elements/index.js +1081 -105
  115. package/dist/esm/ICustomRender-875b5a40.js +13 -0
  116. package/dist/esm/ez-actions-button.entry.js +2 -1
  117. package/dist/esm/ez-alert-list.entry.js +7 -5
  118. package/dist/esm/ez-alert.entry.js +1 -1
  119. package/dist/esm/ez-application.entry.js +1 -1
  120. package/dist/esm/ez-badge.entry.js +1 -1
  121. package/dist/esm/ez-breadcrumb.entry.js +1 -1
  122. package/dist/esm/ez-button.entry.js +3 -3
  123. package/dist/esm/ez-calendar.entry.js +1 -1
  124. package/dist/esm/ez-card-item_3.entry.js +1 -1
  125. package/dist/esm/ez-chart.entry.js +429 -0
  126. package/dist/esm/ez-check.entry.js +1 -1
  127. package/dist/esm/ez-chip.entry.js +1 -1
  128. package/dist/esm/ez-collapsible-box.entry.js +2 -1
  129. package/dist/esm/ez-combo-box.entry.js +2 -1
  130. package/dist/esm/{ez-text-edit.entry.js → ez-custom-form-input_2.entry.js} +96 -3
  131. package/dist/esm/ez-date-input.entry.js +1 -1
  132. package/dist/esm/ez-date-time-input.entry.js +1 -1
  133. package/dist/esm/ez-dialog.entry.js +1 -1
  134. package/dist/esm/ez-dropdown.entry.js +1 -1
  135. package/dist/esm/ez-file-item.entry.js +1 -1
  136. package/dist/esm/ez-form-view.entry.js +34 -4
  137. package/dist/esm/ez-form.entry.js +79 -4
  138. package/dist/esm/ez-grid.entry.js +333 -33
  139. package/dist/esm/ez-guide-navigator.entry.js +1 -1
  140. package/dist/esm/ez-icon.entry.js +1 -1
  141. package/dist/esm/ez-list.entry.js +2 -2
  142. package/dist/esm/ez-loading-bar.entry.js +1 -1
  143. package/dist/esm/ez-modal-container.entry.js +16 -5
  144. package/dist/esm/ez-modal.entry.js +9 -10
  145. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  146. package/dist/esm/ez-number-input.entry.js +35 -29
  147. package/dist/esm/ez-popover.entry.js +1 -1
  148. package/dist/esm/ez-popup.entry.js +15 -9
  149. package/dist/esm/ez-radio-button.entry.js +1 -1
  150. package/dist/esm/ez-scroller_3.entry.js +1 -1
  151. package/dist/esm/ez-search.entry.js +18 -6
  152. package/dist/esm/ez-skeleton.entry.js +1 -1
  153. package/dist/esm/ez-split-button.entry.js +1 -1
  154. package/dist/esm/ez-split-item.entry.js +2 -1
  155. package/dist/esm/ez-split-panel.entry.js +2 -2
  156. package/dist/esm/ez-tabselector.entry.js +1 -1
  157. package/dist/esm/ez-text-area.entry.js +1 -1
  158. package/dist/esm/ez-text-input.entry.js +1 -1
  159. package/dist/esm/ez-time-input.entry.js +1 -1
  160. package/dist/esm/ez-toast.entry.js +1 -1
  161. package/dist/esm/ez-upload.entry.js +1 -1
  162. package/dist/esm/ez-view-stack.entry.js +1 -1
  163. package/dist/esm/ezui.js +3 -3
  164. package/dist/esm/filter-column.entry.js +1 -1
  165. package/dist/esm/{index-baa5e267.js → index-5a720e56.js} +11 -5
  166. package/dist/esm/loader.js +3 -3
  167. package/dist/ezui/ezui.esm.js +1 -1
  168. package/dist/ezui/{p-44caad9a.entry.js → p-0378416a.entry.js} +1 -1
  169. package/dist/ezui/p-085babb4.entry.js +1 -0
  170. package/dist/ezui/{p-91f626d3.entry.js → p-0e551dd4.entry.js} +1 -1
  171. package/dist/ezui/{p-af2ecb1b.entry.js → p-11b09aa1.entry.js} +1 -1
  172. package/dist/ezui/{p-77a4bd35.entry.js → p-11bfeca3.entry.js} +1 -1
  173. package/dist/ezui/p-23a796cc.entry.js +1 -0
  174. package/dist/ezui/{p-af95cd16.entry.js → p-24ca32a3.entry.js} +1 -1
  175. package/dist/ezui/{p-cc2dc4f4.entry.js → p-2a6e44a0.entry.js} +1 -1
  176. package/dist/ezui/p-2af4e2de.entry.js +1 -0
  177. package/dist/ezui/{p-baf80b13.entry.js → p-30951bd7.entry.js} +1 -1
  178. package/dist/ezui/p-31674f8e.entry.js +1 -0
  179. package/dist/ezui/{p-bf79aaa1.entry.js → p-33792b2b.entry.js} +1 -1
  180. package/dist/ezui/{p-b44741b0.entry.js → p-355c20f5.entry.js} +2 -2
  181. package/dist/ezui/{p-e85c48d7.entry.js → p-36180f4d.entry.js} +1 -1
  182. package/dist/ezui/{p-7bc07c31.entry.js → p-3f8c33e0.entry.js} +1 -1
  183. package/dist/ezui/p-4559c266.entry.js +1 -0
  184. package/dist/ezui/p-4607fb89.js +1 -0
  185. package/dist/ezui/p-507ec8ed.entry.js +1 -0
  186. package/dist/ezui/{p-8defa6d3.entry.js → p-51e4c040.entry.js} +1 -1
  187. package/dist/ezui/p-569a0b9a.entry.js +1 -0
  188. package/dist/ezui/{p-1f50fa05.entry.js → p-6b51c9cc.entry.js} +1 -1
  189. package/dist/ezui/p-6ec40dec.entry.js +1 -0
  190. package/dist/ezui/{p-5ed81457.entry.js → p-6fc26622.entry.js} +1 -1
  191. package/dist/ezui/{p-555c9018.entry.js → p-7567ccdd.entry.js} +1 -1
  192. package/dist/ezui/{p-1e7a8633.entry.js → p-81461d2f.entry.js} +1 -1
  193. package/dist/ezui/{p-072e6347.entry.js → p-82ac8b06.entry.js} +1 -1
  194. package/dist/ezui/{p-8df1ca33.entry.js → p-82fa4b09.entry.js} +1 -1
  195. package/dist/ezui/p-868b56f7.entry.js +1 -0
  196. package/dist/ezui/{p-85c8baae.entry.js → p-8eef0f70.entry.js} +1 -1
  197. package/dist/ezui/p-91ccae0c.entry.js +1 -0
  198. package/dist/ezui/{p-3faa2b46.entry.js → p-9634631d.entry.js} +1 -1
  199. package/dist/ezui/p-9a11e223.entry.js +1 -0
  200. package/dist/ezui/{p-7af81663.entry.js → p-9a23d513.entry.js} +1 -1
  201. package/dist/ezui/p-9aa27e69.entry.js +1 -0
  202. package/dist/ezui/{p-784fe207.entry.js → p-9c2e2d68.entry.js} +1 -1
  203. package/dist/ezui/{p-9050d2cd.entry.js → p-b0e71d23.entry.js} +1 -1
  204. package/dist/ezui/{p-17be134a.entry.js → p-b2f6bc0a.entry.js} +1 -1
  205. package/dist/ezui/{p-9f5fa3f9.entry.js → p-c2b20f78.entry.js} +1 -1
  206. package/dist/ezui/{p-5bd5e68f.entry.js → p-c3b7a23e.entry.js} +1 -1
  207. package/dist/ezui/p-cd1a2e6b.entry.js +1 -0
  208. package/dist/ezui/p-d62ff380.entry.js +1 -0
  209. package/dist/ezui/{p-bae4e180.entry.js → p-dbeee5aa.entry.js} +1 -1
  210. package/dist/ezui/{p-a80b1287.entry.js → p-dfca5946.entry.js} +1 -1
  211. package/dist/ezui/p-e151e795.entry.js +1 -0
  212. package/dist/ezui/{p-23a36bb6.js → p-e4c7eb39.js} +2 -2
  213. package/dist/ezui/{p-0306dff7.entry.js → p-e6b38ade.entry.js} +1 -1
  214. package/dist/ezui/{p-650e4b6d.entry.js → p-f1c2c19e.entry.js} +1 -1
  215. package/dist/ezui/p-f1c3f85d.entry.js +1 -0
  216. package/dist/ezui/{p-49456b34.entry.js → p-f291db18.entry.js} +1 -1
  217. package/dist/ezui/{p-6e429cff.entry.js → p-fc194825.entry.js} +1 -1
  218. package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +2 -2
  219. package/dist/types/components/ez-chart/components/BarChart.d.ts +9 -0
  220. package/dist/types/components/ez-chart/components/ColumnChart.d.ts +9 -0
  221. package/dist/types/components/ez-chart/components/DonutChart.d.ts +9 -0
  222. package/dist/types/components/ez-chart/components/LineChart.d.ts +9 -0
  223. package/dist/types/components/ez-chart/components/PieChart.d.ts +9 -0
  224. package/dist/types/components/ez-chart/components/index.d.ts +5 -0
  225. package/dist/types/components/ez-chart/ez-chart.d.ts +58 -0
  226. package/dist/types/components/ez-chart/interfaces/ChartAxis.d.ts +7 -0
  227. package/dist/types/components/ez-chart/interfaces/ChartContext.d.ts +11 -0
  228. package/dist/types/components/ez-chart/interfaces/ChartOptions.d.ts +10 -0
  229. package/dist/types/components/ez-chart/interfaces/ChartSerie.d.ts +20 -0
  230. package/dist/types/components/ez-chart/interfaces/ChartStrategies.d.ts +7 -0
  231. package/dist/types/components/ez-chart/interfaces/ChartType.d.ts +7 -0
  232. package/dist/types/components/ez-chart/interfaces/index.d.ts +5 -0
  233. package/dist/types/components/ez-chart/types/BaseHighChartsRender.d.ts +15 -0
  234. package/dist/types/components/ez-form/ez-form.d.ts +20 -1
  235. package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +43 -0
  236. package/dist/types/components/ez-form-view/ez-form-view.d.ts +11 -0
  237. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +30 -0
  238. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +13 -0
  239. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +7 -1
  240. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +19 -0
  241. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +14 -0
  242. package/dist/types/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.d.ts +11 -0
  243. package/dist/types/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.d.ts +11 -0
  244. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +3 -0
  245. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +15 -0
  246. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellRender.d.ts +10 -0
  247. package/dist/types/components/ez-grid/ez-grid.d.ts +34 -1
  248. package/dist/types/components/ez-grid/interfaces/ICustomFormatter.d.ts +5 -0
  249. package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
  250. package/dist/types/components/ez-grid/subcomponents/utils/selectionCounterUtils.d.ts +4 -0
  251. package/dist/types/components/ez-grid/test/resources/gridDataUnit.d.ts +2 -0
  252. package/dist/types/components/ez-modal/ez-modal.d.ts +9 -1
  253. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +3 -0
  254. package/dist/types/components/ez-number-input/ez-number-input.d.ts +3 -0
  255. package/dist/types/components/ez-popup/ez-popup.d.ts +3 -3
  256. package/dist/types/components/ez-search/ez-search.d.ts +2 -1
  257. package/dist/types/components.d.ts +223 -4
  258. package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +29 -0
  259. package/dist/types/utils/customEditor/interfaces/ICustomEditorInfo.d.ts +5 -0
  260. package/dist/types/utils/customRender/interfaces/ICustomRender.d.ts +29 -0
  261. package/dist/types/utils/customRender/interfaces/ICustomRenderInfo.d.ts +5 -0
  262. package/dist/types/utils/form/DataBinder.d.ts +3 -0
  263. package/dist/types/utils/form/test/resources/metadataTest.d.ts +2 -0
  264. package/dist/types/utils/index.d.ts +2 -0
  265. package/package.json +2 -1
  266. package/react/components.d.ts +2 -0
  267. package/react/components.js +2 -0
  268. package/react/components.js.map +1 -1
  269. package/dist/ezui/p-0447d17c.entry.js +0 -1
  270. package/dist/ezui/p-20ec22c0.entry.js +0 -1
  271. package/dist/ezui/p-2a1a0e04.entry.js +0 -1
  272. package/dist/ezui/p-5e1d036e.entry.js +0 -1
  273. package/dist/ezui/p-5ef056ce.entry.js +0 -1
  274. package/dist/ezui/p-637f69f2.entry.js +0 -1
  275. package/dist/ezui/p-701231f0.entry.js +0 -1
  276. package/dist/ezui/p-99ead599.entry.js +0 -1
  277. package/dist/ezui/p-9aefaa52.entry.js +0 -1
  278. package/dist/ezui/p-a1ec32ef.entry.js +0 -1
  279. package/dist/ezui/p-b041333c.entry.js +0 -1
  280. package/dist/ezui/p-b567fa8c.entry.js +0 -1
  281. package/dist/ezui/p-bae3d0aa.entry.js +0 -1
  282. package/dist/ezui/p-bc2f844e.entry.js +0 -1
  283. package/dist/ezui/p-db77a984.entry.js +0 -1
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5a720e56.js';
2
2
  import { ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { C as CheckMode } from './CheckMode-bdb2ec19.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-baa5e267.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-5a720e56.js';
2
2
  import { ElementIDUtils } from '@sankhyalabs/core';
3
3
 
4
4
  const ezChipCss = ":host{--ez-label-chip--height:30px;--ez-label-chip__label--font-size:var(--text--medium, 14px);--ez-label-chip__label--font-family:var(--font-pattern, Arial);--ez-label-chip__label--font-weight:var(--text-weight--medium, 400);--ez-label-chip__label--space--medium:var(--space--medium, 12px);--ez-label-chip__label--title--primary:var(--title--primary, #2B3A54);--ez-label-chip__label--text--primary:var(--text--primary, #626e82);--ez-label-chip__label__container--border-radius:var(--border--radius-large, 24px);--ez-label-chip__label__container--border:1px solid;--ez-label-chip__label__container--border-color-strokes:var(--color--strokes, #DCE0E8);--ez-label-chip__label__container--color-primary:var(--color--primary, #008561);--ez-label-chip__label__container-color--disable-secondary:var(--color--disable-secondary, #F2F5F8);--ez-label-chip__label__container--background-color:var(--color--primary-300);--ez-label-chip__label__container--border-color:#0085610F;--ez-label-chip__label__container--default--border-color--active:var(--color--primary, #007a5a);--ez-label-chip__label__container--default--background-color--hover:var(--color--primary-300, #f2faf8);--ez-label-chip__label__container--default--color--hover:var(--color--primary, #f2faf8);--ez-label-chip__label__container--text--disabled:var(--text--disable, #AFB6C0);--ez-label-chip__label__container--default--border-color--active:var(--color--primary)}.lbl{display:flex;white-space:nowrap;align-items:center;cursor:pointer;user-select:none;color:var(--ez-label-chip__label--title--primary);height:var(--ez-label-chip--height);font-family:var(--ez-label-chip__label--font-family);font-size:var(--ez-label-chip__label--font-size);font-weight:var(--ez-label-chip__label--font-weight)}.lbl--active{color:var(--ez-label-chip__label__container--default--color--hover)}.lbl--disabled{color:var(--ez-label-chip__label__container--text--disabled)}.label__container{cursor:pointer;width:max-content;display:flex;flex-wrap:wrap;align-items:center;background-color:#FFFFFF;color:var(--ez-label-chip__label--text--primary);fill:var(--ez-label-chip__label--text--primary);--ez-icon--color:var(--ez-label-chip__label--text--primary);border:var(--ez-label-chip__label__container--border);border-radius:var(--ez-label-chip__label__container--border-radius);border-color:var(--ez-label-chip__label__container--border-color-strokes);padding-right:var(--ez-label-chip__label--space--medium);padding-left:var(--ez-label-chip__label--space--medium);outline-color:var(--ez-label-chip__label__container--default--border-color--active)}.label__content{display:flex;align-items:center;flex-wrap:wrap;--ez-icon--color:var(--ez-label-chip__label--text--primary)}.label__container--disabled{cursor:default;border-color:var(--ez-label-chip__label__container-color--disable-secondary);background-color:var(--ez-label-chip__label__container-color--disable-secondary);fill:var(--ez-label-chip__label__container--text--disabled);color:var(--ez-label-chip__label__container--text--disabled);--ez-icon--color:var(--ez-label-chip__label__container--text--disabled)}.label__container--active{border-color:var(--ez-label-chip__label__container--default--background-color--hover);background-color:var(--ez-label-chip__label__container--default--background-color--hover);color:var(--ez-label-chip__label__container--default--color--hover);fill:var(--ez-label-chip__label__container--default--color--hover);--ez-icon--color:var(--ez-label-chip__label__container--default--color--hover)}.label__container:hover{border-color:var(--ez-label-chip__label__container--default--border-color--active)}.label__container:focus{outline:var(--border--medium) var(--ez-label-chip__label__container--default--border-color--active)}.label__container--disabled:hover{cursor:default;border:var(--ez-label-chip__label__container--border);border-color:var(--ez-label-chip__label__container-color--disable-secondary);background-color:var(--ez-label-chip__label__container-color--disable-secondary);fill:var(--ez-label-chip__label__container--text--disabled);color:var(--ez-label-chip__label__container--text--disabled);--ez-icon--color:var(--ez-label-chip__label__container--text--disabled)}.label__content__icon{display:flex;cursor:pointer;color:var(--ez-label-chip__label--text--primary);fill:var(--ez-label-chip__label--text--primary);--ez-icon--color:var(--ez-label-chip__label--text--primary)}.label__container--row-reverse{flex-direction:row-reverse}.label__container .btn-close{padding:0px 0px 0px 8px}.label__container--row-reverse .btn-close{padding:0px 8px 0px 0px}.cursor-disable{cursor:default}ez-icon{--ez-icon--color:inherit}";
@@ -1,8 +1,9 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-baa5e267.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-5a720e56.js';
2
2
  import { ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
4
4
  import './DialogType-54a62731.js';
5
5
  import './CheckMode-bdb2ec19.js';
6
+ import './ICustomRender-875b5a40.js';
6
7
 
7
8
  const ezCollapsibleBoxCss = ":host{--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box--subtitle--font-size:var(--text--medium, 14px);--ez-collapsible-box--subtitle--font-family:var(--font-pattern, 'Roboto');--ez-collapsible-box--subtitle--font-weight:var(--text-weight--medium, 400);--ez-collapsible-box--subtitle--color:var(--text--primary);--ez-collapsible-box--subtitle--margin-bottom:var(--space--medium, 12px);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsable-box--bordered{border:var(--border--small);border-color:var(--color--strokes);border-radius:var(--border--radius-medium);padding:var(--space--xs)}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{display:flex;white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;gap:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.subtitle-box__label{display:flex;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;font-family:var(--ez-collapsible-box--subtitle--font-family);font-size:var(--ez-collapsible-box--subtitle--font-size);font-weight:var(--ez-collapsible-box--subtitle--font-weight);color:var(--ez-collapsible-box--subtitle--color);margin-bottom:var(--ez-collapsible-box--subtitle--margin-bottom)}.subtitle-box__content{width:100%}.collapsible-box__label ez-icon{visibility:hidden;transition:2s all ease-in-out}.collapsible-box__label:hover ez-icon{visibility:visible}.collapsible-box__text-edit{margin-left:6px}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--left{margin-right:auto}.collapsible-box__title--right{margin-left:auto}.collapsible-box__title--center{margin-left:auto;margin-right:auto}.collapsible-box__title--stretch{justify-content:space-between;width:100%}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";
8
9
 
@@ -1,9 +1,10 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5a720e56.js';
2
2
  import { ObjectUtils, FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import './ApplicationUtils-eaf91331.js';
4
4
  import { C as CSSVarsUtils } from './CSSVarsUtils-71ce76be.js';
5
5
  import './DialogType-54a62731.js';
6
6
  import './CheckMode-bdb2ec19.js';
7
+ import './ICustomRender-875b5a40.js';
7
8
 
8
9
  const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box__list-min-width:64px;--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-combo-box__list-min-width);position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
9
10
 
@@ -1,9 +1,102 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
2
- import { ElementIDUtils } from '@sankhyalabs/core';
1
+ import { r as registerInstance, a as H, h, H as Host, c as createEvent, g as getElement } from './index-5a720e56.js';
2
+ import { C as CustomEditorSource } from './ICustomRender-875b5a40.js';
3
+ import { HTMLBuilder, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
3
4
  import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
4
5
  import './DialogType-54a62731.js';
5
6
  import './CheckMode-bdb2ec19.js';
6
7
 
8
+ const EzCustomFormInput = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.gui = undefined;
12
+ this.customEditor = undefined;
13
+ this.formViewField = undefined;
14
+ this.value = undefined;
15
+ this.detailContext = undefined;
16
+ this.builderFallback = undefined;
17
+ }
18
+ /**
19
+ * Aplica foco no campo.
20
+ */
21
+ async setFocus() {
22
+ var _a, _b;
23
+ (_b = (_a = this.gui) === null || _a === void 0 ? void 0 : _a["setFocus"]) === null || _b === void 0 ? void 0 : _b.call(_a);
24
+ }
25
+ /**
26
+ * Remove o foco do campo.
27
+ */
28
+ async setBlur() {
29
+ var _a, _b;
30
+ (_b = (_a = this.gui) === null || _a === void 0 ? void 0 : _a["setBlur"]) === null || _b === void 0 ? void 0 : _b.call(_a);
31
+ }
32
+ /**
33
+ * Retorna se o conteúdo é inválido.
34
+ */
35
+ async isInvalid() {
36
+ var _a, _b;
37
+ return ((_b = (_a = this.gui) === null || _a === void 0 ? void 0 : _a["isInvalid"]) === null || _b === void 0 ? void 0 : _b.call(_a)) || false;
38
+ }
39
+ getContent() {
40
+ var _a, _b;
41
+ const fieldProps = new Map();
42
+ for (const prop in this.formViewField.props) {
43
+ fieldProps.set(prop, this.formViewField.props[prop]);
44
+ }
45
+ const params = {
46
+ value: this.value,
47
+ name: this.formViewField.name,
48
+ currentEditor: this.builderFallback(this.formViewField),
49
+ setValue: (value) => this.setValue(value),
50
+ getValue: this.getValue,
51
+ editorMetadata: {
52
+ label: this.formViewField.label,
53
+ hidden: ((_a = this.formViewField.props) === null || _a === void 0 ? void 0 : _a.visible) === false,
54
+ userInterface: this.formViewField.userInterface,
55
+ options: (_b = this.formViewField.props) === null || _b === void 0 ? void 0 : _b.options,
56
+ props: this.formViewField.props ? fieldProps : undefined,
57
+ optionLoader: this.formViewField.optionLoader
58
+ },
59
+ source: CustomEditorSource.FORM,
60
+ detailContext: this.detailContext
61
+ };
62
+ let gui = this.customEditor.getEditorElement(params);
63
+ if (!gui) {
64
+ gui = this.builderFallback(this.formViewField);
65
+ this.handleValue(gui);
66
+ this.gui = gui;
67
+ return;
68
+ }
69
+ if (!(gui instanceof H) && typeof gui !== 'string') {
70
+ this.handleValue(gui);
71
+ this.gui = gui;
72
+ return;
73
+ }
74
+ if (typeof gui === 'string') {
75
+ gui = HTMLBuilder.parseElement(gui);
76
+ }
77
+ gui.setAttribute('value', this.value);
78
+ this.gui = h("div", { key: StringUtils.generateUUID(), ref: el => el && el.appendChild(gui) });
79
+ }
80
+ setValue(value) {
81
+ this.value = value;
82
+ }
83
+ getValue() {
84
+ return this.value;
85
+ }
86
+ handleValue(gui) {
87
+ //@ts-ignore
88
+ gui.$children$.forEach((child) => {
89
+ child.$attrs$.value = this.value;
90
+ });
91
+ }
92
+ componentWillRender() {
93
+ this.getContent();
94
+ }
95
+ render() {
96
+ return (h(Host, null, this.gui));
97
+ }
98
+ };
99
+
7
100
  const ezTextEditCss = ":host{display:flex;align-items:center;gap:5px}.text-edit__form-input{width:auto;--ez-text-input__input--padding:0px}.text-edit__hidden-value{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}";
8
101
 
9
102
  const EzTextEdit = class {
@@ -100,4 +193,4 @@ const EzTextEdit = class {
100
193
  };
101
194
  EzTextEdit.style = ezTextEditCss;
102
195
 
103
- export { EzTextEdit as ez_text_edit };
196
+ export { EzCustomFormInput as ez_custom_form_input, EzTextEdit as ez_text_edit };
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5a720e56.js';
2
2
  import { DateUtils, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { C as CSSVarsUtils } from './CSSVarsUtils-71ce76be.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5a720e56.js';
2
2
  import { DateUtils, TimeFormatter, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { C as CSSVarsUtils } from './CSSVarsUtils-71ce76be.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, f as forceUpdate, h, g as getElement } from './index-baa5e267.js';
1
+ import { r as registerInstance, c as createEvent, f as forceUpdate, h, g as getElement } from './index-5a720e56.js';
2
2
  import { D as DialogType } from './DialogType-54a62731.js';
3
3
  import { FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
4
4
 
@@ -1,4 +1,4 @@
1
- import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-baa5e267.js';
1
+ import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-5a720e56.js';
2
2
  import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
3
3
 
4
4
  const DropdownItem = ({ item, hasIcon, hasChildren, isLockedLevels, onSubActionClick }) => {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-baa5e267.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-5a720e56.js';
2
2
  import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
3
3
 
4
4
  const ezFileItemCss = ":host{display:flex;width:100%;--ez-file-item--height:42px;--ez-file-item--padding:9px;--ez-file-item--border-radius:var(--border--radius-medium, 12px);--ez-file-item--border-color:var(--color--strokes, #DCE0E8);--ez-file-item--border-style:var(--border--small, 1px solid);--ez-file-item--font-family:var(--font-pattern, Arial);--ez-file-item--font-size:var(--text--medium, 14px);--ez-file-item--font-weight:var(--text-weight--medium, 400);--ez-file-item--color:var(--title--primary, #2B3A54);--ez-file-item__file-size--font-weight:var(--text-weight--large, 600);--ez-file-item__file-size--color:var(--color--primary, #008561);--ez-file-item__background-progress--color:var(--color--primary-300, E2F4EF);--ez-file-item--icon-color:var(--title--primary, #2B3A54)}.box{display:flex;box-sizing:border-box;position:relative;align-items:center;justify-content:space-between;width:100%;padding:var(--ez-file-item--padding);border:var(--ez-file-item--border-color) var(--ez-file-item--border-style);border-radius:var(--ez-file-item--border-radius);height:var(--ez-file-item--height)}.box::before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;clip-path:inset(2px calc(var(--ez-file-item--upload-progress, 0%) + 2px) 2px 2px round calc(var(--ez-file-item--border-radius) - 4px));background-color:var(--ez-file-item__background-progress--color)}.content{display:flex;align-items:center;z-index:0;overflow:hidden}.file-name{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-file-item--font-family);font-size:var(--ez-file-item--font-size);font-weight:var(--ez-file-item--font-weight);color:var(--ez-file-item--color)}.file-type-icon{flex-shrink:0;--ez-icon--color:var(--ez-file-item--icon-color);padding-right:var(--ez-file-item--padding)}.file-size{padding-left:2px;overflow:hidden;flex-shrink:0;white-space:nowrap;font-family:var(--ez-file-item--font-family);font-size:var(--ez-file-item--font-size);font-weight:var(--ez-file-item__file-size--font-weight);color:var(--ez-file-item__file-size--color)}.btn-remove{cursor:pointer;flex-shrink:0;--ez-icon--color:var(--ez-file-item--icon-color)}";
@@ -1,4 +1,4 @@
1
- import { h, r as registerInstance, c as createEvent, g as getElement, H as Host } from './index-baa5e267.js';
1
+ import { h, r as registerInstance, c as createEvent, g as getElement, H as Host } from './index-5a720e56.js';
2
2
  import { ObjectUtils, UserInterface, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { R as REQUIRED_INFO } from './constants-4e0d35b7.js';
4
4
  import { C as CheckMode } from './CheckMode-bdb2ec19.js';
@@ -55,8 +55,9 @@ const buildFile = ({ name, label, readOnly, contextName, props }) => {
55
55
  };
56
56
 
57
57
  const buildDecimal = ({ name, label, readOnly, props, contextName, canShowError }) => {
58
- const precision = Number((props === null || props === void 0 ? void 0 : props.precision) || 2);
59
- const prettyPrecision = Number((props === null || props === void 0 ? void 0 : props.prettyPrecision) || precision);
58
+ var _a, _b;
59
+ const precision = Number((_a = props === null || props === void 0 ? void 0 : props.precision) !== null && _a !== void 0 ? _a : 2);
60
+ const prettyPrecision = Number((_b = props === null || props === void 0 ? void 0 : props.prettyPrecision) !== null && _b !== void 0 ? _b : precision);
60
61
  return buildNumeric(name, label, readOnly, precision, prettyPrecision, contextName, canShowError);
61
62
  };
62
63
  const buildInteger = ({ name, label, readOnly, contextName, canShowError }) => {
@@ -145,11 +146,33 @@ const EzFormView = class {
145
146
  registerInstance(this, hostRef);
146
147
  this.ezContentReady = createEvent(this, "ezContentReady", 7);
147
148
  this.formItemsReady = createEvent(this, "formItemsReady", 7);
149
+ this._customEditors = new Map();
148
150
  this.fields = undefined;
149
151
  }
150
152
  async showUp() {
151
153
  this._element.scrollIntoView({ behavior: "smooth", block: "start" });
152
154
  }
155
+ /**
156
+ * Registra um editor customizado para campos da grade e formulário.
157
+ */
158
+ async addCustomEditor(fieldName, customEditor, detailContext) {
159
+ const newCustomEditors = new Map(this._customEditors);
160
+ newCustomEditors.set(fieldName, { customEditor, detailContext });
161
+ this._customEditors = newCustomEditors;
162
+ }
163
+ /**
164
+ * Altera/adiciona uma propriedade nos metados do campo.
165
+ */
166
+ async setFieldProp(fieldName, propName, value) {
167
+ const fields = this.fields.map(field => {
168
+ if (field.name === fieldName && (value || value === 0)) {
169
+ field.props = field.props || {};
170
+ field.props[propName] = value;
171
+ }
172
+ return field;
173
+ });
174
+ this.fields = [...fields];
175
+ }
153
176
  groupFields(fields) {
154
177
  const result = new Map();
155
178
  fields.forEach(item => {
@@ -169,7 +192,8 @@ const EzFormView = class {
169
192
  return result;
170
193
  }
171
194
  componentDidRender() {
172
- this.ezContentReady.emit(Array.from(this._element.querySelectorAll("[data-field-name]")));
195
+ this._formElements = Array.from(this._element.querySelectorAll("[data-field-name]"));
196
+ this.ezContentReady.emit(this._formElements);
173
197
  const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
174
198
  this.formItemsReady.emit(formItems);
175
199
  }
@@ -180,9 +204,15 @@ const EzFormView = class {
180
204
  ].includes(userInterface);
181
205
  }
182
206
  buildFormItemElement(item, classItem = "") {
207
+ var _a;
183
208
  if (this.isItemFullWidth(item.userInterface)) {
184
209
  classItem += " input-full_width";
185
210
  }
211
+ if (this._customEditors.has(item.name)) {
212
+ const value = (_a = this._formElements.map(el => ({ name: el.dataset.fieldName, value: el['value'] })).find(field => field.name === item.name)) === null || _a === void 0 ? void 0 : _a.value;
213
+ const customEditor = this._customEditors.get(item.name).customEditor;
214
+ return h("div", { class: classItem }, h("ez-custom-form-input", { "data-field-name": item.name, customEditor: customEditor, formViewField: item, builderFallback: fieldBuilder, value: value }));
215
+ }
186
216
  return h("div", { class: classItem }, fieldBuilder(item));
187
217
  }
188
218
  render() {
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, c as createEvent, h, f as forceUpdate, H as Host, g as getElement } from './index-baa5e267.js';
2
- import { DateUtils, Action, WaitingChangeException, ApplicationContext, DataUnitAction, StringUtils, DataUnit, ElementIDUtils } from '@sankhyalabs/core';
1
+ import { r as registerInstance, c as createEvent, h, f as forceUpdate, H as Host, g as getElement } from './index-5a720e56.js';
2
+ import { DateUtils, Action, ApplicationContext, WaitingChangeException, DataUnitAction, StringUtils, DataUnit, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { b as buildFieldMetadata, R as RecordValidationProcessor } from './RecordValidationProcessor-b00b8b77.js';
4
4
  import './ApplicationUtils-eaf91331.js';
5
5
  import './DialogType-54a62731.js';
@@ -214,6 +214,13 @@ class DataBinder {
214
214
  this.applyDefaultValues();
215
215
  this._dataUnit.subscribe(this.onDataUnitEvent);
216
216
  this._dataUnit.addInterceptor(this);
217
+ this.setContextDataBinder(dataUnit);
218
+ }
219
+ setContextDataBinder(dataUnit) {
220
+ const dataBindersByDataUnit = ApplicationContext.getContextValue("__DATABINDER_BY_DATAUNIT__") || new Map();
221
+ const dataBinders = [...(dataBindersByDataUnit.get(dataUnit.dataUnitId) || []), this];
222
+ dataBindersByDataUnit.set(dataUnit.dataUnitId, dataBinders);
223
+ ApplicationContext.setContextValue("__DATABINDER_BY_DATAUNIT__", dataBindersByDataUnit);
217
224
  }
218
225
  applyDefaultValues() {
219
226
  const recordIds = (this._dataUnit.getAddedRecords() || []).map(r => r.__record__id__);
@@ -240,9 +247,17 @@ class DataBinder {
240
247
  getMessageForField: field => this.getErrorMessage(field)
241
248
  }, recordsValidator);
242
249
  }
250
+ disconnectDataUnit() {
251
+ const dataBindersByDataUnit = ApplicationContext.getContextValue("__DATABINDER_BY_DATAUNIT__") || new Map();
252
+ const dataBinders = dataBindersByDataUnit.get(this._dataUnit.dataUnitId);
253
+ const dataBindersFiltered = dataBinders.filter((dataBinder) => JSON.stringify(dataBinder) !== JSON.stringify(this));
254
+ dataBindersByDataUnit.set(this._dataUnit.dataUnitId, dataBindersFiltered);
255
+ ApplicationContext.setContextValue("__DATABINDER_BY_DATAUNIT__", dataBindersByDataUnit);
256
+ }
243
257
  onDisconnectedCallback() {
244
258
  this._dataUnit.unsubscribe(this.onDataUnitEvent);
245
259
  this._dataUnit.removeInterceptor(this);
260
+ this.disconnectDataUnit();
246
261
  }
247
262
  getCurrentRecordId() {
248
263
  const record = this._dataUnit.getSelectedRecord();
@@ -289,6 +304,17 @@ class DataBinder {
289
304
  validate() {
290
305
  return this._recordValidatorProcessor.validate();
291
306
  }
307
+ static async validateByDataunit(dataUnit) {
308
+ try {
309
+ const dataBindersByDataUnit = ApplicationContext.getContextValue("__DATABINDER_BY_DATAUNIT__");
310
+ const dataBinders = dataBindersByDataUnit.get(dataUnit.dataUnitId) || [];
311
+ await Promise.all(dataBinders.map((dataBinder) => dataBinder.validate()));
312
+ return true;
313
+ }
314
+ catch (_a) {
315
+ return false;
316
+ }
317
+ }
292
318
  updateErrorMessage(fieldName, field, message) {
293
319
  if (message == undefined) {
294
320
  message = this._dataUnit.getInvalidMessage(this.getCurrentRecordId(), fieldName);
@@ -845,15 +871,18 @@ const EzForm = class {
845
871
  this.ezFormSetFields = createEvent(this, "ezFormSetFields", 7);
846
872
  this.ezReady = createEvent(this, "ezReady", 7);
847
873
  this.formItemsReady = createEvent(this, "formItemsReady", 7);
874
+ this._customEditors = new Map();
848
875
  this.onDataUnitAction = (action) => {
849
876
  if (action.type === Action.METADATA_LOADED) {
850
877
  this.processMetadata();
851
878
  }
852
879
  };
880
+ this._fieldsProps = new Map();
853
881
  this.dataUnit = undefined;
854
882
  this.config = undefined;
855
883
  this.recordsValidator = undefined;
856
884
  this.fieldToFocus = undefined;
885
+ this.onlyStaticFields = false;
857
886
  }
858
887
  /**
859
888
  * Realiza validação no conteúdo de todos os campos.
@@ -861,9 +890,30 @@ const EzForm = class {
861
890
  validate() {
862
891
  return this._dataBinder.validate();
863
892
  }
893
+ /**
894
+ * Registra um editor customizado para campos da grade e formulário.
895
+ */
896
+ async addCustomEditor(fieldName, customEditor, detailContext) {
897
+ if (this._formView) {
898
+ this._formView.addCustomEditor(fieldName, customEditor, detailContext);
899
+ return;
900
+ }
901
+ const newCustomEditors = new Map(this._customEditors);
902
+ newCustomEditors.set(fieldName, { customEditor, detailContext });
903
+ this._customEditors = newCustomEditors;
904
+ }
864
905
  observeConfig() {
865
906
  this.processMetadata();
866
907
  }
908
+ /**
909
+ * Altera/adiciona uma propriedade nos metadados do campo.
910
+ */
911
+ async setFieldProp(fieldName, propName, value) {
912
+ const newCustomFieldProps = new Map(this._fieldsProps);
913
+ const currentProps = this._fieldsProps.get(fieldName);
914
+ newCustomFieldProps.set(fieldName, Object.assign(Object.assign({}, currentProps), { [propName]: value }));
915
+ this._fieldsProps = newCustomFieldProps;
916
+ }
867
917
  getDynamicContent() {
868
918
  var _a;
869
919
  const formMD = selectFormMetadata(this._store.getState());
@@ -890,10 +940,10 @@ const EzForm = class {
890
940
  }
891
941
  this.ezFormSetFields.emit(fields);
892
942
  const idFormSheet = `${StringUtils.replaceAccentuatedChars(StringUtils.toCamelCase(currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.label), false)}_selectorContainer`;
893
- return (h("div", { class: "dynamic-content", "data-element-id": idFormSheet }, h("ez-form-view", { class: "ez-row ez-padding-vertical--small", fields: fields })));
943
+ return (h("div", { class: "dynamic-content", "data-element-id": idFormSheet }, h("ez-form-view", { ref: (element) => (this._formView = element), class: "ez-row ez-padding-vertical--small", fields: fields })));
894
944
  }
895
945
  processMetadata() {
896
- if (!this.isStatic() && this.dataUnit && this._store) {
946
+ if (this.bindFields() && this.dataUnit && this._store) {
897
947
  const metadata = buildFormMetadata(this.config, this.dataUnit);
898
948
  this._store.dispatch(loadMetadata(metadata));
899
949
  }
@@ -902,6 +952,9 @@ const EzForm = class {
902
952
  var _a;
903
953
  return ((_a = this._staticFields) === null || _a === void 0 ? void 0 : _a.length) > 0;
904
954
  }
955
+ bindFields() {
956
+ return !this.isStatic() || this.onlyStaticFields === false;
957
+ }
905
958
  componentWillLoad() {
906
959
  if (this.dataUnit === undefined) {
907
960
  this.dataUnit = new DataUnit("ez-form");
@@ -921,6 +974,17 @@ const EzForm = class {
921
974
  this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")), this.dataUnit.dataUnitId, metadata, this.recordsValidator);
922
975
  this.ezReady.emit();
923
976
  this.handleFieldToFocus();
977
+ this.setCustomEditors();
978
+ this.setFieldsProps();
979
+ }
980
+ setCustomEditors() {
981
+ if (!this._formView) {
982
+ return;
983
+ }
984
+ for (const [fieldName, customEditorProps] of this._customEditors) {
985
+ this._formView.addCustomEditor(fieldName, customEditorProps.customEditor, customEditorProps.detailContext);
986
+ this._customEditors.delete(fieldName);
987
+ }
924
988
  }
925
989
  handleFieldToFocus() {
926
990
  var _a;
@@ -937,6 +1001,17 @@ const EzForm = class {
937
1001
  this.ezFormRequestClearFieldToFocus.emit();
938
1002
  });
939
1003
  }
1004
+ setFieldsProps() {
1005
+ if (!this._formView) {
1006
+ return;
1007
+ }
1008
+ for (const [fieldName, props] of this._fieldsProps) {
1009
+ for (const prop in props) {
1010
+ this._formView.setFieldProp(fieldName, prop, props[prop]);
1011
+ }
1012
+ this._fieldsProps.delete(fieldName);
1013
+ }
1014
+ }
940
1015
  disconnectedCallback() {
941
1016
  this.dataUnit.unsubscribe(this.onDataUnitAction);
942
1017
  this._dataBinder.onDisconnectedCallback();