@sankhyalabs/sankhyablocks 9.1.0-dev.13 → 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 (320) hide show
  1. package/dist/cjs/{ClientSideExporterProvider-6a4108c9.js → ClientSideExporterProvider-c14393e1.js} +10 -6
  2. package/dist/cjs/{ConfigStorage-bb8c0edf.js → ConfigStorage-54b9f26d.js} +2 -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-a23df43c.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 +20 -9
  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-47c6d16b.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 +8 -8
  33. package/dist/cjs/snk-grid.cjs.entry.js +6 -6
  34. package/dist/cjs/{snk-guides-viewer-1689e877.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-layout-form-config/snk-layout-form-config.js +30 -1
  68. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
  69. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +3 -3
  70. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js +12 -12
  71. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +6 -5
  72. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +28 -4
  73. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +23 -16
  74. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +12 -10
  75. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +26 -1
  76. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +19 -12
  77. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js +22 -20
  78. package/dist/collection/lib/message/SnkMessageBuilder.js +28 -7
  79. package/dist/collection/lib/message/messageResourceEnUSUtils.js +30 -45
  80. package/dist/collection/lib/message/messageResourceEsESUtils.js +30 -45
  81. package/dist/collection/lib/message/messageResourcePtBRUtils.js +30 -45
  82. package/dist/collection/lib/message/resources/en-us/continuousInsertUtils.msg.js +6 -0
  83. package/dist/collection/lib/message/resources/en-us/dataFetcher.msg.js +12 -0
  84. package/dist/collection/lib/message/resources/en-us/dataUnitDataLoaderHelper.msg.js +18 -0
  85. package/dist/collection/lib/message/resources/en-us/snk-actions-button.msg.js +3 -1
  86. package/dist/collection/lib/message/resources/en-us/snk-application.msg.js +21 -2
  87. package/dist/collection/lib/message/resources/en-us/snk-attach.msg.js +4 -1
  88. package/dist/collection/lib/message/resources/en-us/snk-configurator.msg.js +6 -1
  89. package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +28 -3
  90. package/dist/collection/lib/message/resources/en-us/snk-data-unit.msg.js +5 -2
  91. package/dist/collection/lib/message/resources/en-us/snk-error-handler.msg.js +17 -0
  92. package/dist/collection/lib/message/resources/en-us/snk-filter-bar.msg.js +7 -0
  93. package/dist/collection/lib/message/resources/en-us/snk-filter-list.msg.js +3 -0
  94. package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +44 -2
  95. package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js +10 -0
  96. package/dist/collection/lib/message/resources/en-us/snk-personalized-filter.msg.js +17 -0
  97. package/dist/collection/lib/message/resources/en-us/snk-pesquisa.msg.js +25 -0
  98. package/dist/collection/lib/message/resources/en-us/snk-simple-crud.msg.js +6 -0
  99. package/dist/collection/lib/message/resources/en-us/snk-simple-form-config.msg.js +16 -0
  100. package/dist/collection/lib/message/resources/es-es/continuousInsertUtils.msg.js +6 -0
  101. package/dist/collection/lib/message/resources/es-es/dataFetcher.msg.js +12 -0
  102. package/dist/collection/lib/message/resources/es-es/dataUnitDataLoaderHelper.msg.js +18 -0
  103. package/dist/collection/lib/message/resources/es-es/snk-actions-button.msg.js +3 -1
  104. package/dist/collection/lib/message/resources/es-es/snk-application.msg.js +21 -2
  105. package/dist/collection/lib/message/resources/es-es/snk-attach.msg.js +3 -0
  106. package/dist/collection/lib/message/resources/es-es/snk-configurator.msg.js +6 -1
  107. package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +27 -2
  108. package/dist/collection/lib/message/resources/es-es/snk-data-unit.msg.js +3 -0
  109. package/dist/collection/lib/message/resources/es-es/snk-error-handler.msg.js +17 -0
  110. package/dist/collection/lib/message/resources/es-es/snk-filter-bar.msg.js +7 -0
  111. package/dist/collection/lib/message/resources/es-es/snk-filter-list.msg.js +3 -0
  112. package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +44 -2
  113. package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js +10 -0
  114. package/dist/collection/lib/message/resources/es-es/snk-personalized-filter.msg.js +17 -0
  115. package/dist/collection/lib/message/resources/es-es/snk-pesquisa.msg.js +25 -0
  116. package/dist/collection/lib/message/resources/es-es/snk-simple-crud.msg.js +6 -0
  117. package/dist/collection/lib/message/resources/es-es/snk-simple-form-config.msg.js +16 -0
  118. package/dist/collection/lib/message/resources/pt-br/continuousInsertUtils.msg.js +6 -0
  119. package/dist/collection/lib/message/resources/pt-br/dataFetcher.msg.js +12 -0
  120. package/dist/collection/lib/message/resources/pt-br/dataUnitDataLoaderHelper.msg.js +18 -0
  121. package/dist/collection/lib/message/resources/pt-br/snk-actions-button.msg.js +3 -1
  122. package/dist/collection/lib/message/resources/pt-br/snk-application.msg.js +19 -0
  123. package/dist/collection/lib/message/resources/pt-br/snk-attach.msg.js +3 -0
  124. package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js +6 -1
  125. package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +27 -2
  126. package/dist/collection/lib/message/resources/pt-br/snk-data-unit.msg.js +3 -0
  127. package/dist/collection/lib/message/resources/pt-br/snk-error-handler.msg.js +17 -0
  128. package/dist/collection/lib/message/resources/pt-br/snk-filter-bar.msg.js +7 -0
  129. package/dist/collection/lib/message/resources/pt-br/snk-filter-list.msg.js +3 -0
  130. package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +45 -3
  131. package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js +10 -0
  132. package/dist/collection/lib/message/resources/pt-br/snk-personalized-filter.msg.js +17 -0
  133. package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +24 -0
  134. package/dist/collection/lib/message/resources/pt-br/snk-simple-crud.msg.js +6 -0
  135. package/dist/collection/lib/message/resources/pt-br/snk-simple-form-config.msg.js +16 -0
  136. package/dist/collection/lib/utils/ContinuousInsertUtils.js +6 -2
  137. package/dist/components/ContinuousInsertUtils.js +6 -2
  138. package/dist/components/DataFetcher.js +2707 -13
  139. package/dist/components/config-header2.js +2 -2
  140. package/dist/components/dataunit-fetcher.js +22 -21
  141. package/dist/components/field-config2.js +6 -7
  142. package/dist/components/field-item2.js +6 -3
  143. package/dist/components/fields-layout2.js +19 -12
  144. package/dist/components/fields-selector2.js +11 -5
  145. package/dist/components/guides-configurator2.js +14 -3
  146. package/dist/components/pesquisa-tree2.js +9 -4
  147. package/dist/components/snk-actions-button2.js +3 -2
  148. package/dist/components/snk-application2.js +20 -15
  149. package/dist/components/snk-attach2.js +14 -8
  150. package/dist/components/snk-configurator2.js +1 -1
  151. package/dist/components/snk-crud.js +12 -8
  152. package/dist/components/snk-data-unit2.js +5 -11
  153. package/dist/components/snk-detail-view2.js +19 -13
  154. package/dist/components/snk-expression-group2.js +3 -3
  155. package/dist/components/snk-expression-item2.js +18 -17
  156. package/dist/components/snk-filter-bar2.js +5 -5
  157. package/dist/components/snk-filter-list.js +1 -1
  158. package/dist/components/snk-filter-modal.js +1 -1
  159. package/dist/components/snk-filter-number.js +3 -1
  160. package/dist/components/snk-filter-period.js +3 -1
  161. package/dist/components/snk-form-config2.js +3 -3
  162. package/dist/components/snk-layout-form-config2.js +7 -1
  163. package/dist/components/snk-personalized-filter2.js +1 -1
  164. package/dist/components/snk-pesquisa2.js +23 -16
  165. package/dist/components/snk-simple-crud2.js +12 -10
  166. package/dist/components/snk-simple-form-config2.js +7 -1
  167. package/dist/esm/{ClientSideExporterProvider-09dee1a3.js → ClientSideExporterProvider-4f81855c.js} +10 -6
  168. package/dist/esm/{ConfigStorage-cf578768.js → ConfigStorage-7f782e00.js} +2 -2
  169. package/dist/esm/{DataFetcher-db08cad0.js → DataFetcher-b51050a0.js} +2707 -13
  170. package/dist/esm/{FormConfigHelper-49fe72ca.js → FormConfigHelper-4e42f0b6.js} +4 -5
  171. package/dist/esm/{ISave-da565824.js → ISave-bc31d9f4.js} +1 -1
  172. package/dist/esm/{SnkFormConfigManager-c1cd9dcd.js → SnkFormConfigManager-ab1948b0.js} +2 -2
  173. package/dist/esm/{auth-fetcher-43c8d76b.js → auth-fetcher-8ac800aa.js} +1 -1
  174. package/dist/esm/config-header.entry.js +2 -2
  175. package/dist/esm/{dataunit-fetcher-1b78797a.js → dataunit-fetcher-16702941.js} +22 -21
  176. package/dist/esm/field-config_2.entry.js +9 -6
  177. package/dist/esm/fields-layout.entry.js +20 -13
  178. package/dist/esm/fields-selector.entry.js +11 -6
  179. package/dist/esm/{form-config-fetcher-e623539b.js → form-config-fetcher-6fe8d856.js} +1 -1
  180. package/dist/esm/guides-configurator.entry.js +14 -3
  181. package/dist/esm/loader.js +1 -1
  182. package/dist/esm/pesquisa-grid_2.entry.js +12 -8
  183. package/dist/esm/sankhyablocks.js +1 -1
  184. package/dist/esm/snk-actions-button_8.entry.js +20 -9
  185. package/dist/esm/snk-application.entry.js +25 -20
  186. package/dist/esm/snk-attach.entry.js +18 -12
  187. package/dist/esm/snk-configurator.entry.js +1 -1
  188. package/dist/esm/snk-crud.entry.js +17 -13
  189. package/dist/esm/snk-data-exporter.entry.js +5 -6
  190. package/dist/esm/{snk-data-unit-c12986b7.js → snk-data-unit-fd6be603.js} +6 -12
  191. package/dist/esm/snk-data-unit.entry.js +3 -4
  192. package/dist/esm/snk-detail-view.entry.js +21 -15
  193. package/dist/esm/snk-expression-group_2.entry.js +21 -20
  194. package/dist/esm/snk-filter-bar_4.entry.js +10 -10
  195. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  196. package/dist/esm/snk-filter-number.entry.js +3 -1
  197. package/dist/esm/snk-filter-period.entry.js +3 -1
  198. package/dist/esm/snk-form_2.entry.js +8 -8
  199. package/dist/esm/snk-grid.entry.js +6 -6
  200. package/dist/esm/{snk-guides-viewer-defa2629.js → snk-guides-viewer-480d909c.js} +10 -10
  201. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  202. package/dist/esm/snk-personalized-filter.entry.js +4 -4
  203. package/dist/esm/snk-pesquisa.entry.js +27 -20
  204. package/dist/esm/snk-simple-crud.entry.js +19 -17
  205. package/dist/sankhyablocks/{p-fa591f6f.js → p-05969d8a.js} +1 -1
  206. package/dist/sankhyablocks/p-07b14811.entry.js +1 -0
  207. package/dist/sankhyablocks/p-11346b8d.entry.js +1 -0
  208. package/dist/sankhyablocks/p-162a92a7.entry.js +1 -0
  209. package/dist/sankhyablocks/p-187a58f2.entry.js +1 -0
  210. package/dist/sankhyablocks/p-1a150f81.entry.js +1 -0
  211. package/dist/sankhyablocks/p-1a53afc6.entry.js +1 -0
  212. package/dist/sankhyablocks/p-20e0db8f.entry.js +1 -0
  213. package/dist/sankhyablocks/p-21b7b011.entry.js +1 -0
  214. package/dist/sankhyablocks/p-367c998c.entry.js +1 -0
  215. package/dist/sankhyablocks/p-379d6206.js +60 -0
  216. package/dist/sankhyablocks/p-566b468b.entry.js +1 -0
  217. package/dist/sankhyablocks/{p-c9657baa.js → p-56874df8.js} +1 -1
  218. package/dist/sankhyablocks/p-5bab470d.entry.js +1 -0
  219. package/dist/sankhyablocks/p-6444de46.entry.js +11 -0
  220. package/dist/sankhyablocks/p-64fed9bf.js +1 -0
  221. package/dist/sankhyablocks/p-6703336d.entry.js +1 -0
  222. package/dist/sankhyablocks/p-6cf54569.js +1 -0
  223. package/dist/sankhyablocks/{p-b21d32f6.js → p-709bf708.js} +1 -1
  224. package/dist/sankhyablocks/p-735a1175.entry.js +1 -0
  225. package/dist/sankhyablocks/p-75af335e.entry.js +1 -0
  226. package/dist/sankhyablocks/p-7b3ca294.entry.js +1 -0
  227. package/dist/sankhyablocks/p-7baecc09.entry.js +1 -0
  228. package/dist/sankhyablocks/p-7fd47ce5.entry.js +1 -0
  229. package/dist/sankhyablocks/p-8f73da95.js +1 -0
  230. package/dist/sankhyablocks/{p-90ee1990.entry.js → p-a200817c.entry.js} +1 -1
  231. package/dist/sankhyablocks/p-a5108625.entry.js +1 -0
  232. package/dist/sankhyablocks/p-c4eae355.entry.js +1 -0
  233. package/dist/sankhyablocks/p-cc55bf41.entry.js +1 -0
  234. package/dist/sankhyablocks/p-d271f2b4.entry.js +1 -0
  235. package/dist/sankhyablocks/p-d540affc.js +1 -0
  236. package/dist/sankhyablocks/{p-e25412da.js → p-dc27d59a.js} +1 -1
  237. package/dist/sankhyablocks/{p-cfa8cac2.entry.js → p-e67e9a48.entry.js} +1 -1
  238. package/dist/sankhyablocks/p-e93ca8a8.js +1 -0
  239. package/dist/sankhyablocks/p-f8f29e1a.entry.js +1 -0
  240. package/dist/sankhyablocks/{p-405edf96.js → p-fb757021.js} +1 -1
  241. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  242. package/dist/types/components/snk-application/errorhandler/snk-error-handler.d.ts +1 -0
  243. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +1 -1
  244. package/dist/types/components/snk-crud/snk-crud.d.ts +1 -0
  245. package/dist/types/components/snk-crud/subcomponents/GuideBuilder.d.ts +4 -1
  246. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +0 -6
  247. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +1 -0
  248. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
  249. package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +1 -1
  250. package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +3 -1
  251. package/dist/types/components/snk-form-config/fields-selector/fields-selector.d.ts +3 -0
  252. package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +2 -0
  253. package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +3 -0
  254. package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +1 -0
  255. package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +6 -0
  256. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +3 -0
  257. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +1 -0
  258. package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +6 -0
  259. package/dist/types/components.d.ts +20 -0
  260. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +2 -0
  261. package/dist/types/lib/message/SnkMessageBuilder.d.ts +8 -1
  262. package/dist/types/lib/message/resources/en-us/continuousInsertUtils.msg.d.ts +1 -0
  263. package/dist/types/lib/message/resources/en-us/dataFetcher.msg.d.ts +1 -0
  264. package/dist/types/lib/message/resources/en-us/dataUnitDataLoaderHelper.msg.d.ts +1 -0
  265. package/dist/types/lib/message/resources/en-us/snk-error-handler.msg.d.ts +1 -0
  266. package/dist/types/lib/message/resources/en-us/snk-filter-list.msg.d.ts +1 -0
  267. package/dist/types/lib/message/resources/en-us/snk-layout-form-config.msg.d.ts +1 -0
  268. package/dist/types/lib/message/resources/en-us/snk-pesquisa.msg.d.ts +1 -0
  269. package/dist/types/lib/message/resources/en-us/snk-simple-form-config.msg.d.ts +1 -0
  270. package/dist/types/lib/message/resources/es-es/continuousInsertUtils.msg.d.ts +1 -0
  271. package/dist/types/lib/message/resources/es-es/dataFetcher.msg.d.ts +1 -0
  272. package/dist/types/lib/message/resources/es-es/dataUnitDataLoaderHelper.msg.d.ts +1 -0
  273. package/dist/types/lib/message/resources/es-es/snk-error-handler.msg.d.ts +1 -0
  274. package/dist/types/lib/message/resources/es-es/snk-filter-list.msg.d.ts +1 -0
  275. package/dist/types/lib/message/resources/es-es/snk-layout-form-config.msg.d.ts +1 -0
  276. package/dist/types/lib/message/resources/es-es/snk-pesquisa.msg.d.ts +1 -0
  277. package/dist/types/lib/message/resources/es-es/snk-simple-form-config.msg.d.ts +1 -0
  278. package/dist/types/lib/message/resources/pt-br/continuousInsertUtils.msg.d.ts +1 -0
  279. package/dist/types/lib/message/resources/pt-br/dataFetcher.msg.d.ts +1 -0
  280. package/dist/types/lib/message/resources/pt-br/dataUnitDataLoaderHelper.msg.d.ts +1 -0
  281. package/dist/types/lib/message/resources/pt-br/snk-error-handler.msg.d.ts +1 -0
  282. package/dist/types/lib/message/resources/pt-br/snk-filter-list.msg.d.ts +1 -0
  283. package/dist/types/lib/message/resources/pt-br/snk-layout-form-config.msg.d.ts +1 -0
  284. package/dist/types/lib/message/resources/pt-br/snk-pesquisa.msg.d.ts +1 -0
  285. package/dist/types/lib/message/resources/pt-br/snk-simple-form-config.msg.d.ts +1 -0
  286. package/dist/types/lib/utils/ContinuousInsertUtils.d.ts +1 -0
  287. package/package.json +1 -1
  288. package/dist/cjs/SnkMessageBuilder-acd9ec62.js +0 -1937
  289. package/dist/components/SnkMessageBuilder.js +0 -1915
  290. package/dist/esm/SnkMessageBuilder-c8b452b6.js +0 -1915
  291. package/dist/sankhyablocks/p-09ba8326.entry.js +0 -1
  292. package/dist/sankhyablocks/p-1c69a957.entry.js +0 -1
  293. package/dist/sankhyablocks/p-224fa6f9.js +0 -1
  294. package/dist/sankhyablocks/p-22a8656b.entry.js +0 -1
  295. package/dist/sankhyablocks/p-23b20add.entry.js +0 -1
  296. package/dist/sankhyablocks/p-2628f34e.entry.js +0 -1
  297. package/dist/sankhyablocks/p-34cfb5ad.entry.js +0 -11
  298. package/dist/sankhyablocks/p-35e73c5d.js +0 -1
  299. package/dist/sankhyablocks/p-360f0b74.js +0 -1
  300. package/dist/sankhyablocks/p-37b4f642.js +0 -60
  301. package/dist/sankhyablocks/p-49d968e2.entry.js +0 -1
  302. package/dist/sankhyablocks/p-4b8691b6.js +0 -1
  303. package/dist/sankhyablocks/p-4d2ff2fb.entry.js +0 -1
  304. package/dist/sankhyablocks/p-4eb731b3.js +0 -1
  305. package/dist/sankhyablocks/p-60d3abf6.entry.js +0 -1
  306. package/dist/sankhyablocks/p-6bc7c7ee.entry.js +0 -1
  307. package/dist/sankhyablocks/p-71a05822.entry.js +0 -1
  308. package/dist/sankhyablocks/p-7ced2cf4.entry.js +0 -1
  309. package/dist/sankhyablocks/p-81820bf8.entry.js +0 -1
  310. package/dist/sankhyablocks/p-86bd4478.entry.js +0 -1
  311. package/dist/sankhyablocks/p-86c8f7f2.entry.js +0 -1
  312. package/dist/sankhyablocks/p-aef68e58.entry.js +0 -1
  313. package/dist/sankhyablocks/p-b033bf30.entry.js +0 -1
  314. package/dist/sankhyablocks/p-b1ea8c6d.entry.js +0 -1
  315. package/dist/sankhyablocks/p-cb2a4613.entry.js +0 -1
  316. package/dist/sankhyablocks/p-cd1a5b6a.js +0 -1
  317. package/dist/sankhyablocks/p-cfc219f6.entry.js +0 -1
  318. package/dist/sankhyablocks/p-d67526b6.entry.js +0 -1
  319. package/dist/sankhyablocks/p-f442c8f6.entry.js +0 -1
  320. package/dist/sankhyablocks/p-f65421cd.entry.js +0 -1
@@ -72,12 +72,11 @@ export function getValueByProperty(property, fieldDescriptor, defaultValue) {
72
72
  export function getIconName(userInterface) {
73
73
  return iconMap.get(userInterface) || 'text';
74
74
  }
75
- export function buildNewGuideName(guidesList) {
75
+ export function buildNewGuideName(guidesList, getMessage) {
76
76
  var _a, _b;
77
- const qtdWithNewGuideName = (_b = (_a = guidesList.filter(g => g.name.includes(TAB_NAMES.newGuide))) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
78
- return qtdWithNewGuideName === 0
79
- ? TAB_NAMES.newGuide
80
- : `${TAB_NAMES.newGuide} (${qtdWithNewGuideName})`;
77
+ const newGuideText = getMessage('snkFormConfig.form.newGuide');
78
+ const qtdWithNewGuideName = (_b = (_a = guidesList.filter(g => g.name.includes(newGuideText))) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
79
+ return qtdWithNewGuideName === 0 ? newGuideText : `${newGuideText} (${qtdWithNewGuideName})`;
81
80
  }
82
81
  export function getFieldsToSave(guidesMap) {
83
82
  const fieldsToSave = [];
@@ -56,9 +56,9 @@ export class ConfigHeader {
56
56
  if (!this.hasChanges && !this.optionConfigChanged)
57
57
  return;
58
58
  if (this.hasChanges) {
59
- return (h("div", { class: "right-group" }, h("ez-button", { title: 'Cancelar', label: 'Cancelar', onClick: this.closeFormConfig.bind(this), size: "medium" }), h("ez-button", { title: 'Salvar', label: 'Salvar', class: 'ez-button--primary ez-padding-left--medium', onClick: () => this.saveFormConfig(), size: "medium" })));
59
+ return (h("div", { class: "right-group" }, h("ez-button", { title: this.getMessage('snkFormConfig.actions.cancel'), label: this.getMessage('snkFormConfig.actions.cancel'), onClick: this.closeFormConfig.bind(this), size: "medium" }), h("ez-button", { title: this.getMessage('snkFormConfig.actions.save'), label: this.getMessage('snkFormConfig.actions.save'), class: 'ez-button--primary ez-padding-left--medium', onClick: () => this.saveFormConfig(), size: "medium" })));
60
60
  }
61
- return (h("div", { class: "right-group" }, h("ez-button", { title: 'Cancelar', label: 'Cancelar', onClick: this.closeFormConfig.bind(this), size: "medium" }), h("ez-button", { title: 'Salvar', label: this.getMessage('snkFormConfig.applyConfig'), class: 'ez-button--primary ez-padding-left--medium', onClick: async () => await this.applyOptionConfig(), size: "medium" })));
61
+ return (h("div", { class: "right-group" }, h("ez-button", { title: this.getMessage('snkFormConfig.actions.cancel'), label: this.getMessage('snkFormConfig.actions.cancel'), onClick: this.closeFormConfig.bind(this), size: "medium" }), h("ez-button", { title: this.getMessage('snkFormConfig.actions.save'), label: this.getMessage('snkFormConfig.applyConfig'), class: 'ez-button--primary ez-padding-left--medium', onClick: async () => await this.applyOptionConfig(), size: "medium" })));
62
62
  }
63
63
  render() {
64
64
  return (h(Host, null, h("div", { class: 'left-group' }, h("ez-button", { mode: "icon", title: this.getMessage('snkFormConfig.goBackTitle'), iconName: "arrow_back", class: "ez-padding--small", size: "small", onClick: this.closeFormConfig.bind(this), id: "formConfigToBack" }), h("h1", { class: "ez-title ez-title--primary ez-title--extra-large ez-padding--small" }, this.getMessage('snkFormConfig.title')), h("configs-button", { hasChanges: this.hasChanges, configOptions: this.configOptions, selectedConfig: this.selectedConfig, messagesBuilder: this.messagesBuilder })), this.renderSaveActions()));
@@ -228,7 +228,7 @@ export class FieldConfig {
228
228
  this._popoupElement.opened = false;
229
229
  }
230
230
  applyErrorMessage() {
231
- this.fieldLabelErrorMessage = `Informe um valor para ${this.getMessage('snkConfigOptions.label.nameField')}`;
231
+ this.fieldLabelErrorMessage = `${this.getMessage('snkConfigOptions.validation.requiredField')} ${this.getMessage('snkConfigOptions.label.nameField')}`;
232
232
  }
233
233
  handleDiscardChanges() {
234
234
  this.initializeValues();
@@ -239,7 +239,7 @@ export class FieldConfig {
239
239
  this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
240
240
  }
241
241
  render() {
242
- return (h("ez-popup", { heightMode: 'auto', size: 'auto', "ez-title": 'Configuração do campo', onEzClosePopup: () => this.handleDiscardChanges(), ref: ref => this._popoupElement = ref }, h("div", { class: 'field-config-container' }, h("ez-text-input", { label: this.getMessage('snkConfigOptions.label.nameField'), value: this.fieldLabel, errorMessage: this.fieldLabelErrorMessage, hasInvalid: !!this.fieldLabelErrorMessage, onEzChange: (e) => this.handleLabelChanged(e) }), h("ez-combo-box", { label: this.getMessage('snkConfigOptions.label.typeValueDefault'), suppressEmptyOption: true, enabled: this.enabledValueDefault(), onEzChange: (e) => this.handleDefaultTypeChanged(e), value: this.getDefaultType() }, h("option", { value: DEFAULT_TYPE.fixed }, this.getMessage('snkConfigOptions.options.valueFixed')), h("option", { value: DEFAULT_TYPE.variable }, this.getMessage('snkConfigOptions.options.variable'))), this.renderDefaultValueEditor(), h("ez-check", { label: this.getMessage('snkConfigOptions.label.clearDuplicate'), value: this.fieldCleanOnCopy, onEzChange: (e) => this.handleClearDuplicateChanged(e) }), h("ez-check", { label: this.getMessage('snkConfigOptions.label.requiredField'), enabled: getEnabledByProperty('required', 'systemRequired', this.fieldDescriptor), value: getValueByProperty('required', this.fieldDescriptor, this.fieldRequired), onEzChange: (e) => this.handleRequiredChanged(e) }), h("ez-check", { label: this.getMessage('snkConfigOptions.label.protectedField'), enabled: getEnabledByProperty('readOnly', 'systemReadOnly', this.fieldDescriptor), value: getValueByProperty('readOnly', this.fieldDescriptor, this.fieldReadOnly), onEzChange: (e) => this.handleReadOnlyChanged(e) }), h("div", { class: 'actions' }, h("ez-button", { label: 'Cancelar', onClick: () => this.handleDiscardChanges() }), h("ez-button", { label: 'Confirmar', class: "ez-button--primary", onClick: () => this.handleApplyChanges() })))));
242
+ return (h("ez-popup", { heightMode: 'auto', size: 'auto', "ez-title": this.getMessage('snkConfigOptions.fieldConfig.title'), onEzClosePopup: () => this.handleDiscardChanges(), ref: ref => this._popoupElement = ref }, h("div", { class: 'field-config-container' }, h("ez-text-input", { label: this.getMessage('snkConfigOptions.label.nameField'), value: this.fieldLabel, errorMessage: this.fieldLabelErrorMessage, hasInvalid: !!this.fieldLabelErrorMessage, onEzChange: (e) => this.handleLabelChanged(e) }), h("ez-combo-box", { label: this.getMessage('snkConfigOptions.label.typeValueDefault'), suppressEmptyOption: true, enabled: this.enabledValueDefault(), onEzChange: (e) => this.handleDefaultTypeChanged(e), value: this.getDefaultType() }, h("option", { value: DEFAULT_TYPE.fixed }, this.getMessage('snkConfigOptions.options.valueFixed')), h("option", { value: DEFAULT_TYPE.variable }, this.getMessage('snkConfigOptions.options.variable'))), this.renderDefaultValueEditor(), h("ez-check", { label: this.getMessage('snkConfigOptions.label.clearDuplicate'), value: this.fieldCleanOnCopy, onEzChange: (e) => this.handleClearDuplicateChanged(e) }), h("ez-check", { label: this.getMessage('snkConfigOptions.label.requiredField'), enabled: getEnabledByProperty('required', 'systemRequired', this.fieldDescriptor), value: getValueByProperty('required', this.fieldDescriptor, this.fieldRequired), onEzChange: (e) => this.handleRequiredChanged(e) }), h("ez-check", { label: this.getMessage('snkConfigOptions.label.protectedField'), enabled: getEnabledByProperty('readOnly', 'systemReadOnly', this.fieldDescriptor), value: getValueByProperty('readOnly', this.fieldDescriptor, this.fieldReadOnly), onEzChange: (e) => this.handleReadOnlyChanged(e) }), h("div", { class: 'actions' }, h("ez-button", { label: this.getMessage('snkConfigOptions.fieldConfig.buttons.cancel'), onClick: () => this.handleDiscardChanges() }), h("ez-button", { label: this.getMessage('snkConfigOptions.fieldConfig.buttons.confirm'), class: "ez-button--primary", onClick: () => this.handleApplyChanges() })))));
243
243
  }
244
244
  static get is() { return "field-config"; }
245
245
  static get encapsulation() { return "scoped"; }
@@ -22,14 +22,17 @@ export class FieldItem {
22
22
  }
23
23
  renderFieldConfig() {
24
24
  if (this.onLayoutConfig && this.dataUnit && this.messagesBuilder) {
25
- return (h("field-config", { ref: ref => this._refFieldConfig = ref, fieldConfig: this.fieldConfig, dataUnit: this.dataUnit, fieldDescriptor: this.fieldDescriptor, messagesBuilder: this.messagesBuilder, onFieldConfigChanged: () => forceUpdate(this) }));
25
+ return (h("field-config", { ref: (ref) => this._refFieldConfig = ref, fieldConfig: this.fieldConfig, dataUnit: this.dataUnit, fieldDescriptor: this.fieldDescriptor, messagesBuilder: this.messagesBuilder, onFieldConfigChanged: () => forceUpdate(this) }));
26
26
  }
27
27
  }
28
+ getMessage(key, params) {
29
+ return this.messagesBuilder.getMessage(key, params);
30
+ }
28
31
  renderActions() {
29
32
  if (this.onLayoutConfig) {
30
- return (h("div", { class: 'actions hiddeble' }, h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: () => this.setFieldAsAvailable.emit(this.fieldConfig), size: "medium", iconName: 'minus', title: 'Remover' }), h("ez-button", { ref: ref => this._editIconRef = ref, mode: "icon", class: "ez-button--tertiary", onClick: this.showFieldConfig.bind(this), iconName: 'edit', size: "medium", title: 'Editar' })));
33
+ return (h("div", { class: 'actions hiddeble' }, h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: () => this.setFieldAsAvailable.emit(this.fieldConfig), size: "medium", iconName: 'minus', title: this.getMessage('snkFieldConfig.titleRemove') }), h("ez-button", { ref: ref => this._editIconRef = ref, mode: "icon", class: "ez-button--tertiary", onClick: this.showFieldConfig.bind(this), iconName: 'edit', size: "medium", title: this.getMessage('snkFieldConfig.titleEdit') })));
31
34
  }
32
- return (h("div", { class: 'actions hiddeble' }, h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: () => this.addFieldToGuide.emit(this.fieldConfig), iconName: 'plus', size: "medium", title: 'Adicionar ao Layout' })));
35
+ return (h("div", { class: 'actions hiddeble' }, h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: () => this.addFieldToGuide.emit(this.fieldConfig), iconName: 'plus', size: "medium", title: this.getMessage('snkFieldConfig.titleAddToLayout') })));
33
36
  }
