@sankhyalabs/sankhyablocks 8.16.0-dev.113 → 8.16.0-dev.115

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 (344) hide show
  1. package/dist/cjs/{ClientSideExporterProvider-a2753c93.js → ClientSideExporterProvider-0ce2bcd9.js} +2 -2
  2. package/dist/cjs/{ConfigStorage-df09fb78.js → ConfigStorage-48ba265b.js} +45 -17
  3. package/dist/cjs/FormConfigHelper-c664dbae.js +260 -0
  4. package/dist/cjs/{PersonalizedFilterUtils-0184ffbb.js → PersonalizedFilterUtils-7259cf65.js} +1 -1
  5. package/dist/cjs/{SnkFormConfigManager-45a8d7b7.js → SnkFormConfigManager-aa4631bd.js} +3 -4
  6. package/dist/cjs/{SnkMessageBuilder-9deeae08.js → SnkMessageBuilder-e3b7850b.js} +28 -3
  7. package/dist/cjs/config-header.cjs.entry.js +79 -0
  8. package/dist/cjs/configs-button.cjs.entry.js +61 -0
  9. package/dist/cjs/{constants-77c1b8bd.js → constants-6d82e405.js} +8 -38
  10. package/dist/cjs/default-filters-a09bf82b.js +8 -0
  11. package/dist/cjs/field-config_2.cjs.entry.js +324 -0
  12. package/dist/cjs/fields-layout.cjs.entry.js +341 -0
  13. package/dist/cjs/fields-selector.cjs.entry.js +74 -0
  14. package/dist/cjs/{filter-type.enum-b14ce507.js → filter-type.enum-2bb46d2a.js} +1 -0
  15. package/dist/cjs/guides-configurator.cjs.entry.js +164 -0
  16. package/dist/cjs/{index-102ba62d.js → index-0ad2baeb.js} +4 -5
  17. package/dist/cjs/{index-f9e81701.js → index-1cf293c1.js} +32 -10
  18. package/dist/cjs/{index-c5771aba.js → index-62760a9c.js} +5 -0
  19. package/dist/cjs/loader.cjs.js +2 -2
  20. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +2 -2
  21. package/dist/cjs/sankhyablocks.cjs.js +2 -2
  22. package/dist/cjs/snk-actions-button_8.cjs.entry.js +3 -3
  23. package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
  24. package/dist/cjs/snk-application.cjs.entry.js +4 -4
  25. package/dist/cjs/snk-attach.cjs.entry.js +4 -4
  26. package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
  27. package/dist/cjs/snk-configurator.cjs.entry.js +2 -2
  28. package/dist/cjs/snk-crud.cjs.entry.js +4 -4
  29. package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
  30. package/dist/cjs/snk-data-exporter.cjs.entry.js +4 -4
  31. package/dist/cjs/{snk-data-unit-57916de4.js → snk-data-unit-3684c96e.js} +2 -2
  32. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  33. package/dist/cjs/snk-default-filter.cjs.entry.js +77 -0
  34. package/dist/cjs/snk-detail-view.cjs.entry.js +8 -8
  35. package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
  36. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  37. package/dist/cjs/snk-expression-group_2.cjs.entry.js +10 -8
  38. package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +5 -4
  39. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +82 -28
  40. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
  41. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
  42. package/dist/cjs/snk-filter-detail.cjs.entry.js +3 -3
  43. package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +3 -3
  44. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  45. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
  46. package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
  47. package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
  48. package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
  49. package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
  50. package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
  51. package/dist/cjs/snk-form-view.cjs.entry.js +1 -1
  52. package/dist/cjs/snk-form_2.cjs.entry.js +433 -0
  53. package/dist/cjs/snk-grid.cjs.entry.js +6 -6
  54. package/dist/cjs/{snk-guides-viewer-d33379cd.js → snk-guides-viewer-edc0a00a.js} +5 -5
  55. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  56. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
  57. package/dist/cjs/snk-personalized-filter.cjs.entry.js +53 -18
  58. package/dist/cjs/snk-pesquisa.cjs.entry.js +2 -2
  59. package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
  60. package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
  61. package/dist/cjs/snk-simple-crud.cjs.entry.js +7 -7
  62. package/dist/cjs/snk-taskbar.cjs.entry.js +3 -3
  63. package/dist/cjs/sortable.esm-9a110bb7.js +2668 -0
  64. package/dist/cjs/{taskbar-elements-6f4e06af.js → taskbar-elements-3b74cd21.js} +2 -2
  65. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  66. package/dist/collection/collection-manifest.json +8 -14
  67. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
  68. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +80 -12
  69. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.css +34 -0
  70. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.js +142 -0
  71. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +24 -15
  72. package/dist/collection/components/snk-filter-bar/types/default-filters.js +6 -0
  73. package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js +1 -0
  74. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +4 -4
  75. package/dist/collection/components/snk-form-config/FormConfigHelper.js +245 -0
  76. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +4 -5
  77. package/dist/collection/components/snk-form-config/config-header/config-header.css +18 -0
  78. package/dist/collection/components/snk-form-config/config-header/config-header.js +236 -0
  79. package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.css +41 -0
  80. package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.js +170 -0
  81. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +21 -0
  82. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.js +408 -0
  83. package/dist/collection/components/snk-form-config/field-item/field-item.css +108 -0
  84. package/dist/collection/components/snk-form-config/field-item/field-item.js +206 -0
  85. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +133 -0
  86. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +578 -0
  87. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.css +38 -0
  88. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js +146 -0
  89. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +132 -0
  90. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +317 -0
  91. package/dist/collection/components/snk-form-config/snk-form-config.css +16 -229
  92. package/dist/collection/components/snk-form-config/snk-form-config.js +288 -980
  93. package/dist/collection/components/snk-personalized-filter/interfaces/index.js +5 -0
  94. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +67 -13
  95. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css +3 -0
  96. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +20 -1
  97. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +22 -3
  98. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js +20 -1
  99. package/dist/collection/lib/configs/ConfigStorage.js +16 -8
  100. package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +29 -9
  101. package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +6 -0
  102. package/dist/collection/lib/message/resources/snk-form.msg.js +16 -2
  103. package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +6 -1
  104. package/dist/collection/lib/utils/constants.js +7 -1
  105. package/dist/components/ConfigStorage.js +45 -17
  106. package/dist/components/PersonalizedFilterUtils.js +6 -1
  107. package/dist/components/SnkFormConfigManager.js +2 -3
  108. package/dist/components/SnkMessageBuilder.js +28 -3
  109. package/dist/components/{snk-tab-config.d.ts → config-header.d.ts} +4 -4
  110. package/dist/components/config-header.js +6 -0
  111. package/dist/components/config-header2.js +103 -0
  112. package/dist/components/configs-button.d.ts +11 -0
  113. package/dist/components/configs-button.js +6 -0
  114. package/dist/components/configs-button2.js +76 -0
  115. package/dist/components/constants.js +8 -34
  116. package/dist/components/field-config.d.ts +11 -0
  117. package/dist/components/field-config.js +6 -0
  118. package/dist/components/field-config2.js +525 -0
  119. package/dist/components/field-item.d.ts +11 -0
  120. package/dist/components/field-item.js +6 -0
  121. package/dist/components/field-item2.js +93 -0
  122. package/dist/components/fields-layout.d.ts +11 -0
  123. package/dist/components/fields-layout.js +6 -0
  124. package/dist/components/fields-layout2.js +370 -0
  125. package/dist/components/{snk-field-config.d.ts → fields-selector.d.ts} +4 -4
  126. package/dist/components/fields-selector.js +6 -0
  127. package/dist/components/fields-selector2.js +98 -0
  128. package/dist/components/guides-configurator.d.ts +11 -0
  129. package/dist/components/guides-configurator.js +6 -0
  130. package/dist/components/guides-configurator2.js +182 -0
  131. package/dist/components/index.d.ts +8 -3
  132. package/dist/components/index.js +8 -3
  133. package/dist/components/index2.js +3 -4
  134. package/dist/components/snk-application2.js +1 -1
  135. package/dist/components/snk-crud.js +86 -62
  136. package/dist/components/{snk-config-options.d.ts → snk-default-filter.d.ts} +4 -4
  137. package/dist/components/snk-default-filter.js +6 -0
  138. package/dist/components/snk-default-filter2.js +97 -0
  139. package/dist/components/snk-detail-view2.js +113 -89
  140. package/dist/components/snk-expression-group2.js +4 -2
  141. package/dist/components/snk-expression-item2.js +5 -3
  142. package/dist/components/snk-filter-assistent-mode2.js +4 -2
  143. package/dist/components/snk-filter-bar2.js +28 -19
  144. package/dist/components/snk-filter-modal-item2.js +1 -0
  145. package/dist/components/snk-filter-modal.js +59 -8
  146. package/dist/components/snk-form-config2.js +253 -953
  147. package/dist/components/snk-form.js +33 -9
  148. package/dist/components/snk-personalized-filter2.js +50 -14
  149. package/dist/components/sortable.esm.js +2666 -0
  150. package/dist/esm/{ClientSideExporterProvider-b3871edb.js → ClientSideExporterProvider-3ed744fd.js} +2 -2
  151. package/dist/esm/{ConfigStorage-71e6766f.js → ConfigStorage-79b9e180.js} +45 -17
  152. package/dist/esm/FormConfigHelper-49fe72ca.js +248 -0
  153. package/dist/esm/{PersonalizedFilterUtils-e2b38ef7.js → PersonalizedFilterUtils-2db38ff2.js} +1 -1
  154. package/dist/esm/{SnkFormConfigManager-be490a33.js → SnkFormConfigManager-b4b93298.js} +3 -4
  155. package/dist/esm/{SnkMessageBuilder-2dbd8fa2.js → SnkMessageBuilder-9c269caf.js} +28 -3
  156. package/dist/esm/config-header.entry.js +75 -0
  157. package/dist/esm/configs-button.entry.js +57 -0
  158. package/dist/esm/{constants-7db1128a.js → constants-7b422de0.js} +8 -34
  159. package/dist/esm/default-filters-50105e43.js +8 -0
  160. package/dist/esm/field-config_2.entry.js +319 -0
  161. package/dist/esm/fields-layout.entry.js +337 -0
  162. package/dist/esm/fields-selector.entry.js +70 -0
  163. package/dist/esm/{filter-type.enum-a80c1b6b.js → filter-type.enum-f6a8fe23.js} +1 -0
  164. package/dist/esm/guides-configurator.entry.js +160 -0
  165. package/dist/esm/{index-a7d3d3f1.js → index-479e1293.js} +32 -10
  166. package/dist/esm/{index-ae591a44.js → index-8acbae97.js} +6 -1
  167. package/dist/esm/{index-bdf75557.js → index-b72af127.js} +4 -5
  168. package/dist/esm/loader.js +3 -3
  169. package/dist/esm/pesquisa-grid_2.entry.js +2 -2
  170. package/dist/esm/sankhyablocks.js +3 -3
  171. package/dist/esm/snk-actions-button_8.entry.js +3 -3
  172. package/dist/esm/snk-actions-form.entry.js +1 -1
  173. package/dist/esm/snk-application.entry.js +4 -4
  174. package/dist/esm/snk-attach.entry.js +4 -4
  175. package/dist/esm/snk-client-confirm.entry.js +1 -1
  176. package/dist/esm/snk-configurator.entry.js +2 -2
  177. package/dist/esm/snk-crud.entry.js +4 -4
  178. package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
  179. package/dist/esm/snk-data-exporter.entry.js +4 -4
  180. package/dist/esm/{snk-data-unit-65c9dd1a.js → snk-data-unit-027bca56.js} +2 -2
  181. package/dist/esm/snk-data-unit.entry.js +3 -3
  182. package/dist/esm/snk-default-filter.entry.js +73 -0
  183. package/dist/esm/snk-detail-view.entry.js +8 -8
  184. package/dist/esm/snk-entity-list.entry.js +1 -1
  185. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  186. package/dist/esm/snk-expression-group_2.entry.js +10 -8
  187. package/dist/esm/snk-filter-advanced-mode_2.entry.js +5 -4
  188. package/dist/esm/snk-filter-bar_4.entry.js +82 -28
  189. package/dist/esm/snk-filter-binary-select.entry.js +1 -1
  190. package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
  191. package/dist/esm/snk-filter-detail.entry.js +3 -3
  192. package/dist/esm/snk-filter-field-search_2.entry.js +3 -3
  193. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  194. package/dist/esm/snk-filter-multi-select.entry.js +1 -1
  195. package/dist/esm/snk-filter-number.entry.js +1 -1
  196. package/dist/esm/snk-filter-period.entry.js +1 -1
  197. package/dist/esm/snk-filter-search.entry.js +1 -1
  198. package/dist/esm/snk-filter-text.entry.js +1 -1
  199. package/dist/esm/snk-form-summary.entry.js +1 -1
  200. package/dist/esm/snk-form-view.entry.js +1 -1
  201. package/dist/esm/snk-form_2.entry.js +428 -0
  202. package/dist/esm/snk-grid.entry.js +6 -6
  203. package/dist/esm/{snk-guides-viewer-72953334.js → snk-guides-viewer-32f3d3ab.js} +5 -5
  204. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  205. package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
  206. package/dist/esm/snk-personalized-filter.entry.js +53 -18
  207. package/dist/esm/snk-pesquisa.entry.js +2 -2
  208. package/dist/esm/snk-print-selector.entry.js +1 -1
  209. package/dist/esm/snk-simple-bar.entry.js +1 -1
  210. package/dist/esm/snk-simple-crud.entry.js +7 -7
  211. package/dist/esm/snk-taskbar.entry.js +3 -3
  212. package/dist/esm/sortable.esm-842f85a3.js +2666 -0
  213. package/dist/esm/{taskbar-elements-f2cb4922.js → taskbar-elements-171476d4.js} +2 -2
  214. package/dist/esm/teste-pesquisa.entry.js +1 -1
  215. package/dist/sankhyablocks/{p-24a0dbd2.entry.js → p-0024d3fd.entry.js} +1 -1
  216. package/dist/sankhyablocks/{p-b8d649dd.entry.js → p-09e60995.entry.js} +1 -1
  217. package/dist/sankhyablocks/{p-bc101064.entry.js → p-0cb295c1.entry.js} +1 -1
  218. package/dist/sankhyablocks/{p-b0ab5066.entry.js → p-1456d7cb.entry.js} +1 -1
  219. package/dist/sankhyablocks/{p-9531fd46.entry.js → p-180716b2.entry.js} +1 -1
  220. package/dist/sankhyablocks/{p-6a03b190.entry.js → p-1ea34488.entry.js} +1 -1
  221. package/dist/sankhyablocks/p-21107f0d.entry.js +1 -0
  222. package/dist/sankhyablocks/{p-118e769b.entry.js → p-27482793.entry.js} +1 -1
  223. package/dist/sankhyablocks/p-290fea5f.entry.js +1 -0
  224. package/dist/sankhyablocks/{p-08ea6c86.entry.js → p-295aa209.entry.js} +1 -1
  225. package/dist/sankhyablocks/{p-c9675d64.js → p-2bde486e.js} +1 -1
  226. package/dist/sankhyablocks/{p-26b0ce3e.entry.js → p-2fdac5e6.entry.js} +1 -1
  227. package/dist/sankhyablocks/p-349d1968.entry.js +1 -0
  228. package/dist/sankhyablocks/p-35e73c5d.js +1 -0
  229. package/dist/sankhyablocks/{p-89c92727.entry.js → p-398cdd67.entry.js} +1 -1
  230. package/dist/sankhyablocks/{p-ddf93f36.entry.js → p-3a48bff3.entry.js} +1 -1
  231. package/dist/sankhyablocks/{p-434817f0.entry.js → p-3d41f5a8.entry.js} +1 -1
  232. package/dist/sankhyablocks/p-3f24c9b2.js +1 -0
  233. package/dist/sankhyablocks/{p-8002dcd0.entry.js → p-471b34f4.entry.js} +1 -1
  234. package/dist/sankhyablocks/{p-7e2ded86.entry.js → p-49d968e2.entry.js} +1 -1
  235. package/dist/sankhyablocks/p-4d2ff2fb.entry.js +1 -0
  236. package/dist/sankhyablocks/p-51833248.js +7 -0
  237. package/dist/sankhyablocks/p-60dd1d27.entry.js +1 -0
  238. package/dist/sankhyablocks/p-6416975c.js +56 -0
  239. package/dist/sankhyablocks/{p-7beeabc1.entry.js → p-65c5d430.entry.js} +1 -1
  240. package/dist/sankhyablocks/{p-21a81901.entry.js → p-667cab42.entry.js} +1 -1
  241. package/dist/sankhyablocks/p-6a4b21dd.js +1 -0
  242. package/dist/sankhyablocks/p-71a05822.entry.js +1 -0
  243. package/dist/sankhyablocks/{p-ac8d1cd6.entry.js → p-7345782c.entry.js} +1 -1
  244. package/dist/sankhyablocks/{p-885802c3.js → p-763b04fa.js} +1 -1
  245. package/dist/sankhyablocks/{p-d07b18a4.js → p-7de79adf.js} +1 -1
  246. package/dist/sankhyablocks/p-7e250432.entry.js +1 -0
  247. package/dist/sankhyablocks/{p-47178038.entry.js → p-83c100f2.entry.js} +1 -1
  248. package/dist/sankhyablocks/p-84345e7a.js +1 -0
  249. package/dist/sankhyablocks/p-86bd4478.entry.js +1 -0
  250. package/dist/sankhyablocks/p-9019a32f.js +1 -0
  251. package/dist/sankhyablocks/{p-54a5d52a.entry.js → p-90805683.entry.js} +1 -1
  252. package/dist/sankhyablocks/{p-c2e468c9.entry.js → p-91a9abb6.entry.js} +1 -1
  253. package/dist/sankhyablocks/p-9751c42f.entry.js +1 -0
  254. package/dist/sankhyablocks/{p-057fad05.js → p-988afe78.js} +1 -1
  255. package/dist/sankhyablocks/{p-16a1dd18.entry.js → p-9a63f3f7.entry.js} +1 -1
  256. package/dist/sankhyablocks/{p-90684a75.entry.js → p-9ad3557c.entry.js} +1 -1
  257. package/dist/sankhyablocks/{p-b6200d32.entry.js → p-9fd87bfd.entry.js} +1 -1
  258. package/dist/sankhyablocks/p-a06bf7b9.entry.js +1 -0
  259. package/dist/sankhyablocks/{p-33718dfc.entry.js → p-a227b650.entry.js} +1 -1
  260. package/dist/sankhyablocks/p-a349689a.js +1 -0
  261. package/dist/sankhyablocks/p-a5bb2f93.entry.js +1 -0
  262. package/dist/sankhyablocks/{p-ebdb9d89.js → p-a6513fcb.js} +1 -1
  263. package/dist/sankhyablocks/{p-8c235d4c.entry.js → p-a76e6d51.entry.js} +1 -1
  264. package/dist/sankhyablocks/p-b568c1d4.js +1 -0
  265. package/dist/sankhyablocks/{p-ce94e6c4.entry.js → p-bd665460.entry.js} +1 -1
  266. package/dist/sankhyablocks/p-c3324d79.entry.js +1 -0
  267. package/dist/sankhyablocks/{p-bf2acf72.entry.js → p-c6a8a8bc.entry.js} +1 -1
  268. package/dist/sankhyablocks/{p-165cde3b.entry.js → p-c926cf6b.entry.js} +1 -1
  269. package/dist/sankhyablocks/{p-79f823f3.entry.js → p-d67526b6.entry.js} +1 -1
  270. package/dist/sankhyablocks/{p-d2d301a6.js → p-d8d8169b.js} +1 -1
  271. package/dist/sankhyablocks/{p-5f157b09.entry.js → p-dff65083.entry.js} +1 -1
  272. package/dist/sankhyablocks/{p-3372178e.entry.js → p-e2988bb1.entry.js} +1 -1
  273. package/dist/sankhyablocks/{p-a4ebeec4.entry.js → p-e3521eae.entry.js} +1 -1
  274. package/dist/sankhyablocks/p-e7cccc45.entry.js +1 -0
  275. package/dist/sankhyablocks/{p-1f80174b.entry.js → p-f4e31122.entry.js} +1 -1
  276. package/dist/sankhyablocks/{p-0fadb620.js → p-fc0b609e.js} +1 -1
  277. package/dist/sankhyablocks/{p-a14a09c3.entry.js → p-ff7060bc.entry.js} +1 -1
  278. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  279. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +16 -4
  280. package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.d.ts +27 -0
  281. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -3
  282. package/dist/types/components/snk-filter-bar/types/default-filters.d.ts +5 -0
  283. package/dist/types/components/snk-filter-bar/types/filter-type.enum.d.ts +2 -1
  284. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -3
  285. package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +31 -0
  286. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +3 -3
  287. package/dist/types/components/snk-form-config/config-header/config-header.d.ts +23 -0
  288. package/dist/types/components/snk-form-config/config-header/configs-button/configs-button.d.ts +19 -0
  289. package/dist/types/components/snk-form-config/field-item/field-config/field-config.d.ts +56 -0
  290. package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +63 -0
  291. package/dist/types/components/snk-form-config/fields-selector/fields-selector.d.ts +18 -0
  292. package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +42 -0
  293. package/dist/types/components/snk-form-config/snk-form-config.d.ts +51 -120
  294. package/dist/types/components/snk-personalized-filter/interfaces/index.d.ts +4 -0
  295. package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +7 -1
  296. package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.d.ts +4 -0
  297. package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +4 -0
  298. package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.d.ts +4 -0
  299. package/dist/types/components.d.ts +276 -203
  300. package/dist/types/lib/configs/ConfigStorage.d.ts +4 -2
  301. package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +8 -4
  302. package/dist/types/lib/utils/constants.d.ts +6 -0
  303. package/package.json +4 -2
  304. package/react/components.d.ts +8 -3
  305. package/react/components.js +8 -3
  306. package/react/components.js.map +1 -1
  307. package/dist/cjs/Sortable-fb1c4cbb.js +0 -2853
  308. package/dist/cjs/snk-config-options_3.cjs.entry.js +0 -1390
  309. package/dist/cjs/snk-field-config.cjs.entry.js +0 -60
  310. package/dist/cjs/snk-tab-config.cjs.entry.js +0 -332
  311. package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.css +0 -16
  312. package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js +0 -346
  313. package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.css +0 -219
  314. package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.js +0 -184
  315. package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.css +0 -323
  316. package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js +0 -527
  317. package/dist/components/snk-config-options.js +0 -6
  318. package/dist/components/snk-config-options2.js +0 -257
  319. package/dist/components/snk-field-config.js +0 -6
  320. package/dist/components/snk-field-config2.js +0 -76
  321. package/dist/components/snk-tab-config.js +0 -6
  322. package/dist/components/snk-tab-config2.js +0 -3202
  323. package/dist/esm/Sortable-83960219.js +0 -2851
  324. package/dist/esm/snk-config-options_3.entry.js +0 -1384
  325. package/dist/esm/snk-field-config.entry.js +0 -56
  326. package/dist/esm/snk-tab-config.entry.js +0 -328
  327. package/dist/sankhyablocks/p-03b68a74.js +0 -56
  328. package/dist/sankhyablocks/p-3749dffb.entry.js +0 -1
  329. package/dist/sankhyablocks/p-3ab6df3d.entry.js +0 -1
  330. package/dist/sankhyablocks/p-4689c2e6.js +0 -1
  331. package/dist/sankhyablocks/p-490b75b5.entry.js +0 -1
  332. package/dist/sankhyablocks/p-52d10014.entry.js +0 -1
  333. package/dist/sankhyablocks/p-5ffa0493.entry.js +0 -1
  334. package/dist/sankhyablocks/p-60137b7a.entry.js +0 -1
  335. package/dist/sankhyablocks/p-6dc031de.js +0 -1
  336. package/dist/sankhyablocks/p-9261d8a0.js +0 -1
  337. package/dist/sankhyablocks/p-933c0c0b.js +0 -1
  338. package/dist/sankhyablocks/p-9d3a025a.entry.js +0 -1
  339. package/dist/sankhyablocks/p-c0eb761b.entry.js +0 -1
  340. package/dist/sankhyablocks/p-d9804798.js +0 -1
  341. package/dist/sankhyablocks/p-fa816fb2.js +0 -1
  342. package/dist/types/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.d.ts +0 -57
  343. package/dist/types/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.d.ts +0 -43
  344. package/dist/types/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -105
