@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-86600.1 → 0.0.0-bugfix-dev-KB-86904.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (399) 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-aecd7c18.js → SnkMessageBuilder-e3b7850b.js} +32 -6
  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-ab1cfb44.js → index-0ad2baeb.js} +1 -1
  17. package/dist/cjs/{index-f9e81701.js → index-1cf293c1.js} +34 -12
  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 +3 -3
  21. package/dist/cjs/sankhyablocks.cjs.js +2 -2
  22. package/dist/cjs/{snk-actions-button_7.cjs.entry.js → snk-actions-button_8.cjs.entry.js} +64 -3
  23. package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
  24. package/dist/cjs/snk-application.cjs.entry.js +8 -8
  25. package/dist/cjs/snk-attach.cjs.entry.js +47 -18
  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 +6 -30
  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-ebfdb9ba.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 +62 -10
  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 +83 -29
  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 +20 -8
  52. package/dist/cjs/snk-form_2.cjs.entry.js +433 -0
  53. package/dist/cjs/snk-grid.cjs.entry.js +30 -30
  54. package/dist/cjs/{snk-guides-viewer-401c4854.js → snk-guides-viewer-edc0a00a.js} +39 -27
  55. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -8
  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 +9 -3
  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 +79 -91
  62. package/dist/cjs/snk-taskbar.cjs.entry.js +9 -5
  63. package/dist/cjs/sortable.esm-9a110bb7.js +2668 -0
  64. package/dist/cjs/{taskbar-elements-21f0370c.js → taskbar-elements-3b74cd21.js} +10 -2
  65. package/dist/cjs/{field-search-68e34bf4.js → taskbar-processor-2fba34a8.js} +0 -35
  66. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  67. package/dist/collection/collection-manifest.json +9 -14
  68. package/dist/collection/components/snk-application/snk-application.js +4 -4
  69. package/dist/collection/components/snk-attach/snk-attach.js +27 -1
  70. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +17 -13
  71. package/dist/collection/components/snk-crud/snk-crud.js +21 -45
  72. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +58 -4
  73. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +54 -7
  74. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +36 -40
  75. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +80 -12
  76. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.css +34 -0
  77. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.js +142 -0
  78. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -0
  79. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +24 -15
  80. package/dist/collection/components/snk-filter-bar/types/default-filters.js +6 -0
  81. package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js +1 -0
  82. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +4 -4
  83. package/dist/collection/components/snk-form-config/FormConfigHelper.js +245 -0
  84. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +4 -5
  85. package/dist/collection/components/snk-form-config/config-header/config-header.css +18 -0
  86. package/dist/collection/components/snk-form-config/config-header/config-header.js +236 -0
  87. package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.css +41 -0
  88. package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.js +170 -0
  89. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +21 -0
  90. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.js +408 -0
  91. package/dist/collection/components/snk-form-config/field-item/field-item.css +108 -0
  92. package/dist/collection/components/snk-form-config/field-item/field-item.js +206 -0
  93. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +133 -0
  94. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +578 -0
  95. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.css +38 -0
  96. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js +146 -0
  97. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +132 -0
  98. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +317 -0
  99. package/dist/collection/components/snk-form-config/snk-form-config.css +16 -229
  100. package/dist/collection/components/snk-form-config/snk-form-config.js +288 -980
  101. package/dist/collection/components/snk-grid/snk-grid.css +1 -0
  102. package/dist/collection/components/snk-grid/snk-grid.js +64 -45
  103. package/dist/collection/components/snk-personalized-filter/interfaces/index.js +5 -0
  104. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +67 -13
  105. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css +3 -0
  106. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +20 -1
  107. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +22 -3
  108. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js +20 -1
  109. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +1 -1
  110. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +9 -2
  111. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +75 -85
  112. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +8 -0
  113. package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.css +0 -0
  114. package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js +220 -0
  115. package/dist/collection/components/snk-taskbar/snk-taskbar.js +28 -2
  116. package/dist/collection/lib/configs/ConfigStorage.js +16 -8
  117. package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +29 -9
  118. package/dist/collection/lib/message/resources/snk-crud.msg.js +1 -1
  119. package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +6 -0
  120. package/dist/collection/lib/message/resources/snk-form.msg.js +16 -2
  121. package/dist/collection/lib/message/resources/snk-grid.msg.js +1 -1
  122. package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +6 -1
  123. package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +2 -1
  124. package/dist/collection/lib/utils/constants.js +7 -1
  125. package/dist/components/ConfigStorage.js +45 -17
  126. package/dist/components/ContinuousInsertUtils.js +2 -33
  127. package/dist/components/PersonalizedFilterUtils.js +6 -1
  128. package/dist/components/SnkFormConfigManager.js +2 -3
  129. package/dist/components/SnkMessageBuilder.js +32 -6
  130. package/dist/components/{snk-tab-config.d.ts → config-header.d.ts} +4 -4
  131. package/dist/components/config-header.js +6 -0
  132. package/dist/components/config-header2.js +103 -0
  133. package/dist/components/configs-button.d.ts +11 -0
  134. package/dist/components/configs-button.js +6 -0
  135. package/dist/components/configs-button2.js +76 -0
  136. package/dist/components/constants.js +8 -34
  137. package/dist/components/field-config.d.ts +11 -0
  138. package/dist/components/field-config.js +6 -0
  139. package/dist/components/field-config2.js +525 -0
  140. package/dist/components/field-item.d.ts +11 -0
  141. package/dist/components/field-item.js +6 -0
  142. package/dist/components/field-item2.js +93 -0
  143. package/dist/components/fields-layout.d.ts +11 -0
  144. package/dist/components/fields-layout.js +6 -0
  145. package/dist/components/fields-layout2.js +370 -0
  146. package/dist/components/{snk-field-config.d.ts → fields-selector.d.ts} +4 -4
  147. package/dist/components/fields-selector.js +6 -0
  148. package/dist/components/fields-selector2.js +98 -0
  149. package/dist/components/guides-configurator.d.ts +11 -0
  150. package/dist/components/guides-configurator.js +6 -0
  151. package/dist/components/guides-configurator2.js +182 -0
  152. package/dist/components/index.d.ts +9 -3
  153. package/dist/components/index.js +9 -3
  154. package/dist/components/pesquisa-grid2.js +1 -1
  155. package/dist/components/snk-application2.js +5 -5
  156. package/dist/components/snk-attach2.js +77 -42
  157. package/dist/components/snk-crud.js +65 -59
  158. package/dist/components/{snk-config-options.d.ts → snk-default-filter.d.ts} +4 -4
  159. package/dist/components/snk-default-filter.js +6 -0
  160. package/dist/components/snk-default-filter2.js +97 -0
  161. package/dist/components/snk-detail-view2.js +168 -68
  162. package/dist/components/snk-expression-group2.js +4 -2
  163. package/dist/components/snk-expression-item2.js +5 -3
  164. package/dist/components/snk-filter-assistent-mode2.js +4 -2
  165. package/dist/components/snk-filter-bar2.js +29 -20
  166. package/dist/components/snk-filter-modal-item2.js +1 -0
  167. package/dist/components/snk-filter-modal.js +59 -8
  168. package/dist/components/snk-form-config2.js +253 -953
  169. package/dist/components/snk-form-view2.js +22 -8
  170. package/dist/components/snk-form.js +33 -9
  171. package/dist/components/snk-grid2.js +67 -60
  172. package/dist/components/snk-personalized-filter2.js +50 -14
  173. package/dist/components/snk-pesquisa2.js +9 -2
  174. package/dist/components/snk-simple-crud2.js +104 -109
  175. package/dist/components/snk-taskbar2.js +29 -10
  176. package/dist/components/sortable.esm.js +2666 -0
  177. package/dist/components/taskbar-split-button.d.ts +11 -0
  178. package/dist/components/taskbar-split-button.js +6 -0
  179. package/dist/components/taskbar-split-button2.js +87 -0
  180. package/dist/esm/{ClientSideExporterProvider-b3871edb.js → ClientSideExporterProvider-3ed744fd.js} +2 -2
  181. package/dist/esm/{ConfigStorage-71e6766f.js → ConfigStorage-79b9e180.js} +45 -17
  182. package/dist/esm/FormConfigHelper-49fe72ca.js +248 -0
  183. package/dist/esm/{PersonalizedFilterUtils-e2b38ef7.js → PersonalizedFilterUtils-2db38ff2.js} +1 -1
  184. package/dist/esm/{SnkFormConfigManager-be490a33.js → SnkFormConfigManager-b4b93298.js} +3 -4
  185. package/dist/esm/{SnkMessageBuilder-12f5fe1a.js → SnkMessageBuilder-9c269caf.js} +32 -6
  186. package/dist/esm/config-header.entry.js +75 -0
  187. package/dist/esm/configs-button.entry.js +57 -0
  188. package/dist/esm/{constants-7db1128a.js → constants-7b422de0.js} +8 -34
  189. package/dist/esm/default-filters-50105e43.js +8 -0
  190. package/dist/esm/field-config_2.entry.js +319 -0
  191. package/dist/esm/fields-layout.entry.js +337 -0
  192. package/dist/esm/fields-selector.entry.js +70 -0
  193. package/dist/esm/{filter-type.enum-a80c1b6b.js → filter-type.enum-f6a8fe23.js} +1 -0
  194. package/dist/esm/guides-configurator.entry.js +160 -0
  195. package/dist/esm/{index-a7d3d3f1.js → index-479e1293.js} +34 -12
  196. package/dist/esm/{index-ae591a44.js → index-8acbae97.js} +6 -1
  197. package/dist/esm/{index-c57e49af.js → index-b72af127.js} +1 -1
  198. package/dist/esm/loader.js +3 -3
  199. package/dist/esm/pesquisa-grid_2.entry.js +3 -3
  200. package/dist/esm/sankhyablocks.js +3 -3
  201. package/dist/esm/{snk-actions-button_7.entry.js → snk-actions-button_8.entry.js} +64 -4
  202. package/dist/esm/snk-actions-form.entry.js +1 -1
  203. package/dist/esm/snk-application.entry.js +8 -8
  204. package/dist/esm/snk-attach.entry.js +47 -18
  205. package/dist/esm/snk-client-confirm.entry.js +1 -1
  206. package/dist/esm/snk-configurator.entry.js +2 -2
  207. package/dist/esm/snk-crud.entry.js +7 -31
  208. package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
  209. package/dist/esm/snk-data-exporter.entry.js +4 -4
  210. package/dist/esm/{snk-data-unit-03654813.js → snk-data-unit-027bca56.js} +2 -2
  211. package/dist/esm/snk-data-unit.entry.js +3 -3
  212. package/dist/esm/snk-default-filter.entry.js +73 -0
  213. package/dist/esm/snk-detail-view.entry.js +63 -11
  214. package/dist/esm/snk-entity-list.entry.js +1 -1
  215. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  216. package/dist/esm/snk-expression-group_2.entry.js +10 -8
  217. package/dist/esm/snk-filter-advanced-mode_2.entry.js +5 -4
  218. package/dist/esm/snk-filter-bar_4.entry.js +83 -29
  219. package/dist/esm/snk-filter-binary-select.entry.js +1 -1
  220. package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
  221. package/dist/esm/snk-filter-detail.entry.js +3 -3
  222. package/dist/esm/snk-filter-field-search_2.entry.js +3 -3
  223. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  224. package/dist/esm/snk-filter-multi-select.entry.js +1 -1
  225. package/dist/esm/snk-filter-number.entry.js +1 -1
  226. package/dist/esm/snk-filter-period.entry.js +1 -1
  227. package/dist/esm/snk-filter-search.entry.js +1 -1
  228. package/dist/esm/snk-filter-text.entry.js +1 -1
  229. package/dist/esm/snk-form-summary.entry.js +1 -1
  230. package/dist/esm/snk-form-view.entry.js +20 -8
  231. package/dist/esm/snk-form_2.entry.js +428 -0
  232. package/dist/esm/snk-grid.entry.js +28 -28
  233. package/dist/esm/{snk-guides-viewer-e17ff4ec.js → snk-guides-viewer-32f3d3ab.js} +39 -27
  234. package/dist/esm/snk-guides-viewer.entry.js +9 -8
  235. package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
  236. package/dist/esm/snk-personalized-filter.entry.js +53 -18
  237. package/dist/esm/snk-pesquisa.entry.js +9 -3
  238. package/dist/esm/snk-print-selector.entry.js +1 -1
  239. package/dist/esm/snk-simple-bar.entry.js +1 -1
  240. package/dist/esm/snk-simple-crud.entry.js +80 -92
  241. package/dist/esm/snk-taskbar.entry.js +9 -5
  242. package/dist/esm/sortable.esm-842f85a3.js +2666 -0
  243. package/dist/esm/{taskbar-elements-08cf25e8.js → taskbar-elements-171476d4.js} +10 -2
  244. package/dist/esm/{field-search-f8b1d91e.js → taskbar-processor-3436124c.js} +1 -34
  245. package/dist/esm/teste-pesquisa.entry.js +1 -1
  246. package/dist/sankhyablocks/p-0024d3fd.entry.js +1 -0
  247. package/dist/sankhyablocks/{p-2c08fa3e.entry.js → p-09e60995.entry.js} +3 -3
  248. package/dist/sankhyablocks/p-0cb295c1.entry.js +1 -0
  249. package/dist/sankhyablocks/p-11f099ea.entry.js +1 -0
  250. package/dist/sankhyablocks/p-1456d7cb.entry.js +1 -0
  251. package/dist/sankhyablocks/{p-9531fd46.entry.js → p-180716b2.entry.js} +1 -1
  252. package/dist/sankhyablocks/p-19156e59.entry.js +1 -0
  253. package/dist/sankhyablocks/p-1a0caadb.js +1 -0
  254. package/dist/sankhyablocks/p-21107f0d.entry.js +1 -0
  255. package/dist/sankhyablocks/{p-118e769b.entry.js → p-27482793.entry.js} +1 -1
  256. package/dist/sankhyablocks/{p-f4d5bb7f.js → p-2bde486e.js} +1 -1
  257. package/dist/sankhyablocks/{p-26b0ce3e.entry.js → p-2fdac5e6.entry.js} +1 -1
  258. package/dist/sankhyablocks/p-349d1968.entry.js +1 -0
  259. package/dist/sankhyablocks/p-35e73c5d.js +1 -0
  260. package/dist/sankhyablocks/{p-89c92727.entry.js → p-398cdd67.entry.js} +1 -1
  261. package/dist/sankhyablocks/{p-6a0c8ce0.entry.js → p-3a48bff3.entry.js} +1 -1
  262. package/dist/sankhyablocks/{p-434817f0.entry.js → p-3d41f5a8.entry.js} +1 -1
  263. package/dist/sankhyablocks/p-3f24c9b2.js +1 -0
  264. package/dist/sankhyablocks/{p-8002dcd0.entry.js → p-471b34f4.entry.js} +1 -1
  265. package/dist/sankhyablocks/{p-7e2ded86.entry.js → p-49d968e2.entry.js} +1 -1
  266. package/dist/sankhyablocks/p-4d2ff2fb.entry.js +1 -0
  267. package/dist/sankhyablocks/p-51833248.js +7 -0
  268. package/dist/sankhyablocks/p-60dd1d27.entry.js +1 -0
  269. package/dist/sankhyablocks/p-6416975c.js +56 -0
  270. package/dist/sankhyablocks/{p-ad07f0c5.entry.js → p-65c5d430.entry.js} +1 -1
  271. package/dist/sankhyablocks/{p-21a81901.entry.js → p-667cab42.entry.js} +1 -1
  272. package/dist/sankhyablocks/p-67d6d0c8.entry.js +1 -0
  273. package/dist/sankhyablocks/p-6a4b21dd.js +1 -0
  274. package/dist/sankhyablocks/p-71a05822.entry.js +1 -0
  275. package/dist/sankhyablocks/p-72c8c847.entry.js +1 -0
  276. package/dist/sankhyablocks/{p-ac8d1cd6.entry.js → p-7345782c.entry.js} +1 -1
  277. package/dist/sankhyablocks/{p-885802c3.js → p-763b04fa.js} +1 -1
  278. package/dist/sankhyablocks/p-7de79adf.js +1 -0
  279. package/dist/sankhyablocks/p-7e250432.entry.js +1 -0
  280. package/dist/sankhyablocks/{p-47178038.entry.js → p-83c100f2.entry.js} +1 -1
  281. package/dist/sankhyablocks/p-84345e7a.js +1 -0
  282. package/dist/sankhyablocks/p-86bd4478.entry.js +1 -0
  283. package/dist/sankhyablocks/p-9019a32f.js +1 -0
  284. package/dist/sankhyablocks/{p-54a5d52a.entry.js → p-90805683.entry.js} +1 -1
  285. package/dist/sankhyablocks/{p-c2e468c9.entry.js → p-91a9abb6.entry.js} +1 -1
  286. package/dist/sankhyablocks/p-9751c42f.entry.js +1 -0
  287. package/dist/sankhyablocks/{p-057fad05.js → p-988afe78.js} +1 -1
  288. package/dist/sankhyablocks/{p-16a1dd18.entry.js → p-9a63f3f7.entry.js} +1 -1
  289. package/dist/sankhyablocks/{p-90684a75.entry.js → p-9ad3557c.entry.js} +1 -1
  290. package/dist/sankhyablocks/{p-b6200d32.entry.js → p-9fd87bfd.entry.js} +1 -1
  291. package/dist/sankhyablocks/p-a06bf7b9.entry.js +1 -0
  292. package/dist/sankhyablocks/{p-33718dfc.entry.js → p-a227b650.entry.js} +1 -1
  293. package/dist/sankhyablocks/{p-5e9fbd76.js → p-a349689a.js} +1 -1
  294. package/dist/sankhyablocks/p-a5bb2f93.entry.js +1 -0
  295. package/dist/sankhyablocks/{p-ebdb9d89.js → p-a6513fcb.js} +1 -1
  296. package/dist/sankhyablocks/{p-8c235d4c.entry.js → p-a76e6d51.entry.js} +1 -1
  297. package/dist/sankhyablocks/p-b568c1d4.js +1 -0
  298. package/dist/sankhyablocks/p-bd665460.entry.js +1 -0
  299. package/dist/sankhyablocks/p-c3324d79.entry.js +1 -0
  300. package/dist/sankhyablocks/{p-bf2acf72.entry.js → p-c6a8a8bc.entry.js} +1 -1
  301. package/dist/sankhyablocks/{p-165cde3b.entry.js → p-c926cf6b.entry.js} +1 -1
  302. package/dist/sankhyablocks/p-cfd0a4c6.entry.js +1 -0
  303. package/dist/sankhyablocks/{p-79f823f3.entry.js → p-d67526b6.entry.js} +1 -1
  304. package/dist/sankhyablocks/{p-d2d301a6.js → p-d8d8169b.js} +1 -1
  305. package/dist/sankhyablocks/{p-5f157b09.entry.js → p-dff65083.entry.js} +1 -1
  306. package/dist/sankhyablocks/{p-4a93daef.entry.js → p-e3521eae.entry.js} +1 -1
  307. package/dist/sankhyablocks/p-e7cccc45.entry.js +1 -0
  308. package/dist/sankhyablocks/p-fc0b609e.js +1 -0
  309. package/dist/sankhyablocks/p-ff7060bc.entry.js +1 -0
  310. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  311. package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
  312. package/dist/types/components/snk-crud/snk-crud.d.ts +4 -7
  313. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +12 -0
  314. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +11 -1
  315. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +6 -6
  316. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +16 -4
  317. package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.d.ts +27 -0
  318. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -3
  319. package/dist/types/components/snk-filter-bar/types/default-filters.d.ts +5 -0
  320. package/dist/types/components/snk-filter-bar/types/filter-type.enum.d.ts +2 -1
  321. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -3
  322. package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +31 -0
  323. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +3 -3
  324. package/dist/types/components/snk-form-config/config-header/config-header.d.ts +23 -0
  325. package/dist/types/components/snk-form-config/config-header/configs-button/configs-button.d.ts +19 -0
  326. package/dist/types/components/snk-form-config/field-item/field-config/field-config.d.ts +56 -0
  327. package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +63 -0
  328. package/dist/types/components/snk-form-config/fields-selector/fields-selector.d.ts +18 -0
  329. package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +42 -0
  330. package/dist/types/components/snk-form-config/snk-form-config.d.ts +51 -120
  331. package/dist/types/components/snk-grid/snk-grid.d.ts +13 -7
  332. package/dist/types/components/snk-personalized-filter/interfaces/index.d.ts +4 -0
  333. package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +7 -1
  334. package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.d.ts +4 -0
  335. package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +4 -0
  336. package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.d.ts +4 -0
  337. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +1 -0
  338. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -10
  339. package/dist/types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.d.ts +44 -0
  340. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +5 -0
  341. package/dist/types/components.d.ts +391 -211
  342. package/dist/types/lib/configs/ConfigStorage.d.ts +4 -2
  343. package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +8 -4
  344. package/dist/types/lib/utils/constants.d.ts +6 -0
  345. package/package.json +8 -6
  346. package/react/components.d.ts +9 -3
  347. package/react/components.js +9 -3
  348. package/react/components.js.map +1 -1
  349. package/dist/cjs/Sortable-fb1c4cbb.js +0 -2853
  350. package/dist/cjs/snk-config-options_3.cjs.entry.js +0 -1390
  351. package/dist/cjs/snk-field-config.cjs.entry.js +0 -60
  352. package/dist/cjs/snk-tab-config.cjs.entry.js +0 -332
  353. package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.css +0 -16
  354. package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js +0 -346
  355. package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.css +0 -219
  356. package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.js +0 -184
  357. package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.css +0 -323
  358. package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js +0 -527
  359. package/dist/collection/components/snk-taskbar/subcomponents/field-search.js +0 -31
  360. package/dist/components/snk-config-options.js +0 -6
  361. package/dist/components/snk-config-options2.js +0 -257
  362. package/dist/components/snk-field-config.js +0 -6
  363. package/dist/components/snk-field-config2.js +0 -76
  364. package/dist/components/snk-tab-config.js +0 -6
  365. package/dist/components/snk-tab-config2.js +0 -3202
  366. package/dist/esm/Sortable-83960219.js +0 -2851
  367. package/dist/esm/snk-config-options_3.entry.js +0 -1384
  368. package/dist/esm/snk-field-config.entry.js +0 -56
  369. package/dist/esm/snk-tab-config.entry.js +0 -328
  370. package/dist/sankhyablocks/p-03b68a74.js +0 -56
  371. package/dist/sankhyablocks/p-1db45d26.entry.js +0 -1
  372. package/dist/sankhyablocks/p-1ee379ce.entry.js +0 -1
  373. package/dist/sankhyablocks/p-23736d75.js +0 -1
  374. package/dist/sankhyablocks/p-3749dffb.entry.js +0 -1
  375. package/dist/sankhyablocks/p-3ab6df3d.entry.js +0 -1
  376. package/dist/sankhyablocks/p-3c9794dc.entry.js +0 -1
  377. package/dist/sankhyablocks/p-42dd1346.js +0 -1
  378. package/dist/sankhyablocks/p-5ffa0493.entry.js +0 -1
  379. package/dist/sankhyablocks/p-60137b7a.entry.js +0 -1
  380. package/dist/sankhyablocks/p-7b920eb8.entry.js +0 -1
  381. package/dist/sankhyablocks/p-80f8c22c.js +0 -1
  382. package/dist/sankhyablocks/p-847449f8.entry.js +0 -1
  383. package/dist/sankhyablocks/p-9261d8a0.js +0 -1
  384. package/dist/sankhyablocks/p-933c0c0b.js +0 -1
  385. package/dist/sankhyablocks/p-979ecc40.entry.js +0 -1
  386. package/dist/sankhyablocks/p-a3f5ebb6.entry.js +0 -1
  387. package/dist/sankhyablocks/p-aadd3911.entry.js +0 -1
  388. package/dist/sankhyablocks/p-bfdf92e9.entry.js +0 -1
  389. package/dist/sankhyablocks/p-c0eb761b.entry.js +0 -1
  390. package/dist/sankhyablocks/p-c8b3cb54.js +0 -1
  391. package/dist/sankhyablocks/p-d31a701e.entry.js +0 -1
  392. package/dist/sankhyablocks/p-d9804798.js +0 -1
  393. package/dist/sankhyablocks/p-dc6ad9a6.entry.js +0 -1
  394. package/dist/sankhyablocks/p-dce8e631.entry.js +0 -1
  395. package/dist/sankhyablocks/p-fa816fb2.js +0 -1
  396. package/dist/types/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.d.ts +0 -57
  397. package/dist/types/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.d.ts +0 -43
  398. package/dist/types/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -105
  399. package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +0 -4