34
37
  loadFieldDescriptor() {
35
38
  if (this.dataUnit) {
@@ -62,7 +62,7 @@
62
62
  }
63
63
 
64
64
  .group-content.empty-content::before {
65
- content: "Arraste e solte um campo aqui";
65
+ content: var(--empty-content-message, "Arraste e solte um campo aqui");
66
66
  color: #cbcfd7;
67
67
  font-size: 16px;
68
68
  font-weight: 500;
@@ -89,7 +89,7 @@
89
89
  }
90
90
 
91
91
  .no-group-container::before {
92
- content: "Inclua estes campos nos grupos ou deixe-os separados no topo do formulário";
92
+ content: var(--no-group-message, "Inclua estes campos nos grupos ou deixe-os separados no topo do formulário");
93
93
  width: 100%;
94
94
  display: block;
95
95
  font-size: 16px;
@@ -18,8 +18,10 @@ export class FieldLayoutComponent {
18
18
  this.dataUnit = undefined;
19
19
  this.messagesBuilder = undefined;
20
20
  }
21
- handleFieldConfigChanged({ detail }) {
22
- const updatedField = detail;
21
+ onMessagesBuilderChange() {
22
+ this.setCustomCSSProperties();
23
+ }
24
+ handleFieldConfigChanged({ detail: updatedField }) {
23
25
  const groupToUpdate = this.groupsListMemory.find(g => g.name === updatedField.group);
24
26
  if (!groupToUpdate)
25
27
  return;
@@ -70,10 +72,9 @@ export class FieldLayoutComponent {
70
72
  }
71
73
  buildNewGroupName() {
72
74
  var _a, _b;
73
- const qtdWithNewGroupName = (_b = (_a = this.groupsListMemory.filter(g => g.name.includes(GROUP_NAMES.newGroup))) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
74
- return qtdWithNewGroupName === 0
75
- ? GROUP_NAMES.newGroup
76
- : `${GROUP_NAMES.newGroup} (${qtdWithNewGroupName})`;
75
+ const newGroupMessage = this.getMessage('snkFormConfig.form.newGroup');
76
+ const qtdWithNewGroupName = (_b = (_a = this.groupsListMemory.filter(g => g.name.includes(newGroupMessage))) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
77
+ return qtdWithNewGroupName === 0 ? newGroupMessage : `${newGroupMessage} (${qtdWithNewGroupName})`;
77
78
  }
78
79
  makeDynamicFieldsContainersDraggable() {
79
80
  const draggableGroups = this.groupsList.filter((g) => g.name !== GROUP_NAMES.noGroup);
@@ -149,7 +150,7 @@ export class FieldLayoutComponent {
149
150
  });
150
151
  }
151
152
  catch (e) {
152
- console.error('Falha ao tornar container de grupos arrastável: ', this.ID_GROUPS);
153
+ console.error(this.getMessage('snkFormConfig.errors.failMakeGroupsDraggable'), this.ID_GROUPS);
153
154
  }
154
155
  }
155
156
  makeFieldContainerDraggable(containerId) {
@@ -168,7 +169,7 @@ export class FieldLayoutComponent {
168
169
  });
169
170
  }
170
171
  catch (e) {
171
- console.error('Falha ao tornar grupo arrastável: ', containerId);
172
+ console.error(this.getMessage('snkFormConfig.errors.failMakeFieldContainerDraggable'), containerId);
172
173
  }
173
174
  }
174
175
  getContainerElement(id) {
@@ -303,18 +304,23 @@ export class FieldLayoutComponent {
303
304
  var _a;
304
305
  if (((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.name) === TAB_NAMES.main)
305
306
  return;
306
- return (h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: () => this.startGuideNameEdition(), size: "medium", iconName: 'edit', title: 'Renomear' }));
307
+ return (h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: () => this.startGuideNameEdition(), size: "medium", iconName: 'edit', title: this.getMessage('snkFormConfig.buttons.rename') }));
308
+ }
309
+ setCustomCSSProperties() {
310
+ document.documentElement.style.setProperty('--empty-content-message', `"${this.getMessage('snkFormConfig.form.labelDropField')}"`);
311
+ document.documentElement.style.setProperty('--no-group-message', `"${this.getMessage('snkFormConfig.form.subTitleInfo')}"`);
307
312
  }
