@sankhyalabs/sankhyablocks 8.16.0-dev.114 → 8.16.0-dev.116

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 (282) hide show
  1. package/dist/cjs/{ClientSideExporterProvider-a2753c93.js → ClientSideExporterProvider-0ce2bcd9.js} +2 -2
  2. package/dist/cjs/FormConfigHelper-c664dbae.js +260 -0
  3. package/dist/cjs/{SnkFormConfigManager-ce7b0951.js → SnkFormConfigManager-aa4631bd.js} +2 -3
  4. package/dist/cjs/{SnkMessageBuilder-21cc7f09.js → SnkMessageBuilder-e3b7850b.js} +16 -2
  5. package/dist/cjs/config-header.cjs.entry.js +79 -0
  6. package/dist/cjs/configs-button.cjs.entry.js +61 -0
  7. package/dist/cjs/{constants-77c1b8bd.js → constants-6d82e405.js} +8 -38
  8. package/dist/cjs/field-config_2.cjs.entry.js +324 -0
  9. package/dist/cjs/fields-layout.cjs.entry.js +341 -0
  10. package/dist/cjs/fields-selector.cjs.entry.js +74 -0
  11. package/dist/cjs/guides-configurator.cjs.entry.js +164 -0
  12. package/dist/cjs/{index-102ba62d.js → index-0ad2baeb.js} +4 -5
  13. package/dist/cjs/{index-f9e81701.js → index-1cf293c1.js} +28 -10
  14. package/dist/cjs/loader.cjs.js +2 -2
  15. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +2 -2
  16. package/dist/cjs/sankhyablocks.cjs.js +2 -2
  17. package/dist/cjs/snk-actions-button_8.cjs.entry.js +2 -2
  18. package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
  19. package/dist/cjs/snk-application.cjs.entry.js +3 -3
  20. package/dist/cjs/snk-attach.cjs.entry.js +4 -4
  21. package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
  22. package/dist/cjs/snk-configurator.cjs.entry.js +2 -2
  23. package/dist/cjs/snk-crud.cjs.entry.js +4 -4
  24. package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
  25. package/dist/cjs/snk-data-exporter.cjs.entry.js +4 -4
  26. package/dist/cjs/{snk-data-unit-7913a033.js → snk-data-unit-3684c96e.js} +2 -2
  27. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  28. package/dist/cjs/snk-default-filter.cjs.entry.js +1 -1
  29. package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
  30. package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
  31. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  32. package/dist/cjs/snk-expression-group_2.cjs.entry.js +2 -2
  33. package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +1 -1
  34. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +2 -2
  35. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
  36. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
  37. package/dist/cjs/snk-filter-detail.cjs.entry.js +1 -1
  38. package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +1 -1
  39. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
  40. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
  41. package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
  42. package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
  43. package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
  44. package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
  45. package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
  46. package/dist/cjs/snk-form-view.cjs.entry.js +1 -1
  47. package/dist/cjs/snk-form_2.cjs.entry.js +433 -0
  48. package/dist/cjs/snk-grid.cjs.entry.js +5 -5
  49. package/dist/cjs/{snk-guides-viewer-450baf6a.js → snk-guides-viewer-edc0a00a.js} +5 -5
  50. package/dist/cjs/snk-guides-viewer.cjs.entry.js +6 -6
  51. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
  52. package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
  53. package/dist/cjs/snk-pesquisa.cjs.entry.js +2 -2
  54. package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
  55. package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
  56. package/dist/cjs/snk-simple-crud.cjs.entry.js +6 -6
  57. package/dist/cjs/snk-taskbar.cjs.entry.js +3 -3
  58. package/dist/cjs/sortable.esm-9a110bb7.js +2668 -0
  59. package/dist/cjs/{taskbar-elements-6f4e06af.js → taskbar-elements-3b74cd21.js} +2 -2
  60. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  61. package/dist/collection/collection-manifest.json +7 -14
  62. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
  63. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -0
  64. package/dist/collection/components/snk-form-config/FormConfigHelper.js +245 -0
  65. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +4 -5
  66. package/dist/collection/components/snk-form-config/config-header/config-header.css +18 -0
  67. package/dist/collection/components/snk-form-config/config-header/config-header.js +236 -0
  68. package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.css +41 -0
  69. package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.js +170 -0
  70. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +21 -0
  71. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.js +408 -0
  72. package/dist/collection/components/snk-form-config/field-item/field-item.css +108 -0
  73. package/dist/collection/components/snk-form-config/field-item/field-item.js +206 -0
  74. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +133 -0
  75. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +578 -0
  76. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.css +38 -0
  77. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js +146 -0
  78. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +132 -0
  79. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +317 -0
  80. package/dist/collection/components/snk-form-config/snk-form-config.css +16 -229
  81. package/dist/collection/components/snk-form-config/snk-form-config.js +288 -980
  82. package/dist/collection/lib/message/resources/snk-form.msg.js +16 -2
  83. package/dist/collection/lib/utils/constants.js +7 -1
  84. package/dist/components/SnkFormConfigManager.js +2 -3
  85. package/dist/components/SnkMessageBuilder.js +16 -2
  86. package/dist/components/{snk-tab-config.d.ts → config-header.d.ts} +4 -4
  87. package/dist/components/config-header.js +6 -0
  88. package/dist/components/config-header2.js +103 -0
  89. package/dist/components/{snk-config-options.d.ts → configs-button.d.ts} +4 -4
  90. package/dist/components/configs-button.js +6 -0
  91. package/dist/components/configs-button2.js +76 -0
  92. package/dist/components/constants.js +8 -34
  93. package/dist/components/field-config.d.ts +11 -0
  94. package/dist/components/field-config.js +6 -0
  95. package/dist/components/field-config2.js +525 -0
  96. package/dist/components/field-item.d.ts +11 -0
  97. package/dist/components/field-item.js +6 -0
  98. package/dist/components/field-item2.js +93 -0
  99. package/dist/components/fields-layout.d.ts +11 -0
  100. package/dist/components/fields-layout.js +6 -0
  101. package/dist/components/fields-layout2.js +370 -0
  102. package/dist/components/{snk-field-config.d.ts → fields-selector.d.ts} +4 -4
  103. package/dist/components/fields-selector.js +6 -0
  104. package/dist/components/fields-selector2.js +98 -0
  105. package/dist/components/guides-configurator.d.ts +11 -0
  106. package/dist/components/guides-configurator.js +6 -0
  107. package/dist/components/guides-configurator2.js +182 -0
  108. package/dist/components/index.d.ts +7 -3
  109. package/dist/components/index.js +7 -3
  110. package/dist/components/index2.js +3 -4
  111. package/dist/components/snk-application2.js +1 -1
  112. package/dist/components/snk-crud.js +86 -62
  113. package/dist/components/snk-detail-view2.js +113 -89
  114. package/dist/components/snk-filter-bar2.js +1 -1
  115. package/dist/components/snk-form-config2.js +253 -953
  116. package/dist/components/snk-form.js +33 -9
  117. package/dist/components/sortable.esm.js +2666 -0
  118. package/dist/esm/{ClientSideExporterProvider-b3871edb.js → ClientSideExporterProvider-3ed744fd.js} +2 -2
  119. package/dist/esm/FormConfigHelper-49fe72ca.js +248 -0
  120. package/dist/esm/{SnkFormConfigManager-327dfdd4.js → SnkFormConfigManager-b4b93298.js} +2 -3
  121. package/dist/esm/{SnkMessageBuilder-0f112c19.js → SnkMessageBuilder-9c269caf.js} +16 -2
  122. package/dist/esm/config-header.entry.js +75 -0
  123. package/dist/esm/configs-button.entry.js +57 -0
  124. package/dist/esm/{constants-7db1128a.js → constants-7b422de0.js} +8 -34
  125. package/dist/esm/field-config_2.entry.js +319 -0
  126. package/dist/esm/fields-layout.entry.js +337 -0
  127. package/dist/esm/fields-selector.entry.js +70 -0
  128. package/dist/esm/guides-configurator.entry.js +160 -0
  129. package/dist/esm/{index-a7d3d3f1.js → index-479e1293.js} +28 -10
  130. package/dist/esm/{index-bdf75557.js → index-b72af127.js} +4 -5
  131. package/dist/esm/loader.js +3 -3
  132. package/dist/esm/pesquisa-grid_2.entry.js +2 -2
  133. package/dist/esm/sankhyablocks.js +3 -3
  134. package/dist/esm/snk-actions-button_8.entry.js +2 -2
  135. package/dist/esm/snk-actions-form.entry.js +1 -1
  136. package/dist/esm/snk-application.entry.js +3 -3
  137. package/dist/esm/snk-attach.entry.js +4 -4
  138. package/dist/esm/snk-client-confirm.entry.js +1 -1
  139. package/dist/esm/snk-configurator.entry.js +2 -2
  140. package/dist/esm/snk-crud.entry.js +4 -4
  141. package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
  142. package/dist/esm/snk-data-exporter.entry.js +4 -4
  143. package/dist/esm/{snk-data-unit-a95dc9fe.js → snk-data-unit-027bca56.js} +2 -2
  144. package/dist/esm/snk-data-unit.entry.js +3 -3
  145. package/dist/esm/snk-default-filter.entry.js +1 -1
  146. package/dist/esm/snk-detail-view.entry.js +7 -7
  147. package/dist/esm/snk-entity-list.entry.js +1 -1
  148. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  149. package/dist/esm/snk-expression-group_2.entry.js +2 -2
  150. package/dist/esm/snk-filter-advanced-mode_2.entry.js +1 -1
  151. package/dist/esm/snk-filter-bar_4.entry.js +2 -2
  152. package/dist/esm/snk-filter-binary-select.entry.js +1 -1
  153. package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
  154. package/dist/esm/snk-filter-detail.entry.js +1 -1
  155. package/dist/esm/snk-filter-field-search_2.entry.js +1 -1
  156. package/dist/esm/snk-filter-modal-item.entry.js +1 -1
  157. package/dist/esm/snk-filter-multi-select.entry.js +1 -1
  158. package/dist/esm/snk-filter-number.entry.js +1 -1
  159. package/dist/esm/snk-filter-period.entry.js +1 -1
  160. package/dist/esm/snk-filter-search.entry.js +1 -1
  161. package/dist/esm/snk-filter-text.entry.js +1 -1
  162. package/dist/esm/snk-form-summary.entry.js +1 -1
  163. package/dist/esm/snk-form-view.entry.js +1 -1
  164. package/dist/esm/snk-form_2.entry.js +428 -0
  165. package/dist/esm/snk-grid.entry.js +5 -5
  166. package/dist/esm/{snk-guides-viewer-ebb40908.js → snk-guides-viewer-32f3d3ab.js} +5 -5
  167. package/dist/esm/snk-guides-viewer.entry.js +6 -6
  168. package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
  169. package/dist/esm/snk-personalized-filter.entry.js +2 -2
  170. package/dist/esm/snk-pesquisa.entry.js +2 -2
  171. package/dist/esm/snk-print-selector.entry.js +1 -1
  172. package/dist/esm/snk-simple-bar.entry.js +1 -1
  173. package/dist/esm/snk-simple-crud.entry.js +6 -6
  174. package/dist/esm/snk-taskbar.entry.js +3 -3
  175. package/dist/esm/sortable.esm-842f85a3.js +2666 -0
  176. package/dist/esm/{taskbar-elements-f2cb4922.js → taskbar-elements-171476d4.js} +2 -2
  177. package/dist/esm/teste-pesquisa.entry.js +1 -1
  178. package/dist/sankhyablocks/{p-24a0dbd2.entry.js → p-0024d3fd.entry.js} +1 -1
  179. package/dist/sankhyablocks/{p-e6d90f89.entry.js → p-09e60995.entry.js} +1 -1
  180. package/dist/sankhyablocks/{p-7effe55f.entry.js → p-0cb295c1.entry.js} +1 -1
  181. package/dist/sankhyablocks/p-11f099ea.entry.js +1 -0
  182. package/dist/sankhyablocks/{p-b0ab5066.entry.js → p-1456d7cb.entry.js} +1 -1
  183. package/dist/sankhyablocks/{p-9531fd46.entry.js → p-180716b2.entry.js} +1 -1
  184. package/dist/sankhyablocks/{p-6a03b190.entry.js → p-1ea34488.entry.js} +1 -1
  185. package/dist/sankhyablocks/{p-5182513e.entry.js → p-21107f0d.entry.js} +1 -1
  186. package/dist/sankhyablocks/{p-118e769b.entry.js → p-27482793.entry.js} +1 -1
  187. package/dist/sankhyablocks/{p-794840bd.entry.js → p-295aa209.entry.js} +1 -1
  188. package/dist/sankhyablocks/{p-bd6a6203.js → p-2bde486e.js} +1 -1
  189. package/dist/sankhyablocks/{p-26b0ce3e.entry.js → p-2fdac5e6.entry.js} +1 -1
  190. package/dist/sankhyablocks/p-349d1968.entry.js +1 -0
  191. package/dist/sankhyablocks/p-35e73c5d.js +1 -0
  192. package/dist/sankhyablocks/{p-89c92727.entry.js → p-398cdd67.entry.js} +1 -1
  193. package/dist/sankhyablocks/{p-39f3b02d.entry.js → p-3a48bff3.entry.js} +1 -1
  194. package/dist/sankhyablocks/{p-434817f0.entry.js → p-3d41f5a8.entry.js} +1 -1
  195. package/dist/sankhyablocks/p-3f24c9b2.js +1 -0
  196. package/dist/sankhyablocks/{p-def1fe2d.entry.js → p-471b34f4.entry.js} +1 -1
  197. package/dist/sankhyablocks/{p-7e2ded86.entry.js → p-49d968e2.entry.js} +1 -1
  198. package/dist/sankhyablocks/p-4d2ff2fb.entry.js +1 -0
  199. package/dist/sankhyablocks/p-51833248.js +7 -0
  200. package/dist/sankhyablocks/{p-814d99ec.entry.js → p-60dd1d27.entry.js} +1 -1
  201. package/dist/sankhyablocks/{p-bd7ccf60.entry.js → p-65c5d430.entry.js} +1 -1
  202. package/dist/sankhyablocks/{p-21a81901.entry.js → p-667cab42.entry.js} +1 -1
  203. package/dist/sankhyablocks/{p-a9813a81.entry.js → p-71a05822.entry.js} +1 -1
  204. package/dist/sankhyablocks/{p-ac8d1cd6.entry.js → p-7345782c.entry.js} +1 -1
  205. package/dist/sankhyablocks/{p-885802c3.js → p-763b04fa.js} +1 -1
  206. package/dist/sankhyablocks/{p-d07b18a4.js → p-7de79adf.js} +1 -1
  207. package/dist/sankhyablocks/p-7e250432.entry.js +1 -0
  208. package/dist/sankhyablocks/{p-47178038.entry.js → p-83c100f2.entry.js} +1 -1
  209. package/dist/sankhyablocks/p-86bd4478.entry.js +1 -0
  210. package/dist/sankhyablocks/p-9019a32f.js +1 -0
  211. package/dist/sankhyablocks/{p-70da6817.entry.js → p-90805683.entry.js} +1 -1
  212. package/dist/sankhyablocks/{p-c2e468c9.entry.js → p-91a9abb6.entry.js} +1 -1
  213. package/dist/sankhyablocks/p-9751c42f.entry.js +1 -0
  214. package/dist/sankhyablocks/{p-16a1dd18.entry.js → p-9a63f3f7.entry.js} +1 -1
  215. package/dist/sankhyablocks/{p-90684a75.entry.js → p-9ad3557c.entry.js} +1 -1
  216. package/dist/sankhyablocks/{p-b6200d32.entry.js → p-9fd87bfd.entry.js} +1 -1
  217. package/dist/sankhyablocks/p-a06bf7b9.entry.js +1 -0
  218. package/dist/sankhyablocks/{p-33718dfc.entry.js → p-a227b650.entry.js} +1 -1
  219. package/dist/sankhyablocks/p-a349689a.js +1 -0
  220. package/dist/sankhyablocks/{p-13a0ead0.entry.js → p-a5bb2f93.entry.js} +1 -1
  221. package/dist/sankhyablocks/{p-088d7e7b.js → p-a6513fcb.js} +1 -1
  222. package/dist/sankhyablocks/{p-8c235d4c.entry.js → p-a76e6d51.entry.js} +1 -1
  223. package/dist/sankhyablocks/{p-ce94e6c4.entry.js → p-bd665460.entry.js} +1 -1
  224. package/dist/sankhyablocks/p-c3324d79.entry.js +1 -0
  225. package/dist/sankhyablocks/{p-bf2acf72.entry.js → p-c6a8a8bc.entry.js} +1 -1
  226. package/dist/sankhyablocks/{p-043bef5f.entry.js → p-c926cf6b.entry.js} +1 -1
  227. package/dist/sankhyablocks/{p-79f823f3.entry.js → p-d67526b6.entry.js} +1 -1
  228. package/dist/sankhyablocks/{p-d2d301a6.js → p-d8d8169b.js} +1 -1
  229. package/dist/sankhyablocks/{p-5f157b09.entry.js → p-dff65083.entry.js} +1 -1
  230. package/dist/sankhyablocks/{p-ab12216c.entry.js → p-e2988bb1.entry.js} +1 -1
  231. package/dist/sankhyablocks/{p-6a5f061b.entry.js → p-e3521eae.entry.js} +1 -1
  232. package/dist/sankhyablocks/{p-34f7a3ab.entry.js → p-e7cccc45.entry.js} +1 -1
  233. package/dist/sankhyablocks/{p-1f80174b.entry.js → p-f4e31122.entry.js} +1 -1
  234. package/dist/sankhyablocks/{p-c7492861.js → p-fc0b609e.js} +1 -1
  235. package/dist/sankhyablocks/{p-a14a09c3.entry.js → p-ff7060bc.entry.js} +1 -1
  236. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  237. package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +31 -0
  238. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +3 -3
  239. package/dist/types/components/snk-form-config/config-header/config-header.d.ts +23 -0
  240. package/dist/types/components/snk-form-config/config-header/configs-button/configs-button.d.ts +19 -0
  241. package/dist/types/components/snk-form-config/field-item/field-config/field-config.d.ts +56 -0
  242. package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +63 -0
  243. package/dist/types/components/snk-form-config/fields-selector/fields-selector.d.ts +18 -0
  244. package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +42 -0
  245. package/dist/types/components/snk-form-config/snk-form-config.d.ts +51 -120
  246. package/dist/types/components.d.ts +197 -199
  247. package/dist/types/lib/utils/constants.d.ts +6 -0
  248. package/package.json +4 -2
  249. package/react/components.d.ts +7 -3
  250. package/react/components.js +7 -3
  251. package/react/components.js.map +1 -1
  252. package/dist/cjs/Sortable-fb1c4cbb.js +0 -2853
  253. package/dist/cjs/snk-config-options_3.cjs.entry.js +0 -1390
  254. package/dist/cjs/snk-field-config.cjs.entry.js +0 -60
  255. package/dist/cjs/snk-tab-config.cjs.entry.js +0 -332
  256. package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.css +0 -16
  257. package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js +0 -346
  258. package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.css +0 -219
  259. package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.js +0 -184
  260. package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.css +0 -323
  261. package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js +0 -527
  262. package/dist/components/snk-config-options.js +0 -6
  263. package/dist/components/snk-config-options2.js +0 -257
  264. package/dist/components/snk-field-config.js +0 -6
  265. package/dist/components/snk-field-config2.js +0 -76
  266. package/dist/components/snk-tab-config.js +0 -6
  267. package/dist/components/snk-tab-config2.js +0 -3202
  268. package/dist/esm/Sortable-83960219.js +0 -2851
  269. package/dist/esm/snk-config-options_3.entry.js +0 -1384
  270. package/dist/esm/snk-field-config.entry.js +0 -56
  271. package/dist/esm/snk-tab-config.entry.js +0 -328
  272. package/dist/sankhyablocks/p-3749dffb.entry.js +0 -1
  273. package/dist/sankhyablocks/p-6dc031de.js +0 -1
  274. package/dist/sankhyablocks/p-79b3cccc.js +0 -1
  275. package/dist/sankhyablocks/p-9261d8a0.js +0 -1
  276. package/dist/sankhyablocks/p-c0eb761b.entry.js +0 -1
  277. package/dist/sankhyablocks/p-d257ff20.entry.js +0 -1
  278. package/dist/sankhyablocks/p-e3c71e43.entry.js +0 -1
  279. package/dist/sankhyablocks/p-fa816fb2.js +0 -1
  280. package/dist/types/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.d.ts +0 -57
  281. package/dist/types/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.d.ts +0 -43
  282. package/dist/types/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -105