@@ -9,9 +9,9 @@ const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetad
9
9
  const dataunitFetcher = require('./dataunit-fetcher-a723f0dc.js');
10
10
  require('./filter-item-type.enum-a7ffdaa6.js');
11
11
  require('./form-config-fetcher-40d3f752.js');
12
- require('./constants-77c1b8bd.js');
12
+ require('./constants-6d82e405.js');
13
13
  const InMemoryFilterColumnDataSource = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
14
- const index = require('./index-f9e81701.js');
14
+ const index = require('./index-1cf293c1.js');
15
15
  const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
16
16
  const IFetchDataExporterParams = require('./IFetchDataExporterParams-e78ec415.js');
17
17
 
@@ -184,16 +184,30 @@ class FilterBarConfigFetcher extends formConfigFetcher.ResourceFetcher {
184
184
 
185
185
  class PersonalizedFilterFetcher {
186
186
  constructor() {
187
+ this.DEFAULT_RESOURCE = '_default';
187
188
  this.templateByQuery = new Map();
188
189
  this.buildTemplates();
189
190
  }
190
- resolveURI(resourceID, configName) {
191
+ resolveURI(resourceID, configName, isDefault) {
191
192
  let uri = "filter-assistent-config://" + resourceID;
192
193
  if (configName) {
193
194
  uri += "." + configName;
194
195
  }
196
+ if (isDefault) {
197
+ uri += this.DEFAULT_RESOURCE;
198
+ }
195
199
  return uri;
196
200
  }
201
+ resolveLegacyConfigName(legacyConfigName, isDefault) {
202
+ if (!legacyConfigName) {
203
+ return '';
204
+ }
205
+ let legacyConfig = `?legacyResourceID=${legacyConfigName}`;
206
+ if (isDefault) {
207
+ legacyConfig += this.DEFAULT_RESOURCE;
208
+ }
209
+ return legacyConfig;
210
+ }
197
211
  buildTemplates() {
198
212
  this.templateByQuery.set("fetchFilterFields", DataFetcher.dist.gql `
199
213
  query($name: String!) {
@@ -256,11 +270,14 @@ class PersonalizedFilterFetcher {
256
270
  }
257
271
  }`);
258
272
  }
259
- async loadPersonalizedFilter(resourceID, filterID, configName, legacyConfigName) {
273
+ async loadDefaultFilter(resourceID, filterID, configName, legacyConfigName) {
274
+ return this.loadPersonalizedFilter(resourceID, filterID, configName, legacyConfigName, true);
275
+ }
276
+ async loadPersonalizedFilter(resourceID, filterID, configName, legacyConfigName, isDefault) {
260
277
  return new Promise((resolve, reject) => {
261
278
  DataFetcher.DataFetcher.get()
262
279
  .callGraphQL({
263
- values: { name: this.resolveURI(resourceID, configName) + "/" + filterID + this.resolveLegacyConfigName(legacyConfigName) },
280
+ values: { name: this.resolveURI(resourceID, configName, isDefault) + "/" + filterID + this.resolveLegacyConfigName(legacyConfigName, isDefault) },
264
281
  query: this.templateByQuery.get("fetchFilterAssistent"),
265
282
  })
266
283
  .then((resp) => {
@@ -272,10 +289,10 @@ class PersonalizedFilterFetcher {
272
289
  });
273
290
  });
274
291
  }
275
- resolveLegacyConfigName(legacyConfigName) {
276
- return legacyConfigName ? `?legacyResourceID=${legacyConfigName}` : '';
292
+ async saveDefaultFilter(personalizedFilter, resourceID, configName) {
293
+ return this.savePersonalizedFilter(personalizedFilter, resourceID, configName, true);
277
294
  }
278
- async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
295
+ async savePersonalizedFilter(personalizedFilter, resourceID, configName, isDefault) {
279
296
  if (!personalizedFilter || Object.keys(personalizedFilter).length == 0) {
280
297
  return Promise.reject(new Error("personalizedFilter não pode ser vazio"));
281
298
  }
@@ -284,7 +301,7 @@ class PersonalizedFilterFetcher {
284
301
  return new Promise((resolve, reject) => {
285
302
  DataFetcher.DataFetcher.get()
286
303
  .callGraphQL({
287
- values: { name: this.resolveURI(resourceID, configName), filterAssistent: personalizedFilterParsed },
304
+ values: { name: this.resolveURI(resourceID, configName, isDefault), filterAssistent: personalizedFilterParsed },
288
305
  query: this.templateByQuery.get("savePersonalizedFilter"),
289
306
  })
290
307
  .then((resp) => {
@@ -295,11 +312,14 @@ class PersonalizedFilterFetcher {
295
312
  });
296
313
  });
297
314
  }
298
- async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
315
+ removeDefaultFilter(personalizedFilter, resourceID, configName) {
316
+ return this.removePersonalizedFilter(personalizedFilter, resourceID, configName, true);
317
+ }
318
+ async removePersonalizedFilter(personalizedFilter, resourceID, configName, isDefault) {
299
319
  return new Promise((resolve, reject) => {
300
320
  DataFetcher.DataFetcher.get()
301
321
  .callGraphQL({
302
- values: { name: this.resolveURI(resourceID, configName), filterId: personalizedFilter.id },
322
+ values: { name: this.resolveURI(resourceID, configName, isDefault), filterId: personalizedFilter.id },
303
323
  query: this.templateByQuery.get("deletePersonalizedFilter"),
304
324
  })
305
325
  .then((resp) => {
@@ -364,15 +384,15 @@ var CONFIG_SOURCE;
364
384
  })(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
365
385
  class ConfigStorage {
366
386
  static addFilterBarLegacyConfig(configName, legacyConfigName) {
367
- this.validateConfigName(configName, legacyConfigName);
387
+ this.validateResourceId(legacyConfigName);
368
388
  this.filterBarLegacyConfig.set(configName, legacyConfigName);
369
389
  }
370
390
  static addFormLegacyConfig(configName, legacyConfigName) {
371
- this.validateConfigName(configName, legacyConfigName);
391
+ this.validateResourceId(legacyConfigName);
372
392
  this.formLegacyConfig.set(configName, legacyConfigName);
373
393
  }
374
394
  static addGridLegacyConfig(configName, legacyConfigName) {
375
- this.validateConfigName(configName, legacyConfigName);
395
+ this.validateResourceId(legacyConfigName);
376
396
  this.gridLegacyConfig.set(configName, legacyConfigName);
377
397
  }
378
398
  static preload(resourceID, configName, legacyConfigs) {
@@ -429,6 +449,10 @@ class ConfigStorage {
429
449
  await this.deleteGridConfigCache(name, resourceID);
430
450
  return this.gridConfigFetcher.saveConfig(config, name, resourceID);
431
451
  }
452
+ static async loadDefaultFilter(filterId, resourceID, configName) {
453
+ const legacyConfigName = this.filterBarLegacyConfig.get(configName);
454
+ return this.personalizedFilterFetcher.loadDefaultFilter(resourceID, filterId, configName, legacyConfigName);
455
+ }
432
456
  static async loadPersonalizedFilter(filterId, resourceID, configName) {
433
457
  const legacyConfigName = this.filterBarLegacyConfig.get(configName);
434
458
  return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName, legacyConfigName);
@@ -439,6 +463,13 @@ class ConfigStorage {
439
463
  await this.deleteFilterBarConfigCache(configName, resourceID);
440
464
  return this.personalizedFilterFetcher.savePersonalizedFilter(personalizedFilter, resourceID, configName);
441
465
  }
466
+ static async saveDefaultFilter(personalizedFilter, resourceID, configName) {
467
+ await this.deleteFilterBarConfigCache(configName, resourceID);
468
+ return this.personalizedFilterFetcher.saveDefaultFilter(personalizedFilter, resourceID, configName);
469
+ }
470
+ static async removeDefaultFilter(personalizedFilter, resourceID, configName) {
471
+ return this.personalizedFilterFetcher.removeDefaultFilter(personalizedFilter, resourceID, configName);
472
+ }
442
473
  static async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
443
474
  return this.personalizedFilterFetcher.removePersonalizedFilter(personalizedFilter, resourceID, configName);
444
475
  }
@@ -454,10 +485,8 @@ class ConfigStorage {
454
485
  static async deleteFilterBarConfigCache(name, resourceID) {
455
486
  await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
456
487
  }
457
- static validateConfigName(configName, legacyConfigName) {
458
- if (!configName)
459
- throw Error(this.CONFIG_NAME_ERROR_MESSAGE);
460
- if (!legacyConfigName)
488
+ static validateResourceId(resourceId) {
489
+ if (!resourceId)
461
490
  throw Error(this.LEGACY_CONFIG_NAME_ERROR_MESSAGE);
462
491
  }
463
492
  static handleLegacyConfig(configName, configSource, urlParams) {
@@ -497,7 +526,6 @@ class ConfigStorage {
497
526
  return `req_${source}_${name}_${resourceID}`;
498
527
  }
499
528
  }
500
- ConfigStorage.CONFIG_NAME_ERROR_MESSAGE = "ConfigName precisa ser informado.";
501
529
  ConfigStorage.LEGACY_CONFIG_NAME_ERROR_MESSAGE = "LegacyConfigName precisa ser informado.";
502
530
  ConfigStorage.filterBarLegacyConfig = new Map();
503
531
  ConfigStorage.formLegacyConfig = new Map();
@@ -0,0 +1,260 @@
1
+ 'use strict';
2
+
3
+ const core = require('@sankhyalabs/core');
4
+ const constants = require('./constants-6d82e405.js');
5
+
6
+ const iconMap = new Map([
7
+ [core.UserInterface.DATE, 'calendar'],
8
+ [core.UserInterface.DATETIME, 'calendar-clock'],
9
+ [core.UserInterface.ELAPSEDTIME, 'timer-outline'],
10
+ [core.UserInterface.TIME, 'timer-outline'],
11
+ [core.UserInterface.DECIMALNUMBER, 'number'],
12
+ [core.UserInterface.INTEGERNUMBER, 'number'],
13
+ [core.UserInterface.FILE, 'zip'],
14
+ [core.UserInterface.IMAGE, 'pdf'],
15
+ [core.UserInterface.HTML, 'tag_code'],
16
+ [core.UserInterface.SEARCH, 'search'],
17
+ [core.UserInterface.SEARCHPLUS, 'search'],
18
+ [core.UserInterface.OPTIONSELECTOR, 'list'],
19
+ [core.UserInterface.CHECKBOX, 'list'],
20
+ [core.UserInterface.SWITCH, 'boolean'],
21
+ [core.UserInterface.PASSWORD, 'eye-off'],
22
+ ]);
23
+ const ID_AVAILABLE_FIELDS = 'container-available-fields';
24
+ exports.SORTABLE_PATH = void 0;
25
+ (function (SORTABLE_PATH) {
26
+ SORTABLE_PATH["FROM"] = "from";
27
+ SORTABLE_PATH["TO"] = "to";
28
+ })(exports.SORTABLE_PATH || (exports.SORTABLE_PATH = {}));
29
+ function getFieldsStructure(evt, path, group, tab) {
30
+ var _a;
31
+ const htmlStructure = (_a = evt === null || evt === void 0 ? void 0 : evt[path]) === null || _a === void 0 ? void 0 : _a.children;
32
+ if (!htmlStructure)
33
+ return [];
34
+ return Array.from(htmlStructure).map(({ fieldConfig }) => {
35
+ return Object.assign(Object.assign({}, fieldConfig), { group, tab });
36
+ });
37
+ }
38
+ function updateTabInFieldsFromGroupList(guideGroups, updatedName) {
39
+ return guideGroups.map(group => {
40
+ return Object.assign(Object.assign({}, group), { fields: group.fields.map(field => (Object.assign(Object.assign({}, field), { tab: updatedName }))) });
41
+ });
42
+ }
43
+ function getValidatedFieldValue(fieldValue, dataUnit, fieldName) {
44
+ var _a;
45
+ if (fieldValue == undefined || !dataUnit || !fieldName)
46
+ return;
47
+ const dataType = (_a = dataUnit.getField(fieldName)) === null || _a === void 0 ? void 0 : _a.dataType;
48
+ if (dataType == undefined)
49
+ return;
50
+ if ((fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.waitmessage) !== undefined)
51
+ return undefined;
52
+ const isNonObjectValue = dataType !== core.DataType.OBJECT &&
53
+ dataType !== core.DataType.DATE &&
54
+ typeof fieldValue === 'object';
55
+ const processedValue = isNonObjectValue ? fieldValue.value : fieldValue;
56
+ return dataType === core.DataType.OBJECT
57
+ ? JSON.stringify(processedValue)
58
+ : processedValue;
59
+ }
60
+ function getEnabledByProperty(attribName, propertyName, fieldDescriptor) {
61
+ if (!fieldDescriptor)
62
+ return true;
63
+ const fieldProperties = fieldDescriptor.properties || {};
64
+ const fromAttribName = fieldDescriptor[attribName] !== true;
65
+ return fieldProperties.hasOwnProperty(propertyName)
66
+ ? fieldProperties[propertyName] !== 'S'
67
+ : fromAttribName;
68
+ }
69
+ function getValueByProperty(property, fieldDescriptor, defaultValue) {
70
+ if (fieldDescriptor && fieldDescriptor[property] === true) {
71
+ return true;
72
+ }
73
+ return defaultValue;
74
+ }
75
+ function getIconName(userInterface) {
76
+ return iconMap.get(userInterface) || 'text';
77
+ }
78
+ function buildNewGuideName(guidesList) {
79
+ var _a, _b;
80
+ const qtdWithNewGuideName = (_b = (_a = guidesList.filter(g => g.name.includes(constants.TAB_NAMES.newGuide))) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
81
+ return qtdWithNewGuideName === 0
82
+ ? constants.TAB_NAMES.newGuide
83
+ : `${constants.TAB_NAMES.newGuide} (${qtdWithNewGuideName})`;
84
+ }
85
+ function getFieldsToSave(guidesMap) {
86
+ const fieldsToSave = [];
87
+ guidesMap.forEach(groups => {
88
+ groups.forEach(({ fields }) => {
89
+ fields === null || fields === void 0 ? void 0 : fields.forEach((fieldConfig) => {
90
+ fieldsToSave.push(buildFieldToSave(fieldConfig));
91
+ });
92
+ });
93
+ });
94
+ return fieldsToSave;
95
+ }
96
+ function buildGuidesMap(rawFields, tabs, dataUnit, generalTab) {
97
+ const fields = handleFieldsTabNames(rawFields);
98
+ const guidesMap = initGuidesMap(tabs);
99
+ if (!(fields === null || fields === void 0 ? void 0 : fields.length))
100
+ return;
101
+ for (let guideName of guidesMap.keys()) {
102
+ const fieldsFromGuide = getFieldsFromGuide(fields, guideName, generalTab);
103
+ const fieldsByGroupMap = getGroupsFromGuide(fieldsFromGuide, dataUnit, generalTab);
104
+ const groupsList = parserGroupMapIntoList(fieldsByGroupMap);
105
+ guidesMap.set(guideName, groupsList);
106
+ }
107
+ return guidesMap;
108
+ }
109
+ function buildGuides(config, mainArea) {
110
+ let tabs = config.tabs ? [...config.tabs] : buildTabsFromFields(config === null || config === void 0 ? void 0 : config.fields);
111
+ tabs = getPossibleGuides(tabs);
112
+ tabs = initializeTabsNames(tabs);
113
+ return handleMainTab(tabs, mainArea);
114
+ }
115
+ function handleFieldsTabNames(allFields) {
116
+ // Campos que não fazem parte de nenhuma aba ou da aba "Geral", devem ser movidos para a aba __main.
117
+ return allFields.map(field => {
118
+ const tabName = field.tab;
119
+ return Object.assign(Object.assign({}, field), { tab: (!tabName || tabName === constants.TAB_NAMES.general) ? constants.TAB_NAMES.main : field.tab });
120
+ });
121
+ }
122
+ function initializeTabsNames(tabs) {
123
+ return tabs.map((tab) => {
124
+ return Object.assign(Object.assign({}, tab), { name: tab.name ? tab.name : tab.label });
125
+ });
126
+ }
127
+ function handleMainTab(tabs, mainTabName) {
128
+ const mainTab = { name: constants.TAB_NAMES.main, label: mainTabName, visible: true };
129
+ const hasTabMain = tabs.some((tab) => tab.name === constants.TAB_NAMES.main);
130
+ if (hasTabMain) {
131
+ tabs = tabs.map(tab => tab.name === constants.TAB_NAMES.main ? mainTab : tab);
132
+ }
133
+ else {
134
+ tabs.unshift(mainTab);
135
+ }
136
+ return tabs;
137
+ }
138
+ function getPossibleGuides(tabs) {
139
+ //O usuário não pode criar uma guia com o nome "Geral".
140
+ // Nesses casos, precisamos mover os campos dessa guia, para a guia __main.
141
+ return [...tabs.filter(tab => tab.label !== constants.TAB_NAMES.general)];
142
+ }
143
+ function initGuidesMap(tabs) {
144
+ const map = new Map();
145
+ let possibleGuides = getPossibleGuides(tabs);
146
+ possibleGuides.forEach(tab => {
147
+ map.set(tab.name, []);
148
+ });
149
+ return map;
150
+ }
151
+ function handleFieldLabel(field, fieldDescriptor) {
152
+ if (!field.label) {
153
+ field.label = fieldDescriptor.label;
154
+ }
155
+ }
156
+ function handleFieldTab(field, generalTabName) {
157
+ if (!field.tab) {
158
+ field.tab = generalTabName;
159
+ }
160
+ }
161
+ function handleFieldGroup(field) {
162
+ if (!field.group) {
163
+ field.group = constants.GROUP_NAMES.noGroup;
164
+ }
165
+ }
166
+ function isVisibleOnConfig(fieldDescriptor) {
167
+ var _a;
168
+ /**
169
+ * Quando um campo é ocultado pelo dev, mas queremos manter ele na config precisamos fazer essa tratativa.
170
+ */
171
+ 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;
172
+ }
173
+ function getGroupsFromGuide(fieldsFromGuide, dataUnit, generalTabName) {
174
+ const groupsMap = new Map();
175
+ groupsMap.set(constants.GROUP_NAMES.noGroup, []);
176
+ for (let field of fieldsFromGuide) {
177
+ const fieldDescriptor = dataUnit.getField(field.name);
178
+ if (!(fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.visible) && !isVisibleOnConfig(fieldDescriptor))
179
+ continue;
180
+ handleFieldLabel(field, fieldDescriptor);
181
+ handleFieldTab(field, generalTabName);
182
+ handleFieldGroup(field);
183
+ if (groupsMap.has(field.group)) {
184
+ groupsMap.get(field.group).push(field);
185
+ }
186
+ else {
187
+ groupsMap.set(field.group, [field]);
188
+ }
189
+ }
190
+ return groupsMap;
191
+ }
192
+ function getFieldsFromGuide(fields, guideName, generalTabName) {
193
+ return fields.filter(field => {
194
+ const fieldTab = getTabName(field.tab, generalTabName);
195
+ return fieldTab === guideName;
196
+ });
197
+ }
198
+ function getTabName(tab, generalTabName) {
199
+ var _a;
200
+ if (typeof tab === 'string')
201
+ return tab;
202
+ return (_a = tab === null || tab === void 0 ? void 0 : tab.label) !== null && _a !== void 0 ? _a : generalTabName;
203
+ }
204
+ function parserGroupMapIntoList(groupsMap) {
205
+ const groupsList = [];
206
+ for (let groupName of groupsMap.keys()) {
207
+ groupsList.push({ name: groupName, fields: groupsMap.get(groupName) });
208
+ }
209
+ return groupsList;
210
+ }
211
+ function canAddTab(tab, guideList) {
212
+ return tab && !(guideList.map(g => g.name).includes(tab));
213
+ }
214
+ function buildTabsFromFields(fields) {
215
+ const guideList = [];
216
+ let order = 1;
217
+ fields === null || fields === void 0 ? void 0 : fields.forEach((field) => {
218
+ const tab = field.tab;
219
+ if (canAddTab(tab, guideList)) {
220
+ guideList.push({ name: tab, label: tab, visible: true, order });
221
+ order = order + 1;
222
+ }
223
+ });
224
+ return guideList;
225
+ }
226
+ function buildFieldToSave(fieldConfig) {
227
+ const fieldToSave = {
228
+ cleanOnCopy: fieldConfig.cleanOnCopy || false,
229
+ group: fieldConfig.group === constants.GROUP_NAMES.noGroup ? undefined : fieldConfig.group,
230
+ label: fieldConfig.label,
231
+ name: fieldConfig.name,
232
+ required: fieldConfig.required,
233
+ readOnly: fieldConfig.readOnly,
234
+ tab: fieldConfig.tab,
235
+ };
236
+ if (fieldConfig.defaultValue != undefined) {
237
+ if (fieldConfig.defaultValue.type == undefined) {
238
+ fieldToSave.defaultValue = {
239
+ type: constants.DEFAULT_TYPE.fixed,
240
+ value: fieldConfig.defaultValue,
241
+ };
242
+ }
243
+ else {
244
+ fieldToSave.defaultValue = fieldConfig.defaultValue;
245
+ }
246
+ }
247
+ return fieldToSave;
248
+ }
249
+
250
+ exports.ID_AVAILABLE_FIELDS = ID_AVAILABLE_FIELDS;
251
+ exports.buildGuides = buildGuides;
252
+ exports.buildGuidesMap = buildGuidesMap;
253
+ exports.buildNewGuideName = buildNewGuideName;
254
+ exports.getEnabledByProperty = getEnabledByProperty;
255
+ exports.getFieldsStructure = getFieldsStructure;
256
+ exports.getFieldsToSave = getFieldsToSave;
257
+ exports.getIconName = getIconName;
258
+ exports.getValidatedFieldValue = getValidatedFieldValue;
259
+ exports.getValueByProperty = getValueByProperty;
260
+ exports.updateTabInFieldsFromGroupList = updateTabInFieldsFromGroupList;
@@ -2,7 +2,7 @@
2
2
 
3
3
  const core = require('@sankhyalabs/core');
4
4
  const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
5
- const index = require('./index-c5771aba.js');
5
+ const index = require('./index-62760a9c.js');
6
6
 
7
7
  class PersonalizedFilterUtils {
8
8
  /**
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const ConfigStorage = require('./ConfigStorage-df09fb78.js');
3
+ const ConfigStorage = require('./ConfigStorage-48ba265b.js');
4
4
  const core = require('@sankhyalabs/core');
5
5
  const formConfigFetcher = require('./form-config-fetcher-40d3f752.js');
6
- const constants = require('./constants-77c1b8bd.js');
6
+ const constants = require('./constants-6d82e405.js');
7
7
 
8
8
  class SnkFormConfigManager {
9
9
  constructor(configName, resourceID, onConfigChange, dataUnit) {
@@ -31,8 +31,7 @@ class SnkFormConfigManager {
31
31
  });
32
32
  }
33
33
  getEmptyConfig() {
34
- const config = this.buildFormMetadataUITabs({ fields: [], emptyConfig: true }, true);
35
- return config;
34
+ return this.buildFormMetadataUITabs({ fields: [], emptyConfig: true }, true);
36
35
  }
37
36
  saveConfig(config) {
38
37
  const configToSave = core.ObjectUtils.copy(config);
@@ -105,6 +105,12 @@ const snkFilterBarMessages = {
105
105
  "cancelButtonLabel": "Limpar tudo",
106
106
  "customFilters": "Filtros personalizados",
107
107
  "quickFilters": "Filtros rápidos",
108
+ "defaultFilter": {
109
+ "title": "Filtro padrão",
110
+ "edit": "Editar filtro",
111
+ "remove": "Excluir filtro",
112
+ "create": "Criar filtro padrão",
113
+ },
108
114
  "validations": {
109
115
  "notFullFilled": {
110
116
  "title": "Filtro parcialmente preenchido",
@@ -169,12 +175,13 @@ const snkCrudMessages = {
169
175
  update: "Alterar registro",
170
176
  clean: "{{ENTITY_NAME}}"
171
177
  },
172
- findColumn: "Buscar campos",
178
+ findColumn: "Buscar campos (Ctrl+F)",
173
179
  goBackTitle: "Voltar"
174
180
  };
175
181
 
176
182
  const snkSimpleCrudMessages = {
177
- findColumn: "Busca de colunas",
183
+ findColumn: "Busca de colunas (Ctrl+F)",
184
+ findFields: "Busca de campos (Ctrl+F)",
178
185
  formConfigUnavaliable: {
179
186
  title: "Aviso",
180
187
  message: 'A opção "Configurar formulário" será disponibilizada em breve. Enquanto isso, acesse a configuração do fomulário através dos layouts anteriores, HTML5 ou Flex.'
@@ -232,23 +239,37 @@ const snkFormConfigMessages = {
232
239
  mainArea: "Área principal",
233
240
  tabGeneral: "Geral"
234
241
  },
242
+ configs: {
243
+ buttonLabel: "Configurações",
244
+ selectedConfig: "configuração selecionada"
245
+ },
235
246
  confirm: {
236
247
  title: "Aviso",
237
248
  deleteTab: "Você realmente deseja excluir a aba",
249
+ deleteGuide: "Deseja realmente excluir a guia <b>{0}</b>?",
238
250
  cancel: "As alterações realizadas serão descartadas.<br/><br/><b>Gostaria de continuar?</b>",
239
251
  exit: "Ao sair as alterações serão descartadas.<br/><br/><b>Você realmente gostaria de sair?</b>",
240
- apply: "A <b>{0}</b> irá substituir a sua configuração {1}!<br/><br/><b>Deseja continuar?</b>",
252
+ apply: "A <b>{0}</b> irá substituir a configuração atual!<br/><br/><b>Deseja continuar?</b>",
241
253
  group: "Não é possível salvar as configurações com um grupo vazio!",
242
254
  labelCancel: "Cancelar",
243
255
  labelDelete: "Excluir"
244
256
  },
257
+ noGuideSelected: {
258
+ title: "Atenção",
259
+ message: "Selecione uma guia para iniciar a configuração!"
260
+ },
245
261
  alert: {
246
262
  titleGroupExists: "Já existe um grupo com título",
263
+ titleGroupEditing: "Há um <b>grupo<b/> em edição. <br/> Finalize a edição para salvar as configurações.",
264
+ titleGuideExists: "Já existe uma guia com título",
265
+ titleGuideEditing: "Há uma <b>guia<b/> em edição. <br/> Finalize a edição para salvar as configurações.",
266
+ titleGuideReservedName: "Este título é reservado para configurações internas do sistema e não pode ser utilizado.",
247
267
  infoValidTitle: "Por favor, digite um título válido.",
248
268
  inTab: "na aba"
249
269
  },
250
270
  info: {
251
- successfullyConfigSaved: "As configurações foram salvas com sucesso!"
271
+ successfullyConfigSaved: "As configurações foram salvas com sucesso!",
272
+ successfullyGuideDeleted: 'A guia "{0}" foi excluída. Salve para confirmar a alteração.'
252
273
  }
253
274
  };
254
275
  const snkFieldConfigMessages = {
@@ -273,7 +294,7 @@ const snkConfiguratorMessages = {
273
294
  };
274
295
 
275
296
  const snkGridMessages = {
276
- findColumn: "Busca de colunas",
297
+ findColumn: "Busca de colunas (Ctrl+F)",
277
298
  cancelConfirmation: {
278
299
  title: "Aviso",
279
300
  message: "As alterações realizadas serão descartadas<br/><br/><b>Você realmente gostaria de cancelar?</b>",
@@ -416,6 +437,8 @@ const snkPersonalizedFilterMessages = {
416
437
  info: {
417
438
  titleEdit: "Editar filtro personalizado",
418
439
  titleAdd: "Criar filtro personalizado",
440
+ titleCreateDefault: "Aplicar filtro padrão",
441
+ titleEditDefault: "Editar filtro padrão",
419
442
  titleCollapsible: "Expressão a ser aplicada (gerada pelo assistente)",
420
443
  labelSearchField: "Buscar campo",
421
444
  labelOperator: "Operador",
@@ -438,7 +461,10 @@ const snkPersonalizedFilterMessages = {
438
461
  applyExpression: "Expressão a ser aplicada:",
439
462
  tooltipDisabledAssistentMode: "Expressão não suportada pelo assistente.",
440
463
  activeModeAdvanced: "Ativar modo avançado",
441
- activeModeAssistent: "Ativar modo assistente"
464
+ activeModeAssistent: "Ativar modo assistente",
465
+ textInputDisabled: "Campo desabilitado para filtros padrões",
466
+ checkVariableDisabled: "Filtro padrão não pode ser variável.",
467
+ deleteDefaultFilterConfirm: "Deseja excluir o <b>filtro padrão</b>?",
442
468
  },
443
469
  confirmExpression: {
444
470
  title: "Aviso",
@@ -0,0 +1,79 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-1cf293c1.js');
6
+ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
7
+
8
+ 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}";
9
+
10
+ const ConfigHeader = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.configClose = index.createEvent(this, "configClose", 7);
14
+ this.saveConfig = index.createEvent(this, "saveConfig", 7);
15
+ this.isEditingGuide = false;
16
+ this.isEditingGroup = false;
17
+ this.configOptions = [];
18
+ this.selectedConfig = undefined;
19
+ this.messagesBuilder = undefined;
20
+ this.hasChanges = false;
21
+ this.optionConfigChanged = false;
22
+ }
23
+ handleIsEditingGuideName({ detail }) {
24
+ this.isEditingGuide = detail;
25
+ }
26
+ handleIsEditingGroupName({ detail }) {
27
+ this.isEditingGroup = detail;
28
+ }
29
+ saveFormConfig() {
30
+ if (this.isEditingGuide || this.isEditingGroup) {
31
+ const title = this.getMessage('snkFormConfig.confirm.title');
32
+ const message = this.isEditingGuide
33
+ ? this.getMessage('snkFormConfig.alert.titleGuideEditing')
34
+ : this.getMessage('snkFormConfig.alert.titleGroupEditing');
35
+ utils.ApplicationUtils.alert(title, message);
36
+ return;
37
+ }
38
+ this.saveConfig.emit();
39
+ }
40
+ async closeFormConfig() {
41
+ if (this.hasChanges) {
42
+ const title = this.getMessage('snkFormConfig.confirm.title');
43
+ const msg = this.getMessage('snkFormConfig.confirm.cancel');
44
+ const confirm = await utils.ApplicationUtils.confirm(title, msg);
45
+ if (!confirm)
46
+ return;
47
+ }
48
+ this.configClose.emit();
49
+ }
50
+ getMessage(key, params) {
51
+ return this.messagesBuilder.getMessage(key, params);
52
+ }
53
+ openConfirmDialog(msg = '', title = this.getMessage('snkFormConfig.confirm.title')) {
54
+ return utils.ApplicationUtils.confirm(title, msg);
55
+ }
56
+ async applyOptionConfig() {
57
+ var _a, _b;
58
+ const name = (_b = (_a = this.selectedConfig) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : this.getMessage('snkFormConfig.configs.selectedConfig');
59
+ const msg = this.getMessage('snkFormConfig.confirm.apply').replace('{0}', name);
60
+ const confirm = await this.openConfirmDialog(msg);
61
+ if (confirm) {
62
+ this.saveConfig.emit();
63
+ }
64
+ }
65
+ renderSaveActions() {
66
+ if (!this.hasChanges && !this.optionConfigChanged)
67
+ return;
68
+ if (this.hasChanges) {
69
+ return (index.h("div", { class: "right-group" }, index.h("ez-button", { title: 'Cancelar', label: 'Cancelar', onClick: this.closeFormConfig.bind(this), size: "medium" }), index.h("ez-button", { title: 'Salvar', label: 'Salvar', class: 'ez-button--primary ez-padding-left--medium', onClick: () => this.saveFormConfig(), size: "medium" })));
70
+ }
71
+ return (index.h("div", { class: "right-group" }, index.h("ez-button", { title: 'Cancelar', label: 'Cancelar', onClick: this.closeFormConfig.bind(this), size: "medium" }), index.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" })));
72
+ }
73
+ render() {
74
+ return (index.h(index.Host, null, index.h("div", { class: 'left-group' }, index.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" }), index.h("h1", { class: "ez-title ez-title--primary ez-title--extra-large ez-padding--small" }, this.getMessage('snkFormConfig.title')), index.h("configs-button", { hasChanges: this.hasChanges, configOptions: this.configOptions, selectedConfig: this.selectedConfig, messagesBuilder: this.messagesBuilder })), this.renderSaveActions()));
75
+ }
76
+ };
77
+ ConfigHeader.style = configHeaderCss;
78
+
79
+ exports.config_header = ConfigHeader;