@sankhyalabs/ezui 1.2.0-beta.9 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/dist/cjs/{ApplicationUtils-2ac1b73e.js → ApplicationUtils-edc62c5c.js} +4 -1
  2. package/dist/cjs/CheckMode-ecb90b87.js +7 -0
  3. package/dist/cjs/{DialogType-a1e288e6.js → DialogType-aa435c52.js} +1 -0
  4. package/dist/cjs/ez-actions-button.cjs.entry.js +68 -17
  5. package/dist/cjs/ez-application.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-button.cjs.entry.js +13 -11
  7. package/dist/cjs/ez-calendar.cjs.entry.js +5 -5
  8. package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-check.cjs.entry.js +11 -9
  10. package/dist/cjs/ez-chip.cjs.entry.js +17 -7
  11. package/dist/cjs/ez-collapsible-box.cjs.entry.js +85 -7
  12. package/dist/cjs/ez-combo-box.cjs.entry.js +51 -20
  13. package/dist/cjs/ez-date-input.cjs.entry.js +13 -18
  14. package/dist/cjs/ez-date-time-input.cjs.entry.js +12 -17
  15. package/dist/cjs/ez-dialog.cjs.entry.js +43 -8
  16. package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
  17. package/dist/cjs/ez-form.cjs.entry.js +99 -486
  18. package/dist/cjs/ez-grid-config.cjs.entry.js +8 -9
  19. package/dist/cjs/ez-grid.cjs.entry.js +1067 -1165
  20. package/dist/cjs/ez-icon.cjs.entry.js +3 -3
  21. package/dist/cjs/ez-list.cjs.entry.js +2 -4
  22. package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
  23. package/dist/cjs/ez-modal-container.cjs.entry.js +58 -0
  24. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  25. package/dist/cjs/ez-number-input.cjs.entry.js +4 -4
  26. package/dist/cjs/ez-popover.cjs.entry.js +6 -6
  27. package/dist/cjs/ez-popup.cjs.entry.js +8 -4
  28. package/dist/cjs/ez-radio-button.cjs.entry.js +3 -3
  29. package/dist/cjs/ez-scroller.cjs.entry.js +2 -2
  30. package/dist/cjs/ez-search.cjs.entry.js +1 -1
  31. package/dist/cjs/ez-select-box.cjs.entry.js +1 -1
  32. package/dist/cjs/ez-tabselector.cjs.entry.js +8 -7
  33. package/dist/cjs/ez-text-area.cjs.entry.js +7 -7
  34. package/dist/cjs/ez-text-edit.cjs.entry.js +103 -0
  35. package/dist/cjs/ez-text-input.cjs.entry.js +14 -4
  36. package/dist/cjs/ez-time-input.cjs.entry.js +7 -7
  37. package/dist/cjs/ez-toast.cjs.entry.js +2 -2
  38. package/dist/cjs/ez-upload.cjs.entry.js +4 -4
  39. package/dist/cjs/ez-view-stack.cjs.entry.js +10 -7
  40. package/dist/cjs/ezui.cjs.js +4 -112
  41. package/dist/cjs/loader.cjs.js +2 -18
  42. package/dist/collection/collection-manifest.json +2 -0
  43. package/dist/collection/components/ez-actions-button/ez-actions-button.css +49 -20
  44. package/dist/collection/components/ez-actions-button/ez-actions-button.js +219 -23
  45. package/dist/collection/components/ez-button/ez-button.css +0 -6
  46. package/dist/collection/components/ez-button/ez-button.js +11 -9
  47. package/dist/collection/components/ez-calendar/ez-calendar.css +17 -20
  48. package/dist/collection/components/ez-check/CheckMode.js +5 -0
  49. package/dist/collection/components/ez-check/ez-check.css +23 -24
  50. package/dist/collection/components/ez-check/ez-check.js +10 -8
  51. package/dist/collection/components/ez-chip/ez-chip.css +4 -2
  52. package/dist/collection/components/ez-chip/ez-chip.js +16 -6
  53. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +16 -0
  54. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +226 -7
  55. package/dist/collection/components/ez-combo-box/ez-combo-box.css +1 -22
  56. package/dist/collection/components/ez-combo-box/ez-combo-box.js +51 -20
  57. package/dist/collection/components/ez-date-input/ez-date-input.js +8 -13
  58. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +8 -13
  59. package/dist/collection/components/ez-dialog/DialogType.js +1 -0
  60. package/dist/collection/components/ez-dialog/ez-dialog.css +19 -25
  61. package/dist/collection/components/ez-dialog/ez-dialog.js +41 -6
  62. package/dist/collection/components/ez-form/DataBinder.js +1 -0
  63. package/dist/collection/components/ez-form/ez-form.js +22 -13
  64. package/dist/collection/components/ez-form/fieldbuilder/FieldBuilder.js +3 -3
  65. package/dist/collection/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.js +2 -1
  66. package/dist/collection/components/ez-form/fieldbuilder/tpl/DateInput.tpl.js +4 -4
  67. package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +25 -15
  68. package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +3 -0
  69. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +45 -12
  70. package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRenderer.js +31 -0
  71. package/dist/collection/components/ez-grid/ez-grid.js +40 -3
  72. package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.css +38 -27
  73. package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.js +1 -2
  74. package/dist/collection/components/ez-grid/subcomponents/ez-select-box/ez-select-box.js +5 -4
  75. package/dist/collection/components/ez-list/ez-list.css +12 -4
  76. package/dist/collection/components/ez-modal-container/ez-modal-container.css +38 -0
  77. package/dist/collection/components/ez-modal-container/ez-modal-container.js +190 -0
  78. package/dist/collection/components/ez-modal-container/index.js +2 -0
  79. package/dist/collection/components/ez-modal-container/modal-action.js +8 -0
  80. package/dist/collection/components/ez-modal-container/modal-button-status.js +7 -0
  81. package/dist/collection/components/ez-popover/ez-popover.css +1 -1
  82. package/dist/collection/components/ez-popup/ez-popup.css +6 -1
  83. package/dist/collection/components/ez-popup/ez-popup.js +26 -4
  84. package/dist/collection/components/ez-radio-button/ez-radio-button.css +16 -5
  85. package/dist/collection/components/ez-radio-button/ez-radio-button.js +1 -1
  86. package/dist/collection/components/ez-scroller/ez-scroller.css +2 -2
  87. package/dist/collection/components/ez-search/ez-search.js +6 -6
  88. package/dist/collection/components/ez-tabselector/ez-tabselector.css +10 -1
  89. package/dist/collection/components/ez-tabselector/ez-tabselector.js +7 -3
  90. package/dist/collection/components/ez-text-area/ez-text-area.css +6 -3
  91. package/dist/collection/components/ez-text-area/ez-text-area.js +5 -5
  92. package/dist/collection/components/ez-text-edit/ez-text-edit.css +19 -0
  93. package/dist/collection/components/ez-text-edit/ez-text-edit.js +188 -0
  94. package/dist/collection/components/ez-text-input/ez-text-input.css +18 -2
  95. package/dist/collection/components/ez-text-input/ez-text-input.js +28 -0
  96. package/dist/collection/components/ez-toast/ez-toast.css +1 -1
  97. package/dist/collection/components/ez-upload/ez-upload.css +1 -1
  98. package/dist/collection/components/ez-view-stack/ez-view-stack.js +12 -6
  99. package/dist/collection/utils/ApplicationUtils.js +3 -0
  100. package/dist/collection/utils/index.js +1 -0
  101. package/dist/custom-elements/index.d.ts +12 -0
  102. package/dist/custom-elements/index.js +1589 -4002
  103. package/dist/{ezui/ApplicationUtils-30a69eb0.js → esm/ApplicationUtils-205ac4bc.js} +4 -2
  104. package/dist/esm/CheckMode-bdb2ec19.js +7 -0
  105. package/dist/esm/{DialogType-72afa679.js → DialogType-4059dc4d.js} +1 -0
  106. package/dist/esm/ez-actions-button.entry.js +68 -17
  107. package/dist/esm/ez-application.entry.js +1 -1
  108. package/dist/esm/ez-button.entry.js +13 -11
  109. package/dist/esm/ez-calendar.entry.js +3 -3
  110. package/dist/esm/ez-card-item.entry.js +1 -1
  111. package/dist/esm/ez-check.entry.js +11 -9
  112. package/dist/esm/ez-chip.entry.js +17 -7
  113. package/dist/esm/ez-collapsible-box.entry.js +85 -7
  114. package/dist/esm/ez-combo-box.entry.js +48 -17
  115. package/dist/esm/ez-date-input.entry.js +10 -15
  116. package/dist/esm/ez-date-time-input.entry.js +10 -15
  117. package/dist/esm/ez-dialog.entry.js +43 -8
  118. package/dist/esm/ez-filter-input.entry.js +1 -1
  119. package/dist/esm/ez-form.entry.js +65 -452
  120. package/dist/esm/ez-grid-config.entry.js +6 -7
  121. package/dist/esm/ez-grid.entry.js +1033 -1131
  122. package/dist/esm/ez-icon.entry.js +2 -2
  123. package/dist/esm/ez-list.entry.js +2 -4
  124. package/dist/esm/ez-loading-bar.entry.js +1 -1
  125. package/dist/esm/ez-modal-container.entry.js +54 -0
  126. package/dist/esm/ez-modal.entry.js +1 -1
  127. package/dist/esm/ez-number-input.entry.js +2 -2
  128. package/dist/esm/ez-popover.entry.js +3 -3
  129. package/dist/esm/ez-popup.entry.js +8 -4
  130. package/dist/esm/ez-radio-button.entry.js +3 -3
  131. package/dist/esm/ez-scroller.entry.js +2 -2
  132. package/dist/esm/ez-search.entry.js +1 -1
  133. package/dist/esm/ez-select-box.entry.js +1 -1
  134. package/dist/esm/ez-tabselector.entry.js +8 -7
  135. package/dist/esm/ez-text-area.entry.js +7 -7
  136. package/dist/esm/ez-text-edit.entry.js +99 -0
  137. package/dist/esm/ez-text-input.entry.js +13 -3
  138. package/dist/esm/ez-time-input.entry.js +2 -2
  139. package/dist/esm/ez-toast.entry.js +2 -2
  140. package/dist/esm/ez-upload.entry.js +4 -4
  141. package/dist/esm/ez-view-stack.entry.js +10 -7
  142. package/dist/esm/ezui.js +4 -112
  143. package/dist/esm/loader.js +2 -18
  144. package/dist/ezui/ezui.esm.js +1 -125
  145. package/dist/ezui/index.esm.js +0 -1
  146. package/dist/ezui/p-04a41a44.entry.js +1 -0
  147. package/dist/ezui/p-0b44cf1c.js +1 -0
  148. package/dist/ezui/p-0c7203d5.entry.js +1 -0
  149. package/dist/ezui/p-2213da1f.entry.js +1 -0
  150. package/dist/ezui/p-2c6398b3.entry.js +1 -0
  151. package/dist/ezui/p-2ccad880.entry.js +1 -0
  152. package/dist/ezui/p-333d79c4.entry.js +1 -0
  153. package/dist/ezui/p-3987f8d8.entry.js +1 -0
  154. package/dist/ezui/{p-81eb2738.entry.js → p-42c6493e.entry.js} +1 -1
  155. package/dist/ezui/{p-b4ad3b15.entry.js → p-482c3dd8.entry.js} +1 -1
  156. package/dist/ezui/p-5bdb1a41.entry.js +1 -0
  157. package/dist/ezui/{p-b2cf7db2.entry.js → p-63d567cc.entry.js} +1 -1
  158. package/dist/ezui/p-659616e4.entry.js +1 -0
  159. package/dist/ezui/p-6608b9a5.entry.js +1 -0
  160. package/dist/ezui/p-77ec47ac.entry.js +1 -0
  161. package/dist/ezui/p-9b9ebf95.entry.js +1 -0
  162. package/dist/ezui/{p-3a0dd69f.entry.js → p-ae5af8f9.entry.js} +1 -1
  163. package/dist/ezui/p-b853763b.js +1 -0
  164. package/dist/ezui/p-be06251d.entry.js +1 -0
  165. package/dist/ezui/{p-e7d03a0d.entry.js → p-bffae598.entry.js} +1 -1
  166. package/dist/ezui/p-cd4677d4.entry.js +1 -0
  167. package/dist/ezui/p-cfcc23e6.entry.js +1 -0
  168. package/dist/ezui/p-dfcf55e0.entry.js +1 -0
  169. package/dist/ezui/p-e1148f5c.js +1 -0
  170. package/dist/ezui/p-e1f2b5da.entry.js +1 -0
  171. package/dist/ezui/p-e230bfd2.entry.js +1 -0
  172. package/dist/ezui/{p-c0dd9a2e.entry.js → p-e3ee814c.entry.js} +1 -1
  173. package/dist/ezui/p-e697ffd5.entry.js +1 -0
  174. package/dist/ezui/{p-4eb273f8.entry.js → p-efa32bcc.entry.js} +1 -1
  175. package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +42 -9
  176. package/dist/types/components/ez-check/CheckMode.d.ts +4 -0
  177. package/dist/types/components/ez-chip/ez-chip.d.ts +2 -1
  178. package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +46 -1
  179. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +15 -5
  180. package/dist/types/components/ez-date-input/ez-date-input.d.ts +0 -1
  181. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +0 -1
  182. package/dist/types/components/ez-dialog/DialogType.d.ts +1 -0
  183. package/dist/types/components/ez-dialog/ez-dialog.d.ts +3 -0
  184. package/dist/types/components/ez-form/DataBinder.d.ts +2 -2
  185. package/dist/types/components/ez-form/ez-form.d.ts +21 -11
  186. package/dist/types/components/ez-form/fieldbuilder/tpl/CheckBox.tpl.d.ts +3 -3
  187. package/dist/types/components/ez-form/fieldbuilder/tpl/DateInput.tpl.d.ts +4 -2
  188. package/dist/types/components/ez-form/fieldbuilder/tpl/NumberInput.tpl.d.ts +2 -5
  189. package/dist/types/components/ez-form/structure/FormSheetMetadata.d.ts +3 -3
  190. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +11 -0
  191. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -1
  192. package/dist/types/components/ez-grid/controller/ag-grid/components/cellRenderer.d.ts +9 -0
  193. package/dist/types/components/ez-grid/ez-grid.d.ts +8 -3
  194. package/dist/types/components/ez-grid/subcomponents/ez-select-box/ez-select-box.d.ts +2 -6
  195. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +47 -0
  196. package/dist/types/components/ez-modal-container/index.d.ts +2 -0
  197. package/dist/types/components/ez-modal-container/modal-action.d.ts +7 -0
  198. package/dist/types/components/ez-modal-container/modal-button-status.d.ts +6 -0
  199. package/dist/types/components/ez-popup/ez-popup.d.ts +4 -0
  200. package/dist/types/components/ez-search/ez-search.d.ts +3 -3
  201. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +2 -0
  202. package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +39 -0
  203. package/dist/types/components/ez-text-input/ez-text-input.d.ts +5 -0
  204. package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +5 -1
  205. package/dist/types/components.d.ts +274 -28
  206. package/dist/types/utils/ApplicationUtils.d.ts +1 -0
  207. package/dist/types/utils/index.d.ts +1 -0
  208. package/package.json +5 -5
  209. package/react/components.d.ts +2 -0
  210. package/react/components.js +2 -0
  211. package/react/components.js.map +1 -1
  212. package/dist/cjs/ApplicationUtils-475b50d9.js +0 -63
  213. package/dist/cjs/app-globals-3a1e7e63.js +0 -5
  214. package/dist/cjs/css-shim-3bfdba4f.js +0 -6
  215. package/dist/cjs/dom-8ac1ad03.js +0 -75
  216. package/dist/cjs/index-2ec1da82.js +0 -2307
  217. package/dist/cjs/index-55178184.js +0 -6
  218. package/dist/cjs/index-d9c5cb88.js +0 -3068
  219. package/dist/cjs/shadow-css-41d9783d.js +0 -390
  220. package/dist/esm/ApplicationUtils-30a69eb0.js +0 -61
  221. package/dist/esm/ApplicationUtils-a4a76132.js +0 -60
  222. package/dist/esm/app-globals-0f993ce5.js +0 -3
  223. package/dist/esm/css-shim-20dbffa5.js +0 -4
  224. package/dist/esm/dom-c5ed0ba5.js +0 -73
  225. package/dist/esm/index-1e9d524f.js +0 -3031
  226. package/dist/esm/index-b96183c8.js +0 -2295
  227. package/dist/esm/index-f32470b5.js +0 -3
  228. package/dist/esm/shadow-css-8c625855.js +0 -388
  229. package/dist/ezui/CSSVarsUtils-00f67f32.js +0 -70
  230. package/dist/ezui/DialogType-72afa679.js +0 -8
  231. package/dist/ezui/app-globals-0f993ce5.js +0 -3
  232. package/dist/ezui/css-shim-20dbffa5.js +0 -4
  233. package/dist/ezui/dom-c5ed0ba5.js +0 -73
  234. package/dist/ezui/ez-actions-button.entry.js +0 -98
  235. package/dist/ezui/ez-application.entry.js +0 -22
  236. package/dist/ezui/ez-button.entry.js +0 -73
  237. package/dist/ezui/ez-calendar.entry.js +0 -219
  238. package/dist/ezui/ez-card-item.entry.js +0 -40
  239. package/dist/ezui/ez-check.entry.js +0 -72
  240. package/dist/ezui/ez-chip.entry.js +0 -97
  241. package/dist/ezui/ez-collapsible-box.entry.js +0 -57
  242. package/dist/ezui/ez-combo-box.entry.js +0 -439
  243. package/dist/ezui/ez-date-input.entry.js +0 -159
  244. package/dist/ezui/ez-date-time-input.entry.js +0 -214
  245. package/dist/ezui/ez-dialog.entry.js +0 -108
  246. package/dist/ezui/ez-filter-input.entry.js +0 -75
  247. package/dist/ezui/ez-form.entry.js +0 -1395
  248. package/dist/ezui/ez-grid-config.entry.js +0 -433
  249. package/dist/ezui/ez-grid.entry.js +0 -115422
  250. package/dist/ezui/ez-icon.entry.js +0 -37
  251. package/dist/ezui/ez-list.entry.js +0 -516
  252. package/dist/ezui/ez-loading-bar.entry.js +0 -24
  253. package/dist/ezui/ez-modal.entry.js +0 -67
  254. package/dist/ezui/ez-number-input.entry.js +0 -148
  255. package/dist/ezui/ez-popover.entry.js +0 -141
  256. package/dist/ezui/ez-popup.entry.js +0 -49
  257. package/dist/ezui/ez-radio-button.entry.js +0 -45
  258. package/dist/ezui/ez-scroller.entry.js +0 -101
  259. package/dist/ezui/ez-search.entry.js +0 -83
  260. package/dist/ezui/ez-select-box.entry.js +0 -18
  261. package/dist/ezui/ez-tabselector.entry.js +0 -195
  262. package/dist/ezui/ez-text-area.entry.js +0 -158
  263. package/dist/ezui/ez-text-input.entry.js +0 -235
  264. package/dist/ezui/ez-time-input.entry.js +0 -164
  265. package/dist/ezui/ez-toast.entry.js +0 -84
  266. package/dist/ezui/ez-upload.entry.js +0 -379
  267. package/dist/ezui/ez-view-stack.entry.js +0 -74
  268. package/dist/ezui/index-1e9d524f.js +0 -3031
  269. package/dist/ezui/index-b96183c8.js +0 -2295
  270. package/dist/ezui/index-f32470b5.js +0 -3
  271. package/dist/ezui/p-2f02347d.entry.js +0 -1
  272. package/dist/ezui/p-416bedbe.entry.js +0 -1
  273. package/dist/ezui/p-544f0c63.entry.js +0 -1
  274. package/dist/ezui/p-62110996.entry.js +0 -1
  275. package/dist/ezui/p-719e9ef9.entry.js +0 -1
  276. package/dist/ezui/p-787fbdfe.js +0 -1
  277. package/dist/ezui/p-9d5be6a7.entry.js +0 -1
  278. package/dist/ezui/p-a27dafa4.entry.js +0 -1
  279. package/dist/ezui/p-aba3fa6c.entry.js +0 -1
  280. package/dist/ezui/p-adbe4188.js +0 -1
  281. package/dist/ezui/p-af43be42.entry.js +0 -1
  282. package/dist/ezui/p-b7467ad6.entry.js +0 -1
  283. package/dist/ezui/p-c019e137.entry.js +0 -1
  284. package/dist/ezui/p-c9d2060e.entry.js +0 -1
  285. package/dist/ezui/p-cccd8cde.entry.js +0 -1
  286. package/dist/ezui/p-d0671e14.entry.js +0 -1
  287. package/dist/ezui/p-e0f06d73.entry.js +0 -1
  288. package/dist/ezui/p-e59adce6.entry.js +0 -1
  289. package/dist/ezui/p-ed835b36.entry.js +0 -1
  290. package/dist/ezui/shadow-css-8c625855.js +0 -388
