@sankhyalabs/ezui 5.22.0-dev.7 → 5.22.0-dev.71

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 (357) hide show
  1. package/dist/cjs/DataBinder-b4ef826a.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 +12 -6
  10. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-card-item_2.cjs.entry.js +76 -0
  12. package/dist/cjs/ez-chart.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-check.cjs.entry.js +2 -2
  14. package/dist/cjs/ez-chip.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-collapsible-box.cjs.entry.js +2 -2
  16. package/dist/cjs/ez-combo-box.cjs.entry.js +68 -14
  17. package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +37 -7
  18. package/dist/cjs/ez-date-input.cjs.entry.js +15 -5
  19. package/dist/cjs/ez-date-time-input.cjs.entry.js +12 -5
  20. package/dist/cjs/ez-dialog.cjs.entry.js +11 -3
  21. package/dist/cjs/ez-double-list.cjs.entry.js +287 -0
  22. package/dist/cjs/{ez-dropdown.cjs.entry.js → ez-dropdown_2.cjs.entry.js} +76 -9
  23. package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
  24. package/dist/cjs/ez-filter-input.cjs.entry.js +130 -0
  25. package/dist/cjs/ez-form-view.cjs.entry.js +30 -23
  26. package/dist/cjs/ez-form.cjs.entry.js +7 -326
  27. package/dist/cjs/ez-grid.cjs.entry.js +14946 -69807
  28. package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
  29. package/dist/cjs/ez-icon.cjs.entry.js +2 -2
  30. package/dist/cjs/ez-list.cjs.entry.js +259 -212
  31. package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
  32. package/dist/cjs/ez-modal-container.cjs.entry.js +3 -2
  33. package/dist/cjs/ez-modal.cjs.entry.js +20 -5
  34. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +3 -3
  35. package/dist/cjs/ez-number-input.cjs.entry.js +16 -3
  36. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  37. package/dist/cjs/ez-popup.cjs.entry.js +25 -3
  38. package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
  39. package/dist/cjs/ez-scroller_2.cjs.entry.js +4 -4
  40. package/dist/cjs/ez-search.cjs.entry.js +106 -46
  41. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +2 -2
  42. package/dist/cjs/ez-split-button.cjs.entry.js +3 -3
  43. package/dist/cjs/ez-split-item.cjs.entry.js +4 -3
  44. package/dist/cjs/ez-split-panel.cjs.entry.js +69 -7
  45. package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
  46. package/dist/cjs/ez-text-area.cjs.entry.js +68 -6
  47. package/dist/cjs/ez-text-input.cjs.entry.js +154 -17
  48. package/dist/cjs/ez-time-input.cjs.entry.js +9 -2
  49. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  50. package/dist/cjs/ez-tooltip.cjs.entry.js +55 -0
  51. package/dist/cjs/ez-tree.cjs.entry.js +1 -1
  52. package/dist/cjs/ez-upload.cjs.entry.js +1 -1
  53. package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
  54. package/dist/cjs/ezListHelper-0d3970b4.js +90 -0
  55. package/dist/cjs/ezui.cjs.js +2 -2
  56. package/dist/cjs/filter-column.cjs.entry.js +3 -3
  57. package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +16 -11
  58. package/dist/cjs/loader.cjs.js +2 -2
  59. package/dist/collection/collection-manifest.json +3 -1
  60. package/dist/collection/components/ez-actions-button/ez-actions-button.js +3 -2
  61. package/dist/collection/components/ez-button/ez-button.css +23 -13
  62. package/dist/collection/components/ez-button/ez-button.js +12 -6
  63. package/dist/collection/components/ez-card-item/ez-card-item.css +60 -10
  64. package/dist/collection/components/ez-card-item/ez-card-item.js +30 -3
  65. package/dist/collection/components/ez-check/ez-check.css +1 -6
  66. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +2 -2
  67. package/dist/collection/components/ez-combo-box/ez-combo-box.css +13 -1
  68. package/dist/collection/components/ez-combo-box/ez-combo-box.js +130 -15
  69. package/dist/collection/components/ez-date-input/ez-date-input.css +1 -1
  70. package/dist/collection/components/ez-date-input/ez-date-input.js +58 -5
  71. package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +1 -1
  72. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +55 -5
  73. package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
  74. package/dist/collection/components/ez-dialog/ez-dialog.js +9 -1
  75. package/dist/collection/components/ez-double-list/doubleListHelper.js +82 -0
  76. package/dist/collection/components/ez-double-list/ez-double-list.css +62 -0
  77. package/dist/collection/components/ez-double-list/ez-double-list.js +440 -0
  78. package/dist/collection/components/ez-dropdown/ez-dropdown.js +33 -8
  79. package/dist/collection/components/ez-filter-input/ez-filter-input.js +55 -5
  80. package/dist/collection/components/ez-form/ez-form.js +1 -0
  81. package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +49 -6
  82. package/dist/collection/components/ez-form-view/ez-form-view.css +5 -2
  83. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +2 -1
  84. package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
  85. package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
  86. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +8 -4
  87. package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +1 -1
  88. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
  89. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +3 -2
  90. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +1 -1
  91. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
  92. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +282 -57
  93. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +107 -5
  94. package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js +2 -2
  95. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +219 -42
  96. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +16 -0
  97. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +8 -0
  98. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +2 -0
  99. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +1 -0
  100. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +1 -0
  101. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +8 -1
  102. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +4 -1
  103. package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +2 -0
  104. package/dist/collection/components/ez-grid/ez-grid.css +47 -8
  105. package/dist/collection/components/ez-grid/ez-grid.js +220 -7
  106. package/dist/collection/components/ez-grid/subcomponents/filter-column.css +4 -0
  107. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +1 -1
  108. package/dist/collection/components/ez-icon/ez-icon.css +153 -149
  109. package/dist/collection/components/ez-list/ez-list.css +2 -1
  110. package/dist/collection/components/ez-list/ez-list.js +301 -212
  111. package/dist/collection/components/ez-list/ezListHelper.js +85 -0
  112. package/dist/collection/components/ez-modal/ez-modal.css +5 -1
  113. package/dist/collection/components/ez-modal/ez-modal.js +38 -5
  114. package/dist/collection/components/ez-modal-container/ez-modal-container.js +20 -1
  115. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +2 -3
  116. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +1 -1
  117. package/dist/collection/components/ez-number-input/ez-number-input.css +8 -0
  118. package/dist/collection/components/ez-number-input/ez-number-input.js +68 -1
  119. package/dist/collection/components/ez-popup/ez-popup.css +8 -3
  120. package/dist/collection/components/ez-popup/ez-popup.js +43 -3
  121. package/dist/collection/components/ez-scroller/ez-scroller.css +1 -0
  122. package/dist/collection/components/ez-search/ez-search.css +21 -10
  123. package/dist/collection/components/ez-search/ez-search.js +189 -49
  124. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +3 -0
  125. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +1 -1
  126. package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css +3 -1
  127. package/dist/collection/components/ez-split-button/ez-split-button.css +50 -14
  128. package/dist/collection/components/ez-split-button/ez-split-button.js +3 -3
  129. package/dist/collection/components/ez-split-panel/ez-split-panel.css +15 -0
  130. package/dist/collection/components/ez-split-panel/ez-split-panel.js +106 -5
  131. package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js +1 -0
  132. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +14 -2
  133. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +20 -1
  134. package/dist/collection/components/ez-text-area/ez-text-area.css +73 -28
  135. package/dist/collection/components/ez-text-area/ez-text-area.js +103 -3
  136. package/dist/collection/components/ez-text-input/ez-text-input.css +106 -91
  137. package/dist/collection/components/ez-text-input/ez-text-input.js +185 -15
  138. package/dist/collection/components/ez-time-input/ez-time-input.js +44 -1
  139. package/dist/collection/components/ez-tooltip/ez-tooltip.css +20 -0
  140. package/dist/collection/components/ez-tooltip/ez-tooltip.js +116 -0
  141. package/dist/collection/sw.js +46 -0
  142. package/dist/collection/utils/FocusResolver.js +31 -0
  143. package/dist/collection/utils/ResponsiveInputUtils.js +26 -0
  144. package/dist/collection/utils/form/DataBinder.js +20 -5
  145. package/dist/collection/utils/form/FormMetadata.js +2 -1
  146. package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
  147. package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js +1 -0
  148. package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +7 -1
  149. package/dist/custom-elements/index.d.ts +12 -0
  150. package/dist/custom-elements/index.js +16564 -70385
  151. package/dist/esm/DataBinder-d2ecbb0f.js +441 -0
  152. package/dist/esm/FocusResolver-1ccbf850.js +33 -0
  153. package/dist/esm/ez-actions-button.entry.js +4 -3
  154. package/dist/esm/ez-alert-list.entry.js +1 -1
  155. package/dist/esm/ez-alert.entry.js +1 -1
  156. package/dist/esm/ez-application.entry.js +1 -1
  157. package/dist/esm/ez-badge.entry.js +1 -1
  158. package/dist/esm/ez-breadcrumb.entry.js +1 -1
  159. package/dist/esm/ez-button.entry.js +12 -6
  160. package/dist/esm/ez-calendar.entry.js +1 -1
  161. package/dist/esm/ez-card-item_2.entry.js +71 -0
  162. package/dist/esm/ez-chart.entry.js +1 -1
  163. package/dist/esm/ez-check.entry.js +2 -2
  164. package/dist/esm/ez-chip.entry.js +1 -1
  165. package/dist/esm/ez-collapsible-box.entry.js +2 -2
  166. package/dist/esm/ez-combo-box.entry.js +69 -15
  167. package/dist/esm/ez-custom-form-input_2.entry.js +38 -8
  168. package/dist/esm/ez-date-input.entry.js +15 -5
  169. package/dist/esm/ez-date-time-input.entry.js +12 -5
  170. package/dist/esm/ez-dialog.entry.js +11 -3
  171. package/dist/esm/ez-double-list.entry.js +283 -0
  172. package/dist/esm/{ez-dropdown.entry.js → ez-dropdown_2.entry.js} +76 -10
  173. package/dist/esm/ez-file-item.entry.js +1 -1
  174. package/dist/esm/ez-filter-input.entry.js +126 -0
  175. package/dist/esm/ez-form-view.entry.js +30 -23
  176. package/dist/esm/ez-form.entry.js +6 -325
  177. package/dist/esm/ez-grid.entry.js +14945 -69806
  178. package/dist/esm/ez-guide-navigator.entry.js +1 -1
  179. package/dist/esm/ez-icon.entry.js +2 -2
  180. package/dist/esm/ez-list.entry.js +259 -212
  181. package/dist/esm/ez-loading-bar.entry.js +1 -1
  182. package/dist/esm/ez-modal-container.entry.js +3 -2
  183. package/dist/esm/ez-modal.entry.js +20 -5
  184. package/dist/esm/ez-multi-selection-list.entry.js +3 -3
  185. package/dist/esm/ez-number-input.entry.js +16 -3
  186. package/dist/esm/ez-popover.entry.js +1 -1
  187. package/dist/esm/ez-popup.entry.js +25 -3
  188. package/dist/esm/ez-radio-button.entry.js +1 -1
  189. package/dist/esm/ez-scroller_2.entry.js +4 -4
  190. package/dist/esm/ez-search.entry.js +106 -46
  191. package/dist/esm/ez-sidebar-navigator.entry.js +2 -2
  192. package/dist/esm/ez-split-button.entry.js +3 -3
  193. package/dist/esm/ez-split-item.entry.js +4 -3
  194. package/dist/esm/ez-split-panel.entry.js +69 -7
  195. package/dist/esm/ez-tabselector.entry.js +1 -1
  196. package/dist/esm/ez-text-area.entry.js +68 -6
  197. package/dist/esm/ez-text-input.entry.js +154 -17
  198. package/dist/esm/ez-time-input.entry.js +9 -2
  199. package/dist/esm/ez-toast.entry.js +1 -1
  200. package/dist/esm/ez-tooltip.entry.js +51 -0
  201. package/dist/esm/ez-tree.entry.js +1 -1
  202. package/dist/esm/ez-upload.entry.js +1 -1
  203. package/dist/esm/ez-view-stack.entry.js +1 -1
  204. package/dist/esm/ezListHelper-00fb9b8d.js +87 -0
  205. package/dist/esm/ezui.js +3 -3
  206. package/dist/esm/filter-column.entry.js +3 -3
  207. package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +17 -11
  208. package/dist/esm/loader.js +3 -3
  209. package/dist/ezui/ezui.esm.js +1 -1
  210. package/dist/ezui/{p-e6b38ade.entry.js → p-0306dff7.entry.js} +1 -1
  211. package/dist/ezui/{p-91ccae0c.entry.js → p-09de35a2.entry.js} +1 -1
  212. package/dist/ezui/p-14b769d7.entry.js +1 -0
  213. package/dist/ezui/p-16e612fc.entry.js +1 -0
  214. package/dist/ezui/{p-b2f6bc0a.entry.js → p-17be134a.entry.js} +1 -1
  215. package/dist/ezui/p-17eabf46.entry.js +1 -0
  216. package/dist/ezui/p-181b5ae8.entry.js +1 -0
  217. package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
  218. package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
  219. package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
  220. package/dist/ezui/p-2475fd6e.entry.js +1 -0
  221. package/dist/ezui/p-2bb2a0c4.entry.js +1 -0
  222. package/dist/ezui/p-3175fe8c.entry.js +1 -0
  223. package/dist/ezui/{p-30951bd7.entry.js → p-35d467a8.entry.js} +1 -1
  224. package/dist/ezui/p-3f2dd525.entry.js +1 -0
  225. package/dist/ezui/{p-0378416a.entry.js → p-44caad9a.entry.js} +1 -1
  226. package/dist/ezui/p-50d83a46.entry.js +1 -0
  227. package/dist/ezui/{p-7567ccdd.entry.js → p-555c9018.entry.js} +1 -1
  228. package/dist/ezui/{p-044d46d5.entry.js → p-5b205c80.entry.js} +1 -1
  229. package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
  230. package/dist/ezui/{p-f1c2c19e.entry.js → p-650e4b6d.entry.js} +1 -1
  231. package/dist/ezui/p-654b3f99.entry.js +1 -0
  232. package/dist/ezui/p-65f471bc.entry.js +1 -0
  233. package/dist/ezui/p-66924de6.entry.js +1 -0
  234. package/dist/ezui/p-6cdd3e0a.entry.js +1 -0
  235. package/dist/ezui/p-6d79930d.entry.js +1 -0
  236. package/dist/ezui/{p-fc194825.entry.js → p-6e429cff.entry.js} +1 -1
  237. package/dist/ezui/p-6f22a385.entry.js +1 -0
  238. package/dist/ezui/p-7409eeaa.entry.js +1 -0
  239. package/dist/ezui/{p-11bfeca3.entry.js → p-77a4bd35.entry.js} +1 -1
  240. package/dist/ezui/p-7e677b7b.entry.js +1 -0
  241. package/dist/ezui/p-7ed30844.entry.js +1 -0
  242. package/dist/ezui/p-7fdd479f.entry.js +1 -0
  243. package/dist/ezui/p-80dfc50b.js +1 -0
  244. package/dist/ezui/{p-1b08bf3c.entry.js → p-8888d9ed.entry.js} +1 -1
  245. package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
  246. package/dist/ezui/p-990b4318.entry.js +1 -0
  247. package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
  248. package/dist/ezui/p-a6fe527a.entry.js +1 -0
  249. package/dist/ezui/{p-dfca5946.entry.js → p-a80b1287.entry.js} +1 -1
  250. package/dist/ezui/p-b6a4e6de.entry.js +1 -0
  251. package/dist/ezui/p-bc2f844e.entry.js +1 -0
  252. package/dist/ezui/{p-92748142.entry.js → p-c0d9c4f8.entry.js} +1 -1
  253. package/dist/ezui/p-c3045972.entry.js +1 -0
  254. package/dist/ezui/{p-82ac8b06.entry.js → p-c4320a39.entry.js} +1 -1
  255. package/dist/ezui/p-ca6340a9.entry.js +1 -0
  256. package/dist/ezui/p-ceadecd9.js +1 -0
  257. package/dist/ezui/p-d0ca26fe.entry.js +1 -0
  258. package/dist/ezui/p-d520839d.entry.js +1 -0
  259. package/dist/ezui/p-dc628ed3.js +1 -0
  260. package/dist/ezui/p-dc8b36c3.entry.js +1 -0
  261. package/dist/ezui/p-dd48941c.entry.js +309 -0
  262. package/dist/ezui/{p-9aa27e69.entry.js → p-e347df9c.entry.js} +1 -1
  263. package/dist/ezui/p-e3e3fd7a.entry.js +1 -0
  264. package/dist/ezui/p-fa6732f2.entry.js +1 -0
  265. package/dist/ezui/p-fec696ab.entry.js +1 -0
  266. package/dist/types/components/ez-button/ez-button.d.ts +2 -1
  267. package/dist/types/components/ez-card-item/ez-card-item.d.ts +5 -0
  268. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +16 -1
  269. package/dist/types/components/ez-date-input/ez-date-input.d.ts +10 -1
  270. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +10 -1
  271. package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -0
  272. package/dist/types/components/ez-double-list/doubleListHelper.d.ts +10 -0
  273. package/dist/types/components/ez-double-list/ez-double-list.d.ts +87 -0
  274. package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +4 -0
  275. package/dist/types/components/ez-dropdown/structure/DropdownItem.d.ts +1 -1
  276. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +10 -1
  277. package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +7 -1
  278. package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +2 -1
  279. package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +1 -1
  280. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
  281. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +60 -4
  282. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +36 -4
  283. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +23 -1
  284. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +33 -7
  285. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +4 -1
  286. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
  287. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  288. package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
  289. package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
  290. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +2 -1
  291. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
  292. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +1 -0
  293. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
  294. package/dist/types/components/ez-grid/ez-grid.d.ts +37 -1
  295. package/dist/types/components/ez-list/ez-list.d.ts +23 -2
  296. package/dist/types/components/ez-list/ezListHelper.d.ts +20 -0
  297. package/dist/types/components/ez-modal/ez-modal.d.ts +7 -1
  298. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +4 -0
  299. package/dist/types/components/ez-number-input/ez-number-input.d.ts +12 -0
  300. package/dist/types/components/ez-popup/ez-popup.d.ts +8 -1
  301. package/dist/types/components/ez-search/ez-search.d.ts +29 -5
  302. package/dist/types/components/ez-split-button/ez-split-button.d.ts +1 -1
  303. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +11 -0
  304. package/dist/types/components/ez-split-panel/interfaces/IPanelSizeInfo.d.ts +9 -0
  305. package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +4 -0
  306. package/dist/types/components/ez-text-area/ez-text-area.d.ts +17 -0
  307. package/dist/types/components/ez-text-input/ez-text-input.d.ts +28 -2
  308. package/dist/types/components/ez-time-input/ez-time-input.d.ts +8 -0
  309. package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +21 -0
  310. package/dist/types/components.d.ts +448 -25
  311. package/dist/types/utils/FocusResolver.d.ts +5 -0
  312. package/dist/types/utils/ResponsiveInputUtils.d.ts +6 -0
  313. package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +2 -0
  314. package/dist/types/utils/form/DataBinder.d.ts +3 -0
  315. package/dist/types/utils/validators/recordvalidator/IInvalidCells.d.ts +5 -0
  316. package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +1 -1
  317. package/package.json +12 -4
  318. package/react/components.d.ts +2 -0
  319. package/react/components.js +2 -0
  320. package/react/components.js.map +1 -1
  321. package/dist/cjs/RecordValidationProcessor-4c893e04.js +0 -102
  322. package/dist/cjs/ez-card-item_3.cjs.entry.js +0 -183
  323. package/dist/cjs/ez-skeleton.cjs.entry.js +0 -67
  324. package/dist/esm/RecordValidationProcessor-b00b8b77.js +0 -99
  325. package/dist/esm/ez-card-item_3.entry.js +0 -177
  326. package/dist/esm/ez-skeleton.entry.js +0 -63
  327. package/dist/ezui/p-04f24913.js +0 -1
  328. package/dist/ezui/p-11b09aa1.entry.js +0 -1
  329. package/dist/ezui/p-24ca32a3.entry.js +0 -1
  330. package/dist/ezui/p-2af4e2de.entry.js +0 -1
  331. package/dist/ezui/p-31674f8e.entry.js +0 -1
  332. package/dist/ezui/p-33792b2b.entry.js +0 -1
  333. package/dist/ezui/p-33b08253.entry.js +0 -304
  334. package/dist/ezui/p-36180f4d.entry.js +0 -1
  335. package/dist/ezui/p-3f8c33e0.entry.js +0 -1
  336. package/dist/ezui/p-5fefcdc9.entry.js +0 -1
  337. package/dist/ezui/p-6ec40dec.entry.js +0 -1
  338. package/dist/ezui/p-752c4069.entry.js +0 -1
  339. package/dist/ezui/p-81cffa53.entry.js +0 -1
  340. package/dist/ezui/p-81f99ace.entry.js +0 -1
  341. package/dist/ezui/p-868b56f7.entry.js +0 -1
  342. package/dist/ezui/p-8eef0f70.entry.js +0 -1
  343. package/dist/ezui/p-9634631d.entry.js +0 -1
  344. package/dist/ezui/p-9a11e223.entry.js +0 -1
  345. package/dist/ezui/p-9a23d513.entry.js +0 -1
  346. package/dist/ezui/p-9c2e2d68.entry.js +0 -1
  347. package/dist/ezui/p-a35b41e6.entry.js +0 -1
  348. package/dist/ezui/p-acbf0e76.entry.js +0 -1
  349. package/dist/ezui/p-b0e71d23.entry.js +0 -1
  350. package/dist/ezui/p-c3b7a23e.entry.js +0 -1
  351. package/dist/ezui/p-cd1a2e6b.entry.js +0 -1
  352. package/dist/ezui/p-dbeee5aa.entry.js +0 -1
  353. package/dist/ezui/p-de870657.entry.js +0 -1
  354. package/dist/ezui/p-e151e795.entry.js +0 -1
  355. package/dist/ezui/p-ee9315ff.entry.js +0 -1
  356. package/dist/ezui/p-f1c3f85d.entry.js +0 -1
  357. package/dist/ezui/p-f291db18.entry.js +0 -1