@@ -0,0 +1,146 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import Sortable from 'sortablejs';
3
+ import { ID_AVAILABLE_FIELDS } from '../FormConfigHelper';
4
+ import { ArrayUtils } from '@sankhyalabs/core';
5
+ export class FieldsSelector {
6
+ constructor() {
7
+ this.availableFields = [];
8
+ this.dataUnit = undefined;
9
+ this.filterTerm = '';
10
+ }
11
+ onAddField(evt) {
12
+ const newIndex = evt.newIndex;
13
+ const item = evt.item;
14
+ const fieldConfig = item.fieldConfig;
15
+ const updatedFields = this.addItemInPosition(newIndex, fieldConfig);
16
+ this.fieldListChanged.emit(updatedFields);
17
+ }
18
+ addItemInPosition(newIndex, fieldConfig) {
19
+ return [
20
+ ...this.availableFields.slice(0, newIndex),
21
+ fieldConfig,
22
+ ...this.availableFields.slice(newIndex),
23
+ ];
24
+ }
25
+ onRemoveField(evt) {
26
+ const item = evt.item;
27
+ const fieldName = item.fieldConfig.name;
28
+ const updatedFields = [...this.availableFields.filter(f => f.name !== fieldName)];
29
+ this.fieldListChanged.emit(updatedFields);
30
+ requestAnimationFrame(() => item.remove());
31
+ return;
32
+ }
33
+ renderFields() {
34
+ const fieldsToShow = ArrayUtils.applyStringFilter(this.filterTerm, this.availableFields);
35
+ return fieldsToShow.map(field => (h("field-item", { key: field.name, dataUnit: this.dataUnit, fieldConfig: field })));
36
+ }
37
+ getCountText() {
38
+ if (!this.availableFields.length)
39
+ return 'Nenhum campo disponível';
40
+ if (this.availableFields.length === 1)
41
+ return '1 campo disponível';
42
+ return `${this.availableFields.length} campos disponíveis`;
43
+ }
44
+ initializeDraggableContainer() {
45
+ new Sortable(this.el.querySelector(`#${ID_AVAILABLE_FIELDS}`), {
46
+ group: 'fields',
47
+ direction: 'vertical',
48
+ ghostClass: 'ghost',
49
+ animation: 15,
50
+ onAdd: (evt) => this.onAddField(evt),
51
+ onRemove: (evt) => this.onRemoveField(evt),
52
+ });
53
+ }
54
+ componentDidRender() {
55
+ this.initializeDraggableContainer();
56
+ }
57
+ render() {
58
+ return (h(Host, { class: 'ez-col ez-col--sd-4 ez-col--tb-4 ez-padding--medium' }, h("span", { class: 'fields-label ez-padding-bottom--small' }, "Campos dispon\u00EDveis"), h("ez-filter-input", { slot: "content", mode: "slim", label: "Buscar campo", onEzChange: evt => this.filterTerm = evt.detail }), h("span", { class: 'fields-count' }, this.getCountText()), h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { id: ID_AVAILABLE_FIELDS, class: 'fields-container' }, this.renderFields()))));
59
+ }
60
+ static get is() { return "fields-selector"; }
61
+ static get encapsulation() { return "scoped"; }
62
+ static get originalStyleUrls() {
63
+ return {
64
+ "$": ["fields-selector.css"]
65
+ };
66
+ }
67
+ static get styleUrls() {
68
+ return {
69
+ "$": ["fields-selector.css"]
70
+ };
71
+ }
72
+ static get properties() {
73
+ return {
74
+ "availableFields": {
75
+ "type": "unknown",
76
+ "mutable": false,
77
+ "complexType": {
78
+ "original": "IFieldConfig[]",
79
+ "resolved": "IFieldConfig[]",
80
+ "references": {
81
+ "IFieldConfig": {
82
+ "location": "import",
83
+ "path": "@sankhyalabs/ezui/src/utils/interfaces/IFieldConfig"
84
+ }
85
+ }
86
+ },
87
+ "required": false,
88
+ "optional": false,
89
+ "docs": {
90
+ "tags": [],
91
+ "text": ""
92
+ },
93
+ "defaultValue": "[]"
94
+ },
95
+ "dataUnit": {
96
+ "type": "unknown",
97
+ "mutable": false,
98
+ "complexType": {
99
+ "original": "DataUnit",
100
+ "resolved": "DataUnit",
101
+ "references": {
102
+ "DataUnit": {
103
+ "location": "import",
104
+ "path": "@sankhyalabs/core"
105
+ }
106
+ }
107
+ },
108
+ "required": false,
109
+ "optional": true,
110
+ "docs": {
111
+ "tags": [],
112
+ "text": ""
113
+ }
114
+ }
115
+ };
116
+ }
117
+ static get states() {
118
+ return {
119
+ "filterTerm": {}
120
+ };
121
+ }
122
+ static get events() {
123
+ return [{
124
+ "method": "fieldListChanged",
125
+ "name": "fieldListChanged",
126
+ "bubbles": true,
127
+ "cancelable": true,
128
+ "composed": true,
129
+ "docs": {
130
+ "tags": [],
131
+ "text": ""
132
+ },
133
+ "complexType": {
134
+ "original": "IFieldConfig[]",
135
+ "resolved": "IFieldConfig[]",
136
+ "references": {
137
+ "IFieldConfig": {
138
+ "location": "import",
139
+ "path": "@sankhyalabs/ezui/src/utils/interfaces/IFieldConfig"
140
+ }
141
+ }
142
+ }
143
+ }];
144
+ }
145
+ static get elementRef() { return "el"; }
146
+ }
@@ -0,0 +1,132 @@
1
+ .ezSidebarNavigator {
2
+ --ez-sidebar-navigator--height: calc(100vh - 118px);
3
+ }
4
+
5
+ .navigator-container {
6
+ height: calc(100vh - 175px);
7
+ display: flex;
8
+ flex-direction: column;
9
+ justify-content: space-between;
10
+ }
11
+
12
+
13
+ .collapsible-container {
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: 12px;
17
+ flex-grow: 1;
18
+ max-height: calc(100vh - 240px);
19
+ overflow: auto;
20
+ }
21
+
22
+ .collapsible-item {
23
+ padding: 6px;
24
+ border-radius: 6px;
25
+ border: 1px solid #dce0e8; /*Usar token*/
26
+ }
27
+
28
+ .add-button-container {
29
+ display: flex;
30
+ align-items: center;
31
+ border-top: 1px solid #dce0e8;
32
+ padding-top: 22px;
33
+ gap: 6px;
34
+ cursor: pointer;
35
+ justify-content: center;
36
+ }
37
+
38
+ .add-button-container span {
39
+ display: block;
40
+ }
41
+
42
+
43
+ .guide-list {
44
+ display: flex;
45
+ flex-direction: column;
46
+ width: 100%;
47
+ min-height: 10px;
48
+ }
49
+
50
+ .guide-list.hidden-empty-content::before {
51
+ content: "Nenhuma guia oculta";
52
+ display: block;
53
+ font-size: 16px;
54
+ font-weight: 400;
55
+ color: #AFB6C0;
56
+ margin: auto;
57
+ padding: 8px;
58
+ }
59
+
60
+ .guide-list.visible-empty-content::before {
61
+ content: "Nenhuma guia visível";
62
+ display: block;
63
+ font-size: 16px;
64
+ font-weight: 400;
65
+ color: #AFB6C0;
66
+ margin: auto;
67
+ padding: 8px;
68
+ }
69
+
70
+ .item-label {
71
+ display: block;
72
+ white-space: nowrap;
73
+ overflow: hidden;
74
+ text-overflow: ellipsis;
75
+ flex-grow: 1;
76
+ }
77
+
78
+ .guide-item {
79
+ margin: 0 3px;
80
+ display: flex;
81
+ flex-direction: row;
82
+ align-items: center;
83
+ justify-content: space-between;
84
+ padding: 5px 10px;
85
+ border-radius: 6px;
86
+ transition: all 0.2s ease-in-out;
87
+ height: 32px;
88
+ }
89
+
90
+
91
+ .guide-item .actions {
92
+ display: flex;
93
+ gap: 8px;
94
+ transition: 0.2s ease-in-out;
95
+ visibility: hidden;
96
+ opacity: 0;
97
+ }
98
+
99
+ .guide-item:hover .actions {
100
+ visibility: visible;
101
+ opacity: 1;
102
+ }
103
+
104
+ ez-button {
105
+ width: 24px;
106
+ align-items: center;
107
+ justify-content: center;
108
+ display: flex;
109
+ }
110
+
111
+ .ghost {
112
+ opacity: .5;
113
+ background: #e2eaf4;
114
+ }
115
+
116
+ .main-guide {
117
+ padding: 12px;
118
+ margin: 12px 0;
119
+ border: 1px solid #dce0e8;
120
+ border-radius: 6px;
121
+ transition: all 0.2s ease-in-out;
122
+ }
123
+
124
+ .guide-item.selected,
125
+ .main-guide.selected {
126
+ background: #E2F4EF;
127
+ }
128
+
129
+ .guide-item:hover,
130
+ .main-guide:hover {
131
+ background: #f5fcfa;
132
+ }
@@ -0,0 +1,317 @@
1
+ import { h } from '@stencil/core';
2
+ import Sortable from 'sortablejs';
3
+ import { ArrayUtils, ObjectUtils } from '@sankhyalabs/core';
4
+ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
5
+ import { TAB_NAMES } from '../../../lib/utils/constants';
6
+ export class GuidesConfigurator {
7
+ constructor() {
8
+ this.ID_VISIBLE_GUIDES = 'container-visible-guides';
9
+ this.ID_HIDDEN_GUIDES = 'container-hidden-guides';
10
+ this.sortLogic = (a, b) => {
11
+ var _a, _b;
12
+ const orderA = (_a = a.order) !== null && _a !== void 0 ? _a : Number.MAX_VALUE;
13
+ const orderB = (_b = b.order) !== null && _b !== void 0 ? _b : Number.MAX_VALUE;
14
+ return orderA - orderB;
15
+ };
16
+ this.mainGuide = undefined;
17
+ this.filterTerm = '';
18
+ this.visibleGuides = [];
19
+ this.hiddenGuides = [];
20
+ this.guidesList = [];
21
+ this.selectedGuide = undefined;
22
+ this.messagesBuilder = undefined;
23
+ }
24
+ observeVisibleGuides(newGuides) {
25
+ this.initGuidesConfig(newGuides);
26
+ }
27
+ observeSelectedGuide(newGuide) {
28
+ this.guideSelected.emit(newGuide);
29
+ }
30
+ getMessage(key, params) {
31
+ return this.messagesBuilder.getMessage(key, params);
32
+ }
33
+ initGuidesConfig(newGuides) {
34
+ const visibleAux = [...newGuides.filter(guide => (guide.visible && guide.name !== TAB_NAMES.main))];
35
+ const hiddenAux = [...newGuides.filter(guide => (!guide.visible && guide.name !== TAB_NAMES.main))];
36
+ this.visibleGuides = [...visibleAux.sort(this.sortLogic)];
37
+ this.hiddenGuides = [...hiddenAux.sort(this.sortLogic)];
38
+ this.mainGuide = newGuides.find(g => g.name === TAB_NAMES.main);
39
+ }
40
+ handleAddGuide() {
41
+ this.createNewGuide.emit();
42
+ }
43
+ handleSelectGuide(guide, evt) {
44
+ evt.stopPropagation();
45
+ this.selectedGuide = guide;
46
+ }
47
+ toggleGuideVisibility(guide, evt) {
48
+ evt.stopPropagation();
49
+ const updatedGuide = Object.assign(Object.assign({}, guide), { visible: !guide.visible });
50
+ let visibleAux;
51
+ let hiddenAux;
52
+ if (guide.visible) {
53
+ visibleAux = [...this.visibleGuides.filter(g => g.name !== guide.name)];
54
+ hiddenAux = [...this.hiddenGuides, updatedGuide];
55
+ }
56
+ else {
57
+ visibleAux = [...this.visibleGuides, updatedGuide];
58
+ hiddenAux = [...this.hiddenGuides.filter(g => g.name !== guide.name)];
59
+ }
60
+ const updatedGuideList = [...visibleAux, ...hiddenAux];
61
+ this.applyGuidesUpdate(updatedGuideList);
62
+ }
63
+ adjustListOrder(guideList) {
64
+ return guideList.map((g, index) => {
65
+ return Object.assign(Object.assign({}, g), { order: index });
66
+ });
67
+ }
68
+ applyGuidesUpdate(updatedGuideList) {
69
+ let newGuidesList = this.adjustListOrder(updatedGuideList);
70
+ newGuidesList = [this.mainGuide, ...newGuidesList];
71
+ if (!ObjectUtils.equals(newGuidesList, this.guidesList)) {
72
+ this.guideListChanged.emit(newGuidesList);
73
+ }
74
+ }
75
+ async handleDeleteGuide(guide, e) {
76
+ e.stopPropagation();
77
+ const title = this.getMessage('snkFormConfig.confirm.title');
78
+ const message = this.getMessage('snkFormConfig.confirm.deleteGuide').replace('{0}', guide.label);
79
+ const canRemove = await ApplicationUtils.confirm(title, message);
80
+ if (!canRemove)
81
+ return;
82
+ this.guideDeleted.emit(guide);
83
+ const deletedMessage = this.getMessage('snkFormConfig.info.successfullyGuideDeleted').replace('{0}', guide.label);
84
+ ApplicationUtils.info(deletedMessage);
85
+ }
86
+ renderItems(guides) {
87
+ const guidesToShow = ArrayUtils.applyStringFilter(this.filterTerm, guides);
88
+ return guidesToShow.map(guide => {
89
+ var _a;
90
+ return (h("div", { key: guide.name, "data-guide-name": guide.name, title: guide.label, class: `guide-item ${((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.label) === guide.label ? 'selected' : ''} ${this.filterTerm.length ? 'disable-sort' : ''}`, onClick: e => this.handleSelectGuide(guide, e) }, h("span", null, h("ez-icon", { iconName: "drag-indicator", class: 'ez-margin-right--small' })), h("span", { class: 'item-label' }, guide.label), h("div", { class: 'actions' }, h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.toggleGuideVisibility(guide, e), size: "medium", iconName: guide.visible ? 'eye-off' : 'eye', title: guide.visible ? 'Ocultar' : 'Tornar visível' }), h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.handleDeleteGuide(guide, e), size: "medium", iconName: 'delete', title: 'Excluir' }))));
91
+ });
92
+ }
93
+ getContainerElement(id) {
94
+ return this.el.querySelector(`[id="${id}"]`);
95
+ }
96
+ handleSortGuide() {
97
+ const updatedGuideList = [...this.getGuidesFromStatus(true), ...this.getGuidesFromStatus(false)];
98
+ this.applyGuidesUpdate(updatedGuideList);
99
+ }
100
+ getGuidesFromStatus(visible) {
101
+ let updatedGuideList = [];
102
+ const orderedGuides = this.getOrderedGuideNames(visible ? this.ID_VISIBLE_GUIDES : this.ID_HIDDEN_GUIDES);
103
+ orderedGuides.forEach(guideName => {
104
+ const updatedGuide = this.guidesList.find(g => g.name === guideName);
105
+ if (updatedGuide) {
106
+ updatedGuideList.push(Object.assign(Object.assign({}, updatedGuide), { visible }));
107
+ }
108
+ });
109
+ return updatedGuideList;
110
+ }
111
+ getOrderedGuideNames(containerId) {
112
+ var _a;
113
+ const guidesCollection = (_a = this.getContainerElement(containerId)) === null || _a === void 0 ? void 0 : _a.children;
114
+ return Array.from(guidesCollection).map((element) => element.getAttribute('data-guide-name'));
115
+ }
116
+ initializeDraggableContainers() {
117
+ this._sortableVisibleGuides = new Sortable(this.getContainerElement(this.ID_VISIBLE_GUIDES), {
118
+ group: 'guides',
119
+ ghostClass: 'ghost',
120
+ direction: 'vertical',
121
+ filter: '.disable-sort',
122
+ animation: 15,
123
+ onSort: () => this.handleSortGuide(),
124
+ });
125
+ this._sortableInvisibleGuides = new Sortable(this.getContainerElement(this.ID_HIDDEN_GUIDES), {
126
+ group: 'guides',
127
+ ghostClass: 'ghost',
128
+ animation: 15,
129
+ filter: '.disable-sort',
130
+ onSort: () => this.handleSortGuide(),
131
+ });
132
+ }
133
+ handleSelectMainGuide() {
134
+ this.guideSelected.emit(this.mainGuide);
135
+ }
136
+ componentDidLoad() {
137
+ this.initializeDraggableContainers();
138
+ this.initGuidesConfig(this.guidesList);
139
+ }
140
+ render() {
141
+ var _a, _b, _c;
142
+ return (h("ez-sidebar-navigator", { class: 'ezSidebarNavigator', type: 'fixed', size: 'md', titleMenu: 'Guias' }, h("div", { class: 'navigator-container' }, h("ez-filter-input", { slot: "content", mode: "slim", label: "Buscar guia", onEzChange: evt => this.filterTerm = evt.detail }), h("div", { onClick: this.handleSelectMainGuide.bind(this), class: `main-guide ${((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.name) === ((_b = this.mainGuide) === null || _b === void 0 ? void 0 : _b.name) ? 'selected' : ''}` }, h("span", null, (_c = this.mainGuide) === null || _c === void 0 ? void 0 : _c.label)), h("div", { class: 'collapsible-container' }, h("div", { class: 'collapsible-item' }, h("ez-collapsible-box", { label: "Guias vis\u00EDveis", headerSize: "large" }, h("div", { id: this.ID_VISIBLE_GUIDES, class: `guide-list ${!this.visibleGuides.length ? 'visible-empty-content' : ''}` }, this.renderItems(this.visibleGuides)))), h("div", { class: 'collapsible-item' }, h("ez-collapsible-box", { label: "Guias ocultas", headerSize: "large" }, h("div", { id: this.ID_HIDDEN_GUIDES, class: `guide-list ${!this.hiddenGuides.length ? 'hidden-empty-content' : ''}` }, this.renderItems(this.hiddenGuides))))), h("div", { class: 'add-button-container', onClick: this.handleAddGuide.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus" }), h("span", null, "Criar nova guia")))));
143
+ }
144
+ static get is() { return "guides-configurator"; }
145
+ static get encapsulation() { return "scoped"; }
146
+ static get originalStyleUrls() {
147
+ return {
148
+ "$": ["guides-configurator.css"]
149
+ };
150
+ }
151
+ static get styleUrls() {
152
+ return {
153
+ "$": ["guides-configurator.css"]
154
+ };
155
+ }
156
+ static get properties() {
157
+ return {
158
+ "guidesList": {
159
+ "type": "unknown",
160
+ "mutable": false,
161
+ "complexType": {
162
+ "original": "IGuideConfig[]",
163
+ "resolved": "IGuideConfig[]",
164
+ "references": {
165
+ "IGuideConfig": {
166
+ "location": "import",
167
+ "path": "../FormConfigHelper"
168
+ }
169
+ }
170
+ },
171
+ "required": false,
172
+ "optional": false,
173
+ "docs": {
174
+ "tags": [],
175
+ "text": ""
176
+ },
177
+ "defaultValue": "[]"
178
+ },
179
+ "selectedGuide": {
180
+ "type": "unknown",
181
+ "mutable": false,
182
+ "complexType": {
183
+ "original": "IGuideConfig",
184
+ "resolved": "IGuideConfig",
185
+ "references": {
186
+ "IGuideConfig": {
187
+ "location": "import",
188
+ "path": "../FormConfigHelper"
189
+ }
190
+ }
191
+ },
192
+ "required": false,
193
+ "optional": false,
194
+ "docs": {
195
+ "tags": [],
196
+ "text": ""
197
+ }
198
+ },
199
+ "messagesBuilder": {
200
+ "type": "unknown",
201
+ "mutable": true,
202
+ "complexType": {
203
+ "original": "SnkMessageBuilder",
204
+ "resolved": "SnkMessageBuilder",
205
+ "references": {
206
+ "SnkMessageBuilder": {
207
+ "location": "import",
208
+ "path": "../../../lib/message/SnkMessageBuilder"
209
+ }
210
+ }
211
+ },
212
+ "required": false,
213
+ "optional": false,
214
+ "docs": {
215
+ "tags": [],
216
+ "text": ""
217
+ }
218
+ }
219
+ };
220
+ }
221
+ static get states() {
222
+ return {
223
+ "mainGuide": {},
224
+ "filterTerm": {},
225
+ "visibleGuides": {},
226
+ "hiddenGuides": {}
227
+ };
228
+ }
229
+ static get events() {
230
+ return [{
231
+ "method": "guideSelected",
232
+ "name": "guideSelected",
233
+ "bubbles": true,
234
+ "cancelable": true,
235
+ "composed": true,
236
+ "docs": {
237
+ "tags": [],
238
+ "text": ""
239
+ },
240
+ "complexType": {
241
+ "original": "IGuideConfig",
242
+ "resolved": "IGuideConfig",
243
+ "references": {
244
+ "IGuideConfig": {
245
+ "location": "import",
246
+ "path": "../FormConfigHelper"
247
+ }
248
+ }
249
+ }
250
+ }, {
251
+ "method": "guideListChanged",
252
+ "name": "guideListChanged",
253
+ "bubbles": true,
254
+ "cancelable": true,
255
+ "composed": true,
256
+ "docs": {
257
+ "tags": [],
258
+ "text": ""
259
+ },
260
+ "complexType": {
261
+ "original": "IGuideConfig[]",
262
+ "resolved": "IGuideConfig[]",
263
+ "references": {
264
+ "IGuideConfig": {
265
+ "location": "import",
266
+ "path": "../FormConfigHelper"
267
+ }
268
+ }
269
+ }
270
+ }, {
271
+ "method": "guideDeleted",
272
+ "name": "guideDeleted",
273
+ "bubbles": true,
274
+ "cancelable": true,
275
+ "composed": true,
276
+ "docs": {
277
+ "tags": [],
278
+ "text": ""
279
+ },
280
+ "complexType": {
281
+ "original": "IGuideConfig",
282
+ "resolved": "IGuideConfig",
283
+ "references": {
284
+ "IGuideConfig": {
285
+ "location": "import",
286
+ "path": "../FormConfigHelper"
287
+ }
288
+ }
289
+ }
290
+ }, {
291
+ "method": "createNewGuide",
292
+ "name": "createNewGuide",
293
+ "bubbles": true,
294
+ "cancelable": true,
295
+ "composed": true,
296
+ "docs": {
297
+ "tags": [],
298
+ "text": ""
299
+ },
300
+ "complexType": {
301
+ "original": "void",
302
+ "resolved": "void",
303
+ "references": {}
304
+ }
305
+ }];
306
+ }
307
+ static get elementRef() { return "el"; }
308
+ static get watchers() {
309
+ return [{
310
+ "propName": "guidesList",
311
+ "methodName": "observeVisibleGuides"
312
+ }, {
313
+ "propName": "selectedGuide",
314
+ "methodName": "observeSelectedGuide"
315
+ }];
316
+ }
317
+ }