@@ -1,433 +0,0 @@
1
- import { r as registerInstance, e as createEvent, h, f as Host } from './index-1e9d524f.js';
2
- import { d as StringUtils } from './index-b96183c8.js';
3
- import { A as ApplicationUtils } from './ApplicationUtils-30a69eb0.js';
4
- import { D as DialogType } from './DialogType-72afa679.js';
5
-
6
- const ezGridConfigCss = ".sc-ez-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid-config__group--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__group--font-size:var(--text--medium, 14px);--ez-grid-config__group--font-weight:var(--text-weight--large, 600);--ez-grid-config__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}@media screen and (min-width: 480px){.sc-ez-grid-config-h{width:359px;max-width:359px}}.padding-right--medium.sc-ez-grid-config{padding-right:var(--space--medium)}ez-list.sc-ez-grid-config{height:100%}.height-calc.sc-ez-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-ez-grid-config{display:flex;justify-content:flex-end;width:100%;padding-top:var(--ez-grid-config__footer--padding-top)}.hidden.sc-ez-grid-config{display:none}.grid-config__main.sc-ez-grid-config{overflow-y:auto;padding-right:var(--ez-grid-config__main--padding-right)}.tabselector-container.sc-ez-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-ez-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-ez-grid-config{display:flex;justify-content:space-between;align-items:center;width:100%}.subtitle.sc-ez-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-ez-grid-config{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary);font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight)}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__scrollbar--background-color);border-radius:var(--ez-grid-config__scrollbar--border-radius)}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-ez-grid-config{font-family:var(--ez-grid-config__group--font-family);font-size:var(--ez-grid-config__group--font-size);font-weight:var(--ez-grid-config__group--font-weight);padding-bottom:var(--ez-grid-config__group--padding-bottom)}";
7
-
8
- let EzGridConfig = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- this.configFinish = createEvent(this, "configFinish", 7);
12
- this.configCancel = createEvent(this, "configCancel", 7);
13
- this._orderListItems = [];
14
- this._orderPriorityList = [];
15
- this._columListItems = [];
16
- this._selectedIndex = -1;
17
- this._dataChanged = false;
18
- this._componenteInternalKey = Date.now();
19
- this.selectedTab = "Colunas";
20
- }
21
- /* Creation Methods */
22
- createOrderList() {
23
- let newList = [];
24
- this.columns.filter(col => { var _a; return StringUtils.getBooleanValue((_a = col === null || col === void 0 ? void 0 : col.props) === null || _a === void 0 ? void 0 : _a.get("sortable"), true); }).forEach(column => {
25
- var _a;
26
- let configItem = (_a = this.config) === null || _a === void 0 ? void 0 : _a.columns.find(item => item.name === column.name);
27
- let item = { name: column.name, label: column.label };
28
- if (configItem) {
29
- item['orderIndex'] = configItem.orderIndex;
30
- item['ascending'] = configItem.ascending;
31
- }
32
- if (!column.hidden) {
33
- newList.push(item);
34
- }
35
- });
36
- newList.sort((a, b) => {
37
- //OS dois tem order index 0 e pelo menos um deles tem orientação de ordenação.
38
- if (a.orderIndex == 0 && b.orderIndex == 0 && (a.ascending != undefined || b.ascending != undefined)) {
39
- if (a.ascending != undefined)
40
- return -1;
41
- if (b.ascending != undefined)
42
- return 1;
43
- return 0;
44
- //Pelo menos um deles tem order index diferente de 0 e os dois tem orientação de ordenação.
45
- }
46
- else if (a.ascending != undefined && b.ascending != undefined) {
47
- return (a.orderIndex - b.orderIndex);
48
- //Pelo menos um deles tem order index diferente de 0 e pelo menos um deles tem orientação de ordenação.
49
- }
50
- else if (a.ascending != undefined || b.ascending != undefined) {
51
- if (a.ascending != undefined)
52
- return -1;
53
- if (b.ascending != undefined)
54
- return 1;
55
- return 0;
56
- }
57
- return (a.orderIndex - b.orderIndex);
58
- });
59
- this._orderListItems = newList;
60
- }
61
- createColumnList() {
62
- let visibleGroup = {
63
- group: 'Visíveis',
64
- items: [],
65
- };
66
- let hiddenGroup = {
67
- group: 'Ocultas',
68
- items: [],
69
- sort: 'ASC'
70
- };
71
- this.columns.forEach(column => {
72
- let item = { label: column.label };
73
- if (column.hidden) {
74
- hiddenGroup.items.push(item);
75
- }
76
- else {
77
- visibleGroup.items.push(item);
78
- }
79
- });
80
- this._columListItems = [visibleGroup, hiddenGroup];
81
- }
82
- buildColumnListSlot(item, group) {
83
- return (h("div", null, h("ez-check", { mode: 'switch', id: 'switch' + item + group, value: group.group === "Visíveis", onEzChange: (ev) => { this.switchColumnGroup(ev, item); } })));
84
- }
85
- buildOrderListSlot(item) {
86
- let selectedOption = "na";
87
- if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
88
- selectedOption = item.ascending == true ? 'asc' : 'desc';
89
- }
90
- return (h("div", null, h("ez-select-box", { selectedOption: selectedOption, key: 'ez-select-box-' + this._componenteInternalKey + '-' + item, onEzChange: (ev) => { ev.stopPropagation(); this.updateOrder(ev.detail, item.label); } })));
91
- }
92
- updateOrder(sortOrder, updatedItemLabel) {
93
- var _a;
94
- this._dataChanged = true;
95
- let newList = [...this.columns];
96
- let newItem = newList.find(item => item.label === updatedItemLabel);
97
- if (newItem) {
98
- newItem.sort = sortOrder.value === "na" ? undefined : sortOrder.value;
99
- }
100
- let orderArray;
101
- if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
102
- this._orderPriorityList.find(item => item.label === newItem.label).sort = sortOrder;
103
- this._orderPriorityList.filter(item => item.sort).map((item, index) => {
104
- if (item.label === newItem.label) {
105
- newItem.sortIndex = index;
106
- }
107
- });
108
- }
109
- else {
110
- orderArray = newList.filter(item => item.sort && item.hidden !== true).map((item, index) => {
111
- return { label: item.label, orderIndex: index };
112
- });
113
- orderArray.forEach(element => {
114
- newList.find(item => item.label === element.label).sortIndex = element.orderIndex;
115
- });
116
- }
117
- this.columns = newList;
118
- }
119
- /* Actions Methods */
120
- switchColumnGroup(ev, switchedItem) {
121
- ev.stopPropagation();
122
- let newList = [...this._columListItems];
123
- this._dataChanged = true;
124
- if (ev.detail === true) {
125
- let hiddenGroup = newList.find(group => group.group === "Ocultas");
126
- let index = hiddenGroup.items.findIndex(item => item.label === switchedItem.label);
127
- if (index >= 0) {
128
- hiddenGroup.items.splice(index, 1);
129
- }
130
- let visibleGroup = newList.find(group => group.group === "Visíveis");
131
- visibleGroup.items.push(switchedItem);
132
- this._columListItems = newList;
133
- this.createOrderList();
134
- }
135
- else if (ev.detail === false) {
136
- let visibleGroup = newList.find(group => group.group === "Visíveis");
137
- let index = visibleGroup.items.findIndex(item => item.label === switchedItem.label);
138
- if (index >= 0) {
139
- visibleGroup.items.splice(index, 1);
140
- }
141
- let hiddenGroup = newList.find(group => group.group === "Ocultas");
142
- hiddenGroup.items.push(switchedItem);
143
- this._columListItems = newList;
144
- this.createOrderList();
145
- }
146
- }
147
- finish() {
148
- let newColumnList = [];
149
- this._columListItems.forEach(group => {
150
- group.items.forEach(item => {
151
- const baseColumn = this.columns.find(column => column.label === item.label);
152
- let newColumnItem = Object.assign({}, baseColumn);
153
- if (group.group === "Ocultas") {
154
- newColumnItem.hidden = true;
155
- }
156
- else {
157
- newColumnItem.hidden = false;
158
- }
159
- newColumnList.push(newColumnItem);
160
- });
161
- });
162
- this.columns = newColumnList;
163
- this._dataChanged = false;
164
- this.closeConfig();
165
- ApplicationUtils.info("As configurações foram salvas com sucesso!");
166
- this.save();
167
- }
168
- save() {
169
- var _a;
170
- let _newConfig;
171
- if (this.config) {
172
- _newConfig = this.config;
173
- }
174
- else {
175
- _newConfig = this.createConfigFromState(this.columns);
176
- }
177
- let _newColumnConfigList = [];
178
- let orderArray;
179
- if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
180
- orderArray = this.columns.filter(item => item.sort && item.hidden !== true).map((item) => {
181
- return { label: item.label, orderIndex: 0 };
182
- });
183
- let indexCount = 0;
184
- let newOrderArray = [];
185
- this._orderPriorityList.forEach((orderPriorityItem) => {
186
- let item = orderArray.find(column => column.label === orderPriorityItem.label);
187
- if (item) {
188
- item.orderIndex = indexCount;
189
- newOrderArray.push(item);
190
- indexCount++;
191
- }
192
- });
193
- if (newOrderArray.length > 0) {
194
- orderArray = newOrderArray;
195
- }
196
- }
197
- for (let i = 0; i < this.columns.length; i++) {
198
- const column = this.columns[i];
199
- let _newColumnConfig = _newConfig.columns.find(_newColumnConfig => column.name === _newColumnConfig.name);
200
- if (column.hidden === true && _newColumnConfig) {
201
- continue;
202
- }
203
- if (_newColumnConfig) {
204
- _newColumnConfig.width = column.width;
205
- }
206
- else if (column.hidden === false) {
207
- _newColumnConfig = { name: column.name, width: column.width, orderIndex: 0 };
208
- }
209
- if (_newColumnConfig) {
210
- if (column.sort) {
211
- _newColumnConfig.ascending = column.sort.toUpperCase() === "ASC" ? true : false;
212
- if (orderArray) {
213
- adjustPriorityOrder(column, _newColumnConfig);
214
- }
215
- else {
216
- _newColumnConfig.orderIndex = column.sortIndex;
217
- }
218
- }
219
- else {
220
- delete _newColumnConfig.ascending;
221
- _newColumnConfig.orderIndex = 0;
222
- }
223
- _newColumnConfigList.push(_newColumnConfig);
224
- }
225
- }
226
- _newConfig.columns = _newColumnConfigList;
227
- this.configFinish.emit(_newConfig);
228
- this._orderList.clearHistory();
229
- function adjustPriorityOrder(column, _newColumnConfig) {
230
- if (orderArray) {
231
- let orderItem = orderArray.find(item => item.label === column.label);
232
- if (orderItem) {
233
- _newColumnConfig.orderIndex = orderItem.orderIndex;
234
- }
235
- }
236
- }
237
- }
238
- createConfigFromState(state) {
239
- let newConfig = { columns: [] };
240
- state.forEach(columnState => {
241
- if (!columnState.hidden) {
242
- let newConfigColumn = { name: columnState.name };
243
- if (columnState.width) {
244
- newConfigColumn['width'] = columnState.width;
245
- }
246
- if (columnState.sort) {
247
- newConfigColumn['ascending'] = (columnState.sort.toUpperCase() === 'ASC');
248
- newConfigColumn['orderIndex'] = columnState.sortIndex;
249
- }
250
- else {
251
- newConfigColumn['orderIndex'] = 0;
252
- }
253
- if (newConfigColumn) {
254
- newConfig.columns.push(newConfigColumn);
255
- }
256
- }
257
- });
258
- return newConfig;
259
- }
260
- async locateColumn(evt, searchingText) {
261
- var _a;
262
- const hitEnter = evt.key === "Enter";
263
- if (!searchingText) {
264
- searchingText = (_a = evt.currentTarget) === null || _a === void 0 ? void 0 : _a.value;
265
- }
266
- let newSelected = -1;
267
- if (this.selectedTab === "Ordenação das linhas") {
268
- if (searchingText) {
269
- const matchedIndexes = [];
270
- let orderListDatasource;
271
- await this._orderList.getList().then(listGroup => {
272
- orderListDatasource = listGroup;
273
- orderListDatasource.forEach((column, index) => {
274
- if (this.compareWords(column, searchingText)) {
275
- matchedIndexes.push(index);
276
- }
277
- });
278
- });
279
- if (matchedIndexes.length > 0) {
280
- if (hitEnter) {
281
- for (let j = 0; j < matchedIndexes.length; j++) {
282
- if (matchedIndexes[j] > this._selectedIndex) {
283
- newSelected = matchedIndexes[j];
284
- break;
285
- }
286
- }
287
- }
288
- if (newSelected === -1) {
289
- newSelected = matchedIndexes[0];
290
- }
291
- }
292
- this._selectedIndex = newSelected;
293
- let selectedColumn;
294
- selectedColumn = orderListDatasource[newSelected];
295
- if (selectedColumn) {
296
- this._orderList.setSelection({ label: selectedColumn.label }, true);
297
- }
298
- else {
299
- this._orderList.setSelection(undefined);
300
- }
301
- }
302
- else {
303
- this._orderList.setSelection(undefined);
304
- }
305
- }
306
- else {
307
- if (searchingText) {
308
- const matchedIndexes = [];
309
- this.columns.forEach((column, index) => {
310
- if (this.compareWords(column, searchingText)) {
311
- matchedIndexes.push(index);
312
- }
313
- });
314
- if (matchedIndexes.length > 0) {
315
- if (hitEnter) {
316
- for (let j = 0; j < matchedIndexes.length; j++) {
317
- if (matchedIndexes[j] > this._selectedIndex) {
318
- newSelected = matchedIndexes[j];
319
- break;
320
- }
321
- }
322
- }
323
- if (newSelected === -1) {
324
- newSelected = matchedIndexes[0];
325
- }
326
- }
327
- this._selectedIndex = newSelected;
328
- let selectedColumn = this.columns[newSelected];
329
- if (selectedColumn) {
330
- this._columnList.setSelection({ label: selectedColumn.label }, true);
331
- }
332
- else {
333
- this._columnList.setSelection(undefined);
334
- }
335
- }
336
- else {
337
- this._columnList.setSelection(undefined);
338
- }
339
- }
340
- }
341
- compareWords(column, searchingText) {
342
- if (StringUtils.replaceAccentuatedChars(column.label).indexOf(StringUtils.replaceAccentuatedChars(searchingText)) > -1) {
343
- return true;
344
- }
345
- return false;
346
- }
347
- closeConfig() {
348
- this._orderList.scrollToTop();
349
- this._columnList.scrollToTop();
350
- this._searchElement.value = "";
351
- if (this._dataChanged) {
352
- let options = {
353
- canClose: false,
354
- labelCancel: "Descartar",
355
- labelConfirm: "Salvar",
356
- btnConfirmDanger: false
357
- };
358
- ApplicationUtils.confirm("Aviso", "As alterações realizadas serão descartadas. Gostaria de salvar antes de sair?", null, DialogType.WARN, options)
359
- .then(response => {
360
- if (!response) {
361
- this._dataChanged = false;
362
- this.configCancel.emit();
363
- this._orderList.clearHistory();
364
- this._componenteInternalKey = Date.now();
365
- }
366
- else {
367
- this.finish();
368
- }
369
- });
370
- }
371
- else {
372
- this.configCancel.emit();
373
- this._orderList.clearHistory();
374
- }
375
- }
376
- /* Handlers */
377
- handleTabChange(ev) {
378
- var _a;
379
- if ((_a = ev === null || ev === void 0 ? void 0 : ev.target) === null || _a === void 0 ? void 0 : _a.selectedTab) {
380
- if (this.selectedTab !== ev.target.selectedTab) {
381
- if (ev.target.selectedTab === "Colunas") {
382
- this._orderList.scrollToTop();
383
- }
384
- else if (ev.target.selectedTab === "Ordenação das linhas") {
385
- this._columnList.scrollToTop();
386
- }
387
- this._searchElement.value = "";
388
- }
389
- if (ev.target.selectedTab === "Ordenação das linhas") {
390
- this.createOrderList();
391
- }
392
- this.selectedTab = ev.target.selectedTab;
393
- }
394
- }
395
- handleColumnListChange(ev) {
396
- var _a;
397
- if (ev.detail) {
398
- let visibleItems = (_a = ev.detail.find(group => group.group === "Visíveis")) === null || _a === void 0 ? void 0 : _a.items;
399
- if (visibleItems) {
400
- this._dataChanged = true;
401
- this._orderListItems = visibleItems;
402
- }
403
- }
404
- }
405
- handleOrderListChange(ev) {
406
- if (ev.detail) {
407
- let orderPriorityList = ev.detail;
408
- if (orderPriorityList) {
409
- this._dataChanged = true;
410
- this._orderPriorityList = orderPriorityList;
411
- }
412
- }
413
- }
414
- componentWillRender() {
415
- var _a;
416
- if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
417
- this.createColumnList();
418
- }
419
- }
420
- componentDidRender() {
421
- var _a;
422
- if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
423
- this.locateColumn(new KeyboardEvent("arrow-right", { key: "ArrowRight" }), this._searchElement.value);
424
- }
425
- }
426
- render() {
427
- return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o das linhas' })), h("div", null, h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", iconName: "search" })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), h("div", { class: this.selectedTab === "Ordenação das linhas" ? "group-name" : "hidden" }, "Sequ\u00EAncia da ordena\u00E7\u00E3o"), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação das linhas" ? "height-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: ev => this.handleOrderListChange(ev), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), h("ez-button", { label: "Concluir", class: "ez-button--primary", onClick: () => this.finish() }))));
428
- }
429
- static get assetsDirs() { return ["../assets"]; }
430
- };
431
- EzGridConfig.style = ezGridConfigCss;
432
-
433
- export { EzGridConfig as ez_grid_config };