@sankhyalabs/sankhyablocks 10.1.0-dev.3 → 10.1.0-dev.31

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 (376) hide show
  1. package/dist/cjs/{ConfigStorage-b29e31be.js → ConfigStorage-d9d24844.js} +2 -2
  2. package/dist/cjs/{DataFetcher-ed9d97ea.js → DataFetcher-3a8ea521.js} +2 -2733
  3. package/dist/cjs/{FormConfigHelper-ebb77625.js → FormConfigHelper-28fe4668.js} +44 -0
  4. package/dist/cjs/{ISave-81eb2fbc.js → ISave-a66bb65e.js} +1 -1
  5. package/dist/cjs/ImageUtils-5e3f406b.js +142 -0
  6. package/dist/cjs/{PersonalizedFilterUtils-7259cf65.js → PersonalizedFilterUtils-eccb267a.js} +13 -0
  7. package/dist/cjs/{SnkFormConfigManager-6838389c.js → SnkFormConfigManager-c88cf1e9.js} +7 -7
  8. package/dist/cjs/SnkMessageBuilder-d9558dba.js +2809 -0
  9. package/dist/cjs/{SnkMultiSelectionListDataSource-1e804147.js → SnkMultiSelectionListDataSource-a891430e.js} +5 -5
  10. package/dist/cjs/{auth-fetcher-cc28d847.js → auth-fetcher-faa61f64.js} +1 -1
  11. package/dist/cjs/config-header.cjs.entry.js +1 -1
  12. package/dist/cjs/configs-button.cjs.entry.js +1 -1
  13. package/dist/cjs/css-shim-a27d231b.js +6 -0
  14. package/dist/cjs/{dataunit-fetcher-ab1cc071.js → dataunit-fetcher-4320f7ec.js} +3 -2
  15. package/dist/cjs/dom-ff96a4bc.js +75 -0
  16. package/dist/cjs/field-config_2.cjs.entry.js +3 -3
  17. package/dist/cjs/fields-layout.cjs.entry.js +7 -4
  18. package/dist/cjs/fields-selector.cjs.entry.js +2 -2
  19. package/dist/cjs/{form-config-fetcher-f0897eb5.js → form-config-fetcher-72cf0e3d.js} +1 -1
  20. package/dist/cjs/guides-configurator.cjs.entry.js +6 -4
  21. package/dist/cjs/{index-1cf293c1.js → index-1894343a.js} +1525 -173
  22. package/dist/cjs/{index-13d05f03.js → index-f0fe7e6e.js} +90 -21
  23. package/dist/cjs/loader.cjs.js +16 -2
  24. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +6 -5
  25. package/dist/cjs/sankhyablocks.cjs.js +132 -4
  26. package/dist/cjs/shadow-css-7e3e0ab1.js +389 -0
  27. package/dist/cjs/{snk-actions-button_9.cjs.entry.js → snk-actions-button_8.cjs.entry.js} +20 -61
  28. package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
  29. package/dist/cjs/snk-application.cjs.entry.js +29 -9
  30. package/dist/cjs/snk-attach.cjs.entry.js +10 -9
  31. package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
  32. package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
  33. package/dist/cjs/snk-crud.cjs.entry.js +18 -10
  34. package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
  35. package/dist/cjs/snk-custom-slot-guide.cjs.entry.js +40 -0
  36. package/dist/cjs/snk-data-exporter.cjs.entry.js +7 -6
  37. package/dist/cjs/{snk-data-unit-68992932.js → snk-data-unit-b54fdf9a.js} +21 -12
  38. package/dist/cjs/snk-data-unit.cjs.entry.js +5 -4
  39. package/dist/cjs/snk-default-filter.cjs.entry.js +1 -1
  40. package/dist/cjs/snk-detail-view.cjs.entry.js +18 -14
  41. package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
  42. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  43. package/dist/cjs/snk-expression-group_2.cjs.entry.js +2 -2
  44. package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +2 -2
  45. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +67 -25
  46. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
  47. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
  48. package/dist/cjs/snk-filter-detail.cjs.entry.js +3 -3
  49. package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +2 -2
  50. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +5 -4
  51. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
  52. package/dist/cjs/snk-filter-number.cjs.entry.js +11 -7
  53. package/dist/cjs/snk-filter-period.cjs.entry.js +14 -7
  54. package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
  55. package/dist/cjs/snk-filter-text.cjs.entry.js +2 -2
  56. package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
  57. package/dist/cjs/snk-form-view.cjs.entry.js +73 -8
  58. package/dist/cjs/snk-form_2.cjs.entry.js +34 -10
  59. package/dist/cjs/snk-grid.cjs.entry.js +30 -19
  60. package/dist/cjs/{snk-guides-viewer-8b841753.js → snk-guides-viewer-58185ae3.js} +91 -42
  61. package/dist/cjs/snk-guides-viewer.cjs.entry.js +11 -10
  62. package/dist/cjs/snk-image-input.cjs.entry.js +148 -0
  63. package/dist/cjs/snk-layout-form-config.cjs.entry.js +72 -0
  64. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
  65. package/dist/cjs/snk-personalized-filter.cjs.entry.js +7 -6
  66. package/dist/cjs/snk-pesquisa.cjs.entry.js +6 -6
  67. package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
  68. package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
  69. package/dist/cjs/snk-simple-crud.cjs.entry.js +15 -21
  70. package/dist/cjs/snk-taskbar.cjs.entry.js +59 -47
  71. package/dist/cjs/{taskbar-elements-fb5d1e08.js → taskbar-elements-a94d4318.js} +6 -5
  72. package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
  73. package/dist/collection/collection-manifest.json +8 -1
  74. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +1 -0
  75. package/dist/collection/components/snk-application/snk-application.js +20 -2
  76. package/dist/collection/components/snk-attach/snk-attach.js +1 -1
  77. package/dist/collection/components/snk-crud/snk-crud.js +48 -3
  78. package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js +1 -1
  79. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +4 -1
  80. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +93 -8
  81. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +138 -36
  82. package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.css +3 -0
  83. package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.js +95 -0
  84. package/dist/collection/components/snk-data-unit/snk-data-unit.js +9 -0
  85. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +13 -9
  86. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +14 -7
  87. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +1 -1
  88. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +1 -1
  89. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css +4 -0
  90. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +5 -1
  91. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +1 -0
  92. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +15 -4
  93. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +46 -13
  94. package/dist/collection/components/snk-form-config/FormConfigHelper.js +42 -0
  95. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -6
  96. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +1 -0
  97. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +16 -0
  98. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +6 -3
  99. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +3 -3
  100. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +5 -3
  101. package/dist/collection/components/snk-form-config/snk-form-config.js +53 -6
  102. package/dist/collection/components/snk-grid/snk-grid.css +12 -0
  103. package/dist/collection/components/snk-grid/snk-grid.js +22 -12
  104. package/dist/collection/components/snk-grid-config/snk-grid-config.js +12 -4
  105. package/dist/collection/components/snk-image-input/snk-image-input.css +3 -0
  106. package/dist/collection/components/snk-image-input/snk-image-input.js +326 -0
  107. package/dist/collection/components/snk-image-input/utils/ImageUtils.js +133 -0
  108. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +1 -1
  109. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +1 -1
  110. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +13 -0
  111. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +0 -4
  112. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +23 -12
  113. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +4 -3
  114. package/dist/collection/components/snk-taskbar/snk-taskbar.js +58 -44
  115. package/dist/collection/lib/message/SnkMessageBuilder.js +11 -2
  116. package/dist/collection/lib/message/messageResourceEnUSUtils.js +2 -0
  117. package/dist/collection/lib/message/messageResourceEsESUtils.js +2 -0
  118. package/dist/collection/lib/message/messageResourcePtBRUtils.js +2 -0
  119. package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +1 -1
  120. package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +7 -0
  121. package/dist/collection/lib/message/resources/en-us/snk-image-input.msg.js +11 -0
  122. package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js +10 -2
  123. package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +1 -1
  124. package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +7 -0
  125. package/dist/collection/lib/message/resources/es-es/snk-image-input.msg.js +11 -0
  126. package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js +8 -0
  127. package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js +1 -1
  128. package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +1 -1
  129. package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +8 -1
  130. package/dist/collection/lib/message/resources/pt-br/snk-image-input.msg.js +11 -0
  131. package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js +10 -2
  132. package/dist/components/DataFetcher.js +3 -2713
  133. package/dist/components/PersonalizedFilterUtils.js +13 -0
  134. package/dist/components/SnkFormConfigManager.js +6 -6
  135. package/dist/components/SnkMessageBuilder.js +2807 -0
  136. package/dist/components/dataunit-fetcher.js +2 -1
  137. package/dist/components/field-config2.js +44 -2
  138. package/dist/components/fields-layout2.js +6 -3
  139. package/dist/components/guides-configurator2.js +5 -3
  140. package/dist/components/index.d.ts +2 -0
  141. package/dist/components/index.js +2 -0
  142. package/dist/components/index2.js +90 -21
  143. package/dist/components/snk-application2.js +22 -2
  144. package/dist/components/snk-attach2.js +3 -2
  145. package/dist/components/snk-crud.js +79 -65
  146. package/dist/components/snk-custom-slot-guide.d.ts +11 -0
  147. package/dist/components/snk-custom-slot-guide.js +55 -0
  148. package/dist/components/snk-data-unit2.js +10 -1
  149. package/dist/components/snk-detail-view2.js +186 -121
  150. package/dist/components/snk-filter-bar2.js +41 -14
  151. package/dist/components/snk-filter-detail2.js +1 -1
  152. package/dist/components/snk-filter-item2.js +6 -2
  153. package/dist/components/snk-filter-modal2.js +16 -6
  154. package/dist/components/snk-filter-number.js +12 -8
  155. package/dist/components/snk-filter-period.js +13 -6
  156. package/dist/components/snk-filter-text.js +1 -1
  157. package/dist/components/snk-form-config2.js +29 -5
  158. package/dist/components/snk-form-view2.js +82 -10
  159. package/dist/components/snk-grid-config2.js +12 -4
  160. package/dist/components/snk-grid2.js +22 -11
  161. package/dist/components/snk-image-input.d.ts +11 -0
  162. package/dist/components/snk-image-input.js +6 -0
  163. package/dist/components/snk-image-input2.js +302 -0
  164. package/dist/components/snk-layout-form-config2.js +1 -1
  165. package/dist/components/snk-pesquisa2.js +0 -1
  166. package/dist/components/snk-simple-crud2.js +6 -12
  167. package/dist/components/snk-taskbar2.js +61 -48
  168. package/dist/components/snk-view-representation2.js +1 -1
  169. package/dist/esm/{ConfigStorage-13d80e36.js → ConfigStorage-d15d2014.js} +2 -2
  170. package/dist/esm/{DataFetcher-f4ccd9f3.js → DataFetcher-1dd7e8c0.js} +3 -2713
  171. package/dist/esm/{FormConfigHelper-4e42f0b6.js → FormConfigHelper-d09669f3.js} +43 -1
  172. package/dist/esm/{ISave-288fa9df.js → ISave-498c4831.js} +1 -1
  173. package/dist/esm/ImageUtils-8fc8d905.js +136 -0
  174. package/dist/esm/{PersonalizedFilterUtils-2db38ff2.js → PersonalizedFilterUtils-d2439a9a.js} +13 -0
  175. package/dist/esm/{SnkFormConfigManager-3ee2937b.js → SnkFormConfigManager-86befa68.js} +7 -7
  176. package/dist/esm/SnkMessageBuilder-c0bc4424.js +2807 -0
  177. package/dist/esm/{SnkMultiSelectionListDataSource-5d3a93f2.js → SnkMultiSelectionListDataSource-14633bf6.js} +5 -5
  178. package/dist/esm/{auth-fetcher-59ab0c67.js → auth-fetcher-69cbda8d.js} +1 -1
  179. package/dist/esm/config-header.entry.js +1 -1
  180. package/dist/esm/configs-button.entry.js +1 -1
  181. package/dist/esm/css-shim-9f2d321e.js +4 -0
  182. package/dist/esm/{dataunit-fetcher-c4f9f222.js → dataunit-fetcher-3d5c4ae4.js} +2 -1
  183. package/dist/esm/dom-64053c71.js +73 -0
  184. package/dist/esm/field-config_2.entry.js +3 -3
  185. package/dist/esm/fields-layout.entry.js +7 -4
  186. package/dist/esm/fields-selector.entry.js +2 -2
  187. package/dist/esm/{form-config-fetcher-6a00fe9e.js → form-config-fetcher-fcc7b62f.js} +1 -1
  188. package/dist/esm/guides-configurator.entry.js +6 -4
  189. package/dist/esm/{index-479e1293.js → index-04f73a26.js} +1517 -173
  190. package/dist/esm/{index-446f9341.js → index-ea250be6.js} +90 -21
  191. package/dist/esm/loader.js +17 -3
  192. package/dist/esm/pesquisa-grid_2.entry.js +6 -5
  193. package/dist/esm/sankhyablocks.js +133 -5
  194. package/dist/esm/shadow-css-98135883.js +387 -0
  195. package/dist/esm/{snk-actions-button_9.entry.js → snk-actions-button_8.entry.js} +21 -61
  196. package/dist/esm/snk-actions-form.entry.js +1 -1
  197. package/dist/esm/snk-application.entry.js +28 -8
  198. package/dist/esm/snk-attach.entry.js +9 -8
  199. package/dist/esm/snk-client-confirm.entry.js +1 -1
  200. package/dist/esm/snk-configurator.entry.js +1 -1
  201. package/dist/esm/snk-crud.entry.js +18 -10
  202. package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
  203. package/dist/esm/snk-custom-slot-guide.entry.js +36 -0
  204. package/dist/esm/snk-data-exporter.entry.js +7 -6
  205. package/dist/esm/{snk-data-unit-0edeb967.js → snk-data-unit-363c3551.js} +12 -3
  206. package/dist/esm/snk-data-unit.entry.js +5 -4
  207. package/dist/esm/snk-default-filter.entry.js +1 -1
  208. package/dist/esm/snk-detail-view.entry.js +16 -12
  209. package/dist/esm/snk-entity-list.entry.js +1 -1
  210. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  211. package/dist/esm/snk-expression-group_2.entry.js +2 -2
  212. package/dist/esm/snk-filter-advanced-mode_2.entry.js +2 -2
  213. package/dist/esm/snk-filter-bar_4.entry.js +67 -25
  214. package/dist/esm/snk-filter-binary-select.entry.js +1 -1
  215. package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
  216. package/dist/esm/snk-filter-detail.entry.js +3 -3
  217. package/dist/esm/snk-filter-field-search_2.entry.js +2 -2
  218. package/dist/esm/snk-filter-modal-item.entry.js +5 -4
  219. package/dist/esm/snk-filter-multi-select.entry.js +1 -1
  220. package/dist/esm/snk-filter-number.entry.js +11 -7
  221. package/dist/esm/snk-filter-period.entry.js +14 -7
  222. package/dist/esm/snk-filter-search.entry.js +1 -1
  223. package/dist/esm/snk-filter-text.entry.js +2 -2
  224. package/dist/esm/snk-form-summary.entry.js +1 -1
  225. package/dist/esm/snk-form-view.entry.js +74 -9
  226. package/dist/esm/snk-form_2.entry.js +34 -10
  227. package/dist/esm/snk-grid.entry.js +30 -19
  228. package/dist/esm/{snk-guides-viewer-9cd4d20f.js → snk-guides-viewer-6a72a3f4.js} +91 -42
  229. package/dist/esm/snk-guides-viewer.entry.js +11 -10
  230. package/dist/esm/snk-image-input.entry.js +144 -0
  231. package/dist/esm/snk-layout-form-config.entry.js +68 -0
  232. package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
  233. package/dist/esm/snk-personalized-filter.entry.js +7 -6
  234. package/dist/esm/snk-pesquisa.entry.js +6 -6
  235. package/dist/esm/snk-print-selector.entry.js +1 -1
  236. package/dist/esm/snk-simple-bar.entry.js +1 -1
  237. package/dist/esm/snk-simple-crud.entry.js +15 -21
  238. package/dist/esm/snk-taskbar.entry.js +60 -48
  239. package/dist/esm/{taskbar-elements-faaf5d8f.js → taskbar-elements-97541bdd.js} +6 -5
  240. package/dist/esm/teste-pesquisa.entry.js +1 -1
  241. package/dist/sankhyablocks/{p-7f7fe6c4.entry.js → p-0a160fb5.entry.js} +1 -1
  242. package/dist/sankhyablocks/p-10cad767.entry.js +1 -0
  243. package/dist/sankhyablocks/{p-162bddae.entry.js → p-175c9576.entry.js} +1 -1
  244. package/dist/sankhyablocks/p-18cc9111.entry.js +1 -0
  245. package/dist/sankhyablocks/p-1df34264.entry.js +11 -0
  246. package/dist/sankhyablocks/p-27d6590e.js +1 -0
  247. package/dist/sankhyablocks/{p-c4fcf1fb.entry.js → p-27e0cd68.entry.js} +1 -1
  248. package/dist/sankhyablocks/p-2a356340.entry.js +1 -0
  249. package/dist/sankhyablocks/{p-9a63f3f7.entry.js → p-2b882835.entry.js} +1 -1
  250. package/dist/sankhyablocks/p-2c9d0870.js +2 -0
  251. package/dist/sankhyablocks/{p-cb4343c4.entry.js → p-2cc2526e.entry.js} +1 -1
  252. package/dist/sankhyablocks/{p-f15478a1.js → p-2ccbbeec.js} +1 -1
  253. package/dist/sankhyablocks/{p-75af335e.entry.js → p-2ebda226.entry.js} +1 -1
  254. package/dist/sankhyablocks/p-2ee83af1.entry.js +1 -0
  255. package/dist/sankhyablocks/p-30641d55.entry.js +1 -0
  256. package/dist/sankhyablocks/{p-53599b26.js → p-32ad76cc.js} +1 -1
  257. package/dist/sankhyablocks/p-3a35917e.entry.js +1 -0
  258. package/dist/sankhyablocks/{p-49ddc27a.entry.js → p-438a225f.entry.js} +1 -1
  259. package/dist/sankhyablocks/p-45f53520.entry.js +1 -0
  260. package/dist/sankhyablocks/p-48762fe9.js +1 -0
  261. package/dist/sankhyablocks/p-48c580b9.entry.js +1 -0
  262. package/dist/sankhyablocks/p-4abf2838.entry.js +1 -0
  263. package/dist/sankhyablocks/p-4ff3b494.js +1 -0
  264. package/dist/sankhyablocks/{p-27482793.entry.js → p-5aae5c74.entry.js} +1 -1
  265. package/dist/sankhyablocks/p-6564180d.entry.js +1 -0
  266. package/dist/sankhyablocks/p-685bc841.js +60 -0
  267. package/dist/sankhyablocks/p-68c1a093.js +1 -0
  268. package/dist/sankhyablocks/{p-7b3ca294.entry.js → p-7150eacf.entry.js} +1 -1
  269. package/dist/sankhyablocks/p-72d62f22.js +1 -0
  270. package/dist/sankhyablocks/{p-825098c1.entry.js → p-752c57f4.entry.js} +1 -1
  271. package/dist/sankhyablocks/{p-e258de96.entry.js → p-76729994.entry.js} +1 -1
  272. package/dist/sankhyablocks/p-7c4f4851.js +1 -0
  273. package/dist/sankhyablocks/p-7cede5db.entry.js +1 -0
  274. package/dist/sankhyablocks/p-7e9f8fa4.js +1 -0
  275. package/dist/sankhyablocks/p-8b4d6719.js +1 -0
  276. package/dist/sankhyablocks/{p-3d41f5a8.entry.js → p-8d946600.entry.js} +1 -1
  277. package/dist/sankhyablocks/{p-96d45943.entry.js → p-90ae6c2e.entry.js} +1 -1
  278. package/dist/sankhyablocks/{p-78ff8734.js → p-9114e869.js} +1 -1
  279. package/dist/sankhyablocks/{p-21107f0d.entry.js → p-9c1ff75e.entry.js} +1 -1
  280. package/dist/sankhyablocks/p-9ce1539b.entry.js +1 -0
  281. package/dist/sankhyablocks/{p-2fdac5e6.entry.js → p-9e109f5e.entry.js} +1 -1
  282. package/dist/sankhyablocks/p-a210e55b.entry.js +1 -0
  283. package/dist/sankhyablocks/p-a2a9f520.entry.js +1 -0
  284. package/dist/sankhyablocks/p-a46ac091.js +1 -0
  285. package/dist/sankhyablocks/p-a73b6b00.js +1 -0
  286. package/dist/sankhyablocks/{p-9317942f.js → p-a9839628.js} +1 -1
  287. package/dist/sankhyablocks/{p-180716b2.entry.js → p-ae326d06.entry.js} +1 -1
  288. package/dist/sankhyablocks/p-b25777fa.entry.js +1 -0
  289. package/dist/sankhyablocks/p-b555ce38.entry.js +1 -0
  290. package/dist/sankhyablocks/p-bdf0077f.js +1 -0
  291. package/dist/sankhyablocks/p-c3ec6642.js +19 -0
  292. package/dist/sankhyablocks/p-c6a97fda.entry.js +1 -0
  293. package/dist/sankhyablocks/{p-91a9abb6.entry.js → p-c8043a53.entry.js} +1 -1
  294. package/dist/sankhyablocks/p-c860552e.entry.js +1 -0
  295. package/dist/sankhyablocks/{p-c3dbf441.entry.js → p-cc64239c.entry.js} +1 -1
  296. package/dist/sankhyablocks/{p-471b34f4.entry.js → p-cd00a3d1.entry.js} +1 -1
  297. package/dist/sankhyablocks/{p-4c763b10.entry.js → p-d657f71f.entry.js} +1 -1
  298. package/dist/sankhyablocks/p-d70de708.entry.js +1 -0
  299. package/dist/sankhyablocks/p-da455c82.js +12 -0
  300. package/dist/sankhyablocks/{p-1c2971e4.js → p-e0a6818c.js} +1 -1
  301. package/dist/sankhyablocks/p-e30acdca.entry.js +1 -0
  302. package/dist/sankhyablocks/p-ebce5394.entry.js +1 -0
  303. package/dist/sankhyablocks/p-ee56dda6.entry.js +1 -0
  304. package/dist/sankhyablocks/p-ef9343c3.entry.js +1 -0
  305. package/dist/sankhyablocks/{p-667cab42.entry.js → p-f152ef98.entry.js} +1 -1
  306. package/dist/sankhyablocks/p-f4ac3b50.entry.js +1 -0
  307. package/dist/sankhyablocks/{p-7e250432.entry.js → p-f7170e10.entry.js} +1 -1
  308. package/dist/sankhyablocks/{p-7345782c.entry.js → p-f921270b.entry.js} +1 -1
  309. package/dist/sankhyablocks/p-fc5e95f4.entry.js +1 -0
  310. package/dist/sankhyablocks/p-fce86770.entry.js +1 -0
  311. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  312. package/dist/types/components/snk-application/snk-application.d.ts +1 -1
  313. package/dist/types/components/snk-crud/snk-crud.d.ts +10 -0
  314. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +12 -0
  315. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +24 -0
  316. package/dist/types/components/snk-custom-slot-guide/snk-custom-slot-guide.d.ts +16 -0
  317. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +1 -0
  318. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +1 -1
  319. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
  320. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -1
  321. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +2 -1
  322. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +5 -0
  323. package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +6 -1
  324. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +1 -1
  325. package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +2 -2
  326. package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +1 -1
  327. package/dist/types/components/snk-form-config/snk-form-config.d.ts +9 -2
  328. package/dist/types/components/snk-grid/snk-grid.d.ts +2 -0
  329. package/dist/types/components/snk-image-input/snk-image-input.d.ts +56 -0
  330. package/dist/types/components/snk-image-input/utils/ImageUtils.d.ts +15 -0
  331. package/dist/types/components/snk-personalized-filter/interfaces/IParameter.d.ts +1 -0
  332. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +0 -1
  333. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -1
  334. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +6 -3
  335. package/dist/types/components.d.ts +164 -1
  336. package/dist/types/lib/message/resources/en-us/snk-image-input.msg.d.ts +1 -0
  337. package/dist/types/lib/message/resources/es-es/snk-image-input.msg.d.ts +1 -0
  338. package/dist/types/lib/message/resources/pt-br/snk-image-input.msg.d.ts +1 -0
  339. package/package.json +1 -1
  340. package/react/components.d.ts +2 -0
  341. package/react/components.js +2 -0
  342. package/react/components.js.map +1 -1
  343. package/dist/sankhyablocks/p-093f58fa.entry.js +0 -1
  344. package/dist/sankhyablocks/p-0e279e7a.js +0 -1
  345. package/dist/sankhyablocks/p-11346b8d.entry.js +0 -1
  346. package/dist/sankhyablocks/p-1858c023.entry.js +0 -1
  347. package/dist/sankhyablocks/p-26e0f63c.entry.js +0 -1
  348. package/dist/sankhyablocks/p-34df7eca.entry.js +0 -1
  349. package/dist/sankhyablocks/p-34f447ba.entry.js +0 -1
  350. package/dist/sankhyablocks/p-38e56b68.entry.js +0 -1
  351. package/dist/sankhyablocks/p-3abeeefa.entry.js +0 -1
  352. package/dist/sankhyablocks/p-3d021bef.entry.js +0 -1
  353. package/dist/sankhyablocks/p-3ed04f0d.entry.js +0 -1
  354. package/dist/sankhyablocks/p-44939a0e.entry.js +0 -1
  355. package/dist/sankhyablocks/p-5304753a.js +0 -60
  356. package/dist/sankhyablocks/p-557368df.entry.js +0 -1
  357. package/dist/sankhyablocks/p-55798617.js +0 -1
  358. package/dist/sankhyablocks/p-583151c5.entry.js +0 -1
  359. package/dist/sankhyablocks/p-60dd1d27.entry.js +0 -1
  360. package/dist/sankhyablocks/p-6180de07.entry.js +0 -1
  361. package/dist/sankhyablocks/p-80014119.entry.js +0 -1
  362. package/dist/sankhyablocks/p-8a88690f.entry.js +0 -1
  363. package/dist/sankhyablocks/p-8f73da95.js +0 -1
  364. package/dist/sankhyablocks/p-988afe78.js +0 -1
  365. package/dist/sankhyablocks/p-a2ed1ebd.entry.js +0 -1
  366. package/dist/sankhyablocks/p-a5108625.entry.js +0 -1
  367. package/dist/sankhyablocks/p-a644a956.js +0 -1
  368. package/dist/sankhyablocks/p-ae108ffd.entry.js +0 -11
  369. package/dist/sankhyablocks/p-b4322b87.entry.js +0 -1
  370. package/dist/sankhyablocks/p-b7e891cc.entry.js +0 -1
  371. package/dist/sankhyablocks/p-b987e15d.js +0 -1
  372. package/dist/sankhyablocks/p-bb2f5f38.js +0 -1
  373. package/dist/sankhyablocks/p-d8d8169b.js +0 -2
  374. package/dist/sankhyablocks/p-d9c54991.js +0 -1
  375. package/dist/sankhyablocks/p-e9021f79.entry.js +0 -1
  376. package/dist/sankhyablocks/p-f8f29e1a.entry.js +0 -1