308
313
  componentDidRender() {
309
314
  this.makeGroupsDraggable();
310
315
  this.makeDynamicFieldsContainersDraggable();
311
316
  this.makeFieldContainerDraggable(GROUP_NAMES.noGroup);
317
+ this.setCustomCSSProperties();
312
318
  }
313
319
  render() {
314
320
  if (!this.selectedGuide) {
315
- return (h(Host, { class: 'ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container' }, h("span", { class: 'no-guide-selected' }, "Selecione uma guia e comece a configurar")));
321
+ return (h(Host, { class: 'ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container' }, h("span", { class: 'no-guide-selected' }, this.getMessage('snkFormConfig.form.noGuideSelected'))));
316
322
  }
317
- return (h(Host, { class: 'ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container' }, this.renderGuideName(), h("div", { class: 'layout-container' }, h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { class: 'no-group-container' }, h("div", { id: GROUP_NAMES.noGroup, class: 'group-content', "data-group-name": GROUP_NAMES.noGroup }, this.renderFixedFields())), h("hr", null), h("div", { id: this.ID_GROUPS, class: 'groups-container' }, this.renderDraggableGroups()))), h("div", { class: 'add-group-container', onClick: this.handleAddGroup.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus" }), h("span", null, "Criar novo grupo"))));
323
+ return (h(Host, { class: 'ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container' }, this.renderGuideName(), h("div", { class: 'layout-container' }, h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { class: 'no-group-container' }, h("div", { id: GROUP_NAMES.noGroup, class: 'group-content', "data-group-name": GROUP_NAMES.noGroup }, this.renderFixedFields())), h("hr", null), h("div", { id: this.ID_GROUPS, class: 'groups-container' }, this.renderDraggableGroups()))), h("div", { class: 'add-group-container', onClick: this.handleAddGroup.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus" }), h("span", null, this.getMessage('snkFormConfig.form.createNewGroup')))));
318
324
  }
319
325
  static get is() { return "fields-layout"; }
320
326
  static get encapsulation() { return "scoped"; }
@@ -556,6 +562,9 @@ export class FieldLayoutComponent {
556
562
  static get elementRef() { return "el"; }
557
563
  static get watchers() {
558
564
  return [{
565
+ "propName": "messagesBuilder",
566
+ "methodName": "onMessagesBuilderChange"
567
+ }, {
559
568
  "propName": "selectedGuide",
560
569
  "methodName": "observeSelectedGuide"
561
570
  }, {
@@ -7,6 +7,7 @@ export class FieldsSelector {
7
7
  this.availableFields = [];
8
8
  this.dataUnit = undefined;
9
9
  this.filterTerm = '';
10
+ this.messagesBuilder = undefined;
10
11
  }
11
12
  onAddField(evt) {
12
13
  const newIndex = evt.newIndex;
@@ -32,14 +33,14 @@ export class FieldsSelector {
32
33
  }
33
34
  renderFields() {
34
35
  const fieldsToShow = ArrayUtils.applyStringFilter(this.filterTerm, this.availableFields);
35
- return fieldsToShow.map(field => (h("field-item", { key: field.name, dataUnit: this.dataUnit, fieldConfig: field })));
36
+ return fieldsToShow.map(field => (h("field-item", { key: field.name, dataUnit: this.dataUnit, fieldConfig: field, messagesBuilder: this.messagesBuilder })));
36
37
  }
37
38
  getCountText() {
38
39
  if (!this.availableFields.length)
39
- return 'Nenhum campo disponível';
40
+ return this.getMessage('snkFormConfig.availableFields.labelNoFields');
40
41
  if (this.availableFields.length === 1)
41
- return '1 campo disponível';
42
- return `${this.availableFields.length} campos disponíveis`;
42
+ return this.getMessage('snkFormConfig.availableFields.labelOneField');
43
+ return `${this.availableFields.length} ${this.getMessage('snkFormConfig.availableFields.labelAvailableFields')}`;
43
44
  }
44
45
  initializeDraggableContainer() {
45
46
  new Sortable(this.el.querySelector(`#${ID_AVAILABLE_FIELDS}`), {
@@ -51,11 +52,15 @@ export class FieldsSelector {
51
52
  onRemove: (evt) => this.onRemoveField(evt),
52
53
  });
53
54
  }
55
+ getMessage(key, params) {
56
+ var _a;
57
+ return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
58
+ }
54
59
  componentDidRender() {
55
60
  this.initializeDraggableContainer();
56
61
  }
57
62
  render() {
58
- return (h(Host, { class: 'ez-col ez-col--sd-4 ez-col--tb-4 ez-padding--medium' }, h("span", { class: 'fields-label ez-padding-bottom--small' }, "Campos dispon\u00EDveis"), h("ez-filter-input", { class: 'filter-input', slot: "content", mode: "slim", label: "Buscar campo", onEzChange: evt => this.filterTerm = evt.detail }), h("span", { class: 'fields-count' }, this.getCountText()), h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { id: ID_AVAILABLE_FIELDS, class: 'fields-container' }, this.renderFields()))));
63
+ return (h(Host, { class: 'ez-col ez-col--sd-4 ez-col--tb-4 ez-padding--medium' }, h("span", { class: 'fields-label ez-padding-bottom--small' }, this.getMessage('snkFormConfig.availableFields.title')), h("ez-filter-input", { class: 'filter-input', slot: "content", mode: "slim", label: this.getMessage('snkFormConfig.availableFields.labelSearchField'), onEzChange: evt => this.filterTerm = evt.detail }), h("span", { class: 'fields-count' }, this.getCountText()), h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { id: ID_AVAILABLE_FIELDS, class: 'fields-container' }, this.renderFields()))));
59
64
  }
60
65
  static get is() { return "fields-selector"; }
61
66
  static get encapsulation() { return "scoped"; }
@@ -111,6 +116,26 @@ export class FieldsSelector {
111
116
  "tags": [],
112
117
  "text": ""
113
118
  }
119
+ },
120
+ "messagesBuilder": {
121
+ "type": "unknown",
122
+ "mutable": true,
123
+ "complexType": {
124
+ "original": "SnkMessageBuilder",
125
+ "resolved": "SnkMessageBuilder",
126
+ "references": {
127
+ "SnkMessageBuilder": {
128
+ "location": "import",
129
+ "path": "../../../lib/message/SnkMessageBuilder"
130
+ }
131
+ }
132
+ },
133
+ "required": false,
134
+ "optional": false,
135
+ "docs": {
136
+ "tags": [],
137
+ "text": ""
138
+ }
114
139
  }
115
140
  };
116
141
  }
@@ -48,7 +48,7 @@
48
48
  }
49
49
 
50
50
  .guide-list.hidden-empty-content::before {
51
- content: "Nenhuma guia oculta";
51
+ content: var(--no-hidden-guides-message, "Nenhuma guia oculta");
52
52
  display: block;
53
53
  font-size: 16px;
54
54
  font-weight: 400;
@@ -58,7 +58,7 @@
58
58
  }
59
59
 
60
60
  .guide-list.visible-empty-content::before {
61
- content: "Nenhuma guia visível";
61
+ content: var(--no-visible-guides-message, "Nenhuma guia visível");
62
62
  display: block;
63
63
  font-size: 16px;
64
64
  font-weight: 400;
@@ -21,6 +21,9 @@ export class GuidesConfigurator {
21
21
  this.selectedGuide = undefined;
22
22
  this.messagesBuilder = undefined;
23
23
  }
24
+ onMessagesBuilderChange() {
25
+ this.setCustomCSSProperties();
26
+ }
24
27
  observeVisibleGuides(newGuides) {
25
28
  this.initGuidesConfig(newGuides);
26
29
  }
@@ -87,7 +90,9 @@ export class GuidesConfigurator {
87
90
  const guidesToShow = ArrayUtils.applyStringFilter(this.filterTerm, guides);
88
91
  return guidesToShow.map(guide => {
89
92
  var _a;
90
- return (h("div", { key: guide.name, "data-guide-name": guide.name, title: guide.label, class: `guide-item ${((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.label) === guide.label ? 'selected' : ''} ${this.filterTerm.length ? 'disable-sort' : ''}`, onClick: e => this.handleSelectGuide(guide, e) }, h("span", null, h("ez-icon", { iconName: "drag-indicator", class: 'ez-margin-right--small' })), h("span", { class: 'item-label' }, guide.label), h("div", { class: 'actions' }, h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.toggleGuideVisibility(guide, e), size: "medium", iconName: guide.visible ? 'eye-off' : 'eye', title: guide.visible ? 'Ocultar' : 'Tornar visível' }), h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.handleDeleteGuide(guide, e), size: "medium", iconName: 'delete', title: 'Excluir' }))));
93
+ return (h("div", { key: guide.name, "data-guide-name": guide.name, title: guide.label, class: `guide-item ${((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.label) === guide.label ? 'selected' : ''} ${this.filterTerm.length ? 'disable-sort' : ''}`, onClick: e => this.handleSelectGuide(guide, e) }, h("span", null, h("ez-icon", { iconName: "drag-indicator", class: 'ez-margin-right--small' })), h("span", { class: 'item-label' }, guide.label), h("div", { class: 'actions' }, h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.toggleGuideVisibility(guide, e), size: "medium", iconName: guide.visible ? 'eye-off' : 'eye', title: guide.visible ?
94
+ this.getMessage('snkFormConfig.guidesConfigurator.actions.hide') :
95
+ this.getMessage('snkFormConfig.guidesConfigurator.actions.show') }), h("ez-button", { mode: "icon", class: "ez-button--tertiary", onClick: e => this.handleDeleteGuide(guide, e), size: "medium", iconName: 'delete', title: this.getMessage('snkFormConfig.guidesConfigurator.actions.delete') }))));
91
96
  });
