@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
@@ -1,527 +0,0 @@
1
- import { h, Host, Fragment } from "@stencil/core";
2
- import { Sortable } from '@shopify/draggable';
3
- import { ApplicationContext, ElementIDUtils } from "@sankhyalabs/core";
4
- import { CONFIG_EVENTS, CONFIG_SORTABLE_EVENTS, KEY_EVENTS, TAB_NAMES, TYPE_ACTIONS } from "../../../../lib/utils/constants";
5
- export class SnkTabConfig {
6
- constructor() {
7
- this._refTabActions = [];
8
- this._processedTabs = undefined;
9
- this._activeEditText = undefined;
10
- this._activeEditTextIndex = undefined;
11
- this._actionsHide = [];
12
- this._actionsShow = [];
13
- this.selectedIndex = undefined;
14
- this.selectedTab = undefined;
15
- this.tabs = undefined;
16
- this.tabItems = undefined;
17
- this.messagesBuilder = undefined;
18
- }
19
- /**
20
- * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
21
- * através de um pequeno modulo na estrutura da aplicação:
22
- * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
23
- * Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-form.msg.ts"
24
- */
25
- getMessage(key, params) {
26
- return this.messagesBuilder.getMessage(key, params);
27
- }
28
- controlSortableTab() {
29
- if (this._sortableTab) {
30
- this._sortableTab.destroy();
31
- }
32
- this._sortableTab = new Sortable(this._hostElem.querySelectorAll('[data-draggable-parent="tab"]'), {
33
- draggable: '[data-draggable-element="tab"]',
34
- mirror: {
35
- constrainDimensions: true
36
- },
37
- distance: CONFIG_EVENTS.dragStartDistance
38
- });
39
- this._sortableTab.on(CONFIG_SORTABLE_EVENTS.dragStart, (evt) => this.controlStartDraggingTab(evt));
40
- this._sortableTab.on(CONFIG_SORTABLE_EVENTS.dragStop, (evt) => this.controlStopDraggingTab(evt));
41
- }
42
- controlStartDraggingTab(evt) {
43
- var _a, _b;
44
- const mouseEvent = (_a = evt === null || evt === void 0 ? void 0 : evt.dragEvent) === null || _a === void 0 ? void 0 : _a.originalEvent;
45
- const targetElement = mouseEvent === null || mouseEvent === void 0 ? void 0 : mouseEvent.target;
46
- const targetName = (_b = targetElement === null || targetElement === void 0 ? void 0 : targetElement.tagName) === null || _b === void 0 ? void 0 : _b.toUpperCase();
47
- if (this._activeEditText === true || targetName === "EZ-ACTIONS-BUTTON") {
48
- evt === null || evt === void 0 ? void 0 : evt.cancel();
49
- }
50
- else {
51
- this.canStartDrag.emit();
52
- }
53
- }
54
- controlStopDraggingTab(evt) {
55
- const updateTimer = 500;
56
- if (evt.data.newIndex !== evt.data.oldIndex) {
57
- setTimeout(() => {
58
- const newIndex = (evt.data.newIndex || 0) + 1;
59
- this.ezOrderChange.emit(newIndex);
60
- }, updateTimer);
61
- }
62
- }
63
- handleTabClick(tab) {
64
- this.selectedIndex = tab.index;
65
- this._focusedIndex = tab.index;
66
- this.selectedTab = tab.tabKey;
67
- this.ezTabChange.emit(tab);
68
- this.setFocusedBtn(false, tab.index);
69
- this.setFocusedTab(tab.index);
70
- }
71
- handleSlotChange(ev) {
72
- const slot = ev.target;
73
- const content = slot.assignedElements()[0];
74
- if (content) {
75
- content.classList.add("tab-config__slot");
76
- }
77
- }
78
- scrollBackward() {
79
- const container = this._scrollContainer;
80
- if (container) {
81
- container.scrollLeft -= container.clientWidth;
82
- }
83
- }
84
- scrollFoward() {
85
- const container = this._scrollContainer;
86
- if (container) {
87
- let lastTab = null;
88
- container.querySelectorAll(".tab-config__tab").forEach((tab) => {
89
- if (tab.getBoundingClientRect().right < container.clientWidth) {
90
- lastTab = tab;
91
- }
92
- });
93
- container.scrollLeft = lastTab.offsetLeft + lastTab.offsetWidth;
94
- }
95
- }
96
- updateScroll() {
97
- const container = this._scrollContainer;
98
- if (container) {
99
- const { scrollWidth, clientWidth, scrollLeft } = container;
100
- const remainingScroll = scrollWidth - clientWidth - Math.ceil(scrollLeft);
101
- this._startHidden = container.scrollLeft > 0;
102
- this._endHidden = remainingScroll > 0;
103
- if (this._startHidden) {
104
- this._backwardButton.classList.remove("tab-config__hidden");
105
- }
106
- else {
107
- this._backwardButton.classList.add("tab-config__hidden");
108
- }
109
- if (this._endHidden) {
110
- this._forwardButton.classList.remove("tab-config__hidden");
111
- }
112
- else {
113
- this._forwardButton.classList.add("tab-config__hidden");
114
- }
115
- }
116
- }
117
- domScrollHandler() {
118
- window.clearTimeout(this._scrollCallBackScroll);
119
- this._scrollCallBackScroll = window.setTimeout(() => { this.updateScroll(); }, 200);
120
- }
121
- setFocusedTab(index) {
122
- window.clearTimeout(this._scrollCallBackFocus);
123
- this._scrollCallBackFocus = window.setTimeout(() => {
124
- const tabtoscroll = this._scrollContainer.querySelector(`#tab${index}`);
125
- tabtoscroll === null || tabtoscroll === void 0 ? void 0 : tabtoscroll.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
126
- }, 200);
127
- }
128
- controlKeyEventEnter(evt) {
129
- evt.preventDefault();
130
- const selectedTab = this._processedTabs[this._focusedIndex];
131
- this.handleTabClick(selectedTab);
132
- this.setFocusedTab(selectedTab.index);
133
- }
134
- controlKeyEventArrow(evt) {
135
- let operator = undefined;
136
- if (evt.key === KEY_EVENTS.arrowLeft) {
137
- operator = false;
138
- }
139
- else if (evt.key === KEY_EVENTS.arrowRight) {
140
- operator = true;
141
- }
142
- else {
143
- return;
144
- }
145
- if (this._focusedIndex === undefined) {
146
- if (operator === false) {
147
- this._focusedIndex = this.selectedIndex !== undefined ? this.selectedIndex - 1 : undefined;
148
- }
149
- else {
150
- this._focusedIndex = this.selectedIndex !== undefined ? this.selectedIndex + 1 : undefined;
151
- }
152
- }
153
- else {
154
- if (operator === false) {
155
- this._focusedIndex = this._focusedIndex - 1;
156
- }
157
- else {
158
- this._focusedIndex = this._focusedIndex + 1;
159
- }
160
- }
161
- if (this._focusedIndex < 0) {
162
- this._focusedIndex = 0;
163
- }
164
- else if (this._focusedIndex > this._processedTabs.length - 1) {
165
- this._focusedIndex = this._processedTabs.length - 1;
166
- }
167
- this.setFocusedBtn(true, this._focusedIndex);
168
- this.setFocusedTab(this._focusedIndex);
169
- }
170
- controlKeyEventEscape(evt) {
171
- evt.preventDefault();
172
- const currentTab = this._processedTabs[this.selectedIndex];
173
- this._focusedIndex = undefined;
174
- this.handleTabClick(currentTab);
175
- this.setFocusedTab(this.selectedIndex);
176
- }
177
- setFocusedParam(evt) {
178
- if (this._activeEditText === true || evt == undefined) {
179
- return;
180
- }
181
- if (evt.key === KEY_EVENTS.enter) {
182
- this.controlKeyEventEnter(evt);
183
- return;
184
- }
185
- if (evt.key === KEY_EVENTS.arrowLeft || evt.key === KEY_EVENTS.arrowRight) {
186
- this.controlKeyEventArrow(evt);
187
- return;
188
- }
189
- if (evt.key === KEY_EVENTS.tab || evt.key === KEY_EVENTS.escape) {
190
- this.controlKeyEventEscape(evt);
191
- return;
192
- }
193
- }
194
- setFocusedBtn(visible, parameter) {
195
- const tabsButtons = this._scrollContainer.querySelectorAll(".tab-config__tab");
196
- tabsButtons.forEach((el) => {
197
- el.classList.remove("tab-config__tab--is-focused");
198
- if (el.id === "tab" + parameter && visible) {
199
- el.classList.add("tab-config__tab--is-focused");
200
- }
201
- });
202
- }
203
- getStyledLabel(tabId) {
204
- const tabElem = this._hostElem.querySelector(`#${tabId}`);
205
- if (tabElem == undefined) {
206
- return;
207
- }
208
- let styledLabel = {
209
- fontSize: window.getComputedStyle(tabElem).getPropertyValue('font-size'),
210
- fontWeight: window.getComputedStyle(tabElem).getPropertyValue('font-weight'),
211
- fontFamily: window.getComputedStyle(tabElem).getPropertyValue('font-family')
212
- };
213
- return styledLabel;
214
- }
215
- cancelEditText(cancelTextEdition) {
216
- var _a;
217
- cancelTextEdition.stopPropagation();
218
- this._activeEditText = false;
219
- if (this._scrollContainer != undefined) {
220
- (_a = this._scrollContainer.querySelector('.tab-config__tab--is-active')) === null || _a === void 0 ? void 0 : _a.focus();
221
- }
222
- }
223
- handleActions(actionSelect, tab) {
224
- const { value: typeAction } = actionSelect.detail;
225
- if (typeAction === TYPE_ACTIONS.rename) {
226
- this._activeEditText = true;
227
- this._activeEditTextIndex = tab.index;
228
- }
229
- else if (typeAction === TYPE_ACTIONS.hide || typeAction === TYPE_ACTIONS.show) {
230
- this.hideTab.emit(tab);
231
- }
232
- else if (typeAction === TYPE_ACTIONS.delete) {
233
- this.deleteTab.emit(tab);
234
- }
235
- }
236
- handleSaveEditionText(editDetails) {
237
- const { value, newValue } = editDetails.detail;
238
- if (value === newValue) {
239
- this.cancelEditText(editDetails);
240
- return;
241
- }
242
- this._processedTabs.forEach((tab) => {
243
- if (tab.label === value) {
244
- tab.label = newValue;
245
- this.cancelEditText(editDetails);
246
- this.editionTitleTab.emit(editDetails);
247
- }
248
- });
249
- }
250
- onHideActions(index) {
251
- const elementActionsBtn = this._refTabActions[index];
252
- if (elementActionsBtn) {
253
- elementActionsBtn.isOpened().then((isOpened) => {
254
- if (isOpened) {
255
- elementActionsBtn === null || elementActionsBtn === void 0 ? void 0 : elementActionsBtn.hideActions();
256
- }
257
- });
258
- }
259
- }
260
- componentWillLoad() {
261
- this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
262
- if (this._application != undefined) {
263
- this._actionsHide = [
264
- { value: TYPE_ACTIONS.rename, label: this.getMessage("snkTabConfig.labelRename") },
265
- { value: TYPE_ACTIONS.hide, label: this.getMessage("snkTabConfig.labelHide") },
266
- { value: TYPE_ACTIONS.delete, label: this.getMessage("snkTabConfig.labelDelete") }
267
- ];
268
- this._actionsShow = [
269
- { value: TYPE_ACTIONS.rename, label: this.getMessage("snkTabConfig.labelRename") },
270
- { value: TYPE_ACTIONS.show, label: this.getMessage("snkTabConfig.labelShow") },
271
- { value: TYPE_ACTIONS.delete, label: this.getMessage("snkTabConfig.labelDelete") }
272
- ];
273
- }
274
- }
275
- componentWillRender() {
276
- this._processedTabs = [];
277
- if (this.tabs) {
278
- this.tabs.split(",").forEach((label) => {
279
- label = label.trim();
280
- this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
281
- });
282
- }
283
- this.tabItems.forEach((tab) => {
284
- tab.label = tab.label !== TAB_NAMES.main ? tab.label : this.getMessage("snkFormConfig.form.mainArea");
285
- tab.index = this._processedTabs.length;
286
- this._processedTabs.push(tab);
287
- });
288
- }
289
- componentDidRender() {
290
- this.updateScroll();
291
- this.controlSortableTab();
292
- }
293
- componentDidLoad() {
294
- ElementIDUtils.addIDInfo(this._hostElem, "itemConfig");
295
- this._processedTabs.forEach((tab, index) => {
296
- const dataID = { id: tab.label };
297
- ElementIDUtils.addIDInfo(this._hostElem.querySelector(`#tab${index}`), "itemConfig", dataID);
298
- });
299
- }
300
- render() {
301
- return (h(Host, null, h("button", { class: "tab-config__backward-button", ref: (el) => this._backwardButton = el, onClick: () => this.scrollBackward() }), h("div", { class: "tab-config__lower-bar" }), h("div", { class: "tab-config__scroll", ref: (el) => this._scrollContainer = el, onScroll: () => this.domScrollHandler(), onKeyDown: (ev) => this.setFocusedParam(ev), "data-draggable-parent": "tab" }, this._processedTabs.map((tab, index) => {
302
- const tabId = "tab" + index;
303
- const isSelected = index === this.selectedIndex || (this.selectedTab && tab.tabKey === this.selectedTab);
304
- if (isSelected) {
305
- this.selectedTab = tab.tabKey;
306
- this.selectedIndex = index;
307
- }
308
- return h("button", { id: tabId, class: `tab-config__tab${isSelected ? " tab-config__tab--is-active" : ""}`, onClick: () => this.handleTabClick(tab), onDblClick: () => { this._activeEditText = true; this._activeEditTextIndex = index; }, "data-draggable-element": index > 0 ? "tab" : "", onMouseLeave: () => this.onHideActions(index), key: tab.label }, (this._activeEditText === true && this._activeEditTextIndex === index && index > 0) ||
309
- h(Fragment, null, index > 0 && h("ez-icon", { iconName: tab.leftIcon || "drag-indicator", class: "tab-config__left-icon" }), (tab.visible === false && index > 0) && h("ez-icon", { iconName: tab.leftIcon || "eye-off", class: "tab-config__left-icon tab-config__left-icon--eye-off" }), h("span", { class: "tab-config__tab-label" + (tab.visible === false && index > 0 ? " tab-config__tab-label-disabled" : ""), title: tab.label }, tab.label), index > 0 &&
310
- h("ez-actions-button", { class: "tab-config__actions-button", size: "small", ref: elem => this._refTabActions[index] = elem, actions: tab.visible === false ? this._actionsShow : this._actionsHide, isTransparent: true, arrowActive: true, onEzAction: (ev) => this.handleActions(ev, tab) }), h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } })), (this._activeEditText === true && index > 0 && this._activeEditTextIndex === index) &&
311
- h("ez-text-edit", { value: tab.label, styled: this.getStyledLabel(tabId), class: "tab-config__edit-text", onSaveEdition: (ev) => this.handleSaveEditionText(ev), onCancelEdition: (ev) => this.cancelEditText(ev) }));
312
- })), h("button", { class: "tab-config__forward-button", ref: (el) => this._forwardButton = el, onClick: () => this.scrollFoward() })));
313
- }
314
- static get is() { return "snk-tab-config"; }
315
- static get encapsulation() { return "scoped"; }
316
- static get originalStyleUrls() {
317
- return {
318
- "$": ["snk-tab-config.css"]
319
- };
320
- }
321
- static get styleUrls() {
322
- return {
323
- "$": ["snk-tab-config.css"]
324
- };
325
- }
326
- static get properties() {
327
- return {
328
- "selectedIndex": {
329
- "type": "number",
330
- "mutable": true,
331
- "complexType": {
332
- "original": "number",
333
- "resolved": "number",
334
- "references": {}
335
- },
336
- "required": false,
337
- "optional": false,
338
- "docs": {
339
- "tags": [],
340
- "text": "Define o index da aba selecionada."
341
- },
342
- "attribute": "selected-index",
343
- "reflect": true
344
- },
345
- "selectedTab": {
346
- "type": "string",
347
- "mutable": true,
348
- "complexType": {
349
- "original": "string",
350
- "resolved": "string",
351
- "references": {}
352
- },
353
- "required": false,
354
- "optional": false,
355
- "docs": {
356
- "tags": [],
357
- "text": "Define a aba selecionada."
358
- },
359
- "attribute": "selected-tab",
360
- "reflect": true
361
- },
362
- "tabs": {
363
- "type": "string",
364
- "mutable": false,
365
- "complexType": {
366
- "original": "string",
367
- "resolved": "string",
368
- "references": {}
369
- },
370
- "required": false,
371
- "optional": false,
372
- "docs": {
373
- "tags": [],
374
- "text": "Define o nome das abas do componente separadas por v\u00EDrgulas \",\"."
375
- },
376
- "attribute": "tabs",
377
- "reflect": false
378
- },
379
- "tabItems": {
380
- "type": "unknown",
381
- "mutable": false,
382
- "complexType": {
383
- "original": "ITab[]",
384
- "resolved": "ITab[]",
385
- "references": {
386
- "ITab": {
387
- "location": "local"
388
- }
389
- }
390
- },
391
- "required": false,
392
- "optional": false,
393
- "docs": {
394
- "tags": [],
395
- "text": "Define o nome das abas do componente separadas por v\u00EDrgulas \",\"."
396
- }
397
- },
398
- "messagesBuilder": {
399
- "type": "unknown",
400
- "mutable": true,
401
- "complexType": {
402
- "original": "SnkMessageBuilder",
403
- "resolved": "SnkMessageBuilder",
404
- "references": {
405
- "SnkMessageBuilder": {
406
- "location": "import",
407
- "path": "../../../../lib/message/SnkMessageBuilder"
408
- }
409
- }
410
- },
411
- "required": false,
412
- "optional": false,
413
- "docs": {
414
- "tags": [],
415
- "text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
416
- }
417
- }
418
- };
419
- }
420
- static get states() {
421
- return {
422
- "_processedTabs": {},
423
- "_activeEditText": {},
424
- "_activeEditTextIndex": {},
425
- "_actionsHide": {},
426
- "_actionsShow": {}
427
- };
428
- }
429
- static get events() {
430
- return [{
431
- "method": "ezTabChange",
432
- "name": "ezTabChange",
433
- "bubbles": true,
434
- "cancelable": true,
435
- "composed": true,
436
- "docs": {
437
- "tags": [],
438
- "text": "Emitido ao clicar para abrir o popup."
439
- },
440
- "complexType": {
441
- "original": "ITab",
442
- "resolved": "ITab",
443
- "references": {
444
- "ITab": {
445
- "location": "local"
446
- }
447
- }
448
- }
449
- }, {
450
- "method": "editionTitleTab",
451
- "name": "editionTitleTab",
452
- "bubbles": true,
453
- "cancelable": true,
454
- "composed": true,
455
- "docs": {
456
- "tags": [],
457
- "text": "Emitido ao salvar uma altera\u00E7\u00E3o realizada no t\u00EDtulo da tab."
458
- },
459
- "complexType": {
460
- "original": "any",
461
- "resolved": "any",
462
- "references": {}
463
- }
464
- }, {
465
- "method": "deleteTab",
466
- "name": "deleteTab",
467
- "bubbles": true,
468
- "cancelable": true,
469
- "composed": true,
470
- "docs": {
471
- "tags": [],
472
- "text": "Emitido ao deletar uma aba."
473
- },
474
- "complexType": {
475
- "original": "any",
476
- "resolved": "any",
477
- "references": {}
478
- }
479
- }, {
480
- "method": "hideTab",
481
- "name": "hideTab",
482
- "bubbles": true,
483
- "cancelable": true,
484
- "composed": true,
485
- "docs": {
486
- "tags": [],
487
- "text": "Emitido ao ocultar uma aba."
488
- },
489
- "complexType": {
490
- "original": "any",
491
- "resolved": "any",
492
- "references": {}
493
- }
494
- }, {
495
- "method": "ezOrderChange",
496
- "name": "ezOrderChange",
497
- "bubbles": true,
498
- "cancelable": true,
499
- "composed": true,
500
- "docs": {
501
- "tags": [],
502
- "text": "Emitido ao mover a ordem da aba."
503
- },
504
- "complexType": {
505
- "original": "number",
506
- "resolved": "number",
507
- "references": {}
508
- }
509
- }, {
510
- "method": "canStartDrag",
511
- "name": "canStartDrag",
512
- "bubbles": true,
513
- "cancelable": true,
514
- "composed": true,
515
- "docs": {
516
- "tags": [],
517
- "text": "Emitido ao ocultar uma aba."
518
- },
519
- "complexType": {
520
- "original": "any",
521
- "resolved": "any",
522
- "references": {}
523
- }
524
- }];
525
- }
526
- static get elementRef() { return "_hostElem"; }
527
- }
@@ -1,6 +0,0 @@
1
- import { S as SnkConfigOptions$1, d as defineCustomElement$1 } from './snk-config-options2.js';
2
-
3
- const SnkConfigOptions = SnkConfigOptions$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { SnkConfigOptions, defineCustomElement };