@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-121322.0 → 0.0.0-bugfix-dev-KB-132407.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 (367) hide show
  1. package/dist/cjs/{ConfigStorage-72f34bd4.js → ConfigStorage-d9d24844.js} +2 -2
  2. package/dist/cjs/{DataFetcher-991b0349.js → DataFetcher-3a8ea521.js} +2 -2751
  3. package/dist/cjs/{FormConfigHelper-e253a418.js → FormConfigHelper-28fe4668.js} +3 -1
  4. package/dist/cjs/{ISave-ebf6b4ed.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-cdbb29d4.js → SnkFormConfigManager-c88cf1e9.js} +5 -5
  8. package/dist/cjs/SnkMessageBuilder-d9558dba.js +2809 -0
  9. package/dist/cjs/{SnkMultiSelectionListDataSource-011bec79.js → SnkMultiSelectionListDataSource-a891430e.js} +5 -5
  10. package/dist/cjs/{auth-fetcher-c3cac878.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-8bf469e7.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 +5 -5
  18. package/dist/cjs/fields-selector.cjs.entry.js +2 -2
  19. package/dist/cjs/{form-config-fetcher-c7af90d8.js → form-config-fetcher-72cf0e3d.js} +1 -1
  20. package/dist/cjs/guides-configurator.cjs.entry.js +3 -3
  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} +8 -57
  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 -12
  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-7d587ad5.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 +59 -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 +22 -11
  59. package/dist/cjs/snk-grid.cjs.entry.js +26 -17
  60. package/dist/cjs/{snk-guides-viewer-366d5c32.js → snk-guides-viewer-4da78c21.js} +49 -64
  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 +3 -3
  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 +7 -0
  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 +24 -6
  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 +57 -58
  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 +7 -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 +30 -13
  94. package/dist/collection/components/snk-form-config/FormConfigHelper.js +3 -1
  95. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +3 -3
  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 +4 -4
  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 +2 -2
  101. package/dist/collection/components/snk-form-config/snk-form-config.js +15 -5
  102. package/dist/collection/components/snk-grid/snk-grid.css +5 -5
  103. package/dist/collection/components/snk-grid/snk-grid.js +16 -9
  104. package/dist/collection/components/snk-image-input/snk-image-input.css +3 -0
  105. package/dist/collection/components/snk-image-input/snk-image-input.js +326 -0
  106. package/dist/collection/components/snk-image-input/utils/ImageUtils.js +133 -0
  107. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +1 -1
  108. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +1 -1
  109. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +13 -0
  110. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +0 -4
  111. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +23 -12
  112. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +4 -3
  113. package/dist/collection/lib/message/SnkMessageBuilder.js +11 -2
  114. package/dist/collection/lib/message/messageResourceEnUSUtils.js +2 -0
  115. package/dist/collection/lib/message/messageResourceEsESUtils.js +2 -0
  116. package/dist/collection/lib/message/messageResourcePtBRUtils.js +2 -0
  117. package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +1 -1
  118. package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +1 -0
  119. package/dist/collection/lib/message/resources/en-us/snk-image-input.msg.js +11 -0
  120. package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js +10 -2
  121. package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +1 -1
  122. package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +1 -0
  123. package/dist/collection/lib/message/resources/es-es/snk-image-input.msg.js +11 -0
  124. package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js +8 -0
  125. package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js +1 -1
  126. package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +1 -1
  127. package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +1 -0
  128. package/dist/collection/lib/message/resources/pt-br/snk-image-input.msg.js +11 -0
  129. package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js +10 -2
  130. package/dist/components/DataFetcher.js +3 -2731
  131. package/dist/components/PersonalizedFilterUtils.js +13 -0
  132. package/dist/components/SnkFormConfigManager.js +3 -3
  133. package/dist/components/SnkMessageBuilder.js +2807 -0
  134. package/dist/components/dataunit-fetcher.js +2 -1
  135. package/dist/components/field-config2.js +4 -2
  136. package/dist/components/fields-layout2.js +4 -4
  137. package/dist/components/guides-configurator2.js +2 -2
  138. package/dist/components/index.d.ts +2 -0
  139. package/dist/components/index.js +2 -0
  140. package/dist/components/index2.js +90 -21
  141. package/dist/components/snk-application2.js +22 -2
  142. package/dist/components/snk-attach2.js +3 -2
  143. package/dist/components/snk-crud.js +78 -68
  144. package/dist/components/snk-custom-slot-guide.d.ts +11 -0
  145. package/dist/components/snk-custom-slot-guide.js +55 -0
  146. package/dist/components/snk-data-unit2.js +10 -1
  147. package/dist/components/snk-detail-view2.js +143 -143
  148. package/dist/components/snk-filter-bar2.js +30 -13
  149. package/dist/components/snk-filter-detail2.js +1 -1
  150. package/dist/components/snk-filter-item2.js +8 -2
  151. package/dist/components/snk-filter-modal2.js +16 -6
  152. package/dist/components/snk-filter-number.js +12 -8
  153. package/dist/components/snk-filter-period.js +13 -6
  154. package/dist/components/snk-filter-text.js +1 -1
  155. package/dist/components/snk-form-config2.js +15 -5
  156. package/dist/components/snk-form-view2.js +82 -10
  157. package/dist/components/snk-grid2.js +17 -9
  158. package/dist/components/snk-image-input.d.ts +11 -0
  159. package/dist/components/snk-image-input.js +6 -0
  160. package/dist/components/snk-image-input2.js +302 -0
  161. package/dist/components/snk-layout-form-config2.js +1 -1
  162. package/dist/components/snk-pesquisa2.js +0 -1
  163. package/dist/components/snk-simple-crud2.js +6 -12
  164. package/dist/components/snk-taskbar2.js +4 -3
  165. package/dist/components/snk-view-representation2.js +1 -1
  166. package/dist/esm/{ConfigStorage-22324b6b.js → ConfigStorage-d15d2014.js} +2 -2
  167. package/dist/esm/{DataFetcher-450828a0.js → DataFetcher-1dd7e8c0.js} +3 -2731
  168. package/dist/esm/{FormConfigHelper-e89ca25c.js → FormConfigHelper-d09669f3.js} +3 -1
  169. package/dist/esm/{ISave-61153166.js → ISave-498c4831.js} +1 -1
  170. package/dist/esm/ImageUtils-8fc8d905.js +136 -0
  171. package/dist/esm/{PersonalizedFilterUtils-2db38ff2.js → PersonalizedFilterUtils-d2439a9a.js} +13 -0
  172. package/dist/esm/{SnkFormConfigManager-b5a92e12.js → SnkFormConfigManager-86befa68.js} +5 -5
  173. package/dist/esm/SnkMessageBuilder-c0bc4424.js +2807 -0
  174. package/dist/esm/{SnkMultiSelectionListDataSource-d7ce2e54.js → SnkMultiSelectionListDataSource-14633bf6.js} +5 -5
  175. package/dist/esm/{auth-fetcher-eef9d01e.js → auth-fetcher-69cbda8d.js} +1 -1
  176. package/dist/esm/config-header.entry.js +1 -1
  177. package/dist/esm/configs-button.entry.js +1 -1
  178. package/dist/esm/css-shim-9f2d321e.js +4 -0
  179. package/dist/esm/{dataunit-fetcher-da9596f6.js → dataunit-fetcher-3d5c4ae4.js} +2 -1
  180. package/dist/esm/dom-64053c71.js +73 -0
  181. package/dist/esm/field-config_2.entry.js +3 -3
  182. package/dist/esm/fields-layout.entry.js +5 -5
  183. package/dist/esm/fields-selector.entry.js +2 -2
  184. package/dist/esm/{form-config-fetcher-8d0a5e1c.js → form-config-fetcher-fcc7b62f.js} +1 -1
  185. package/dist/esm/guides-configurator.entry.js +3 -3
  186. package/dist/esm/{index-479e1293.js → index-04f73a26.js} +1517 -173
  187. package/dist/esm/{index-446f9341.js → index-ea250be6.js} +90 -21
  188. package/dist/esm/loader.js +17 -3
  189. package/dist/esm/pesquisa-grid_2.entry.js +6 -5
  190. package/dist/esm/sankhyablocks.js +133 -5
  191. package/dist/esm/shadow-css-98135883.js +387 -0
  192. package/dist/esm/{snk-actions-button_9.entry.js → snk-actions-button_8.entry.js} +9 -57
  193. package/dist/esm/snk-actions-form.entry.js +1 -1
  194. package/dist/esm/snk-application.entry.js +28 -8
  195. package/dist/esm/snk-attach.entry.js +9 -8
  196. package/dist/esm/snk-client-confirm.entry.js +1 -1
  197. package/dist/esm/snk-configurator.entry.js +1 -1
  198. package/dist/esm/snk-crud.entry.js +18 -12
  199. package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
  200. package/dist/esm/snk-custom-slot-guide.entry.js +36 -0
  201. package/dist/esm/snk-data-exporter.entry.js +7 -6
  202. package/dist/esm/{snk-data-unit-99616a07.js → snk-data-unit-363c3551.js} +12 -3
  203. package/dist/esm/snk-data-unit.entry.js +5 -4
  204. package/dist/esm/snk-default-filter.entry.js +1 -1
  205. package/dist/esm/snk-detail-view.entry.js +16 -12
  206. package/dist/esm/snk-entity-list.entry.js +1 -1
  207. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  208. package/dist/esm/snk-expression-group_2.entry.js +2 -2
  209. package/dist/esm/snk-filter-advanced-mode_2.entry.js +2 -2
  210. package/dist/esm/snk-filter-bar_4.entry.js +59 -25
  211. package/dist/esm/snk-filter-binary-select.entry.js +1 -1
  212. package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
  213. package/dist/esm/snk-filter-detail.entry.js +3 -3
  214. package/dist/esm/snk-filter-field-search_2.entry.js +2 -2
  215. package/dist/esm/snk-filter-modal-item.entry.js +5 -4
  216. package/dist/esm/snk-filter-multi-select.entry.js +1 -1
  217. package/dist/esm/snk-filter-number.entry.js +11 -7
  218. package/dist/esm/snk-filter-period.entry.js +14 -7
  219. package/dist/esm/snk-filter-search.entry.js +1 -1
  220. package/dist/esm/snk-filter-text.entry.js +2 -2
  221. package/dist/esm/snk-form-summary.entry.js +1 -1
  222. package/dist/esm/snk-form-view.entry.js +74 -9
  223. package/dist/esm/snk-form_2.entry.js +22 -11
  224. package/dist/esm/snk-grid.entry.js +26 -17
  225. package/dist/esm/{snk-guides-viewer-240de636.js → snk-guides-viewer-27d9e78c.js} +49 -64
  226. package/dist/esm/snk-guides-viewer.entry.js +11 -10
  227. package/dist/esm/snk-image-input.entry.js +144 -0
  228. package/dist/esm/snk-layout-form-config.entry.js +68 -0
  229. package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
  230. package/dist/esm/snk-personalized-filter.entry.js +7 -6
  231. package/dist/esm/snk-pesquisa.entry.js +6 -6
  232. package/dist/esm/snk-print-selector.entry.js +1 -1
  233. package/dist/esm/snk-simple-bar.entry.js +1 -1
  234. package/dist/esm/snk-simple-crud.entry.js +15 -21
  235. package/dist/esm/snk-taskbar.entry.js +3 -3
  236. package/dist/esm/{taskbar-elements-faaf5d8f.js → taskbar-elements-97541bdd.js} +6 -5
  237. package/dist/esm/teste-pesquisa.entry.js +1 -1
  238. package/dist/sankhyablocks/{p-7f7fe6c4.entry.js → p-0a160fb5.entry.js} +1 -1
  239. package/dist/sankhyablocks/p-10cad767.entry.js +1 -0
  240. package/dist/sankhyablocks/{p-162bddae.entry.js → p-175c9576.entry.js} +1 -1
  241. package/dist/sankhyablocks/p-18cc9111.entry.js +1 -0
  242. package/dist/sankhyablocks/p-1df34264.entry.js +11 -0
  243. package/dist/sankhyablocks/p-27d6590e.js +1 -0
  244. package/dist/sankhyablocks/{p-c4fcf1fb.entry.js → p-27e0cd68.entry.js} +1 -1
  245. package/dist/sankhyablocks/p-2a356340.entry.js +1 -0
  246. package/dist/sankhyablocks/{p-9a63f3f7.entry.js → p-2b882835.entry.js} +1 -1
  247. package/dist/sankhyablocks/p-2c9d0870.js +2 -0
  248. package/dist/sankhyablocks/{p-cb4343c4.entry.js → p-2cc2526e.entry.js} +1 -1
  249. package/dist/sankhyablocks/{p-62aef37a.js → p-2ccbbeec.js} +1 -1
  250. package/dist/sankhyablocks/{p-75af335e.entry.js → p-2ebda226.entry.js} +1 -1
  251. package/dist/sankhyablocks/p-30641d55.entry.js +1 -0
  252. package/dist/sankhyablocks/{p-840fb68c.js → p-32ad76cc.js} +1 -1
  253. package/dist/sankhyablocks/p-3a35917e.entry.js +1 -0
  254. package/dist/sankhyablocks/p-3b07c117.entry.js +1 -0
  255. package/dist/sankhyablocks/{p-49ddc27a.entry.js → p-438a225f.entry.js} +1 -1
  256. package/dist/sankhyablocks/p-45f53520.entry.js +1 -0
  257. package/dist/sankhyablocks/p-48c580b9.entry.js +1 -0
  258. package/dist/sankhyablocks/p-4ff3b494.js +1 -0
  259. package/dist/sankhyablocks/{p-27482793.entry.js → p-5aae5c74.entry.js} +1 -1
  260. package/dist/sankhyablocks/p-5e256568.entry.js +1 -0
  261. package/dist/sankhyablocks/p-6564180d.entry.js +1 -0
  262. package/dist/sankhyablocks/p-685bc841.js +60 -0
  263. package/dist/sankhyablocks/p-68c1a093.js +1 -0
  264. package/dist/sankhyablocks/{p-0b9a42ad.entry.js → p-7150eacf.entry.js} +1 -1
  265. package/dist/sankhyablocks/p-72d62f22.js +1 -0
  266. package/dist/sankhyablocks/{p-825098c1.entry.js → p-752c57f4.entry.js} +1 -1
  267. package/dist/sankhyablocks/{p-e258de96.entry.js → p-76729994.entry.js} +1 -1
  268. package/dist/sankhyablocks/p-7c4f4851.js +1 -0
  269. package/dist/sankhyablocks/p-7d8bf156.entry.js +1 -0
  270. package/dist/sankhyablocks/{p-92cfc028.js → p-7e9f8fa4.js} +1 -1
  271. package/dist/sankhyablocks/{p-118c221e.js → p-8b4d6719.js} +1 -1
  272. package/dist/sankhyablocks/{p-3d41f5a8.entry.js → p-8d946600.entry.js} +1 -1
  273. package/dist/sankhyablocks/{p-96d45943.entry.js → p-90ae6c2e.entry.js} +1 -1
  274. package/dist/sankhyablocks/{p-7d6f1285.js → p-9114e869.js} +1 -1
  275. package/dist/sankhyablocks/p-95444e96.js +1 -0
  276. package/dist/sankhyablocks/{p-21107f0d.entry.js → p-9c1ff75e.entry.js} +1 -1
  277. package/dist/sankhyablocks/p-9ce1539b.entry.js +1 -0
  278. package/dist/sankhyablocks/{p-2fdac5e6.entry.js → p-9e109f5e.entry.js} +1 -1
  279. package/dist/sankhyablocks/p-a210e55b.entry.js +1 -0
  280. package/dist/sankhyablocks/p-a2a9f520.entry.js +1 -0
  281. package/dist/sankhyablocks/p-a46ac091.js +1 -0
  282. package/dist/sankhyablocks/p-a73b6b00.js +1 -0
  283. package/dist/sankhyablocks/{p-c35fc941.js → p-a9839628.js} +1 -1
  284. package/dist/sankhyablocks/{p-180716b2.entry.js → p-ae326d06.entry.js} +1 -1
  285. package/dist/sankhyablocks/{p-c98c79c3.entry.js → p-b25777fa.entry.js} +1 -1
  286. package/dist/sankhyablocks/p-b555ce38.entry.js +1 -0
  287. package/dist/sankhyablocks/p-bdf0077f.js +1 -0
  288. package/dist/sankhyablocks/p-c3ec6642.js +19 -0
  289. package/dist/sankhyablocks/p-c6a97fda.entry.js +1 -0
  290. package/dist/sankhyablocks/{p-91a9abb6.entry.js → p-c8043a53.entry.js} +1 -1
  291. package/dist/sankhyablocks/p-c860552e.entry.js +1 -0
  292. package/dist/sankhyablocks/{p-c3dbf441.entry.js → p-cc64239c.entry.js} +1 -1
  293. package/dist/sankhyablocks/{p-471b34f4.entry.js → p-cd00a3d1.entry.js} +1 -1
  294. package/dist/sankhyablocks/{p-4c763b10.entry.js → p-d657f71f.entry.js} +1 -1
  295. package/dist/sankhyablocks/p-da455c82.js +12 -0
  296. package/dist/sankhyablocks/{p-002d4d2b.js → p-e0a6818c.js} +1 -1
  297. package/dist/sankhyablocks/p-e0e3914e.entry.js +1 -0
  298. package/dist/sankhyablocks/p-e30acdca.entry.js +1 -0
  299. package/dist/sankhyablocks/p-ebce5394.entry.js +1 -0
  300. package/dist/sankhyablocks/p-ee56dda6.entry.js +1 -0
  301. package/dist/sankhyablocks/p-ef9343c3.entry.js +1 -0
  302. package/dist/sankhyablocks/{p-667cab42.entry.js → p-f152ef98.entry.js} +1 -1
  303. package/dist/sankhyablocks/p-f4ac3b50.entry.js +1 -0
  304. package/dist/sankhyablocks/{p-7e250432.entry.js → p-f7170e10.entry.js} +1 -1
  305. package/dist/sankhyablocks/{p-7345782c.entry.js → p-f921270b.entry.js} +1 -1
  306. package/dist/sankhyablocks/p-fc5e95f4.entry.js +1 -0
  307. package/dist/sankhyablocks/p-fce86770.entry.js +1 -0
  308. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  309. package/dist/types/components/snk-application/snk-application.d.ts +1 -1
  310. package/dist/types/components/snk-crud/snk-crud.d.ts +5 -1
  311. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +12 -0
  312. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +9 -7
  313. package/dist/types/components/snk-custom-slot-guide/snk-custom-slot-guide.d.ts +16 -0
  314. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +1 -0
  315. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +1 -1
  316. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
  317. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -1
  318. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +2 -1
  319. package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +1 -1
  320. package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +2 -2
  321. package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +1 -1
  322. package/dist/types/components/snk-form-config/snk-form-config.d.ts +2 -1
  323. package/dist/types/components/snk-grid/snk-grid.d.ts +1 -0
  324. package/dist/types/components/snk-image-input/snk-image-input.d.ts +56 -0
  325. package/dist/types/components/snk-image-input/utils/ImageUtils.d.ts +15 -0
  326. package/dist/types/components/snk-personalized-filter/interfaces/IParameter.d.ts +1 -0
  327. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +0 -1
  328. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -1
  329. package/dist/types/components.d.ts +134 -1
  330. package/dist/types/lib/message/resources/en-us/snk-image-input.msg.d.ts +1 -0
  331. package/dist/types/lib/message/resources/es-es/snk-image-input.msg.d.ts +1 -0
  332. package/dist/types/lib/message/resources/pt-br/snk-image-input.msg.d.ts +1 -0
  333. package/package.json +1 -1
  334. package/react/components.d.ts +2 -0
  335. package/react/components.js +2 -0
  336. package/react/components.js.map +1 -1
  337. package/dist/sankhyablocks/p-093f58fa.entry.js +0 -1
  338. package/dist/sankhyablocks/p-0948dc0a.entry.js +0 -11
  339. package/dist/sankhyablocks/p-16f05a66.entry.js +0 -1
  340. package/dist/sankhyablocks/p-1d589380.entry.js +0 -1
  341. package/dist/sankhyablocks/p-28f50632.js +0 -1
  342. package/dist/sankhyablocks/p-39be771c.js +0 -1
  343. package/dist/sankhyablocks/p-3ed04f0d.entry.js +0 -1
  344. package/dist/sankhyablocks/p-4963dd2a.entry.js +0 -1
  345. package/dist/sankhyablocks/p-55798617.js +0 -1
  346. package/dist/sankhyablocks/p-55f6fef2.entry.js +0 -1
  347. package/dist/sankhyablocks/p-56f16390.entry.js +0 -1
  348. package/dist/sankhyablocks/p-58683e28.js +0 -60
  349. package/dist/sankhyablocks/p-5ea893c5.entry.js +0 -1
  350. package/dist/sankhyablocks/p-60dd1d27.entry.js +0 -1
  351. package/dist/sankhyablocks/p-62e9b9b8.entry.js +0 -1
  352. package/dist/sankhyablocks/p-669bb869.entry.js +0 -1
  353. package/dist/sankhyablocks/p-6ee2ca7a.entry.js +0 -1
  354. package/dist/sankhyablocks/p-7cac3870.entry.js +0 -1
  355. package/dist/sankhyablocks/p-86e54841.entry.js +0 -1
  356. package/dist/sankhyablocks/p-88b337fe.entry.js +0 -1
  357. package/dist/sankhyablocks/p-91005a00.entry.js +0 -1
  358. package/dist/sankhyablocks/p-988afe78.js +0 -1
  359. package/dist/sankhyablocks/p-ada013c0.entry.js +0 -1
  360. package/dist/sankhyablocks/p-b7e891cc.entry.js +0 -1
  361. package/dist/sankhyablocks/p-b987e15d.js +0 -1
  362. package/dist/sankhyablocks/p-cadf4846.entry.js +0 -1
  363. package/dist/sankhyablocks/p-d8d8169b.js +0 -2
  364. package/dist/sankhyablocks/p-e91c3c57.entry.js +0 -1
  365. package/dist/sankhyablocks/p-ea729922.entry.js +0 -1
  366. package/dist/sankhyablocks/p-ec5fbad8.js +0 -1
  367. package/dist/sankhyablocks/p-f5e942b7.entry.js +0 -1
