@sankhyalabs/sankhyablocks 9.1.0-dev.12 → 9.1.0-dev.14

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 (331) hide show
  1. package/dist/cjs/{ClientSideExporterProvider-6a4108c9.js → ClientSideExporterProvider-c14393e1.js} +10 -6
  2. package/dist/cjs/{ConfigStorage-34aa43d8.js → ConfigStorage-54b9f26d.js} +12 -2
  3. package/dist/cjs/{DataFetcher-e23a263b.js → DataFetcher-b3508dda.js} +2737 -22
  4. package/dist/cjs/{FormConfigHelper-c664dbae.js → FormConfigHelper-ebb77625.js} +4 -5
  5. package/dist/cjs/{ISave-e0be2362.js → ISave-b4f736d5.js} +1 -1
  6. package/dist/cjs/{SnkFormConfigManager-61bf3266.js → SnkFormConfigManager-ee250c13.js} +2 -2
  7. package/dist/cjs/{auth-fetcher-8670a38f.js → auth-fetcher-e9ffe276.js} +1 -1
  8. package/dist/cjs/config-header.cjs.entry.js +2 -2
  9. package/dist/cjs/{dataunit-fetcher-c34a8217.js → dataunit-fetcher-0fe0ee18.js} +22 -21
  10. package/dist/cjs/field-config_2.cjs.entry.js +9 -6
  11. package/dist/cjs/fields-layout.cjs.entry.js +20 -13
  12. package/dist/cjs/fields-selector.cjs.entry.js +11 -6
  13. package/dist/cjs/{form-config-fetcher-d8b78403.js → form-config-fetcher-e4187da9.js} +1 -1
  14. package/dist/cjs/guides-configurator.cjs.entry.js +14 -3
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +12 -8
  17. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  18. package/dist/cjs/snk-actions-button_8.cjs.entry.js +92 -43
  19. package/dist/cjs/snk-application.cjs.entry.js +26 -21
  20. package/dist/cjs/snk-attach.cjs.entry.js +18 -12
  21. package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
  22. package/dist/cjs/snk-crud.cjs.entry.js +17 -13
  23. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -6
  24. package/dist/cjs/{snk-data-unit-5517689f.js → snk-data-unit-a0224064.js} +14 -20
  25. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -4
  26. package/dist/cjs/snk-detail-view.cjs.entry.js +21 -15
  27. package/dist/cjs/snk-expression-group_2.cjs.entry.js +21 -20
  28. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +10 -10
  29. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  30. package/dist/cjs/snk-filter-number.cjs.entry.js +3 -1
  31. package/dist/cjs/snk-filter-period.cjs.entry.js +3 -1
  32. package/dist/cjs/snk-form_2.cjs.entry.js +9 -9
  33. package/dist/cjs/snk-grid.cjs.entry.js +6 -6
  34. package/dist/cjs/{snk-guides-viewer-29298823.js → snk-guides-viewer-6b4be669.js} +9 -9
  35. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  36. package/dist/cjs/snk-personalized-filter.cjs.entry.js +4 -4
  37. package/dist/cjs/snk-pesquisa.cjs.entry.js +26 -19
  38. package/dist/cjs/snk-simple-crud.cjs.entry.js +18 -16
  39. package/dist/collection/components/snk-actions-button/clientEvent/index.js +3 -2
  40. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +12 -6
  41. package/dist/collection/components/snk-application/snk-application.js +7 -7
  42. package/dist/collection/components/snk-attach/snk-attach.js +1 -1
  43. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +7 -4
  44. package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +7 -3
  45. package/dist/collection/components/snk-configurator/snk-configurator.js +1 -1
  46. package/dist/collection/components/snk-crud/snk-crud.js +12 -8
  47. package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js +11 -3
  48. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +4 -4
  49. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +5 -5
  50. package/dist/collection/components/snk-data-unit/MultipleUpdateHelper.js +4 -1
  51. package/dist/collection/components/snk-data-unit/snk-data-unit.js +0 -8
  52. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +3 -1
  53. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +3 -1
  54. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +1 -1
  55. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +1 -1
  56. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +5 -5
  57. package/dist/collection/components/snk-form-config/FormConfigHelper.js +4 -5
  58. package/dist/collection/components/snk-form-config/config-header/config-header.js +2 -2
  59. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.js +2 -2
  60. package/dist/collection/components/snk-form-config/field-item/field-item.js +6 -3
  61. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +2 -2
  62. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +20 -11
  63. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js +30 -5
  64. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +2 -2
  65. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +15 -2
  66. package/dist/collection/components/snk-form-config/snk-form-config.js +3 -3
  67. package/dist/collection/components/snk-grid-config/snk-grid-config.js +73 -35
  68. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +30 -1
  69. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
  70. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +3 -3
  71. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js +12 -12
  72. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +6 -5
  73. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +28 -4
  74. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +23 -16
  75. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +12 -10
  76. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +26 -1
  77. package/dist/collection/lib/configs/ConfigStorage.js +3 -0
  78. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +19 -12
  79. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js +22 -20
  80. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +9 -1
  81. package/dist/collection/lib/message/SnkMessageBuilder.js +28 -7
  82. package/dist/collection/lib/message/messageResourceEnUSUtils.js +30 -45
  83. package/dist/collection/lib/message/messageResourceEsESUtils.js +30 -45
  84. package/dist/collection/lib/message/messageResourcePtBRUtils.js +30 -45
  85. package/dist/collection/lib/message/resources/en-us/continuousInsertUtils.msg.js +6 -0
  86. package/dist/collection/lib/message/resources/en-us/dataFetcher.msg.js +12 -0
  87. package/dist/collection/lib/message/resources/en-us/dataUnitDataLoaderHelper.msg.js +18 -0
  88. package/dist/collection/lib/message/resources/en-us/snk-actions-button.msg.js +3 -1
  89. package/dist/collection/lib/message/resources/en-us/snk-application.msg.js +21 -2
  90. package/dist/collection/lib/message/resources/en-us/snk-attach.msg.js +4 -1
  91. package/dist/collection/lib/message/resources/en-us/snk-configurator.msg.js +6 -1
  92. package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +28 -3
  93. package/dist/collection/lib/message/resources/en-us/snk-data-unit.msg.js +5 -2
  94. package/dist/collection/lib/message/resources/en-us/snk-error-handler.msg.js +17 -0
  95. package/dist/collection/lib/message/resources/en-us/snk-filter-bar.msg.js +7 -0
  96. package/dist/collection/lib/message/resources/en-us/snk-filter-list.msg.js +3 -0
  97. package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +44 -2
  98. package/dist/collection/lib/message/resources/en-us/snk-grid.msg.js +27 -26
  99. package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js +10 -0
  100. package/dist/collection/lib/message/resources/en-us/snk-personalized-filter.msg.js +17 -0
  101. package/dist/collection/lib/message/resources/en-us/snk-pesquisa.msg.js +25 -0
  102. package/dist/collection/lib/message/resources/en-us/snk-simple-crud.msg.js +6 -0
  103. package/dist/collection/lib/message/resources/en-us/snk-simple-form-config.msg.js +16 -0
  104. package/dist/collection/lib/message/resources/es-es/continuousInsertUtils.msg.js +6 -0
  105. package/dist/collection/lib/message/resources/es-es/dataFetcher.msg.js +12 -0
  106. package/dist/collection/lib/message/resources/es-es/dataUnitDataLoaderHelper.msg.js +18 -0
  107. package/dist/collection/lib/message/resources/es-es/snk-actions-button.msg.js +3 -1
  108. package/dist/collection/lib/message/resources/es-es/snk-application.msg.js +21 -2
  109. package/dist/collection/lib/message/resources/es-es/snk-attach.msg.js +3 -0
  110. package/dist/collection/lib/message/resources/es-es/snk-configurator.msg.js +6 -1
  111. package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +27 -2
  112. package/dist/collection/lib/message/resources/es-es/snk-data-unit.msg.js +3 -0
  113. package/dist/collection/lib/message/resources/es-es/snk-error-handler.msg.js +17 -0
  114. package/dist/collection/lib/message/resources/es-es/snk-filter-bar.msg.js +7 -0
  115. package/dist/collection/lib/message/resources/es-es/snk-filter-list.msg.js +3 -0
  116. package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +44 -2
  117. package/dist/collection/lib/message/resources/es-es/snk-grid.msg.js +27 -26
  118. package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js +10 -0
  119. package/dist/collection/lib/message/resources/es-es/snk-personalized-filter.msg.js +17 -0
  120. package/dist/collection/lib/message/resources/es-es/snk-pesquisa.msg.js +25 -0
  121. package/dist/collection/lib/message/resources/es-es/snk-simple-crud.msg.js +6 -0
  122. package/dist/collection/lib/message/resources/es-es/snk-simple-form-config.msg.js +16 -0
  123. package/dist/collection/lib/message/resources/pt-br/continuousInsertUtils.msg.js +6 -0
  124. package/dist/collection/lib/message/resources/pt-br/dataFetcher.msg.js +12 -0
  125. package/dist/collection/lib/message/resources/pt-br/dataUnitDataLoaderHelper.msg.js +18 -0
  126. package/dist/collection/lib/message/resources/pt-br/snk-actions-button.msg.js +3 -1
  127. package/dist/collection/lib/message/resources/pt-br/snk-application.msg.js +19 -0
  128. package/dist/collection/lib/message/resources/pt-br/snk-attach.msg.js +3 -0
  129. package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js +6 -1
  130. package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +27 -2
  131. package/dist/collection/lib/message/resources/pt-br/snk-data-unit.msg.js +3 -0
  132. package/dist/collection/lib/message/resources/pt-br/snk-error-handler.msg.js +17 -0
  133. package/dist/collection/lib/message/resources/pt-br/snk-filter-bar.msg.js +7 -0
  134. package/dist/collection/lib/message/resources/pt-br/snk-filter-list.msg.js +3 -0
  135. package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +45 -3
  136. package/dist/collection/lib/message/resources/pt-br/snk-grid.msg.js +27 -26
  137. package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js +10 -0
  138. package/dist/collection/lib/message/resources/pt-br/snk-personalized-filter.msg.js +17 -0
  139. package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +24 -0
  140. package/dist/collection/lib/message/resources/pt-br/snk-simple-crud.msg.js +6 -0
  141. package/dist/collection/lib/message/resources/pt-br/snk-simple-form-config.msg.js +16 -0
  142. package/dist/collection/lib/utils/ContinuousInsertUtils.js +6 -2
  143. package/dist/components/ConfigStorage.js +11 -1
  144. package/dist/components/ContinuousInsertUtils.js +6 -2
  145. package/dist/components/DataFetcher.js +2707 -13
  146. package/dist/components/config-header2.js +2 -2
  147. package/dist/components/dataunit-fetcher.js +22 -21
  148. package/dist/components/field-config2.js +6 -7
  149. package/dist/components/field-item2.js +6 -3
  150. package/dist/components/fields-layout2.js +19 -12
  151. package/dist/components/fields-selector2.js +11 -5
  152. package/dist/components/guides-configurator2.js +14 -3
  153. package/dist/components/pesquisa-tree2.js +9 -4
  154. package/dist/components/snk-actions-button2.js +3 -2
  155. package/dist/components/snk-application2.js +20 -15
  156. package/dist/components/snk-attach2.js +14 -8
  157. package/dist/components/snk-configurator2.js +1 -1
  158. package/dist/components/snk-crud.js +12 -8
  159. package/dist/components/snk-data-unit2.js +5 -11
  160. package/dist/components/snk-detail-view2.js +19 -13
  161. package/dist/components/snk-expression-group2.js +3 -3
  162. package/dist/components/snk-expression-item2.js +18 -17
  163. package/dist/components/snk-filter-bar2.js +5 -5
  164. package/dist/components/snk-filter-list.js +1 -1
  165. package/dist/components/snk-filter-modal.js +1 -1
  166. package/dist/components/snk-filter-number.js +3 -1
  167. package/dist/components/snk-filter-period.js +3 -1
  168. package/dist/components/snk-form-config2.js +3 -3
  169. package/dist/components/snk-grid-config2.js +72 -34
  170. package/dist/components/snk-layout-form-config2.js +7 -1
  171. package/dist/components/snk-personalized-filter2.js +1 -1
  172. package/dist/components/snk-pesquisa2.js +23 -16
  173. package/dist/components/snk-simple-crud2.js +12 -10
  174. package/dist/components/snk-simple-form-config2.js +7 -1
  175. package/dist/esm/{ClientSideExporterProvider-09dee1a3.js → ClientSideExporterProvider-4f81855c.js} +10 -6
  176. package/dist/esm/{ConfigStorage-89154c4e.js → ConfigStorage-7f782e00.js} +12 -2
  177. package/dist/esm/{DataFetcher-db08cad0.js → DataFetcher-b51050a0.js} +2707 -13
  178. package/dist/esm/{FormConfigHelper-49fe72ca.js → FormConfigHelper-4e42f0b6.js} +4 -5
  179. package/dist/esm/{ISave-da565824.js → ISave-bc31d9f4.js} +1 -1
  180. package/dist/esm/{SnkFormConfigManager-d64d62d6.js → SnkFormConfigManager-ab1948b0.js} +2 -2
  181. package/dist/esm/{auth-fetcher-43c8d76b.js → auth-fetcher-8ac800aa.js} +1 -1
  182. package/dist/esm/config-header.entry.js +2 -2
  183. package/dist/esm/{dataunit-fetcher-1b78797a.js → dataunit-fetcher-16702941.js} +22 -21
  184. package/dist/esm/field-config_2.entry.js +9 -6
  185. package/dist/esm/fields-layout.entry.js +20 -13
  186. package/dist/esm/fields-selector.entry.js +11 -6
  187. package/dist/esm/{form-config-fetcher-e623539b.js → form-config-fetcher-6fe8d856.js} +1 -1
  188. package/dist/esm/guides-configurator.entry.js +14 -3
  189. package/dist/esm/loader.js +1 -1
  190. package/dist/esm/pesquisa-grid_2.entry.js +12 -8
  191. package/dist/esm/sankhyablocks.js +1 -1
  192. package/dist/esm/snk-actions-button_8.entry.js +92 -43
  193. package/dist/esm/snk-application.entry.js +25 -20
  194. package/dist/esm/snk-attach.entry.js +18 -12
  195. package/dist/esm/snk-configurator.entry.js +1 -1
  196. package/dist/esm/snk-crud.entry.js +17 -13
  197. package/dist/esm/snk-data-exporter.entry.js +5 -6
  198. package/dist/esm/{snk-data-unit-fbb82ed9.js → snk-data-unit-fd6be603.js} +6 -12
  199. package/dist/esm/snk-data-unit.entry.js +3 -4
  200. package/dist/esm/snk-detail-view.entry.js +21 -15
  201. package/dist/esm/snk-expression-group_2.entry.js +21 -20
  202. package/dist/esm/snk-filter-bar_4.entry.js +10 -10
  203. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  204. package/dist/esm/snk-filter-number.entry.js +3 -1
  205. package/dist/esm/snk-filter-period.entry.js +3 -1
  206. package/dist/esm/snk-form_2.entry.js +9 -9
  207. package/dist/esm/snk-grid.entry.js +6 -6
  208. package/dist/esm/{snk-guides-viewer-9335318d.js → snk-guides-viewer-480d909c.js} +10 -10
  209. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  210. package/dist/esm/snk-personalized-filter.entry.js +4 -4
  211. package/dist/esm/snk-pesquisa.entry.js +27 -20
  212. package/dist/esm/snk-simple-crud.entry.js +19 -17
  213. package/dist/sankhyablocks/{p-fa591f6f.js → p-05969d8a.js} +1 -1
  214. package/dist/sankhyablocks/p-07b14811.entry.js +1 -0
  215. package/dist/sankhyablocks/p-11346b8d.entry.js +1 -0
  216. package/dist/sankhyablocks/p-162a92a7.entry.js +1 -0
  217. package/dist/sankhyablocks/p-187a58f2.entry.js +1 -0
  218. package/dist/sankhyablocks/p-1a150f81.entry.js +1 -0
  219. package/dist/sankhyablocks/p-1a53afc6.entry.js +1 -0
  220. package/dist/sankhyablocks/p-20e0db8f.entry.js +1 -0
  221. package/dist/sankhyablocks/p-21b7b011.entry.js +1 -0
  222. package/dist/sankhyablocks/p-367c998c.entry.js +1 -0
  223. package/dist/sankhyablocks/p-379d6206.js +60 -0
  224. package/dist/sankhyablocks/p-566b468b.entry.js +1 -0
  225. package/dist/sankhyablocks/{p-c9657baa.js → p-56874df8.js} +1 -1
  226. package/dist/sankhyablocks/p-5bab470d.entry.js +1 -0
  227. package/dist/sankhyablocks/p-6444de46.entry.js +11 -0
  228. package/dist/sankhyablocks/p-64fed9bf.js +1 -0
  229. package/dist/sankhyablocks/p-6703336d.entry.js +1 -0
  230. package/dist/sankhyablocks/{p-412e06e9.js → p-6cf54569.js} +1 -1
  231. package/dist/sankhyablocks/{p-b21d32f6.js → p-709bf708.js} +1 -1
  232. package/dist/sankhyablocks/p-735a1175.entry.js +1 -0
  233. package/dist/sankhyablocks/p-75af335e.entry.js +1 -0
  234. package/dist/sankhyablocks/p-7b3ca294.entry.js +1 -0
  235. package/dist/sankhyablocks/p-7baecc09.entry.js +1 -0
  236. package/dist/sankhyablocks/p-7fd47ce5.entry.js +1 -0
  237. package/dist/sankhyablocks/p-8f73da95.js +1 -0
  238. package/dist/sankhyablocks/{p-b2946adb.entry.js → p-a200817c.entry.js} +1 -1
  239. package/dist/sankhyablocks/p-a5108625.entry.js +1 -0
  240. package/dist/sankhyablocks/p-c4eae355.entry.js +1 -0
  241. package/dist/sankhyablocks/p-cc55bf41.entry.js +1 -0
  242. package/dist/sankhyablocks/p-d271f2b4.entry.js +1 -0
  243. package/dist/sankhyablocks/p-d540affc.js +1 -0
  244. package/dist/sankhyablocks/{p-e25412da.js → p-dc27d59a.js} +1 -1
  245. package/dist/sankhyablocks/{p-5126b34e.entry.js → p-e67e9a48.entry.js} +1 -1
  246. package/dist/sankhyablocks/p-e93ca8a8.js +1 -0
  247. package/dist/sankhyablocks/p-f8f29e1a.entry.js +1 -0
  248. package/dist/sankhyablocks/p-fb757021.js +56 -0
  249. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  250. package/dist/types/components/snk-application/errorhandler/snk-error-handler.d.ts +1 -0
  251. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +1 -1
  252. package/dist/types/components/snk-crud/snk-crud.d.ts +1 -0
  253. package/dist/types/components/snk-crud/subcomponents/GuideBuilder.d.ts +4 -1
  254. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +0 -6
  255. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +1 -0
  256. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
  257. package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +1 -1
  258. package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +3 -1
  259. package/dist/types/components/snk-form-config/fields-selector/fields-selector.d.ts +3 -0
  260. package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +2 -0
  261. package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +7 -0
  262. package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +3 -0
  263. package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +1 -0
  264. package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +6 -0
  265. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +3 -0
  266. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +1 -0
  267. package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +6 -0
  268. package/dist/types/components.d.ts +20 -0
  269. package/dist/types/lib/configs/ConfigStorage.d.ts +1 -0
  270. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +2 -0
  271. package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +3 -2
  272. package/dist/types/lib/message/SnkMessageBuilder.d.ts +8 -1
  273. package/dist/types/lib/message/resources/en-us/continuousInsertUtils.msg.d.ts +1 -0
  274. package/dist/types/lib/message/resources/en-us/dataFetcher.msg.d.ts +1 -0
  275. package/dist/types/lib/message/resources/en-us/dataUnitDataLoaderHelper.msg.d.ts +1 -0
  276. package/dist/types/lib/message/resources/en-us/snk-error-handler.msg.d.ts +1 -0
  277. package/dist/types/lib/message/resources/en-us/snk-filter-list.msg.d.ts +1 -0
  278. package/dist/types/lib/message/resources/en-us/snk-layout-form-config.msg.d.ts +1 -0
  279. package/dist/types/lib/message/resources/en-us/snk-pesquisa.msg.d.ts +1 -0
  280. package/dist/types/lib/message/resources/en-us/snk-simple-form-config.msg.d.ts +1 -0
  281. package/dist/types/lib/message/resources/es-es/continuousInsertUtils.msg.d.ts +1 -0
  282. package/dist/types/lib/message/resources/es-es/dataFetcher.msg.d.ts +1 -0
  283. package/dist/types/lib/message/resources/es-es/dataUnitDataLoaderHelper.msg.d.ts +1 -0
  284. package/dist/types/lib/message/resources/es-es/snk-error-handler.msg.d.ts +1 -0
  285. package/dist/types/lib/message/resources/es-es/snk-filter-list.msg.d.ts +1 -0
  286. package/dist/types/lib/message/resources/es-es/snk-layout-form-config.msg.d.ts +1 -0
  287. package/dist/types/lib/message/resources/es-es/snk-pesquisa.msg.d.ts +1 -0
  288. package/dist/types/lib/message/resources/es-es/snk-simple-form-config.msg.d.ts +1 -0
  289. package/dist/types/lib/message/resources/pt-br/continuousInsertUtils.msg.d.ts +1 -0
  290. package/dist/types/lib/message/resources/pt-br/dataFetcher.msg.d.ts +1 -0
  291. package/dist/types/lib/message/resources/pt-br/dataUnitDataLoaderHelper.msg.d.ts +1 -0
  292. package/dist/types/lib/message/resources/pt-br/snk-error-handler.msg.d.ts +1 -0
  293. package/dist/types/lib/message/resources/pt-br/snk-filter-list.msg.d.ts +1 -0
  294. package/dist/types/lib/message/resources/pt-br/snk-layout-form-config.msg.d.ts +1 -0
  295. package/dist/types/lib/message/resources/pt-br/snk-pesquisa.msg.d.ts +1 -0
  296. package/dist/types/lib/message/resources/pt-br/snk-simple-form-config.msg.d.ts +1 -0
  297. package/dist/types/lib/utils/ContinuousInsertUtils.d.ts +1 -0
  298. package/package.json +1 -1
  299. package/dist/cjs/SnkMessageBuilder-252f813c.js +0 -1934
  300. package/dist/components/SnkMessageBuilder.js +0 -1912
  301. package/dist/esm/SnkMessageBuilder-6327dfe7.js +0 -1912
  302. package/dist/sankhyablocks/p-02480593.entry.js +0 -1
  303. package/dist/sankhyablocks/p-1c69a957.entry.js +0 -1
  304. package/dist/sankhyablocks/p-1ea6925d.js +0 -1
  305. package/dist/sankhyablocks/p-22a8656b.entry.js +0 -1
  306. package/dist/sankhyablocks/p-23b20add.entry.js +0 -1
  307. package/dist/sankhyablocks/p-2d58f98e.entry.js +0 -1
  308. package/dist/sankhyablocks/p-2ffd4b27.entry.js +0 -1
  309. package/dist/sankhyablocks/p-31193a60.entry.js +0 -1
  310. package/dist/sankhyablocks/p-35e73c5d.js +0 -1
  311. package/dist/sankhyablocks/p-37b4f642.js +0 -60
  312. package/dist/sankhyablocks/p-4212e05b.js +0 -1
  313. package/dist/sankhyablocks/p-49d968e2.entry.js +0 -1
  314. package/dist/sankhyablocks/p-4d2ff2fb.entry.js +0 -1
  315. package/dist/sankhyablocks/p-60d3abf6.entry.js +0 -1
  316. package/dist/sankhyablocks/p-71a05822.entry.js +0 -1
  317. package/dist/sankhyablocks/p-79387c24.entry.js +0 -1
  318. package/dist/sankhyablocks/p-7ced2cf4.entry.js +0 -1
  319. package/dist/sankhyablocks/p-86bd4478.entry.js +0 -1
  320. package/dist/sankhyablocks/p-8758404f.js +0 -56
  321. package/dist/sankhyablocks/p-a2c6944d.entry.js +0 -1
  322. package/dist/sankhyablocks/p-cb2a4613.entry.js +0 -1
  323. package/dist/sankhyablocks/p-cd1a5b6a.js +0 -1
  324. package/dist/sankhyablocks/p-cfc219f6.entry.js +0 -1
  325. package/dist/sankhyablocks/p-d079567f.entry.js +0 -11
  326. package/dist/sankhyablocks/p-d67526b6.entry.js +0 -1
  327. package/dist/sankhyablocks/p-d74ed09e.entry.js +0 -1
  328. package/dist/sankhyablocks/p-e56eb36b.entry.js +0 -1
  329. package/dist/sankhyablocks/p-f442c8f6.entry.js +0 -1
  330. package/dist/sankhyablocks/p-fc87708a.js +0 -1
  331. package/dist/sankhyablocks/p-fd571197.entry.js +0 -1