@@ -7,9 +7,9 @@ import { UserInterface as UserInterface$1 } from '@sankhyalabs/core/dist/datauni
7
7
  import { P as PreloadManager } from './dataunit-fetcher-0e025732.js';
8
8
  import './filter-item-type.enum-d45e026f.js';
9
9
  import './form-config-fetcher-fa208a6c.js';
10
- import './constants-7db1128a.js';
10
+ import './constants-7b422de0.js';
11
11
  import InMemoryFilterColumnDataSource from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
12
- import { h } from './index-a7d3d3f1.js';
12
+ import { h } from './index-479e1293.js';
13
13
  import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
14
14
  import { I as IExportType } from './IFetchDataExporterParams-d73bed3d.js';
15
15
 
@@ -182,16 +182,30 @@ class FilterBarConfigFetcher extends ResourceFetcher {
182
182
 
183
183
  class PersonalizedFilterFetcher {
184
184
  constructor() {
185
+ this.DEFAULT_RESOURCE = '_default';
185
186
  this.templateByQuery = new Map();
186
187
  this.buildTemplates();
187
188
  }
188
- resolveURI(resourceID, configName) {
189
+ resolveURI(resourceID, configName, isDefault) {
189
190
  let uri = "filter-assistent-config://" + resourceID;
190
191
  if (configName) {
191
192
  uri += "." + configName;
192
193
  }
194
+ if (isDefault) {
195
+ uri += this.DEFAULT_RESOURCE;
196
+ }
193
197
  return uri;
194
198
  }
199
+ resolveLegacyConfigName(legacyConfigName, isDefault) {
200
+ if (!legacyConfigName) {
201
+ return '';
202
+ }
203
+ let legacyConfig = `?legacyResourceID=${legacyConfigName}`;
204
+ if (isDefault) {
205
+ legacyConfig += this.DEFAULT_RESOURCE;
206
+ }
207
+ return legacyConfig;
208
+ }
195
209
  buildTemplates() {
196
210
  this.templateByQuery.set("fetchFilterFields", dist.gql `
197
211
  query($name: String!) {
@@ -254,11 +268,14 @@ class PersonalizedFilterFetcher {
254
268
  }
255
269
  }`);
256
270
  }
257
- async loadPersonalizedFilter(resourceID, filterID, configName, legacyConfigName) {
271
+ async loadDefaultFilter(resourceID, filterID, configName, legacyConfigName) {
272
+ return this.loadPersonalizedFilter(resourceID, filterID, configName, legacyConfigName, true);
273
+ }
274
+ async loadPersonalizedFilter(resourceID, filterID, configName, legacyConfigName, isDefault) {
258
275
  return new Promise((resolve, reject) => {
259
276
  DataFetcher.get()
260
277
  .callGraphQL({
261
- values: { name: this.resolveURI(resourceID, configName) + "/" + filterID + this.resolveLegacyConfigName(legacyConfigName) },
278
+ values: { name: this.resolveURI(resourceID, configName, isDefault) + "/" + filterID + this.resolveLegacyConfigName(legacyConfigName, isDefault) },
262
279
  query: this.templateByQuery.get("fetchFilterAssistent"),
263
280
  })
264
281
  .then((resp) => {
@@ -270,10 +287,10 @@ class PersonalizedFilterFetcher {
270
287
  });
271
288
  });
272
289
  }
273
- resolveLegacyConfigName(legacyConfigName) {
274
- return legacyConfigName ? `?legacyResourceID=${legacyConfigName}` : '';
290
+ async saveDefaultFilter(personalizedFilter, resourceID, configName) {
291
+ return this.savePersonalizedFilter(personalizedFilter, resourceID, configName, true);
275
292
  }
276
- async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
293
+ async savePersonalizedFilter(personalizedFilter, resourceID, configName, isDefault) {
277
294
  if (!personalizedFilter || Object.keys(personalizedFilter).length == 0) {
278
295
  return Promise.reject(new Error("personalizedFilter não pode ser vazio"));
279
296
  }
@@ -282,7 +299,7 @@ class PersonalizedFilterFetcher {
282
299
  return new Promise((resolve, reject) => {
283
300
  DataFetcher.get()
284
301
  .callGraphQL({
285
- values: { name: this.resolveURI(resourceID, configName), filterAssistent: personalizedFilterParsed },
302
+ values: { name: this.resolveURI(resourceID, configName, isDefault), filterAssistent: personalizedFilterParsed },
286
303
  query: this.templateByQuery.get("savePersonalizedFilter"),
287
304
  })
288
305
  .then((resp) => {
@@ -293,11 +310,14 @@ class PersonalizedFilterFetcher {
293
310
  });
294
311
  });
295
312
  }
296
- async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
313
+ removeDefaultFilter(personalizedFilter, resourceID, configName) {
314
+ return this.removePersonalizedFilter(personalizedFilter, resourceID, configName, true);
315
+ }
316
+ async removePersonalizedFilter(personalizedFilter, resourceID, configName, isDefault) {
297
317
  return new Promise((resolve, reject) => {
298
318
  DataFetcher.get()
299
319
  .callGraphQL({
300
- values: { name: this.resolveURI(resourceID, configName), filterId: personalizedFilter.id },
320
+ values: { name: this.resolveURI(resourceID, configName, isDefault), filterId: personalizedFilter.id },
301
321
  query: this.templateByQuery.get("deletePersonalizedFilter"),
302
322
  })
303
323
  .then((resp) => {
@@ -362,15 +382,15 @@ var CONFIG_SOURCE;
362
382
  })(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
363
383
  class ConfigStorage {
364
384
  static addFilterBarLegacyConfig(configName, legacyConfigName) {
365
- this.validateConfigName(configName, legacyConfigName);
385
+ this.validateResourceId(legacyConfigName);
366
386
  this.filterBarLegacyConfig.set(configName, legacyConfigName);
367
387
  }
368
388
  static addFormLegacyConfig(configName, legacyConfigName) {
369
- this.validateConfigName(configName, legacyConfigName);
389
+ this.validateResourceId(legacyConfigName);
370
390
  this.formLegacyConfig.set(configName, legacyConfigName);
371
391
  }
372
392
  static addGridLegacyConfig(configName, legacyConfigName) {
373
- this.validateConfigName(configName, legacyConfigName);
393
+ this.validateResourceId(legacyConfigName);
374
394
  this.gridLegacyConfig.set(configName, legacyConfigName);
375
395
  }
376
396
  static preload(resourceID, configName, legacyConfigs) {
@@ -427,6 +447,10 @@ class ConfigStorage {
427
447
  await this.deleteGridConfigCache(name, resourceID);
428
448
  return this.gridConfigFetcher.saveConfig(config, name, resourceID);
429
449
  }
450
+ static async loadDefaultFilter(filterId, resourceID, configName) {
451
+ const legacyConfigName = this.filterBarLegacyConfig.get(configName);
452
+ return this.personalizedFilterFetcher.loadDefaultFilter(resourceID, filterId, configName, legacyConfigName);
453
+ }
430
454
  static async loadPersonalizedFilter(filterId, resourceID, configName) {
431
455
  const legacyConfigName = this.filterBarLegacyConfig.get(configName);
432
456
  return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName, legacyConfigName);
@@ -437,6 +461,13 @@ class ConfigStorage {
437
461
  await this.deleteFilterBarConfigCache(configName, resourceID);
438
462
  return this.personalizedFilterFetcher.savePersonalizedFilter(personalizedFilter, resourceID, configName);
439
463
  }
464
+ static async saveDefaultFilter(personalizedFilter, resourceID, configName) {
465
+ await this.deleteFilterBarConfigCache(configName, resourceID);
466
+ return this.personalizedFilterFetcher.saveDefaultFilter(personalizedFilter, resourceID, configName);
467
+ }
468
+ static async removeDefaultFilter(personalizedFilter, resourceID, configName) {
469
+ return this.personalizedFilterFetcher.removeDefaultFilter(personalizedFilter, resourceID, configName);
470
+ }
440
471
  static async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
441
472
  return this.personalizedFilterFetcher.removePersonalizedFilter(personalizedFilter, resourceID, configName);
442
473
  }
@@ -452,10 +483,8 @@ class ConfigStorage {
452
483
  static async deleteFilterBarConfigCache(name, resourceID) {
453
484
  await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
454
485
  }
455
- static validateConfigName(configName, legacyConfigName) {
456
- if (!configName)
457
- throw Error(this.CONFIG_NAME_ERROR_MESSAGE);
458
- if (!legacyConfigName)
486
+ static validateResourceId(resourceId) {
487
+ if (!resourceId)
459
488
  throw Error(this.LEGACY_CONFIG_NAME_ERROR_MESSAGE);
460
489
  }
461
490
  static handleLegacyConfig(configName, configSource, urlParams) {
@@ -495,7 +524,6 @@ class ConfigStorage {
495
524
  return `req_${source}_${name}_${resourceID}`;
496
525
  }
497
526
  }
498
- ConfigStorage.CONFIG_NAME_ERROR_MESSAGE = "ConfigName precisa ser informado.";
499
527
  ConfigStorage.LEGACY_CONFIG_NAME_ERROR_MESSAGE = "LegacyConfigName precisa ser informado.";
500
528
  ConfigStorage.filterBarLegacyConfig = new Map();
501
529
  ConfigStorage.formLegacyConfig = new Map();
@@ -0,0 +1,248 @@
1
+ import { UserInterface, DataType } from '@sankhyalabs/core';
2
+ import { a as TAB_NAMES, G as GROUP_NAMES, D as DEFAULT_TYPE } from './constants-7b422de0.js';
3
+
4
+ const iconMap = new Map([
5
+ [UserInterface.DATE, 'calendar'],
6
+ [UserInterface.DATETIME, 'calendar-clock'],
7
+ [UserInterface.ELAPSEDTIME, 'timer-outline'],
8
+ [UserInterface.TIME, 'timer-outline'],
9
+ [UserInterface.DECIMALNUMBER, 'number'],
10
+ [UserInterface.INTEGERNUMBER, 'number'],
11
+ [UserInterface.FILE, 'zip'],
12
+ [UserInterface.IMAGE, 'pdf'],
13
+ [UserInterface.HTML, 'tag_code'],
14
+ [UserInterface.SEARCH, 'search'],
15
+ [UserInterface.SEARCHPLUS, 'search'],
16
+ [UserInterface.OPTIONSELECTOR, 'list'],
17
+ [UserInterface.CHECKBOX, 'list'],
18
+ [UserInterface.SWITCH, 'boolean'],
19
+ [UserInterface.PASSWORD, 'eye-off'],
20
+ ]);
21
+ const ID_AVAILABLE_FIELDS = 'container-available-fields';
22
+ var SORTABLE_PATH;
23
+ (function (SORTABLE_PATH) {
24
+ SORTABLE_PATH["FROM"] = "from";
25
+ SORTABLE_PATH["TO"] = "to";
26
+ })(SORTABLE_PATH || (SORTABLE_PATH = {}));
27
+ function getFieldsStructure(evt, path, group, tab) {
28
+ var _a;
29
+ const htmlStructure = (_a = evt === null || evt === void 0 ? void 0 : evt[path]) === null || _a === void 0 ? void 0 : _a.children;
30
+ if (!htmlStructure)
31
+ return [];
32
+ return Array.from(htmlStructure).map(({ fieldConfig }) => {
33
+ return Object.assign(Object.assign({}, fieldConfig), { group, tab });
34
+ });
35
+ }
36
+ function updateTabInFieldsFromGroupList(guideGroups, updatedName) {
37
+ return guideGroups.map(group => {
38
+ return Object.assign(Object.assign({}, group), { fields: group.fields.map(field => (Object.assign(Object.assign({}, field), { tab: updatedName }))) });
39
+ });
40
+ }
41
+ function getValidatedFieldValue(fieldValue, dataUnit, fieldName) {
42
+ var _a;
43
+ if (fieldValue == undefined || !dataUnit || !fieldName)
44
+ return;
45
+ const dataType = (_a = dataUnit.getField(fieldName)) === null || _a === void 0 ? void 0 : _a.dataType;
46
+ if (dataType == undefined)
47
+ return;
48
+ if ((fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.waitmessage) !== undefined)
49
+ return undefined;
50
+ const isNonObjectValue = dataType !== DataType.OBJECT &&
51
+ dataType !== DataType.DATE &&
52
+ typeof fieldValue === 'object';
53
+ const processedValue = isNonObjectValue ? fieldValue.value : fieldValue;
54
+ return dataType === DataType.OBJECT
55
+ ? JSON.stringify(processedValue)
56
+ : processedValue;
57
+ }
58
+ function getEnabledByProperty(attribName, propertyName, fieldDescriptor) {
59
+ if (!fieldDescriptor)
60
+ return true;
61
+ const fieldProperties = fieldDescriptor.properties || {};
62
+ const fromAttribName = fieldDescriptor[attribName] !== true;
63
+ return fieldProperties.hasOwnProperty(propertyName)
64
+ ? fieldProperties[propertyName] !== 'S'
65
+ : fromAttribName;
66
+ }
67
+ function getValueByProperty(property, fieldDescriptor, defaultValue) {
68
+ if (fieldDescriptor && fieldDescriptor[property] === true) {
69
+ return true;
70
+ }
71
+ return defaultValue;
72
+ }
73
+ function getIconName(userInterface) {
74
+ return iconMap.get(userInterface) || 'text';
75
+ }
76
+ function buildNewGuideName(guidesList) {
77
+ var _a, _b;
78
+ const qtdWithNewGuideName = (_b = (_a = guidesList.filter(g => g.name.includes(TAB_NAMES.newGuide))) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
79
+ return qtdWithNewGuideName === 0
80
+ ? TAB_NAMES.newGuide
81
+ : `${TAB_NAMES.newGuide} (${qtdWithNewGuideName})`;
82
+ }
83
+ function getFieldsToSave(guidesMap) {
84
+ const fieldsToSave = [];
85
+ guidesMap.forEach(groups => {
86
+ groups.forEach(({ fields }) => {
87
+ fields === null || fields === void 0 ? void 0 : fields.forEach((fieldConfig) => {
88
+ fieldsToSave.push(buildFieldToSave(fieldConfig));
89
+ });
90
+ });
91
+ });
92
+ return fieldsToSave;
93
+ }
94
+ function buildGuidesMap(rawFields, tabs, dataUnit, generalTab) {
95
+ const fields = handleFieldsTabNames(rawFields);
96
+ const guidesMap = initGuidesMap(tabs);
97
+ if (!(fields === null || fields === void 0 ? void 0 : fields.length))
98
+ return;
99
+ for (let guideName of guidesMap.keys()) {
100
+ const fieldsFromGuide = getFieldsFromGuide(fields, guideName, generalTab);
101
+ const fieldsByGroupMap = getGroupsFromGuide(fieldsFromGuide, dataUnit, generalTab);
102
+ const groupsList = parserGroupMapIntoList(fieldsByGroupMap);
103
+ guidesMap.set(guideName, groupsList);
104
+ }
105
+ return guidesMap;
106
+ }
107
+ function buildGuides(config, mainArea) {
108
+ let tabs = config.tabs ? [...config.tabs] : buildTabsFromFields(config === null || config === void 0 ? void 0 : config.fields);
109
+ tabs = getPossibleGuides(tabs);
110
+ tabs = initializeTabsNames(tabs);
111
+ return handleMainTab(tabs, mainArea);
112
+ }
113
+ function handleFieldsTabNames(allFields) {
114
+ // Campos que não fazem parte de nenhuma aba ou da aba "Geral", devem ser movidos para a aba __main.
115
+ return allFields.map(field => {
116
+ const tabName = field.tab;
117
+ return Object.assign(Object.assign({}, field), { tab: (!tabName || tabName === TAB_NAMES.general) ? TAB_NAMES.main : field.tab });
118
+ });
119
+ }
120
+ function initializeTabsNames(tabs) {
121
+ return tabs.map((tab) => {
122
+ return Object.assign(Object.assign({}, tab), { name: tab.name ? tab.name : tab.label });
123
+ });
124
+ }
125
+ function handleMainTab(tabs, mainTabName) {
126
+ const mainTab = { name: TAB_NAMES.main, label: mainTabName, visible: true };
127
+ const hasTabMain = tabs.some((tab) => tab.name === TAB_NAMES.main);
128
+ if (hasTabMain) {
129
+ tabs = tabs.map(tab => tab.name === TAB_NAMES.main ? mainTab : tab);
130
+ }
131
+ else {
132
+ tabs.unshift(mainTab);
133
+ }
134
+ return tabs;
135
+ }
136
+ function getPossibleGuides(tabs) {
137
+ //O usuário não pode criar uma guia com o nome "Geral".
138
+ // Nesses casos, precisamos mover os campos dessa guia, para a guia __main.
139
+ return [...tabs.filter(tab => tab.label !== TAB_NAMES.general)];
140
+ }
141
+ function initGuidesMap(tabs) {
142
+ const map = new Map();
143
+ let possibleGuides = getPossibleGuides(tabs);
144
+ possibleGuides.forEach(tab => {
145
+ map.set(tab.name, []);
146
+ });
147
+ return map;
148
+ }
149
+ function handleFieldLabel(field, fieldDescriptor) {
150
+ if (!field.label) {
151
+ field.label = fieldDescriptor.label;
152
+ }
153
+ }
154
+ function handleFieldTab(field, generalTabName) {
155
+ if (!field.tab) {
156
+ field.tab = generalTabName;
157
+ }
158
+ }
159
+ function handleFieldGroup(field) {
160
+ if (!field.group) {
161
+ field.group = GROUP_NAMES.noGroup;
162
+ }
163
+ }
164
+ function isVisibleOnConfig(fieldDescriptor) {
165
+ var _a;
166
+ /**
167
+ * Quando um campo é ocultado pelo dev, mas queremos manter ele na config precisamos fazer essa tratativa.
168
+ */
169
+ return ((_a = fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.properties) === null || _a === void 0 ? void 0 : _a.visibleOnConfig) === true && (fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.visible) === false;
170
+ }
171
+ function getGroupsFromGuide(fieldsFromGuide, dataUnit, generalTabName) {
172
+ const groupsMap = new Map();
173
+ groupsMap.set(GROUP_NAMES.noGroup, []);
174
+ for (let field of fieldsFromGuide) {
175
+ const fieldDescriptor = dataUnit.getField(field.name);
176
+ if (!(fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.visible) && !isVisibleOnConfig(fieldDescriptor))
177
+ continue;
178
+ handleFieldLabel(field, fieldDescriptor);
179
+ handleFieldTab(field, generalTabName);
180
+ handleFieldGroup(field);
181
+ if (groupsMap.has(field.group)) {
182
+ groupsMap.get(field.group).push(field);
183
+ }
184
+ else {
185
+ groupsMap.set(field.group, [field]);
186
+ }
187
+ }
188
+ return groupsMap;
189
+ }
190
+ function getFieldsFromGuide(fields, guideName, generalTabName) {
191
+ return fields.filter(field => {
192
+ const fieldTab = getTabName(field.tab, generalTabName);
193
+ return fieldTab === guideName;
194
+ });
195
+ }
196
+ function getTabName(tab, generalTabName) {
197
+ var _a;
198
+ if (typeof tab === 'string')
199
+ return tab;
200
+ return (_a = tab === null || tab === void 0 ? void 0 : tab.label) !== null && _a !== void 0 ? _a : generalTabName;
201
+ }
202
+ function parserGroupMapIntoList(groupsMap) {
203
+ const groupsList = [];
204
+ for (let groupName of groupsMap.keys()) {
205
+ groupsList.push({ name: groupName, fields: groupsMap.get(groupName) });
206
+ }
207
+ return groupsList;
208
+ }
209
+ function canAddTab(tab, guideList) {
210
+ return tab && !(guideList.map(g => g.name).includes(tab));
211
+ }
212
+ function buildTabsFromFields(fields) {
213
+ const guideList = [];
214
+ let order = 1;
215
+ fields === null || fields === void 0 ? void 0 : fields.forEach((field) => {
216
+ const tab = field.tab;
217
+ if (canAddTab(tab, guideList)) {
218
+ guideList.push({ name: tab, label: tab, visible: true, order });
219
+ order = order + 1;
220
+ }
221
+ });
222
+ return guideList;
223
+ }
224
+ function buildFieldToSave(fieldConfig) {
225
+ const fieldToSave = {
226
+ cleanOnCopy: fieldConfig.cleanOnCopy || false,
227
+ group: fieldConfig.group === GROUP_NAMES.noGroup ? undefined : fieldConfig.group,
228
+ label: fieldConfig.label,
229
+ name: fieldConfig.name,
230
+ required: fieldConfig.required,
231
+ readOnly: fieldConfig.readOnly,
232
+ tab: fieldConfig.tab,
233
+ };
234
+ if (fieldConfig.defaultValue != undefined) {
235
+ if (fieldConfig.defaultValue.type == undefined) {
236
+ fieldToSave.defaultValue = {
237
+ type: DEFAULT_TYPE.fixed,
238
+ value: fieldConfig.defaultValue,
239
+ };
240
+ }
241
+ else {
242
+ fieldToSave.defaultValue = fieldConfig.defaultValue;
243
+ }
244
+ }
245
+ return fieldToSave;
246
+ }
247
+
248
+ export { ID_AVAILABLE_FIELDS as I, SORTABLE_PATH as S, buildGuidesMap as a, buildGuides as b, buildNewGuideName as c, getFieldsStructure as d, getValidatedFieldValue as e, getEnabledByProperty as f, getFieldsToSave as g, getValueByProperty as h, getIconName as i, updateTabInFieldsFromGroupList as u };
@@ -1,6 +1,6 @@
1
1
  import { DataType, NumberUtils, DateUtils, UserInterface } from '@sankhyalabs/core';
2
2
  import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
3
- import { F as FilterOperand } from './index-ae591a44.js';
3
+ import { F as FilterOperand } from './index-8acbae97.js';
4
4
 
5
5
  class PersonalizedFilterUtils {
6
6
  /**
@@ -1,7 +1,7 @@
1
- import { C as ConfigStorage } from './ConfigStorage-71e6766f.js';
1
+ import { C as ConfigStorage } from './ConfigStorage-79b9e180.js';
2
2
  import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
3
3
  import { F as FormConfigFetcher } from './form-config-fetcher-fa208a6c.js';
4
- import { c as TAB_NAMES } from './constants-7db1128a.js';
4
+ import { a as TAB_NAMES } from './constants-7b422de0.js';
5
5
 
6
6
  class SnkFormConfigManager {
7
7
  constructor(configName, resourceID, onConfigChange, dataUnit) {
@@ -29,8 +29,7 @@ class SnkFormConfigManager {
29
29
  });
30
30
  }
31
31
  getEmptyConfig() {
32
- const config = this.buildFormMetadataUITabs({ fields: [], emptyConfig: true }, true);
33
- return config;
32
+ return this.buildFormMetadataUITabs({ fields: [], emptyConfig: true }, true);
34
33
  }
35
34
  saveConfig(config) {
36
35
  const configToSave = ObjectUtils.copy(config);
@@ -83,6 +83,12 @@ const snkFilterBarMessages = {
83
83
  "cancelButtonLabel": "Limpar tudo",
84
84
  "customFilters": "Filtros personalizados",
85
85
  "quickFilters": "Filtros rápidos",
86
+ "defaultFilter": {
87
+ "title": "Filtro padrão",
88
+ "edit": "Editar filtro",
89
+ "remove": "Excluir filtro",
90
+ "create": "Criar filtro padrão",
91
+ },
86
92
  "validations": {
87
93
  "notFullFilled": {
88
94
  "title": "Filtro parcialmente preenchido",
@@ -211,23 +217,37 @@ const snkFormConfigMessages = {
211
217
  mainArea: "Área principal",
212
218
  tabGeneral: "Geral"
213
219
  },
220
+ configs: {
221
+ buttonLabel: "Configurações",
222
+ selectedConfig: "configuração selecionada"
223
+ },
214
224
  confirm: {
215
225
  title: "Aviso",
216
226
  deleteTab: "Você realmente deseja excluir a aba",
227
+ deleteGuide: "Deseja realmente excluir a guia <b>{0}</b>?",
217
228
  cancel: "As alterações realizadas serão descartadas.<br/><br/><b>Gostaria de continuar?</b>",
218
229
  exit: "Ao sair as alterações serão descartadas.<br/><br/><b>Você realmente gostaria de sair?</b>",
219
- apply: "A <b>{0}</b> irá substituir a sua configuração {1}!<br/><br/><b>Deseja continuar?</b>",
230
+ apply: "A <b>{0}</b> irá substituir a configuração atual!<br/><br/><b>Deseja continuar?</b>",
220
231
  group: "Não é possível salvar as configurações com um grupo vazio!",
221
232
  labelCancel: "Cancelar",
222
233
  labelDelete: "Excluir"
223
234
  },
235
+ noGuideSelected: {
236
+ title: "Atenção",
237
+ message: "Selecione uma guia para iniciar a configuração!"
238
+ },
224
239
  alert: {
225
240
  titleGroupExists: "Já existe um grupo com título",
241
+ titleGroupEditing: "Há um <b>grupo<b/> em edição. <br/> Finalize a edição para salvar as configurações.",
242
+ titleGuideExists: "Já existe uma guia com título",
243
+ titleGuideEditing: "Há uma <b>guia<b/> em edição. <br/> Finalize a edição para salvar as configurações.",
244
+ titleGuideReservedName: "Este título é reservado para configurações internas do sistema e não pode ser utilizado.",
226
245
  infoValidTitle: "Por favor, digite um título válido.",
227
246
  inTab: "na aba"
228
247
  },
229
248
  info: {
230
- successfullyConfigSaved: "As configurações foram salvas com sucesso!"
249
+ successfullyConfigSaved: "As configurações foram salvas com sucesso!",
250
+ successfullyGuideDeleted: 'A guia "{0}" foi excluída. Salve para confirmar a alteração.'
231
251
  }
232
252
  };
233
253
  const snkFieldConfigMessages = {
@@ -395,6 +415,8 @@ const snkPersonalizedFilterMessages = {
395
415
  info: {
396
416
  titleEdit: "Editar filtro personalizado",
397
417
  titleAdd: "Criar filtro personalizado",
418
+ titleCreateDefault: "Aplicar filtro padrão",
419
+ titleEditDefault: "Editar filtro padrão",
398
420
  titleCollapsible: "Expressão a ser aplicada (gerada pelo assistente)",
399
421
  labelSearchField: "Buscar campo",
400
422
  labelOperator: "Operador",
@@ -417,7 +439,10 @@ const snkPersonalizedFilterMessages = {
417
439
  applyExpression: "Expressão a ser aplicada:",
418
440
  tooltipDisabledAssistentMode: "Expressão não suportada pelo assistente.",
419
441
  activeModeAdvanced: "Ativar modo avançado",
420
- activeModeAssistent: "Ativar modo assistente"
442
+ activeModeAssistent: "Ativar modo assistente",
443
+ textInputDisabled: "Campo desabilitado para filtros padrões",
444
+ checkVariableDisabled: "Filtro padrão não pode ser variável.",
445
+ deleteDefaultFilterConfirm: "Deseja excluir o <b>filtro padrão</b>?",
421
446
  },
422
447
  confirmExpression: {
423
448
  title: "Aviso",
@@ -0,0 +1,75 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-479e1293.js';
2
+ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
3
+
4
+ const configHeaderCss = ".sc-config-header-h{display:flex;padding-top:12px;padding-left:12px;align-items:center;width:100%;justify-content:space-between}.left-group.sc-config-header{display:flex;gap:8px}.right-group.sc-config-header{padding-right:18px;display:flex}";
5
+
6
+ const ConfigHeader = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.configClose = createEvent(this, "configClose", 7);
10
+ this.saveConfig = createEvent(this, "saveConfig", 7);
11
+ this.isEditingGuide = false;
12
+ this.isEditingGroup = false;
13
+ this.configOptions = [];
14
+ this.selectedConfig = undefined;
15
+ this.messagesBuilder = undefined;
16
+ this.hasChanges = false;
17
+ this.optionConfigChanged = false;
18
+ }
19
+ handleIsEditingGuideName({ detail }) {
20
+ this.isEditingGuide = detail;
21
+ }
22
+ handleIsEditingGroupName({ detail }) {
23
+ this.isEditingGroup = detail;
24
+ }
25
+ saveFormConfig() {
26
+ if (this.isEditingGuide || this.isEditingGroup) {
27
+ const title = this.getMessage('snkFormConfig.confirm.title');
28
+ const message = this.isEditingGuide
29
+ ? this.getMessage('snkFormConfig.alert.titleGuideEditing')
30
+ : this.getMessage('snkFormConfig.alert.titleGroupEditing');
31
+ ApplicationUtils.alert(title, message);
32
+ return;
33
+ }
34
+ this.saveConfig.emit();
35
+ }
36
+ async closeFormConfig() {
37
+ if (this.hasChanges) {
38
+ const title = this.getMessage('snkFormConfig.confirm.title');
39
+ const msg = this.getMessage('snkFormConfig.confirm.cancel');
40
+ const confirm = await ApplicationUtils.confirm(title, msg);
41
+ if (!confirm)
42
+ return;
43
+ }
44
+ this.configClose.emit();
45
+ }
46
+ getMessage(key, params) {
47
+ return this.messagesBuilder.getMessage(key, params);
48
+ }
49
+ openConfirmDialog(msg = '', title = this.getMessage('snkFormConfig.confirm.title')) {
50
+ return ApplicationUtils.confirm(title, msg);
51
+ }
52
+ async applyOptionConfig() {
53
+ var _a, _b;
54
+ const name = (_b = (_a = this.selectedConfig) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : this.getMessage('snkFormConfig.configs.selectedConfig');
55
+ const msg = this.getMessage('snkFormConfig.confirm.apply').replace('{0}', name);
56
+ const confirm = await this.openConfirmDialog(msg);
57
+ if (confirm) {
58
+ this.saveConfig.emit();
59
+ }
60
+ }
61
+ renderSaveActions() {
62
+ if (!this.hasChanges && !this.optionConfigChanged)
63
+ return;
64
+ if (this.hasChanges) {
65
+ return (h("div", { class: "right-group" }, h("ez-button", { title: 'Cancelar', label: 'Cancelar', onClick: this.closeFormConfig.bind(this), size: "medium" }), h("ez-button", { title: 'Salvar', label: 'Salvar', class: 'ez-button--primary ez-padding-left--medium', onClick: () => this.saveFormConfig(), size: "medium" })));
66
+ }
67
+ return (h("div", { class: "right-group" }, h("ez-button", { title: 'Cancelar', label: 'Cancelar', onClick: this.closeFormConfig.bind(this), size: "medium" }), h("ez-button", { title: 'Salvar', label: this.getMessage('snkFormConfig.applyConfig'), class: 'ez-button--primary ez-padding-left--medium', onClick: async () => await this.applyOptionConfig(), size: "medium" })));
68
+ }
69
+ render() {
70
+ return (h(Host, null, h("div", { class: 'left-group' }, h("ez-button", { mode: "icon", title: this.getMessage('snkFormConfig.goBackTitle'), iconName: "arrow_back", class: "ez-padding--small", size: "small", onClick: this.closeFormConfig.bind(this), id: "formConfigToBack" }), h("h1", { class: "ez-title ez-title--primary ez-title--extra-large ez-padding--small" }, this.getMessage('snkFormConfig.title')), h("configs-button", { hasChanges: this.hasChanges, configOptions: this.configOptions, selectedConfig: this.selectedConfig, messagesBuilder: this.messagesBuilder })), this.renderSaveActions()));
71
+ }
72
+ };
73
+ ConfigHeader.style = configHeaderCss;
74
+
75
+ export { ConfigHeader as config_header };
@@ -0,0 +1,57 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-479e1293.js';
2
+ import { ObjectUtils } from '@sankhyalabs/core';
3
+ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
+
5
+ const configsButtonCss = ".dropdown-container.sc-configs-button{font-family:'Roboto';font-size:12px;font-weight:400;display:flex;flex-direction:column;color:#2b3a54;width:200px}.main-item.sc-configs-button{padding:12px;font-size:14px;cursor:pointer;transition:all .2s ease-in-out;display:flex;flex-direction:row;gap:8px;align-items:center;justify-content:start}.main-item.sc-configs-button ez-icon.sc-configs-button{--ez-icon--color:#008561}.main-item.sc-configs-button:nth-of-type(1){padding-bottom:6px}.main-item.sc-configs-button:nth-of-type(2){padding-top:6px}.main-item.sc-configs-button:hover{background-color:#FAFCFF}.item-label.sc-configs-button{display:flex}";
6
+
7
+ const ConfigsButton = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
10
+ this.formConfigOptionSelected = createEvent(this, "formConfigOptionSelected", 7);
11
+ this.configOptions = [];
12
+ this.selectedConfig = undefined;
13
+ this.hasChanges = false;
14
+ this.messagesBuilder = undefined;
15
+ }
16
+ getMessage(key, params) {
17
+ return this.messagesBuilder.getMessage(key, params);
18
+ }
19
+ async showShareConfigOptions() {
20
+ if (this._refOptionsPopover && this._refShareConfigBtn) {
21
+ await this._refOptionsPopover.showUnder(this._refShareConfigBtn);
22
+ }
23
+ }
24
+ async handleSelectOption(option) {
25
+ if (ObjectUtils.equals(option, this.selectedConfig))
26
+ return;
27
+ if (this.hasChanges) {
28
+ const title = this.getMessage('snkFormConfig.confirm.title');
29
+ const msg = this.getMessage('snkFormConfig.confirm.cancel');
30
+ const confirm = await ApplicationUtils.confirm(title, msg);
31
+ if (!confirm)
32
+ return;
33
+ }
34
+ this.selectedConfig = option;
35
+ this.formConfigOptionSelected.emit(option);
36
+ await this._refOptionsPopover.hide();
37
+ }
38
+ getButtonLabel() {
39
+ var _a, _b;
40
+ return (_b = (_a = this.selectedConfig) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : this.getMessage('snkFormConfig.configs.buttonLabel');
41
+ }
42
+ renderConfigOptions() {
43
+ return this.configOptions.map((option) => {
44
+ return (h("div", { class: `main-item`, onClick: async () => await this.handleSelectOption(option) }, h("span", { class: 'item-label' }, " ", option.name), this.renderCheckIcon(option)));
45
+ });
46
+ }
47
+ renderCheckIcon(option) {
48
+ if (this.selectedConfig && this.selectedConfig.origin === option.origin)
49
+ return h("ez-icon", { iconName: "check" });
50
+ }
51
+ render() {
52
+ return (h(Host, null, h("ez-button", { ref: ref => this._refShareConfigBtn = ref, label: this.getButtonLabel(), onClick: async () => await this.showShareConfigOptions() }, h("ez-icon", { slot: "rightIcon", iconName: "chevron-down" })), h("ez-popover-plus", { ref: ref => this._refOptionsPopover = ref, autoClose: true, overlayType: "none" }, h("div", { class: 'dropdown-container' }, this.renderConfigOptions()))));
53
+ }
54
+ };
55
+ ConfigsButton.style = configsButtonCss;
56
+
57
+ export { ConfigsButton as configs_button };