@@ -1,183 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-9e5554cb.js');
6
- const core = require('@sankhyalabs/core');
7
- const CSSVarsUtils = require('./CSSVarsUtils-10c9d5b4.js');
8
-
9
- const ezCardItemCss = ":host {\n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--text-weight--medium, 400);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--text-weight--large, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--title--primary, #2B3A54);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n padding: 12px;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n justify-content: space-between;\n width: 100%;\n}\n\n.card-item__details-container__left {\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-container__right {\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail:not(:last-child) {\n cursor: pointer;\n white-space: pre-line;\n\n /*public*/\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n color: var(--ez-card-item__detail-label--color);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n color: var(--ez-card-item--color);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n.card-item__content{\n display: flex;\n align-items: center;\n}\n\n.card-item__details-container{\n display: flex;\n}\n\n.card-item__details-slot{\n margin-left: auto;\n}\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-container__left {\n width: 100%;\n }\n \n .card-item__details-container__right {\n width: 100%;\n }\n}\n\n@container box (max-width: 200px) {\n .card-item__title {\n font-size: 10px;\n }\n\n .card-item__detail-label {\n font-size: 10px;\n }\n\n .card-item__detail-value {\n font-size: 10px;\n }\n\n}";
10
-
11
- const EzCardItem = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- this.ezClick = index.createEvent(this, "ezClick", 7);
15
- this.item = undefined;
16
- this.enableKey = true;
17
- }
18
- componentWillRender() {
19
- this.createDetailList();
20
- }
21
- componentDidLoad() {
22
- var _a, _b;
23
- const dataInfo = { id: core.StringUtils.toCamelCase(((_a = this.item) === null || _a === void 0 ? void 0 : _a.key) || ((_b = this.item) === null || _b === void 0 ? void 0 : _b.title) || "") };
24
- core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
25
- }
26
- createDetailList() {
27
- var _a, _b, _c;
28
- this._details = { detailsLeft: [], detailsRight: [] };
29
- let cont = 0;
30
- if ((_a = this.item) === null || _a === void 0 ? void 0 : _a.details) {
31
- for (const attribute in this.item.details) {
32
- cont < 3 ?
33
- this._details.detailsLeft.push({ label: attribute, value: (_b = this.item.details[attribute]) === null || _b === void 0 ? void 0 : _b.toString() }) :
34
- this._details.detailsRight.push({ label: attribute, value: (_c = this.item.details[attribute]) === null || _c === void 0 ? void 0 : _c.toString() });
35
- cont++;
36
- }
37
- }
38
- }
39
- buildDetailContent(detail) {
40
- return index.h("div", { class: "card-item__detail" }, index.h("label", { class: "card-item__detail-label" }, detail.label), ": ", index.h("label", { class: "card-item__detail-value", innerHTML: detail.value }));
41
- }
42
- render() {
43
- return (index.h(index.Host, null, this.item &&
44
- index.h("div", { class: "card-item", onClick: () => { this.ezClick.emit(this.item); } }, index.h("div", { class: "ez-row card-item__content" }, index.h("div", { class: "ez-col ez-col--sd-11 card-item__details" }, index.h("label", { class: "card-item__title" }, this.enableKey && (index.h("span", { class: "card-item__key", innerHTML: this.item.key })), index.h("span", { innerHTML: this.item.title })), index.h("div", { class: "card-item__details-container" }, index.h("div", { class: "card-item__details-container__left" }, this._details.detailsLeft.map(detail => {
45
- return this.buildDetailContent(detail);
46
- })), index.h("div", { class: "card-item__details-container__right" }, this._details.detailsRight.map(detail => {
47
- return this.buildDetailContent(detail);
48
- })))), index.h("div", { class: "ez-col ez-col--sd-1 card-item__details-slot" }, index.h("slot", { name: "rightSlot" }))))));
49
- }
50
- get _element() { return index.getElement(this); }
51
- };
52
- EzCardItem.style = ezCardItemCss;
53
-
54
- const ezFilterInputCss = ":host{display:block;width:100%}";
55
-
56
- const EzFilterInput = class {
57
- constructor(hostRef) {
58
- index.registerInstance(this, hostRef);
59
- this.ezChange = index.createEvent(this, "ezChange", 7);
60
- this.ezSearching = index.createEvent(this, "ezSearching", 7);
61
- this.ezFocusIn = index.createEvent(this, "ezFocusIn", 7);
62
- this._searchingText = "";
63
- this.handleFocus = () => {
64
- if (this._searchingText === "") {
65
- this._textInput.value = "";
66
- }
67
- else {
68
- this._textInput.value = this._searchingText;
69
- }
70
- this.ezFocusIn.emit();
71
- };
72
- this.label = undefined;
73
- this.value = undefined;
74
- this.enabled = true;
75
- this.errorMessage = undefined;
76
- this.restrict = undefined;
77
- this.mode = "regular";
78
- this.asyncSearch = false;
79
- this.canShowError = true;
80
- }
81
- observeLabel() {
82
- if (this._textInput) {
83
- this._textInput.label = this.label;
84
- }
85
- }
86
- observeErrorMessage() {
87
- if (this._textInput) {
88
- this._textInput.errorMessage = this.errorMessage;
89
- }
90
- }
91
- observeValue(newValue, oldValue) {
92
- if (this._textInput && newValue != oldValue) {
93
- this._textInput.value = newValue;
94
- this.ezChange.emit(newValue);
95
- }
96
- }
97
- /**
98
- * Aplica o foco no campo.
99
- */
100
- async setFocus() {
101
- this._textInput.setFocus();
102
- }
103
- /**
104
- * Remove o foco do campo.
105
- */
106
- async setBlur() {
107
- this._textInput.setBlur();
108
- }
109
- /**
110
- * Retorna se o conteúdo é inválido.
111
- */
112
- async isInvalid() {
113
- return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
114
- }
115
- /**
116
- * Método responsável por setar um novo valor ao campo.
117
- */
118
- async setValue(newValue) {
119
- if (!this.asyncSearch || this._textInput == undefined) {
120
- return;
121
- }
122
- if (newValue !== this.value) {
123
- this.value = newValue;
124
- this._searchingText = "";
125
- }
126
- else {
127
- this._textInput.value = newValue;
128
- }
129
- }
130
- /**
131
- * Método responsável por resetar o valor do campo para o ultimo valor inputado.
132
- */
133
- async endSearch() {
134
- if (!this.asyncSearch || this._textInput == undefined) {
135
- return;
136
- }
137
- if (this._textInput.value !== this.value) {
138
- this._textInput.value = this.value;
139
- }
140
- }
141
- handleChange(evt) {
142
- const newValue = evt.detail;
143
- this.errorMessage = "";
144
- if (this.asyncSearch) {
145
- this._searchingText = newValue;
146
- this.ezSearching.emit(newValue);
147
- }
148
- else if (newValue !== this.value) {
149
- this.value = newValue;
150
- }
151
- }
152
- componentDidLoad() {
153
- CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
154
- }
155
- render() {
156
- core.ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
157
- return (index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.handleChange(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode, onFocusin: this.handleFocus, canShowError: this.canShowError }, index.h("ez-icon", { slot: "leftIcon", iconName: "search" })));
158
- }
159
- get _elem() { return index.getElement(this); }
160
- static get watchers() { return {
161
- "label": ["observeLabel"],
162
- "errorMessage": ["observeErrorMessage"],
163
- "value": ["observeValue"]
164
- }; }
165
- };
166
- EzFilterInput.style = ezFilterInputCss;
167
-
168
- const multiSelectionBoxMessageCss = ".multi-selection__message{display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;min-height:320px;text-align:center}.multi-selection__text-message{margin-top:-30px;font-family:var(--font-pattern);font-size:var(--text--meduim);padding:var(--space-xs);color:var(--text--primary)}";
169
-
170
- const MultiSelectionBoxMessage = class {
171
- constructor(hostRef) {
172
- index.registerInstance(this, hostRef);
173
- this.message = undefined;
174
- }
175
- render() {
176
- return (index.h("div", { class: "multi-selection__message" }, index.h("span", { class: "multi-selection__text-message" }, this.message)));
177
- }
178
- };
179
- MultiSelectionBoxMessage.style = multiSelectionBoxMessageCss;
180
-
181
- exports.ez_card_item = EzCardItem;
182
- exports.ez_filter_input = EzFilterInput;
183
- exports.multi_selection_box_message = MultiSelectionBoxMessage;
@@ -1,67 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-9e5554cb.js');
6
-
7
- const ALLOWED_ANIMATIONS = ['progress', 'progress-dark', 'pulse', 'false'];
8
-
9
- const ezSkeletonCss = ".skeleton {\n\tbox-sizing: border-box;\n\toutline: none;\n\toverflow: hidden;\n\tposition: relative;\n\n\tbackground:var(--skeleton-background, #eff1f6) no-repeat;\n\n\tborder-radius: var(--skeleton-border-radius, 4px);\n\twidth: var(--skeleton-width, 100%);\n\theight: var(--skeleton-height, 20px);\n\tdisplay: inline-block;\n\tmargin-bottom: var(--skeleton-margin-bottom, 0px);\n\twill-change: transform;\n\n\t&:after,\n\t&:before {\n\t\tbox-sizing: border-box;\n\t}\n\n\t&.circle {\n\t\twidth: var(--skeleton-width, 40px);\n\t\theight: var(--skeleton-height, 40px);\n\t\tmargin-bottom: var(--skeleton-margin-bottom, 5px);\n\t\tborder-radius: var(--skeleton-border-radius, 50%);\n\t}\n\n\t&.rect {\n\t\tborder-radius: var(--skeleton-border-radius, 0px);\n\t}\n\n\t&.progress,\n\t&.progress-dark {\n\t\tanimation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tbackground-size: 200px 100%;\n\t}\n\n\t&.progress {\n\t\tbackground-image: linear-gradient(\n\t\t\t90deg,\n\t\t\trgba(255, 255, 255, 0),\n\t\t\trgba(255, 255, 255, 0.6),\n\t\t\trgba(255, 255, 255, 0)\n\t\t);\n\t}\n\n\t&.progress-dark {\n\t\tbackground-image: linear-gradient(\n\t\t\t90deg,\n\t\t\ttransparent,\n\t\t\trgba(0, 0, 0, 0.2),\n\t\t\ttransparent\n\t\t);\n\t}\n\n\t&.pulse {\n\t\tanimation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tanimation-delay: 0.5s;\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t&.pulse,\n\t\t&.progress-dark,\n\t\t&.progress {\n\t\t\tanimation: none;\n\t\t}\n\n\t\t&.progress,\n\t\t&.progress-dark {\n\t\t\tbackground-image: none;\n\t\t}\n\t}\n}\n\n@keyframes progress {\n\t0% {\n\t\tbackground-position: -200px 0;\n\t}\n\t100% {\n\t\tbackground-position: calc(200px + 100%) 0;\n\t}\n}\n\n@keyframes pulse {\n\t0% {\n\t\topacity: 1;\n\t}\n\t50% {\n\t\topacity: 0.4;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}";
10
-
11
- const EzSkeleton = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- this.items = [];
15
- this.count = 1;
16
- this.variant = 'text';
17
- this.width = null;
18
- this.height = null;
19
- this.marginBottom = null;
20
- this.animation = 'progress';
21
- }
22
- componentWillLoad() {
23
- this.init();
24
- }
25
- componentWillUpdate() {
26
- this.init();
27
- }
28
- init() {
29
- this.items.length = this.count;
30
- this.items.fill(1);
31
- if (!ALLOWED_ANIMATIONS.includes(this.animation)) {
32
- this.animation = 'progress';
33
- }
34
- }
35
- get style() {
36
- let dimenssionsStyles = {
37
- width: null,
38
- height: null,
39
- marginBottom: null
40
- };
41
- if (this.width) {
42
- dimenssionsStyles.width = this.width;
43
- }
44
- if (this.height) {
45
- dimenssionsStyles.height = this.height;
46
- }
47
- if (this.marginBottom) {
48
- dimenssionsStyles.marginBottom = this.marginBottom;
49
- }
50
- return dimenssionsStyles;
51
- }
52
- render() {
53
- return this.items.map((_, index$1) => {
54
- return (index.h("span", { key: index$1, class: {
55
- circle: this.variant === 'circle',
56
- rect: this.variant === 'rect',
57
- progress: this.animation === 'progress',
58
- 'progress-dark': this.animation === 'progress-dark',
59
- pulse: this.animation === 'pulse',
60
- skeleton: true
61
- }, "data-busy": "true", "data-valuemin": "0", "data-valuemax": "100", "data-valuetext": "Loading...", role: "progressbar", tabindex: "0", style: this.style }));
62
- });
63
- }
64
- };
65
- EzSkeleton.style = ezSkeletonCss;
66
-
67
- exports.ez_skeleton = EzSkeleton;
@@ -1,99 +0,0 @@
1
- import { UserInterface } from '@sankhyalabs/core';
2
- import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
3
-
4
- const buildFieldMetadata = (descriptor, config) => {
5
- let { name, label, group } = Object.assign({}, config);
6
- let { readOnly, required } = Object.assign({}, config);
7
- let props;
8
- let userInterface;
9
- if (descriptor) {
10
- label = label || descriptor.label;
11
- name = name || descriptor.name;
12
- required = descriptor.required || (config === null || config === void 0 ? void 0 : config.required);
13
- readOnly = descriptor.readOnly || (config === null || config === void 0 ? void 0 : config.readOnly);
14
- props = descriptor.properties;
15
- userInterface = descriptor.userInterface;
16
- }
17
- return {
18
- name, label, group,
19
- readOnly, required,
20
- props,
21
- userInterface: userInterface || UserInterface.SHORTTEXT
22
- };
23
- };
24
-
25
- class RecordValidationProcessor {
26
- constructor(dataUnit, validationSource, validator) {
27
- this._dataUnit = dataUnit;
28
- this._validationSource = validationSource;
29
- this._validator = validator;
30
- }
31
- validate() {
32
- return new Promise((accept, reject) => {
33
- const records = this._dataUnit.getModifiedRecords();
34
- for (let i = 0; i < records.length; i++) {
35
- const record = records[i];
36
- const invalidResults = [];
37
- let validationResult = this.validateRequired(record);
38
- if (validationResult && !validationResult.isValid) {
39
- invalidResults.push(validationResult);
40
- }
41
- if (this._validator) {
42
- validationResult = this._validator.validateRecord(record);
43
- if (validationResult && !validationResult.isValid) {
44
- invalidResults.push(validationResult);
45
- }
46
- }
47
- if (invalidResults.length > 0) {
48
- this.processValidationResult(invalidResults, record.__record__id__);
49
- reject();
50
- break;
51
- }
52
- }
53
- return accept();
54
- });
55
- }
56
- validateRequired(record) {
57
- const requiredFields = this._validationSource.getRequiredFields();
58
- const invalidFields = [];
59
- new Set(requiredFields).forEach(field => {
60
- const value = record[field];
61
- if (value == undefined || value === "") {
62
- const errorMessage = this._validationSource.getMessageForField(field, record.__record__id__);
63
- if (errorMessage) {
64
- invalidFields.push({ name: field, message: errorMessage });
65
- }
66
- else {
67
- invalidFields.push({ name: field, message: "Essa informação é obrigatória" });
68
- }
69
- }
70
- });
71
- if (invalidFields.length > 0) {
72
- return { isValid: false, invalidFields, infoMessage: "Há pelo menos um campo obrigatório não preenchido." };
73
- }
74
- return undefined;
75
- }
76
- processValidationResult(validationResult, recordId) {
77
- validationResult.forEach(invalidResult => {
78
- const invalidFields = invalidResult.invalidFields;
79
- if (invalidFields) {
80
- invalidFields.forEach(field => {
81
- this.markAsInvalid(field, recordId);
82
- });
83
- }
84
- if (invalidResult.infoMessage) {
85
- ApplicationUtils.info(invalidResult.infoMessage);
86
- }
87
- if (invalidResult.errorMessage) {
88
- const { errorTitle, errorMessage } = invalidResult;
89
- ApplicationUtils.error(errorTitle, errorMessage);
90
- }
91
- });
92
- }
93
- markAsInvalid(field, recordId) {
94
- this._dataUnit.setInvalidField(field.name, field.message, recordId);
95
- this._validationSource.markAsInvalid(field, recordId);
96
- }
97
- }
98
-
99
- export { RecordValidationProcessor as R, buildFieldMetadata as b };
@@ -1,177 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5a720e56.js';
2
- import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
3
- import { C as CSSVarsUtils } from './CSSVarsUtils-71ce76be.js';
4
-
5
- const ezCardItemCss = ":host {\n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--text-weight--medium, 400);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--text-weight--large, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--title--primary, #2B3A54);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n padding: 12px;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n justify-content: space-between;\n width: 100%;\n}\n\n.card-item__details-container__left {\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-container__right {\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail:not(:last-child) {\n cursor: pointer;\n white-space: pre-line;\n\n /*public*/\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n color: var(--ez-card-item__detail-label--color);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n color: var(--ez-card-item--color);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n.card-item__content{\n display: flex;\n align-items: center;\n}\n\n.card-item__details-container{\n display: flex;\n}\n\n.card-item__details-slot{\n margin-left: auto;\n}\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-container__left {\n width: 100%;\n }\n \n .card-item__details-container__right {\n width: 100%;\n }\n}\n\n@container box (max-width: 200px) {\n .card-item__title {\n font-size: 10px;\n }\n\n .card-item__detail-label {\n font-size: 10px;\n }\n\n .card-item__detail-value {\n font-size: 10px;\n }\n\n}";
6
-
7
- const EzCardItem = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- this.ezClick = createEvent(this, "ezClick", 7);
11
- this.item = undefined;
12
- this.enableKey = true;
13
- }
14
- componentWillRender() {
15
- this.createDetailList();
16
- }
17
- componentDidLoad() {
18
- var _a, _b;
19
- const dataInfo = { id: StringUtils.toCamelCase(((_a = this.item) === null || _a === void 0 ? void 0 : _a.key) || ((_b = this.item) === null || _b === void 0 ? void 0 : _b.title) || "") };
20
- ElementIDUtils.addIDInfo(this._element, null, dataInfo);
21
- }
22
- createDetailList() {
23
- var _a, _b, _c;
24
- this._details = { detailsLeft: [], detailsRight: [] };
25
- let cont = 0;
26
- if ((_a = this.item) === null || _a === void 0 ? void 0 : _a.details) {
27
- for (const attribute in this.item.details) {
28
- cont < 3 ?
29
- this._details.detailsLeft.push({ label: attribute, value: (_b = this.item.details[attribute]) === null || _b === void 0 ? void 0 : _b.toString() }) :
30
- this._details.detailsRight.push({ label: attribute, value: (_c = this.item.details[attribute]) === null || _c === void 0 ? void 0 : _c.toString() });
31
- cont++;
32
- }
33
- }
34
- }
35
- buildDetailContent(detail) {
36
- return h("div", { class: "card-item__detail" }, h("label", { class: "card-item__detail-label" }, detail.label), ": ", h("label", { class: "card-item__detail-value", innerHTML: detail.value }));
37
- }
38
- render() {
39
- return (h(Host, null, this.item &&
40
- h("div", { class: "card-item", onClick: () => { this.ezClick.emit(this.item); } }, h("div", { class: "ez-row card-item__content" }, h("div", { class: "ez-col ez-col--sd-11 card-item__details" }, h("label", { class: "card-item__title" }, this.enableKey && (h("span", { class: "card-item__key", innerHTML: this.item.key })), h("span", { innerHTML: this.item.title })), h("div", { class: "card-item__details-container" }, h("div", { class: "card-item__details-container__left" }, this._details.detailsLeft.map(detail => {
41
- return this.buildDetailContent(detail);
42
- })), h("div", { class: "card-item__details-container__right" }, this._details.detailsRight.map(detail => {
43
- return this.buildDetailContent(detail);
44
- })))), h("div", { class: "ez-col ez-col--sd-1 card-item__details-slot" }, h("slot", { name: "rightSlot" }))))));
45
- }
46
- get _element() { return getElement(this); }
47
- };
48
- EzCardItem.style = ezCardItemCss;
49
-
50
- const ezFilterInputCss = ":host{display:block;width:100%}";
51
-
52
- const EzFilterInput = class {
53
- constructor(hostRef) {
54
- registerInstance(this, hostRef);
55
- this.ezChange = createEvent(this, "ezChange", 7);
56
- this.ezSearching = createEvent(this, "ezSearching", 7);
57
- this.ezFocusIn = createEvent(this, "ezFocusIn", 7);
58
- this._searchingText = "";
59
- this.handleFocus = () => {
60
- if (this._searchingText === "") {
61
- this._textInput.value = "";
62
- }
63
- else {
64
- this._textInput.value = this._searchingText;
65
- }
66
- this.ezFocusIn.emit();
67
- };
68
- this.label = undefined;
69
- this.value = undefined;
70
- this.enabled = true;
71
- this.errorMessage = undefined;
72
- this.restrict = undefined;
73
- this.mode = "regular";
74
- this.asyncSearch = false;
75
- this.canShowError = true;
76
- }
77
- observeLabel() {
78
- if (this._textInput) {
79
- this._textInput.label = this.label;
80
- }
81
- }
82
- observeErrorMessage() {
83
- if (this._textInput) {
84
- this._textInput.errorMessage = this.errorMessage;
85
- }
86
- }
87
- observeValue(newValue, oldValue) {
88
- if (this._textInput && newValue != oldValue) {
89
- this._textInput.value = newValue;
90
- this.ezChange.emit(newValue);
91
- }
92
- }
93
- /**
94
- * Aplica o foco no campo.
95
- */
96
- async setFocus() {
97
- this._textInput.setFocus();
98
- }
99
- /**
100
- * Remove o foco do campo.
101
- */
102
- async setBlur() {
103
- this._textInput.setBlur();
104
- }
105
- /**
106
- * Retorna se o conteúdo é inválido.
107
- */
108
- async isInvalid() {
109
- return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
110
- }
111
- /**
112
- * Método responsável por setar um novo valor ao campo.
113
- */
114
- async setValue(newValue) {
115
- if (!this.asyncSearch || this._textInput == undefined) {
116
- return;
117
- }
118
- if (newValue !== this.value) {
119
- this.value = newValue;
120
- this._searchingText = "";
121
- }
122
- else {
123
- this._textInput.value = newValue;
124
- }
125
- }
126
- /**
127
- * Método responsável por resetar o valor do campo para o ultimo valor inputado.
128
- */
129
- async endSearch() {
130
- if (!this.asyncSearch || this._textInput == undefined) {
131
- return;
132
- }
133
- if (this._textInput.value !== this.value) {
134
- this._textInput.value = this.value;
135
- }
136
- }
137
- handleChange(evt) {
138
- const newValue = evt.detail;
139
- this.errorMessage = "";
140
- if (this.asyncSearch) {
141
- this._searchingText = newValue;
142
- this.ezSearching.emit(newValue);
143
- }
144
- else if (newValue !== this.value) {
145
- this.value = newValue;
146
- }
147
- }
148
- componentDidLoad() {
149
- CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
150
- }
151
- render() {
152
- ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
153
- return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.handleChange(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode, onFocusin: this.handleFocus, canShowError: this.canShowError }, h("ez-icon", { slot: "leftIcon", iconName: "search" })));
154
- }
155
- get _elem() { return getElement(this); }
156
- static get watchers() { return {
157
- "label": ["observeLabel"],
158
- "errorMessage": ["observeErrorMessage"],
159
- "value": ["observeValue"]
160
- }; }
161
- };
162
- EzFilterInput.style = ezFilterInputCss;
163
-
164
- const multiSelectionBoxMessageCss = ".multi-selection__message{display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;min-height:320px;text-align:center}.multi-selection__text-message{margin-top:-30px;font-family:var(--font-pattern);font-size:var(--text--meduim);padding:var(--space-xs);color:var(--text--primary)}";
165
-
166
- const MultiSelectionBoxMessage = class {
167
- constructor(hostRef) {
168
- registerInstance(this, hostRef);
169
- this.message = undefined;
170
- }
171
- render() {
172
- return (h("div", { class: "multi-selection__message" }, h("span", { class: "multi-selection__text-message" }, this.message)));
173
- }
174
- };
175
- MultiSelectionBoxMessage.style = multiSelectionBoxMessageCss;
176
-
177
- export { EzCardItem as ez_card_item, EzFilterInput as ez_filter_input, MultiSelectionBoxMessage as multi_selection_box_message };
@@ -1,63 +0,0 @@
1
- import { r as registerInstance, h } from './index-5a720e56.js';
2
-
3
- const ALLOWED_ANIMATIONS = ['progress', 'progress-dark', 'pulse', 'false'];
4
-
5
- const ezSkeletonCss = ".skeleton {\n\tbox-sizing: border-box;\n\toutline: none;\n\toverflow: hidden;\n\tposition: relative;\n\n\tbackground:var(--skeleton-background, #eff1f6) no-repeat;\n\n\tborder-radius: var(--skeleton-border-radius, 4px);\n\twidth: var(--skeleton-width, 100%);\n\theight: var(--skeleton-height, 20px);\n\tdisplay: inline-block;\n\tmargin-bottom: var(--skeleton-margin-bottom, 0px);\n\twill-change: transform;\n\n\t&:after,\n\t&:before {\n\t\tbox-sizing: border-box;\n\t}\n\n\t&.circle {\n\t\twidth: var(--skeleton-width, 40px);\n\t\theight: var(--skeleton-height, 40px);\n\t\tmargin-bottom: var(--skeleton-margin-bottom, 5px);\n\t\tborder-radius: var(--skeleton-border-radius, 50%);\n\t}\n\n\t&.rect {\n\t\tborder-radius: var(--skeleton-border-radius, 0px);\n\t}\n\n\t&.progress,\n\t&.progress-dark {\n\t\tanimation: progress 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tbackground-size: 200px 100%;\n\t}\n\n\t&.progress {\n\t\tbackground-image: linear-gradient(\n\t\t\t90deg,\n\t\t\trgba(255, 255, 255, 0),\n\t\t\trgba(255, 255, 255, 0.6),\n\t\t\trgba(255, 255, 255, 0)\n\t\t);\n\t}\n\n\t&.progress-dark {\n\t\tbackground-image: linear-gradient(\n\t\t\t90deg,\n\t\t\ttransparent,\n\t\t\trgba(0, 0, 0, 0.2),\n\t\t\ttransparent\n\t\t);\n\t}\n\n\t&.pulse {\n\t\tanimation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n\t\tanimation-delay: 0.5s;\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t&.pulse,\n\t\t&.progress-dark,\n\t\t&.progress {\n\t\t\tanimation: none;\n\t\t}\n\n\t\t&.progress,\n\t\t&.progress-dark {\n\t\t\tbackground-image: none;\n\t\t}\n\t}\n}\n\n@keyframes progress {\n\t0% {\n\t\tbackground-position: -200px 0;\n\t}\n\t100% {\n\t\tbackground-position: calc(200px + 100%) 0;\n\t}\n}\n\n@keyframes pulse {\n\t0% {\n\t\topacity: 1;\n\t}\n\t50% {\n\t\topacity: 0.4;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}";
6
-
7
- const EzSkeleton = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- this.items = [];
11
- this.count = 1;
12
- this.variant = 'text';
13
- this.width = null;
14
- this.height = null;
15
- this.marginBottom = null;
16
- this.animation = 'progress';
17
- }
18
- componentWillLoad() {
19
- this.init();
20
- }
21
- componentWillUpdate() {
22
- this.init();
23
- }
24
- init() {
25
- this.items.length = this.count;
26
- this.items.fill(1);
27
- if (!ALLOWED_ANIMATIONS.includes(this.animation)) {
28
- this.animation = 'progress';
29
- }
30
- }
31
- get style() {
32
- let dimenssionsStyles = {
33
- width: null,
34
- height: null,
35
- marginBottom: null
36
- };
37
- if (this.width) {
38
- dimenssionsStyles.width = this.width;
39
- }
40
- if (this.height) {
41
- dimenssionsStyles.height = this.height;
42
- }
43
- if (this.marginBottom) {
44
- dimenssionsStyles.marginBottom = this.marginBottom;
45
- }
46
- return dimenssionsStyles;
47
- }
48
- render() {
49
- return this.items.map((_, index) => {
50
- return (h("span", { key: index, class: {
51
- circle: this.variant === 'circle',
52
- rect: this.variant === 'rect',
53
- progress: this.animation === 'progress',
54
- 'progress-dark': this.animation === 'progress-dark',
55
- pulse: this.animation === 'pulse',
56
- skeleton: true
57
- }, "data-busy": "true", "data-valuemin": "0", "data-valuemax": "100", "data-valuetext": "Loading...", role: "progressbar", tabindex: "0", style: this.style }));
58
- });
59
- }
60
- };
61
- EzSkeleton.style = ezSkeletonCss;
62
-
63
- export { EzSkeleton as ez_skeleton };
@@ -1 +0,0 @@
1
- import{UserInterface as e}from"@sankhyalabs/core";import{A as s}from"./p-2187f86c.js";const r=(s,r)=>{let t,i,{name:o,label:a,group:n}=Object.assign({},r),{readOnly:l,required:c}=Object.assign({},r);return s&&(a=a||s.label,o=o||s.name,c=s.required||(null==r?void 0:r.required),l=s.readOnly||(null==r?void 0:r.readOnly),t=s.properties,i=s.userInterface),{name:o,label:a,group:n,readOnly:l,required:c,props:t,userInterface:i||e.SHORTTEXT}};class t{constructor(e,s,r){this._dataUnit=e,this._validationSource=s,this._validator=r}validate(){return new Promise(((e,s)=>{const r=this._dataUnit.getModifiedRecords();for(let e=0;e<r.length;e++){const t=r[e],i=[];let o=this.validateRequired(t);if(o&&!o.isValid&&i.push(o),this._validator&&(o=this._validator.validateRecord(t),o&&!o.isValid&&i.push(o)),i.length>0){this.processValidationResult(i,t.__record__id__),s();break}}return e()}))}validateRequired(e){const s=this._validationSource.getRequiredFields(),r=[];if(new Set(s).forEach((s=>{const t=e[s];if(null==t||""===t){const t=this._validationSource.getMessageForField(s,e.__record__id__);r.push(t?{name:s,message:t}:{name:s,message:"Essa informação é obrigatória"})}})),r.length>0)return{isValid:!1,invalidFields:r,infoMessage:"Há pelo menos um campo obrigatório não preenchido."}}processValidationResult(e,r){e.forEach((e=>{const t=e.invalidFields;if(t&&t.forEach((e=>{this.markAsInvalid(e,r)})),e.infoMessage&&s.info(e.infoMessage),e.errorMessage){const{errorTitle:r,errorMessage:t}=e;s.error(r,t)}}))}markAsInvalid(e,s){this._dataUnit.setInvalidField(e.name,e.message,s),this._validationSource.markAsInvalid(e,s)}}export{t as R,r as b}
@@ -1 +0,0 @@
1
- import{r as t,h as i,H as s,g as h}from"./p-e4c7eb39.js";import{StringUtils as n}from"@sankhyalabs/core";var r=function(t,i){return Number(t.slice(0,-1*i.length))},e=function(t){return t.endsWith("px")?{value:t,type:"px",numeric:r(t,"px")}:t.endsWith("fr")?{value:t,type:"fr",numeric:r(t,"fr")}:t.endsWith("%")?{value:t,type:"%",numeric:r(t,"%")}:"auto"===t?{value:t,type:"auto"}:null},o=function(t){return t.split(" ").map(e)},u=function(t,i,s){return i.concat(s).map((function(i){return i.style[t]})).filter((function(t){return void 0!==t&&""!==t}))},c=function(t){for(var i=0;i<t.length;i++)if(t[i].numeric>0)return i;return null},a=function(){return!1},l=function(t,i,s){t.style[i]=s},f=function(t,i,s){var h=t[i];return void 0!==h?h:s};function d(t){var i;return(i=[]).concat.apply(i,Array.from(t.ownerDocument.styleSheets).map((function(t){var i=[];try{i=Array.from(t.cssRules||[])}catch(t){}return i}))).filter((function(i){var s=!1;try{s=t.matches(i.selectorText)}catch(t){}return s}))}var w=function(t,i,s){this.direction=t,this.element=i.element,this.track=i.track,"column"===t?(this.gridTemplateProp="grid-template-columns",this.gridGapProp="grid-column-gap",this.cursor=f(s,"columnCursor",f(s,"cursor","col-resize")),this.snapOffset=f(s,"columnSnapOffset",f(s,"snapOffset",30)),this.dragInterval=f(s,"columnDragInterval",f(s,"dragInterval",1)),this.clientAxis="clientX",this.optionStyle=f(s,"gridTemplateColumns")):"row"===t&&(this.gridTemplateProp="grid-template-rows",this.gridGapProp="grid-row-gap",this.cursor=f(s,"rowCursor",f(s,"cursor","row-resize")),this.snapOffset=f(s,"rowSnapOffset",f(s,"snapOffset",30)),this.dragInterval=f(s,"rowDragInterval",f(s,"dragInterval",1)),this.clientAxis="clientY",this.optionStyle=f(s,"gridTemplateRows")),this.onDragStart=f(s,"onDragStart",a),this.onDragEnd=f(s,"onDragEnd",a),this.onDrag=f(s,"onDrag",a),this.writeStyle=f(s,"writeStyle",l),this.startDragging=this.startDragging.bind(this),this.stopDragging=this.stopDragging.bind(this),this.drag=this.drag.bind(this),this.minSizeStart=i.minSizeStart,this.minSizeEnd=i.minSizeEnd,i.element&&(this.element.addEventListener("mousedown",this.startDragging),this.element.addEventListener("touchstart",this.startDragging))};w.prototype.getDimensions=function(){var t=this.grid.getBoundingClientRect(),i=t.width,s=t.height,h=t.bottom,n=t.left,r=t.right;"column"===this.direction?(this.start=t.top,this.end=h,this.size=s):"row"===this.direction&&(this.start=n,this.end=r,this.size=i)},w.prototype.getSizeAtTrack=function(t,i){return function(t,i,s,h){return void 0===s&&(s=0),void 0===h&&(h=!1),i.slice(0,h?t+1:t).reduce((function(t,i){return t+i.numeric}),0)+(s?t*s:0)}(t,this.computedPixels,this.computedGapPixels,i)},w.prototype.getSizeOfTrack=function(t){return this.computedPixels[t].numeric},w.prototype.getRawTracks=function(){var t=u(this.gridTemplateProp,[this.grid],d(this.grid));if(!t.length){if(this.optionStyle)return this.optionStyle;throw Error("Unable to determine grid template tracks from styles.")}return t[0]},w.prototype.getGap=function(){var t=u(this.gridGapProp,[this.grid],d(this.grid));return t.length?t[0]:null},w.prototype.getRawComputedTracks=function(){return window.getComputedStyle(this.grid)[this.gridTemplateProp]},w.prototype.getRawComputedGap=function(){return window.getComputedStyle(this.grid)[this.gridGapProp]},w.prototype.setTracks=function(t){this.tracks=t.split(" "),this.trackValues=o(t)},w.prototype.setComputedTracks=function(t){this.computedTracks=t.split(" "),this.computedPixels=o(t)},w.prototype.setGap=function(t){this.gap=t},w.prototype.setComputedGap=function(t){var i;this.computedGap=t,this.computedGapPixels=((i=this.computedGap).endsWith("px")?Number(i.slice(0,-1*"px".length)):null)||0},w.prototype.getMousePosition=function(t){return"touches"in t?t.touches[0][this.clientAxis]:t[this.clientAxis]},w.prototype.startDragging=function(t){if(!("button"in t)||0===t.button){t.preventDefault(),this.grid=this.element?this.element.parentNode:t.target.parentNode,this.getDimensions(),this.setTracks(this.getRawTracks()),this.setComputedTracks(this.getRawComputedTracks()),this.setGap(this.getGap()),this.setComputedGap(this.getRawComputedGap());var i=this.trackValues.filter((function(t){return"%"===t.type})),s=this.trackValues.filter((function(t){return"fr"===t.type}));if(this.totalFrs=s.length,this.totalFrs){var h=c(s);null!==h&&(this.frToPixels=this.computedPixels[h].numeric/s[h].numeric)}if(i.length){var n=c(i);null!==n&&(this.percentageToPixels=this.computedPixels[n].numeric/i[n].numeric)}var r=this.getSizeAtTrack(this.track,!1)+this.start;if(this.dragStartOffset=this.getMousePosition(t)-r,this.aTrack=this.track-1,!(this.track<this.tracks.length-1))throw Error("Invalid track index: "+this.track+". Track must be between two other tracks and only "+this.tracks.length+" tracks were found.");this.bTrack=this.track+1,this.aTrackStart=this.getSizeAtTrack(this.aTrack,!1)+this.start,this.bTrackEnd=this.getSizeAtTrack(this.bTrack,!0)+this.start,this.dragging=!0,window.addEventListener("mouseup",this.stopDragging),window.addEventListener("touchend",this.stopDragging),window.addEventListener("touchcancel",this.stopDragging),window.addEventListener("mousemove",this.drag),window.addEventListener("touchmove",this.drag),this.grid.addEventListener("selectstart",a),this.grid.addEventListener("dragstart",a),this.grid.style.userSelect="none",this.grid.style.webkitUserSelect="none",this.grid.style.MozUserSelect="none",this.grid.style.pointerEvents="none",this.grid.style.cursor=this.cursor,window.document.body.style.cursor=this.cursor,this.onDragStart(this.direction,this.track)}},w.prototype.stopDragging=function(){this.dragging=!1,this.cleanup(),this.onDragEnd(this.direction,this.track),this.needsDestroy&&(this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),this.destroyCb(),this.needsDestroy=!1,this.destroyCb=null)},w.prototype.drag=function(t){var i=this.getMousePosition(t),s=this.getSizeOfTrack(this.track),h=this.aTrackStart+this.minSizeStart+this.dragStartOffset+this.computedGapPixels,n=this.bTrackEnd-this.minSizeEnd-this.computedGapPixels-(s-this.dragStartOffset);i<h+this.snapOffset&&(i=h),i>n-this.snapOffset&&(i=n),i<h?i=h:i>n&&(i=n);var r=i-this.aTrackStart-this.dragStartOffset-this.computedGapPixels,e=this.bTrackEnd-i+this.dragStartOffset-s-this.computedGapPixels;if(this.dragInterval>1){var o=Math.round(r/this.dragInterval)*this.dragInterval;e-=o-r,r=o}r<this.minSizeStart&&(r=this.minSizeStart),e<this.minSizeEnd&&(e=this.minSizeEnd),"px"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=r+"px":"fr"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=1===this.totalFrs?"1fr":r/this.frToPixels+"fr":"%"===this.trackValues[this.aTrack].type&&(this.tracks[this.aTrack]=r/this.percentageToPixels+"%"),"px"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=e+"px":"fr"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=1===this.totalFrs?"1fr":e/this.frToPixels+"fr":"%"===this.trackValues[this.bTrack].type&&(this.tracks[this.bTrack]=e/this.percentageToPixels+"%");var u=this.tracks.join(" ");this.writeStyle(this.grid,this.gridTemplateProp,u),this.onDrag(this.direction,this.track,u)},w.prototype.cleanup=function(){window.removeEventListener("mouseup",this.stopDragging),window.removeEventListener("touchend",this.stopDragging),window.removeEventListener("touchcancel",this.stopDragging),window.removeEventListener("mousemove",this.drag),window.removeEventListener("touchmove",this.drag),this.grid&&(this.grid.removeEventListener("selectstart",a),this.grid.removeEventListener("dragstart",a),this.grid.style.userSelect="",this.grid.style.webkitUserSelect="",this.grid.style.MozUserSelect="",this.grid.style.pointerEvents="",this.grid.style.cursor=""),window.document.body.style.cursor=""},w.prototype.destroy=function(t,i){void 0===t&&(t=!0),t||!1===this.dragging?(this.cleanup(),this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),i&&i()):(this.needsDestroy=!0,i&&(this.destroyCb=i))};var m=function(t,i,s){return i in t?t[i]:s},v=function(t,i){return function(s){if(s.track<1)throw Error("Invalid track index: "+s.track+". Track must be between two other tracks.");var h="column"===t?i.columnMinSizes||{}:i.rowMinSizes||{},n="column"===t?"columnMinSize":"rowMinSize";return new w(t,Object.assign({},{minSizeStart:m(h,s.track-1,f(i,n,f(i,"minSize",0))),minSizeEnd:m(h,s.track+1,f(i,n,f(i,"minSize",0)))},s),i)}},p=function(t){var i=this;this.columnGutters={},this.rowGutters={},this.options=Object.assign({},{columnGutters:t.columnGutters||[],rowGutters:t.rowGutters||[],columnMinSizes:t.columnMinSizes||{},rowMinSizes:t.rowMinSizes||{}},t),this.options.columnGutters.forEach((function(t){i.columnGutters[t.track]=v("column",i.options)(t)})),this.options.rowGutters.forEach((function(t){i.rowGutters[t.track]=v("row",i.options)(t)}))};p.prototype.addColumnGutter=function(t,i){this.columnGutters[i]&&this.columnGutters[i].destroy(),this.columnGutters[i]=v("column",this.options)({element:t,track:i})},p.prototype.addRowGutter=function(t,i){this.rowGutters[i]&&this.rowGutters[i].destroy(),this.rowGutters[i]=v("row",this.options)({element:t,track:i})},p.prototype.removeColumnGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.columnGutters[t]&&this.columnGutters[t].destroy(i,(function(){delete s.columnGutters[t]}))},p.prototype.removeRowGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.rowGutters[t]&&this.rowGutters[t].destroy(i,(function(){delete s.rowGutters[t]}))},p.prototype.handleDragStart=function(t,i,s){"column"===i?(this.columnGutters[s]&&this.columnGutters[s].destroy(),this.columnGutters[s]=v("column",this.options)({track:s}),this.columnGutters[s].startDragging(t)):"row"===i&&(this.rowGutters[s]&&this.rowGutters[s].destroy(),this.rowGutters[s]=v("row",this.options)({track:s}),this.rowGutters[s].startDragging(t))},p.prototype.destroy=function(t){var i=this;void 0===t&&(t=!0),Object.keys(this.columnGutters).forEach((function(s){return i.columnGutters[s].destroy(t,(function(){delete i.columnGutters[s]}))})),Object.keys(this.rowGutters).forEach((function(s){return i.rowGutters[s].destroy(t,(function(){delete i.rowGutters[s]}))}))};const g=class{constructor(i){t(this,i),this._items=[],this._buildInProgress=!1,this.direction="column",this.anchorToExpand=!1}rebuildLayout(){Array.from(this._element.querySelectorAll(".ez-split-gutter")).reverse().forEach((t=>{t.remove()})),Array.from(this._element.getElementsByTagName("EzSplitPanel")).reverse().forEach((t=>{t.rebuildLayout()})),this.buildItems(),this.initSplit()}buildItems(){this._panelID=n.generateUUID(),this._element.dataset.panelId=this._panelID,this._element.dataset.uniqueId="EzSplitPanel";let t=Array.from(this._element.children);this._items=t.filter((t=>{var i;return"EZ-SPLIT-ITEM"===(null===(i=t.tagName)||void 0===i?void 0:i.toUpperCase())}));let i=1;this._items.forEach(((t,s)=>{t.dataset.trackNumber=i.toString(),this._items.length>1&&s!=this._items.length-1&&this.addItemGutter(t),i+=2}))}componentDidLoad(){this.buildItems(),this.initSplit(),this._mutationObserver=new MutationObserver((t=>{for(const i of t)if("childList"===i.type&&!1===this._buildInProgress){this._buildInProgress=!0,window.requestAnimationFrame((()=>{this.rebuildLayout()})),window.requestAnimationFrame((()=>this._buildInProgress=!1));break}})),this._mutationObserver.observe(this._element,{childList:!0,subtree:!1})}disconnectedCallback(){null!=this._mutationObserver&&this._mutationObserver.disconnect()}initSplit(){var t;this._items.length&&(this._element.style["row"==this.direction?"grid-template-rows":"grid-template-columns"]=this.getGridTemplate(),t=this.getGutters(),new p(t))}getGutters(){const t={columnGutters:[],rowGutters:[]};if(!this._items.length)return t;const i="row"==this.direction?"rowGutters":"columnGutters";return this._items.forEach(((s,h)=>{if(h==this._items.length-1)return;let n=s.dataset.trackNumber;h===this._items.length-1&&(n=this._items.length.toString()),t[i].push({track:Number(n),element:this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${s.dataset.trackNumber}"]`)})})),t}addItemGutter(t){const i=document.createElement("div");i.classList.add("ez-split-gutter"),i.classList.add(this.direction),i.dataset.itemTrack=`${t.dataset.trackNumber}`,i.dataset.trackNumber=(Number(t.dataset.trackNumber)+1).toString(),t.parentNode.insertBefore(i,t.nextSibling)}getElementStyle(){return{display:"grid",height:"100%",width:"100%",position:this.anchorToExpand?"relative":"unset"}}calcFreeSpacePercentage(){const t=this._items.reduce(((t,i)=>{var s;return t+((null===(s=i.size)||void 0===s?void 0:s.includes("%"))?Number(i.size.replace("%","")):0)}),0),i=this._items.filter((t=>void 0===t.size)).length;return i&&t?(100-t)/i:null}getGridTemplate(){let t="";const i=this.calcFreeSpacePercentage();return this._items.forEach(((s,h)=>{let n=s.size||"1fr";!s.size&&i&&(n=`${i}%`),t+=h!==this._items.length-1?0!==h?` ${n} 5px`:`${n} 5px`:` ${n}`})),t}render(){return i(s,{style:this.getElementStyle()})}get _element(){return h(this)}};g.style=".ez-split-gutter{cursor:grab;background-color:transparent;max-width:100%}";export{g as ez_split_panel}