@@ -83,23 +83,10 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
83
83
  this._orderListItems = newSortableList;
84
84
  }
85
85
  createColumnList() {
86
- let visibleGroup = {
87
- group: this.getMessage('snkGridConfig.group.visible'),
88
- items: [],
89
- };
90
- let hiddenGroup = {
91
- group: this.getMessage('snkGridConfig.group.hidden'),
92
- items: [],
93
- sort: ORDER_VALUES.asc.value,
94
- };
95
- this.columns.forEach((column) => {
96
- var _a;
97
- let item = {
98
- label: column.label,
99
- selected: false,
100
- sort: (_a = column === null || column === void 0 ? void 0 : column.sort) !== null && _a !== void 0 ? _a : ORDER_VALUES.asc.value,
101
- id: column.name,
102
- };
86
+ const visibleGroup = this.buildVisibleGroup();
87
+ const hiddenGroup = this.buildHiddenGroup();
88
+ this.columns.forEach(column => {
89
+ const item = this.buildListItemFromColumn(column);
103
90
  if (column.hidden) {
104
91
  hiddenGroup.items.push(item);
105
92
  }
@@ -112,6 +99,19 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
112
99
  this._hiddenList = hiddenGroup.items;
113
100
  this.createOrderList();
114
101
  }
102
+ buildVisibleGroup() {
103
+ return {
104
+ group: this.getMessage('snkGridConfig.group.visible'),
105
+ items: [],
106
+ };
107
+ }
108
+ buildHiddenGroup() {
109
+ return {
110
+ group: this.getMessage('snkGridConfig.group.hidden'),
111
+ items: [],
112
+ sort: ORDER_VALUES.asc.value,
113
+ };
114
+ }
115
115
  createOrderListSlotDataElementId(item) {
116
116
  return `${this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_configItem_${StringUtils.toCamelCase(item.label)}`;
117
117
  }
@@ -159,25 +159,21 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
159
159
  this.closeConfig();
160
160
  return;
161
161
  }
162
- let newColumnList = [];
163
- this._columListItems.forEach((group) => {
164
- group.items.forEach((item) => {
165
- const baseColumn = this.columns.find((column) => column.label === item.label);
166
- let newColumnItem = Object.assign({}, baseColumn);
167
- if (group.group === this.getMessage('snkGridConfig.group.hidden')) {
168
- newColumnItem.hidden = true;
169
- }
170
- else {
171
- newColumnItem.hidden = false;
172
- }
173
- newColumnList.push(newColumnItem);
174
- });
175
- });
176
- this.columns = newColumnList;
162
+ this.updateColumns();
177
163
  this._dataChanged = false;
178
164
  this.closeConfig();
179
165
  this.save();
180
166
  }
167
+ updateColumns() {
168
+ this.columns = this._columListItems.flatMap((group) => group.items.map((item) => this.buildColumnFromListItem(item, group)));
169
+ }
170
+ buildColumnFromListItem(item, group) {
171
+ const baseColumn = this.columns.find((column) => column.label === item.label);
172
+ if (!baseColumn) {
173
+ throw new Error(`Column with label "${item.label}" not found.`);
174
+ }
175
+ return Object.assign(Object.assign({}, baseColumn), { hidden: group.group === this.getMessage('snkGridConfig.group.hidden') });
176
+ }
181
177
  saveGridConfigOnStorage(_newConfig) {
182
178
  ConfigStorage.saveGridConfig(_newConfig, this.configName, this.resourceID)
183
179
  .then((savedConfig) => {
@@ -347,13 +343,55 @@ const SnkGridConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
347
343
  },
348
344
  };
349
345
  }
346
+ renderResetConfigBtn() {
347
+ if (!this.resourceID)
348
+ return;
349
+ return h("ez-button", { class: "padding-right--medium", label: this.getMessage('snkGridConfig.reset'), onClick: () => this.setDefaultConfig() });
350
+ }
351
+ async setDefaultConfig() {
352
+ var _a;
353
+ if (!this.resourceID)
354
+ return;
355
+ this._dataChanged = true;
356
+ const config = await ConfigStorage.getDefaultGridConfig(this.resourceID);
357
+ const defaultVisibleCols = (_a = config === null || config === void 0 ? void 0 : config.columns.map(col => col.name)) !== null && _a !== void 0 ? _a : [];
358
+ const visibleGroup = this.buildVisibleGroup();
359
+ const hiddenGroup = this.buildHiddenGroup();
360
+ const visibleItemsMap = new Map();
361
+ this.columns.forEach(column => {
362
+ const item = this.buildListItemFromColumn(column);
363
+ if (defaultVisibleCols.includes(column.name)) {
364
+ visibleItemsMap.set(column.name, item);
365
+ }
366
+ else {
367
+ hiddenGroup.items.push(item);
368
+ }
369
+ });
370
+ visibleGroup.items = defaultVisibleCols
371
+ .map(name => visibleItemsMap.get(name))
372
+ .filter(item => item);
373
+ this._columListItems = [visibleGroup, hiddenGroup];
374
+ this._visibleList = visibleGroup.items;
375
+ this._hiddenList = hiddenGroup.items;
376
+ this.updateColumns();
377
+ this.createOrderList();
378
+ }
379
+ buildListItemFromColumn(column) {
380
+ var _a;
381
+ return {
382
+ label: column.label,
383
+ selected: false,
384
+ sort: (_a = column === null || column === void 0 ? void 0 : column.sort) !== null && _a !== void 0 ? _a : ORDER_VALUES.asc.value,
385
+ id: column.name,
386
+ };
387
+ }
350
388
  render() {
351
- return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "ez-margin-bottom--medium" }, h("label", { class: "title" }, this.getMessage('snkGridConfig.gridConfiguration')), h("label", { class: "subtitle" }, this.getMessage('snkGridConfig.columnVisibilityOrder'))), h("div", { class: "button-close" }, h("ez-button", { mode: "icon", iconName: "close", size: "medium", class: "ez-button--tertiary", onClick: () => this.closeConfig() })))), h("div", { class: "grid-config__body" }, h("ez-collapsible-box", { id: 'group-select-columns', label: this.getMessage('snkGridConfig.columnsSelection'), "header-size": "medium", key: 'key_group-select-columns', value: this._collapsibleBoxListSelect, onEzChange: ({ detail }) => this._collapsibleBoxListOrder = !detail }, h("div", { class: "grid-config__main" }, h("ez-double-list", { leftList: this._hiddenList, leftTitle: this.getMessage('snkGridConfig.availableColumns'), rightList: this._visibleList, rightTitle: this.getMessage('snkGridConfig.selectedColumns'), onEzRightListChanged: ({ detail }) => this.handleRightListChange(detail), emptyMessage: {
389
+ return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "ez-margin-bottom--medium" }, h("label", { class: "title" }, this.getMessage('snkGridConfig.gridConfiguration')), h("label", { class: "subtitle" }, this.getMessage('snkGridConfig.columnVisibilityOrder'))), h("div", { class: "button-close" }, h("ez-button", { mode: "icon", iconName: "close", size: "medium", class: "ez-button--tertiary", onClick: () => this.closeConfig() })))), h("div", { class: 'grid-config__body' }, h("ez-collapsible-box", { id: 'group-select-columns', label: this.getMessage('snkGridConfig.columnsSelection'), "header-size": "medium", key: 'key_group-select-columns', value: this._collapsibleBoxListSelect, onEzChange: ({ detail }) => this._collapsibleBoxListOrder = !detail }, h("div", { class: "grid-config__main" }, h("ez-double-list", { leftList: this._hiddenList, leftTitle: this.getMessage('snkGridConfig.availableColumns'), rightList: this._visibleList, rightTitle: this.getMessage('snkGridConfig.selectedColumns'), onEzRightListChanged: ({ detail }) => this.handleRightListChange(detail), emptyMessage: {
352
390
  LEFT_LIST: this.getMessage('snkGridConfig.emptyMensage.left'),
353
391
  RIGHT_LIST: this.getMessage('snkGridConfig.emptyMensage.right'),
354
392
  }, entityLabel: 'coluna', entityLabelPlural: 'colunas' }))), h("ez-collapsible-box", { id: 'ID_group-order-columns', label: this.getMessage('snkGridConfig.dataOrdering'), "header-size": "medium", key: 'KEY_group-order-columns', value: this._collapsibleBoxListOrder, onEzChange: ({ detail }) => this._collapsibleBoxListSelect = !detail }, h("div", { class: "grid-config__main" }, h("ez-double-list", { rightList: this._orderListItems, rightTitle: this.getMessage('snkGridConfig.selectedColumns'), useOnlyRightList: true, slotsListBuilder: this.getListSlots(), emptyMessage: {
355
393
  RIGHT_LIST: this.getMessage('snkGridConfig.emptyMensage.right'),
356
- }, entityLabel: 'coluna', entityLabelPlural: 'colunas' })))), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: this.getMessage('snkGridConfig.cancel'), onClick: () => this.closeConfig() }), h("ez-button", { label: this.getMessage('snkGridConfig.complete'), class: "ez-button--primary", onClick: () => this.finish() }))));
394
+ }, entityLabel: 'coluna', entityLabelPlural: 'colunas' })))), h("div", { class: "grid-config__footer" }, this.renderResetConfigBtn(), h("ez-button", { class: "padding-right--medium", label: this.getMessage('snkGridConfig.cancel'), onClick: () => this.closeConfig() }), h("ez-button", { label: this.getMessage('snkGridConfig.complete'), class: "ez-button--primary", onClick: () => this.finish() }))));
357
395
  }