92
97
  }
93
98
  getContainerElement(id) {
@@ -133,13 +138,18 @@ export class GuidesConfigurator {
133
138
  handleSelectMainGuide() {
134
139
  this.guideSelected.emit(this.mainGuide);
135
140
  }
141
+ setCustomCSSProperties() {
142
+ document.documentElement.style.setProperty('--no-hidden-guides-message', `"${this.getMessage('snkFormConfig.guidesConfigurator.noHiddenGuides')}"`);
143
+ document.documentElement.style.setProperty('--no-visible-guides-message', `"${this.getMessage('snkFormConfig.guidesConfigurator.noVisibleGuides')}"`);
144
+ }
136
145
  componentDidLoad() {
137
146
  this.initializeDraggableContainers();
138
147
  this.initGuidesConfig(this.guidesList);
148
+ this.setCustomCSSProperties();
139
149
  }
140
150
  render() {
141
151
  var _a, _b, _c;
142
- return (h("ez-sidebar-navigator", { class: 'ezSidebarNavigator', type: 'fixed', size: 'md', titleMenu: 'Guias' }, h("div", { class: 'navigator-container' }, h("ez-filter-input", { slot: "content", mode: "slim", label: "Buscar guia", onEzChange: evt => this.filterTerm = evt.detail }), h("div", { onClick: this.handleSelectMainGuide.bind(this), class: `main-guide ${((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.name) === ((_b = this.mainGuide) === null || _b === void 0 ? void 0 : _b.name) ? 'selected' : ''}` }, h("span", null, (_c = this.mainGuide) === null || _c === void 0 ? void 0 : _c.label)), h("div", { class: 'collapsible-container' }, h("div", { class: 'collapsible-item' }, h("ez-collapsible-box", { label: "Guias vis\u00EDveis", headerSize: "large" }, h("div", { id: this.ID_VISIBLE_GUIDES, class: `guide-list ${!this.visibleGuides.length ? 'visible-empty-content' : ''}` }, this.renderItems(this.visibleGuides)))), h("div", { class: 'collapsible-item' }, h("ez-collapsible-box", { label: "Guias ocultas", headerSize: "large" }, h("div", { id: this.ID_HIDDEN_GUIDES, class: `guide-list ${!this.hiddenGuides.length ? 'hidden-empty-content' : ''}` }, this.renderItems(this.hiddenGuides))))), h("div", { class: 'add-button-container', onClick: this.handleAddGuide.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus" }), h("span", null, "Criar nova guia")))));
152
+ return (h("ez-sidebar-navigator", { class: 'ezSidebarNavigator', type: 'fixed', size: 'md', titleMenu: this.getMessage('snkFormConfig.guidesConfigurator.title') }, h("div", { class: 'navigator-container' }, h("ez-filter-input", { slot: "content", mode: "slim", label: this.getMessage('snkFormConfig.guidesConfigurator.searchGuide'), onEzChange: evt => this.filterTerm = evt.detail }), h("div", { onClick: this.handleSelectMainGuide.bind(this), class: `main-guide ${((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.name) === ((_b = this.mainGuide) === null || _b === void 0 ? void 0 : _b.name) ? 'selected' : ''}` }, h("span", null, (_c = this.mainGuide) === null || _c === void 0 ? void 0 : _c.label)), h("div", { class: 'collapsible-container' }, h("div", { class: 'collapsible-item' }, h("ez-collapsible-box", { label: this.getMessage('snkFormConfig.guidesConfigurator.visibleGuides'), headerSize: "large" }, h("div", { id: this.ID_VISIBLE_GUIDES, class: `guide-list ${!this.visibleGuides.length ? 'visible-empty-content' : ''}` }, this.renderItems(this.visibleGuides)))), h("div", { class: 'collapsible-item' }, h("ez-collapsible-box", { label: this.getMessage('snkFormConfig.guidesConfigurator.hiddenGuides'), headerSize: "large" }, h("div", { id: this.ID_HIDDEN_GUIDES, class: `guide-list ${!this.hiddenGuides.length ? 'hidden-empty-content' : ''}` }, this.renderItems(this.hiddenGuides))))), h("div", { class: 'add-button-container', onClick: this.handleAddGuide.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus" }), h("span", null, this.getMessage('snkFormConfig.guidesConfigurator.createNewGuide'))))));
143
153
  }
144
154
  static get is() { return "guides-configurator"; }
145
155
  static get encapsulation() { return "scoped"; }
@@ -307,6 +317,9 @@ export class GuidesConfigurator {
307
317
  static get elementRef() { return "el"; }
308
318
  static get watchers() {
309
319
  return [{
320
+ "propName": "messagesBuilder",
321
+ "methodName": "onMessagesBuilderChange"
322
+ }, {
310
323
  "propName": "guidesList",
311
324
  "methodName": "observeVisibleGuides"
312
325
  }, {
@@ -87,7 +87,7 @@ export class SnkFormConfig {
87
87
  this.originalConfigSelected = userConfig.find((config) => config.origin === origin);
88
88
  }
89
89
  catch (error) {
90
- console.error('Falha ao buscar configurações de formulário definida pelo usuário.');
90
+ console.error(this.getMessage('snkFormConfig.errors.failFetchUserConfig'));
91
91
  console.error(error);
92
92
  }
93
93
  }
@@ -243,7 +243,7 @@ export class SnkFormConfig {
243
243
  this.hasChanges = true;
244
244
  }
245
245
  handleCreateNewGuide() {
246
- const newGuideName = buildNewGuideName(this.guidesList);
246
+ const newGuideName = buildNewGuideName(this.guidesList, this.getMessage.bind(this));
247
247
  const newGuide = {
248
248
  name: newGuideName,
249
249
  label: newGuideName,
@@ -276,7 +276,7 @@ export class SnkFormConfig {
276
276
  await this.initializeUserConfig();
277
277
  }
278
278
  render() {
279
- return (h(Host, null, h("config-header", { configOptions: this.configOptions, selectedConfig: this.configSelected, messagesBuilder: this.messagesBuilder, hasChanges: this.hasChanges, optionConfigChanged: this.optionConfigChanged, onConfigClose: () => this.configClose.emit(), onSaveConfig: async () => await this.handleSaveConfig() }), h("div", { class: "ez-padding--medium" }, h("div", { class: "ez-flex sidebarNavigator__container" }, h("guides-configurator", { messagesBuilder: this.messagesBuilder, guidesList: this.guidesList, selectedGuide: this.selectedGuide, onGuideSelected: this.handleSelectGuide.bind(this), onGuideListChanged: this.handleGuideListChanged.bind(this), onCreateNewGuide: this.handleCreateNewGuide.bind(this), onGuideDeleted: this.handleGuideDeleted.bind(this) }), h("fields-layout", { ref: ref => this.refFieldsLayout = ref, selectedGuide: this.selectedGuide, guideNames: this.getGuideNames(), groupsList: this.groupsList, messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, onGuideRenamed: this.handleGuideRenamed.bind(this), onLayoutChanged: this.handleLayoutChanged.bind(this), onSetFieldListAsAvailable: this.handleSetFieldListAsAvailable.bind(this) }), h("fields-selector", { dataUnit: this.dataUnit, availableFields: this.availableFields, onFieldListChanged: this.handleAvailableFieldListChanged.bind(this) })))));
279
+ return (h(Host, null, h("config-header", { configOptions: this.configOptions, selectedConfig: this.configSelected, messagesBuilder: this.messagesBuilder, hasChanges: this.hasChanges, optionConfigChanged: this.optionConfigChanged, onConfigClose: () => this.configClose.emit(), onSaveConfig: async () => await this.handleSaveConfig() }), h("div", { class: "ez-padding--medium" }, h("div", { class: "ez-flex sidebarNavigator__container" }, h("guides-configurator", { messagesBuilder: this.messagesBuilder, guidesList: this.guidesList, selectedGuide: this.selectedGuide, onGuideSelected: this.handleSelectGuide.bind(this), onGuideListChanged: this.handleGuideListChanged.bind(this), onCreateNewGuide: this.handleCreateNewGuide.bind(this), onGuideDeleted: this.handleGuideDeleted.bind(this) }), h("fields-layout", { ref: ref => this.refFieldsLayout = ref, selectedGuide: this.selectedGuide, guideNames: this.getGuideNames(), groupsList: this.groupsList, messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, onGuideRenamed: this.handleGuideRenamed.bind(this), onLayoutChanged: this.handleLayoutChanged.bind(this), onSetFieldListAsAvailable: this.handleSetFieldListAsAvailable.bind(this) }), h("fields-selector", { dataUnit: this.dataUnit, availableFields: this.availableFields, onFieldListChanged: this.handleAvailableFieldListChanged.bind(this), messagesBuilder: this.messagesBuilder })))));
280
280
  }
281
281
  static get is() { return "snk-form-config"; }
282
282
  static get encapsulation() { return "scoped"; }
@@ -6,6 +6,7 @@ const FORM_COL_CONFIG_PREFIX = 'formColCfg.';
6
6
  export class SnkLayoutFormConfig {
7
7
  constructor() {
8
8
  this._formConfigFetcher = new FormConfigFetcher();
9
+ this.messagesBuilder = undefined;
9
10
  this.layoutType = FormLayout.CASCADE;
10
11
  }
11
12
  /**
@@ -30,8 +31,12 @@ export class SnkLayoutFormConfig {
30
31
  toggleLayout(key) {
31
32
  this.layoutType = key;
32
33
  }
34
+ getMessage(key, params) {
35
+ var _a;
36
+ return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
37
+ }
33
38
  render() {
34
- 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."))));
39
+ 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')))));
35
40
  }
36
41
  static get is() { return "snk-layout-form-config"; }
37
42
  static get encapsulation() { return "scoped"; }
@@ -45,6 +50,30 @@ export class SnkLayoutFormConfig {
45
50
  "$": ["snk-layout-form-config.css"]
46
51
  };
47
52
  }
53
+ static get properties() {
54
+ return {
55
+ "messagesBuilder": {
56
+ "type": "unknown",
57
+ "mutable": false,
58
+ "complexType": {
59
+ "original": "SnkMessageBuilder",
60
+ "resolved": "SnkMessageBuilder",
61
+ "references": {
62
+ "SnkMessageBuilder": {
63
+ "location": "import",
64
+ "path": "../../lib/message/SnkMessageBuilder"
65
+ }
66
+ }
67
+ },
68
+ "required": false,
69
+ "optional": false,
70
+ "docs": {
71
+ "tags": [],
72
+ "text": ""
73
+ }
74
+ }
75
+ };
76
+ }
48
77
  static get states() {
49
78
  return {
50
79
  "layoutType": {}
@@ -51,7 +51,7 @@ export class SnkPersonalizedFilter {
51
51
  entityName: "",
52
52
  fieldName: "",
53
53
  description: "",
54
- fieldLabel: "Valor",
54
+ fieldLabel: this.getMessage("snkPersonalizedFilter.info.labelDefaultValue"),
55
55
  type: undefined,
56
56
  expression: undefined,
57
57
  operand: undefined,
@@ -117,7 +117,7 @@ export class SnkExpressionGroup {
117
117
  entityName: "",
118
118
  fieldName: "",
119
119
  description: "",
120
- label: "Valor",
120
+ label: this.getMessage("snkPersonalizedFilter.info.labelDefaultValue"),
121
121
  type: undefined,
122
122
  expression: undefined,
123
123
  operand: undefined,
@@ -142,7 +142,7 @@ export class SnkExpressionGroup {
142
142
  entityName: "",
143
143
  fieldName: "",
144
144
  description: "",
145
- label: "Valor",
145
+ label: this.getMessage("snkPersonalizedFilter.info.labelDefaultValue"),
146
146
  type: undefined,
147
147
  expression: undefined,
148
148
  operand: undefined,
@@ -229,7 +229,7 @@ export class SnkExpressionGroup {
229
229
  }
230
230
  render() {
231
231
  const canAddGroup = this.canAddGroup();
232
- return (h(Host, null, h("div", { class: !this.isFirstLevel() && this._showDashes ? 'dashes' : 'hidden', style: this.buildGroupStyle() }), h("div", { class: !this.isFirstLevel() && this._showDashes ? 'horizontal-dashes' : 'hidden' }), h("div", { class: 'ez-flex ez-flex--align-items-center' }, h("div", { class: 'snk-expression-group__container-condition ez-flex ez-flex-item--align-center ez-flex--align-items-center', "data-condition": this._conditionOperator, title: this.getTooltipMessageForOperator() }, h("label", { class: "ez-label ez-padding-right--medium ez-padding-left--medium ez-title--primary" }, this.getMessage("snkPersonalizedFilter.info.condition")), h("div", null, h("ez-combo-box", Object.assign({ class: "snk-expression-group__container-option", canShowError: false, mode: "slim", suppressEmptyOption: true, enabled: this.canChangeGroupCondition(), value: this._conditionOperator, onEzChange: (evt) => this.handleConditionOperatorChange(evt.detail.value) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `comboBoxConditions_level_${this.getDataGroupLevel()}` }), h("option", { value: FilterGroupCondition.AND }, "E"), h("option", { value: FilterGroupCondition.OR }, "OU")))), h("ez-button", { class: "ez-padding-right--medium ez-padding-left--medium", mode: "icon", iconName: "plus", size: "small", enabled: this.canAddExpression, title: this.getMessageAddTooltip(), onClick: () => this.handleAddExpression() }), h("ez-button", { label: this.getMessage("snkPersonalizedFilter.info.addGroup"), size: "small", enabled: canAddGroup, title: !canAddGroup ? this.getMessage('snkPersonalizedFilter.info.labelDisabledAddGroupButton', { LIMIT_GROUP_LEVEL: this.LIMIT_GROUP_LEVEL + 1 }) : '', onClick: () => this.handleAddGroup() }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: "plus" })), !this.isFirstLevel() && h("ez-button", { title: this.getMessage("snkPersonalizedFilter.info.labelDeleteExpression"), class: "ez-padding-left--medium", mode: "icon", iconName: "delete", size: "small", onClick: (evt) => this.confirmRemoveGroup(evt) })), h("div", { class: "ez-padding-top--small snk-expression-group__container-expression" }, h("div", { class: "ez-padding-top--small" }, this.renderExpressionItems())), h("div", { class: "ez-padding-top--small snk-expression-group__container-expression" }, h("div", { class: "ez-padding-top--small" }, this.renderGroups()))));
232
+ return (h(Host, null, h("div", { class: !this.isFirstLevel() && this._showDashes ? 'dashes' : 'hidden', style: this.buildGroupStyle() }), h("div", { class: !this.isFirstLevel() && this._showDashes ? 'horizontal-dashes' : 'hidden' }), h("div", { class: 'ez-flex ez-flex--align-items-center' }, h("div", { class: 'snk-expression-group__container-condition ez-flex ez-flex-item--align-center ez-flex--align-items-center', "data-condition": this._conditionOperator, title: this.getTooltipMessageForOperator() }, h("label", { class: "ez-label ez-padding-right--medium ez-padding-left--medium ez-title--primary" }, this.getMessage("snkPersonalizedFilter.info.condition")), h("div", null, h("ez-combo-box", Object.assign({ class: "snk-expression-group__container-option", canShowError: false, mode: "slim", suppressEmptyOption: true, enabled: this.canChangeGroupCondition(), value: this._conditionOperator, onEzChange: (evt) => this.handleConditionOperatorChange(evt.detail.value) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `comboBoxConditions_level_${this.getDataGroupLevel()}` }), h("option", { value: FilterGroupCondition.AND }, this.getMessage("snkPersonalizedFilter.info.conditionAnd")), h("option", { value: FilterGroupCondition.OR }, this.getMessage("snkPersonalizedFilter.info.conditionOr"))))), h("ez-button", { class: "ez-padding-right--medium ez-padding-left--medium", mode: "icon", iconName: "plus", size: "small", enabled: this.canAddExpression, title: this.getMessageAddTooltip(), onClick: () => this.handleAddExpression() }), h("ez-button", { label: this.getMessage("snkPersonalizedFilter.info.addGroup"), size: "small", enabled: canAddGroup, title: !canAddGroup ? this.getMessage('snkPersonalizedFilter.info.labelDisabledAddGroupButton', { LIMIT_GROUP_LEVEL: this.LIMIT_GROUP_LEVEL + 1 }) : '', onClick: () => this.handleAddGroup() }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: "plus" })), !this.isFirstLevel() && h("ez-button", { title: this.getMessage("snkPersonalizedFilter.info.labelDeleteExpression"), class: "ez-padding-left--medium", mode: "icon", iconName: "delete", size: "small", onClick: (evt) => this.confirmRemoveGroup(evt) })), h("div", { class: "ez-padding-top--small snk-expression-group__container-expression" }, h("div", { class: "ez-padding-top--small" }, this.renderExpressionItems())), h("div", { class: "ez-padding-top--small snk-expression-group__container-expression" }, h("div", { class: "ez-padding-top--small" }, this.renderGroups()))));
233
233
  }
234
234
  static get is() { return "snk-expression-group"; }
235
235
  static get encapsulation() { return "scoped"; }
@@ -1,19 +1,19 @@
1
1
  import { UserInterface } from '@sankhyalabs/core';
2
2
  const defaultsOperand = [
3
- { label: "Igual (=)", value: "EQUAL" },
4
- { label: "Diferente (<>)", value: "DIFFERENT" },
5
- { label: "Contendo (LIKE)", value: "LIKE" },
6
- { label: "Contido em (IN)", value: "IN" },
7
- { label: "Iniciado com (%?)", value: "START_WITH" },
8
- { label: "Terminado com (?%)", value: "FINISHED_WITH" },
9
- { label: "Vazio (NULL)", value: "NULL" },
10
- { label: "Não Vazio (NOT NULL)", value: "NOT_NULL" },
3
+ { label: "snkPersonalizedFilter.operands.equal", value: "EQUAL" },
4
+ { label: "snkPersonalizedFilter.operands.different", value: "DIFFERENT" },
5
+ { label: "snkPersonalizedFilter.operands.like", value: "LIKE" },
6
+ { label: "snkPersonalizedFilter.operands.in", value: "IN" },
7
+ { label: "snkPersonalizedFilter.operands.startWith", value: "START_WITH" },
8
+ { label: "snkPersonalizedFilter.operands.finishedWith", value: "FINISHED_WITH" },
9
+ { label: "snkPersonalizedFilter.operands.null", value: "NULL" },
10
+ { label: "snkPersonalizedFilter.operands.notNull", value: "NOT_NULL" },
11
11
  ];
12
12
  export const FilterOperandDefault = defaultsOperand.concat([
13
- { label: "Maior (>)", value: "LARGER" },
14
- { label: "Maior ou Igual (>=)", value: "LARGER_EQUAL" },
15
- { label: "Menor (<)", value: "SMALLER" },
16
- { label: "Menor ou Igual (<=)", value: "SMALLER_EQUAL" }
13
+ { label: "snkPersonalizedFilter.operands.larger", value: "LARGER" },
14
+ { label: "snkPersonalizedFilter.operands.largerEqual", value: "LARGER_EQUAL" },
15
+ { label: "snkPersonalizedFilter.operands.smaller", value: "SMALLER" },
16
+ { label: "snkPersonalizedFilter.operands.smallerEqual", value: "SMALLER_EQUAL" }
17
17
  ]);
18
18
  export const FilterOperandTypeTextSearch = defaultsOperand;
19
19
  export const FIELD_TYPE_SEARCH_AND_TEXT = [
@@ -155,12 +155,15 @@ export class SnkExpressionItem {
155
155
  buildOptionsOperator() {
156
156
  var _a;
157
157
  if (FIELD_TYPE_SEARCH_AND_TEXT.includes((_a = this._fieldSelected) === null || _a === void 0 ? void 0 : _a.userInterface)) {
158
- return this.filterOperandTypeTextSearch;
158
+ return this.translateOperandOptions(this.filterOperandTypeTextSearch);
159
159
  }
160
160
  else {
161
- return this.filterOperandDefault;
161
+ return this.translateOperandOptions(this.filterOperandDefault);
162
162
  }
163
163
  }
164
+ translateOperandOptions(options) {
165
+ return options.map(option => ({ label: this.getMessage(option.label), value: option.value }));
166
+ }
164
167
  handleChangeOperator(optionSelected) {
165
168
  this.checkOptionIsNull(optionSelected);
166
169
  this.setValueExpression("operand", optionSelected);
@@ -256,9 +259,7 @@ export class SnkExpressionItem {
256
259
  }
257
260
  render() {
258
261
  var _a;
259
- return (h(Host, null, h("div", { class: "dashes" }), h("div", { class: "box" }, h("div", { class: "box__container" }, h("div", { class: "box__container--input-filter" }, h("ez-filter-input", Object.assign({ ref: ref => this._elFilterInput = ref, value: (_a = this._fieldSelected) === null || _a === void 0 ? void 0 : _a.path, label: this.getMessage("snkPersonalizedFilter.info.labelSearchField"), canShowError: false, onEzChange: (evt) => this.handleChangeFilterInput(evt), onFocus: () => this.handleFocus() }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `expressionFilterInput_${this.expression.fieldName || this.DEFAULT_FIELD_NAME}` })), h("snk-filter-field-search", { ref: ref => this._elFilterFieldSearch = ref, searchable: false, onEzSelectFilterItem: (ev) => this.handleSelectItem(ev.detail), fieldsDataSource: this._dataSourceFetcher })), h("div", { class: "box__container--input-operator" }, h("ez-combo-box", Object.assign({ label: this.getMessage("snkPersonalizedFilter.info.labelOperator"), value: this.expression.operand, canShowError: false, options: this.buildOptionsOperator(), onEzChange: (evt) => { var _a; return this.handleChangeOperator((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); }, suppressEmptyOption: true }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `comboBoxOperand_${this.expression.fieldName || this.DEFAULT_FIELD_NAME}` }))), h("div", { class: "box__container--input-value" }, !this._fieldSelected ?
260
- h("ez-number-input", { label: "Valor", canShowError: false, enabled: (!this._showValueVariable && !this._optionNotNull) }) :
261
- this.buildFieldByType()), h("div", { class: "box__container--input-value-variable" }, !this._optionNotNull &&
262
+ return (h(Host, null, h("div", { class: "dashes" }), h("div", { class: "box" }, h("div", { class: "box__container" }, h("div", { class: "box__container--input-filter" }, h("ez-filter-input", Object.assign({ ref: ref => this._elFilterInput = ref, value: (_a = this._fieldSelected) === null || _a === void 0 ? void 0 : _a.path, label: this.getMessage("snkPersonalizedFilter.info.labelSearchField"), canShowError: false, onEzChange: (evt) => this.handleChangeFilterInput(evt), onFocus: () => this.handleFocus() }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `expressionFilterInput_${this.expression.fieldName || this.DEFAULT_FIELD_NAME}` })), h("snk-filter-field-search", { ref: ref => this._elFilterFieldSearch = ref, searchable: false, onEzSelectFilterItem: (ev) => this.handleSelectItem(ev.detail), fieldsDataSource: this._dataSourceFetcher })), h("div", { class: "box__container--input-operator" }, h("ez-combo-box", Object.assign({ label: this.getMessage("snkPersonalizedFilter.info.labelOperator"), value: this.expression.operand, canShowError: false, options: this.buildOptionsOperator(), onEzChange: (evt) => { var _a; return this.handleChangeOperator((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); }, suppressEmptyOption: true }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `comboBoxOperand_${this.expression.fieldName || this.DEFAULT_FIELD_NAME}` }))), h("div", { class: "box__container--input-value" }, !this._fieldSelected ? (h("ez-number-input", { label: this.getMessage('snkPersonalizedFilter.info.labelDefaultValue'), canShowError: false, enabled: !this._showValueVariable && !this._optionNotNull })) : (this.buildFieldByType())), h("div", { class: "box__container--input-value-variable" }, !this._optionNotNull &&
262
263
  h("ez-tooltip", { message: this.getMessage("snkPersonalizedFilter.info.checkVariableDisabled"), active: this.isDefaultFilter }, h("ez-check", { ref: ref => this._elValueVariable = ref, value: this.expression.paramVariable, label: this.getMessage("snkPersonalizedFilter.info.labelValueVarible"), mode: CheckMode.SWITCH, onEzChange: (evt) => this.handleChangeValueVariable(evt.detail), enabled: !this.isDefaultFilter })), (this._showValueVariable && !this._optionNotNull) &&
263
264
  h("ez-icon", Object.assign({ class: "box__container--input-value-variable--icon", size: "large", iconName: "settings-inverted" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: 'iconConfig' }, { title: this.getMessage("snkPersonalizedFilter.info.titleTooltip"), onClick: () => this.openSnkFilterParamConfig() })), h("snk-filter-param-config", { ref: (el) => this._elFilterParamConfigRef = el, messagesBuilder: this.messagesBuilder })), h("div", { class: "box__container--button-delete" }, h("div", { class: "box__container--button-delete--icon" }, h("ez-button", { mode: "icon", iconName: "delete", enabled: this.canRemove, label: this.getMessage("snkPersonalizedFilter.info.labelDeleteItem"), onClick: (evt) => this.confirmRemove(evt) })))))));
264
265
  }
@@ -6,6 +6,7 @@ export class PesquisaTree {
6
6
  this.argument = undefined;
7
7
  this.allowsNonAnalytic = false;
8
8
  this.shouldLoadTree = false;
9
+ this.messagesBuilder = undefined;
9
10
  this.items = [];
10
11
  }
11
12
  async applyFilter() {
@@ -36,8 +37,8 @@ export class PesquisaTree {
36
37
  handleDbClick(item) {
37
38
  var _a;
38
39
  if (!this.allowsNonAnalytic && !((_a = item['props']) === null || _a === void 0 ? void 0 : _a['analitico'])) {
39
- const title = 'Erro';
40
- const message = `Há pelo menos um registro inválido selecionado. Você deve selecionar itens do tipo 'analítico'.`;
40
+ const title = this.getMessage('snkPesquisa.tree.errorTitle');
41
+ const message = this.getMessage('snkPesquisa.tree.nonAnalyticError');
41
42
  ApplicationUtils.error(title, message);
42
43
  return;
43
44
  }
@@ -48,13 +49,16 @@ export class PesquisaTree {
48
49
  this.pesquisaTreeSelectItem.emit(option);
49
50
  }
50
51
  renderEmptyMessage() {
51
- return (h("div", { class: "ez-flex ez-flex--justify-center ez-flex--align-items-center ez-margin--large ez-text ez-text--xlarge ez-text--secondary" }, h("span", null, "Nenhum registro encontrado...")));
52
+ return (h("div", { class: "ez-flex ez-flex--justify-center ez-flex--align-items-center ez-margin--large ez-text ez-text--xlarge ez-text--secondary" }, h("span", null, this.getMessage('snkPesquisa.tree.emptyMessage'))));
53
+ }
54
+ getMessage(key, params) {
55
+ return this.messagesBuilder.getMessage(key, params);
52
56
  }
53
57
  render() {
54
58
  var _a;
55
59
  return (h(Host, null, !((_a = this.items) === null || _a === void 0 ? void 0 : _a.length) ?
56
60
  this.renderEmptyMessage() :
57
- h(Fragment, null, h("div", { class: 'actions-container' }, h("ez-button", { size: 'small', mode: 'icon', class: 'ez-margin-right--small', iconName: 'show-list', title: "Expandir", onClick: () => this.handleExpandAll() }), h("ez-button", { size: 'small', mode: 'icon', iconName: 'hide-list', title: "Recolher", onClick: () => this.handleCloseAll() })), h("ez-tree", { ref: (element) => this._tree = element, onEzDbClickItem: ({ detail }) => this.handleDbClick(detail), items: this.items }))));
61
+ h(Fragment, null, h("div", { class: 'actions-container' }, h("ez-button", { size: 'small', mode: 'icon', class: 'ez-margin-right--small', iconName: 'show-list', title: this.getMessage('snkPesquisa.tree.expandButton'), onClick: () => this.handleExpandAll() }), h("ez-button", { size: 'small', mode: 'icon', iconName: 'hide-list', title: this.getMessage('snkPesquisa.tree.collapseButton'), onClick: () => this.handleCloseAll() })), h("ez-tree", { ref: (element) => this._tree = element, onEzDbClickItem: ({ detail }) => this.handleDbClick(detail), items: this.items }))));
58
62
  }
59
63
  static get is() { return "pesquisa-tree"; }
60
64
  static get encapsulation() { return "scoped"; }
@@ -148,6 +152,26 @@ export class PesquisaTree {
148
152
  "attribute": "should-load-tree",
149
153
  "reflect": false,
150
154
  "defaultValue": "false"
155
+ },
156
+ "messagesBuilder": {
157
+ "type": "unknown",
158
+ "mutable": true,
159
+ "complexType": {
160
+ "original": "SnkMessageBuilder",
161
+ "resolved": "SnkMessageBuilder",
162
+ "references": {
163
+ "SnkMessageBuilder": {
164
+ "location": "import",
165
+ "path": "../../../lib/message/SnkMessageBuilder"
166
+ }
167
+ }
168
+ },
169
+ "required": false,
170
+ "optional": false,
171
+ "docs": {
172
+ "tags": [],
173
+ "text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
174
+ }
151
175
  }
152
176
  };
153
177
  }