@@ -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,
@@ -49,7 +49,7 @@ export const buildCustomButton = (def, className, dataElementId, action, isEnabl
49
49
  }
50
50
  };
51
51
  export const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions, dataExporterStoreKey, presentationMode) => {
52
- var _a;
52
+ var _a, _b;
53
53
  const title = getTitle(element);
54
54
  switch (element) {
55
55
  case TaskbarElement.PREVIOUS:
@@ -92,11 +92,12 @@ export const buildElem = (element, className, dataElementId, getTitle, action, i
92
92
  }
93
93
  return iconButton("settings-inverted", element, className, dataElementId, title, action, isEnabled);
94
94
  case TaskbarElement.MORE_OPTIONS:
95
- return actionButton(element, className, dataElementId, title, isEnabled, actions, action);
95
+ const definedActions = (_a = actions === null || actions === void 0 ? void 0 : actions.filter(a => a !== undefined)) !== null && _a !== void 0 ? _a : [];
96
+ return actionButton(element, className, dataElementId, title, isEnabled, definedActions, action);
96
97
  case TaskbarElement.DIVIDER:
97
98
  return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin--none ez-margin-left--medium", "data-taskbar-divider": true });
98
99
  case TaskbarElement.DATA_EXPORTER:
99
- const provider = (_a = store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[dataExporterStoreKey];
100
+ const provider = (_b = store.get("exporterProviders")) === null || _b === void 0 ? void 0 : _b[dataExporterStoreKey];
100
101
  return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element });
101
102
  case TaskbarElement.ATTACH:
102
103
  return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
@@ -127,8 +127,17 @@ export class SnkMessageBuilder {
127
127
  const messagesUrl = await this._application.getApplicationPath();
128
128
  const langSuffix = (this._lang !== LangUtils.ELanguages.PT_BR) ? `-${this._lang}` : "";
129
129
  const fileUrl = `${messagesUrl}/messages/appmessages${langSuffix}.js`;
130
- const module = await import(/* webpackIgnore: true */ fileUrl);
131
- return module === null || module === void 0 ? void 0 : module.default;
130
+ const response = await fetch(fileUrl);
131
+ if (!response.ok) {
132
+ throw new Error(`Não foi possível carregar as mensagens: ${response.status} ${response.statusText}`);
133
+ }
134
+ let scriptContent = await response.text();
135
+ if (scriptContent.trim().startsWith('<!DOCTYPE') || scriptContent.trim().startsWith('<html')) {
136
+ throw new Error('Não foi encontrado um arquivo de mensagens válido.');
137
+ }
138
+ scriptContent = scriptContent.replace(/export\s+default\s+/g, 'return ');
139
+ const func = new Function(scriptContent);
140
+ return func();
132
141
  }
133
142
  }
134
143
  export var OperationMap;