358
396
  static get assetsDirs() { return ["../assets"]; }
359
397
  get _element() { return this; }
@@ -19,6 +19,7 @@ const SnkLayoutFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
19
19
  super();
20
20
  this.__registerHost();
21
21
  this._formConfigFetcher = new FormConfigFetcher();
22
+ this.messagesBuilder = undefined;
22
23
  this.layoutType = FormLayout.CASCADE;
23
24
  }
24
25
  /**
@@ -43,11 +44,16 @@ const SnkLayoutFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
43
44
  toggleLayout(key) {
44
45
  this.layoutType = key;
45
46
  }
47
+ getMessage(key, params) {
48
+ var _a;
49
+ return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
50
+ }
46
51
  render() {
47
- return (h("div", { class: "ez-flex ez-flex--column" }, h("div", { class: "ez-margin-bottom--small" }, h("ez-check", { label: "Layout em cascata", 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" }, "Todos os campos ser\u00E3o organizados em uma coluna \u00FAnica.")), h("div", null, h("ez-check", { label: "Layout lado a lado", 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" }, "Todos os campos ser\u00E3o dispostos lado a lado, ajustando-se automaticamente \u00E0 largura da tela."))));
52
+ 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')))));
48
53
  }
49
54
  static get style() { return snkLayoutFormConfigCss; }
50
55
  }, [2, "snk-layout-form-config", {
56
+ "messagesBuilder": [16],
51
57
  "layoutType": [32],
52
58
  "save": [64]
53
59
  }]);
@@ -62,7 +62,7 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
62
62
  entityName: "",
63
63
  fieldName: "",
64
64
  description: "",
65
- fieldLabel: "Valor",
65
+ fieldLabel: this.getMessage("snkPersonalizedFilter.info.labelDefaultValue"),
66
66
  type: undefined,
67
67
  expression: undefined,
68
68
  operand: undefined,
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { ObjectUtils, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
2
+ import { ObjectUtils, StringUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { a as PesquisaFetcher, d as buildGridMetadata, e as PESQUISA_VIEW_MODE } from './ISave.js';
4
4
  import './DataFetcher.js';
5
5
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
@@ -323,17 +323,21 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
323
323
  this._valideDataSource = true;
324
324
  }
325
325
  getMessageView() {
326
- return this._startLoading
327
- ? 'Aguarde, buscando registros...'
328
- : this._itemList
329
- ? this._itemList.length >= 1
330
- ? `${this._itemList.length} ${this._itemList.length > 1
331
- ? 'registros encontrados'
332
- : 'registro encontrado'}`
333
- : 'Nenhum registro encontrado'
334
- : 'Os resultados de sua pesquisa aparecerão aqui...';
326
+ if (this._startLoading)
327
+ return this.getMessage('snkPesquisa.search.waitMessage');
328
+ if (!this._itemList)
329
+ return this.getMessage('snkPesquisa.search.initialMessage');
330
+ const itemsCount = this._itemList.length;
331
+ if (itemsCount < 1)
332
+ return this.getMessage('snkPesquisa.search.noResultsMessage');
333
+ if (itemsCount === 1)
334
+ return this.getMessage('snkPesquisa.search.resultsFoundSingular');
335
+ return this.getMessage('snkPesquisa.search.resultsFoundPlural', { COUNT: itemsCount });
335
336
  }
336
337
  async componentWillLoad() {
338
+ var _a;
339
+ this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
340
+ this._messagesBuilder = (_a = this._application) === null || _a === void 0 ? void 0 : _a.messagesBuilder;
337
341
  const mode = await this.pesquisaFetcher.loadPresentationConfig(this.entityName);
338
342
  this._presentationMode = mode === 'list' ? 'list' : 'table';
339
343
  }
@@ -341,6 +345,9 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
341
345
  ElementIDUtils.addIDInfo(this._element);
342
346
  await this.chooseViewMode();
343
347
  }
348
+ getMessage(key, params) {
349
+ return this._messagesBuilder.getMessage(key, params);
350
+ }
344
351
  async handleChangeViewMode() {
345
352
  this._presentationMode = this._presentationMode === 'list' ? 'table' : 'list';
346
353
  await this.chooseViewMode();
@@ -370,28 +377,28 @@ const SnkPesquisa = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
370
377
  if (this._presentationMode === 'list') {
371
378
  return {
372
379
  iconName: 'table',
373
- title: 'Modo grade',
380
+ title: this.getMessage('snkPesquisa.viewMode.tableMode'),
374
381
  };
375
382
  }
376
383
  if (this.isHierarchyEntity) {
377
384
  return {
378
385
  iconName: 'hierarchical-tree',
379
- title: 'Modo árvore hierárquica',
386
+ title: this.getMessage('snkPesquisa.viewMode.tableMode'),
380
387
  };
381
388
  }
382
389
  return {
383
390
  iconName: 'list',
384
- title: 'Modo lista',
391
+ title: this.getMessage('snkPesquisa.viewMode.listMode'),
385
392
  };
386
393
  }
387
394
  render() {
388
395
  var _a, _b;
389
- return (h(Host, null, h("div", { class: "snk-pesquisa" }, h("div", { class: "snk-pesquisa__input" }, h("ez-text-input", { label: "Buscar", class: "ez-margin-right--medium", canShowError: false, ref: (ref) => this._textInput = ref, onEzChange: (event) => this.onChangeValue(event), value: this.argument, "data-element-id": "searchInput" }, h("ez-icon", { slot: "leftIcon", iconName: "search" }), this.argument && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)
396
+ return (h(Host, null, h("div", { class: "snk-pesquisa" }, h("div", { class: "snk-pesquisa__input" }, h("ez-text-input", { label: this.getMessage('snkPesquisa.search.label'), class: "ez-margin-right--medium", canShowError: false, ref: (ref) => this._textInput = ref, onEzChange: (event) => this.onChangeValue(event), value: this.argument, "data-element-id": "searchInput" }, h("ez-icon", { slot: "leftIcon", iconName: "search" }), this.argument && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value)
390
397
  ? h("button", { slot: "rightIcon", class: "snk-pesquisa__btn", onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
391
- : undefined), h("ez-button", { class: "ez-button--primary", label: "Pesquisar", onClick: () => this.onClickSearch() }), h("ez-button", { class: "ez-margin-left--medium", mode: "icon", iconName: this.getButtonModeInfo().iconName, title: this.getButtonModeInfo().title, onClick: async () => await this.handleChangeViewMode() })), h("div", { class: `snk-pesquisa__records-label ${this._currentView === PESQUISA_VIEW_MODE.TREE ? 'hidden' : ''}` }, h("label", { class: `snk-pesquisa__records ${this.hideRecordsMessage() ? "hidden" : ""}` }, this.getMessageView()), h("label", { class: `snk-pesquisa__records-limit ${this.hideLimitMessage() ? "hidden" : ""}` }, "Essa pesquisa foi limitada, existem mais resultados.")), h("div", { class: "snk-pesquisa__content" }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, this._valideDataSource &&
398
+ : undefined), h("ez-button", { class: "ez-button--primary", label: this.getMessage('snkPesquisa.search.button'), onClick: () => this.onClickSearch() }), h("ez-button", { class: "ez-margin-left--medium", mode: "icon", iconName: this.getButtonModeInfo().iconName, title: this.getButtonModeInfo().title, onClick: async () => await this.handleChangeViewMode() })), h("div", { class: `snk-pesquisa__records-label ${this._currentView === PESQUISA_VIEW_MODE.TREE ? 'hidden' : ''}` }, h("label", { class: `snk-pesquisa__records ${this.hideRecordsMessage() ? "hidden" : ""}` }, this.getMessageView()), h("label", { class: `snk-pesquisa__records-limit ${this.hideLimitMessage() ? "hidden" : ""}` }, this.getMessage('snkPesquisa.search.limitMessage'))), h("div", { class: "snk-pesquisa__content" }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, this._valideDataSource &&
392
399
  h("pesquisa-grid", { metadata: this._gridMetadata, dataSource: this._gridDataSource, pkField: this._pkField, descriptionField: this._descriptionField, entityName: this.entityName, shouldLoadConfig: this._currentView === PESQUISA_VIEW_MODE.GRID, onPesquisaGridSelectItem: ({ detail }) => this.selectItem(detail) })), h("stack-item", null, h("div", { class: 'snk-pesquisa__cards-container' }, (_b = this._itemList) === null || _b === void 0 ? void 0 : _b.map((item) => {
393
400
  return (h("ez-card-item", { onEzClick: (event) => this.createOption(event.detail), item: item }));
394
- }))), h("stack-item", null, h("pesquisa-tree", { ref: (element) => this._pesquisaTree = element, argument: this.argument, treeLoader: this.treeLoader, allowsNonAnalytic: this.allowsNonAnalytic, shouldLoadTree: this._currentView === PESQUISA_VIEW_MODE.TREE, onPesquisaTreeSelectItem: ({ detail }) => this.selectItem(detail) })))))));
401
+ }))), h("stack-item", null, h("pesquisa-tree", { ref: (element) => this._pesquisaTree = element, argument: this.argument, treeLoader: this.treeLoader, allowsNonAnalytic: this.allowsNonAnalytic, shouldLoadTree: this._currentView === PESQUISA_VIEW_MODE.TREE, onPesquisaTreeSelectItem: ({ detail }) => this.selectItem(detail), messagesBuilder: this._messagesBuilder })))))));
395
402
  }
396
403
  get _element() { return this; }
397
404
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { StringUtils, ApplicationContext, ObjectUtils, Action, DataType, UserInterface, KeyboardManager, ElementIDUtils } from '@sankhyalabs/core';
3
- import { CSSVarsUtils, buildFieldSearch, LABEL_SEARCH_COLUMN, LABEL_SEARCH_FIELD } from '@sankhyalabs/ezui/dist/collection/utils';
3
+ import { CSSVarsUtils, buildFieldSearch } from '@sankhyalabs/ezui/dist/collection/utils';
4
4
  import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants.js';
5
5
  import { T as TaskbarElement, d as defineCustomElement$4 } from './snk-taskbar2.js';
6
6
  import './DataFetcher.js';
@@ -402,6 +402,10 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
402
402
  }
403
403
  }
404
404
  }
405
+ getMessage(key, params) {
406
+ var _a;
407
+ return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
408
+ }
405
409
  disconnectedCallback() {
406
410
  var _a;
407
411
  (_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
@@ -655,10 +659,9 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
655
659
  return hardList.concat(this.actionsList);
656
660
  }
657
661
  getSettingsListGrid() {
658
- var _a, _b;
659
662
  const hardList = [{
660
663
  value: StringUtils.generateUUID(),
661
- label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findColumn", {})) !== null && _b !== void 0 ? _b : LABEL_SEARCH_COLUMN,
664
+ label: this.getMessage("snkSimpleCrud.findColumn"),
662
665
  disableCloseOnSelect: true,
663
666
  eagerInitialize: true,
664
667
  itemBuilder: (splitButton, item) => this.getColumnSearch(splitButton, item)
@@ -666,10 +669,9 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
666
669
  return hardList;
667
670
  }
668
671
  getSettingsListForm() {
669
- var _a, _b;
670
672
  const hardList = [{
671
673
  value: StringUtils.generateUUID(),
672
- label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findFields", {})) !== null && _b !== void 0 ? _b : LABEL_SEARCH_FIELD,
674
+ label: this.getMessage("snkSimpleCrud.findFields"),
673
675
  disableCloseOnSelect: true,
674
676
  eagerInitialize: true,
675
677
  itemBuilder: (splitButton, item) => this.getFieldSearch(splitButton, item)
@@ -770,16 +772,16 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
770
772
  return;
771
773
  }
772
774
  this._keyboardManager
773
- .bind("F7", () => dataUnit.saveData(), { description: "Salva os dados.", element: this._element })
774
- .bind("F8", dataUnit.addRecord.bind(dataUnit), { description: "Adiciona um novo registro.", element: this._element })
775
- .bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
775
+ .bind("F7", () => dataUnit.saveData(), { description: this.getMessage("snkSimpleCrud.keyboardShortcuts.saveData"), element: this._element })
776
+ .bind("F8", dataUnit.addRecord.bind(dataUnit), { description: this.getMessage("snkSimpleCrud.keyboardShortcuts.addRecord"), element: this._element })
777
+ .bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: this.getMessage("snkSimpleCrud.keyboardShortcuts.removeRecord"), element: this._element })
776
778
  .bind("Escape", () => {
777
779
  if (dataUnit.isDirty()) {
778
780
  dataUnit.cancelEdition();
779
781
  }
780
782
  }, {
781
783
  debounceTime: 1000,
782
- description: "Cancela uma ação.", element: this._element
784
+ description: this.getMessage("snkSimpleCrud.keyboardShortcuts.cancelAction"), element: this._element
783
785
  });
784
786
  }
785
787
  async handleFormConfigSaved() {
@@ -805,7 +807,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
805
807
  }
806
808
  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)
807
809
  ? undefined
808
- : 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 })), 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() }))));
810
+ : 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() }))));
809
811
  }
810
812
  get _element() { return this; }
811
813
  static get watchers() { return {
@@ -20,6 +20,7 @@ const SnkSimpleFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
20
20
  this.fieldsToSave = [];
21
21
  this.dataUnit = undefined;
22
22
  this.configName = undefined;
23
+ this.messagesBuilder = undefined;
23
24
  this.avaliableFields = [];
24
25
  this.selectedFields = [];
25
26
  }
@@ -55,6 +56,10 @@ const SnkSimpleFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
55
56
  const fieldList = await this._formConfigFetcher.fetchSimpleFormConfig(this.configName);
56
57
  return [...this.removeDuplicates(fieldList)];
57
58
  }
59
+ getMessage(key, params) {
60
+ var _a;
61
+ return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
62
+ }
58
63
  removeDuplicates(strings) {
59
64
  return strings.filter((item, index) => strings.indexOf(item) === index);
60
65
  }
@@ -94,12 +99,13 @@ const SnkSimpleFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
94
99
  this.snkConfigSaved.emit();
95
100
  }
96
101
  render() {
97
- return (h("ez-popup", { ref: (ref) => this.ezPopupRef = ref, heightMode: 'auto', size: 'medium', ezTitle: 'Configurar formul\u00E1rio' }, h("div", { class: 'config-container' }, h("div", { class: 'config-lists' }, h("ez-double-list", { ref: (ref) => this.ezDoubleListRef = ref, leftList: this.avaliableFields, leftTitle: 'Campos disponíveis', rightList: this.selectedFields, rightTitle: 'Campos selecionados', onEzRightListChanged: ({ detail }) => this.fieldsToSave = [...detail], entityLabel: 'campo', entityLabelPlural: 'campos' })), h("div", { class: 'config-actions' }, h("ez-button", { label: 'Restaurar', onClick: this.handleResetConfigs.bind(this), size: 'small' }), h("ez-button", { label: 'Cancelar', onClick: this.handleCancel.bind(this), size: 'small' }), h("ez-button", { label: 'Salvar', class: 'ez-button--primary', onClick: this.handleSave.bind(this), size: 'small' })))));
102
+ return (h("ez-popup", { ref: (ref) => this.ezPopupRef = ref, heightMode: 'auto', size: 'medium', ezTitle: this.getMessage("snkSimpleFormConfig.popup.title") }, h("div", { class: 'config-container' }, h("div", { class: 'config-lists' }, h("ez-double-list", { ref: (ref) => this.ezDoubleListRef = ref, leftList: this.avaliableFields, leftTitle: this.getMessage("snkSimpleFormConfig.lists.availableFields"), rightList: this.selectedFields, rightTitle: this.getMessage("snkSimpleFormConfig.lists.selectedFields"), onEzRightListChanged: ({ detail }) => this.fieldsToSave = [...detail], entityLabel: this.getMessage("snkSimpleFormConfig.lists.entityLabel"), entityLabelPlural: this.getMessage("snkSimpleFormConfig.lists.entityLabelPlural") })), h("div", { class: 'config-actions' }, h("ez-button", { label: this.getMessage("snkSimpleFormConfig.buttons.restore"), onClick: this.handleResetConfigs.bind(this), size: 'small' }), h("ez-button", { label: this.getMessage("snkSimpleFormConfig.buttons.cancel"), onClick: this.handleCancel.bind(this), size: 'small' }), h("ez-button", { label: this.getMessage("snkSimpleFormConfig.buttons.save"), class: 'ez-button--primary', onClick: this.handleSave.bind(this), size: 'small' })))));
98
103
  }
99
104
  static get style() { return snkSimpleFormConfigCss; }
100
105
  }, [0, "snk-simple-form-config", {
101
106
  "dataUnit": [16],
102
107
  "configName": [1, "config-name"],
108
+ "messagesBuilder": [16],
103
109
  "avaliableFields": [32],
104
110
  "selectedFields": [32],
105
111
  "show": [64]
@@ -1,12 +1,12 @@
1
- import { D as DataFetcher } from './DataFetcher-db08cad0.js';
2
- import './ISave-da565824.js';
1
+ import { D as DataFetcher } from './DataFetcher-b51050a0.js';
2
+ import './ISave-bc31d9f4.js';
3
3
  import { SortMode, ApplicationContext, UserInterface, DateUtils, ObjectUtils, StringUtils, NumberUtils, DataType } from '@sankhyalabs/core';
4
4
  import { D as DataExporterOption } from './index-b40568ff.js';
5
5
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
6
6
  import { UserInterface as UserInterface$1 } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
7
- import { P as PreloadManager } from './dataunit-fetcher-1b78797a.js';
7
+ import { P as PreloadManager } from './dataunit-fetcher-16702941.js';
8
8
  import './filter-item-type.enum-d45e026f.js';
9
- import './form-config-fetcher-e623539b.js';
9
+ import './form-config-fetcher-6fe8d856.js';
10
10
  import './constants-7b422de0.js';
11
11
  import InMemoryFilterColumnDataSource from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
12
12
  import { h } from './index-479e1293.js';
@@ -285,14 +285,18 @@ class ContinuousInsertUtils {
285
285
  return false;
286
286
  });
287
287
  }
288
+ getMessage(key, params) {
289
+ var _a, _b;
290
+ return (_b = (_a = this.snkApplication) === null || _a === void 0 ? void 0 : _a.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage(key, params);
291
+ }
288
292
  actionContinuousInsert(enableContinuousInsert, handleEnableContinuousInsert) {
289
293
  return {
290
294
  value: StringUtils.generateUUID(),
291
- label: enableContinuousInsert ? 'Desativar inclusão contínua' : 'Ativar inclusão contínua',
295
+ label: enableContinuousInsert ? this.getMessage('continuousInsertUtils.actions.disable') : this.getMessage('continuousInsertUtils.actions.enable'),
292
296
  enabled: true,
293
297
  itemBuilder: () => {
294
298
  return (h("div", { class: "ez-dropdown__item-wrapper", onClick: handleEnableContinuousInsert },
295
- h("span", { class: "ez-dropdown__item-label" }, enableContinuousInsert ? 'Desativar inclusão contínua' : 'Ativar inclusão contínua')));
299
+ h("span", { class: "ez-dropdown__item-label" }, enableContinuousInsert ? this.getMessage('continuousInsertUtils.actions.disable') : this.getMessage('continuousInsertUtils.actions.enable'))));
296
300
  },
297
301
  };
298
302
  }
@@ -1,13 +1,20 @@
1
- import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-e623539b.js';
1
+ import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-6fe8d856.js';
2
+ import { D as DataFetcher, d as dist } from './DataFetcher-b51050a0.js';
2
3
  import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
3
4
  import { ObjectUtils } from '@sankhyalabs/core';
4
- import { d as dist, D as DataFetcher } from './DataFetcher-db08cad0.js';
5
5
 
6
6
  class GridConfigFetcher extends ResourceFetcher {
7
7
  constructor() {
8
8
  super(...arguments);
9
9
  this.GRID_CONFIG_VERSION = "V3:";
10
10
  }
11
+ async getDefaultConfig(resourceId) {
12
+ var _a, _b;
13
+ const payload = { 'requestBody': { 'gridConfig': { 'configName': `GrdCfgHtml5:${resourceId}` } } };
14
+ const response = await DataFetcher.get().callServiceBroker('GridConfig.restoreGridConfigFromJson', JSON.stringify(payload));
15
+ const columns = (_b = (_a = response === null || response === void 0 ? void 0 : response.gridConfig) === null || _a === void 0 ? void 0 : _a.field) !== null && _b !== void 0 ? _b : [];
16
+ return { columns };
17
+ }
11
18
  getConfig(gridName, resourceID) {
12
19
  const completePath = this.getPath(resourceID, gridName);
13
20
  return new Promise((resolve, reject) => {
@@ -439,6 +446,9 @@ class ConfigStorage {
439
446
  static async saveCardState(config, name, resourceID) {
440
447
  return this.formConfigFetcher.saveCardState(config, name, resourceID);
441
448
  }
449
+ static async getDefaultGridConfig(resourceId) {
450
+ return await this.gridConfigFetcher.getDefaultConfig(resourceId);
451
+ }
442
452
  static async saveGridConfig(config, name, resourceID) {
443
453
  if (config == undefined) {
444
454
  return;