@@ -347,21 +347,29 @@ export class SnkGridConfig {
347
347
  this._dataChanged = true;
348
348
  const config = await ConfigStorage.getDefaultGridConfig(this.resourceID);
349
349
  const defaultVisibleCols = (_a = config === null || config === void 0 ? void 0 : config.columns.map(col => col.name)) !== null && _a !== void 0 ? _a : [];
350
+ const isEmptyConfig = defaultVisibleCols.length === 0;
350
351
  const visibleGroup = this.buildVisibleGroup();
351
352
  const hiddenGroup = this.buildHiddenGroup();
352
353
  const visibleItemsMap = new Map();
353
354
  this.columns.forEach(column => {
354
355
  const item = this.buildListItemFromColumn(column);
355
- if (defaultVisibleCols.includes(column.name)) {
356
+ if (isEmptyConfig || defaultVisibleCols.includes(column.name)) {
356
357
  visibleItemsMap.set(column.name, item);
357
358
  }
358
359
  else {
359
360
  hiddenGroup.items.push(item);
360
361
  }
361
362
  });
362
- visibleGroup.items = defaultVisibleCols
363
- .map(name => visibleItemsMap.get(name))
364
- .filter(item => item);
363
+ if (isEmptyConfig) {
364
+ const itemsToAdd = [];
365
+ visibleItemsMap.forEach((item) => itemsToAdd.push(item));
366
+ visibleGroup.items = itemsToAdd;
367
+ }
368
+ else {
369
+ visibleGroup.items = defaultVisibleCols
370
+ .map(name => visibleItemsMap.get(name))
371
+ .filter(item => item);
372
+ }
365
373
  this._columListItems = [visibleGroup, hiddenGroup];
366
374
  this._visibleList = visibleGroup.items;
367
375
  this._hiddenList = hiddenGroup.items;
@@ -0,0 +1,3 @@
1
+ :host {
2
+ display: block;
3
+ }
@@ -0,0 +1,326 @@
1
+ import { ApplicationContext } from '@sankhyalabs/core';
2
+ import { h, Host } from '@stencil/core';
3
+ import { SnkMessageBuilder } from '../../lib/message/SnkMessageBuilder';
4
+ import { base64ToBlob, buildFileKey, downloadImage, getPKs, sessionFileUpload } from './utils/ImageUtils';
5
+ import { Action } from '@sankhyalabs/core';
6
+ export class SnkImageInput {
7
+ constructor() {
8
+ this.dataUnitObserver = async (action) => {
9
+ var _a;
10
+ const actionsMoveSelection = [Action.NEXT_SELECTED, Action.PREVIOUS_SELECTED];
11
+ if (actionsMoveSelection.includes(action.type)) {
12
+ await this.loadImage();
13
+ return;
14
+ }
15
+ const selection = ((_a = action.payload) === null || _a === void 0 ? void 0 : _a.selection) || [];
16
+ if (action.type === Action.SELECTION_CHANGED && selection.length > 0) {
17
+ await this.loadImage();
18
+ return;
19
+ }
20
+ if (action.type === Action.RECORDS_ADDED) {
21
+ await this.clearImage();
22
+ return;
23
+ }
24
+ };
25
+ this.dataUnit = undefined;
26
+ this.fieldName = undefined;
27
+ this.entityName = undefined;
28
+ this.enabled = true;
29
+ this.acceptType = undefined;
30
+ this.maxSize = undefined;
31
+ this.label = undefined;
32
+ this.imageValue = undefined;
33
+ this.loading = true;
34
+ }
35
+ /**
36
+ * Força o reload da imagem
37
+ */
38
+ async reloadImage(pks) {
39
+ await this.loadImage(pks);
40
+ }
41
+ getMessage(key, params) {
42
+ if (!this.messagesBuilder) {
43
+ this.messagesBuilder = new SnkMessageBuilder();
44
+ }
45
+ return this.messagesBuilder.getMessage(key, params);
46
+ }
47
+ async clearImage() {
48
+ this.imageValue = undefined;
49
+ }
50
+ async handleImageChange(event) {
51
+ const base64 = event.detail;
52
+ if (!base64) {
53
+ await this.clearImage();
54
+ await this.updatedataUnitField(true);
55
+ return;
56
+ }
57
+ const blob = await base64ToBlob(base64);
58
+ if (this.maxSize && blob.size > this.maxSize * 1024) {
59
+ const errorMsg = this.getMessage('snkImageInput.errorImageSize') + this.maxSize + '(KB)';
60
+ this.imageError.emit(errorMsg);
61
+ if (this.application) {
62
+ await this.application.error(this.getMessage('snkImageInput.errorTitle'), errorMsg);
63
+ }
64
+ return;
65
+ }
66
+ this.imageValue = base64;
67
+ await sessionFileUpload(blob, this.entityName, this.fieldName);
68
+ await this.updatedataUnitField();
69
+ }
70
+ async updatedataUnitField(deleted = false) {
71
+ if (!this.dataUnit || !this.dataUnit.getSelectedRecord()) {
72
+ return;
73
+ }
74
+ if (deleted) {
75
+ await this.dataUnit.setFieldValue(this.fieldName, 'deletado');
76
+ }
77
+ else {
78
+ await this.dataUnit.setFieldValue(this.fieldName, `$file.session.key{${buildFileKey(this.entityName, this.fieldName)}}`);
79
+ }
80
+ }
81
+ async handleImageError(event) {
82
+ this.imageError.emit(event.detail);
83
+ if (this.application) {
84
+ await this.application.error(this.getMessage('snkImageInput.errorTitle'), event.detail);
85
+ }
86
+ }
87
+ getPksFromDataUnit() {
88
+ if (!this.dataUnit) {
89
+ return undefined;
90
+ }
91
+ const selectedRecord = this.dataUnit.getSelectedRecord();
92
+ if (!selectedRecord) {
93
+ return undefined;
94
+ }
95
+ const fieldValue = selectedRecord[this.fieldName];
96
+ if (!fieldValue) {
97
+ return undefined;
98
+ }
99
+ try {
100
+ const pk = JSON.parse(fieldValue);
101
+ return pk;
102
+ }
103
+ catch (error) {
104
+ console.error('Error parsing PK from data unit field:', error);
105
+ return undefined;
106
+ }
107
+ }
108
+ async loadImage(pks) {
109
+ var _a;
110
+ this.loading = true;
111
+ if (this.dataUnit && this.entityName) {
112
+ pks = (_a = pks !== null && pks !== void 0 ? pks : this.getPksFromDataUnit()) !== null && _a !== void 0 ? _a : getPKs(this.dataUnit);
113
+ this.imageValue = await downloadImage(pks, this.fieldName, this.entityName);
114
+ }
115
+ this.loading = false;
116
+ }
117
+ async componentWillLoad() {
118
+ this.application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
119
+ if (!this.messagesBuilder) {
120
+ this.messagesBuilder = new SnkMessageBuilder();
121
+ }
122
+ if (this.dataUnit) {
123
+ this.dataUnit.subscribe(this.dataUnitObserver);
124
+ }
125
+ }
126
+ disconnectedCallback() {
127
+ if (this.dataUnit) {
128
+ this.dataUnit.unsubscribe(this.dataUnitObserver);
129
+ }
130
+ }
131
+ async componentDidLoad() {
132
+ await this.loadImage();
133
+ }
134
+ render() {
135
+ return (h(Host, null, h("ez-image-input", { enabled: this.enabled, label: this.label, name: this.fieldName, value: this.imageValue, maxFileSize: this.maxSize ? this.maxSize * 1024 : undefined, accept: this.acceptType || 'image/png,image/jpeg,image/gif', onEzChange: (e) => this.handleImageChange(e), onEzError: (e) => this.handleImageError(e), loading: this.loading })));
136
+ }
137
+ static get is() { return "snk-image-input"; }
138
+ static get encapsulation() { return "shadow"; }
139
+ static get originalStyleUrls() {
140
+ return {
141
+ "$": ["snk-image-input.css"]
142
+ };
143
+ }
144
+ static get styleUrls() {
145
+ return {
146
+ "$": ["snk-image-input.css"]
147
+ };
148
+ }
149
+ static get properties() {
150
+ return {
151
+ "dataUnit": {
152
+ "type": "unknown",
153
+ "mutable": false,
154
+ "complexType": {
155
+ "original": "DataUnit",
156
+ "resolved": "DataUnit",
157
+ "references": {
158
+ "DataUnit": {
159
+ "location": "import",
160
+ "path": "@sankhyalabs/core"
161
+ }
162
+ }
163
+ },
164
+ "required": false,
165
+ "optional": true,
166
+ "docs": {
167
+ "tags": [],
168
+ "text": "DataUnit associado ao componente"
169
+ }
170
+ },
171
+ "fieldName": {
172
+ "type": "string",
173
+ "mutable": false,
174
+ "complexType": {
175
+ "original": "string",
176
+ "resolved": "string",
177
+ "references": {}
178
+ },
179
+ "required": false,
180
+ "optional": false,
181
+ "docs": {
182
+ "tags": [],
183
+ "text": "Nome do campo no DataUnit"
184
+ },
185
+ "attribute": "field-name",
186
+ "reflect": false
187
+ },
188
+ "entityName": {
189
+ "type": "string",
190
+ "mutable": false,
191
+ "complexType": {
192
+ "original": "string",
193
+ "resolved": "string",
194
+ "references": {}
195
+ },
196
+ "required": false,
197
+ "optional": true,
198
+ "docs": {
199
+ "tags": [],
200
+ "text": "Nome da entidade (usado quando n\u00E3o h\u00E1 DataUnit)"
201
+ },
202
+ "attribute": "entity-name",
203
+ "reflect": false
204
+ },
205
+ "enabled": {
206
+ "type": "boolean",
207
+ "mutable": false,
208
+ "complexType": {
209
+ "original": "boolean",
210
+ "resolved": "boolean",
211
+ "references": {}
212
+ },
213
+ "required": false,
214
+ "optional": false,
215
+ "docs": {
216
+ "tags": [],
217
+ "text": "Define se est\u00E1 habilitado"
218
+ },
219
+ "attribute": "enabled",
220
+ "reflect": false,
221
+ "defaultValue": "true"
222
+ },
223
+ "acceptType": {
224
+ "type": "string",
225
+ "mutable": false,
226
+ "complexType": {
227
+ "original": "string",
228
+ "resolved": "string",
229
+ "references": {}
230
+ },
231
+ "required": false,
232
+ "optional": true,
233
+ "docs": {
234
+ "tags": [],
235
+ "text": "Tipos MIME aceitos (separados por v\u00EDrgula)"
236
+ },
237
+ "attribute": "accept-type",
238
+ "reflect": false
239
+ },
240
+ "maxSize": {
241
+ "type": "number",
242
+ "mutable": false,
243
+ "complexType": {
244
+ "original": "number",
245
+ "resolved": "number",
246
+ "references": {}
247
+ },
248
+ "required": false,
249
+ "optional": true,
250
+ "docs": {
251
+ "tags": [],
252
+ "text": "Tamanho m\u00E1ximo do arquivo em KB"
253
+ },
254
+ "attribute": "max-size",
255
+ "reflect": false
256
+ },
257
+ "label": {
258
+ "type": "string",
259
+ "mutable": false,
260
+ "complexType": {
261
+ "original": "string",
262
+ "resolved": "string",
263
+ "references": {}
264
+ },
265
+ "required": false,
266
+ "optional": true,
267
+ "docs": {
268
+ "tags": [],
269
+ "text": "Label do componente"
270
+ },
271
+ "attribute": "label",
272
+ "reflect": false
273
+ }
274
+ };
275
+ }
276
+ static get states() {
277
+ return {
278
+ "imageValue": {},
279
+ "loading": {}
280
+ };
281
+ }
282
+ static get events() {
283
+ return [{
284
+ "method": "imageError",
285
+ "name": "imageError",
286
+ "bubbles": true,
287
+ "cancelable": true,
288
+ "composed": true,
289
+ "docs": {
290
+ "tags": [],
291
+ "text": "Evento disparado quando h\u00E1 erro"
292
+ },
293
+ "complexType": {
294
+ "original": "string",
295
+ "resolved": "string",
296
+ "references": {}
297
+ }
298
+ }];
299
+ }
300
+ static get methods() {
301
+ return {
302
+ "reloadImage": {
303
+ "complexType": {
304
+ "signature": "(pks?: Record<string, any>) => Promise<void>",
305
+ "parameters": [{
306
+ "tags": [],
307
+ "text": ""
308
+ }],
309
+ "references": {
310
+ "Promise": {
311
+ "location": "global"
312
+ },
313
+ "Record": {
314
+ "location": "global"
315
+ }
316
+ },
317
+ "return": "Promise<void>"
318
+ },
319
+ "docs": {
320
+ "text": "For\u00E7a o reload da imagem",
321
+ "tags": []
322
+ }
323
+ }
324
+ };
325
+ }
326
+ }
@@ -0,0 +1,133 @@
1
+ import { ApplicationContext } from "@sankhyalabs/core";
2
+ export async function base64ToBlob(base64) {
3
+ const response = await fetch(base64);
4
+ return await response.blob();
5
+ }
6
+ export function buildFileKey(entityName, fieldName) {
7
+ if (entityName) {
8
+ return `${entityName}_${fieldName}`;
9
+ }
10
+ else {
11
+ return fieldName;
12
+ }
13
+ }
14
+ function hasSpecialCharacters(value) {
15
+ const specialChars = /[ !@#$%^&*()+\-=\[\]{};':"\\|,.<>\/?]/;
16
+ return specialChars.test(value);
17
+ }
18
+ /**
19
+ * Gera a URL base para upload de sessão
20
+ */
21
+ function getSessionUploadBaseUrl(fileKey, context = 'mge') {
22
+ let url = `/${context}/sessionUpload.${context}?sessionkey=${fileKey}`;
23
+ // Verifica se precisa processar caracteres especiais
24
+ if (canProcessSpecialKeys(context) && hasSpecialCharacters(fileKey)) {
25
+ url += `&encodedKey=${btoa(encodeURI(fileKey))}`;
26
+ }
27
+ return url;
28
+ }
29
+ /**
30
+ * Verifica se pode processar chaves especiais
31
+ * Baseado no método canProcessSpecialKeys do sessionfileupload.service.js
32
+ */
33
+ async function canProcessSpecialKeys(context) {
34
+ var _a;
35
+ const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
36
+ if (!application)
37
+ return false;
38
+ const resourceId = await ((_a = application.getResourceID) === null || _a === void 0 ? void 0 : _a.call(application)) || '';
39
+ const adPrefix = "br.com.sankhya.menu.adicional";
40
+ return context === 'mge' && resourceId.startsWith(adPrefix);
41
+ }
42
+ /**
43
+ * Constrói a URL de upload
44
+ * Baseado no método buildUploadURL do sessionfileupload.service.js
45
+ */
46
+ function buildUploadURL(fileKey) {
47
+ let url = getSessionUploadBaseUrl(fileKey);
48
+ url += "&fitem=S&salvar=S&useCache=N";
49
+ return url;
50
+ }
51
+ /**
52
+ * Faz upload de arquivo para a sessão usando XMLHttpRequest
53
+ * Baseado no método uploadSessionFile do sessionfileupload.service.js
54
+ */
55
+ export async function sessionFileUpload(blob, entityName, fieldName, onProgress) {
56
+ const fileKey = buildFileKey(entityName, fieldName);
57
+ const uploadUrl = buildUploadURL(fileKey);
58
+ return new Promise((resolve, reject) => {
59
+ const formData = new FormData();
60
+ formData.append('arquivo', blob);
61
+ const http = new XMLHttpRequest();
62
+ http.addEventListener("load", () => {
63
+ if (http.status >= 200 && http.status < 300) {
64
+ resolve(`/mge/UPLOADING_${fileKey}.dbimage`);
65
+ }
66
+ else {
67
+ reject(new Error(`Upload failed: ${http.statusText}`));
68
+ }
69
+ });
70
+ http.addEventListener("error", () => {
71
+ reject(new Error('Upload error'));
72
+ });
73
+ if (onProgress) {
74
+ http.upload.addEventListener("progress", onProgress);
75
+ }
76
+ http.open("POST", uploadUrl);
77
+ http.send(formData);
78
+ });
79
+ }
80
+ export function getUrlBase() {
81
+ return window.location.origin;
82
+ }
83
+ export function getBaseUrl(pk, entityName, fieldName) {
84
+ if (!pk)
85
+ return undefined;
86
+ const baseUrl = getUrlBase();
87
+ let url = `${baseUrl}/mge/${entityName}@${fieldName}`;
88
+ for (const pkField in pk) {
89
+ url += `@${pkField}=${pk[pkField]}`;
90
+ }
91
+ url += '.dbimage';
92
+ return url;
93
+ }
94
+ export function getPKs(dataUnit) {
95
+ if (!dataUnit) {
96
+ return undefined;
97
+ }
98
+ const pk = {};
99
+ const fields = dataUnit.metadata.fields;
100
+ const selectedRecord = dataUnit.getSelectedRecord();
101
+ fields.forEach((field) => {
102
+ if (field.properties['isPrimaryKey']) {
103
+ pk[field.name] = selectedRecord[field.name];
104
+ }
105
+ });
106
+ return pk;
107
+ }
108
+ export async function imageBlobToBase64(blob) {
109
+ return new Promise((resolve, reject) => {
110
+ const reader = new FileReader();
111
+ reader.onloadend = () => {
112
+ resolve(reader.result);
113
+ };
114
+ reader.onerror = reject;
115
+ reader.readAsDataURL(blob);
116
+ });
117
+ }
118
+ export async function downloadImage(pks, fieldName, entityName) {
119
+ const uploadUrl = getBaseUrl(pks, entityName, fieldName);
120
+ if (!uploadUrl) {
121
+ return;
122
+ }
123
+ try {
124
+ const response = await fetch(uploadUrl);
125
+ if (response.ok) {
126
+ const blob = await response.blob();
127
+ return await imageBlobToBase64(blob);
128
+ }
129
+ }
130
+ catch (error) {
131
+ console.error('Error downloading image:', error);
132
+ }
133
+ }
@@ -43,7 +43,7 @@ export class SnkLayoutFormConfig {
43
43
  return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
44
44
  }
45
45
  render() {
46
- return (h("div", { class: "ez-flex ez-flex--column" }, h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.cascadeLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.CASCADE), value: this.layoutType === FormLayout.CASCADE }), h("snk-view-representation", { mode: FormLayout.CASCADE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.cascadeLayout.description'))), h("div", null, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.sideBySideLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.SIDE_BY_SIDE), value: this.layoutType === FormLayout.SIDE_BY_SIDE }), h("snk-view-representation", { mode: FormLayout.SIDE_BY_SIDE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.sideBySideLayout.description')))));
46
+ return (h("div", { class: "ez-flex ez-flex--column" }, h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.cascadeLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.CASCADE), value: this.layoutType === FormLayout.CASCADE }), h("snk-view-representation", { mode: FormLayout.CASCADE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.cascadeLayout.description'))), h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.classicCascadeLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.CLASSIC_CASCADE), value: this.layoutType === FormLayout.CLASSIC_CASCADE }), h("snk-view-representation", { mode: FormLayout.CLASSIC_CASCADE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.classicCascadeLayout.description'))), h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.sideBySideLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.SIDE_BY_SIDE), value: this.layoutType === FormLayout.SIDE_BY_SIDE }), h("snk-view-representation", { mode: FormLayout.SIDE_BY_SIDE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.sideBySideLayout.description'))), h("div", null, h("ez-check", { label: this.getMessage('snkLayoutFormConfig.classicSideBySideLayout.label'), class: "ez-margin-bottom--small", onEzChange: () => this.toggleLayout(FormLayout.CLASSIC_SIDE_BY_SIDE), value: this.layoutType === FormLayout.CLASSIC_SIDE_BY_SIDE }), h("snk-view-representation", { mode: FormLayout.CLASSIC_SIDE_BY_SIDE }), h("label", { class: "ez-label ez-margin--small ez-flex ez-text--medium" }, this.getMessage('snkLayoutFormConfig.classicSideBySideLayout.description')))));
47
47
  }
48
48
  static get is() { return "snk-layout-form-config"; }
49
49
  static get encapsulation() { return "scoped"; }
@@ -11,7 +11,7 @@ export class SnkViewRepresentation {
11
11
  return (h("div", { class: "svg-container__inline" }, [...Array(2)].map(() => this.renderCascadeLayout())));
12
12
  }
13
13
  render() {
14
- return (h("div", { class: "svg-container ez-margin-left--small" }, h("div", { class: "svg-container__background" }, h("div", { class: "svg-container__header" }, h("div", { class: "svg-container__circle svg-container__circle--red" }), h("div", { class: "svg-container__circle svg-container__circle--yellow" }), h("div", { class: "svg-container__circle svg-container__circle--green" })), this.mode === FormLayout.CASCADE
14
+ return (h("div", { class: "svg-container ez-margin-left--small" }, h("div", { class: "svg-container__background" }, h("div", { class: "svg-container__header" }, h("div", { class: "svg-container__circle svg-container__circle--red" }), h("div", { class: "svg-container__circle svg-container__circle--yellow" }), h("div", { class: "svg-container__circle svg-container__circle--green" })), (this.mode === FormLayout.CASCADE || this.mode === FormLayout.CLASSIC_CASCADE)
15
15
  ? this.renderCascadeLayout()
16
16
  : this.renderSideBySideLayout())));
17
17
  }
@@ -75,6 +75,9 @@ export class PersonalizedFilterUtils {
75
75
  }
76
76
  else if (DataType.DATE == type) {
77
77
  value = this.convertDataValue(value);
78
+ if (value === undefined) {
79
+ return;
80
+ }
78
81
  }
79
82
  else if (DataType.BOOLEAN == type) {
80
83
  value = value ? "S" : "N";
@@ -100,9 +103,19 @@ export class PersonalizedFilterUtils {
100
103
  return `?:{entidade=${expressionItem.entityName || ""};campo=${expressionItem.fieldName || ""}}`;
101
104
  }
102
105
  static convertDataValue(value) {
106
+ if (value == null || value === '' || value === undefined) {
107
+ return;
108
+ }
103
109
  if (typeof value == 'string') {
110
+ const trimmedValue = value.trim();
111
+ if (trimmedValue === '' || trimmedValue === '/' || trimmedValue === ' / /') {
112
+ return;
113
+ }
104
114
  value = new Date(value);
105
115
  }
116
+ if (value instanceof Date && isNaN(value.getTime())) {
117
+ return;
118
+ }
106
119
  return DateUtils.formatDate(value);
107
120
  }
108
121
  /*
@@ -37,7 +37,6 @@ export class SnkPesquisa {
37
37
  * Útil para cenários onde a pesquisa precisa ser disparada sem interação do usuário.
38
38
  *
39
39
  * @param text Texto utilizado como argumento de pesquisa.
40
- * @returns Promise<void>
41
40
  * @example
42
41
  * await pesquisaRef.executeSearch("Texto para pesquisa");
43
42
  */
@@ -642,9 +641,6 @@ export class SnkPesquisa {
642
641
  "tags": [{
643
642
  "name": "param",
644
643
  "text": "text Texto utilizado como argumento de pesquisa."
645
- }, {
646
- "name": "returns",
647
- "text": "Promise<void>"
648
644
  }, {
649
645
  "name": "example",
650
646
  "text": "await pesquisaRef.executeSearch(\"Texto para pesquisa\");"
@@ -57,6 +57,7 @@ export class SnkSimpleCrud {
57
57
  this.domainMessagesBuilder = undefined;
58
58
  this.multipleEditionEnabled = true;
59
59
  this.layoutFormConfig = true;
60
+ this.disableGridEdition = false;
60
61
  this.autoLoad = undefined;
61
62
  this.outlineMode = false;
62
63
  }
@@ -157,11 +158,10 @@ export class SnkSimpleCrud {
157
158
  }
158
159
  getButtons(selected, extraButtons, removeRefresh) {
159
160
  let btnList = selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS;
160
- if (removeRefresh) {
161
+ if (removeRefresh || this.mode === SIMPLE_CRUD_MODE.IN_MEMORY) {
161
162
  btnList = btnList.filter(item => item !== TaskbarElement.REFRESH);
162
163
  }
163
- return this.addConfigButton(this.resolveInMemoryBtns(btnList)
164
- .concat(extraButtons));
164
+ return this.addConfigButton(btnList.concat(extraButtons));
165
165
  }
166
166
  addConfigButton(buttons) {
167
167
  if (this.configName === undefined || (this.configName && this.gridLegacyConfigName)) {
@@ -172,13 +172,6 @@ export class SnkSimpleCrud {
172
172
  get application() {
173
173
  return ApplicationContext.getContextValue("__SNK__APPLICATION__");
174
174
  }
175
- resolveInMemoryBtns(taskbarButtons) {
176
- const newTaskBarConfig = [...taskbarButtons];
177
- if (this.mode === SIMPLE_CRUD_MODE.IN_MEMORY) {
178
- newTaskBarConfig.splice(1, 1);
179
- }
180
- return newTaskBarConfig;
181
- }
182
175
  /**
183
176
  * @description Usado para alternar a visão entre GRID e FORM externamente.
184
177
  * @param {VIEW_MODE} view - A visão para a qual navegar.
@@ -819,7 +812,7 @@ export class SnkSimpleCrud {
819
812
  }
820
813
  return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: `ez-box ez-box--no-outline ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section`, ref: (ref) => this._container = ref, tabindex: "0" }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large ez-box--no-outline", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
821
814
  ? undefined
822
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, tabindex: "0", paginationCounterMode: this.paginationCounterMode }, this.renderTaskbarContent(VIEW_MODE.GRID), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(VIEW_MODE.FORM), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ez-box--no-outline`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), elementFocusSearchField: this._container, tabindex: "0" }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName, messagesBuilder: this.messagesBuilder })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._showPopUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
815
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, tabindex: "0", paginationCounterMode: this.paginationCounterMode, canEdit: !this.disableGridEdition }, this.renderTaskbarContent(VIEW_MODE.GRID), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(VIEW_MODE.FORM), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ez-box--no-outline`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), elementFocusSearchField: this._container, tabindex: "0" }), h("slot", { name: "snkSimpleCrudFormFooter" }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName, messagesBuilder: this.messagesBuilder })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId, layoutFormConfig: this.layoutFormConfig })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._showPopUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
823
816
  }
824
817
  static get is() { return "snk-simple-crud"; }
825
818
  static get encapsulation() { return "scoped"; }
@@ -879,7 +872,7 @@ export class SnkSimpleCrud {
879
872
  },
880
873
  "dataState": {
881
874
  "type": "unknown",
882
- "mutable": false,
875
+ "mutable": true,
883
876
  "complexType": {
884
877
  "original": "DataState",
885
878
  "resolved": "DataState",
@@ -1438,6 +1431,24 @@ export class SnkSimpleCrud {
1438
1431
  "reflect": false,
1439
1432
  "defaultValue": "true"
1440
1433
  },
1434
+ "disableGridEdition": {
1435
+ "type": "boolean",
1436
+ "mutable": false,
1437
+ "complexType": {
1438
+ "original": "boolean",
1439
+ "resolved": "boolean",
1440
+ "references": {}
1441
+ },
1442
+ "required": false,
1443
+ "optional": false,
1444
+ "docs": {
1445
+ "tags": [],
1446
+ "text": "Desabilita a edi\u00E7\u00E3o na grade."
1447
+ },
1448
+ "attribute": "disable-grid-edition",
1449
+ "reflect": false,
1450
+ "defaultValue": "false"
1451
+ },
1441
1452
  "autoLoad": {
1442
1453
  "type": "boolean",
1443
1454
  "mutable": false,