@sankhyalabs/sankhyablocks 9.1.13 → 9.2.0-dev.1

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 (1184) hide show
  1. package/dist/cjs/ClientSideExporterProvider-994f6e26.js +382 -0
  2. package/dist/cjs/ConfigStorage-1931defc.js +550 -0
  3. package/dist/cjs/DataFetcher-ad9fb3bb.js +9894 -0
  4. package/dist/cjs/FormConfigHelper-ebb77625.js +259 -0
  5. package/dist/cjs/ISave-18ffb73e.js +397 -0
  6. package/dist/cjs/SnkFormConfigManager-65e5288e.js +217 -0
  7. package/dist/cjs/auth-fetcher-afbe69ab.js +34 -0
  8. package/dist/cjs/config-header.cjs.entry.js +2 -2
  9. package/dist/cjs/dataunit-fetcher-c7253b02.js +1122 -0
  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-f6e66d64.js +310 -0
  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 +95 -45
  19. package/dist/cjs/snk-application.cjs.entry.js +55 -27
  20. package/dist/cjs/snk-attach.cjs.entry.js +46 -23
  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-448fce74.js +921 -0
  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 +27 -37
  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 +10 -36
  33. package/dist/cjs/snk-grid.cjs.entry.js +13 -61
  34. package/dist/cjs/snk-guides-viewer-c23ed218.js +602 -0
  35. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  36. package/dist/cjs/snk-personalized-filter.cjs.entry.js +6 -14
  37. package/dist/cjs/snk-pesquisa.cjs.entry.js +26 -19
  38. package/dist/cjs/snk-simple-bar.cjs.entry.js +5 -5
  39. package/dist/cjs/snk-simple-crud.cjs.entry.js +33 -68
  40. package/dist/collection/components/snk-actions-button/clientEvent/index.js +3 -2
  41. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +12 -6
  42. package/dist/collection/components/snk-application/snk-application.js +72 -46
  43. package/dist/collection/components/snk-attach/snk-attach.js +46 -12
  44. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +7 -4
  45. package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +7 -3
  46. package/dist/collection/components/snk-configurator/snk-configurator.js +1 -1
  47. package/dist/collection/components/snk-crud/snk-crud.js +12 -8
  48. package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js +11 -3
  49. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +4 -4
  50. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +5 -5
  51. package/dist/collection/components/snk-data-unit/MultipleUpdateHelper.js +4 -1
  52. package/dist/collection/components/snk-data-unit/snk-data-unit.js +28 -181
  53. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +3 -1
  54. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +3 -1
  55. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +1 -1
  56. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +1 -1
  57. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +1 -1
  58. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -0
  59. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +68 -215
  60. package/dist/collection/components/snk-form/snk-form.js +22 -133
  61. package/dist/collection/components/snk-form-config/FormConfigHelper.js +4 -5
  62. package/dist/collection/components/snk-form-config/config-header/config-header.js +2 -2
  63. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.js +2 -2
  64. package/dist/collection/components/snk-form-config/field-item/field-item.js +6 -3
  65. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +2 -2
  66. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +20 -11
  67. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js +30 -5
  68. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +2 -2
  69. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +15 -2
  70. package/dist/collection/components/snk-form-config/snk-form-config.js +3 -3
  71. package/dist/collection/components/snk-grid/snk-grid.js +85 -338
  72. package/dist/collection/components/snk-grid-config/snk-grid-config.js +74 -36
  73. package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.js +20 -1
  74. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +30 -1
  75. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +22 -84
  76. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +3 -3
  77. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js +12 -12
  78. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +6 -5
  79. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +28 -4
  80. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +23 -16
  81. package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +9 -9
  82. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +139 -432
  83. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +26 -1
  84. package/dist/collection/components/snk-taskbar/snk-taskbar.js +36 -102
  85. package/dist/collection/lib/configs/ConfigStorage.js +3 -0
  86. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +19 -12
  87. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js +22 -20
  88. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +9 -1
  89. package/dist/collection/lib/licenses/sankhyalicense.module.js +1 -0
  90. package/dist/collection/lib/message/SnkMessageBuilder.js +34 -56
  91. package/dist/collection/lib/message/messageResourceEnUSUtils.js +76 -0
  92. package/dist/collection/lib/message/messageResourceEsESUtils.js +76 -0
  93. package/dist/collection/lib/message/messageResourcePtBRUtils.js +76 -0
  94. package/dist/collection/lib/message/resources/en-us/continuousInsertUtils.msg.js +6 -0
  95. package/dist/collection/lib/message/resources/en-us/crud-utils.msg.js +3 -0
  96. package/dist/collection/lib/message/resources/en-us/dataFetcher.msg.js +12 -0
  97. package/dist/collection/lib/message/resources/en-us/dataUnitDataLoaderHelper.msg.js +18 -0
  98. package/dist/collection/lib/message/resources/en-us/file-viewer.msg.js +9 -0
  99. package/dist/collection/lib/message/resources/en-us/snk-actions-button.msg.js +29 -0
  100. package/dist/collection/lib/message/resources/en-us/snk-application.msg.js +27 -0
  101. package/dist/collection/lib/message/resources/en-us/snk-attach.msg.js +42 -0
  102. package/dist/collection/lib/message/resources/en-us/snk-configurator.msg.js +13 -0
  103. package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +35 -0
  104. package/dist/collection/lib/message/resources/en-us/snk-data-exporter.msg.js +35 -0
  105. package/dist/collection/lib/message/resources/en-us/snk-data-unit.msg.js +40 -0
  106. package/dist/collection/lib/message/resources/en-us/snk-entity-list.msg.js +3 -0
  107. package/dist/collection/lib/message/resources/en-us/snk-error-handler.msg.js +17 -0
  108. package/dist/collection/lib/message/resources/en-us/snk-exporter.msg.js +20 -0
  109. package/dist/collection/lib/message/resources/en-us/snk-filter-bar.msg.js +71 -0
  110. package/dist/collection/lib/message/resources/en-us/snk-filter-field-search.msg.js +7 -0
  111. package/dist/collection/lib/message/resources/en-us/snk-filter-list.msg.js +3 -0
  112. package/dist/collection/lib/message/resources/en-us/snk-filter-param-config.msg.js +18 -0
  113. package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +118 -0
  114. package/dist/collection/lib/message/resources/en-us/snk-grid.msg.js +41 -0
  115. package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js +10 -0
  116. package/dist/collection/lib/message/resources/en-us/snk-personalized-filter.msg.js +105 -0
  117. package/dist/collection/lib/message/resources/en-us/snk-pesquisa.msg.js +25 -0
  118. package/dist/collection/lib/message/resources/en-us/snk-print-selector.msg.js +23 -0
  119. package/dist/collection/lib/message/resources/en-us/snk-simple-bar.msg.js +3 -0
  120. package/dist/collection/lib/message/resources/en-us/snk-simple-crud.msg.js +14 -0
  121. package/dist/collection/lib/message/resources/en-us/snk-simple-form-config.msg.js +16 -0
  122. package/dist/collection/lib/message/resources/en-us/snk-taskbar.msg.js +18 -0
  123. package/dist/collection/lib/message/resources/es-es/continuousInsertUtils.msg.js +6 -0
  124. package/dist/collection/lib/message/resources/es-es/crud-utils.msg.js +3 -0
  125. package/dist/collection/lib/message/resources/es-es/dataFetcher.msg.js +12 -0
  126. package/dist/collection/lib/message/resources/es-es/dataUnitDataLoaderHelper.msg.js +18 -0
  127. package/dist/collection/lib/message/resources/es-es/file-viewer.msg.js +9 -0
  128. package/dist/collection/lib/message/resources/es-es/snk-actions-button.msg.js +29 -0
  129. package/dist/collection/lib/message/resources/es-es/snk-application.msg.js +27 -0
  130. package/dist/collection/lib/message/resources/es-es/snk-attach.msg.js +42 -0
  131. package/dist/collection/lib/message/resources/es-es/snk-configurator.msg.js +13 -0
  132. package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +35 -0
  133. package/dist/collection/lib/message/resources/es-es/snk-data-exporter.msg.js +35 -0
  134. package/dist/collection/lib/message/resources/es-es/snk-data-unit.msg.js +40 -0
  135. package/dist/collection/lib/message/resources/es-es/snk-entity-list.msg.js +3 -0
  136. package/dist/collection/lib/message/resources/es-es/snk-error-handler.msg.js +17 -0
  137. package/dist/collection/lib/message/resources/es-es/snk-exporter.msg.js +20 -0
  138. package/dist/collection/lib/message/resources/es-es/snk-filter-bar.msg.js +71 -0
  139. package/dist/collection/lib/message/resources/es-es/snk-filter-field-search.msg.js +7 -0
  140. package/dist/collection/lib/message/resources/es-es/snk-filter-list.msg.js +3 -0
  141. package/dist/collection/lib/message/resources/es-es/snk-filter-param-config.msg.js +18 -0
  142. package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +118 -0
  143. package/dist/collection/lib/message/resources/es-es/snk-grid.msg.js +41 -0
  144. package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js +10 -0
  145. package/dist/collection/lib/message/resources/es-es/snk-personalized-filter.msg.js +105 -0
  146. package/dist/collection/lib/message/resources/es-es/snk-pesquisa.msg.js +25 -0
  147. package/dist/collection/lib/message/resources/es-es/snk-print-selector.msg.js +23 -0
  148. package/dist/collection/lib/message/resources/es-es/snk-simple-bar.msg.js +3 -0
  149. package/dist/collection/lib/message/resources/es-es/snk-simple-crud.msg.js +14 -0
  150. package/dist/collection/lib/message/resources/es-es/snk-simple-form-config.msg.js +16 -0
  151. package/dist/collection/lib/message/resources/es-es/snk-taskbar.msg.js +18 -0
  152. package/dist/collection/lib/message/resources/pt-br/continuousInsertUtils.msg.js +6 -0
  153. package/dist/collection/lib/message/resources/pt-br/crud-utils.msg.js +3 -0
  154. package/dist/collection/lib/message/resources/pt-br/dataFetcher.msg.js +12 -0
  155. package/dist/collection/lib/message/resources/pt-br/dataUnitDataLoaderHelper.msg.js +18 -0
  156. package/dist/collection/lib/message/resources/pt-br/file-viewer.msg.js +9 -0
  157. package/dist/collection/lib/message/resources/pt-br/snk-actions-button.msg.js +29 -0
  158. package/dist/collection/lib/message/resources/pt-br/snk-application.msg.js +27 -0
  159. package/dist/collection/lib/message/resources/pt-br/snk-attach.msg.js +42 -0
  160. package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js +13 -0
  161. package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +35 -0
  162. package/dist/collection/lib/message/resources/pt-br/snk-data-unit.msg.js +40 -0
  163. package/dist/collection/lib/message/resources/pt-br/snk-error-handler.msg.js +17 -0
  164. package/dist/collection/lib/message/resources/pt-br/snk-exporter.msg.js +20 -0
  165. package/dist/collection/lib/message/resources/pt-br/snk-filter-bar.msg.js +71 -0
  166. package/dist/collection/lib/message/resources/pt-br/snk-filter-list.msg.js +3 -0
  167. package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +118 -0
  168. package/dist/collection/lib/message/resources/pt-br/snk-grid.msg.js +41 -0
  169. package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js +10 -0
  170. package/dist/collection/lib/message/resources/pt-br/snk-personalized-filter.msg.js +105 -0
  171. package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +24 -0
  172. package/dist/collection/lib/message/resources/pt-br/snk-simple-crud.msg.js +14 -0
  173. package/dist/collection/lib/message/resources/pt-br/snk-simple-form-config.msg.js +16 -0
  174. package/dist/collection/lib/message/resources/pt-br/snk-taskbar.msg.js +18 -0
  175. package/dist/collection/lib/utils/ContinuousInsertUtils.js +6 -2
  176. package/dist/components/ConfigStorage.js +11 -1
  177. package/dist/components/ContinuousInsertUtils.js +6 -2
  178. package/dist/components/DataFetcher.js +2695 -14
  179. package/dist/components/config-header2.js +2 -2
  180. package/dist/components/dataunit-fetcher.js +22 -21
  181. package/dist/components/field-config2.js +6 -7
  182. package/dist/components/field-item2.js +6 -3
  183. package/dist/components/fields-layout2.js +19 -12
  184. package/dist/components/fields-selector2.js +11 -5
  185. package/dist/components/guides-configurator2.js +14 -3
  186. package/dist/components/pesquisa-tree2.js +9 -4
  187. package/dist/components/snk-actions-button2.js +3 -2
  188. package/dist/components/snk-application2.js +50 -21
  189. package/dist/components/snk-attach2.js +43 -19
  190. package/dist/components/snk-configurator2.js +1 -1
  191. package/dist/components/snk-crud.js +12 -8
  192. package/dist/components/snk-data-unit2.js +6 -22
  193. package/dist/components/snk-detail-view2.js +19 -13
  194. package/dist/components/snk-expression-group2.js +3 -3
  195. package/dist/components/snk-expression-item2.js +18 -17
  196. package/dist/components/snk-filter-bar2.js +21 -32
  197. package/dist/components/snk-filter-item2.js +1 -1
  198. package/dist/components/snk-filter-list.js +1 -1
  199. package/dist/components/snk-filter-modal.js +1 -1
  200. package/dist/components/snk-filter-number.js +3 -1
  201. package/dist/components/snk-filter-period.js +3 -1
  202. package/dist/components/snk-form-config2.js +3 -3
  203. package/dist/components/snk-form.js +2 -29
  204. package/dist/components/snk-grid-config2.js +73 -35
  205. package/dist/components/snk-grid2.js +7 -57
  206. package/dist/components/snk-layout-form-config2.js +7 -1
  207. package/dist/components/snk-personalized-filter2.js +3 -11
  208. package/dist/components/snk-pesquisa2.js +23 -16
  209. package/dist/components/snk-select-box2.js +4 -2
  210. package/dist/components/snk-simple-bar2.js +5 -5
  211. package/dist/components/snk-simple-crud2.js +27 -62
  212. package/dist/components/snk-simple-form-config2.js +7 -1
  213. package/dist/esm/ClientSideExporterProvider-7c2781f4.js +371 -0
  214. package/dist/esm/ConfigStorage-b5a1dba3.js +547 -0
  215. package/dist/esm/DataFetcher-6f6de657.js +9869 -0
  216. package/dist/esm/FormConfigHelper-4e42f0b6.js +247 -0
  217. package/dist/esm/ISave-7ecdca20.js +394 -0
  218. package/dist/esm/SnkFormConfigManager-34fc1dc7.js +215 -0
  219. package/dist/esm/auth-fetcher-7332a9a9.js +32 -0
  220. package/dist/esm/config-header.entry.js +2 -2
  221. package/dist/esm/dataunit-fetcher-f21cbad0.js +1112 -0
  222. package/dist/esm/field-config_2.entry.js +9 -6
  223. package/dist/esm/fields-layout.entry.js +20 -13
  224. package/dist/esm/fields-selector.entry.js +11 -6
  225. package/dist/esm/form-config-fetcher-6ab4e805.js +307 -0
  226. package/dist/esm/guides-configurator.entry.js +14 -3
  227. package/dist/esm/loader.js +1 -1
  228. package/dist/esm/pesquisa-grid_2.entry.js +12 -8
  229. package/dist/esm/sankhyablocks.js +1 -1
  230. package/dist/esm/snk-actions-button_8.entry.js +95 -45
  231. package/dist/esm/snk-application.entry.js +54 -26
  232. package/dist/esm/snk-attach.entry.js +46 -23
  233. package/dist/esm/snk-configurator.entry.js +1 -1
  234. package/dist/esm/snk-crud.entry.js +17 -13
  235. package/dist/esm/snk-data-exporter.entry.js +5 -6
  236. package/dist/esm/snk-data-unit-b7e6e7a6.js +919 -0
  237. package/dist/esm/snk-data-unit.entry.js +3 -4
  238. package/dist/esm/snk-detail-view.entry.js +21 -15
  239. package/dist/esm/snk-expression-group_2.entry.js +21 -20
  240. package/dist/esm/snk-filter-bar_4.entry.js +27 -37
  241. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  242. package/dist/esm/snk-filter-number.entry.js +3 -1
  243. package/dist/esm/snk-filter-period.entry.js +3 -1
  244. package/dist/esm/snk-form_2.entry.js +10 -36
  245. package/dist/esm/snk-grid.entry.js +13 -61
  246. package/dist/esm/snk-guides-viewer-fbfece85.js +600 -0
  247. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  248. package/dist/esm/snk-personalized-filter.entry.js +6 -14
  249. package/dist/esm/snk-pesquisa.entry.js +27 -20
  250. package/dist/esm/snk-simple-bar.entry.js +5 -5
  251. package/dist/esm/snk-simple-crud.entry.js +34 -69
  252. package/dist/sankhyablocks/p-012208e0.entry.js +1 -0
  253. package/dist/sankhyablocks/p-07b14811.entry.js +1 -0
  254. package/dist/sankhyablocks/p-0dac8fef.js +1 -0
  255. package/dist/sankhyablocks/p-0e495575.js +1 -0
  256. package/dist/sankhyablocks/p-11346b8d.entry.js +1 -0
  257. package/dist/sankhyablocks/p-1210500e.js +1 -0
  258. package/dist/sankhyablocks/p-158adf33.entry.js +1 -0
  259. package/dist/sankhyablocks/p-16fc4acd.js +1 -0
  260. package/dist/sankhyablocks/p-3dba3468.js +56 -0
  261. package/dist/sankhyablocks/p-4872dc3a.entry.js +1 -0
  262. package/dist/sankhyablocks/p-4e63ffed.entry.js +1 -0
  263. package/dist/sankhyablocks/p-5bab470d.entry.js +1 -0
  264. package/dist/sankhyablocks/p-5c7af8a9.entry.js +1 -0
  265. package/dist/sankhyablocks/p-5e282b33.entry.js +1 -0
  266. package/dist/sankhyablocks/p-6703336d.entry.js +1 -0
  267. package/dist/sankhyablocks/p-6a015ba2.js +1 -0
  268. package/dist/sankhyablocks/p-735a1175.entry.js +1 -0
  269. package/dist/sankhyablocks/p-75af335e.entry.js +1 -0
  270. package/dist/sankhyablocks/p-7b3ca294.entry.js +1 -0
  271. package/dist/sankhyablocks/p-81769310.entry.js +11 -0
  272. package/dist/sankhyablocks/p-8d1508aa.entry.js +1 -0
  273. package/dist/sankhyablocks/p-8f73da95.js +1 -0
  274. package/dist/sankhyablocks/p-a5108625.entry.js +1 -0
  275. package/dist/sankhyablocks/p-a86eee47.entry.js +1 -0
  276. package/dist/sankhyablocks/p-ad2ae575.entry.js +1 -0
  277. package/dist/sankhyablocks/p-b35574b5.js +60 -0
  278. package/dist/sankhyablocks/p-b49281be.entry.js +1 -0
  279. package/dist/sankhyablocks/p-ba4979b4.js +6 -0
  280. package/dist/sankhyablocks/p-c6331595.js +26 -0
  281. package/dist/sankhyablocks/p-c9e6d720.js +1 -0
  282. package/dist/sankhyablocks/p-d377aa7a.entry.js +1 -0
  283. package/dist/sankhyablocks/p-eacff4b7.entry.js +1 -0
  284. package/dist/sankhyablocks/p-eb0616d3.entry.js +1 -0
  285. package/dist/sankhyablocks/p-f39b0ebe.entry.js +1 -0
  286. package/dist/sankhyablocks/p-f8f29e1a.entry.js +1 -0
  287. package/dist/sankhyablocks/p-fa18530e.entry.js +1 -0
  288. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  289. package/dist/types/components/snk-application/errorhandler/snk-error-handler.d.ts +1 -0
  290. package/dist/types/components/snk-application/search-strategy/exec-prepared-search-plus.d.ts +2 -2
  291. package/dist/types/components/snk-application/snk-application.d.ts +20 -9
  292. package/dist/types/components/snk-attach/interfaces/ICrudConfig.d.ts +1 -1
  293. package/dist/types/components/snk-attach/snk-attach.d.ts +5 -0
  294. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +1 -1
  295. package/dist/types/components/snk-crud/snk-crud.d.ts +1 -0
  296. package/dist/types/components/snk-crud/subcomponents/GuideBuilder.d.ts +4 -1
  297. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +3 -52
  298. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +1 -0
  299. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
  300. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +28 -45
  301. package/dist/types/components/snk-form/snk-form.d.ts +4 -29
  302. package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +1 -1
  303. package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +3 -1
  304. package/dist/types/components/snk-form-config/fields-selector/fields-selector.d.ts +3 -0
  305. package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +2 -0
  306. package/dist/types/components/snk-grid/snk-grid.d.ts +46 -105
  307. package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +7 -0
  308. package/dist/types/components/snk-grid-config/snk-select-box/snk-select-box.d.ts +4 -0
  309. package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +3 -0
  310. package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +5 -53
  311. package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +1 -0
  312. package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +6 -0
  313. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +3 -0
  314. package/dist/types/components/snk-simple-bar/snk-simple-bar.d.ts +15 -15
  315. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +45 -101
  316. package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +6 -0
  317. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +21 -23
  318. package/dist/types/components.d.ts +268 -520
  319. package/dist/types/lib/configs/ConfigStorage.d.ts +1 -0
  320. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +2 -0
  321. package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +3 -2
  322. package/dist/types/lib/message/SnkMessageBuilder.d.ts +11 -1
  323. package/dist/types/lib/message/resources/en-us/continuousInsertUtils.msg.d.ts +1 -0
  324. package/dist/types/lib/message/resources/en-us/crud-utils.msg.d.ts +1 -0
  325. package/dist/types/lib/message/resources/en-us/dataFetcher.msg.d.ts +1 -0
  326. package/dist/types/lib/message/resources/en-us/dataUnitDataLoaderHelper.msg.d.ts +1 -0
  327. package/dist/types/lib/message/resources/en-us/file-viewer.msg.d.ts +1 -0
  328. package/dist/types/lib/message/resources/en-us/snk-application.msg.d.ts +1 -0
  329. package/dist/types/lib/message/resources/en-us/snk-attach.msg.d.ts +1 -0
  330. package/dist/types/lib/message/resources/en-us/snk-crud.msg.d.ts +1 -0
  331. package/dist/types/lib/message/resources/en-us/snk-data-unit.msg.d.ts +1 -0
  332. package/dist/types/lib/message/resources/en-us/snk-error-handler.msg.d.ts +1 -0
  333. package/dist/types/lib/message/resources/en-us/snk-exporter.msg.d.ts +1 -0
  334. package/dist/types/lib/message/resources/en-us/snk-filter-bar.msg.d.ts +1 -0
  335. package/dist/types/lib/message/resources/en-us/snk-filter-list.msg.d.ts +1 -0
  336. package/dist/types/lib/message/resources/en-us/snk-layout-form-config.msg.d.ts +1 -0
  337. package/dist/types/lib/message/resources/en-us/snk-pesquisa.msg.d.ts +1 -0
  338. package/dist/types/lib/message/resources/en-us/snk-simple-crud.msg.d.ts +1 -0
  339. package/dist/types/lib/message/resources/en-us/snk-simple-form-config.msg.d.ts +1 -0
  340. package/dist/types/lib/message/resources/en-us/snk-taskbar.msg.d.ts +1 -0
  341. package/dist/types/lib/message/resources/es-es/continuousInsertUtils.msg.d.ts +1 -0
  342. package/dist/types/lib/message/resources/es-es/crud-utils.msg.d.ts +1 -0
  343. package/dist/types/lib/message/resources/es-es/dataFetcher.msg.d.ts +1 -0
  344. package/dist/types/lib/message/resources/es-es/dataUnitDataLoaderHelper.msg.d.ts +1 -0
  345. package/dist/types/lib/message/resources/es-es/file-viewer.msg.d.ts +1 -0
  346. package/dist/types/lib/message/resources/es-es/snk-actions-button.msg.d.ts +1 -0
  347. package/dist/types/lib/message/resources/es-es/snk-application.msg.d.ts +1 -0
  348. package/dist/types/lib/message/resources/es-es/snk-attach.msg.d.ts +1 -0
  349. package/dist/types/lib/message/resources/es-es/snk-configurator.msg.d.ts +1 -0
  350. package/dist/types/lib/message/resources/es-es/snk-crud.msg.d.ts +1 -0
  351. package/dist/types/lib/message/resources/es-es/snk-data-exporter.msg.d.ts +1 -0
  352. package/dist/types/lib/message/resources/es-es/snk-data-unit.msg.d.ts +1 -0
  353. package/dist/types/lib/message/resources/es-es/snk-entity-list.msg.d.ts +1 -0
  354. package/dist/types/lib/message/resources/es-es/snk-error-handler.msg.d.ts +1 -0
  355. package/dist/types/lib/message/resources/es-es/snk-exporter.msg.d.ts +1 -0
  356. package/dist/types/lib/message/resources/es-es/snk-filter-bar.msg.d.ts +1 -0
  357. package/dist/types/lib/message/resources/es-es/snk-filter-field-search.msg.d.ts +1 -0
  358. package/dist/types/lib/message/resources/es-es/snk-filter-list.msg.d.ts +1 -0
  359. package/dist/types/lib/message/resources/es-es/snk-filter-param-config.msg.d.ts +1 -0
  360. package/dist/types/lib/message/resources/es-es/snk-form.msg.d.ts +4 -0
  361. package/dist/types/lib/message/resources/es-es/snk-grid.msg.d.ts +2 -0
  362. package/dist/types/lib/message/resources/es-es/snk-layout-form-config.msg.d.ts +1 -0
  363. package/dist/types/lib/message/resources/es-es/snk-personalized-filter.msg.d.ts +1 -0
  364. package/dist/types/lib/message/resources/es-es/snk-pesquisa.msg.d.ts +1 -0
  365. package/dist/types/lib/message/resources/es-es/snk-print-selector.msg.d.ts +1 -0
  366. package/dist/types/lib/message/resources/es-es/snk-simple-bar.msg.d.ts +1 -0
  367. package/dist/types/lib/message/resources/es-es/snk-simple-crud.msg.d.ts +1 -0
  368. package/dist/types/lib/message/resources/es-es/snk-simple-form-config.msg.d.ts +1 -0
  369. package/dist/types/lib/message/resources/es-es/snk-taskbar.msg.d.ts +1 -0
  370. package/dist/types/lib/message/resources/pt-br/continuousInsertUtils.msg.d.ts +1 -0
  371. package/dist/types/lib/message/resources/pt-br/crud-utils.msg.d.ts +1 -0
  372. package/dist/types/lib/message/resources/pt-br/dataFetcher.msg.d.ts +1 -0
  373. package/dist/types/lib/message/resources/pt-br/dataUnitDataLoaderHelper.msg.d.ts +1 -0
  374. package/dist/types/lib/message/resources/pt-br/file-viewer.msg.d.ts +1 -0
  375. package/dist/types/lib/message/resources/pt-br/snk-actions-button.msg.d.ts +1 -0
  376. package/dist/types/lib/message/resources/pt-br/snk-application.msg.d.ts +1 -0
  377. package/dist/types/lib/message/resources/pt-br/snk-attach.msg.d.ts +1 -0
  378. package/dist/types/lib/message/resources/pt-br/snk-configurator.msg.d.ts +1 -0
  379. package/dist/types/lib/message/resources/pt-br/snk-crud.msg.d.ts +1 -0
  380. package/dist/types/lib/message/resources/pt-br/snk-data-exporter.msg.d.ts +1 -0
  381. package/dist/types/lib/message/resources/pt-br/snk-data-unit.msg.d.ts +1 -0
  382. package/dist/types/lib/message/resources/pt-br/snk-entity-list.msg.d.ts +1 -0
  383. package/dist/types/lib/message/resources/pt-br/snk-error-handler.msg.d.ts +1 -0
  384. package/dist/types/lib/message/resources/pt-br/snk-exporter.msg.d.ts +1 -0
  385. package/dist/types/lib/message/resources/pt-br/snk-filter-bar.msg.d.ts +1 -0
  386. package/dist/types/lib/message/resources/pt-br/snk-filter-field-search.msg.d.ts +1 -0
  387. package/dist/types/lib/message/resources/pt-br/snk-filter-list.msg.d.ts +1 -0
  388. package/dist/types/lib/message/resources/pt-br/snk-filter-param-config.msg.d.ts +1 -0
  389. package/dist/types/lib/message/resources/pt-br/snk-form.msg.d.ts +4 -0
  390. package/dist/types/lib/message/resources/pt-br/snk-grid.msg.d.ts +2 -0
  391. package/dist/types/lib/message/resources/pt-br/snk-layout-form-config.msg.d.ts +1 -0
  392. package/dist/types/lib/message/resources/pt-br/snk-personalized-filter.msg.d.ts +1 -0
  393. package/dist/types/lib/message/resources/pt-br/snk-pesquisa.msg.d.ts +1 -0
  394. package/dist/types/lib/message/resources/pt-br/snk-print-selector.msg.d.ts +1 -0
  395. package/dist/types/lib/message/resources/pt-br/snk-simple-bar.msg.d.ts +1 -0
  396. package/dist/types/lib/message/resources/pt-br/snk-simple-crud.msg.d.ts +1 -0
  397. package/dist/types/lib/message/resources/pt-br/snk-simple-form-config.msg.d.ts +1 -0
  398. package/dist/types/lib/message/resources/pt-br/snk-taskbar.msg.d.ts +1 -0
  399. package/dist/types/lib/utils/ContinuousInsertUtils.d.ts +1 -0
  400. package/package.json +3 -4
  401. package/dist/cjs/AuthorizationConfig-79ffae4b.js.gz +0 -0
  402. package/dist/cjs/ClientSideExporterProvider-6a4108c9.js +0 -378
  403. package/dist/cjs/ClientSideExporterProvider-6a4108c9.js.gz +0 -0
  404. package/dist/cjs/ConfigStorage-34aa43d8.js +0 -540
  405. package/dist/cjs/ConfigStorage-34aa43d8.js.gz +0 -0
  406. package/dist/cjs/DataFetcher-e23a263b.js +0 -7192
  407. package/dist/cjs/DataFetcher-e23a263b.js.gz +0 -0
  408. package/dist/cjs/FormConfigHelper-c664dbae.js +0 -260
  409. package/dist/cjs/FormConfigHelper-c664dbae.js.gz +0 -0
  410. package/dist/cjs/GetSelectedRecordsIDsInfo-bd50caf1.js.gz +0 -0
  411. package/dist/cjs/IFetchDataExporterParams-e78ec415.js.gz +0 -0
  412. package/dist/cjs/ISave-e0be2362.js +0 -397
  413. package/dist/cjs/ISave-e0be2362.js.gz +0 -0
  414. package/dist/cjs/ParamType-90b440a0.js.gz +0 -0
  415. package/dist/cjs/PersonalizedFilterUtils-7259cf65.js.gz +0 -0
  416. package/dist/cjs/PrintUtils-bcaeb82f.js.gz +0 -0
  417. package/dist/cjs/ResourceIDUtils-5ff86aa7.js.gz +0 -0
  418. package/dist/cjs/SnkFormConfigManager-d0c45bd5.js +0 -217
  419. package/dist/cjs/SnkFormConfigManager-d0c45bd5.js.gz +0 -0
  420. package/dist/cjs/SnkMessageBuilder-221cc88d.js +0 -731
  421. package/dist/cjs/SnkMessageBuilder-221cc88d.js.gz +0 -0
  422. package/dist/cjs/auth-fetcher-8670a38f.js +0 -34
  423. package/dist/cjs/auth-fetcher-8670a38f.js.gz +0 -0
  424. package/dist/cjs/config-header.cjs.entry.js.gz +0 -0
  425. package/dist/cjs/configs-button.cjs.entry.js.gz +0 -0
  426. package/dist/cjs/constants-6d82e405.js.gz +0 -0
  427. package/dist/cjs/dataunit-fetcher-c34a8217.js +0 -1121
  428. package/dist/cjs/dataunit-fetcher-c34a8217.js.gz +0 -0
  429. package/dist/cjs/default-filters-a09bf82b.js.gz +0 -0
  430. package/dist/cjs/field-config_2.cjs.entry.js.gz +0 -0
  431. package/dist/cjs/fields-layout.cjs.entry.js.gz +0 -0
  432. package/dist/cjs/fields-selector.cjs.entry.js.gz +0 -0
  433. package/dist/cjs/filter-item-type.enum-a7ffdaa6.js.gz +0 -0
  434. package/dist/cjs/filter-type.enum-2bb46d2a.js.gz +0 -0
  435. package/dist/cjs/filterNumberVariation-d65332da.js.gz +0 -0
  436. package/dist/cjs/form-config-fetcher-d8b78403.js +0 -310
  437. package/dist/cjs/form-config-fetcher-d8b78403.js.gz +0 -0
  438. package/dist/cjs/guides-configurator.cjs.entry.js.gz +0 -0
  439. package/dist/cjs/index-0ad2baeb.js.gz +0 -0
  440. package/dist/cjs/index-1cf293c1.js.gz +0 -0
  441. package/dist/cjs/index-62760a9c.js.gz +0 -0
  442. package/dist/cjs/index-8d94b7e0.js.gz +0 -0
  443. package/dist/cjs/index-e3e39724.js.gz +0 -0
  444. package/dist/cjs/index.cjs.js.gz +0 -0
  445. package/dist/cjs/loader.cjs.js.gz +0 -0
  446. package/dist/cjs/pesquisa-grid_2.cjs.entry.js.gz +0 -0
  447. package/dist/cjs/presentationMode-52ec3bdd.js.gz +0 -0
  448. package/dist/cjs/sankhyablocks.cjs.js.gz +0 -0
  449. package/dist/cjs/snk-actions-button_8.cjs.entry.js.gz +0 -0
  450. package/dist/cjs/snk-actions-form.cjs.entry.js.gz +0 -0
  451. package/dist/cjs/snk-application.cjs.entry.js.gz +0 -0
  452. package/dist/cjs/snk-attach.cjs.entry.js.gz +0 -0
  453. package/dist/cjs/snk-client-confirm.cjs.entry.js.gz +0 -0
  454. package/dist/cjs/snk-configurator.cjs.entry.js.gz +0 -0
  455. package/dist/cjs/snk-crud.cjs.entry.js.gz +0 -0
  456. package/dist/cjs/snk-custom-slot-elements.cjs.entry.js.gz +0 -0
  457. package/dist/cjs/snk-data-exporter.cjs.entry.js.gz +0 -0
  458. package/dist/cjs/snk-data-unit-49743afb.js +0 -937
  459. package/dist/cjs/snk-data-unit-49743afb.js.gz +0 -0
  460. package/dist/cjs/snk-data-unit.cjs.entry.js.gz +0 -0
  461. package/dist/cjs/snk-default-filter.cjs.entry.js.gz +0 -0
  462. package/dist/cjs/snk-detail-view.cjs.entry.js.gz +0 -0
  463. package/dist/cjs/snk-entity-list.cjs.entry.js.gz +0 -0
  464. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js.gz +0 -0
  465. package/dist/cjs/snk-expression-group_2.cjs.entry.js.gz +0 -0
  466. package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js.gz +0 -0
  467. package/dist/cjs/snk-filter-bar_4.cjs.entry.js.gz +0 -0
  468. package/dist/cjs/snk-filter-binary-select.cjs.entry.js.gz +0 -0
  469. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js.gz +0 -0
  470. package/dist/cjs/snk-filter-detail.cjs.entry.js.gz +0 -0
  471. package/dist/cjs/snk-filter-field-search_2.cjs.entry.js.gz +0 -0
  472. package/dist/cjs/snk-filter-modal-item.cjs.entry.js.gz +0 -0
  473. package/dist/cjs/snk-filter-multi-select.cjs.entry.js.gz +0 -0
  474. package/dist/cjs/snk-filter-number.cjs.entry.js.gz +0 -0
  475. package/dist/cjs/snk-filter-period.cjs.entry.js.gz +0 -0
  476. package/dist/cjs/snk-filter-search.cjs.entry.js.gz +0 -0
  477. package/dist/cjs/snk-filter-text.cjs.entry.js.gz +0 -0
  478. package/dist/cjs/snk-form-summary.cjs.entry.js.gz +0 -0
  479. package/dist/cjs/snk-form-view.cjs.entry.js.gz +0 -0
  480. package/dist/cjs/snk-form_2.cjs.entry.js.gz +0 -0
  481. package/dist/cjs/snk-grid.cjs.entry.js.gz +0 -0
  482. package/dist/cjs/snk-guides-viewer-9d70fa11.js +0 -602
  483. package/dist/cjs/snk-guides-viewer-9d70fa11.js.gz +0 -0
  484. package/dist/cjs/snk-guides-viewer.cjs.entry.js.gz +0 -0
  485. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js.gz +0 -0
  486. package/dist/cjs/snk-personalized-filter.cjs.entry.js.gz +0 -0
  487. package/dist/cjs/snk-pesquisa.cjs.entry.js.gz +0 -0
  488. package/dist/cjs/snk-print-selector.cjs.entry.js.gz +0 -0
  489. package/dist/cjs/snk-simple-bar.cjs.entry.js.gz +0 -0
  490. package/dist/cjs/snk-simple-crud.cjs.entry.js.gz +0 -0
  491. package/dist/cjs/snk-taskbar.cjs.entry.js.gz +0 -0
  492. package/dist/cjs/sortable.esm-9a110bb7.js.gz +0 -0
  493. package/dist/cjs/taskbar-elements-3b74cd21.js.gz +0 -0
  494. package/dist/cjs/taskbar-processor-2fba34a8.js.gz +0 -0
  495. package/dist/cjs/teste-pesquisa.cjs.entry.js.gz +0 -0
  496. package/dist/collection/components/snk-actions-button/actions/enum/ActionsType.js.gz +0 -0
  497. package/dist/collection/components/snk-actions-button/actions/enum/ParamType.js.gz +0 -0
  498. package/dist/collection/components/snk-actions-button/actions/enum/RefreshType.js.gz +0 -0
  499. package/dist/collection/components/snk-actions-button/actions/executor/java.executor.js.gz +0 -0
  500. package/dist/collection/components/snk-actions-button/actions/executor/javascript.executor.js.gz +0 -0
  501. package/dist/collection/components/snk-actions-button/actions/executor/launch-screen.executor.js.gz +0 -0
  502. package/dist/collection/components/snk-actions-button/actions/executor/procedure.executor.js.gz +0 -0
  503. package/dist/collection/components/snk-actions-button/actions/factory/executor.factory.js.gz +0 -0
  504. package/dist/collection/components/snk-actions-button/actions/index.js.gz +0 -0
  505. package/dist/collection/components/snk-actions-button/actions/interfaces/IAction.js.gz +0 -0
  506. package/dist/collection/components/snk-actions-button/actions/interfaces/IExecSource.js.gz +0 -0
  507. package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActions.js.gz +0 -0
  508. package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActionsProps.js.gz +0 -0
  509. package/dist/collection/components/snk-actions-button/actions/interfaces/IResultParam.js.gz +0 -0
  510. package/dist/collection/components/snk-actions-button/clientEvent/index.js.gz +0 -0
  511. package/dist/collection/components/snk-actions-button/clientEvent/interfaces/IClientEventConfirm.js.gz +0 -0
  512. package/dist/collection/components/snk-actions-button/interfaces/index.js.gz +0 -0
  513. package/dist/collection/components/snk-actions-button/snk-actions-button.css.gz +0 -0
  514. package/dist/collection/components/snk-actions-button/snk-actions-button.js.gz +0 -0
  515. package/dist/collection/components/snk-actions-button/subcomponents/snk-actions-form.js.gz +0 -0
  516. package/dist/collection/components/snk-actions-button/subcomponents/snk-client-confirm.js.gz +0 -0
  517. package/dist/collection/components/snk-application/__mocks__/snk-application.js.gz +0 -0
  518. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js.gz +0 -0
  519. package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js.gz +0 -0
  520. package/dist/collection/components/snk-application/request-listener/RequestListenerFactory.js.gz +0 -0
  521. package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js.gz +0 -0
  522. package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js.gz +0 -0
  523. package/dist/collection/components/snk-application/snk-application.css.gz +0 -0
  524. package/dist/collection/components/snk-application/snk-application.js.gz +0 -0
  525. package/dist/collection/components/snk-attach/interfaces/ICrudConfig.js.gz +0 -0
  526. package/dist/collection/components/snk-attach/interfaces/TFetcherType.js.gz +0 -0
  527. package/dist/collection/components/snk-attach/interfaces/index.js.gz +0 -0
  528. package/dist/collection/components/snk-attach/snk-attach.css.gz +0 -0
  529. package/dist/collection/components/snk-attach/snk-attach.js.gz +0 -0
  530. package/dist/collection/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.js.gz +0 -0
  531. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js.gz +0 -0
  532. package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js.gz +0 -0
  533. package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js.gz +0 -0
  534. package/dist/collection/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.js.gz +0 -0
  535. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js.gz +0 -0
  536. package/dist/collection/components/snk-attach/structure/index.js.gz +0 -0
  537. package/dist/collection/components/snk-configurator/AuthorizationConfig.js.gz +0 -0
  538. package/dist/collection/components/snk-configurator/snk-configurator.css.gz +0 -0
  539. package/dist/collection/components/snk-configurator/snk-configurator.js.gz +0 -0
  540. package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js.gz +0 -0
  541. package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js.gz +0 -0
  542. package/dist/collection/components/snk-crud/snk-crud.css.gz +0 -0
  543. package/dist/collection/components/snk-crud/snk-crud.js.gz +0 -0
  544. package/dist/collection/components/snk-crud/subcomponents/CardFormResizeObserver.js.gz +0 -0
  545. package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js.gz +0 -0
  546. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css.gz +0 -0
  547. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js.gz +0 -0
  548. package/dist/collection/components/snk-crud/subcomponents/snk-form-summary.css.gz +0 -0
  549. package/dist/collection/components/snk-crud/subcomponents/snk-form-summary.js.gz +0 -0
  550. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.css.gz +0 -0
  551. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js.gz +0 -0
  552. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css.gz +0 -0
  553. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js.gz +0 -0
  554. package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.css.gz +0 -0
  555. package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.js.gz +0 -0
  556. package/dist/collection/components/snk-data-exporter/data/attachment.js.gz +0 -0
  557. package/dist/collection/components/snk-data-exporter/data/email.js.gz +0 -0
  558. package/dist/collection/components/snk-data-exporter/data/export-config.js.gz +0 -0
  559. package/dist/collection/components/snk-data-exporter/data/export-result.js.gz +0 -0
  560. package/dist/collection/components/snk-data-exporter/data/report.js.gz +0 -0
  561. package/dist/collection/components/snk-data-exporter/exporter-email-sender/email-info-step.js.gz +0 -0
  562. package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js.gz +0 -0
  563. package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js.gz +0 -0
  564. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js.gz +0 -0
  565. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js.gz +0 -0
  566. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js.gz +0 -0
  567. package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js.gz +0 -0
  568. package/dist/collection/components/snk-data-exporter/interfaces/IRecordID.js.gz +0 -0
  569. package/dist/collection/components/snk-data-exporter/interfaces/ISelectedID.js.gz +0 -0
  570. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js.gz +0 -0
  571. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js.gz +0 -0
  572. package/dist/collection/components/snk-data-exporter/snk-data-exporter.css.gz +0 -0
  573. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js.gz +0 -0
  574. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js.gz +0 -0
  575. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js.gz +0 -0
  576. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js.gz +0 -0
  577. package/dist/collection/components/snk-data-unit/MultipleUpdateHelper.js.gz +0 -0
  578. package/dist/collection/components/snk-data-unit/snk-data-unit.js.gz +0 -0
  579. package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js.gz +0 -0
  580. package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js.gz +0 -0
  581. package/dist/collection/components/snk-entity-list/snk-entity-list.css.gz +0 -0
  582. package/dist/collection/components/snk-entity-list/snk-entity-list.js.gz +0 -0
  583. package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js.gz +0 -0
  584. package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/filterNumberVariation.js.gz +0 -0
  585. package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/presentationMode.js.gz +0 -0
  586. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js.gz +0 -0
  587. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js.gz +0 -0
  588. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js.gz +0 -0
  589. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js.gz +0 -0
  590. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js.gz +0 -0
  591. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js.gz +0 -0
  592. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js.gz +0 -0
  593. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.css.gz +0 -0
  594. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js.gz +0 -0
  595. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.js.gz +0 -0
  596. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js.gz +0 -0
  597. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js.gz +0 -0
  598. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css.gz +0 -0
  599. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js.gz +0 -0
  600. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js.gz +0 -0
  601. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css.gz +0 -0
  602. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js.gz +0 -0
  603. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.css.gz +0 -0
  604. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.js.gz +0 -0
  605. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.css.gz +0 -0
  606. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js.gz +0 -0
  607. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css.gz +0 -0
  608. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js.gz +0 -0
  609. package/dist/collection/components/snk-filter-bar/types/custom-element-filter.js.gz +0 -0
  610. package/dist/collection/components/snk-filter-bar/types/default-filters.js.gz +0 -0
  611. package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js.gz +0 -0
  612. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js.gz +0 -0
  613. package/dist/collection/components/snk-filter-bar/utils/filters-mock.js.gz +0 -0
  614. package/dist/collection/components/snk-filter-field-search/interfaces/index.js.gz +0 -0
  615. package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.css.gz +0 -0
  616. package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.js.gz +0 -0
  617. package/dist/collection/components/snk-filter-field-search/subcomponents/index.js.gz +0 -0
  618. package/dist/collection/components/snk-filter-field-search/subcomponents/list-item.js.gz +0 -0
  619. package/dist/collection/components/snk-form/snk-form.css.gz +0 -0
  620. package/dist/collection/components/snk-form/snk-form.js.gz +0 -0
  621. package/dist/collection/components/snk-form-config/FormConfigHelper.js.gz +0 -0
  622. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js.gz +0 -0
  623. package/dist/collection/components/snk-form-config/config-header/config-header.css.gz +0 -0
  624. package/dist/collection/components/snk-form-config/config-header/config-header.js.gz +0 -0
  625. package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.css.gz +0 -0
  626. package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.js.gz +0 -0
  627. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css.gz +0 -0
  628. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.js.gz +0 -0
  629. package/dist/collection/components/snk-form-config/field-item/field-item.css.gz +0 -0
  630. package/dist/collection/components/snk-form-config/field-item/field-item.js.gz +0 -0
  631. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css.gz +0 -0
  632. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js.gz +0 -0
  633. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.css.gz +0 -0
  634. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js.gz +0 -0
  635. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css.gz +0 -0
  636. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js.gz +0 -0
  637. package/dist/collection/components/snk-form-config/snk-form-config.css.gz +0 -0
  638. package/dist/collection/components/snk-form-config/snk-form-config.js.gz +0 -0
  639. package/dist/collection/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.js.gz +0 -0
  640. package/dist/collection/components/snk-grid/snk-grid.css.gz +0 -0
  641. package/dist/collection/components/snk-grid/snk-grid.js.gz +0 -0
  642. package/dist/collection/components/snk-grid-config/snk-grid-config.css.gz +0 -0
  643. package/dist/collection/components/snk-grid-config/snk-grid-config.js.gz +0 -0
  644. package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.css.gz +0 -0
  645. package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.js.gz +0 -0
  646. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.css.gz +0 -0
  647. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js.gz +0 -0
  648. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.css.gz +0 -0
  649. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js.gz +0 -0
  650. package/dist/collection/components/snk-personalized-filter/interfaces/IExpressionGroup.js.gz +0 -0
  651. package/dist/collection/components/snk-personalized-filter/interfaces/IExpressionItem.js.gz +0 -0
  652. package/dist/collection/components/snk-personalized-filter/interfaces/IParameter.js.gz +0 -0
  653. package/dist/collection/components/snk-personalized-filter/interfaces/IPersonalizedFilter.js.gz +0 -0
  654. package/dist/collection/components/snk-personalized-filter/interfaces/ISystemFilterConfig.js.gz +0 -0
  655. package/dist/collection/components/snk-personalized-filter/interfaces/IUserFilterConfig.js.gz +0 -0
  656. package/dist/collection/components/snk-personalized-filter/interfaces/index.js.gz +0 -0
  657. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.css.gz +0 -0
  658. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js.gz +0 -0
  659. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css.gz +0 -0
  660. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js.gz +0 -0
  661. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js.gz +0 -0
  662. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.css.gz +0 -0
  663. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js.gz +0 -0
  664. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.css.gz +0 -0
  665. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.js.gz +0 -0
  666. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.css.gz +0 -0
  667. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js.gz +0 -0
  668. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.css.gz +0 -0
  669. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js.gz +0 -0
  670. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js.gz +0 -0
  671. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css.gz +0 -0
  672. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js.gz +0 -0
  673. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css.gz +0 -0
  674. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js.gz +0 -0
  675. package/dist/collection/components/snk-pesquisa/pesquisaHelper.js.gz +0 -0
  676. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css.gz +0 -0
  677. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js.gz +0 -0
  678. package/dist/collection/components/snk-print-selector/snk-print-selector.css.gz +0 -0
  679. package/dist/collection/components/snk-print-selector/snk-print-selector.js.gz +0 -0
  680. package/dist/collection/components/snk-simple-bar/snk-simple-bar.css.gz +0 -0
  681. package/dist/collection/components/snk-simple-bar/snk-simple-bar.js.gz +0 -0
  682. package/dist/collection/components/snk-simple-crud/regular-buttons.js.gz +0 -0
  683. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css.gz +0 -0
  684. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js.gz +0 -0
  685. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css.gz +0 -0
  686. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js.gz +0 -0
  687. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css.gz +0 -0
  688. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js.gz +0 -0
  689. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js.gz +0 -0
  690. package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.css.gz +0 -0
  691. package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js.gz +0 -0
  692. package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js.gz +0 -0
  693. package/dist/collection/components/snk-taskbar/snk-taskbar.css.gz +0 -0
  694. package/dist/collection/components/snk-taskbar/snk-taskbar.js.gz +0 -0
  695. package/dist/collection/components/teste-pesquisa/teste-pesquisa.css.gz +0 -0
  696. package/dist/collection/components/teste-pesquisa/teste-pesquisa.js.gz +0 -0
  697. package/dist/collection/index.js.gz +0 -0
  698. package/dist/collection/lib/@types/index.js.gz +0 -0
  699. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js.gz +0 -0
  700. package/dist/collection/lib/applet-caller/applet-caller.js.gz +0 -0
  701. package/dist/collection/lib/auth/mgeauthorization.module.js.gz +0 -0
  702. package/dist/collection/lib/configs/ConfigStorage.js.gz +0 -0
  703. package/dist/collection/lib/configs/LayoutFormConfig.js.gz +0 -0
  704. package/dist/collection/lib/dataUnit/InMemoryLoader.js.gz +0 -0
  705. package/dist/collection/lib/dataUnit/ValueFormatter.js.gz +0 -0
  706. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js.gz +0 -0
  707. package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js.gz +0 -0
  708. package/dist/collection/lib/http/data-fetcher/DataFetcher.js.gz +0 -0
  709. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js.gz +0 -0
  710. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js.gz +0 -0
  711. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js.gz +0 -0
  712. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js.gz +0 -0
  713. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js.gz +0 -0
  714. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js.gz +0 -0
  715. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/ISave.js.gz +0 -0
  716. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/index.js.gz +0 -0
  717. package/dist/collection/lib/http/data-fetcher/fetchers/application-config-fetcher.js.gz +0 -0
  718. package/dist/collection/lib/http/data-fetcher/fetchers/auth-fetcher.js.gz +0 -0
  719. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js.gz +0 -0
  720. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js.gz +0 -0
  721. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js.gz +0 -0
  722. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js.gz +0 -0
  723. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js.gz +0 -0
  724. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js.gz +0 -0
  725. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataResult.js.gz +0 -0
  726. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataStrategy.js.gz +0 -0
  727. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadingInfo.js.gz +0 -0
  728. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRecordField.js.gz +0 -0
  729. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IResponseRecord.js.gz +0 -0
  730. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js.gz +0 -0
  731. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DataUnitStrategy.js.gz +0 -0
  732. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js.gz +0 -0
  733. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js.gz +0 -0
  734. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.js.gz +0 -0
  735. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.js.gz +0 -0
  736. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterResponse.js.gz +0 -0
  737. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IPersonalizedReport.js.gz +0 -0
  738. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/permission-export-pdf.js.gz +0 -0
  739. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher.js.gz +0 -0
  740. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js.gz +0 -0
  741. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js.gz +0 -0
  742. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js.gz +0 -0
  743. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js.gz +0 -0
  744. package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js.gz +0 -0
  745. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js.gz +0 -0
  746. package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js.gz +0 -0
  747. package/dist/collection/lib/http/data-fetcher/fetchers/totals-fetcher.js.gz +0 -0
  748. package/dist/collection/lib/http/data-fetcher/interfaces/IClientEventResponse.js.gz +0 -0
  749. package/dist/collection/lib/http/data-fetcher/recaller/GraphQLRecaller.js.gz +0 -0
  750. package/dist/collection/lib/http/data-fetcher/recaller/IDataFetcherRecaller.js.gz +0 -0
  751. package/dist/collection/lib/http/data-fetcher/recaller/ServiceBrokerRecaller.js.gz +0 -0
  752. package/dist/collection/lib/http/data-fetcher/state/LoadStateManager.js.gz +0 -0
  753. package/dist/collection/lib/index.js.gz +0 -0
  754. package/dist/collection/lib/message/SnkMessageBuilder.js.gz +0 -0
  755. package/dist/collection/lib/message/resources/crud-utils.msg.js +0 -4
  756. package/dist/collection/lib/message/resources/crud-utils.msg.js.gz +0 -0
  757. package/dist/collection/lib/message/resources/file-viewer.msg.js +0 -10
  758. package/dist/collection/lib/message/resources/file-viewer.msg.js.gz +0 -0
  759. package/dist/collection/lib/message/resources/snk-actions-button.msg.js +0 -27
  760. package/dist/collection/lib/message/resources/snk-actions-button.msg.js.gz +0 -0
  761. package/dist/collection/lib/message/resources/snk-application.msg.js +0 -9
  762. package/dist/collection/lib/message/resources/snk-application.msg.js.gz +0 -0
  763. package/dist/collection/lib/message/resources/snk-attach.msg.js +0 -40
  764. package/dist/collection/lib/message/resources/snk-attach.msg.js.gz +0 -0
  765. package/dist/collection/lib/message/resources/snk-configurator.msg.js +0 -8
  766. package/dist/collection/lib/message/resources/snk-configurator.msg.js.gz +0 -0
  767. package/dist/collection/lib/message/resources/snk-crud.msg.js +0 -11
  768. package/dist/collection/lib/message/resources/snk-crud.msg.js.gz +0 -0
  769. package/dist/collection/lib/message/resources/snk-data-exporter.msg.js.gz +0 -0
  770. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +0 -37
  771. package/dist/collection/lib/message/resources/snk-data-unit.msg.js.gz +0 -0
  772. package/dist/collection/lib/message/resources/snk-entity-list.msg.js.gz +0 -0
  773. package/dist/collection/lib/message/resources/snk-exporter.msg.js +0 -21
  774. package/dist/collection/lib/message/resources/snk-exporter.msg.js.gz +0 -0
  775. package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +0 -65
  776. package/dist/collection/lib/message/resources/snk-filter-bar.msg.js.gz +0 -0
  777. package/dist/collection/lib/message/resources/snk-filter-field-search.msg.js.gz +0 -0
  778. package/dist/collection/lib/message/resources/snk-filter-param-config.msg.js.gz +0 -0
  779. package/dist/collection/lib/message/resources/snk-form.msg.js +0 -76
  780. package/dist/collection/lib/message/resources/snk-form.msg.js.gz +0 -0
  781. package/dist/collection/lib/message/resources/snk-grid.msg.js +0 -40
  782. package/dist/collection/lib/message/resources/snk-grid.msg.js.gz +0 -0
  783. package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +0 -88
  784. package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js.gz +0 -0
  785. package/dist/collection/lib/message/resources/snk-print-selector.msg.js.gz +0 -0
  786. package/dist/collection/lib/message/resources/snk-simple-bar.msg.js.gz +0 -0
  787. package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +0 -9
  788. package/dist/collection/lib/message/resources/snk-simple-crud.msg.js.gz +0 -0
  789. package/dist/collection/lib/message/resources/snk-taskbar.msg.js +0 -19
  790. package/dist/collection/lib/message/resources/snk-taskbar.msg.js.gz +0 -0
  791. package/dist/collection/lib/resourceid/ResourceIDUtils.js.gz +0 -0
  792. package/dist/collection/lib/store/index.js.gz +0 -0
  793. package/dist/collection/lib/utils/ContinuousInsertUtils.js.gz +0 -0
  794. package/dist/collection/lib/utils/CrudUtils.js.gz +0 -0
  795. package/dist/collection/lib/utils/GetSelectedRecordsIDsInfo.js.gz +0 -0
  796. package/dist/collection/lib/utils/PrintUtils.js.gz +0 -0
  797. package/dist/collection/lib/utils/constants.js.gz +0 -0
  798. package/dist/collection/lib/utils/fileViewer/index.js.gz +0 -0
  799. package/dist/collection/lib/utils/fileViewer/interfaces/IFileViewerParams.js.gz +0 -0
  800. package/dist/collection/lib/utils/pesquisa.js.gz +0 -0
  801. package/dist/collection/lib/utils/urlutils.js.gz +0 -0
  802. package/dist/collection/lib/workspace/workspace.js.gz +0 -0
  803. package/dist/collection/sw.js.gz +0 -0
  804. package/dist/components/AuthorizationConfig.js.gz +0 -0
  805. package/dist/components/ConfigStorage.js.gz +0 -0
  806. package/dist/components/ContinuousInsertUtils.js.gz +0 -0
  807. package/dist/components/DataFetcher.js.gz +0 -0
  808. package/dist/components/GetSelectedRecordsIDsInfo.js.gz +0 -0
  809. package/dist/components/ISave.js.gz +0 -0
  810. package/dist/components/ParamType.js.gz +0 -0
  811. package/dist/components/PersonalizedFilterUtils.js.gz +0 -0
  812. package/dist/components/PrintUtils.js.gz +0 -0
  813. package/dist/components/ResourceIDUtils.js.gz +0 -0
  814. package/dist/components/SnkFormConfigManager.js.gz +0 -0
  815. package/dist/components/SnkMessageBuilder.js +0 -709
  816. package/dist/components/SnkMessageBuilder.js.gz +0 -0
  817. package/dist/components/auth-fetcher.js.gz +0 -0
  818. package/dist/components/config-header.js.gz +0 -0
  819. package/dist/components/config-header2.js.gz +0 -0
  820. package/dist/components/configs-button.js.gz +0 -0
  821. package/dist/components/configs-button2.js.gz +0 -0
  822. package/dist/components/constants.js.gz +0 -0
  823. package/dist/components/dataunit-fetcher.js.gz +0 -0
  824. package/dist/components/field-config.js.gz +0 -0
  825. package/dist/components/field-config2.js.gz +0 -0
  826. package/dist/components/field-item.js.gz +0 -0
  827. package/dist/components/field-item2.js.gz +0 -0
  828. package/dist/components/fields-layout.js.gz +0 -0
  829. package/dist/components/fields-layout2.js.gz +0 -0
  830. package/dist/components/fields-selector.js.gz +0 -0
  831. package/dist/components/fields-selector2.js.gz +0 -0
  832. package/dist/components/filter-item-type.enum.js.gz +0 -0
  833. package/dist/components/filterNumberVariation.js.gz +0 -0
  834. package/dist/components/form-config-fetcher.js.gz +0 -0
  835. package/dist/components/guides-configurator.js.gz +0 -0
  836. package/dist/components/guides-configurator2.js.gz +0 -0
  837. package/dist/components/index.js.gz +0 -0
  838. package/dist/components/index2.js.gz +0 -0
  839. package/dist/components/pesquisa-grid.js.gz +0 -0
  840. package/dist/components/pesquisa-grid2.js.gz +0 -0
  841. package/dist/components/pesquisa-tree.js.gz +0 -0
  842. package/dist/components/pesquisa-tree2.js.gz +0 -0
  843. package/dist/components/presentationMode.js.gz +0 -0
  844. package/dist/components/snk-actions-button.js.gz +0 -0
  845. package/dist/components/snk-actions-button2.js.gz +0 -0
  846. package/dist/components/snk-actions-form.js.gz +0 -0
  847. package/dist/components/snk-application.js.gz +0 -0
  848. package/dist/components/snk-application2.js.gz +0 -0
  849. package/dist/components/snk-attach.js.gz +0 -0
  850. package/dist/components/snk-attach2.js.gz +0 -0
  851. package/dist/components/snk-client-confirm.js.gz +0 -0
  852. package/dist/components/snk-configurator.js.gz +0 -0
  853. package/dist/components/snk-configurator2.js.gz +0 -0
  854. package/dist/components/snk-crud.js.gz +0 -0
  855. package/dist/components/snk-custom-slot-elements.js.gz +0 -0
  856. package/dist/components/snk-data-exporter.js.gz +0 -0
  857. package/dist/components/snk-data-exporter2.js.gz +0 -0
  858. package/dist/components/snk-data-unit.js.gz +0 -0
  859. package/dist/components/snk-data-unit2.js.gz +0 -0
  860. package/dist/components/snk-default-filter.js.gz +0 -0
  861. package/dist/components/snk-default-filter2.js.gz +0 -0
  862. package/dist/components/snk-detail-view.js.gz +0 -0
  863. package/dist/components/snk-detail-view2.js.gz +0 -0
  864. package/dist/components/snk-entity-list.js.gz +0 -0
  865. package/dist/components/snk-exporter-email-sender.js.gz +0 -0
  866. package/dist/components/snk-exporter-email-sender2.js.gz +0 -0
  867. package/dist/components/snk-expression-group.js.gz +0 -0
  868. package/dist/components/snk-expression-group2.js.gz +0 -0
  869. package/dist/components/snk-expression-item.js.gz +0 -0
  870. package/dist/components/snk-expression-item2.js.gz +0 -0
  871. package/dist/components/snk-filter-advanced-mode.js.gz +0 -0
  872. package/dist/components/snk-filter-advanced-mode2.js.gz +0 -0
  873. package/dist/components/snk-filter-assistent-mode.js.gz +0 -0
  874. package/dist/components/snk-filter-assistent-mode2.js.gz +0 -0
  875. package/dist/components/snk-filter-bar.js.gz +0 -0
  876. package/dist/components/snk-filter-bar2.js.gz +0 -0
  877. package/dist/components/snk-filter-binary-select.js.gz +0 -0
  878. package/dist/components/snk-filter-checkbox-list.js.gz +0 -0
  879. package/dist/components/snk-filter-detail.js.gz +0 -0
  880. package/dist/components/snk-filter-detail2.js.gz +0 -0
  881. package/dist/components/snk-filter-field-search.js.gz +0 -0
  882. package/dist/components/snk-filter-field-search2.js.gz +0 -0
  883. package/dist/components/snk-filter-item.js.gz +0 -0
  884. package/dist/components/snk-filter-item2.js.gz +0 -0
  885. package/dist/components/snk-filter-list.js.gz +0 -0
  886. package/dist/components/snk-filter-modal-item.js.gz +0 -0
  887. package/dist/components/snk-filter-modal-item2.js.gz +0 -0
  888. package/dist/components/snk-filter-modal.js.gz +0 -0
  889. package/dist/components/snk-filter-multi-select.js.gz +0 -0
  890. package/dist/components/snk-filter-number.js.gz +0 -0
  891. package/dist/components/snk-filter-param-config.js.gz +0 -0
  892. package/dist/components/snk-filter-param-config2.js.gz +0 -0
  893. package/dist/components/snk-filter-period.js.gz +0 -0
  894. package/dist/components/snk-filter-search.js.gz +0 -0
  895. package/dist/components/snk-filter-text.js.gz +0 -0
  896. package/dist/components/snk-form-config.js.gz +0 -0
  897. package/dist/components/snk-form-config2.js.gz +0 -0
  898. package/dist/components/snk-form-summary.js.gz +0 -0
  899. package/dist/components/snk-form-summary2.js.gz +0 -0
  900. package/dist/components/snk-form-view.js.gz +0 -0
  901. package/dist/components/snk-form-view2.js.gz +0 -0
  902. package/dist/components/snk-form.js.gz +0 -0
  903. package/dist/components/snk-grid-config.js.gz +0 -0
  904. package/dist/components/snk-grid-config2.js.gz +0 -0
  905. package/dist/components/snk-grid.js.gz +0 -0
  906. package/dist/components/snk-grid2.js.gz +0 -0
  907. package/dist/components/snk-guides-viewer.js.gz +0 -0
  908. package/dist/components/snk-layout-form-config.js.gz +0 -0
  909. package/dist/components/snk-layout-form-config2.js.gz +0 -0
  910. package/dist/components/snk-personalized-filter-editor.js.gz +0 -0
  911. package/dist/components/snk-personalized-filter.js.gz +0 -0
  912. package/dist/components/snk-personalized-filter2.js.gz +0 -0
  913. package/dist/components/snk-pesquisa.js.gz +0 -0
  914. package/dist/components/snk-pesquisa2.js.gz +0 -0
  915. package/dist/components/snk-print-selector.js.gz +0 -0
  916. package/dist/components/snk-select-box.js.gz +0 -0
  917. package/dist/components/snk-select-box2.js.gz +0 -0
  918. package/dist/components/snk-simple-bar.js.gz +0 -0
  919. package/dist/components/snk-simple-bar2.js.gz +0 -0
  920. package/dist/components/snk-simple-crud.js.gz +0 -0
  921. package/dist/components/snk-simple-crud2.js.gz +0 -0
  922. package/dist/components/snk-simple-form-config.js.gz +0 -0
  923. package/dist/components/snk-simple-form-config2.js.gz +0 -0
  924. package/dist/components/snk-taskbar.js.gz +0 -0
  925. package/dist/components/snk-taskbar2.js.gz +0 -0
  926. package/dist/components/snk-view-representation.js.gz +0 -0
  927. package/dist/components/snk-view-representation2.js.gz +0 -0
  928. package/dist/components/sortable.esm.js.gz +0 -0
  929. package/dist/components/taskbar-actions-button.js.gz +0 -0
  930. package/dist/components/taskbar-actions-button2.js.gz +0 -0
  931. package/dist/components/taskbar-split-button.js.gz +0 -0
  932. package/dist/components/taskbar-split-button2.js.gz +0 -0
  933. package/dist/components/teste-pesquisa.js.gz +0 -0
  934. package/dist/esm/AuthorizationConfig-dcbd207a.js.gz +0 -0
  935. package/dist/esm/ClientSideExporterProvider-09dee1a3.js +0 -367
  936. package/dist/esm/ClientSideExporterProvider-09dee1a3.js.gz +0 -0
  937. package/dist/esm/ConfigStorage-89154c4e.js +0 -537
  938. package/dist/esm/ConfigStorage-89154c4e.js.gz +0 -0
  939. package/dist/esm/DataFetcher-db08cad0.js +0 -7188
  940. package/dist/esm/DataFetcher-db08cad0.js.gz +0 -0
  941. package/dist/esm/FormConfigHelper-49fe72ca.js +0 -248
  942. package/dist/esm/FormConfigHelper-49fe72ca.js.gz +0 -0
  943. package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js.gz +0 -0
  944. package/dist/esm/IFetchDataExporterParams-d73bed3d.js.gz +0 -0
  945. package/dist/esm/ISave-da565824.js +0 -394
  946. package/dist/esm/ISave-da565824.js.gz +0 -0
  947. package/dist/esm/ParamType-d5152b06.js.gz +0 -0
  948. package/dist/esm/PersonalizedFilterUtils-2db38ff2.js.gz +0 -0
  949. package/dist/esm/PrintUtils-3e4ff0f5.js.gz +0 -0
  950. package/dist/esm/ResourceIDUtils-a114189a.js.gz +0 -0
  951. package/dist/esm/SnkFormConfigManager-e779ecad.js +0 -215
  952. package/dist/esm/SnkFormConfigManager-e779ecad.js.gz +0 -0
  953. package/dist/esm/SnkMessageBuilder-da87a821.js +0 -709
  954. package/dist/esm/SnkMessageBuilder-da87a821.js.gz +0 -0
  955. package/dist/esm/auth-fetcher-43c8d76b.js +0 -32
  956. package/dist/esm/auth-fetcher-43c8d76b.js.gz +0 -0
  957. package/dist/esm/config-header.entry.js.gz +0 -0
  958. package/dist/esm/configs-button.entry.js.gz +0 -0
  959. package/dist/esm/constants-7b422de0.js.gz +0 -0
  960. package/dist/esm/dataunit-fetcher-1b78797a.js +0 -1111
  961. package/dist/esm/dataunit-fetcher-1b78797a.js.gz +0 -0
  962. package/dist/esm/default-filters-50105e43.js.gz +0 -0
  963. package/dist/esm/field-config_2.entry.js.gz +0 -0
  964. package/dist/esm/fields-layout.entry.js.gz +0 -0
  965. package/dist/esm/fields-selector.entry.js.gz +0 -0
  966. package/dist/esm/filter-item-type.enum-d45e026f.js.gz +0 -0
  967. package/dist/esm/filter-type.enum-f6a8fe23.js.gz +0 -0
  968. package/dist/esm/filterNumberVariation-8cee02ea.js.gz +0 -0
  969. package/dist/esm/form-config-fetcher-e623539b.js +0 -307
  970. package/dist/esm/form-config-fetcher-e623539b.js.gz +0 -0
  971. package/dist/esm/guides-configurator.entry.js.gz +0 -0
  972. package/dist/esm/index-479e1293.js.gz +0 -0
  973. package/dist/esm/index-620ac460.js.gz +0 -0
  974. package/dist/esm/index-8acbae97.js.gz +0 -0
  975. package/dist/esm/index-b40568ff.js.gz +0 -0
  976. package/dist/esm/index-b72af127.js.gz +0 -0
  977. package/dist/esm/index.js.gz +0 -0
  978. package/dist/esm/loader.js.gz +0 -0
  979. package/dist/esm/pesquisa-grid_2.entry.js.gz +0 -0
  980. package/dist/esm/polyfills/core-js.js.gz +0 -0
  981. package/dist/esm/polyfills/css-shim.js.gz +0 -0
  982. package/dist/esm/polyfills/dom.js.gz +0 -0
  983. package/dist/esm/polyfills/es5-html-element.js.gz +0 -0
  984. package/dist/esm/polyfills/index.js.gz +0 -0
  985. package/dist/esm/polyfills/system.js.gz +0 -0
  986. package/dist/esm/presentationMode-783bbf9d.js.gz +0 -0
  987. package/dist/esm/sankhyablocks.js.gz +0 -0
  988. package/dist/esm/snk-actions-button_8.entry.js.gz +0 -0
  989. package/dist/esm/snk-actions-form.entry.js.gz +0 -0
  990. package/dist/esm/snk-application.entry.js.gz +0 -0
  991. package/dist/esm/snk-attach.entry.js.gz +0 -0
  992. package/dist/esm/snk-client-confirm.entry.js.gz +0 -0
  993. package/dist/esm/snk-configurator.entry.js.gz +0 -0
  994. package/dist/esm/snk-crud.entry.js.gz +0 -0
  995. package/dist/esm/snk-custom-slot-elements.entry.js.gz +0 -0
  996. package/dist/esm/snk-data-exporter.entry.js.gz +0 -0
  997. package/dist/esm/snk-data-unit-457b547e.js +0 -935
  998. package/dist/esm/snk-data-unit-457b547e.js.gz +0 -0
  999. package/dist/esm/snk-data-unit.entry.js.gz +0 -0
  1000. package/dist/esm/snk-default-filter.entry.js.gz +0 -0
  1001. package/dist/esm/snk-detail-view.entry.js.gz +0 -0
  1002. package/dist/esm/snk-entity-list.entry.js.gz +0 -0
  1003. package/dist/esm/snk-exporter-email-sender.entry.js.gz +0 -0
  1004. package/dist/esm/snk-expression-group_2.entry.js.gz +0 -0
  1005. package/dist/esm/snk-filter-advanced-mode_2.entry.js.gz +0 -0
  1006. package/dist/esm/snk-filter-bar_4.entry.js.gz +0 -0
  1007. package/dist/esm/snk-filter-binary-select.entry.js.gz +0 -0
  1008. package/dist/esm/snk-filter-checkbox-list.entry.js.gz +0 -0
  1009. package/dist/esm/snk-filter-detail.entry.js.gz +0 -0
  1010. package/dist/esm/snk-filter-field-search_2.entry.js.gz +0 -0
  1011. package/dist/esm/snk-filter-modal-item.entry.js.gz +0 -0
  1012. package/dist/esm/snk-filter-multi-select.entry.js.gz +0 -0
  1013. package/dist/esm/snk-filter-number.entry.js.gz +0 -0
  1014. package/dist/esm/snk-filter-period.entry.js.gz +0 -0
  1015. package/dist/esm/snk-filter-search.entry.js.gz +0 -0
  1016. package/dist/esm/snk-filter-text.entry.js.gz +0 -0
  1017. package/dist/esm/snk-form-summary.entry.js.gz +0 -0
  1018. package/dist/esm/snk-form-view.entry.js.gz +0 -0
  1019. package/dist/esm/snk-form_2.entry.js.gz +0 -0
  1020. package/dist/esm/snk-grid.entry.js.gz +0 -0
  1021. package/dist/esm/snk-guides-viewer-7135bd83.js +0 -600
  1022. package/dist/esm/snk-guides-viewer-7135bd83.js.gz +0 -0
  1023. package/dist/esm/snk-guides-viewer.entry.js.gz +0 -0
  1024. package/dist/esm/snk-personalized-filter-editor.entry.js.gz +0 -0
  1025. package/dist/esm/snk-personalized-filter.entry.js.gz +0 -0
  1026. package/dist/esm/snk-pesquisa.entry.js.gz +0 -0
  1027. package/dist/esm/snk-print-selector.entry.js.gz +0 -0
  1028. package/dist/esm/snk-simple-bar.entry.js.gz +0 -0
  1029. package/dist/esm/snk-simple-crud.entry.js.gz +0 -0
  1030. package/dist/esm/snk-taskbar.entry.js.gz +0 -0
  1031. package/dist/esm/sortable.esm-842f85a3.js.gz +0 -0
  1032. package/dist/esm/taskbar-elements-171476d4.js.gz +0 -0
  1033. package/dist/esm/taskbar-processor-3436124c.js.gz +0 -0
  1034. package/dist/esm/teste-pesquisa.entry.js.gz +0 -0
  1035. package/dist/index.cjs.js.gz +0 -0
  1036. package/dist/index.js.gz +0 -0
  1037. package/dist/sankhyablocks/index.esm.js.gz +0 -0
  1038. package/dist/sankhyablocks/p-0024d3fd.entry.js.gz +0 -0
  1039. package/dist/sankhyablocks/p-0750661e.entry.js +0 -1
  1040. package/dist/sankhyablocks/p-0750661e.entry.js.gz +0 -0
  1041. package/dist/sankhyablocks/p-097eab65.entry.js +0 -1
  1042. package/dist/sankhyablocks/p-097eab65.entry.js.gz +0 -0
  1043. package/dist/sankhyablocks/p-0b2a63ee.entry.js +0 -1
  1044. package/dist/sankhyablocks/p-0b2a63ee.entry.js.gz +0 -0
  1045. package/dist/sankhyablocks/p-0f3698af.js.gz +0 -0
  1046. package/dist/sankhyablocks/p-162bddae.entry.js.gz +0 -0
  1047. package/dist/sankhyablocks/p-180716b2.entry.js.gz +0 -0
  1048. package/dist/sankhyablocks/p-1a0caadb.js.gz +0 -0
  1049. package/dist/sankhyablocks/p-1a68fb59.js.gz +0 -0
  1050. package/dist/sankhyablocks/p-1c69a957.entry.js +0 -1
  1051. package/dist/sankhyablocks/p-1c69a957.entry.js.gz +0 -0
  1052. package/dist/sankhyablocks/p-21107f0d.entry.js.gz +0 -0
  1053. package/dist/sankhyablocks/p-22a8656b.entry.js +0 -1
  1054. package/dist/sankhyablocks/p-22a8656b.entry.js.gz +0 -0
  1055. package/dist/sankhyablocks/p-23b20add.entry.js +0 -1
  1056. package/dist/sankhyablocks/p-23b20add.entry.js.gz +0 -0
  1057. package/dist/sankhyablocks/p-25209340.entry.js.gz +0 -0
  1058. package/dist/sankhyablocks/p-27482793.entry.js.gz +0 -0
  1059. package/dist/sankhyablocks/p-295b83ae.entry.js.gz +0 -0
  1060. package/dist/sankhyablocks/p-2d58f98e.entry.js +0 -1
  1061. package/dist/sankhyablocks/p-2d58f98e.entry.js.gz +0 -0
  1062. package/dist/sankhyablocks/p-2ebd3bfd.entry.js +0 -1
  1063. package/dist/sankhyablocks/p-2ebd3bfd.entry.js.gz +0 -0
  1064. package/dist/sankhyablocks/p-2fdac5e6.entry.js.gz +0 -0
  1065. package/dist/sankhyablocks/p-35e73c5d.js +0 -1
  1066. package/dist/sankhyablocks/p-35e73c5d.js.gz +0 -0
  1067. package/dist/sankhyablocks/p-37b4f642.js +0 -60
  1068. package/dist/sankhyablocks/p-37b4f642.js.gz +0 -0
  1069. package/dist/sankhyablocks/p-398cdd67.entry.js.gz +0 -0
  1070. package/dist/sankhyablocks/p-3b272099.js +0 -1
  1071. package/dist/sankhyablocks/p-3b272099.js.gz +0 -0
  1072. package/dist/sankhyablocks/p-3d41f5a8.entry.js.gz +0 -0
  1073. package/dist/sankhyablocks/p-4708c8f0.js +0 -1
  1074. package/dist/sankhyablocks/p-4708c8f0.js.gz +0 -0
  1075. package/dist/sankhyablocks/p-471b34f4.entry.js.gz +0 -0
  1076. package/dist/sankhyablocks/p-49d968e2.entry.js +0 -1
  1077. package/dist/sankhyablocks/p-49d968e2.entry.js.gz +0 -0
  1078. package/dist/sankhyablocks/p-4d2ff2fb.entry.js +0 -1
  1079. package/dist/sankhyablocks/p-4d2ff2fb.entry.js.gz +0 -0
  1080. package/dist/sankhyablocks/p-51833248.js.gz +0 -0
  1081. package/dist/sankhyablocks/p-5ce01e07.entry.js +0 -1
  1082. package/dist/sankhyablocks/p-5ce01e07.entry.js.gz +0 -0
  1083. package/dist/sankhyablocks/p-60dd1d27.entry.js.gz +0 -0
  1084. package/dist/sankhyablocks/p-658b4ea7.entry.js +0 -1
  1085. package/dist/sankhyablocks/p-658b4ea7.entry.js.gz +0 -0
  1086. package/dist/sankhyablocks/p-667cab42.entry.js.gz +0 -0
  1087. package/dist/sankhyablocks/p-688dcb4c.js.gz +0 -0
  1088. package/dist/sankhyablocks/p-6a4b21dd.js.gz +0 -0
  1089. package/dist/sankhyablocks/p-6bec7de5.entry.js +0 -1
  1090. package/dist/sankhyablocks/p-6bec7de5.entry.js.gz +0 -0
  1091. package/dist/sankhyablocks/p-71a05822.entry.js +0 -1
  1092. package/dist/sankhyablocks/p-71a05822.entry.js.gz +0 -0
  1093. package/dist/sankhyablocks/p-72c8c847.entry.js.gz +0 -0
  1094. package/dist/sankhyablocks/p-7345782c.entry.js.gz +0 -0
  1095. package/dist/sankhyablocks/p-7ced2cf4.entry.js +0 -1
  1096. package/dist/sankhyablocks/p-7ced2cf4.entry.js.gz +0 -0
  1097. package/dist/sankhyablocks/p-7dd49d15.js.gz +0 -0
  1098. package/dist/sankhyablocks/p-7de79adf.js.gz +0 -0
  1099. package/dist/sankhyablocks/p-7e250432.entry.js.gz +0 -0
  1100. package/dist/sankhyablocks/p-84345e7a.js.gz +0 -0
  1101. package/dist/sankhyablocks/p-86bd4478.entry.js +0 -1
  1102. package/dist/sankhyablocks/p-86bd4478.entry.js.gz +0 -0
  1103. package/dist/sankhyablocks/p-8758404f.js +0 -56
  1104. package/dist/sankhyablocks/p-8758404f.js.gz +0 -0
  1105. package/dist/sankhyablocks/p-88f15acd.entry.js +0 -1
  1106. package/dist/sankhyablocks/p-88f15acd.entry.js.gz +0 -0
  1107. package/dist/sankhyablocks/p-8d884fab.js.gz +0 -0
  1108. package/dist/sankhyablocks/p-8f3f2306.js.gz +0 -0
  1109. package/dist/sankhyablocks/p-9019a32f.js.gz +0 -0
  1110. package/dist/sankhyablocks/p-91a9abb6.entry.js.gz +0 -0
  1111. package/dist/sankhyablocks/p-988afe78.js.gz +0 -0
  1112. package/dist/sankhyablocks/p-9a63f3f7.entry.js.gz +0 -0
  1113. package/dist/sankhyablocks/p-9fd87bfd.entry.js.gz +0 -0
  1114. package/dist/sankhyablocks/p-a349689a.js.gz +0 -0
  1115. package/dist/sankhyablocks/p-a76e6d51.entry.js.gz +0 -0
  1116. package/dist/sankhyablocks/p-b21d32f6.js +0 -26
  1117. package/dist/sankhyablocks/p-b21d32f6.js.gz +0 -0
  1118. package/dist/sankhyablocks/p-b2946adb.entry.js +0 -1
  1119. package/dist/sankhyablocks/p-b2946adb.entry.js.gz +0 -0
  1120. package/dist/sankhyablocks/p-b568c1d4.js.gz +0 -0
  1121. package/dist/sankhyablocks/p-b839f228.entry.js +0 -1
  1122. package/dist/sankhyablocks/p-b839f228.entry.js.gz +0 -0
  1123. package/dist/sankhyablocks/p-c6a8a8bc.entry.js.gz +0 -0
  1124. package/dist/sankhyablocks/p-c9657baa.js +0 -6
  1125. package/dist/sankhyablocks/p-c9657baa.js.gz +0 -0
  1126. package/dist/sankhyablocks/p-cb2a4613.entry.js +0 -1
  1127. package/dist/sankhyablocks/p-cb2a4613.entry.js.gz +0 -0
  1128. package/dist/sankhyablocks/p-cd1a5b6a.js +0 -1
  1129. package/dist/sankhyablocks/p-cd1a5b6a.js.gz +0 -0
  1130. package/dist/sankhyablocks/p-cfc219f6.entry.js +0 -1
  1131. package/dist/sankhyablocks/p-cfc219f6.entry.js.gz +0 -0
  1132. package/dist/sankhyablocks/p-d67526b6.entry.js +0 -1
  1133. package/dist/sankhyablocks/p-d67526b6.entry.js.gz +0 -0
  1134. package/dist/sankhyablocks/p-d778d86b.entry.js +0 -11
  1135. package/dist/sankhyablocks/p-d778d86b.entry.js.gz +0 -0
  1136. package/dist/sankhyablocks/p-d8d8169b.js.gz +0 -0
  1137. package/dist/sankhyablocks/p-dc36cfbf.js.gz +0 -0
  1138. package/dist/sankhyablocks/p-dff65083.entry.js.gz +0 -0
  1139. package/dist/sankhyablocks/p-e25412da.js +0 -1
  1140. package/dist/sankhyablocks/p-e25412da.js.gz +0 -0
  1141. package/dist/sankhyablocks/p-e4661cb0.entry.js +0 -1
  1142. package/dist/sankhyablocks/p-e4661cb0.entry.js.gz +0 -0
  1143. package/dist/sankhyablocks/p-eaad0aa8.js.gz +0 -0
  1144. package/dist/sankhyablocks/p-f4184ce7.js.gz +0 -0
  1145. package/dist/sankhyablocks/p-f442c8f6.entry.js +0 -1
  1146. package/dist/sankhyablocks/p-f442c8f6.entry.js.gz +0 -0
  1147. package/dist/sankhyablocks/p-fa591f6f.js +0 -1
  1148. package/dist/sankhyablocks/p-fa591f6f.js.gz +0 -0
  1149. package/dist/sankhyablocks/p-fa80e546.js.gz +0 -0
  1150. package/dist/sankhyablocks/p-fc4eac32.js +0 -1
  1151. package/dist/sankhyablocks/p-fc4eac32.js.gz +0 -0
  1152. package/dist/sankhyablocks/p-fe5057dc.js +0 -1
  1153. package/dist/sankhyablocks/p-fe5057dc.js.gz +0 -0
  1154. package/dist/sankhyablocks/p-ff1990ad.js.gz +0 -0
  1155. package/dist/sankhyablocks/sankhyablocks.esm.js.gz +0 -0
  1156. package/dist/types/lib/message/resources/crud-utils.msg.d.ts +0 -2
  1157. package/dist/types/lib/message/resources/file-viewer.msg.d.ts +0 -2
  1158. package/dist/types/lib/message/resources/snk-application.msg.d.ts +0 -2
  1159. package/dist/types/lib/message/resources/snk-attach.msg.d.ts +0 -2
  1160. package/dist/types/lib/message/resources/snk-crud.msg.d.ts +0 -2
  1161. package/dist/types/lib/message/resources/snk-data-unit.msg.d.ts +0 -2
  1162. package/dist/types/lib/message/resources/snk-exporter.msg.d.ts +0 -2
  1163. package/dist/types/lib/message/resources/snk-filter-bar.msg.d.ts +0 -2
  1164. package/dist/types/lib/message/resources/snk-simple-crud.msg.d.ts +0 -2
  1165. package/dist/types/lib/message/resources/snk-taskbar.msg.d.ts +0 -2
  1166. /package/dist/collection/components/snk-simple-crud/{regular-buttons.js → snk-simple-crud.constants.js} +0 -0
  1167. /package/dist/collection/lib/message/resources/{snk-data-exporter.msg.js → pt-br/snk-data-exporter.msg.js} +0 -0
  1168. /package/dist/collection/lib/message/resources/{snk-entity-list.msg.js → pt-br/snk-entity-list.msg.js} +0 -0
  1169. /package/dist/collection/lib/message/resources/{snk-filter-field-search.msg.js → pt-br/snk-filter-field-search.msg.js} +0 -0
  1170. /package/dist/collection/lib/message/resources/{snk-filter-param-config.msg.js → pt-br/snk-filter-param-config.msg.js} +0 -0
  1171. /package/dist/collection/lib/message/resources/{snk-print-selector.msg.js → pt-br/snk-print-selector.msg.js} +0 -0
  1172. /package/dist/collection/lib/message/resources/{snk-simple-bar.msg.js → pt-br/snk-simple-bar.msg.js} +0 -0
  1173. /package/dist/types/components/snk-simple-crud/{regular-buttons.d.ts → snk-simple-crud.constants.d.ts} +0 -0
  1174. /package/dist/types/lib/message/resources/{snk-actions-button.msg.d.ts → en-us/snk-actions-button.msg.d.ts} +0 -0
  1175. /package/dist/types/lib/message/resources/{snk-configurator.msg.d.ts → en-us/snk-configurator.msg.d.ts} +0 -0
  1176. /package/dist/types/lib/message/resources/{snk-data-exporter.msg.d.ts → en-us/snk-data-exporter.msg.d.ts} +0 -0
  1177. /package/dist/types/lib/message/resources/{snk-entity-list.msg.d.ts → en-us/snk-entity-list.msg.d.ts} +0 -0
  1178. /package/dist/types/lib/message/resources/{snk-filter-field-search.msg.d.ts → en-us/snk-filter-field-search.msg.d.ts} +0 -0
  1179. /package/dist/types/lib/message/resources/{snk-filter-param-config.msg.d.ts → en-us/snk-filter-param-config.msg.d.ts} +0 -0
  1180. /package/dist/types/lib/message/resources/{snk-form.msg.d.ts → en-us/snk-form.msg.d.ts} +0 -0
  1181. /package/dist/types/lib/message/resources/{snk-grid.msg.d.ts → en-us/snk-grid.msg.d.ts} +0 -0
  1182. /package/dist/types/lib/message/resources/{snk-personalized-filter.msg.d.ts → en-us/snk-personalized-filter.msg.d.ts} +0 -0
  1183. /package/dist/types/lib/message/resources/{snk-print-selector.msg.d.ts → en-us/snk-print-selector.msg.d.ts} +0 -0
  1184. /package/dist/types/lib/message/resources/{snk-simple-bar.msg.d.ts → en-us/snk-simple-bar.msg.d.ts} +0 -0
@@ -0,0 +1,56 @@
1
+ import{R as e,F as t}from"./p-c6331595.js";import{D as i,d as s}from"./p-0dac8fef.js";import{F as r}from"./p-ff1990ad.js";import{ObjectUtils as a}from"@sankhyalabs/core";var n;function l(e,t){if(null==e)return e;if(e instanceof Date)return e.toISOString();if("object"==typeof e){if(e instanceof Array)return e.map((e=>l(r.MULTI_LIST===t?function(e,t){var i={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(i[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(i[s[r]]=e[s[r]])}return i}(e,["label"]):e)));{const i=Object.assign({},e);return Object.keys(e).forEach((s=>{void 0!==e[s]?i[s]=l(e[s],t):delete i[s]})),i}}return e}class o{constructor(){this.DEFAULT_RESOURCE="_default",this.templateByQuery=new Map,this.buildTemplates()}resolveURI(e,t,i){let s="filter-assistent-config://"+e;return t&&(s+="."+t),i&&(s+=this.DEFAULT_RESOURCE),s}resolveLegacyConfigName(e,t){if(!e)return"";let i=`?legacyResourceID=${e}`;return t&&(i+=this.DEFAULT_RESOURCE),i}buildTemplates(){this.templateByQuery.set("fetchFilterFields",s.gql`
2
+ query($name: String!) {
3
+ $queryAlias$: fetchFilterFields(name: $name){
4
+ currentLink {
5
+ description
6
+ uri
7
+ }
8
+ links {
9
+ description
10
+ uri
11
+ fieldCount
12
+ }
13
+ fields {
14
+ name
15
+ description
16
+ uri
17
+ onlyDate
18
+ dataType
19
+ userInterface
20
+ entityName
21
+ properties {
22
+ name
23
+ value
24
+ }
25
+ }
26
+ }
27
+ }
28
+ `),this.templateByQuery.set("fetchFilterAssistent",s.gql`
29
+ query($name: String!) {
30
+ $queryAlias$: fetchFilterAssistent(name: $name) {
31
+ id
32
+ name
33
+ active
34
+ expression
35
+ warningMessage
36
+ assistent
37
+ }
38
+ }`),this.templateByQuery.set("savePersonalizedFilter",s.gql`
39
+ mutation($name: String!, $filterAssistent: InputFilterAssistent!) {
40
+ $queryAlias$: savePersonalizedFilter(name: $name, filterAssistent: $filterAssistent) {
41
+ id
42
+ name
43
+ }
44
+ }`),this.templateByQuery.set("deletePersonalizedFilter",s.gql`
45
+ mutation($name: String!, $filterId: String!) {
46
+ $queryAlias$: deletePersonalizedFilter(name: $name, filterId: $filterId) {
47
+ id
48
+ name
49
+ }
50
+ }`),this.templateByQuery.set("validateExpression",s.gql`
51
+ query($dataUnitName: String!, $expression: String!) {
52
+ $queryAlias$: validateExpression(dataUnitName: $dataUnitName, expression: $expression) {
53
+ valid
54
+ message
55
+ }
56
+ }`)}async loadDefaultFilter(e,t,i,s){return this.loadPersonalizedFilter(e,t,i,s,!0)}async loadPersonalizedFilter(e,t,s,r,a){return new Promise(((n,l)=>{i.get().callGraphQL({values:{name:this.resolveURI(e,s,a)+"/"+t+this.resolveLegacyConfigName(r,a)},query:this.templateByQuery.get("fetchFilterAssistent")}).then((e=>{e.assistent=JSON.parse(e.assistent),n(e)})).catch((e=>{l(e)}))}))}async saveDefaultFilter(e,t,i){return this.savePersonalizedFilter(e,t,i,!0)}async savePersonalizedFilter(e,t,s,r){if(!e||0==Object.keys(e).length)return Promise.reject(new Error("personalizedFilter não pode ser vazio"));let a=JSON.parse(JSON.stringify(e));return a.assistent=JSON.stringify(a.assistent),new Promise(((e,n)=>{i.get().callGraphQL({values:{name:this.resolveURI(t,s,r),filterAssistent:a},query:this.templateByQuery.get("savePersonalizedFilter")}).then((t=>{e(t)})).catch((e=>{n(e)}))}))}removeDefaultFilter(e,t,i){return this.removePersonalizedFilter(e,t,i,!0)}async removePersonalizedFilter(e,t,s,r){return new Promise(((a,n)=>{i.get().callGraphQL({values:{name:this.resolveURI(t,s,r),filterId:e.id},query:this.templateByQuery.get("deletePersonalizedFilter")}).then((e=>{a(e)})).catch((e=>{n(e)}))}))}async validatePersonalizedFilter(e,t){return new Promise(((s,r)=>{i.get().callGraphQL({values:{dataUnitName:e,expression:t},query:this.templateByQuery.get("validateExpression")}).then((e=>{s(e)})).catch((e=>{r(e)}))}))}loadFields(e){return new Promise(((t,s)=>{i.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchFilterFields")}).then((e=>{var i;let s=e.fields;for(const e of s){if(Array.isArray(e.properties)&&e.properties.length>0){const t=e.properties.reduce(((e,t)=>(e[t.name]=t.value,e)),{});e.properties=t}(null===(i=null==e?void 0:e.properties)||void 0===i?void 0:i.options)&&(e.properties.options=JSON.parse(e.properties.options))}t(Object.assign(Object.assign({},e),{fields:s}))})).catch((e=>{s(e)}))}))}}!function(e){e.form="form",e.grid="grid",e.filterBar="filterBar"}(n||(n={}));class c{static addFilterBarLegacyConfig(e,t){this.validateResourceId(t),this.filterBarLegacyConfig.set(e,t)}static addFormLegacyConfig(e,t){this.validateResourceId(t),this.formLegacyConfig.set(e,t)}static addGridLegacyConfig(e,t){this.validateResourceId(t),this.gridLegacyConfig.set(e,t)}static preload(e,t,i){t&&(null==i?void 0:i.gridLegacyConfig)&&c.addGridLegacyConfig(t,i.gridLegacyConfig),t&&(null==i?void 0:i.formLegacyConfig)&&c.addFormLegacyConfig(t,i.formLegacyConfig),c.loadFormConfig(t,e),c.loadGridConfig(t,e)}static async loadFilterBarConfig(e,t,i){i=this.handleLegacyConfig(e,n.filterBar,i);const s=c.buildCacheID(e,n.filterBar,t);return c.configById.has(s)||c.configById.set(s,c.filterBarConfigFetcher.getConfig(t,e,i)),c.configById.get(s)}static async loadFormConfig(e,t){e=this.handleLegacyConfigAsString(e,n.form);const i=c.buildCacheID(e,n.form,t);return c.configById.has(i)||c.configById.set(i,c.formConfigFetcher.loadFormConfig(e,t)),c.configById.get(i)}static async loadGridConfig(e,t){e=this.handleLegacyConfigAsString(e,n.grid);const i=c.buildCacheID(e,n.grid,t);return c.configById.has(i)||c.configById.set(i,c.gridConfigFetcher.getConfig(e,t)),c.configById.get(i)}static async saveFilterBarConfig(e,t,i){return await this.deleteFilterBarConfigCache(t,i),this.filterBarConfigFetcher.saveConfig(e,i,t)}static async saveFormConfig(e,t,i){return t=this.handleLegacyConfigAsString(t,n.form),await this.deleteFormConfigCache(t,i),this.formConfigFetcher.saveConfig(e,t,i)}static async saveCardState(e,t,i){return this.formConfigFetcher.saveCardState(e,t,i)}static async getDefaultGridConfig(e){return await this.gridConfigFetcher.getDefaultConfig(e)}static async saveGridConfig(e,t,i){if(null!=e)return t=this.handleLegacyConfigAsString(t,n.grid),await this.deleteGridConfigCache(t,i),this.gridConfigFetcher.saveConfig(e,t,i)}static async loadDefaultFilter(e,t,i){const s=this.filterBarLegacyConfig.get(i);return this.personalizedFilterFetcher.loadDefaultFilter(t,e,i,s)}static async loadPersonalizedFilter(e,t,i){const s=this.filterBarLegacyConfig.get(i);return this.personalizedFilterFetcher.loadPersonalizedFilter(t,e,i,s)}static async savePersonalizedFilter(e,t,i){return await this.deleteFilterBarConfigCache(i,t),this.personalizedFilterFetcher.savePersonalizedFilter(e,t,i)}static async saveDefaultFilter(e,t,i){return await this.deleteFilterBarConfigCache(i,t),this.personalizedFilterFetcher.saveDefaultFilter(e,t,i)}static async removeDefaultFilter(e,t,i){return this.personalizedFilterFetcher.removeDefaultFilter(e,t,i)}static async removePersonalizedFilter(e,t,i){return this.personalizedFilterFetcher.removePersonalizedFilter(e,t,i)}static async validatePersonalizedFilter(e,t){return this.personalizedFilterFetcher.validatePersonalizedFilter(e,t)}static async deleteGridConfigCache(e,t){await this.deleteConfigCache(e,t,n.grid)}static async deleteFormConfigCache(e,t){await this.deleteConfigCache(e,t,n.form)}static async deleteFilterBarConfigCache(e,t){await this.deleteConfigCache(e,t,n.filterBar)}static validateResourceId(e){if(!e)throw Error(this.LEGACY_CONFIG_NAME_ERROR_MESSAGE)}static handleLegacyConfig(e,t,i){let s;switch(t){case n.filterBar:s=this.filterBarLegacyConfig.get(e);break;case n.grid:s=this.gridLegacyConfig.get(e);break;case n.form:s=this.formLegacyConfig.get(e)}const r=i?Object.assign({},i):{};return s&&(r.legacyResourceID=s),r}static handleLegacyConfigAsString(e,t){const i=this.handleLegacyConfig(e,t).legacyResourceID;return i&&(e+=`?legacyResourceID=${i}`),e}static async deleteConfigCache(e,t,i){const s=c.buildCacheID(e,i,t);this.configById.delete(s)}static buildCacheID(e,t,i){return null==e?`req_${t}_${i}`:`req_${t}_${e}_${i}`}}c.LEGACY_CONFIG_NAME_ERROR_MESSAGE="LegacyConfigName precisa ser informado.",c.filterBarLegacyConfig=new Map,c.formLegacyConfig=new Map,c.gridLegacyConfig=new Map,c.configById=new Map,c.filterBarConfigFetcher=new class extends e{normalize(e){return e.map((e=>{const{id:t,value:i,fixed:s,visible:r,type:a,groupedItems:n}=e,o={id:t};if(i&&(o.value=l(i,a)),s&&(o.fixed=s),n){if(0===n.length)return;n.filter((e=>e.visible)).length>0&&(o.visible=!0),o.groupedItems=this.normalize(n)}else r&&(o.visible=!0);return o})).filter((e=>null!=e))}saveConfig(e,t,i){return this.saveResource(this.normalize(e),this.getPath(t,i))}getConfig(e,t,i){return new Promise(((s,r)=>{this.loadResource(this.getPath(e,t,i)).then((e=>{let t;if(e){const i=JSON.parse(e);t=this.buildFieldList(i.items)}s(t||[])})).catch((e=>{r(e)}))}))}buildFieldList(e){return e.map((e=>{var t,i;if(e.type===r.MULTI_LIST){const s=e.value;let r=null!==(i=null!==(t=null==s?void 0:s.elements)&&void 0!==t?t:null==s?void 0:s.members)&&void 0!==i?i:s;r=null!=r?r:[],r=Array.isArray(r)?r:[r],r=r.map((e=>Object.assign(Object.assign({},e),{id:void 0!==e.id?e.id:e.value}))),e.value=a.copy(r)}return e}))}getPath(e,t,i){let s=`cfg://filter/FilterBarState:${e}`;return t&&(s+=`.${t}`),i&&(s+=this.buildQueryString(i)),s}buildQueryString(e){let t="?";for(let i in e)e.hasOwnProperty(i)&&(t.length>1&&(t+="&"),t+=i+"="+e[i]);return t}},c.formConfigFetcher=new t,c.gridConfigFetcher=new class extends e{constructor(){super(...arguments),this.GRID_CONFIG_VERSION="V3:"}async getDefaultConfig(e){var t,s;const r={requestBody:{gridConfig:{configName:`GrdCfgHtml5:${e}`}}},a=await i.get().callServiceBroker("GridConfig.restoreGridConfigFromJson",JSON.stringify(r));return{columns:null!==(s=null===(t=null==a?void 0:a.gridConfig)||void 0===t?void 0:t.field)&&void 0!==s?s:[]}}getConfig(e,t){const i=this.getPath(t,e);return new Promise(((e,t)=>{this.loadResource(i).then((t=>{let i;t&&(i=JSON.parse(t)),e(i)})).catch((e=>{t(e)}))}))}saveConfig(e,t,i){const s=this.getPath(i,t);return new Promise(((t,i)=>{this.saveResource(e,s).then((e=>{t(JSON.parse(e.resource))})).catch((e=>{i(e)}))}))}getPath(e,t){return t?`cfg://grid/${this.GRID_CONFIG_VERSION}${e}/${t}`:`cfg://grid/${this.GRID_CONFIG_VERSION}${e}`}},c.personalizedFilterFetcher=new o;export{c as C,o as P}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,H as e,g as h}from"./p-d8d8169b.js";import{StringUtils as a,ElementIDUtils as o,ApplicationContext as n,KeyboardManager as r}from"@sankhyalabs/core";import{T as d}from"./p-7de79adf.js";import"./p-0dac8fef.js";import"./p-ba4979b4.js";import{P as c,E as l}from"./p-0f3698af.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-b35574b5.js";import"./p-ff1990ad.js";import"./p-c6331595.js";import{V as u}from"./p-9019a32f.js";import{A as m}from"./p-c9e6d720.js";import"./p-a349689a.js";import"./p-8d884fab.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";const f=class{constructor(s){t(this,s),this.actionClick=i(this,"actionClick",7),this.configuratorSave=i(this,"configuratorSave",7),this.configuratorCancel=i(this,"configuratorCancel",7),this.formItemsReady=i(this,"formItemsReady",7),this.viewModeChanged=i(this,"viewModeChanged",7),this._viewHistory=[],this._customEditors=new Map,this._customRenders=new Map,this._dataUnit=void 0,this._dataState=void 0,this.attachmentRegisterKey=void 0,this._currentViewMode=u.GRID,this._canEdit=void 0,this._resourceID=void 0,this.enableLockManagerLoadingComp=!1,this.enableLockManagerTaskbarClick=!1,this.configName=void 0,this.filterBarTitle=void 0,this.selectionToastConfig=void 0,this.showActionButtons=!1,this.actionsList=void 0,this.taskbarManager=void 0,this.recordsValidator=void 0,this.statusResolver=void 0,this.multipleSelection=!0,this.presentationMode=c.PRIMARY,this.messagesBuilder=void 0,this.useEnterLikeTab=!1,this.gridLegacyConfigName=void 0,this.filterBarLegacyConfigName=void 0,this.formLegacyConfigName=void 0,this.disablePersonalizedFilter=void 0,this.autoLoad=void 0,this.autoFocus=!0,this.enableGridInsert=!1,this.domainMessagesBuilder=void 0,this.ignoreReadOnlyFormFields=void 0,this.setCustomFormTitle=void 0,this.strategyExporter=l.SERVER_SIDE,this.layoutFormConfig=!1,this.multipleEditionEnabled=!0,this.paginationCounterMode="auto",this.layoutFormConfig=!1,this.customContainerId=`SNK-CRUD-CUSTOM-CONTAINER-${a.generateUUID()}`}async goToView(t){this.executeAction(t)}async openConfigurator(){var t;null===(t=this._snkConfigurator)||void 0===t||t.open()}async closeConfigurator(){var t;null===(t=this._snkConfigurator)||void 0===t||t.close()}async reloadFilterBar(){var t;null===(t=this._snkGrid)||void 0===t||t.reloadFilterBar()}async getFilterBar(){return await this._snkGrid.getFilterBar()}async addCustomEditor(t,i){if(this._guidesViewer&&this._snkGrid)return this._guidesViewer.addCustomEditor(t,i),void this._snkGrid.addCustomEditor(t,i);const s=new Map(this._customEditors);s.set(t,i),this._customEditors=s}async addGridCustomRender(t,i){if(this._snkGrid)return void this._snkGrid.addGridCustomRender(t,i);const s=new Map(this._customRenders);s.set(t,i),this._customRenders=s}async addCustomValueFormatter(t,i){this._snkGrid.addCustomValueFormatter(t,i)}async removeCustomValueFormatter(t){this._snkGrid.removeCustomValueFormatter(t)}async setFieldProp(t,i,s){await this._guidesViewer.setFieldProp(t,i,s)}currentViewModeWatcher(t){this._viewHistory=[...this._viewHistory.slice(-1),t]}async gridToForm(t=!1){this._backToGrid=!t&&await this._viewStack.getSelectedIndex()===u.GRID,this.setViewMode(u.FORM)}async executeAction(t){switch(t){case d.GRID_MODE:return this.setViewMode(u.GRID);case d.FORM_MODE:case d.UPDATE:return this.gridToForm(t!==d.UPDATE);case d.UPDATE_MULTIPLE:return this._dataUnit.isMultipleEdition=!0,this.setViewMode(u.FORM);case d.CONFIGURATOR:return this._snkConfigurator.open();case d.ATTACH:return this.setViewMode(u.ATTACHMENT)}}backView(){const t=this._viewHistory.at(-2)||u.GRID;this.setViewMode(t)}setViewMode(t){this._viewStack.show(t),this._currentViewMode=t,t===u.GRID?(this._dataUnit.isMultipleEdition=!1,this._snkGrid.setFocus()):t===u.FORM&&this._guidesViewer.setFocus(),this.viewModeChanged.emit(t)}openConfig(t){this._snkConfigurator.close(),t===u.GRID?this._snkGrid.showConfig():t===u.FORM&&this._guidesViewer.showFormConfig()}addDataElementID(){o.addIDInfo(this._element,null,{dataUnit:this._dataUnit})}insertionModeHandler(){this.enableGridInsert||this.gridToForm()}cancelHandler(){this._backToGrid&&this.setViewMode(u.GRID)}async getAttachmentRegisterKey(){if(this._snkDataUnit)return(await this._snkDataUnit.getSelectedRecordsIDsInfo()).map((({value:t})=>t)).join("_")}setCustomRenders(){if(this._snkGrid)for(const[t,i]of this._customRenders)this._snkGrid.addGridCustomRender(t,i),this._customRenders.delete(t)}setCustomEditors(){if(this._snkGrid&&this._guidesViewer)for(const[t,i]of this._customEditors)this._guidesViewer.addCustomEditor(t,i),this._snkGrid.addCustomEditor(t,i),this._customEditors.delete(t)}componentDidRender(){this.setCustomRenders(),this.setCustomEditors()}componentWillLoad(){this._application=n.getContextValue("__SNK__APPLICATION__");let t=this._element.parentElement;for(this._application.hasAccess(m.UPDATE,this._resourceID).then((t=>this._canEdit=t));t;){if("SNK-DATA-UNIT"===t.tagName.toUpperCase()){this._snkDataUnit=t,this._snkDataUnit.addEventListener("insertionMode",(()=>this.insertionModeHandler())),this._snkDataUnit.addEventListener("cancelEdition",(()=>this.cancelHandler())),this._snkDataUnit.domainMessagesBuilder=this.domainMessagesBuilder,this._dataUnit=this._snkDataUnit.dataUnit,this._dataState=this._snkDataUnit.dataState,this._dataUnit?this.initDataUnit():this._snkDataUnit.addEventListener("dataUnitReady",(t=>{this._dataUnit=t.detail,this.initDataUnit()})),this._snkDataUnit.addEventListener("dataStateChange",this.handleDataStateChange.bind(this));break}t=t.parentElement}this.configName||(this.configName=this._application.configName)}componentDidLoad(){this.initKeyboardManager()}disconnectedCallback(){this.removeShortcuts()}async handleDataStateChange(t){var i;this._dataState=t.detail,void 0!==this._dataState.selectedRecord&&(this.attachmentRegisterKey=await this.getAttachmentRegisterKey());const s=await this._snkDataUnit.getFieldsWithRmPrecision();for(const t of s||[]){if(!t)continue;const s=null===(i=this._dataState.rowMetadata)||void 0===i?void 0:i.getProp("rm_precision",t);(s||0===s)&&(await this.setFieldProp(t,"precision",s),await this.setFieldProp(t,"prettyPrecision",s))}}async initKeyboardManager(){this._keyboardManager=new r({propagate:!1,element:this._element});const t=this._dataUnit||await this._snkDataUnit.getDataUnit();async function i(){const i=document.activeElement,s=i==document.body;s||i.blur(),await t.saveData(),s||null==i.setFocus?s||i.focus():i.setFocus()}this._keyboardManager&&this._keyboardManager.bind("F6",this.toggleView.bind(this),{description:this.getMessage("snkCrud.shortcuts.toggleView"),element:this._element}).bind("F7",i.bind(this),{description:this.getMessage("snkCrud.shortcuts.saveData"),element:this._element}).bind("ctrl + \\",i.bind(this),{description:this.getMessage("snkCrud.shortcuts.addRecord"),element:this._element}).bind("F8",async function(){t.hasNewRecord()||t.addRecord()}.bind(this),{description:this.getMessage("snkCrud.shortcuts.addRecord"),element:this._element}).bind("F9",t.removeSelectedRecords.bind(t),{description:this.getMessage("snkCrud.shortcuts.removeRecord"),element:this._element}).bind("ctrl + F9",t.removeSelectedRecords.bind(t),{description:this.getMessage("snkCrud.shortcuts.removeRecord"),element:this._element}).bind("F5",(async()=>{const i=await this._viewStack.getSelectedIndex();u.GRID===i&&t.loadData()}),{description:this.getMessage("snkCrud.shortcuts.refreshData"),element:this._element}).bind("Escape",(()=>{t.isDirty()&&t.cancelEdition()}),{debounceTime:1e3,description:this.getMessage("snkCrud.shortcuts.cancelAction"),element:this._element})}getMessage(t,i){if(this.messagesBuilder)return this.messagesBuilder.getMessage(t,i)}async removeShortcuts(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}async toggleView(){const t=await this._viewStack.getSelectedIndex();this.setViewMode(u.GRID===t?u.FORM:u.GRID)}async initDataUnit(){this.addDataElementID(),this.messagesBuilder||(this.messagesBuilder=this._snkDataUnit.messagesBuilder),null==this._resourceID&&(this._resourceID=this._snkDataUnit.resourceID,null==this._resourceID&&(this._resourceID=await this._application.getResourceID()))}handleConfiguratorEvent(t,i){t.stopImmediatePropagation(),"SAVE"!==i?this.configuratorCancel.emit():this.configuratorSave.emit()}render(){if(null!=this._resourceID)return this._snkDataUnit.ignoreSaveMessage=this._currentViewMode===u.GRID&&!this.enableGridInsert,s(e,null,s("ez-view-stack",{ref:t=>this._viewStack=t,"data-element-id":"crud"},s("stack-item",{class:"ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium"},s("snk-grid",{ref:t=>this._snkGrid=t,class:"ez-flex ez-flex--column ez-size-height--full ez-size-width--full",filterBarTitle:this.filterBarTitle,"data-element-id":"crud_grid",configName:this.configName,onGridDoubleClick:()=>this.gridToForm(!0),taskbarManager:this.taskbarManager,onActionClick:t=>this.executeAction(t.detail),messagesBuilder:this.messagesBuilder,actionsList:this.actionsList,statusResolver:this.statusResolver,multipleSelection:this.multipleSelection,presentationMode:this.presentationMode,recordsValidator:this.recordsValidator,selectionToastConfig:this.selectionToastConfig,useEnterLikeTab:this.useEnterLikeTab,canEdit:this._canEdit,resourceID:this._resourceID,disablePersonalizedFilter:this.disablePersonalizedFilter,gridLegacyConfigName:this.gridLegacyConfigName,filterBarLegacyConfigName:this.filterBarLegacyConfigName,autoLoad:this.autoLoad,autoFocus:this.autoFocus,enableGridInsert:this.enableGridInsert,enableLockManagerTaskbarClick:this.enableLockManagerTaskbarClick,enableLockManagerLoadingComp:this.enableLockManagerLoadingComp,strategyExporter:this.strategyExporter,multipleEditionEnabled:this.multipleEditionEnabled,paginationCounterMode:this.paginationCounterMode},s("slot",{name:"GRID_TASKBAR_CUSTOM_ELEMENTS"}),s("slot",{name:"GRID_HEADER_CUSTOM_ELEMENTS"}),s("slot",{name:"SnkGridHeader"}),s("slot",{name:"SnkGridFooter"}),s("slot",{name:"SnkGridTaskBar"}))),s("stack-item",null,s("snk-guides-viewer",{ref:t=>this._guidesViewer=t,entityPath:this._snkDataUnit.entityName,messagesBuilder:this.messagesBuilder,onExit:()=>this.setViewMode(u.GRID),dataState:this._dataState,dataUnit:this._dataUnit,actionsList:this.actionsList,taskbarManager:this.taskbarManager,configName:this.configName,onActionClick:t=>this.executeAction(t.detail),presentationMode:this.presentationMode,"data-element-id":"crud_form",canEdit:this._canEdit,recordsValidator:this.recordsValidator,resourceID:this._resourceID,detailTaskbarCustomContainerId:this.customContainerId,formLegacyConfigName:this.formLegacyConfigName,enableGridInsert:this.enableGridInsert,getCustomTitle:this.setCustomFormTitle,ignoreReadOnlyFormFields:this.ignoreReadOnlyFormFields},s("slot",{name:"GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS"}),s("slot",{name:"SnkFormTaskBar"}))),s("stack-item",{tabIndex:"0"},s("snk-attach",{registerKey:this.attachmentRegisterKey,messagesBuilder:this.messagesBuilder,entityName:this._snkDataUnit.entityName,onBack:this.backView.bind(this)})),s("snk-configurator",{ref:t=>this._snkConfigurator=t,viewMode:this._currentViewMode,messagesBuilder:this.messagesBuilder,onConfigSelected:t=>this.setViewMode(t.detail),onOpenConfig:t=>this.openConfig(t.detail),showActionButtons:this.showActionButtons,onSave:t=>this.handleConfiguratorEvent(t,"SAVE"),onCancel:t=>this.handleConfiguratorEvent(t,"CANCEL"),resourceID:this._resourceID,customContainerId:this.customContainerId,layoutFormConfig:this.layoutFormConfig})),s("div",{id:`${this.customContainerId}`},s("slot",{name:"SnkConfigContainerSlot"}),s("slot",{name:"DETAIL_GRID_HEADER_CUSTOM_ELEMENTS"}),s("slot",{name:"DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS"}),s("slot",{name:"DETAIL_TASKBAR_CUSTOM_ELEMENTS"})))}get _element(){return h(this)}static get watchers(){return{_currentViewMode:["currentViewModeWatcher"]}}};f.style=".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";export{f as snk_crud}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,H as s,g as r}from"./p-d8d8169b.js";import{ElementIDUtils as o,ObjectUtils as l}from"@sankhyalabs/core";import{F as a}from"./p-ff1990ad.js";import{E as n}from"./p-1a68fb59.js";import{C as d}from"./p-3dba3468.js";import{F as h}from"./p-b568c1d4.js";import"./p-c6331595.js";import"./p-0dac8fef.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";const c=class{constructor(e){t(this,e),this.filterChange=i(this,"filterChange",7),this.editPersonalizedFilter=i(this,"editPersonalizedFilter",7),this.addPersonalizedFilter=i(this,"addPersonalizedFilter",7),this.filterItem=void 0,this.configName=void 0,this.resourceID=void 0}observeFilterItem(t){var i,e;this._editor&&(this._editor.config=t),null===(e=null===(i=this._editor)||void 0===i?void 0:i.reloadList)||void 0===e||e.call(i),this.filterChange.emit(t)}getContentEditorConfig(){const t={presentationMode:n.MODAL};switch(this.filterItem.type){case a.BINARY_SELECT:return{tag:"snk-filter-binary-select",props:t};case a.MULTI_SELECT:return{tag:"snk-filter-multi-select"};case a.PERIOD:return{tag:"snk-filter-period",props:t};case a.SEARCH:return{tag:"snk-filter-search"};case a.NUMBER:return{tag:"snk-filter-number",props:t};case a.PERSONALIZED:return this.buildSnkFilterPersonalizedProps();case a.CHECK_BOX_LIST:return{tag:"snk-filter-checkbox-list",props:t};case a.MULTI_LIST:return{tag:"snk-entity-list",props:{maxHeightList:"640px",rightListSlotBuilder:t=>this.buildRightSlot(t)}}}return{tag:"snk-filter-text"}}buildSnkFilterPersonalizedProps(){return{tag:"snk-personalized-filter-editor",props:{onEditFilter:t=>this.editPersonalizedFilter.emit(t.detail),onAddFilter:()=>this.addPersonalizedFilter.emit()}}}isVisible(t){return!!this.filterItem.visible||void 0!==t}updateFilterValue(t){const i=void 0!==(null==t?void 0:t.value)?t.value:t;this.filterItem=Object.assign(Object.assign({},this.filterItem),null!=this.filterItem.groupedItems?{visible:i>0,value:i,groupedItems:t.items}:{value:this.filterItem.type===(a.SEARCH||a.CHECK_BOX_LIST)?t:i,visible:this.isVisible(i)})}handleDeleteFilter(t,i){i===a.PERSONALIZED&&d.removePersonalizedFilter(t,this.resourceID,this.configName)}componentDidLoad(){if(this._element){o.addIDInfo(this._element);const t=this._element.getAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME);this._idContentEditor=`${t}_${this.filterItem.id}`}}buildRightSlot(t){return e("ez-icon",{iconName:"delete",onClick:()=>this.removeValueFromConfig(t)})}removeValueFromConfig(t){var i,e,s;const r=null===(e=null===(i=this.filterItem)||void 0===i?void 0:i.value)||void 0===e?void 0:e.findIndex((({id:i})=>i===t.id)),o=l.copy(this.filterItem);null===(s=null==o?void 0:o.value)||void 0===s||s.splice(r,1),this.updateFilterValue(o.value)}canShowDetailModal(){const{CUSTOM_FILTER:t,OTHER_FILTERS:i}=h;return![t,i].includes(this.filterItem.filterType)&&this.filterItem.type!==a.BINARY_SELECT}render(){const{tag:t,props:i}=this.getContentEditorConfig();return e(s,null,e("div",{class:"ez-flex ez-flex--column grow"},this.canShowDetailModal()&&e("div",{class:"col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center"},e("div",{class:"ez-title ez-title--small ez-title--primary grow"},this.filterItem.detailModal)),e(t,Object.assign({ref:t=>this._editor=t,config:this.filterItem,value:this.filterItem.value,onValueChanged:t=>this.updateFilterValue(t.detail),"data-element-id":this._idContentEditor},i))))}get _element(){return r(this)}static get watchers(){return{filterItem:["observeFilterItem"]}}};c.style=".grow{flex-grow:1}.gap{gap:4px}";export{c as snk_filter_modal_item}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as s,g as e}from"./p-d8d8169b.js";import{ElementIDUtils as h}from"@sankhyalabs/core";import{F as r}from"./p-ff1990ad.js";import{E as a}from"./p-1a68fb59.js";import{F as l}from"./p-fa80e546.js";const n=class{constructor(s){i(this,s),this.valueChanged=t(this,"valueChanged",7),this._startIntervalLabel="Inicial",this._endIntervalLabel="Final",this._toLabel="até",this.config=void 0,this.getMessage=void 0,this.value=void 0,this.presentationMode=a.CHIP}ezChangeListener(i){if(this.getVariation()===l.INTERVAL){const i=this._startInterval.value,t=this._endInterval.value;return this.value=isNaN(i)&&isNaN(t)?void 0:{start:i,end:t},void this.valueChanged.emit(this.value)}this.value=i.detail,this.valueChanged.emit(this.value)}async show(){this.getVariation()!==l.INTERVAL?this._numberElement.setFocus():this._startInterval.setFocus()}getIntervalValue(i){const t=this.value?this.value[i]:null;return null!=t?t:null}buildLabel(){if(this.presentationMode===a.CHIP)return s("label",{class:"ez-text ez-text--medium ez-text--primary ez-margin--medium"},this._toLabel)}getVariation(){var i,t;return null!==(t=null===(i=this.config.props)||void 0===i?void 0:i.variation)&&void 0!==t?t:l.DEFAULT}componentWillLoad(){this.getMessage&&(this._startIntervalLabel=this.getMessage("snkFilterBar.labelStart"),this._endIntervalLabel=this.getMessage("snkFilterBar.labelEnd"),this._toLabel=this.getMessage("snkFilterBar.labelTo"))}componentDidLoad(){this._element&&h.addIDInfo(this._element,"filterContentEditor")}render(){var i,t,e;if(this.config&&this.config.type===r.NUMBER)return this.getVariation()===l.INTERVAL?s("div",{class:"ez-col ez-col--nowrap"},s("ez-number-input",{id:`${this.config.id}_start`,class:this.presentationMode===a.MODAL?"ez-padding--small":"",label:this._startIntervalLabel,ref:i=>this._startInterval=i,value:this.getIntervalValue("start"),precision:null===(i=this.config.props)||void 0===i?void 0:i.precision}),this.buildLabel(),s("ez-number-input",{id:`${this.config.id}_end`,class:this.presentationMode===a.MODAL?"ez-padding--small":"",label:this._endIntervalLabel,ref:i=>this._endInterval=i,value:this.getIntervalValue("end"),precision:null===(t=this.config.props)||void 0===t?void 0:t.precision})):s("ez-number-input",{id:this.config.id,ref:i=>this._numberElement=i,label:this.config.label,value:this.config.value,precision:null===(e=this.config.props)||void 0===e?void 0:e.precision})}get _element(){return e(this)}};export{n as snk_filter_number}
@@ -0,0 +1 @@
1
+ export{S as snk_guides_viewer}from"./p-6a015ba2.js";import"./p-d8d8169b.js";import"@sankhyalabs/core";import"./p-1210500e.js";import"./p-3dba3468.js";import"./p-c6331595.js";import"./p-0dac8fef.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-ff1990ad.js";import"./p-9019a32f.js";import"@sankhyalabs/ezui/dist/collection/utils/form";import"./p-1a0caadb.js";import"./p-7de79adf.js";import"./p-0f3698af.js";import"./p-a349689a.js";import"./p-ba4979b4.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"./p-b35574b5.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";import"@sankhyalabs/core/dist/dataunit/DataUnit";import"@sankhyalabs/ezui/dist/collection/utils";
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e}from"./p-d8d8169b.js";import{ApplicationContext as a,DataType as s,Action as n,UserInterface as o,StringUtils as r,DataUnitLoaderUtils as l,DataUnit as d}from"@sankhyalabs/core";import{D as h,S as c}from"./p-0dac8fef.js";import{S as v}from"./p-ba4979b4.js";import"./p-0f3698af.js";import{P as u,D as m,I as A}from"./p-b35574b5.js";import"./p-ff1990ad.js";import"./p-c6331595.js";import{V as O}from"./p-9019a32f.js";import{A as p}from"./p-c9e6d720.js";import{T as w}from"./p-7de79adf.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";import"./p-a349689a.js";class k{constructor(t){this.dataUnitName=t}async save({dataUnit:t,record:i,updatingFields:e,operation:a}){var s,n;const o="INSERT"==a,r=o?e:i;if(!o&&(null==e?void 0:e.DESCRICAO)&&(null==e?void 0:e.DESCRICAO)!==(null==i?void 0:i.DESCRICAO))throw new Error(v.DESCRIPTION_CANNOT_BE_CHANGED);const l={anexo:{codata:o?null==e?void 0:e.REGISTER_KEY:null==i?void 0:i.CODATA,sequencia:(null==r?void 0:r.SEQUENCIA)||"0",tipo:(null==r?void 0:r.TIPO)||"N",descricao:null==r?void 0:r.DESCRICAO,arquivo:null===(n=null===(s=e.CAMINHO_ARQUIVO)||void 0===s?void 0:s[0])||void 0===n?void 0:n.name,ehInclusao:o?"S":"N",ehArquivoRepositorio:"N"}};return new Promise(((i,a)=>{h.get().callServiceBroker("Attach.save",JSON.stringify(l)).then((a=>{var s;return i([Object.assign(Object.assign(Object.assign({},a),e),{__owner__dataunit__name__:null!==(s=this.dataUnitName)&&void 0!==s?s:t})])})).catch((t=>a(t)))}))}async edit(t){throw new Error("Method not implemented.")}async delete(t){var i={anexo:{codata:t.CODATA,tipo:t.TIPO,descricao:t.DESCRICAO}};const e=await h.get().callServiceBroker("Attach.remove",JSON.stringify(i));return Promise.resolve(e)}async getDownloadKey(t){var i,e,a;if("S"==t.EHARQUIVOREPOSITORIO){const a={config:{path:t.ARQUIVO,tipoconteudo:t.TIPOCONTEUDO}},s=await h.get().callServiceBroker("RepositorioArquivoSP.abreArquivo",JSON.stringify(a));return Promise.resolve({chave:{valor:null===(e=null===(i=null==s?void 0:s.responseBody)||void 0===i?void 0:i.chave)||void 0===e?void 0:e.valor}})}const s={anexo:{codata:t.CODATA,codemp:t.CODEMP,sequencia:t.SEQUENCIA,tipo:t.TIPO,descricao:t.DESCRICAO,tipoConteudo:t.TIPOCONTEUDO}},n=await h.get().callServiceBroker("Attach.view",JSON.stringify(s));return(null==n?void 0:n.chaveAnexo)?Promise.resolve({chave:{valor:null===(a=null==n?void 0:n.chaveAnexo)||void 0===a?void 0:a.idChaveAnexo}}):Promise.reject(new Error("File not found."))}}const S="AnexoSistemaSP.salvar",I="AnexoSistemaSP.excluir",f="AnexoSistemaSP.baixar";class y{constructor(t,i){var e;this.entityName=t,this.dataUnitName=i,this.validateFields=t=>{if(t.LINK&&t.NOMEARQUIVO)throw new Error(v.LINK_AND_FILE_AT_THE_SAME_TIME);if(!t.LINK&&!t.NOMEARQUIVO)throw new Error(v.ANY_LINK_OR_FILE_FILLED);if(!this._registerKey)throw new Error("Register key can not be null")},this.resourceID=window.resourceID||(null===(e=window.workspace)||void 0===e?void 0:e.resourceID)}set registerKey(t){this._registerKey=t}async save(t){var i,e;let{updatingFields:a}=t;a=Object.assign(Object.assign({},a),{NOMEARQUIVO:null===(i=a.NOMEARQUIVO)||void 0===i?void 0:i[0]});try{this.validateFields(a);const t=a.LINK?null:a.NOMEARQUIVO,i={serviceName:S,requestBody:{params:{resourceID:this.resourceID,description:a.DESCRICAO,fileSelect:t?1:0,keySession:null===(e=null==t?void 0:t.properties)||void 0===e?void 0:e.fileNameTmp,nameAttach:null==t?void 0:t.name,link:a.LINK,nameEntity:this.entityName,pkEntity:this._registerKey,typeAcess:a.TIPOACESSO,typeApres:a.TIPOAPRES}}},s=await h.get().callServiceBroker(S,JSON.stringify(i));return Promise.resolve([Object.assign(Object.assign(Object.assign({},s),a),{ARQUIVOOULINK:a.LINK?a.LINK:null==t?void 0:t.name,__owner__dataunit__name__:this.dataUnitName})])}catch(t){return Promise.reject(t)}}async edit(t){var i,e,a;let{updatingFields:s,record:n}=t;const o=t=>void 0!==s[t]?s[t]:n[t],r=o("NOMEARQUIVO"),l=null===(e=null===(i=s.NOMEARQUIVO)||void 0===i?void 0:i[0])||void 0===e?void 0:e.downloadURL;s=Object.assign(Object.assign({},s),{DESCRICAO:o("DESCRICAO"),LINK:o("LINK"),TIPOACESSO:o("TIPOACESSO"),TIPOAPRES:o("TIPOAPRES"),CHAVEARQUIVO:n.CHAVEARQUIVO,NOMEARQUIVO:null==r?void 0:r[0]});const d=s.LINK?null:s.NOMEARQUIVO;try{this.validateFields(s);const t={serviceName:S,requestBody:{params:{resourceID:this.resourceID,nuAttach:null==n?void 0:n.NUATTACH,description:s.DESCRICAO,fileSelect:l?1:0,keySession:null===(a=null==d?void 0:d.properties)||void 0===a?void 0:a.fileNameTmp,keyAttach:s.CHAVEARQUIVO,nameAttach:null==d?void 0:d.name,link:s.LINK,nameEntity:this.entityName,pkEntity:this._registerKey,typeAcess:s.TIPOACESSO,typeApres:s.TIPOAPRES}}},i=await h.get().callServiceBroker(S,JSON.stringify(t));return Promise.resolve([Object.assign(Object.assign(Object.assign({},i),s),{ARQUIVOOULINK:s.LINK?s.LINK:null==d?void 0:d.name,__owner__dataunit__name__:this.dataUnitName})])}catch(t){return Promise.reject(t)}}delete(t){var i;const e=(null===(i=t.NOMEARQUIVO)||void 0===i?void 0:i[0])||{},a={serviceName:I,requestBody:{paramsDelete:{keyAttach:t.CHAVEARQUIVO,nameAttach:null==e?void 0:e.name,nameEntity:t.NOMEINSTANCIA,nuAttach:t.NUATTACH,pkEntity:t.PKREGISTRO}}};return new Promise(((t,i)=>{h.get().callServiceBroker(I,JSON.stringify(a)).then((i=>t(i))).catch((t=>i(t)))}))}getDownloadKey(t){var i;const e=(null===(i=t.NOMEARQUIVO)||void 0===i?void 0:i[0])||{},a={serviceName:f,requestBody:{paramsDown:{nameAttach:null==e?void 0:e.name,nameEntity:t.NOMEINSTANCIA,nuAttach:t.NUATTACH,pkEntity:t.PKREGISTRO,keyAttach:t.CHAVEARQUIVO}}};return new Promise(((t,i)=>{h.get().callServiceBroker(f,JSON.stringify(a)).then((i=>t(i))).catch((t=>i(t)))}))}}class b{constructor(t,i){this.entityName=t,this.getMessage=i,this._application=a.getContextValue("__SNK__APPLICATION__")}initLoaders(t,i,e){this.loader||(this.loader=t.dataLoader),t.dataLoader=(t,i)=>this.dataLoader(t,i),t.saveLoader=(t,a)=>this.saveLoader(a,i).then((t=>(t.length&&e(),t))),t.removeLoader=(t,a)=>this.removeLoader(t,a,i).then((t=>(t.length&&e(),t)))}metadataLoader(t){throw new Error("Method not implemented.")}dataLoader(t,i){return new Promise((e=>{this.loader(t,i).then((t=>{const i=((null==t?void 0:t.records)||[]).map((t=>{let i;return t.LINK||(i=[{name:t.NOMEARQUIVO}]),Object.assign(Object.assign({},t),{ARQUIVOOULINK:t.LINK?t.LINK:t.NOMEARQUIVO,NOMEARQUIVO:i})}));e(Object.assign(Object.assign({},t),{records:i}))}))}))}saveLoader(t,i){return new Promise((e=>{var a;const s=Array.isArray(t)?t[0]:{};((null===(a=null==s?void 0:s.record)||void 0===a?void 0:a.NUATTACH)>=0?i.edit.bind(i):i.save.bind(i))(s).then((t=>{e(t)})).catch((t=>t.message===v.LINK_AND_FILE_AT_THE_SAME_TIME?(this._application.alert(this.getMessage("snkAttach.alertValidation.fileAndLinkAtTheSameTime.title"),this.getMessage("snkAttach.alertValidation.fileAndLinkAtTheSameTime.message")),e([])):t.message===v.ANY_LINK_OR_FILE_FILLED?(this._application.alert(this.getMessage("snkAttach.alertValidation.anyLinkOrFileFilled.title"),this.getMessage("snkAttach.alertValidation.anyLinkOrFileFilled.message")),e([])):t.message?(this._application.error(t.title||t.name,t.message),e([])):void e([])))}))}removeLoader(t,i,e){return new Promise((a=>{const{records:s}=t.getSelectionInfo(),n=s[0];e.delete(n).then((()=>(u.removeRecords(t,[n]),a(i))))}))}getFilters(t){return[{name:"AttachmentsByPK",expression:"this.PKREGISTRO = :PKREGISTRO",params:[{name:"PKREGISTRO",dataType:s.TEXT,value:`${t}_${this.entityName}`}]}]}getInterceptions(t,i,e){return new Promise((a=>i.type===n.EDITION_CANCELED?t.isDirty()?this._application.confirm(this.getMessage("snkAttach.cancelConfirmation.title"),this.getMessage("snkAttach.cancelConfirmation.message")).then((t=>t?(e.goToView(O.GRID),a(i)):a(void 0))):a(i):i.type===n.DATA_SAVED?(t.loadData(),a(i)):void a(i)))}}let _;const g=t=>(_||(_=new c),_.getMessage(t)),N={grid:{columns:[{name:"CODATA",orderIndex:0,width:0},{name:"DESCRICAO",orderIndex:1,width:0},{name:"ARQUIVO",orderIndex:2,width:0},{name:"DTALTER",orderIndex:3,width:0},{name:"USUARIO",orderIndex:4,width:0}]},form:{emptyConfig:!1,fields:[{name:"DESCRICAO",label:g("snkAttach.attachMetadata.lblDescription"),visible:!0,readOnly:!1,required:!0},{name:"CAMINHO_ARQUIVO",label:g("snkAttach.attachMetadata.lblFile"),visible:!0,readOnly:!1,required:!0}]}},E={name:"Attach",label:"Attach List",fields:[{name:"CODATA",label:g("snkAttach.attachMetadata.lblCode"),dataType:s.TEXT},{name:"DESCRICAO",label:g("snkAttach.attachMetadata.lblDescription"),dataType:s.TEXT,readOnly:!1},{name:"ARQUIVO",label:g("snkAttach.attachMetadata.lblFileOrLink"),dataType:s.TEXT},{name:"USUARIO",label:g("snkAttach.attachMetadata.lblUser"),dataType:s.TEXT},{name:"DTALTER",label:g("snkAttach.attachMetadata.lblDate"),dataType:s.TEXT},{name:"CAMINHO_ARQUIVO",label:g("snkAttach.attachMetadata.lblFileUpload"),dataType:s.OBJECT,userInterface:o.FILE,readOnly:!1,required:!0,visible:!0,properties:{subTitle:g("snkAttach.attachMetadata.lblSubTitle"),MAX_FILES:1,STORAGESTRATEGY:"SESSION",INTERNAL_FILENAME:"Attach.upload"}}]};class C{constructor(t){this.getMessage=t,this._records=[],this._application=a.getContextValue("__SNK__APPLICATION__")}initLoaders(t,i,e){t.metadataLoader=t=>this.metadataLoader(t),t.dataLoader=(t,i)=>this.dataLoader(t,i),t.saveLoader=(t,a)=>this.saveLoader(a,i).then((t=>(t.length&&e(),t))),t.removeLoader=(t,a)=>this.removeLoader(t,a,i).then((t=>(t.length&&e(),t)))}metadataLoader(t){return Promise.resolve(E)}async dataLoader(t,i){if(!i.source)return Promise.resolve({records:this._records});if(!Number.isNaN(Number(i.source))){const t={criteria:{codata:i.source,tipoAnexo:"N"}},e=await this._application.getDataFetcher(),{anexos:{anexo:a=[]}}=await e.callServiceBroker("Attach.load",JSON.stringify(t)),s=[];a.forEach((t=>{s.push(Object.assign({__record__id__:r.generateUUID(),CAMINHO_ARQUIVO:[{name:null==t?void 0:t.ARQUIVO}]},t))})),this._records=s}return l.buildLoadDataResponse(this._records,t,i)}saveLoader(t,i){return new Promise((e=>{const a=Array.isArray(t)?t[0]:{};i.save(a).then(e).catch((t=>t.message===v.DESCRIPTION_CANNOT_BE_CHANGED?(this._application.alert(this.getMessage("snkAttach.alertValidation.descriptionCannotBeChanged.title"),this.getMessage("snkAttach.alertValidation.descriptionCannotBeChanged.message")),e([])):t.message===v.LINK_AND_FILE_AT_THE_SAME_TIME?(this._application.alert(this.getMessage("snkAttach.alertValidation.fileAndLinkAtTheSameTime.title"),this.getMessage("snkAttach.alertValidation.fileAndLinkAtTheSameTime.message")),e([])):t.message===v.ANY_LINK_OR_FILE_FILLED?(this._application.alert(this.getMessage("snkAttach.alertValidation.anyLinkOrFileFilled.title"),this.getMessage("snkAttach.alertValidation.anyLinkOrFileFilled.message")),e([])):t.message?(this._application.error(t.title||t.name,t.message),e([])):void e([])))}))}removeLoader(t,i,e){return new Promise((a=>{t.getSelectionInfo().records.forEach((async t=>{this._application.hasAccess(p.REMOVE).then((async s=>{s&&(await e.delete(t),a(i))}))}))}))}getFilters(){throw new Error("Method not implemented.")}getInterceptions(t,i,e){return new Promise((a=>{var s,o,r,l,d,h;switch(i.type){case n.EDITION_CANCELED:return t.isDirty()?this._application.confirm(this.getMessage("snkAttach.cancelConfirmation.title"),this.getMessage("snkAttach.cancelConfirmation.message")).then((t=>t?(e.goToView(O.GRID),a(i)):a(void 0))):a(i);case n.DATA_SAVED:return t.loadData(void 0,void 0,!1,null===(r=null===(o=null===(s=null==i?void 0:i.payload)||void 0===s?void 0:s.records)||void 0===o?void 0:o[0])||void 0===r?void 0:r.REGISTER_KEY),a(i);case n.RECORDS_REMOVED:return t.loadData(void 0,void 0,!1,null===(h=null===(d=null===(l=null==i?void 0:i.payload)||void 0===l?void 0:l.cachedRecords)||void 0===d?void 0:d[0])||void 0===h?void 0:h.CODATA),a(i)}a(i)}))}}let L;const R=t=>{var i;if(!L){const t=a.getContextValue("__SNK__APPLICATION__");L=null==t?void 0:t.messagesBuilder}return null===(i=null==L?void 0:L.getMessage)||void 0===i?void 0:i.call(L,t,null)},T={DOWNLOAD:{hint:R("snkAttach.taskbar.titleDownload"),name:"DOWNLOAD",iconName:"file-download"},LINK:{hint:R("snkAttach.taskbar.titleLink"),name:"LINK",iconName:"launch"}},x=()=>{const t=[w.REMOVE,"DOWNLOAD","LINK"];return{getButtons:(t,i,e)=>{const a=e.indexOf(w.REFRESH);if((null==i?void 0:i.insertionMode)||(null==i?void 0:i.isDirty))return e.reverse();-1!==a&&e.splice(a,1);const{selectedRecord:s}=i||{},n=(null==s?void 0:s.LINK)?T.LINK:T.DOWNLOAD;e.splice(e.indexOf(w.DIVIDER)+1,0,w.REMOVE,n,w.DIVIDER);const o=[w.CLONE,w.DATA_EXPORTER],r=Array.from(new Set(e.filter((t=>!o.includes(t)))));return r.splice(r.indexOf(n)+1,0,w.DIVIDER),r},isEnabled:(i,e,a)=>{const s=void 0!==(null==e?void 0:e.selectedRecord);return!(t.includes(a)&&!s)}}},P={grid:{columns:[{name:"ARQUIVOOULINK",orderIndex:0,width:0},{name:"DESCRICAO",orderIndex:1,width:0},{name:"DHCAD",orderIndex:2,width:0},{name:"DHALTER",orderIndex:3,width:0},{name:"TIPOAPRES",orderIndex:4,width:0},{name:"TIPOACESSO",orderIndex:5,width:0},{name:"CODUSU",orderIndex:6,width:0},{name:"CODUSUALT",orderIndex:7,width:0}]},form:{emptyConfig:!1,fields:[{name:"DESCRICAO",required:!0},{name:"TIPOAPRES",required:!0},{name:"TIPOACESSO",required:!0},{name:"LINK"},{name:"NOMEARQUIVO"}]}},D=class{constructor(e){t(this,e),this.back=i(this,"back",7),this.handleTaskbarClick=async({detail:t})=>{if(["DOWNLOAD","LINK"].includes(t))return this.downloadAttachment(this._currentDataUnit.getSelectedRecord());"Attach"===this.fetcherType&&["SAVE"].includes(t)&&this._currentDataUnit.isDirty()&&await this._currentDataUnit.setFieldValue("REGISTER_KEY",this.registerKey)},this.handleBack=()=>{this._currentDataUnit.cancelEdition().then((t=>{t&&this.back.emit()}))},this.handleFinish=()=>{if(!this._currentDataUnit.isDirty())return this.back.emit();this.validateAnexoSistema()&&this._currentDataUnit.saveData().then((()=>{this.showFinishedToast(),this.back.emit()}))},this.gridLegacyConfigName=void 0,this.fetcherType=void 0,this.fetcher=void 0,this.dataUnit=void 0,this.dataUnitBuilder=void 0,this.registerKey=void 0,this.entityName=void 0,this.messagesBuilder=void 0,this._currentFetcher=void 0,this._currentDataUnit=void 0,this.crudConfig=void 0}async registerKeyWatcher(t,i){var e;null==this._currentDataUnit&&this.loadAttachmentDataUnit(),i!==t&&(this._currentFetcher instanceof y&&(this._currentFetcher.registerKey=t),await(null===(e=this._currentDataUnit)||void 0===e?void 0:e.loadData()))}getAnexoSistemaFetcherInstance(){var t;const i=new y(this.entityName,null===(t=this._currentDataUnit)||void 0===t?void 0:t.name);return i.registerKey=this.registerKey,i}async initAttach(){var t,i,e,a,s;if(this.fetcherType||this.registerKey){if(this.fetcherType||(this.fetcherType="AnexoSistema"),this.returnToGridMode(),"AnexoSistema"===this.fetcherType)return this._currentFetcher=this.getAnexoSistemaFetcherInstance(),null===(t=this._currentDataUnitBuilder)||void 0===t||t.initLoaders(this._currentDataUnit,this._currentFetcher,this.returnToGridMode.bind(this)),void await(null===(i=this._currentDataUnit)||void 0===i?void 0:i.loadData());if("Attach"===this.fetcherType&&(null===(e=this.registerKey)||void 0===e?void 0:e.split("_").length)>1)return;await(null===(a=this._currentDataUnit)||void 0===a?void 0:a.loadMetadata()),await(null===(s=this._currentDataUnit)||void 0===s?void 0:s.loadData(void 0,void 0,!0,this.registerKey))}}getMessage(t,i){if(this.messagesBuilder)return this.messagesBuilder.getMessage(t,i)}showFinishedToast(){this._application.info(this.getMessage("snkAttach.finishedMessage"),{iconName:"check"})}downloadAttachment(t){if(!t)throw new Error(this.getMessage("snkAttach.alertValidation.noRecordSelected.message"));t.LINK?window.open(`${t.LINK}`):this._currentFetcher.getDownloadKey(t).then((({chave:i})=>{var e;let a=!1;(null===(e=null==t?void 0:t.ARQUIVO)||void 0===e?void 0:e.endsWith(".pdf"))||(a=!0),window.open(`/mge/visualizadorArquivos.mge?chaveArquivo=${i.valor}${a?"&forcarDownload=S":""}`)}))}returnToGridMode(){var t;null===(t=this._currentDataUnit)||void 0===t||t.clearSelection(),this._crudElement&&this._crudElement.goToView(O.GRID)}async loadAttachmentDataUnit(){try{switch(this.fetcherType){case"AnexoSistema":await this.loadAnexoSistema();break;case"Attach":await this.loadAttach();break;default:this._currentFetcher=this.fetcher,this._currentDataUnit=this.dataUnit,this._currentDataUnitBuilder=this.dataUnitBuilder}}catch(t){throw new Error("There was an error while creating the data unit")}}async loadAnexoSistema(){var t,i;let e;this._currentDataUnit=(new m).getDataUnit("AnexoSistema","br.com.sankhya.core.v3.anexoSistema"),this._currentFetcher=this.getAnexoSistemaFetcherInstance(),this._currentDataUnit.metadata||(await(null===(t=this._currentDataUnit)||void 0===t?void 0:t.loadMetadata()),this.crudConfig=this.entityName?{form:null==P?void 0:P.form}:Object.assign({},P),e={grid:null==P?void 0:P.grid}),this.initDataUnitLoaders(),this._currentDataUnit.addFilterProvider({getFilter:()=>this._currentDataUnitBuilder.getFilters(this.registerKey)}),this._currentDataUnit.addInterceptor({interceptAction:t=>this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit,t,this._crudElement)}),await(null===(i=this._currentDataUnit)||void 0===i?void 0:i.loadData()),this.disableEditFieldsNotInForm(e)}async loadAttach(){var t,i;let e;this._currentFetcher=new k,this._currentDataUnit=new d(A.IN_MEMORY_DATA_UNIT_NAME),this._currentDataUnit.pageSize=150,this.initDataUnitLoaders(),this._currentDataUnit.addInterceptor({interceptAction:t=>{var i;return t.type===n.METADATA_LOADED&&(this.crudConfig=this.entityName?{form:null==N?void 0:N.form}:Object.assign({},N),e={grid:null==N?void 0:N.grid},null===(i=this._crudElement)||void 0===i||i.updateConfig()),this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit,t,this._crudElement)}}),this._currentDataUnit.metadata||(await(null===(t=this._currentDataUnit)||void 0===t?void 0:t.loadMetadata()),this.crudConfig=this.entityName?{form:null==N?void 0:N.form}:Object.assign({},N),e={grid:null==N?void 0:N.grid},await(null===(i=this._currentDataUnit)||void 0===i?void 0:i.loadData(void 0,void 0,!0,this.registerKey)),this.disableEditFieldsNotInForm(e))}initDataUnitLoaders(){var t,i;"AnexoSistema"===this.fetcherType&&(this._currentFetcher=this.getAnexoSistemaFetcherInstance(),this._currentDataUnitBuilder=new b(this.entityName,this.getMessage.bind(this)),null===(t=this._currentDataUnitBuilder)||void 0===t||t.initLoaders(this._currentDataUnit,this._currentFetcher,this.returnToGridMode.bind(this))),"Attach"===this.fetcherType&&(this._currentFetcher=new k,this._currentDataUnitBuilder=new C(this.getMessage.bind(this)),null===(i=this._currentDataUnitBuilder)||void 0===i||i.initLoaders(this._currentDataUnit,this._currentFetcher,(async()=>{this.returnToGridMode(),await this._currentDataUnit.loadData(void 0,void 0,!0,this.registerKey)})))}disableEditFieldsNotInForm(t){var i,e,a,s,n;const o=(null===(e=null===(i=this._crudElement)||void 0===i?void 0:i.gridConfig)||void 0===e?void 0:e.columns)||(null===(a=null==t?void 0:t.grid)||void 0===a?void 0:a.columns)||(null===(n=null===(s=this.crudConfig)||void 0===s?void 0:s.grid)||void 0===n?void 0:n.columns);this.getGridLegacyConfigName()&&this._currentDataUnit.disableField("ARQUIVOOULINK"),null==o||o.forEach((t=>{var i,e;const a=t.name;(null===(e=null===(i=this.crudConfig)||void 0===i?void 0:i.form)||void 0===e?void 0:e.fields.some((t=>(null==t?void 0:t.name)===a)))||this._currentDataUnit.disableField(a)}))}validateAnexoSistema(){var t;if(this._currentFetcher instanceof y)try{let i=this._currentDataUnit.getSelectedRecord();i=Object.assign(Object.assign({},i),{NOMEARQUIVO:null===(t=i.NOMEARQUIVO)||void 0===t?void 0:t[0]}),this._currentFetcher.validateFields(i)}catch(t){if(t.message===v.LINK_AND_FILE_AT_THE_SAME_TIME)return this._application.alert(this.getMessage("snkAttach.alertValidation.fileAndLinkAtTheSameTime.title"),this.getMessage("snkAttach.alertValidation.fileAndLinkAtTheSameTime.message")),!1;if(t.message===v.ANY_LINK_OR_FILE_FILLED)return this._application.alert(this.getMessage("snkAttach.alertValidation.anyLinkOrFileFilled.title"),this.getMessage("snkAttach.alertValidation.anyLinkOrFileFilled.message")),!1}return!0}async componentWillLoad(){this._application=a.getContextValue("__SNK__APPLICATION__"),await this.initAttach()}componentWillRender(){this.fetcherType||(this.fetcherType="AnexoSistema"),null==this._currentDataUnit&&this.loadAttachmentDataUnit()}async handleOnDataStateChange({detail:t}){"Attach"===this.fetcherType&&(t.insertionMode?this._currentDataUnit.enableField("DESCRICAO"):this._currentDataUnit.disableField("DESCRICAO"),await this._currentDataUnit.loadMetadata())}getGridLegacyConfigName(){return this.gridLegacyConfigName?this.gridLegacyConfigName:this.entityName?"GrdCfgHtml5:grdcfg.dynaform.anexo."+this.entityName:this.entityName}render(){var t,i;return this._currentDataUnit?e("main",{class:"snk-attach__main"},e("header",{class:"snk-attach__header"},e("snk-simple-bar",{onExit:this.handleBack,messagesBuilder:this.messagesBuilder},e("div",{slot:"rightSlot"},e("ez-button",{class:"ez-button--primary",label:this.getMessage("snkAttach.finish"),onClick:this.handleFinish})))),e("div",{class:"snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column"},e("div",{class:"ez-box__container"},e("snk-simple-crud",{ref:t=>this._crudElement=t,dataUnit:this._currentDataUnit,taskbarManager:x(),gridConfig:null===(t=this.crudConfig)||void 0===t?void 0:t.grid,formConfig:null===(i=this.crudConfig)||void 0===i?void 0:i.form,useCancelConfirm:!1,onActionClick:this.handleTaskbarClick,messagesBuilder:this.messagesBuilder,onDataStateChange:this.handleOnDataStateChange.bind(this),multipleSelection:!0,configName:this.entityName,ignoreReadOnlyFormFields:!!this.entityName,gridLegacyConfigName:this.getGridLegacyConfigName()},e("div",{slot:"snkSimpleCrudHeader"},e("div",{class:"ez-flex ez-flex--column"},e("span",{class:"ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium"},this.getMessage("snkAttach.title")),e("span",{class:"ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium"},this.getMessage("snkAttach.description")))))))):null}static get watchers(){return{registerKey:["registerKeyWatcher"]}}};D.style=".snk-attach__header.sc-snk-attach,.snk-attach__crud-section.sc-snk-attach{padding:0 var(--space--lg)}.snk-attach__file-info.sc-snk-attach{padding:var(--space--small);max-width:50%}.snk-attach__main.sc-snk-attach{height:85%}.ez-box__container.sc-snk-attach{height:100%}";export{D as snk_attach}
@@ -0,0 +1 @@
1
+ import{r as o,c as r,h as t,g as i}from"./p-d8d8169b.js";import{ApplicationContext as n}from"@sankhyalabs/core";import{V as a}from"./p-9019a32f.js";import{A as s}from"./p-dc36cfbf.js";const l=class{constructor(t){o(this,t),this.configSelected=r(this,"configSelected",7),this.openConfig=r(this,"openConfig",7),this.save=r(this,"save",7),this.cancel=r(this,"cancel",7),this._opened=!1,this._permissions=void 0,this.showActionButtons=!1,this.configName=void 0,this.resourceID=void 0,this.viewMode=a.GRID,this.customContainerId=void 0,this.layoutFormConfig=!1,this.messagesBuilder=void 0}async open(){this._opened=!0,this.configSelected.emit(this.getViewModeValue()),this.modal.heightMode="full"}async close(){this.closeConfig()}closeConfig(){this._opened=!1}onViewModeChanged(o){this.viewMode=null==o?void 0:o.detail,this.configSelected.emit(this.viewMode)}onClickOpenConfig(){this.openConfig.emit(this.viewMode)}isAllowed(o){return!s[o]||!!this._permissions&&(this._permissions.isSup||this._permissions[o])}enableModeConfig(){return!(!this.isAllowed(s.CONFIG_GRID)||!this.isAllowed(s.CONFIG))}getViewModeValue(){return null!=this._permissions&&(this.isAllowed(s.CONFIG_GRID)?this.isAllowed(s.CONFIG)||(this.viewMode=a.GRID):this.viewMode=a.FORM),this.viewMode}getMessage(o){var r;return null===(r=this.messagesBuilder)||void 0===r?void 0:r.getMessage(o,{})}handleSave(){this.layoutFormConfig&&this._snkLayoutFormConfig.save(),this.save.emit()}componentWillLoad(){this._application=n.getContextValue("__SNK__APPLICATION__"),this._application?this._application.getAllAccess(this.resourceID).then((o=>this._permissions=o)):this._permissions={}}componentDidRender(){if(!this.customContainerId)return;const o=document.querySelector(`#${this.customContainerId}`),r=null==o?void 0:o.querySelector("#SnkConfigContainerSlot");if(!r)return;const t=r.firstElementChild;if(!t)return;const i=this._element.querySelector("#slotContainer");null==i||i.appendChild(t)}render(){return t("ez-modal",{ref:o=>this.modal=o,opened:this._opened,"close-esc":!1,"close-outside-click":!1,"modal-size":"small",scrim:"light",onEzCloseModal:()=>this.closeConfig()},t("div",{class:"snk-configurator"},t("div",{class:"snk-configurator__header"},t("label",{class:"snk-configurator__title"},this.getMessage("snkConfigurator.titleConfigurations")),t("div",{class:"snk-configurator__button-close"},t("ez-button",{mode:"icon",iconName:"close",size:"medium",onClick:()=>this.closeConfig()}))),t("div",{class:"snk-configurator__main"},t("ez-collapsible-box",{boxBordered:!0,label:this.getMessage("snkConfigurator.subTitleModeConfig"),headerSize:"medium",class:"snk-configurator__collapsable-box"},t("ez-radio-button",{value:this.getViewModeValue().toString(),onEzChange:o=>this.onViewModeChanged(o),enabled:this.enableModeConfig()},t("ez-radio-button-option",{label:this.getMessage("snkConfigurator.labelGrid"),value:a.GRID}),t("ez-radio-button-option",{label:this.getMessage("snkConfigurator.labelForm"),value:a.FORM})),t("div",{class:"snk-configurator__collsable-box-action"},t("ez-button",{label:this.getMessage(this.viewMode===a.GRID?"snkConfigurator.labelConfigGrid":"snkConfigurator.labelConfigForm"),class:"snk-configurator__button-config ez-button--secondary",onClick:()=>this.onClickOpenConfig(),id:"openConfigurator"}))),this.layoutFormConfig&&t("ez-collapsible-box",{boxBordered:!0,value:!0,label:this.getMessage("snkConfigurator.labelLayoutForm"),headerSize:"medium",class:"snk-configurator__collapsable-box ez-margin-top--medium"},t("div",{class:"ez-flex ez-flex--column ez-size-width--full"},t("snk-layout-form-config",{ref:o=>this._snkLayoutFormConfig=o,messagesBuilder:this.messagesBuilder}))),t("div",{id:"slotContainer",class:"snk-configurator__outline"})),this.showActionButtons&&t("div",{class:"snk-configurator__action-buttons"},t("ez-button",{label:this.getMessage("snkConfigurator.buttons.cancel"),onClick:()=>this.cancel.emit()}),t("ez-button",{label:this.getMessage("snkConfigurator.buttons.save"),onClick:()=>this.handleSave(),class:"ez-button--primary"}))))}get _element(){return i(this)}};l.style='.sc-snk-configurator-h{--snk-configurator__button-close--padding-left:var(--space--medium, 12px);--snk-configurator__title--color:var(--title--primary, #2B3A54);--snk-configurator__title--font-family:var(--font-pattern, "Roboto");--snk-configurator__title--font-size:var(--title--large, 20px);--snk-configurator__title--font-weight:var(--text-weight--extra-large, 700);--snk-configurator__subtitle--color:var(--title--primary, #2B3A54);--snk-configurator__subtitle--font-family:var(--font-pattern, "Roboto");--snk-configurator__subtitle--font-size:var(--text--medium, 14px);--snk-configurator__subtitle--font-weight:var(--text-weight--large, 600);--snk-configurator__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-configurator__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-configurator__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-configurator__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-configurator__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-configurator__scrollbar--width:var(--space--small, 6px)}.snk-configurator.sc-snk-configurator{display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.snk-configurator__collsable-box-action.sc-snk-configurator{width:100%}.snk-configurator__action-buttons.sc-snk-configurator{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium)}.snk-configurator__outline.sc-snk-configurator{display:flex;flex-direction:column;gap:var(--space--small);margin-top:var(--space--small);margin-bottom:var(--space--large)}@media screen and (min-width: 480px){.snk-configurator.sc-snk-configurator{width:359px;max-width:359px}}.snk-configurator__button-config.sc-snk-configurator{--ez-button--min-width:100%}.snk-configurator__header.sc-snk-configurator{display:flex;justify-content:space-between;align-items:center;width:100%}.snk-configurator__title.sc-snk-configurator{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-configurator__title--color);font-size:var(--snk-configurator__title--font-size);font-family:var(--snk-configurator__title--font-family);font-weight:var(--snk-configurator__title--font-weight)}.snk-configurator__subtitle.sc-snk-configurator{display:flex;margin:0;padding-top:var(--space--medium);padding-bottom:var(--space--small);color:var(--snk-configurator__subtitle--color);font-size:var(--snk-configurator__subtitle--font-size);font-family:var(--snk-configurator__subtitle--font-family);font-weight:var(--snk-configurator__subtitle--font-weight)}.snk-configurator__button-close.sc-snk-configurator{padding-left:var(--snk-configurator__button-close--padding-left)}.snk-configurator__main.sc-snk-configurator{overflow-y:auto;scrollbar-width:thin;margin:var(--space--medium) 0;scrollbar-color:var(--snk-configurator__scrollbar--color-clicked) var(--snk-configurator__scrollbar--color-background)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar{background-color:var(--snk-configurator__scrollbar--color-background);width:var(--snk-configurator__scrollbar--width);max-width:var(--snk-configurator__scrollbar--width);min-width:var(--snk-configurator__scrollbar--width)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-track{background-color:var(--snk-configurator__scrollbar--color-background);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb{background-color:var(--snk-configurator__scrollbar--color-default);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:hover,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-configurator__scrollbar--color-hover)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:active,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-configurator__scrollbar--color-clicked)}';export{l as snk_configurator}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as e,F as s,g as r}from"./p-d8d8169b.js";import{ObjectUtils as n,StringUtils as a,Action as d,KeyboardManager as o,ElementIDUtils as h}from"@sankhyalabs/core";import{S as l}from"./p-1210500e.js";import{buildFormMetadata as u,FormMetadata as v}from"@sankhyalabs/ezui/dist/collection/utils/form";import{T as c}from"./p-1a0caadb.js";import{T as g}from"./p-7de79adf.js";import{V as m}from"./p-9019a32f.js";import"./p-0dac8fef.js";import"./p-ba4979b4.js";import{P as k}from"./p-0f3698af.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-b35574b5.js";import"./p-ff1990ad.js";import"./p-c6331595.js";import{SelectionMode as p}from"@sankhyalabs/core/dist/dataunit/DataUnit";import{buildFieldSearch as f,SHORTCUT_SEARCH_FIELD as w}from"@sankhyalabs/ezui/dist/collection/utils";const b="__FORM:",_=class{constructor(e){i(this,e),this.snkMasterFormConfigChange=t(this,"snkMasterFormConfigChange",7),this.exit=t(this,"exit",7),this.actionClick=t(this,"actionClick",7),this.formItemsReady=t(this,"formItemsReady",7),this._guideBuilders=new Map,this.dataUnit=void 0,this.dataState=void 0,this.configName=void 0,this.entityPath=void 0,this.actionsList=void 0,this.recordsValidator=void 0,this.masterFormConfig=void 0,this.selectedGuide=void 0,this.taskbarManager=void 0,this.messagesBuilder=void 0,this.canEdit=!0,this.presentationMode=void 0,this.resourceID=void 0,this.detailTaskbarCustomContainerId=void 0,this.formLegacyConfigName=void 0,this.enableGridInsert=!1,this.ignoreReadOnlyFormFields=void 0,this.getCustomTitle=void 0,this._hasToCreateFieldSearch=!0,this._breadcrumbItems=[],this._guides=void 0,this._formEditorConfigManager=void 0,this._formEditorDataUnit=void 0,this._fieldToGetFocus=void 0,this._customEditors=void 0,this._customRenders=void 0,this._fieldsProps={},this._mainForm=void 0}observeDataUnit(){this.loadGuides(!0)}observeDataState(i,t){var e,s,r,a,d,o;const h=null!==(s=null===(e=null==i?void 0:i.selectionInfo)||void 0===e?void 0:e.recordIds)&&void 0!==s?s:null===(r=null==i?void 0:i.selectedRecord)||void 0===r?void 0:r.__record__id__,l=null!==(d=null===(a=null==t?void 0:t.selectionInfo)||void 0===a?void 0:a.recordIds)&&void 0!==d?d:null===(o=null==t?void 0:t.selectedRecord)||void 0===o?void 0:o.__record__id__;n.equals(h,l)||this.loadGuides((null==t?void 0:t.insertionMode)!=(null==i?void 0:i.insertionMode))}observeMasterFormConfig(){this.loadGuides(this.noGuideSelected()),this.snkMasterFormConfigChange.emit(this.masterFormConfig)}async showFormConfig(i=!1){const t=!i||null==this._currentDetail;this._formEditorConfigManager=t?this._configManager:this._currentDetail.formConfigManager,this._formEditorDataUnit=t?this.dataUnit:this._currentDetail.dataUnit}async addCustomEditor(i,t){this._customEditors=Object.assign(Object.assign({},this._customEditors),{[i]:t})}async addGridCustomRender(i,t){this._customRenders=Object.assign(Object.assign({},this._customRenders),{[i]:t})}async setFieldProp(i,t,e){const s={[i]:Object.assign(Object.assign({},this._fieldsProps[i]),{[t]:e})};this._fieldsProps=Object.assign(Object.assign({},this._fieldsProps),s)}async setFocus(){this._container.focus()}exitViewer(){!this.enableGridInsert&&this.dataUnit.isDirty()?this.dataUnit.cancelEdition({after:()=>this.exit.emit()}):this.exit.emit()}onActionClick(i){i.detail===g.CONFIGURATOR&&"master"!=i.target.dataset.taskbarOwner&&(this._snkConfigurator.open(),i.stopImmediatePropagation(),i.stopPropagation())}onContentCardChanged(i){_.updateContentCard(i.detail.formName,i.detail.cardConfig,i.detail.propertyChanged,this._configManager).then((()=>this.masterFormConfig=this._configManager.getConfig(this.dataUnit)))}getMessage(i){var t,e;if(this.dataUnit.isMultipleEdition){const i=null!==(e=null===(t=this.dataUnit.getSelectionInfo())||void 0===t?void 0:t.records)&&void 0!==e?e:[];return this.messagesBuilder.getMessage("snkCrud.multipleEdition.editing",{COUNT:i.length})}return this.messagesBuilder.getMessage(i,this.dataUnit.getSelectedRecord())}loadGuides(i){if(!this.dataUnit)return;if(!this._configManager.isLoaded)return;this._masterFormMetadata=u(this.masterFormConfig,this.dataUnit,!0);const t=this._masterFormMetadata.getAllSheets(),e=this.dataUnit.getSelectedRecord(),s=this.hasToDisableDetails(e),r=[];Array.from(t.values()).forEach((i=>{const t={id:i.name,label:i.label};this.isDetail(i.name)&&s&&(t.tooltip=this.getMessage("snkCrud.detail.tooltip.needSingleSelection"),t.disabled=!0),r.push(t)})),this._guides=r,this._guideNavigator&&this._guideNavigator.updateItem(this._guides),i&&(this.selectedGuide=this._guides.length>0?this._guides[0]:void 0)}hasToDisableDetails(i){return!i||this.dataUnit.isNewRecord(i.__record__id__)||this.dataUnit.isMultipleEdition}isDetail(i){return null!=v.getDetailName(i)}updateGuide(i){this._guideBuilders.set(i.id,i);const t=i.buildGuideItem(this._guideBuilders);this._guideNavigator&&(this._guideNavigator.updateItem(t).then((()=>{this._guideNavigator.getCurrentPath().then((i=>{this._breadcrumbItems=i}))})),this._guides=this._guides.map((i=>i.id===t.id?Object.assign(Object.assign(Object.assign({},i),t),void 0!==t.children?{}:{children:void 0}):i)))}getTaskBarId(){var i;return(null===(i=this.dataState)||void 0===i?void 0:i.isDirty)?C.FINISH_EDITION:this.dataUnit.isMultipleEdition?C.MUTIPLE_EDITION:C.REGULAR}loadTaskbarProcessor(){const i={};i[C.REGULAR]=this.buildBtnsRegularMode(),i[C.FINISH_EDITION]=[g.CANCEL,g.SAVE,this.handleAddGridMode()],i[C.MUTIPLE_EDITION]=[g.CANCEL],this._taskbarProcessor=new c(i),this._taskbarProcessor.process(this.getTaskBarId(),this.taskbarManager,this.dataState,this.buildDisabledButtons(),this.buildInvisibleButtons())}buildBtnsRegularMode(){var i,t;const e=[g.ATTACH,g.CLONE,g.REMOVE,g.MORE_OPTIONS,g.ACTIONS_BUTTON,g.DIVIDER,g.GRID_MODE,g.CONFIGURATOR];return(null===(t=null===(i=this.dataState)||void 0===i?void 0:i.selectionInfo)||void 0===t?void 0:t.length)<=1&&e.unshift(g.PREVIOUS,g.NEXT,g.DIVIDER),this.presentationMode==k.SECONDARY?e.unshift(g.INSERT):e.push(g.INSERT),e}buildDisabledButtons(){var i,t,e,s,r,n;const a=[];return(null===(i=this.dataState)||void 0===i?void 0:i.hasPrevious)||a.push(g.PREVIOUS),(null===(t=this.dataState)||void 0===t?void 0:t.hasNext)||a.push(g.NEXT),(null===(s=null===(e=this.dataState)||void 0===e?void 0:e.selectionInfo)||void 0===s?void 0:s.length)>1&&a.push(g.CLONE),(null===(n=null===(r=this.dataState)||void 0===r?void 0:r.selectionInfo)||void 0===n?void 0:n.isAllRecords())&&a.push(g.REMOVE),a}handleAddGridMode(){return this.enableGridInsert?g.GRID_MODE:""}buildInvisibleButtons(){const i=[];return this.dataState&&this.dataState.selectionInfo.mode===p.ALL_RECORDS&&i.push(g.ACTIONS_BUTTON),i}static updateContentCard(i,t,e,s){return s.saveCardState(i,t,e)}static buildFixedForms(i){var t;const r=null===(t=i.formConfig)||void 0===t?void 0:t.cardsState;if(null!=r)return e(s,null,Array.from(r.entries()).filter((([t,e])=>(null==e?void 0:e.fixed)&&t!=i.selectedForm)).sort((([,i],[,t])=>((null==i?void 0:i.fixSequence)||0)-((null==t?void 0:t.fixSequence)||0))).map((([t,s])=>{var r,n;const a=i.formMetadata.getSheet(t);if(null!=a)return e("snk-form-view",{levelPath:i.levelPath,label:a.label,name:t,fields:a.fields,formMetadata:i.formMetadata,dataUnit:i.dataUnit,recordsValidator:i.recordsValidator,contracted:"CONTRACTED"===(null==s?void 0:s.presentation),fixed:null==s?void 0:s.fixed,summaryFields:null===(n=null===(r=i.formConfig)||void 0===r?void 0:r.summary)||void 0===n?void 0:n.get(t),fieldToFocus:i.fieldToFocus,key:t,onSnkRequestClearFieldToFocus:()=>{var t;return null===(t=i.onRequestClearFieldToFocus)||void 0===t?void 0:t.call(i)},customEditors:i.propsCustomEditor,fieldsProps:i.fieldsProps})})))}wrapDetail(i,t){if(0===i.length)return t;const s=i.pop(),r=v.getDetailName(s);return r?this.wrapDetail(i,e("snk-data-unit",{dataUnitName:`${this.getDataUnitName(i,r)}`,entityName:r},t)):void 0}getDataUnitName(i,t){if(i.length>0){const e=i.map((i=>v.getDetailName(i)));return`${this.entityPath}/${e.join("/")}/${t}`}return`${this.entityPath}/${t}`}getContent(){var i,t,s,r,n;if(!this.selectedGuide)return;const a=this.selectedGuide.id;let d;const o=a.split("::"),h=o.pop(),l=v.getDetailName(h);let u=a;if(l||o.length>0){let t,s;if(a.includes(b)){[u,t]=a.split(b);const e=(null===(i=this._breadcrumbItems)||void 0===i?void 0:i.length)||0;s=e>1?this._breadcrumbItems[e-2]:this.selectedGuide}else s=this.selectedGuide;d=this.wrapDetail(o,e("snk-detail-view",{ref:i=>this._currentDetail=i,dataUnitName:this.getDataUnitName(o,l),onSnkDetailGuidesChange:i=>this.updateGuide(i.detail),entityName:l,selectedForm:t,branchGuide:s,guideItemPath:this._breadcrumbItems,key:`detail${u}`,canEdit:this.canEdit,onSnkSwitchGuide:i=>this._guideNavigator.selectGuide(i.detail),resourceID:this.resourceID,taskbarCustomContainerId:this.detailTaskbarCustomContainerId,customEditors:this._customEditors,customRenders:this._customRenders,presentationMode:this.presentationMode}))}else{const i=this.selectedGuide.id,o=this._masterFormMetadata.getSheet(i);if(o){const h=null===(s=null===(t=this.masterFormConfig)||void 0===t?void 0:t.cardsState)||void 0===s?void 0:s.get(i);d=e("snk-form-view",{ref:i=>this._mainForm=i,fixed:null==h?void 0:h.fixed,summaryFields:null===(n=null===(r=this.masterFormConfig)||void 0===r?void 0:r.summary)||void 0===n?void 0:n.get(i),name:i,label:o.label,fields:o.fields,dataUnit:this.dataUnit,formMetadata:this._masterFormMetadata,recordsValidator:this.recordsValidator,fieldToFocus:this._fieldToGetFocus,key:a,onSnkRequestClearFieldToFocus:()=>this.clearFieldToFocusHandler(),customEditors:this._customEditors,fieldsProps:this._fieldsProps,fieldSearch:this._fieldSearch},this.presentationMode==k.SECONDARY&&this.buildTaskBar())}}return d}onBreadcrumbClickHandler(i){null!=(null==i?void 0:i.id)&&this._guideNavigator.selectGuide(i.id)}updateSelectedGuideHandler(i){this._guideHasChanged=this.selectedGuide!=i,this.selectedGuide=i,this._guideNavigator.getCurrentPath().then((i=>{this._breadcrumbItems=i})),this.resetGuideBadge(i)}changeGuideHandler(i){var t;null===(t=this._guideNavigator)||void 0===t||t.selectGuide(i)}clearFieldToFocusHandler(){this._fieldToGetFocus=void 0}resetGuideBadge(i){var t;this._guides=[...null===(t=this._guides)||void 0===t?void 0:t.map((t=>this.canClearGuideBadge(t,i.id)?Object.assign(Object.assign({},t),{badge:null}):t))]}canClearGuideBadge(i,t){return i.id===t||this.isIncludedInChildrenList(i,t)}isIncludedInChildrenList(i,t){return this.hasChildren(i)&&this.getChildrenIdList(i).includes(t)}hasChildren(i){return i.children&&Array.isArray(i.children)}getChildrenIdList(i){return i.children.map((i=>i.id))}getConfigViewMode(){return m.GRID}changeConfigViewMode(i){this._currentDetail&&this._currentDetail.changeViewMode(i)}openConfig(i){this._snkConfigurator.close(),this._currentDetail&&(i===m.FORM?this.showFormConfig(!0):this._currentDetail.configGrid())}noGuideSelected(){var i;return void 0===this.selectedGuide||"__main"===(null===(i=this.selectedGuide)||void 0===i?void 0:i.id)}addFormLegacyConfigName(){this.formLegacyConfigName&&this._configManager.addFormLegacyConfig(this.formLegacyConfigName)}setMasterFormConfig(i){this.masterFormConfig=i}componentWillLoad(){if(null==this.resourceID)throw new Error(this.getMessage("snkCrud.errors.resourceIDNotProvided"));this._configManager=new l(this.configName,this.resourceID,this.setMasterFormConfig.bind(this),this.dataUnit),this.addFormLegacyConfigName(),this._configManager.loadConfig()}componentDidRender(){this._guideHasChanged&&(this._currentDetail?this._currentDetail.showUp():this._mainForm&&this._mainForm.showUp(),this._guideHasChanged=!1)}getFieldsSearch(i){return(null==this._fieldSearch||this._hasToCreateFieldSearch)&&(this._hasToCreateFieldSearch=!1,this._fieldSearch=f(i,(({argument:i})=>this.fieldsOptionLoader(i)),(i=>this.onSelectField(i)))),this._fieldSearch}fieldsOptionLoader(i){return Promise.resolve(this._configManager.getFieldsList(i).map((i=>({value:i.name,label:i.label}))))}onSelectField(i){if(null==i)return;this._fieldToGetFocus=i.value;const t=this.getGuideName(i.value);t!==this.selectedGuide.id&&this.changeGuideHandler(t)}getActionsList(){var i;return[].concat(null!=this.taskbarManager&&null!=this.taskbarManager.getMoreOptions?null!==(i=this.taskbarManager.getMoreOptions(this.getTaskBarId(),this.configName,this.dataState,this.actionsList))&&void 0!==i?i:[]:this.actionsList)}getSettingsListForm(){return[{value:a.generateUUID(),label:this.getMessage("snkCrud.findColumn"),disableCloseOnSelect:!0,eagerInitialize:!0,itemBuilder:(i,t)=>this.getFieldsSearch(t)}]}buildTaskBar(){var i;return e("div",{class:"snk-guides-viewer__header-taskbar "+(this.presentationMode!=k.SECONDARY?"ez-align--right":"ez-padding-bottom--medium")},e("snk-taskbar",{key:"guideViewerTaskbar","data-element-id":"guideViewer",configName:this.configName,buttons:this._taskbarProcessor.buttons,disabledButtons:this._taskbarProcessor.disabledButtons,customButtons:this._taskbarProcessor.customButtons,actionsList:this.getActionsList(),actionsSettingsList:this.getSettingsListForm(),messagesBuilder:this.messagesBuilder,presentationMode:this.presentationMode,primaryButton:(null===(i=this.dataState)||void 0===i?void 0:i.isDirty)?g.SAVE:g.INSERT,"data-taskbar-owner":"master",dataUnit:this.dataUnit,resourceID:this.resourceID,customSlotId:"GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS",alignRigth:!0},e("slot",{name:"GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS"})))}async dataUnitActionHandler(i){var t;switch(i.type){case d.EDITION_CANCELED:case d.DATA_SAVED:this.dataUnit.isMultipleEdition&&(this.exitViewer(),this.dataUnit.isMultipleEdition=!1);break;case d.FIELD_INVALIDATED:const e=this.getGuideName(null===(t=i.payload)||void 0===t?void 0:t.fieldName);await this.addErrorBadgeToGuide(e),await this.openGuideNavigator(e);break;case d.METADATA_LOADED:case d.MULTIPLE_EDITION_CHANGED:this.loadGuides(this.noGuideSelected())}}async addErrorBadgeToGuide(i){var t;this._guides=[...null===(t=this._guides)||void 0===t?void 0:t.map((t=>Object.assign(Object.assign({},t),{badge:this.getBadge(t,i)})))]}async openGuideNavigator(i){this.selectedGuide.id!==i&&await this._guideNavigator.openGuideNavidator()}getBadge(i,t){var e;return this.selectedGuide.id===t?null:t===i.id?"error":null!==(e=i.badge)&&void 0!==e?e:null}getGuideName(i){var t;for(const e of this._masterFormMetadata.getAllSheets()){const s=null===(t=e[1])||void 0===t?void 0:t.fields;for(const t of s)if(t.name===i)return e[0]}return""}getTitle(){var i,t;return null!==(t=null===(i=this.getCustomTitle)||void 0===i?void 0:i.call(this))&&void 0!==t?t:this.getMessage("snkCrud.title")}getTitleTooltip(){if(this.dataUnit.isMultipleEdition)return this.buildRecordIdsArray()}buildRecordIdsArray(){var i,t;const e=null!==(t=null===(i=this.dataUnit.getSelectionInfo())||void 0===i?void 0:i.records)&&void 0!==t?t:[];return 0===e.length?"[]":`[${e.map((i=>this.messagesBuilder.getMessage("snkCrud.title",i))).join(", ")}]`}componentDidLoad(){this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this)),this.initKeyboardManager()}disconnectedCallback(){var i;null===(i=this._keyboardManager)||void 0===i||i.unbindAllShortcutKeys()}async initKeyboardManager(){this._keyboardManager=new o({propagate:!1,element:this._element}),this._keyboardManager.bind(w,(async()=>{this._mainForm&&await this._mainForm.showSearchField()}),{description:this.getMessage("snkSimpleCrud.findFields"),element:this._element})}render(){var i,t;if(null!=this._formEditorConfigManager)return e("snk-form-config",{ref:i=>this._container=i,tabindex:-1,dataUnit:this._formEditorDataUnit,messagesBuilder:this.messagesBuilder,configManager:this._formEditorConfigManager,onConfigClose:()=>this._formEditorConfigManager=null});if(!this.dataUnit||!this._configManager.isLoaded)return;this.loadTaskbarProcessor();const s=this._guides&&this._guides.length>1;return e("section",{class:"snk-guides-viewer",ref:i=>this._container=i,tabindex:-1},e("div",{class:"ez-row snk-guides-viewer__header"},e("div",{class:"snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large",key:"header"},e("ez-button",{onClick:()=>this.exitViewer(),title:this.getMessage("snkCrud.goBackTitle"),mode:"icon",iconName:"arrow_back",class:"ez-padding-right--medium",size:"small"}),e("div",{class:"ez-flex ez-flex--column ez-flex-item--auto"},e("h1",{class:"ez-title ez-title--primary ez-title--xlarge",title:this.getTitleTooltip()},this.getTitle()),(null===(i=this._breadcrumbItems)||void 0===i?void 0:i.length)>1&&e("div",{class:"ez-margin-top--extra-small"},e("ez-breadcrumb",Object.assign({items:this._breadcrumbItems,onSelectedItem:i=>this.onBreadcrumbClickHandler(null==i?void 0:i.detail)},{[h.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${h.getInternalIDInfo("breadcrumb")}`}))))),this.presentationMode!=k.SECONDARY&&this.buildTaskBar()),e("div",{class:"snk-guides-viewer__container"},s?e("ez-guide-navigator",{ref:i=>this._guideNavigator=i,class:"snk-guides-viewer__guide-navigator",items:this._guides,selectedId:this.selectedGuide?this.selectedGuide.id:void 0,onEzSelectionChange:i=>this.updateSelectedGuideHandler(i.detail)}):e("div",null),e("div",{class:"snk-guides-viewer__detail-container"},_.buildFixedForms({formConfig:this.masterFormConfig,formMetadata:this._masterFormMetadata,selectedForm:null===(t=this.selectedGuide)||void 0===t?void 0:t.id,dataUnit:this.dataUnit,recordsValidator:this.recordsValidator,fieldToFocus:this._fieldToGetFocus,onRequestClearFieldToFocus:this.clearFieldToFocusHandler.bind(this),propsCustomEditor:this._customEditors,fieldsProps:this._fieldsProps}),this.getContent())),e("snk-configurator",{ref:i=>this._snkConfigurator=i,viewMode:this.getConfigViewMode(),onConfigSelected:i=>this.changeConfigViewMode(i.detail),messagesBuilder:this.messagesBuilder,onOpenConfig:i=>this.openConfig(i.detail),resourceID:this.resourceID}))}get _element(){return r(this)}static get watchers(){return{dataUnit:["observeDataUnit"],dataState:["observeDataState"],masterFormConfig:["observeMasterFormConfig"]}}};var C;!function(i){i.FINISH_EDITION="snkGuideViewer.finish_edition",i.MUTIPLE_EDITION="snkGuideViewer.multiple_edition",i.REGULAR="snkGuideViewer.regular"}(C||(C={})),_.style=".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-small:var(--space--2xs, 8px);--snk-guides-viewer__header--min-height:68px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-small);margin-left:calc(var(--snk-guides-viewer--space-large) * -1);margin-right:calc(var(--snk-guides-viewer--space-large) * -1);margin-bottom:var(--snk-guides-viewer--space-small)}.snk-guides-viewer__header-breadcrumb.sc-snk-guides-viewer{width:25%;display:flex}.snk-guides-viewer__header-taskbar.sc-snk-guides-viewer{width:75%}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-small));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-small))}.snk-guides-viewer__guide-navigator[open].sc-snk-guides-viewer{width:var(--snk-guides-viewer__guide-navigator--width);max-width:var(--snk-guides-viewer__guide-navigator--width);min-width:var(--snk-guides-viewer__guide-navigator--width)}.snk-guides-viewer__detail-content.sc-snk-guides-viewer{min-height:100%;align-items:flex-start;align-content:flex-start}";export{_ as S}
@@ -0,0 +1 @@
1
+ import{r as e,c as i,h as s,f as t,H as n,g as o}from"./p-d8d8169b.js";import{a as r,F as a}from"./p-84345e7a.js";import{ApplicationUtils as l,CheckMode as h}from"@sankhyalabs/ezui/dist/collection/utils";import{ApplicationContext as d,StringUtils as p,ElementIDUtils as u,UserInterface as c}from"@sankhyalabs/core";import{S as v}from"./p-f4184ce7.js";import{fieldBuilder as m}from"@sankhyalabs/ezui/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder";import{s as x}from"./p-a349689a.js";import{convertType as b}from"@sankhyalabs/core/dist/dataunit/metadata/DataType";const g=class{constructor(s){e(this,s),this.ezFilterGroupChange=i(this,"ezFilterGroupChange",7),this.ezFilterGroupRemove=i(this,"ezFilterGroupRemove",7),this.ezExpressionGroupLayoutChanged=i(this,"ezExpressionLayoutChanged",7),this.FIRST_LEVEL="0",this.LIMIT_GROUP_LEVEL=4,this.application=d.getContextValue("__SNK__APPLICATION__"),this._conditionOperator=r.AND,this._group=void 0,this._selfTop=0,this.canAddExpression=!0,this._showDashes=!0,this.parentTop=0,this.group=void 0,this.messagesBuilder=void 0,this.filterId=void 0,this.entityURI=void 0,this.isDefaultFilter=!1}todoCompletedHandler(e){this.updateDashes()}async getExpressionGroup(){return this._group}watchGroup(e){this._group=e,this._conditionOperator=this.getOperand()}componentWillLoad(){this._group=this.group,this._conditionOperator=this.getOperand(),this.getDataGroupLevel()||this._element.setAttribute("data-group-level",this.FIRST_LEVEL),this.canAddExpression=this.group.items.every(this.isFilledItem)}componentDidRender(){this.setSelfTop()}changeHandler(){this.ezExpressionGroupLayoutChanged.emit()}setSelfTop(){this._selfTop=this._element.getBoundingClientRect().top}getDashedHeight(){return this._selfTop-this.parentTop}getOperand(){return this._group.operand?this._group.operand:r.AND}getMessage(e,i){return this.application.messagesBuilder.getMessage(e,i)}updateDashes(){this._showDashes=!1,this.setSelfTop(),this._showDashes=!0}renderExpressionItems(){var e;return null===(e=this._group.items)||void 0===e?void 0:e.map((e=>s("snk-expression-item",{key:e.id,class:"ez-padding-top--small snk-expression-group__item",expression:e,canRemove:this._group.items.length>1,onEzFilterItemChange:()=>this.handleFilterItemChange(),onEzFilterItemRemove:i=>this.handleFilterItemRemove(i,e.id),messagesBuilder:this.messagesBuilder,entityURI:this.entityURI,isDefaultFilter:this.isDefaultFilter})))}renderGroups(){var e;const i=parseInt(this.getDataGroupLevel()||"0")+1;return null===(e=this._group.childrenGroups)||void 0===e?void 0:e.map((e=>s("snk-expression-group",{key:e.id,group:e,messagesBuilder:this.messagesBuilder,parentTop:this._selfTop,"data-group-level":i,onEzFilterGroupRemove:i=>this.handleFilterGroupRemove(i,e.id),entityURI:this.entityURI})))}handleFilterGroupRemove(e,i){this.onStopPropagation(e),this._group.childrenGroups=this._group.childrenGroups.filter((e=>e.id!==i)),t(this),this.ezFilterGroupChange.emit(this._group),this.changeHandler()}handleFilterItemRemove(e,i){this.onStopPropagation(e),this._group.items=this._group.items.filter((e=>e.id!==i)),t(this),this.ezFilterGroupChange.emit(this._group),this.changeHandler(),this.canAddExpression=!0}isFilledItem(e){return!(!e.fieldName||!e.operand||"NULL"!==e.operand&&"NOT_NULL"!==e.operand&&!e.paramVariable&&"SWITCH"!==e.userInterface&&!e.value)}handleFilterItemChange(){this.ezFilterGroupChange.emit(this._group),this.canAddExpression=this.group.items.every(this.isFilledItem)}handleAddExpression(){const e={id:p.generateUUID(),entityName:"",fieldName:"",description:"",label:this.getMessage("snkPersonalizedFilter.info.labelDefaultValue"),type:void 0,expression:void 0,operand:void 0,paramVariable:!1,value:void 0,systemConfig:null,userConfig:null};this._group.items.push(e),t(this),this.ezFilterGroupChange.emit(this.group),this.changeHandler(),this.canAddExpression=!1}handleAddGroup(){var e;const i={id:p.generateUUID(),items:[{id:p.generateUUID(),entityName:"",fieldName:"",description:"",label:this.getMessage("snkPersonalizedFilter.info.labelDefaultValue"),type:void 0,expression:void 0,operand:void 0,paramVariable:!1,value:void 0,systemConfig:null,userConfig:null}],childrenGroups:[],operand:r.AND};this._group.childrenGroups=null!==(e=this._group.childrenGroups)&&void 0!==e?e:[],this._group.childrenGroups.push(i),t(this),this.group.operand||(this.group.operand=r.AND),this.ezFilterGroupChange.emit(this.group),this.changeHandler()}buildGroupStyle(){return{height:`${this.getDashedHeight()}px`,marginTop:20-this.getDashedHeight()+"px"}}handleConditionOperatorChange(e){this._conditionOperator=e,this._group.operand=r[e],this.ezFilterGroupChange.emit(this._group)}confirmRemoveGroup(e){this.onStopPropagation(e),l.confirm(this.getMessage("snkPersonalizedFilter.confirmGroup.title"),this.getMessage("snkPersonalizedFilter.confirmGroup.description")).then((e=>{e&&this.ezFilterGroupRemove.emit(this._group)}))}getTooltipMessageForOperator(){return this.getDataGroupLevel()===this.FIRST_LEVEL&&1===this._group.items.length?this.getMessage("snkPersonalizedFilter.operador.firstLevel"):this._conditionOperator===r.AND?this.getMessage("snkPersonalizedFilter.operador.and"):this._conditionOperator===r.OR?this.getMessage("snkPersonalizedFilter.operador.or"):void 0}getDataGroupLevel(){return this._element.getAttribute("data-group-level")}canAddGroup(){return Number(this.getDataGroupLevel()||this.FIRST_LEVEL)<this.LIMIT_GROUP_LEVEL}isFirstLevel(){return Boolean(this.getDataGroupLevel()===this.FIRST_LEVEL)}onStopPropagation(e){e.preventDefault(),e.stopPropagation()}getMessageAddTooltip(){if(this.isFirstLevel()){const e=this.group.items.every((e=>!(!e.fieldName||!e.operand)&&(e.paramVariable||!!e.value)));return this.getMessage(e?"snkPersonalizedFilter.info.labelAddNewExpression":"snkPersonalizedFilter.info.labelDisabledAddExpressionButton")}return this.getMessage(this.canAddExpression?"snkPersonalizedFilter.info.labelAddNewExpression":"snkPersonalizedFilter.info.labelDisabledAddExpressionButton")}canChangeGroupCondition(){return this._group.items.length+this._group.childrenGroups.length>1}render(){const e=this.canAddGroup();return s(n,null,s("div",{class:!this.isFirstLevel()&&this._showDashes?"dashes":"hidden",style:this.buildGroupStyle()}),s("div",{class:!this.isFirstLevel()&&this._showDashes?"horizontal-dashes":"hidden"}),s("div",{class:"ez-flex ez-flex--align-items-center"},s("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()},s("label",{class:"ez-label ez-padding-right--medium ez-padding-left--medium ez-title--primary"},this.getMessage("snkPersonalizedFilter.info.condition")),s("div",null,s("ez-combo-box",Object.assign({class:"snk-expression-group__container-option",canShowError:!1,mode:"slim",suppressEmptyOption:!0,enabled:this.canChangeGroupCondition(),value:this._conditionOperator,onEzChange:e=>this.handleConditionOperatorChange(e.detail.value)},{[u.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`comboBoxConditions_level_${this.getDataGroupLevel()}`}),s("option",{value:r.AND},this.getMessage("snkPersonalizedFilter.info.conditionAnd")),s("option",{value:r.OR},this.getMessage("snkPersonalizedFilter.info.conditionOr"))))),s("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()}),s("ez-button",{label:this.getMessage("snkPersonalizedFilter.info.addGroup"),size:"small",enabled:e,title:e?"":this.getMessage("snkPersonalizedFilter.info.labelDisabledAddGroupButton",{LIMIT_GROUP_LEVEL:this.LIMIT_GROUP_LEVEL+1}),onClick:()=>this.handleAddGroup()},s("ez-icon",{class:"ez-padding-right--small",slot:"leftIcon",iconName:"plus"})),!this.isFirstLevel()&&s("ez-button",{title:this.getMessage("snkPersonalizedFilter.info.labelDeleteExpression"),class:"ez-padding-left--medium",mode:"icon",iconName:"delete",size:"small",onClick:e=>this.confirmRemoveGroup(e)})),s("div",{class:"ez-padding-top--small snk-expression-group__container-expression"},s("div",{class:"ez-padding-top--small"},this.renderExpressionItems())),s("div",{class:"ez-padding-top--small snk-expression-group__container-expression"},s("div",{class:"ez-padding-top--small"},this.renderGroups())))}get _element(){return o(this)}static get watchers(){return{group:["watchGroup"]}}};g.style='.sc-snk-expression-group-h{display:block;--snk-expression-group--container-condition--width:184px;--snk-expression-group--container-condition--height:38px;--snk-expression-group--container-condition--border-radius:var(--border--radius-medium, 12px);--snk-expression-group--container-option--width:85px;--snk-expression-group__container-condition--background-and:#66B6A0;--snk-expression-group__container-condition--background-or:#EBC65E;--snk-expression-group__container-expression--padding-left:26px;--snk-expression-group__background-color-dashed:var(--background--body, #fafcff);--ez-text-input__margin-bottom:0px}.snk-expression-group__container-condition.sc-snk-expression-group{width:var(--snk-expression-group--container-condition--width);height:var(--snk-expression-group--container-condition--height);border-radius:var(--snk-expression-group--container-condition--border-radius);z-index:var(--more-visible--2x, 3);padding:var(--space--nano, 2px)}.snk-expression-group__container-option.sc-snk-expression-group{width:var(--snk-expression-group--container-option--width)}.snk-expression-group__container-condition[data-condition="AND"].sc-snk-expression-group{background-color:var(--snk-expression-group__container-condition--background-and)}.snk-expression-group__container-condition[data-condition="OR"].sc-snk-expression-group{background-color:var(--snk-expression-group__container-condition--background-or)}.snk-expression-group__container-expression.sc-snk-expression-group{padding-left:var(--snk-expression-group__container-expression--padding-left)}.dashes.sc-snk-expression-group{z-index:var(--visible, 1);background:var(--snk-expression-group__background-color-dashed);border-left:2px dashed var(--text-secondary, #A2ABB9);position:absolute;width:15px;height:58px;margin-left:-15px;margin-top:-36.5px}.horizontal-dashes.sc-snk-expression-group{z-index:var(--more-visible, 2);border-bottom:2px dashed var(--text-secondary, #A2ABB9);position:absolute;width:15px;height:54px;margin-left:-15px;margin-top:-33.5px}.hidden.sc-snk-expression-group{display:none}';const k=[{label:"snkPersonalizedFilter.operands.equal",value:"EQUAL"},{label:"snkPersonalizedFilter.operands.different",value:"DIFFERENT"},{label:"snkPersonalizedFilter.operands.like",value:"LIKE"},{label:"snkPersonalizedFilter.operands.in",value:"IN"},{label:"snkPersonalizedFilter.operands.startWith",value:"START_WITH"},{label:"snkPersonalizedFilter.operands.finishedWith",value:"FINISHED_WITH"},{label:"snkPersonalizedFilter.operands.null",value:"NULL"},{label:"snkPersonalizedFilter.operands.notNull",value:"NOT_NULL"}],_=k.concat([{label:"snkPersonalizedFilter.operands.larger",value:"LARGER"},{label:"snkPersonalizedFilter.operands.largerEqual",value:"LARGER_EQUAL"},{label:"snkPersonalizedFilter.operands.smaller",value:"SMALLER"},{label:"snkPersonalizedFilter.operands.smallerEqual",value:"SMALLER_EQUAL"}]),f=k,z=[c.SEARCH,c.SHORTTEXT,c.PASSWORD,c.MASKEDTEXT,c.LONGTEXT,c.HTML],F=class{constructor(s){e(this,s),this.ezFilterItemChange=i(this,"ezFilterItemChange",7),this.ezFilterItemRemove=i(this,"ezFilterItemRemove",7),this.application=d.getContextValue("__SNK__APPLICATION__"),this.filterOperandDefault=_,this.filterOperandTypeTextSearch=f,this.DEFAULT_FIELD_NAME="NOT_DEFINED",this._showValueVariable=!1,this._fieldSelected=void 0,this._optionNotNull=!1,this.expression=void 0,this.canRemove=!0,this.messagesBuilder=void 0,this.isDefaultFilter=!1,this.entityURI=void 0}expressionChanged(e,i){e!==i&&(this.ezFilterItemChange.emit(e),this.updateFieldSelected())}componentWillLoad(){this._dataSourceFetcher=x.get(`filterFieldsDataSource.${this.entityURI}`),x.onChange(`filterFieldsDataSource.${this.entityURI}`,(()=>{this._dataSourceFetcher=x.get(`filterFieldsDataSource.${this.entityURI}`)})),this.expression&&(this.updateFieldSelected(),this._optionNotNull="NULL"===this.expression.operand||"NOT_NULL"===this.expression.operand)}componentDidRender(){var e;this._showValueVariable=null===(e=this._elValueVariable)||void 0===e?void 0:e.value}updateFieldSelected(){const e={dataType:this.expression.type,description:this.expression.description,name:this.expression.fieldName,label:this.expression.fieldLabel,entityName:this.expression.entityName,onlyDate:!1,path:this.expression.description,properties:this.expressionPropsToFieldProps(this.expression.props),type:v.FIELD,uri:"",userInterface:this.expression.userInterface};this._fieldSelected=e}buildExpression(e,i,s){return s.length>0&&s.shift(),s.length>0?`${s.join("->")}->${i}`:`${e}.${i}`}setValueExpression(e,i){"fieldName"===e?(this.expression.description=i.path,this.expression.expression=this.buildExpression(i.entityName,i.name,i.entityPath),this.expression.fieldName=i.name,this.expression.fieldLabel=i.label,this.expression.type=i.dataType,this.expression.userInterface=i.userInterface,this.expression.entityName=i.entityName,this.expression.value=void 0,this.expression.props=this.fieldPropsToExpressionProps(i.properties)):this.expression[e]=i,this.expressionChanged(this.expression)}fieldPropsToExpressionProps(e){const i=[];if(!e)return i;for(const s in e){let t=e[s];"object"==typeof t&&(t=JSON.stringify(t)),i.push({name:s,value:t})}return i}expressionPropsToFieldProps(e){const i={};return e?(e.forEach((e=>{try{i[e.name]=JSON.parse(e.value)}catch(s){i[e.name]=e.value}})),i):i}getMessage(e,i){return this.application.messagesBuilder.getMessage(e,i)}handleSelectItem(e){if(this.hasNoChanges(e))this._elFilterInput.value=e.path;else if(e.type===v.FIELD){const i=e;this._fieldSelected=i,this.setValueExpression("fieldName",i)}}hasNoChanges(e){return e.name===this.expression.fieldName&&e.path===this.expression.description}handleFocus(){this._elFilterFieldSearch&&this._elFilterFieldSearch.show()}handleChangeFilterInput(e){this._elFilterFieldSearch.applyFilter(e.detail)}handleChangeValueVariable(e){this._showValueVariable=e,this._elFieldDynamic&&(this._elFieldDynamic.value=void 0,this._elFieldDynamic.enabled=!e),this.expression.paramVariable=e,this.expressionChanged(this.expression)}openSnkFilterParamConfig(){var e;null===(e=this._elFilterParamConfigRef)||void 0===e||e.open(this.expression).then(this.onOpenPromiseReady.bind(this)).catch((e=>{console.error(e)}))}onOpenPromiseReady(e){this.expression=e}buildOptionsOperator(){var e;return z.includes(null===(e=this._fieldSelected)||void 0===e?void 0:e.userInterface)?this.translateOperandOptions(this.filterOperandTypeTextSearch):this.translateOperandOptions(this.filterOperandDefault)}translateOperandOptions(e){return e.map((e=>({label:this.getMessage(e.label),value:e.value})))}handleChangeOperator(e){this.checkOptionIsNull(e),this.setValueExpression("operand",e)}checkOptionIsNull(e){[a.NULL,a.NOT_NULL].includes(a[e])?(this._optionNotNull=!0,this._elFieldDynamic&&(this._elFieldDynamic.enabled=!1,this._elFieldDynamic.value=void 0)):(this._optionNotNull=!1,this._elFieldDynamic&&(this._elFieldDynamic.enabled=!this._showValueVariable))}confirmRemove(e){e.preventDefault(),e.stopPropagation(),l.confirm(this.getMessage("snkPersonalizedFilter.confirmExpression.title"),this.getMessage("snkPersonalizedFilter.confirmExpression.description")).then((e=>{e&&this.ezFilterItemRemove.emit(this.expression)}))}buildFieldByType(){var e,i,t;if(!this._fieldSelected)return;const n=null===(e=m(this.configureFieldByType()))||void 0===e?void 0:e.i.shift();return(this._optionNotNull&&n||(null===(i=this._elValueVariable)||void 0===i?void 0:i.value)&&n||this.expression.paramVariable||this._showValueVariable||!(null===(t=this._fieldSelected)||void 0===t?void 0:t.dataType))&&(n.t.enabled=!1),null!=this.expression.value&&(n.t.value=this.getExpressiontValue(this.expression)),n.t.onEzChange=e=>{this.setValueExpression("value",e.target.value)},"SWITCH"===this.expression.userInterface&&null==this.expression.value&&this.setValueExpression("value",!1),s(n.o,Object.assign(Object.assign({},n.t),{ref:e=>{this._elFieldDynamic=e},label:this.expression.fieldLabel||this._fieldSelected.label}))}getExpressiontValue(e){return b(e.type,e.value)}configureFieldByType(){var e,i;const s={userInterface:this._fieldSelected.userInterface,name:this._fieldSelected.name,label:this._fieldSelected.label,canShowError:!1};switch(s.userInterface){case c.OPTIONSELECTOR:s.props={options:null===(i=null===(e=this._fieldSelected)||void 0===e?void 0:e.properties)||void 0===i?void 0:i.options};break;case c.LONGTEXT:s.rows=1;break;case c.SEARCH:s.optionLoader=e=>this.setCriteriaSearch(e,this.application)}return s}setCriteriaSearch({mode:e,argument:i},s){var t,n,o;if(null==s)return;const r={entity:null!==(o=null===(n=null===(t=this._fieldSelected)||void 0===t?void 0:t.properties)||void 0===n?void 0:n.ENTITYNAME)&&void 0!==o?o:this._fieldSelected.entityName,searchOptions:{showInactives:!1},entityDescription:this._fieldSelected.description};return s.executePreparedSearch(e,i,r)}render(){var e;return s(n,null,s("div",{class:"dashes"}),s("div",{class:"box"},s("div",{class:"box__container"},s("div",{class:"box__container--input-filter"},s("ez-filter-input",Object.assign({ref:e=>this._elFilterInput=e,value:null===(e=this._fieldSelected)||void 0===e?void 0:e.path,label:this.getMessage("snkPersonalizedFilter.info.labelSearchField"),canShowError:!1,onEzChange:e=>this.handleChangeFilterInput(e),onFocus:()=>this.handleFocus()},{[u.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`expressionFilterInput_${this.expression.fieldName||this.DEFAULT_FIELD_NAME}`})),s("snk-filter-field-search",{ref:e=>this._elFilterFieldSearch=e,searchable:!1,onEzSelectFilterItem:e=>this.handleSelectItem(e.detail),fieldsDataSource:this._dataSourceFetcher})),s("div",{class:"box__container--input-operator"},s("ez-combo-box",Object.assign({label:this.getMessage("snkPersonalizedFilter.info.labelOperator"),value:this.expression.operand,canShowError:!1,options:this.buildOptionsOperator(),onEzChange:e=>{var i;return this.handleChangeOperator(null===(i=e.detail)||void 0===i?void 0:i.value)},suppressEmptyOption:!0},{[u.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`comboBoxOperand_${this.expression.fieldName||this.DEFAULT_FIELD_NAME}`}))),s("div",{class:"box__container--input-value"},this._fieldSelected?this.buildFieldByType():s("ez-number-input",{label:this.getMessage("snkPersonalizedFilter.info.labelDefaultValue"),canShowError:!1,enabled:!this._showValueVariable&&!this._optionNotNull})),s("div",{class:"box__container--input-value-variable"},!this._optionNotNull&&s("ez-tooltip",{message:this.getMessage("snkPersonalizedFilter.info.checkVariableDisabled"),active:this.isDefaultFilter},s("ez-check",{ref:e=>this._elValueVariable=e,value:this.expression.paramVariable,label:this.getMessage("snkPersonalizedFilter.info.labelValueVarible"),mode:h.SWITCH,onEzChange:e=>this.handleChangeValueVariable(e.detail),enabled:!this.isDefaultFilter})),this._showValueVariable&&!this._optionNotNull&&s("ez-icon",Object.assign({class:"box__container--input-value-variable--icon",size:"large",iconName:"settings-inverted"},{[u.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:"iconConfig"},{title:this.getMessage("snkPersonalizedFilter.info.titleTooltip"),onClick:()=>this.openSnkFilterParamConfig()})),s("snk-filter-param-config",{ref:e=>this._elFilterParamConfigRef=e,messagesBuilder:this.messagesBuilder})),s("div",{class:"box__container--button-delete"},s("div",{class:"box__container--button-delete--icon"},s("ez-button",{mode:"icon",iconName:"delete",enabled:this.canRemove,label:this.getMessage("snkPersonalizedFilter.info.labelDeleteItem"),onClick:e=>this.confirmRemove(e)}))))))}static get watchers(){return{expression:["expressionChanged"]}}};F.style=".sc-snk-expression-item-h{display:flex;width:100%;--snk-expression-item--background-color:var(--background--xlight, #fff);--snk-expression-item__itens--padding:var(--space--small, 6px);--snk-expression-item__width--input-operator:220px;--snk-expression-item__width--input-value:240px;--snk-expression-item__width--input-value-variable:176px;--snk-expression-item--border-radius:var(--border--radius-medium, 12px);--snk-expression-item--border-color:var(--color--strokes, #DCE0E8);--snk-expression-item--border-style:var(--border--small, 1px solid);--snk-expression-item__background-color-dashed:var(--background--body, #fafcff)}.box.sc-snk-expression-item{width:100%;height:56px;background:var(--snk-expression-item--background-color);border:var(--snk-expression-item--border-color) var(--snk-expression-item--border-style);border-radius:var(--snk-expression-item--border-radius)}.box__container.sc-snk-expression-item{display:flex;align-items:center;justify-content:space-between;white-space:nowrap;margin:var(--space--small, 6px)}.box__container--input-filter.sc-snk-expression-item{width:100%}.box__container--input-operator.sc-snk-expression-item{display:flex;width:var(--snk-expression-item__width--input-operator);min-width:var(--snk-expression-item__width--input-operator)}.box__container--input-value.sc-snk-expression-item{display:flex;width:var(--snk-expression-item__width--input-value);min-width:var(--snk-expression-item__width--input-value)}.box__container--input-value-variable.sc-snk-expression-item{display:flex;width:var(--snk-expression-item__width--input-value-variable);min-width:var(--snk-expression-item__width--input-value-variable)}.box__container--button-delete.sc-snk-expression-item{display:flex}.box__container.sc-snk-expression-item>div.sc-snk-expression-item{padding-left:var(--snk-expression-item__itens--padding);padding-right:var(--snk-expression-item__itens--padding)}.box__container--button-delete--icon.sc-snk-expression-item{width:42px;min-width:42px}.box__container--input-value-variable--icon.sc-snk-expression-item{cursor:pointer}.dashes.sc-snk-expression-item{z-index:var(--more-visible, 2);background:var(--snk-expression-item__background-color-dashed);border-bottom:2px dashed var(--text-secondary, #A2ABB9);border-left:2px dashed var(--text-secondary, #A2ABB9);position:absolute;width:15px;height:62px;margin-left:-15px;margin-top:-33.5px}";export{g as snk_expression_group,F as snk_expression_item}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as s,H as n}from"./p-d8d8169b.js";import{ApplicationUtils as e}from"@sankhyalabs/ezui/dist/collection/utils";const o=class{constructor(s){i(this,s),this.configClose=t(this,"configClose",7),this.saveConfig=t(this,"saveConfig",7),this.isEditingGuide=!1,this.isEditingGroup=!1,this.configOptions=[],this.selectedConfig=void 0,this.messagesBuilder=void 0,this.hasChanges=!1,this.optionConfigChanged=!1}handleIsEditingGuideName({detail:i}){this.isEditingGuide=i}handleIsEditingGroupName({detail:i}){this.isEditingGroup=i}saveFormConfig(){if(this.isEditingGuide||this.isEditingGroup){const i=this.getMessage("snkFormConfig.confirm.title"),t=this.getMessage(this.isEditingGuide?"snkFormConfig.alert.titleGuideEditing":"snkFormConfig.alert.titleGroupEditing");e.alert(i,t)}else this.saveConfig.emit()}async closeFormConfig(){if(this.hasChanges){const i=this.getMessage("snkFormConfig.confirm.title"),t=this.getMessage("snkFormConfig.confirm.cancel");if(!await e.confirm(i,t))return}this.configClose.emit()}getMessage(i,t){return this.messagesBuilder.getMessage(i,t)}openConfirmDialog(i="",t=this.getMessage("snkFormConfig.confirm.title")){return e.confirm(t,i)}async applyOptionConfig(){var i,t;const s=null!==(t=null===(i=this.selectedConfig)||void 0===i?void 0:i.name)&&void 0!==t?t:this.getMessage("snkFormConfig.configs.selectedConfig"),n=this.getMessage("snkFormConfig.confirm.apply").replace("{0}",s);await this.openConfirmDialog(n)&&this.saveConfig.emit()}renderSaveActions(){if(this.hasChanges||this.optionConfigChanged)return s("div",{class:"right-group"},s("ez-button",{title:this.getMessage("snkFormConfig.actions.cancel"),label:this.getMessage("snkFormConfig.actions.cancel"),onClick:this.closeFormConfig.bind(this),size:"medium"}),s("ez-button",this.hasChanges?{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"}:{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"}))}render(){return s(n,null,s("div",{class:"left-group"},s("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"}),s("h1",{class:"ez-title ez-title--primary ez-title--extra-large ez-padding--small"},this.getMessage("snkFormConfig.title")),s("configs-button",{hasChanges:this.hasChanges,configOptions:this.configOptions,selectedConfig:this.selectedConfig,messagesBuilder:this.messagesBuilder})),this.renderSaveActions())}};o.style=".sc-config-header-h{display:flex;padding-top:12px;padding-left:12px;align-items:center;width:100%;justify-content:space-between}.left-group.sc-config-header{display:flex;gap:8px}.right-group.sc-config-header{padding-right:18px;display:flex}";export{o as config_header}
@@ -0,0 +1 @@
1
+ import{r as e,c as i,f as t,h as s,H as o,g as n}from"./p-d8d8169b.js";import{StringUtils as r,ObjectUtils as a}from"@sankhyalabs/core";import{S as l}from"./p-51833248.js";import{S as d,d as h,I as u}from"./p-8f73da95.js";import{a as c,G as p}from"./p-9019a32f.js";import{ApplicationUtils as g}from"@sankhyalabs/ezui/dist/collection/utils";const m=class{constructor(t){e(this,t),this.isEditingGuideName=i(this,"isEditingGuideName",7),this.isEditingGroupName=i(this,"isEditingGroupName",7),this.layoutChanged=i(this,"layoutChanged",7),this.setFieldListAsAvailable=i(this,"setFieldListAsAvailable",7),this.guideRenamed=i(this,"guideRenamed",7),this.ID_GROUPS="container-groups",this.ID_FIELDS="container-fields",this.reservedGuideNames=[c.main.toLowerCase(),c.general.toLocaleLowerCase()],this.groupsListMemory=[],this.groupsRefList=[],this.isEditGuideNameActive=!1,this.selectedGuide=void 0,this.groupsList=[],this.guideNames=[],this.dataUnit=void 0,this.messagesBuilder=void 0}onMessagesBuilderChange(){this.setCustomCSSProperties()}handleFieldConfigChanged({detail:e}){const i=this.groupsListMemory.find((i=>i.name===e.group));if(!i)return;const t=i.fields.map((i=>i.name===e.name?e:i)),s=this.groupsListMemory.map((e=>e.name===i.name?{name:e.name,fields:t}:e));this.applyGroupUpdate(s)}observeSelectedGuide(){this.isEditGuideNameActive=!1,t(this),this.isEditingGroupName.emit(!1)}observeGroupList(e){this.groupsListMemory=[...e]}observeIsEditGuideNameActive(e){this.isEditingGuideName.emit(e)}async addFieldToLayout(e){e.group=p.noGroup,e.tab=this.selectedGuide.name;const i=this.getFixedFieldsGroup(),t={name:p.noGroup,fields:i?[...i.fields,e]:[e]},s=i?[t,...this.groupsListMemory.slice(1)]:[t,...this.groupsListMemory];this.applyGroupUpdate(s)}getFixedFieldsGroup(){return this.groupsListMemory.find((e=>e.name===p.noGroup))}getMessage(e,i){return this.messagesBuilder.getMessage(e,i)}handleAddGroup(){const e={name:this.buildNewGroupName(),fields:[]},i=[...this.groupsListMemory,e];this.applyGroupUpdate(i)}buildNewGroupName(){var e,i;const t=this.getMessage("snkFormConfig.form.newGroup"),s=null!==(i=null===(e=this.groupsListMemory.filter((e=>e.name.includes(t))))||void 0===e?void 0:e.length)&&void 0!==i?i:0;return 0===s?t:`${t} (${s})`}makeDynamicFieldsContainersDraggable(){this.groupsList.filter((e=>e.name!==p.noGroup)).forEach((e=>{this.makeFieldContainerDraggable(this.getFieldsContainerId(e.name))}))}getFieldsContainerId(e){return`${this.ID_FIELDS}-${r.replaceBlankCharacters(e)}`}handleSortGroups(e){var i;const t=null===(i=e.to)||void 0===i?void 0:i.children;if(!t)return;const s=Array.from(t).map((e=>e.getAttribute("data-group-name"))),o=[],n=this.getFixedFieldsGroup();n&&o.push(n),s.forEach((e=>{const i=this.groupsListMemory.find((i=>i.name===e));i&&o.push(i)})),this.applyGroupUpdate(o)}handleFieldsChanged(e){let i=[...this.groupsListMemory];i=[...this.handleFieldsOnGroupUpdate(i,e,d.FROM)],i=[...this.handleFieldsOnGroupUpdate(i,e,d.TO)],this.applyGroupUpdate(i)}applyGroupUpdate(e){var i;return null===(i=this.groupsRefList)||void 0===i||i.forEach((e=>null==e?void 0:e.cancelEdition())),!a.equals(e,this.groupsListMemory)&&(this.groupsListMemory=[...e],this.layoutChanged.emit(this.groupsListMemory),!0)}handleFieldsOnGroupUpdate(e,i,t){const s=i[t];return s.id===u?e:this.updateGroupList(e,s,t,i)}updateGroupList(e,i,t,s){const o=i.getAttribute("data-group-name"),n={name:o,fields:h(s,t,o,this.selectedGuide.name)};return this.replaceGroup(e,n)}replaceGroup(e,i){return e.map((e=>e.name===i.name?i:e))}makeGroupsDraggable(){try{const e=this.getContainerElement(this.ID_GROUPS);if(!e)return;new l(e,{group:"groups",ghostClass:"ghost",direction:"horizontal",animation:15,onSort:e=>this.handleSortGroups(e)})}catch(e){console.error(this.getMessage("snkFormConfig.errors.failMakeGroupsDraggable"),this.ID_GROUPS)}}makeFieldContainerDraggable(e){try{const i=this.getContainerElement(e);if(!i)return;new l(i,{group:"fields",ghostClass:"ghost",direction:"vertical",animation:15,onAdd:e=>this.handleFieldsChanged(e),onRemove:e=>this.handleFieldsChanged(e),onSort:e=>this.handleFieldsChanged(e)})}catch(i){console.error(this.getMessage("snkFormConfig.errors.failMakeFieldContainerDraggable"),e)}}getContainerElement(e){return this.el.querySelector(`[id="${e}"]`)}handleSetFieldAsAvailable(e){var i;const t=null!==(i=e.group)&&void 0!==i?i:p.noGroup,s=this.groupsListMemory.find((e=>e.name===t)).fields.filter((i=>i.name!==e.name)),o=[...this.replaceGroup(this.groupsListMemory,{name:t,fields:s})];this.applyGroupUpdate(o)}removeGroup(e){var i,t;const s=null!==(t=null===(i=this.groupsListMemory.find((i=>i.name===e.name)))||void 0===i?void 0:i.fields)&&void 0!==t?t:[],o=[...this.groupsListMemory.filter((i=>i.name!==e.name))];this.applyGroupUpdate(o)&&this.setFieldListAsAvailable.emit(s)}handleRenameGroup(e){const{value:i,newValue:t}=e.detail,s=this.groupsListMemory.map((e=>{if(e.name!==i)return Object.assign({},e);const s=e.fields.map((e=>Object.assign(Object.assign({},e),{group:t})));return{name:t,fields:s}}));this.applyGroupUpdate(s)}canSaveGroup(e,i){if(!this.groupsList.some((i=>{var t;return(null!==(t=i.name)&&void 0!==t?t:"").toLocaleLowerCase()===(null!=e?e:"").toLocaleLowerCase()})))return!0;const t=this.getMessage("snkFormConfig.confirm.title"),s=this.buildDuplicatedGroupNameContent(e);return g.alert(t,s).then((()=>{var e;return null===(e=this.groupsRefList[i])||void 0===e?void 0:e.applyFocusTextEdit()})),!1}buildDuplicatedGroupNameContent(e){const i=this.selectedGuide.name;return`\n ${this.getMessage("snkFormConfig.alert.titleGroupExists")}\n <b>${e}</b>\n ${this.getMessage("snkFormConfig.alert.inTab")}\n <b>${i===c.main?this.getMessage("snkFormConfig.form.mainArea"):i}</b>.\n <br/><br/>\n ${this.getMessage("snkFormConfig.alert.infoValidTitle")}\n `}buildDuplicatedTabNameContent(e){return`\n ${this.getMessage("snkFormConfig.alert.titleGuideExists")}\n <b>${e}</b>.\n <br/><br/>\n ${this.getMessage("snkFormConfig.alert.infoValidTitle")}\n `}buildReservedTabNameContent(e){return`\n ${this.getMessage("snkFormConfig.alert.titleGuideReservedName")}\n <br/><br/>\n <b>${e}</b>.\n <br/><br/>\n ${this.getMessage("snkFormConfig.alert.infoValidTitle")}\n `}renderFields(e){if(0!==e.length)return e.map((e=>s("field-item",{key:e.name,fieldConfig:e,onLayoutConfig:!0,dataUnit:this.dataUnit,messagesBuilder:this.messagesBuilder,onSetFieldAsAvailable:e=>this.handleSetFieldAsAvailable(e.detail)})))}renderDraggableGroups(){return this.groupsList.filter((e=>e.name!==p.noGroup)).map(((e,i)=>{var t;return s("div",{key:e.name,class:"group-config","data-group-name":e.name},s("ez-collapsible-box",{ref:e=>this.groupsRefList[i]=e,label:e.name,headerSize:"large",editable:!0,removable:!0,"icon-placement":"left",onEzRemove:()=>this.removeGroup(e),onEzSaveEditLabel:e=>this.handleRenameGroup(e),onEzEditLabelMode:({detail:e})=>this.isEditingGroupName.emit(e),conditionalSave:e=>this.canSaveGroup(e,i)},s("div",{id:this.getFieldsContainerId(e.name),class:"group-content "+((null===(t=e.fields)||void 0===t?void 0:t.length)?"":"empty-content"),"data-group-name":e.name},this.renderFields(e.fields))))}))}renderFixedFields(){var e,i;const t=null!==(i=null===(e=this.groupsList.find((e=>e.name===p.noGroup)))||void 0===e?void 0:e.fields)&&void 0!==i?i:[];return this.renderFields(t)}handleRenameGuide(e){const{value:i,newValue:t}=e.detail;if(this.isEditGuideNameActive=!1,t===i)return;const s=this.guideNames.includes(t.toLowerCase()),o=this.reservedGuideNames.includes(t.toLowerCase());if(o||s){const e=this.getMessage("snkFormConfig.confirm.title"),i=o?this.buildReservedTabNameContent(t):this.buildDuplicatedTabNameContent(t);g.alert(e,i).then((()=>this._refTextEdit.applyFocusSelect()))}else this.guideRenamed.emit(t)}cancelEditGuideName(){this.isEditGuideNameActive=!1}async startGuideNameEdition(){this.isEditGuideNameActive=!0,setTimeout((async()=>{await this._refTextEdit.applyFocusSelect()}),200)}getTextEditStyle(){return{fontSize:"20px",fontWeight:"500",fontFamily:"Roboto"}}renderGuideName(){var e,i;return this.isEditGuideNameActive?s("div",{class:"guide-header"},s("ez-text-edit",{class:"collapsible-box__text-edit",ref:e=>this._refTextEdit=e,value:null===(e=this.selectedGuide)||void 0===e?void 0:e.label,styled:this.getTextEditStyle(),onSaveEdition:e=>this.handleRenameGuide(e),onCancelEdition:()=>this.cancelEditGuideName()})):s("div",{class:"guide-header"},s("span",{class:"guide-header-label"},null===(i=this.selectedGuide)||void 0===i?void 0:i.label),this.renderEditGuideNameButton())}renderEditGuideNameButton(){var e;if((null===(e=this.selectedGuide)||void 0===e?void 0:e.name)!==c.main)return s("ez-button",{mode:"icon",class:"ez-button--tertiary",onClick:()=>this.startGuideNameEdition(),size:"medium",iconName:"edit",title:this.getMessage("snkFormConfig.buttons.rename")})}setCustomCSSProperties(){document.documentElement.style.setProperty("--empty-content-message",`"${this.getMessage("snkFormConfig.form.labelDropField")}"`),document.documentElement.style.setProperty("--no-group-message",`"${this.getMessage("snkFormConfig.form.subTitleInfo")}"`)}componentDidRender(){this.makeGroupsDraggable(),this.makeDynamicFieldsContainersDraggable(),this.makeFieldContainerDraggable(p.noGroup),this.setCustomCSSProperties()}render(){return this.selectedGuide?s(o,{class:"ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container"},this.renderGuideName(),s("div",{class:"layout-container"},s("ez-scroller",{direction:"vertical",activeShadow:!0},s("div",{class:"no-group-container"},s("div",{id:p.noGroup,class:"group-content","data-group-name":p.noGroup},this.renderFixedFields())),s("hr",null),s("div",{id:this.ID_GROUPS,class:"groups-container"},this.renderDraggableGroups()))),s("div",{class:"add-group-container",onClick:this.handleAddGroup.bind(this)},s("ez-icon",{slot:"leftIcon",iconName:"plus"}),s("span",null,this.getMessage("snkFormConfig.form.createNewGroup")))):s(o,{class:"ez-flex-item--auto ez-size-height--full ez-box ez-padding--medium content-container"},s("span",{class:"no-guide-selected"},this.getMessage("snkFormConfig.form.noGuideSelected")))}get el(){return n(this)}static get watchers(){return{messagesBuilder:["onMessagesBuilderChange"],selectedGuide:["observeSelectedGuide"],groupsList:["observeGroupList"],isEditGuideNameActive:["observeIsEditGuideNameActive"]}}};m.style='.sc-fields-layout-h{display:flex;padding:12px;box-shadow:var(--shadow--small, 0 0 16px rgba(0, 38, 111, 0.07));border-radius:var(--border--radius-medium, 6px);height:var(--snk-form-config-container-height);flex-direction:column}.layout-container.sc-fields-layout{container-type:inline-size;display:flex;flex-direction:column;overflow:auto;height:calc(100vh - 225px)}.guide-header.sc-fields-layout{display:flex;width:100%;font-size:20px;border-bottom:1px solid #dce0e8;margin-bottom:6px;align-items:center;height:45px}.guide-header.sc-fields-layout ez-button.sc-fields-layout{transition:all 0.2s ease-in-out;visibility:hidden;opacity:0}.guide-header.sc-fields-layout:hover ez-button.sc-fields-layout{visibility:visible;opacity:1}.guide-header-label.sc-fields-layout{display:block;padding:10px 0}.group-config.sc-fields-layout{padding:12px 0;display:flex;flex-direction:column;width:100%}.group-content.sc-fields-layout{display:grid;gap:12px;min-height:65px;width:100%;padding:6px 0;grid-template-columns:repeat(auto-fill, minmax(250px, 1fr))}.group-content.empty-content.sc-fields-layout{position:relative}.group-content.empty-content.sc-fields-layout::before{content:var(--empty-content-message, "Arraste e solte um campo aqui");color:#cbcfd7;font-size:16px;font-weight:500;text-align:center;position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;transition:opacity 0.3s;height:100%;box-sizing:border-box;padding:10px;background:#f9f9f9;border:1px dashed #dce0e8;border-radius:6px}.no-group-container.sc-fields-layout{padding:12px 0;width:100%;border-bottom:1px solid #dce0e8}.no-group-container.sc-fields-layout::before{content:var(--no-group-message, "Inclua estes campos nos grupos ou deixe-os separados no topo do formulário");width:100%;display:block;font-size:16px;font-weight:400;color:#AFB6C0;padding-bottom:12px}.add-group-container.sc-fields-layout{display:flex;align-items:center;border-top:1px solid #dce0e8;padding-top:22px;padding-bottom:12px;gap:6px;cursor:pointer;justify-content:center;width:100%;height:55px}.no-guide-selected.sc-fields-layout{display:block;margin:auto;font-size:24px;color:#AFB6C0;font-weight:500}.ghost.sc-fields-layout{opacity:.5;background:#c8fbe2}';export{m as fields_layout}
@@ -0,0 +1,11 @@
1
+ import{r as t,c as e,h as i,H as s,g as n}from"./p-d8d8169b.js";import{DateUtils as r,StringUtils as a,ObjectUtils as o,WaitingChangeException as h,SilentException as l,WarningException as c,ErrorException as d,ElementIDUtils as u,SearchUtils as p,ArrayUtils as m,KeyboardManager as g,OnboardingUtils as w,DependencyType as y,ApplicationContext as v,DataType as f,ErrorTracking as P,UserAgentUtils as k,LockManager as _,LockManagerOperation as z}from"@sankhyalabs/core";import{ApplicationUtils as A}from"@sankhyalabs/ezui/dist/collection/utils";import{C as x}from"./p-3dba3468.js";import{d as I,D as S,U as b,S as T}from"./p-0dac8fef.js";import{A as L,a as N}from"./p-c9e6d720.js";import{P as C,D as E}from"./p-b35574b5.js";import{P as D}from"./p-ba4979b4.js";import{T as O}from"./p-9019a32f.js";import"./p-0f3698af.js";import"./p-ff1990ad.js";import{F as R}from"./p-c6331595.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";class M{static webConnectionCaller(t,e,i){var s;null===(s=window.AppletCaller)||void 0===s||s.webConnectionCaller(t,e,i)}}const U=j;function j(t,e){const i=F();return(j=function(t){return i[t-=378]})(t,e)}function F(){const t=["true","863GKWjmo","parse","56355fjjjAm","isSup","putAccess","4324480sjuCdS","hasOwnProperty","239748okvJLB","name","6055770tXeRaU","actions","forEach","7RPRvzn","1042CHxkUw","2988126NIwRMm","20MTNzmH","authorizationSf","item","string","hasAccess","isArray","Objeto não pode ser indefinido.","3071943fWslZp","parseFromJSON"];return(F=function(){return t})()}!function(){const t=j,e=F();for(;;)try{if(281287==parseInt(t(399))/1*(-parseInt(t(387))/2)+-parseInt(t(401))/3+parseInt(t(381))/4*(-parseInt(t(389))/5)+parseInt(t(388))/6*(-parseInt(t(386))/7)+parseInt(t(379))/8+parseInt(t(396))/9+parseInt(t(383))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class ${[U(397)](t){const e=U;if(typeof(t=utxt(t[e(390)]))==e(392)&&(t=JSON[e(400)](t)),null==t)throw Error(e(395));const i=new H("S"===t[e(402)]||!0===t[e(402)]);return Array[e(394)](t[e(391)])&&t[e(391)][e(385)]((t=>i.putAccess(t[e(382)],String(t.status)==e(398)))),i}}class H{constructor(t){const e=U;this.isSup=t,this[e(384)]={}}[U(378)](t,e){this[U(384)][t]=e}[U(393)](t){const e=U;if(this[e(402)])return!0;let i=!0;return this[e(384)][e(380)](t)&&(i=this.actions[t]),i}isUserSup(){return this.isSup}}class B{constructor(){this._embeddedParams=new Map,this._cachedParams=new Map,this.templateByQuery=new Map;try{if(null!=window.MGE_PARAMS){atob(window.MGE_PARAMS).split("__;__").forEach((t=>{const[e,i]=t.split("__=__");this._embeddedParams.set(e,i)}))}}catch(t){console.error("Problemas ao obter parâmetros embarcados"),console.error(t)}this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchParam",I.gql`query($name: String!) {
2
+ $queryAlias$: fetchResource(name: $name){
3
+ name
4
+ resource
5
+ }
6
+ }`)}async getParam(t){if(this._embeddedParams.has(t))return Promise.resolve(this._embeddedParams.get(t));if(this._cachedParams.has(t))return this._cachedParams.get(t);const e=`param://application?params=${t}`,i=await S.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchParam")});return this._cachedParams.set(t,i),i}async asString(t){const e=await this.getParam(t);return this.getValue(e)}async asInteger(t){const e=await this.getParam(t);return parseInt(this.getValue(e))}async asFloat(t){const e=await this.getParam(t);return parseFloat(this.getValue(e))}async asBoolean(t){const e=await this.getParam(t);return"S"===this.getValue(e)}async asDate(t){const e=await this.getParam(t);return r.strToDate(this.getValue(e))}async getBatchParams(t){const e=await this.getParam(t.join(",")),i={};return e.forEach((t=>i[t.name]=t.resource)),i}getValue(t={}){if(Array.isArray(t)&&t.length>0&&(t=t[0]),"string"==typeof t)return t;if(a.isEmpty(t.resource))return"";try{const e=o.stringToObject(t.resource),[i]=Object.keys(e);return e[i]}catch(t){console.warn("Erro ao converter string JSON.")}}}class q{constructor(){this.templateByQuery=new Map,this.cancel=[],this.buildTemplates()}buildTemplates(){this.templateByQuery.set("fetchTotals",I.gql`query($filters: [InputFilter!] $name: String!) {
7
+ $queryAlias$: fetchTotals(name: $name, filters: $filters ){
8
+ name
9
+ value
10
+ }
11
+ }`)}fetchTotals(t,e,i=[]){const s=`${t}_${e}`,n=this.cancel.findIndex((t=>t[s]));return n>=0&&(this.cancel[n][s](),this.cancel.splice(n,1)),Promise.race([new Promise((t=>this.cancel.push({[s]:t}))),this.getTotals(t,e,i)]).then((t=>{let e=new Map;if(t){e=t;const i=this.cancel.findIndex((t=>t[s]));i>=0&&this.cancel.splice(i,1)}return e}))}getTotals(t,e,i=[]){return new Promise(((s,n)=>{S.get().callGraphQL({query:this.templateByQuery.get("fetchTotals"),values:{name:`totals://${t}/${e}`,filters:i}}).then((t=>{if(t.length>0){const e=new Map;return t.forEach((t=>e.set(t.name,parseFloat(t.value)))),s(e)}return n("Não foi possível recuperar os totalizadores")})).catch(n)}))}}function V(){const t=["2909523kXwted","CompanyName=Sankhya Jiva Tecnologia e Inovao Ltda,LicensedApplication=Sankhya Gestao,LicenseType=SingleApplication,LicensedConcurrentDeveloperCount=2,LicensedProductionInstancesCount=0,AssetReference=AG-019460,ExpiryDate=9_November_2022_[v2]_MTY2Nzk1MjAwMDAwMA==10487151e296ee4360f80961ca960869","1131048CARoeW","502909mLEPmu","447255iQEXuN","428UHbJwW","270AFTxAV","194369jhGqTI","1540nWuTrj","2044062GicUQI","30CkXPWg"];return(V=function(){return t})()}const K=W;function W(t,e){const i=V();return(W=function(t){return i[t-=392]})(t,e)}!function(){const t=W,e=V();for(;;)try{if(951926==-parseInt(t(398))/1+-parseInt(t(393))/2+parseInt(t(395))/3+-parseInt(t(400))/4*(parseInt(t(392))/5)+-parseInt(t(401))/6*(-parseInt(t(402))/7)+parseInt(t(397))/8+-parseInt(t(399))/9*(-parseInt(t(394))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const G=K(396);var J;class Y{static openAppActivity(t,e){var i;null===(i=window.workspace)||void 0===i||i.openAppActivity(t,e)}static getAppLabel(t){if(null!=(null===window||void 0===window?void 0:window.workspace))return null==window.workspace.getAppLabel&&(window.workspace.getAppLabel=t=>(t||"").split(".").pop()),window.workspace.getAppLabel(t)}static setScreenToUseV3Layout(){var t;null===(t=window.workspace)||void 0===t||t.setScreenToUseV3Layout()}static setScreenToUseOldLayout(){var t;null===(t=window.workspace)||void 0===t||t.setScreenToUseOldLayout()}static showDesktop(){var t,e;null===(e=null===(t=window.workspace)||void 0===t?void 0:t.showDesktop)||void 0===e||e.call(t)}static searchApp(){var t,e;null===(e=null===(t=window.workspace)||void 0===t?void 0:t.searchApp)||void 0===e||e.call(t)}static openHelp(){var t,e;null===(e=null===(t=window.workspace)||void 0===t?void 0:t.openHelp)||void 0===e||e.call(t)}static applicationClick(){var t,e;(null===(t=window.workspace)||void 0===t?void 0:t.applicationClick)&&(null===(e=window.workspace)||void 0===e||e.applicationClick())}}Y.resourceID=null===(J=window.workspace)||void 0===J?void 0:J.resourceID;class Z{constructor(t){this._app=t,window.addEventListener("error",(t=>this.errorHandler(t))),window.addEventListener("unhandledrejection",(t=>this.rejectionHandler(t)))}getMessage(t,e){return this._app.messagesBuilder.getMessage(t,e)}rejectionHandler(t){const e=t.reason;e instanceof h||(e?this.processException(e):this._app.isDebugMode().then((t=>{t&&this._app.error(this.getMessage("snkErrorHandler.title.promiseRejected"),this.getMessage("snkErrorHandler.message.undeterminedPromiseRejection"))})))}errorHandler(t){this.processException(t.error)}buildErrorCodeHTML(t){return`<br><a href="#" onclick="try{window.workspace.openHelp('_tbcode:${t}')} catch(e){alert('${this.getMessage("snkErrorHandler.message.cannotOpenHelp")}');}">${this.getMessage("snkErrorHandler.errorCode.label")}${t}</a>`}processException(t){t.errorCode&&(t.message+=this.buildErrorCodeHTML(t.errorCode)),t instanceof l?console.warn(this.getMessage("snkErrorHandler.message.silentExceptionIgnored"),t):t instanceof h||t instanceof c?this._app.alert(t.title,t.message):t instanceof d?this._app.error(t.title,t.message):this._app.isDebugMode().then((e=>{if(e)if(t instanceof Error)this._app.error(t.name,t.message);else{const e=(null==t?void 0:t.title)||this.getMessage("snkErrorHandler.title.errorDetected",void 0),i="string"==typeof t?t:t.message||`${this.getMessage("snkErrorHandler.error.internal")} "${o.objectToString(t)}"`;this._app.error(e,i)}}))}}class X{constructor(){this._debounceTime=1500,this.requests=new Map,this.requestsLoadingBar=[]}onRequestStart(t){if(t.url.includes("quietMode=true"))return;this.requestsLoadingBar.push(t.requestId);const e=setTimeout((()=>{this.ezLoadingBar.show()}),this._debounceTime);this.requests.set(t.requestId,e)}onRequestEnd(t){var e,i,s;const n=this.requests.get(t.requestId);clearTimeout(n),(null===(e=this.requestsLoadingBar)||void 0===e?void 0:e.includes(t.requestId))&&(this.requestsLoadingBar=null===(i=this.requestsLoadingBar)||void 0===i?void 0:i.filter((e=>e!==t.requestId)),!this.requestsLoadingBar.length&&(null===(s=this.ezLoadingBar)||void 0===s||s.hide()))}}class Q{constructor(){this._debounceTime=1e3,this._ignoredNameTypes=["totals"],this._countRequest=0}onRequestStart(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest++,this.ezLoadingBar.show(),this._timerLoading&&clearTimeout(this._timerLoading))}onRequestEnd(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest--,this._timerLoading=setTimeout((()=>{this._countRequest<=0&&this.ezLoadingBar.hide()}),this._debounceTime))}isIgnoreLoadingOnRequest(t){if(null==t)return!1;if(t.url.includes("quietMode=true"))return!0;if(null==t.requestBody)return!1;if(1==t.requestBody.length){const{name:e}=t.requestBody[0].variables;if(e){const t=e.split(":");return this._ignoredNameTypes.indexOf(t[0])>=0}}return!1}}class tt{static create({strategy:t}){switch(t){case"request_name":return new Q;case"request_time":return new X;default:throw new Error("Strategy not found")}}}const et=["<img","<svg"];class it{constructor(){this._config=null,this.listeners=[]}static getInstance(){return it.instance||(it.instance=new it),it.instance}get config(){return this._config}setConfig(t){this._config=t,this.notifyListeners()}onConfigChange(t){this.listeners.push(t)}notifyListeners(){this.listeners.forEach((t=>t(this._config)))}}const st=class{constructor(i){t(this,i),this.applicationLoaded=e(this,"applicationLoaded",7),this.applicationLoading=e(this,"applicationLoading",7),this.NEW_VERSION_POPUP_LOCKER="NEW_VERSION_POPUP_LOCKER",this.FEATURE_FLAG_CACHE_DURATION=36e5,this._authPromises=[],this._keyboardManager=new g,this._waitingAppReady=new Array,this._duCache=new Map,this._duPromises=new Map,this._requestListener=tt.create({strategy:"request_time"}),this._maxTimerAppLoading=1e4,this._featureFlagsCache=new Map,this._isBrowserTypeElectron=!1,this._pendingActions=new Map,this._loadPkParameter=null,this._isLoadedByPk=!1,this._formConfigFetcher=new R,this._LayoutFormConfigSingleton=it.getInstance(),this._applicationReady=!1,this._templateSkeleton=O.GRID,this._activeScrimWindow=!1,this.enableLockManagerLoadingApp=void 0,this.messagesBuilder=void 0,this.configName=void 0,this.gridLegacyConfigName=void 0,this.formLegacyConfigName=void 0,this.loadByPK=void 0}async processPendingActions(t){const e=this._pendingActions.get(t);e&&e.length&&(e.forEach((t=>t())),this._pendingActions.set(t,[]))}get parameters(){return this._parameters||(this._parameters=new B),this._parameters}async getAuth(t){return null==t?this.getApplicationAuth():new Promise(((e,i)=>{this.authFetcher.getData(t).then((t=>{e(t)})).catch((t=>{i(t)}))}))}async getApplicationAuth(){return this._auth?Promise.resolve(this._auth):new Promise(((t,e)=>{const i=this._authPromises.length>0;this._authPromises.push(new nt(t,e)),i||this.authFetcher.getData(this.applicationResourceID).then((t=>{for(this._auth=t;this._authPromises.length>0;)this._authPromises.pop().resolve(this._auth)})).catch((t=>{for(;this._authPromises.length>0;)this._authPromises.pop().reject(t)}))}))}watchPropHandler(t,e){t&&this._loadPkParameter&&(this.loadByPK(this._loadPkParameter.pk,this._loadPkParameter.redirect),this._loadPkParameter=null)}async getKeyboardManager(){return Promise.resolve(this._keyboardManager)}async getLayoutFormConfig(){return Promise.resolve(this._LayoutFormConfigSingleton)}async isUserSup(){return new Promise(((t,e)=>{this.getAuth().then((i=>{this.getAuthList(i).then((e=>{t(e.isSup)})).catch((t=>e(t)))}))}))}async addPendingAction(t,e){var i;const s=null!==(i=this._pendingActions.get(t))&&void 0!==i?i:[];this._pendingActions.set(t,[...s,e])}async callServiceBroker(t,e,i){return S.get().callServiceBroker(t,e,i)}async initOnboarding(t){this.hasToShowNewVersionPopup()?await this.addPendingAction(this.NEW_VERSION_POPUP_LOCKER,(()=>this.doInitOnboarding(t))):this.doInitOnboarding(t)}doInitOnboarding(t){w.getInstance().init(t,window.envContext)}async hasAccess(t,e){return new Promise(((i,s)=>{this.getAuth(e).then((e=>{this.getAuthList(e).then((e=>{i(e.isSup||e.actions[t])})).catch((t=>s(t)))}))}))}async getAllAccess(t){return new Promise(((e,i)=>{this.getAuth(t).then((t=>{this.getAuthList(t).then((t=>{const i={};i.isSup=t.isSup,Object.entries(L).forEach((e=>{i[e[0]]=e[1]===L.CLONE?t.actions[L.INSERT]&&t.actions[L.CLONE]||!1:t.actions[e[1]]||!1})),e(i)})).catch((t=>i(t)))}))}))}async getStringParam(t){return this.parameters.asString(t)}async getIntParam(t){return this.parameters.asInteger(t)}async getFloatParam(t){return this.parameters.asFloat(t)}async getBooleanParam(t){return this.parameters.asBoolean(t)}async getDateParam(t){return this.parameters.asDate(t)}async showPopUp(t,e="full",i=!0,s){this.clearContent(this._popUp),this._popUp.addEventListener("ezClosePopup",(()=>{s()}),{once:!0}),this._popUp.appendChild(t),this._popUp.opened=!0,this._popUp.heightMode=e,this._popUp.useHeader=i,"EZ-MODAL-CONTAINER"===t.tagName&&(this._popUp.useHeader=!1)}async showModal(t){this.clearContent(this._rightModal),this._rightModal.appendChild(t),this._rightModal.opened=!0}showAlerts(t){return A.showAlerts({alerts:t})}async closeModal(){this.clearContent(this._rightModal),this._rightModal.opened=!1}async closePopUp(){this.clearContent(this._popUp),this._popUp.opened=!1,this._popUp.useHeader=!0,this._popUp.heightMode="full"}async temOpcional(t){const e=t.split(",");return new Promise(((t,i)=>{this.getAttributeFromHTMLWrapper("opc0009").then((s=>{"1"===s?t(!0):Promise.all(e.map((t=>this.getAttributeFromHTMLWrapper("opc"+t)))).then((e=>{t(e.includes("1"))})).catch((t=>{i(t)}))})).catch((t=>{i(t)}))}))}async getConfig(t){let e={serviceName:"SystemUtilsSP.getConf",requestBody:{config:{chave:t,tipo:"T"}}};return new Promise(((t,i)=>{S.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(e)).then((e=>{var i;return t(null===(i=e.config)||void 0===i?void 0:i.data)})).catch((t=>i(t)))}))}async isFeatureActive(t){const e=Date.now();let i={serviceName:"SystemUtilsSP.featureIsActive",requestBody:{featureName:t}};if(this._featureFlagsCache.get(t)&&e<this._featureFlagsCache.get(t).expires)return Promise.resolve(this._featureFlagsCache.get(t).isActive);const s=(await S.get().callServiceBroker("SystemUtilsSP.featureIsActive",JSON.stringify(i))).isActive;return this._featureFlagsCache.set(t,{isActive:s,expires:e+this.FEATURE_FLAG_CACHE_DURATION}),s}async saveConfig(t,e){let i={serviceName:"SystemUtilsSP.saveConf",requestBody:{config:{chave:t,tipo:"T",data:e}}};return new Promise(((t,e)=>{S.get().callServiceBroker("SystemUtilsSP.saveConf",JSON.stringify(i)).then((e=>t(e))).catch((t=>e(t)))}))}async getAttributeFromHTMLWrapper(t){return Promise.resolve(window[t])}async openApp(t,e){Y.openAppActivity(t,e)}async webConnection(t,e,i){this.getStringParam(t).then((t=>{M.webConnectionCaller(t,e,i)}))}getDuPromissesStack(t){let e;return t&&(e=this._duPromises.get(t),e||(e=[],this._duPromises.set(t,e))),e||[]}async createDataunit(t,e,i,s,n){return null==n&&(n=this.applicationResourceID),new Promise(((r,a)=>{const o=this.getDuPromissesStack(e),h=o.length>0;if(o.push(new nt(r,a)),!h){const r=this.dataUnitFetcher.getDataUnit(t,n,i,s);r.loadMetadata().then((()=>{this.processResolveDataUnit(r,e,o)})).catch((t=>{for(;o.length>0;)o.pop().reject(t)}))}}))}processResolveDataUnit(t,e,i){for(e&&this.updateDataunitCache(void 0,e,t);i.length>0;)i.pop().resolve(t)}async updateDataunitCache(t,e,i){t&&this._duCache.delete(t),this._duCache.set(e,i)}async getDataUnit(t,e,i,s,n){return new Promise(((r,a)=>{const o=this._duCache.get(e);o?r(o):this.createDataunit(t,e,i,s,n).then((t=>{r(t)})).catch((t=>a(t)))}))}async addClientEvent(t,e){return new Promise((i=>{S.addClientEvent(t,e),i()}))}async removeClientEvent(t){return new Promise((e=>{S.removeClientEvent(t),e()}))}async hasClientEvent(t){return new Promise((e=>{e(S.hasClientEvent(t))}))}get applicationResourceID(){return this._applicationResourceID||(this._applicationResourceID=this.urlParams.get("workspaceResourceID")||this.urlParams.get("resourceID")||Y.resourceID||"unknown.resource.id"),this._applicationResourceID}async getResourceID(){return Promise.resolve(this.applicationResourceID)}async getUserID(){return Promise.resolve(window.UID)}async alert(t,e,i,s){return A.alert(t,e,i,s)}async error(t,e,i,s){return A.error(t,e,i,s)}async success(t,e,i,s){return A.success(t,e,i,s)}async message(t,e,i,s){return A.message(t,e,i,s)}async confirm(t,e,i,s,n){return A.confirm(t,e,i,s,n)}async info(t,e){return A.info(t,e)}async loadTotals(t,e,i){return this.totalsFetcher.fetchTotals(t,e,i)}async isLoadedByPk(){return Promise.resolve(this._isLoadedByPk)}async preloadMangerRemoveRecord(t,e){const i=e.map((t=>({__record__id__:t})));C.removeRecords(t,i)}getCountSkeleton(t,e,i){i=i||160;const s=window.innerHeight-i;return Math.floor(s/(t+(e||10)))-1||1}getSkeletonRandomWidth(){return`${Math.floor(71*Math.random())+30}%`}async getAuthList(t){return await(new $).parseFromJSON(t)}get urlParams(){return this._urlParams||(this._urlParams=b.getQueryParams(location.search)),this._urlParams}getMessage(t,e){var i;return null===(i=this.messagesBuilder)||void 0===i?void 0:i.getMessage(t,e)}get dataUnitFetcher(){return this._dataUnitFetcher||(this._dataUnitFetcher=new E),this._dataUnitFetcher}get totalsFetcher(){return this._totalsFetcher||(this._totalsFetcher=new q),this._totalsFetcher}get pesquisaFetcher(){return this._pesquisaFetcher||(this._pesquisaFetcher=new D),this._pesquisaFetcher}get authFetcher(){return this._authFetcher||(this._authFetcher=new N),this._authFetcher}async executeSearch(t,e,i,s){const n=null==i?void 0:i.getField(e);if(n){const{mode:e,argument:r}=t,{ENTITYNAME:a,CODEFIELD:o,DESCRIPTIONFIELD:h,ROOTENTITY:l,DESCRIPTIONENTITY:c,ISHIERARCHYENTITY:d}=n.properties,u=n.dependencies;let p;const m={rootEntity:l,descriptionFieldName:h,codeFieldName:o,showInactives:!1,dataUnitId:i.dataUnitId};null==u||u.filter((t=>t.masterFields)).forEach((t=>{var e;t.type===y.SEARCHING&&(null===(e=t.masterFields)||void 0===e?void 0:e.length)>0&&(p={expression:t.expression,params:t.masterFields.map((t=>{const e=i.getField(t),s=(null==e?void 0:e.dataType)||f.TEXT,n=i.getFieldValue(t);if(null==n)throw this.alert(this.getMessage("snkApplication.search.error.title"),this.getMessage("snkApplication.search.error.requiredField",{fieldLabel:e.label})),new Error(this.getMessage("snkApplication.search.error.requiredField",{fieldLabel:e.label}));return{name:t,value:n,dataType:s}}))})}));const g={entity:a,entityDescription:c,isHierarchyEntity:d,criteria:p,searchOptions:m,allowsNonAnalytic:null==s?void 0:s.allowsNonAnalytic};return(null==s?void 0:s.useSearchPlus)?this.executePreparedSearchPlus(e,r,g):this.executePreparedSearch(e,r,g)}}filterInvalidFields(t,e,i){return t.fieldsMetadata.filter((s=>{let n=!a.isEmpty(e[s.fieldName])&&!1!==s.visible&&"B"!==s.type&&t.pkField!==s.fieldName&&t.descriptionField!==s.fieldName&&(s.isPrimaryKey||!s.isLinkField)&&!("S"===s.type&&"H"===s.presentationType);return n&&(i[s.fieldName]=s),("string"!=typeof e[s.fieldName]||!(e[s.fieldName].indexOf("<img")>-1||e[s.fieldName].indexOf("<svg")>-1))&&n}))}filterMathFields(t,e,i,s){return t&&Array.isArray(t)&&t.forEach((t=>{let i=m.removeReference(e,s[t]);i&&e.unshift(i)})),e=e.slice(0,i)}builOptionItem(t,e,i,s,n){var r;return{value:a.highlightValue(t,e.__matchFields,null===(r=e[n])||void 0===r?void 0:r.toString(),i,!0),label:s?a.highlightValue(t,e.__matchFields,e[s],i,!0):"",details:p.buildDetails(t,i,e)}}async executePreparedSearchPlus(t,e,i){return await this.executePreparedSearch(t,e,Object.assign(Object.assign({},i),{useSearchPlus:!0}))}async executePreparedSearch(t,e,i){const s={},{entity:n,entityDescription:r,criteria:h,searchOptions:l,isHierarchyEntity:c,allowsNonAnalytic:d,useSearchPlus:g}=i;return g?(async(t,e,i,s,n)=>{var r;const h={},{entity:l,entityDescription:c,criteria:d,searchOptions:g,isHierarchyEntity:w,allowsNonAnalytic:y}=i;if("ADVANCED"===t)return new Promise(((t,i)=>{const r=document.createElement("snk-pesquisa");r[u.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=`entity_${l}`,r.entityName=l,r.argument=e,r.searchLoader=t=>n.loadAdvancedSearch(l,t,d,g),r.isHierarchyEntity=w,w&&(r.treeLoader=t=>n.loadTree(l,t,d,g),r.allowsNonAnalytic=y),r.selectItem=e=>{t(e),s.clearPopUpTitle(),s.closePopUp()},s.setPopUpTitle(c),s.showPopUp(r,void 0,void 0,i)}));if("LOAD_DESCRIPTION"===t){let t=await n.loadByCode(l,e,d,g);t=o.stringToObject(t.json.$);const i=null===(r=t.data)||void 0===r?void 0:r[0];return i?{value:e,label:i[t.descriptionField]}:{value:e,label:""}}{let t,i=await n.loadAdvancedSearch(l,e,d,g,t);i=o.stringToObject(i.json.$);let s=i.descriptionField,r=i.pkField;return i.data.map((t=>{let n=((t,e,i)=>t.fieldsMetadata.filter((s=>{let n=!a.isEmpty(e[s.fieldName])&&!1!==s.visible&&"B"!==s.type&&t.pkField!==s.fieldName&&t.descriptionField!==s.fieldName&&(s.isPrimaryKey||!s.isLinkField)&&!("S"===s.type&&"H"===s.presentationType);return n&&(i[s.fieldName]=s),("string"!=typeof e[s.fieldName]||!et.some((t=>e[s.fieldName].includes(t))))&&n})))(i,t,h),o=((t,e,i,s)=>(t&&Array.isArray(t)&&t.forEach((t=>{let i=m.removeReference(e,s[t]);i&&e.unshift(i)})),e=e.slice(0,i)))(t.__matchFields,n,6,h);return((t,e,i,s,n)=>{var r;const o=e.__matchFields,h=null!==(r=e[s])&&void 0!==r?r:"",l=e[n];return{value:l,label:h,presentationValue:a.highlightValue(t,o,l,i,!0),presentationLabel:s?a.highlightValue(t,o,h,i,!0):"",details:p.buildDetails(t,i,e)}})(e,t,o,s,r)}))}})(t,e,i,this,this.pesquisaFetcher):new Promise("ADVANCED"===t?(t,i)=>{const s=document.createElement("snk-pesquisa");s[u.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=`entity_${n}`,s.entityName=n,s.argument=e,s.searchLoader=t=>this.pesquisaFetcher.loadAdvancedSearch(n,t,h,l),s.isHierarchyEntity=c,c&&(s.treeLoader=t=>this.pesquisaFetcher.loadTree(n,t,h,l),s.allowsNonAnalytic=d),s.selectItem=e=>{t(e),this.clearPopUpTitle(),this.closePopUp()},this.setPopUpTitle(r),this.showPopUp(s,void 0,void 0,i)}:(t,i)=>{this.pesquisaFetcher.loadAdvancedSearch(n,e,h,l).then((i=>{let n=(i=o.stringToObject(i.json.$)).descriptionField,r=i.pkField;const a=[];i.data.forEach((t=>{let o=this.filterInvalidFields(i,t,s),h=this.filterMathFields(t.__matchFields,o,6,s);a.push(this.builOptionItem(e,t,h,n,r))})),t(a)})).catch((t=>{i(t)}))})}async isDebugMode(){return new Promise((t=>{t(window.isDebugMode)}))}async getAppLabel(){return Y.getAppLabel(this.applicationResourceID)}addSearchListener(t,e,i){return new Promise((s=>{s(this.pesquisaFetcher.addSearchListener(t,e.dataUnitId,i))}))}importScript(t){return new Promise((e=>{this.getApplicationPath().then((i=>{let s=[];Array.isArray(t)||(s=[t]),s.forEach((t=>{const e=document.createElement("script");e.src=`${i}/${t}`,e.async=!0,document.body.appendChild(e)})),e()}))}))}async getApplicationPath(){return new Promise((t=>{"dev"===window.applicationenv?t(""):t(`/${this.getModuleName()}/labsApps/${window.APPLICATION_NAME}/build`)}))}getModuleName(){return window.MGE_MODULE_NAME||"mgefin-bff"}executeSelectDistinct(t,e,i){return this.dataUnitFetcher.loadSelectDistinct(t,e,i)}getDataFetcher(){return Promise.resolve(S.get())}async whenApplicationReady(){return v.getContextValue("__SNK__APPLICATION__LOADING__")?Promise.resolve(this):new Promise((t=>{this._waitingAppReady.push((()=>t(this)))}))}async setSearchFilterContext(t,e){v.setContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${t})__`,e)}clearContent(t){t&&Array.from(t.children).forEach((e=>{t.removeChild(e)}))}async clearPopUpTitle(){this._popUp.ezTitle=""}async setPopUpTitle(t){this._popUp.ezTitle=t}async pkChangeListener(){const t=top.window.location.hash.split("/")[2];if(this._currentPkParameter===t)return;const e=this.getResourceIdFromToken(),i=b.getPkObjectFromUrlToken(top.window.location.hash),s=window.redirectFrom;if(void 0===i)return;if((!s||-1===s.split("_")[0].indexOf(e.split("_")[0]))&&e!==this.applicationResourceID)return;const n={pk:i};if(this._isLoadedByPk=!0,this.loadByPK)return this.loadByPK(n,s),void(this._currentPkParameter=t);this._loadPkParameter={pk:n,redirect:s},this.defaultLoadByPK(n,t)}getResourceIdFromToken(){var t;return(null===(t=top.window.location.pathname)||void 0===t?void 0:t.indexOf("tabContent.jsp"))>-1&&window.location.generateHash?b.getResourceIdFromUrlToken(window.location.generateHash(window.location.hash)):b.getResourceIdFromUrlToken(top.window.location.hash)}defaultLoadByPK(t,e){if(!(null==t?void 0:t.pk))return;const i=this.getFirstDataUnitFromDOM(),s=i.dataUnit;if(!s)return console.warn(this.getMessage("snkApplication.dataUnit.initDataUnitError")),void i.addEventListener("dataUnitReady",(i=>{this.loadDataWithPKFilter(t,i.detail),this._currentPkParameter=e}));this.loadDataWithPKFilter(t,s),this._currentPkParameter=e}loadDataWithPKFilter(t,e){const i={term:"",filter:{name:"LOAD_BY_PK_FILTER",expression:this.buildFilterExpressionByPkObject(t),params:this.getFilterParamsFromPkObject(t,e)}};e.loadData(i)}getFirstDataUnitFromDOM(){let t=this._element.querySelector("snk-data-unit[data-load-by-pk]");if(t||(t=this._element.querySelector("snk-data-unit")),t)return t}getFilterParamsFromPkObject(t,e){var i;const s=[];for(const n in t.pk)t.pk.hasOwnProperty(n)&&!Array.isArray(t.pk[n])&&s.push({name:n,dataType:(null===(i=e.getField(n))||void 0===i?void 0:i.dataType)||this.getDefaultDataTypeLoadByPK(t.pk[n]),value:t.pk[n]});return s}getDefaultDataTypeLoadByPK(t){return"number"==typeof t||t instanceof Number?f.NUMBER:"boolean"==typeof t||t instanceof Boolean?f.BOOLEAN:t instanceof Date?f.DATE:f.TEXT}buildFilterExpressionByPkObject(t){let e="";for(const i in t.pk)a.isEmpty(e)||(e+=" AND "),Array.isArray(t.pk[i])?e+=`${i} IN (${t.pk[i].toString()})`:e+=`${i} = :${i}`;return e}async showNewVersionPopup(){const t=document.createElement("ez-modal-container"),e=await this.getAppLabel();t.modalTitle=this.getMessage("snkApplication.newVersionPopup.title",{screenName:e}),t.okButtonLabel=this.getMessage("snkApplication.newVersionPopup.okButton"),t.cancelButtonLabel=this.getMessage("snkApplication.newVersionPopup.cancelButton");const i=document.createElement("p");i.innerText=this.getMessage("snkApplication.newVersionPopup.info"),i.className="ez-text",t.appendChild(i),t.addEventListener("ezModalAction",this.newVersionPopupEventListener.bind(this));const s=await A.showPopup({content:t});this._removeVersionLayoutPopup=async()=>{await s(),await this.processPendingActions(this.NEW_VERSION_POPUP_LOCKER)}}async newVersionPopupEventListener(t){"LOAD"!==t.detail&&("OK"===t.detail&&Y.setScreenToUseV3Layout(),"CANCEL"===t.detail&&Y.setScreenToUseOldLayout(),this._popUp.opened=!1,this._removeVersionLayoutPopup&&await this._removeVersionLayoutPopup())}async handleShowNewVersionPopup(){this.hasToShowNewVersionPopup()&&await this.showNewVersionPopup()}hasToShowNewVersionPopup(){const t=new URLSearchParams(window.location.search).get("firstLoadConv");return t&&"S"===t}registerPkChangeListener(){window.hasOwnProperty("onhashchange")?window.onhashchange=this.pkChangeListener.bind(this):setInterval(this.pkChangeListener.bind(this),100)}componentWillLoad(){v.setContextValue("__SNK__APPLICATION__LOADING__",!0),this._errorHandler=new Z(this),this.messagesBuilder=new T,v.setContextValue("__EZUI__UPLOAD__ADD__URL__",`${b.getUrlBase()}/mge/upload/file`),v.setContextValue("__EZUI__SEARCH__OPTION__LOADER__",((t,e,i,s)=>this.executeSearch(t,e,i,s))),v.setContextValue("__EZUI__SEARCH__PLUS__OPTION__LOADER__",((t,e,i,s)=>this.executeSearch(t,e,i,Object.assign(Object.assign({},s),{useSearchPlus:!0})))),v.setContextValue("__EZUI__GRID_LICENSE__",G),this.registerPkChangeListener(),P.init(),x.preload(this.applicationResourceID,this.configName,{gridLegacyConfig:this.gridLegacyConfigName,formLegacyConfig:this.formLegacyConfigName}),document.addEventListener("click",(()=>Y.applicationClick())),this._waitingAppReady.forEach((t=>t())),this.setLayoutFormConfig()}async setLayoutFormConfig(){const t=await this._formConfigFetcher.fetchLayoutFormConfig("formColCfg."+this.applicationResourceID),e=isNaN(Number(null==t?void 0:t.config))?null:Number(null==t?void 0:t.config);this._LayoutFormConfigSingleton.setConfig(e)}connectedCallback(){this._isBrowserTypeElectron=k.isElectron(),v.setContextValue("__SNK__APPLICATION__",this),S.addRequestListener(this._requestListener)}disconnectedCallback(){null==S||S.removeRequestListener(this._requestListener),this.removeShortcuts(),this._lockManagerTimer&&clearTimeout(this._lockManagerTimer),this._scrimWindowTimer&&clearTimeout(this._scrimWindowTimer)}async componentDidLoad(){this.applicationLoading.emit(!0),window.requestAnimationFrame((()=>{v.setContextValue("__SNK__APPLICATION__LOADING__",!1),this.applicationLoaded.emit(!0),this.pkChangeListener()})),u.addIDInfo(this._element,`resource_${this.applicationResourceID}`),await this.handleShowNewVersionPopup(),this.initKeyboardManager(),this.enableLockManagerLoadingApp?(_.addLockManagerCtxId(this._element),this.resolveApplicationReady()):this._applicationReady=!0}async showScrimApp(t){if(!this.enableLockManagerLoadingApp||!this._applicationReady||!t)return this._activeScrimWindow=!1,void(this._scrimWindowTimer&&clearTimeout(this._scrimWindowTimer));this._activeScrimWindow=!0,this._scrimWindowTimer=setTimeout((async()=>{this._activeScrimWindow&&(this._activeScrimWindow=!1,clearTimeout(this._scrimWindowTimer))}),this._maxTimerAppLoading)}async changeTemplateSkeleton(t){this._templateSkeleton=t||this._templateSkeleton}async markToReload(t){this.enableLockManagerLoadingApp&&(await this.changeTemplateSkeleton(t),this._applicationReady=!1,await _.resetLocks(this._element,z.APP_LOADING),this.resolveApplicationReady())}async addLoadingLock(t=!1,e){if(this.enableLockManagerLoadingApp)return await this.changeTemplateSkeleton(e),t&&(this._applicationReady=!1,this._activeScrimWindow=!!this._applicationReady,await _.resetLocks(this._element,z.APP_LOADING)),this.resolveApplicationReady(),await _.lock(this._element,z.APP_LOADING)}async resolveApplicationReady(){if(!this._applicationReady)try{await this.checkTimeoutLimitLockManager(),await _.whenHasLock(this._element,z.APP_LOADING),await _.whenResolve(this._element,z.APP_LOADING,200),await _.resetLocks(this._element,z.APP_LOADING),this._applicationReady=!0}catch(t){console.warn(t),this._applicationReady=!0}}stopTimeoutLockManager(){this._lockManagerTimer&&clearTimeout(this._lockManagerTimer)}async checkTimeoutLimitLockManager(){this.stopTimeoutLockManager(),this._applicationReady||(this._lockManagerTimer=setTimeout((async()=>{this._applicationReady||(await _.resetLocks(this._element,z.APP_LOADING),this.stopTimeoutLockManager(),this._applicationReady=!0)}),this._maxTimerAppLoading))}initKeyboardManager(){this._keyboardManager.bind("ctrl + g",Y.searchApp.bind(this),{description:this.getMessage("snkApplication.keyboard.shortcuts.searchApp")}).bind("ctrl + d",Y.showDesktop.bind(this),{description:this.getMessage("snkApplication.keyboard.shortcuts.showDesktop")}).bind("F1",Y.openHelp.bind(this),{description:this.getMessage("snkApplication.keyboard.shortcuts.openHelp")})}removeShortcuts(){this._keyboardManager.unbindAllShortcutKeys()}renderLoadingSkeleton(){if(this.enableLockManagerLoadingApp){if(this._isBrowserTypeElectron)return this.getSpinnerLoadingDefault();switch(this._templateSkeleton){case O.CUSTOM_TEMPLATE:case O.GRID:return this.getSkeletonTemplateGrid();case O.GRID_WITH_SIDEBAR:return this.getSkeletonTemplateGridWithSidebar();case O.GRID_WITH_PANEL:return this.getSkeletonTemplateGridWithPanel();case O.FORM_WITH_SIDEBAR:return this.getSkeletonTemplateFormWithSidebar();default:return this.getSkeletonTemplateGrid()}}}getLoadingVisibilityStyle(){return{visibility:this._applicationReady?"hidden":"initial",display:this._applicationReady?"none":"unset"}}getSkeletonTemplateGrid(){return i("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},i("div",{class:"ez-flex ez-flex--column ez-margin--large ez-margin-top--medium"},i("div",{class:"ez-margin-bottom--medium"},i("ez-skeleton",{count:1,variant:"text",width:"20%",height:"35px",animation:"progress"})),i("div",{class:""},i("ez-skeleton",{count:1,variant:"text",width:"70%",height:"25px",animation:"progress"}))),i("div",{class:"ez-flex ez-flex--justify-start skeleton-content-column ez-margin-horizontal--large",style:{height:"calc(-105px + 100vh)"}},[1,2,3,4].map(((t,e)=>i("div",{class:"ez-margin-right--large",key:e,style:{width:"25%"}},i("ez-skeleton",{count:this.getCountSkeleton(50,10),variant:"text",width:"100%",height:"50px",animation:"progress",marginBottom:"10px"}))))))}getSkeletonTemplateGridWithSidebar(){return i("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},i("div",{class:"ez-flex ez-flex--column ez-margin--large ez-margin-top--medium"},i("div",{class:"ez-margin-bottom--medium"},i("ez-skeleton",{count:1,variant:"text",width:"20%",height:"35px",animation:"progress"})),i("div",{class:""},i("ez-skeleton",{count:1,variant:"text",width:"70%",height:"25px",animation:"progress"}))),i("div",{class:"ez-flex ez-flex--justify-start skeleton-content-column ez-margin-horizontal--large",style:{height:"calc(100vh - 160px)"}},i("div",{class:"ez-flex ez-flex--column ez-margin-right--large",style:{width:"25%",overflow:"hidden"}},Array(this.getCountSkeleton(30,6)).fill(null).map(((t,e)=>i("ez-skeleton",{key:e,count:1,variant:"text",width:this.getSkeletonRandomWidth(),height:"30px",animation:"progress",marginBottom:"10px"})))),i("div",{class:"ez-margin-right--large",style:{width:"75%"}},i("ez-skeleton",{count:this.getCountSkeleton(50,10),variant:"text",width:"100%",height:"50px",animation:"progress",marginBottom:"10px"}))))}getSkeletonTemplateGridWithPanel(){return i("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},i("div",{class:"ez-margin--medium ez-margin-top--medium ez-padding--medium"},i("ez-skeleton",{count:1,variant:"text",width:"70%",height:"25px",animation:"progress"})),i("div",{class:"ez-flex ez-margin--medium ez-margin-top--medium",style:{maxHeight:"calc(-105px + 100vh)",overflow:"hidden"}},i("div",{class:"",style:{width:"70%",overflow:"hidden"}},i("div",{class:"ez-padding--medium",style:{height:"50%"}},i("ez-skeleton",{count:1,variant:"text",width:"100%",height:"100%",animation:"progress"})),i("div",{class:"ez-padding--medium",style:{}},i("ez-skeleton",{count:1,variant:"text",width:"250px",height:"25px",animation:"progress"})),i("div",{class:"ez-flex ez-padding--medium",style:{height:"45%"}},[1,2].map((()=>i("div",{style:{width:"50%"}},i("ez-skeleton",{count:1,variant:"text",width:"100%",height:"100%",animation:"progress"})))))),i("div",{class:"ez-flex ez-flex--column ez-padding--medium",style:{width:"30%",overflow:"hidden"}},Array(this.getCountSkeleton(30,10)).fill(null).map(((t,e)=>i("ez-skeleton",{key:e,count:1,variant:"text",width:"100%",height:"50px",animation:"progress",marginBottom:"10px"}))))))}getSkeletonTemplateFormWithSidebar(){return i("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},i("div",{class:"ez-margin--medium ez-margin-top--medium ez-padding--medium"},i("ez-skeleton",{count:1,variant:"text",width:"70%",height:"25px",animation:"progress"})),i("div",{class:"ez-flex ez-margin--medium ez-margin-top--medium",style:{maxHeight:"calc(-105px + 100vh)",overflow:"hidden"}},i("div",{class:"ez-flex ez-flex--column ez-margin-right--large",style:{width:"25%",overflow:"hidden"}},Array(this.getCountSkeleton(30,6)).fill(null).map(((t,e)=>i("ez-skeleton",{key:e,count:1,variant:"text",width:this.getSkeletonRandomWidth(),height:"30px",animation:"progress",marginBottom:"10px"})))),i("div",{class:"ez-flex ez-flex--column",style:{width:"75%"}},i("div",{class:"ez-padding--medium",style:{width:"100%"}},i("ez-skeleton",{count:1,variant:"text",width:"30%",height:"25px",animation:"progress"})),i("div",{class:"ez-padding--medium",style:{height:"45%"}},i("div",{class:"ez-flex",style:{width:"100%",height:"100%"}},[1,2,3,4].map(((t,e)=>i("div",{key:e,class:"ez-padding-right--large",style:{width:"25%",overflow:"hidden"}},Array(this.getCountSkeleton(50,20)).fill(null).map(((t,e)=>i("ez-skeleton",{key:e,count:1,variant:"text",width:"100%",height:"50px",animation:"progress",marginBottom:"10px"})))))))),i("div",{class:"ez-padding--medium",style:{width:"100%"}},i("ez-skeleton",{count:1,variant:"text",width:"30%",height:"25px",animation:"progress"})),i("div",{class:"ez-padding--medium",style:{height:"45%"}},i("div",{class:"ez-flex",style:{width:"100%",height:"100%"}},[1,2,3,4].map(((t,e)=>i("div",{key:e,class:"ez-padding-right--large",style:{width:"25%",overflow:"hidden"}},Array(this.getCountSkeleton(50,20)).fill(null).map(((t,e)=>i("ez-skeleton",{key:e,count:1,variant:"text",width:"100%",height:"50px",animation:"progress",marginBottom:"10px"})))))))))))}getSpinnerLoadingDefault(){return i("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},i("div",{class:"ez-flex ez-size-height--full ez-size-width--full ez-flex--justify-center ez-flex--align-items-center spinner"},i("ez-icon",{iconName:"sync",size:"x-large",class:"spin"}),i("span",{class:"ez-title ez-title--secondary ez-title--extra-large"},this.getMessage("snkApplication.loading.text"))))}render(){return i(s,{style:{visibility:!this.enableLockManagerLoadingApp||this._applicationReady?"unset":"hidden",overflow:!this.enableLockManagerLoadingApp||this._applicationReady?"unset":"hidden"}},i("div",null,i("ez-loading-bar",{ref:t=>this._requestListener.ezLoadingBar=t}),i("ez-popup",{opened:!1,ref:t=>this._popUp=t,onEzClosePopup:()=>this.closePopUp()}),i("ez-modal",{opened:!1,ref:t=>this._rightModal=t,"modal-size":"small",closeOutsideClick:!0,closeEsc:!0}),this.renderLoadingSkeleton(),this._activeScrimWindow&&i("div",{class:"ez-scrim ez-scrim--light",style:{cursor:"progress",zIndex:"var(--scrim-z-index)"}})))}get _element(){return n(this)}static get watchers(){return{loadByPK:["watchPropHandler"]}}};class nt{constructor(t,e){this.resolve=t,this.reject=e}}st.style=".sc-snk-application-h{--scrim-z-index:var(--elevation--100, 100);display:flex;flex-direction:column;height:100%}.sc-snk-application-h>.loading-hidden.sc-snk-application{display:none;pointer-events:none}.skeleton-content-left.sc-snk-application{width:300px;padding-right:5px}.skeleton-content.sc-snk-application{height:calc(100vh - 310px)}.spinner.sc-snk-application{height:100vh;gap:10px}.spinner.sc-snk-application>.spin.sc-snk-application{animation-name:spin;animation-duration:5000ms;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";export{st as snk_application}
@@ -0,0 +1 @@
1
+ export{S as snk_data_unit}from"./p-0e495575.js";import"./p-d8d8169b.js";import"@sankhyalabs/core";import"@sankhyalabs/ezui/dist/collection/utils";import"./p-0dac8fef.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-b35574b5.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";import"@sankhyalabs/core/dist/dataunit/metadata/DataType";import"./p-7dd49d15.js";
@@ -0,0 +1 @@
1
+ import{UserInterface as n,DataType as t}from"@sankhyalabs/core";import{a as o,G as e,D as r}from"./p-9019a32f.js";const u=new Map([[n.DATE,"calendar"],[n.DATETIME,"calendar-clock"],[n.ELAPSEDTIME,"timer-outline"],[n.TIME,"timer-outline"],[n.DECIMALNUMBER,"number"],[n.INTEGERNUMBER,"number"],[n.FILE,"zip"],[n.IMAGE,"pdf"],[n.HTML,"tag_code"],[n.SEARCH,"search"],[n.SEARCHPLUS,"search"],[n.OPTIONSELECTOR,"list"],[n.CHECKBOX,"list"],[n.SWITCH,"boolean"],[n.PASSWORD,"eye-off"]]),i="container-available-fields";var l;function c(n,t,o,e){var r;const u=null===(r=null==n?void 0:n[t])||void 0===r?void 0:r.children;return u?Array.from(u).map((({fieldConfig:n})=>Object.assign(Object.assign({},n),{group:o,tab:e}))):[]}function a(n,t){return n.map((n=>Object.assign(Object.assign({},n),{fields:n.fields.map((n=>Object.assign(Object.assign({},n),{tab:t})))})))}function f(n,o,e){var r;if(null==n||!o||!e)return;const u=null===(r=o.getField(e))||void 0===r?void 0:r.dataType;if(null==u)return;if(void 0!==(null==n?void 0:n.waitmessage))return;const i=u!==t.OBJECT&&u!==t.DATE&&"object"==typeof n?n.value:n;return u===t.OBJECT?JSON.stringify(i):i}function s(n,t,o){if(!o)return!0;const e=o.properties||{},r=!0!==o[n];return e.hasOwnProperty(t)?"S"!==e[t]:r}function d(n,t,o){return!(!t||!0!==t[n])||o}function v(n){return u.get(n)||"text"}function b(n,t){var o,e;const r=t("snkFormConfig.form.newGuide"),u=null!==(e=null===(o=n.filter((n=>n.name.includes(r))))||void 0===o?void 0:o.length)&&void 0!==e?e:0;return 0===u?r:`${r} (${u})`}function m(n){const t=[];return n.forEach((n=>{n.forEach((({fields:n})=>{null==n||n.forEach((n=>{t.push(function(n){const t={cleanOnCopy:n.cleanOnCopy||!1,group:n.group===e.noGroup?void 0:n.group,label:n.label,name:n.name,required:n.required,readOnly:n.readOnly,tab:n.tab};return null!=n.defaultValue&&(t.defaultValue=null==n.defaultValue.type?{type:r.fixed,value:n.defaultValue}:n.defaultValue),t}(n))}))}))})),t}function p(n,t,e,r){const u=n.map((n=>{const t=n.tab;return Object.assign(Object.assign({},n),{tab:t&&t!==o.general?n.tab:o.main})})),i=function(n){const t=new Map;return j(n).forEach((n=>{t.set(n.name,[])})),t}(t);if(null==u?void 0:u.length){for(let n of i.keys()){const t=M(k(C(u,n,r),e,r));i.set(n,t)}return i}}function O(n,t){let e=n.tabs?[...n.tabs]:function(n){const t=[];let o=1;return null==n||n.forEach((n=>{const e=n.tab;(function(n,t){return n&&!t.map((n=>n.name)).includes(n)})(e,t)&&(t.push({name:e,label:e,visible:!0,order:o}),o+=1)})),t}(null==n?void 0:n.fields);return e=j(e),e=function(n){return n.map((n=>Object.assign(Object.assign({},n),{name:n.name?n.name:n.label})))}(e),function(n,t){const e={name:o.main,label:t,visible:!0};return n.some((n=>n.name===o.main))?n=n.map((n=>n.name===o.main?e:n)):n.unshift(e),n}(e,t)}function j(n){return[...n.filter((n=>n.label!==o.general))]}function y(n,t){n.label||(n.label=t.label)}function g(n,t){n.tab||(n.tab=t)}function h(n){n.group||(n.group=e.noGroup)}function w(n){var t;return!0===(null===(t=null==n?void 0:n.properties)||void 0===t?void 0:t.visibleOnConfig)&&!1===(null==n?void 0:n.visible)}function k(n,t,o){const r=new Map;r.set(e.noGroup,[]);for(let e of n){const n=t.getField(e.name);((null==n?void 0:n.visible)||w(n))&&(y(e,n),g(e,o),h(e),r.has(e.group)?r.get(e.group).push(e):r.set(e.group,[e]))}return r}function C(n,t,o){return n.filter((n=>{const e=function(n,t){var o;return"string"==typeof n?n:null!==(o=null==n?void 0:n.label)&&void 0!==o?o:t}(n.tab,o);return e===t}))}function M(n){const t=[];for(let o of n.keys())t.push({name:o,fields:n.get(o)});return t}!function(n){n.FROM="from",n.TO="to"}(l||(l={}));export{i as I,l as S,p as a,O as b,b as c,c as d,f as e,s as f,m as g,d as h,v as i,a as u}
@@ -0,0 +1 @@
1
+ import{r as i,c as e,h as t,g as s}from"./p-d8d8169b.js";import{S as o}from"./p-51833248.js";import{ObjectUtils as n,ArrayUtils as a}from"@sankhyalabs/core";import{ApplicationUtils as r}from"@sankhyalabs/ezui/dist/collection/utils";import{a as d}from"./p-9019a32f.js";const l=class{constructor(t){i(this,t),this.guideSelected=e(this,"guideSelected",7),this.guideListChanged=e(this,"guideListChanged",7),this.guideDeleted=e(this,"guideDeleted",7),this.createNewGuide=e(this,"createNewGuide",7),this.ID_VISIBLE_GUIDES="container-visible-guides",this.ID_HIDDEN_GUIDES="container-hidden-guides",this.sortLogic=(i,e)=>{var t,s;return(null!==(t=i.order)&&void 0!==t?t:Number.MAX_VALUE)-(null!==(s=e.order)&&void 0!==s?s:Number.MAX_VALUE)},this.mainGuide=void 0,this.filterTerm="",this.visibleGuides=[],this.hiddenGuides=[],this.guidesList=[],this.selectedGuide=void 0,this.messagesBuilder=void 0}onMessagesBuilderChange(){this.setCustomCSSProperties()}observeVisibleGuides(i){this.initGuidesConfig(i)}observeSelectedGuide(i){this.guideSelected.emit(i)}getMessage(i,e){return this.messagesBuilder.getMessage(i,e)}initGuidesConfig(i){const e=[...i.filter((i=>i.visible&&i.name!==d.main))],t=[...i.filter((i=>!i.visible&&i.name!==d.main))];this.visibleGuides=[...e.sort(this.sortLogic)],this.hiddenGuides=[...t.sort(this.sortLogic)],this.mainGuide=i.find((i=>i.name===d.main))}handleAddGuide(){this.createNewGuide.emit()}handleSelectGuide(i,e){e.stopPropagation(),this.selectedGuide=i}toggleGuideVisibility(i,e){e.stopPropagation();const t=Object.assign(Object.assign({},i),{visible:!i.visible});let s,o;i.visible?(s=[...this.visibleGuides.filter((e=>e.name!==i.name))],o=[...this.hiddenGuides,t]):(s=[...this.visibleGuides,t],o=[...this.hiddenGuides.filter((e=>e.name!==i.name))]);const n=[...s,...o];this.applyGuidesUpdate(n)}adjustListOrder(i){return i.map(((i,e)=>Object.assign(Object.assign({},i),{order:e})))}applyGuidesUpdate(i){let e=this.adjustListOrder(i);e=[this.mainGuide,...e],n.equals(e,this.guidesList)||this.guideListChanged.emit(e)}async handleDeleteGuide(i,e){e.stopPropagation();const t=this.getMessage("snkFormConfig.confirm.title"),s=this.getMessage("snkFormConfig.confirm.deleteGuide").replace("{0}",i.label);if(!await r.confirm(t,s))return;this.guideDeleted.emit(i);const o=this.getMessage("snkFormConfig.info.successfullyGuideDeleted").replace("{0}",i.label);r.info(o)}renderItems(i){return a.applyStringFilter(this.filterTerm,i).map((i=>{var e;return t("div",{key:i.name,"data-guide-name":i.name,title:i.label,class:`guide-item ${(null===(e=this.selectedGuide)||void 0===e?void 0:e.label)===i.label?"selected":""} ${this.filterTerm.length?"disable-sort":""}`,onClick:e=>this.handleSelectGuide(i,e)},t("span",null,t("ez-icon",{iconName:"drag-indicator",class:"ez-margin-right--small"})),t("span",{class:"item-label"},i.label),t("div",{class:"actions"},t("ez-button",{mode:"icon",class:"ez-button--tertiary",onClick:e=>this.toggleGuideVisibility(i,e),size:"medium",iconName:i.visible?"eye-off":"eye",title:this.getMessage(i.visible?"snkFormConfig.guidesConfigurator.actions.hide":"snkFormConfig.guidesConfigurator.actions.show")}),t("ez-button",{mode:"icon",class:"ez-button--tertiary",onClick:e=>this.handleDeleteGuide(i,e),size:"medium",iconName:"delete",title:this.getMessage("snkFormConfig.guidesConfigurator.actions.delete")})))}))}getContainerElement(i){return this.el.querySelector(`[id="${i}"]`)}handleSortGuide(){const i=[...this.getGuidesFromStatus(!0),...this.getGuidesFromStatus(!1)];this.applyGuidesUpdate(i)}getGuidesFromStatus(i){let e=[];return this.getOrderedGuideNames(i?this.ID_VISIBLE_GUIDES:this.ID_HIDDEN_GUIDES).forEach((t=>{const s=this.guidesList.find((i=>i.name===t));s&&e.push(Object.assign(Object.assign({},s),{visible:i}))})),e}getOrderedGuideNames(i){var e;const t=null===(e=this.getContainerElement(i))||void 0===e?void 0:e.children;return Array.from(t).map((i=>i.getAttribute("data-guide-name")))}initializeDraggableContainers(){this._sortableVisibleGuides=new o(this.getContainerElement(this.ID_VISIBLE_GUIDES),{group:"guides",ghostClass:"ghost",direction:"vertical",filter:".disable-sort",animation:15,onSort:()=>this.handleSortGuide()}),this._sortableInvisibleGuides=new o(this.getContainerElement(this.ID_HIDDEN_GUIDES),{group:"guides",ghostClass:"ghost",animation:15,filter:".disable-sort",onSort:()=>this.handleSortGuide()})}handleSelectMainGuide(){this.guideSelected.emit(this.mainGuide)}setCustomCSSProperties(){document.documentElement.style.setProperty("--no-hidden-guides-message",`"${this.getMessage("snkFormConfig.guidesConfigurator.noHiddenGuides")}"`),document.documentElement.style.setProperty("--no-visible-guides-message",`"${this.getMessage("snkFormConfig.guidesConfigurator.noVisibleGuides")}"`)}componentDidLoad(){this.initializeDraggableContainers(),this.initGuidesConfig(this.guidesList),this.setCustomCSSProperties()}render(){var i,e,s;return t("ez-sidebar-navigator",{class:"ezSidebarNavigator",type:"fixed",size:"md",titleMenu:this.getMessage("snkFormConfig.guidesConfigurator.title")},t("div",{class:"navigator-container"},t("ez-filter-input",{slot:"content",mode:"slim",label:this.getMessage("snkFormConfig.guidesConfigurator.searchGuide"),onEzChange:i=>this.filterTerm=i.detail}),t("div",{onClick:this.handleSelectMainGuide.bind(this),class:"main-guide "+((null===(i=this.selectedGuide)||void 0===i?void 0:i.name)===(null===(e=this.mainGuide)||void 0===e?void 0:e.name)?"selected":"")},t("span",null,null===(s=this.mainGuide)||void 0===s?void 0:s.label)),t("div",{class:"collapsible-container"},t("div",{class:"collapsible-item"},t("ez-collapsible-box",{label:this.getMessage("snkFormConfig.guidesConfigurator.visibleGuides"),headerSize:"large"},t("div",{id:this.ID_VISIBLE_GUIDES,class:"guide-list "+(this.visibleGuides.length?"":"visible-empty-content")},this.renderItems(this.visibleGuides)))),t("div",{class:"collapsible-item"},t("ez-collapsible-box",{label:this.getMessage("snkFormConfig.guidesConfigurator.hiddenGuides"),headerSize:"large"},t("div",{id:this.ID_HIDDEN_GUIDES,class:"guide-list "+(this.hiddenGuides.length?"":"hidden-empty-content")},this.renderItems(this.hiddenGuides))))),t("div",{class:"add-button-container",onClick:this.handleAddGuide.bind(this)},t("ez-icon",{slot:"leftIcon",iconName:"plus"}),t("span",null,this.getMessage("snkFormConfig.guidesConfigurator.createNewGuide")))))}get el(){return s(this)}static get watchers(){return{messagesBuilder:["onMessagesBuilderChange"],guidesList:["observeVisibleGuides"],selectedGuide:["observeSelectedGuide"]}}};l.style='.ezSidebarNavigator.sc-guides-configurator{--ez-sidebar-navigator--height:calc(100vh - 118px)}.navigator-container.sc-guides-configurator{height:calc(100vh - 175px);display:flex;flex-direction:column;justify-content:space-between}.collapsible-container.sc-guides-configurator{display:flex;flex-direction:column;gap:12px;flex-grow:1;max-height:calc(100vh - 240px);overflow:auto}.collapsible-item.sc-guides-configurator{padding:6px;border-radius:6px;border:1px solid #dce0e8}.add-button-container.sc-guides-configurator{display:flex;align-items:center;border-top:1px solid #dce0e8;padding-top:22px;gap:6px;cursor:pointer;justify-content:center}.add-button-container.sc-guides-configurator span.sc-guides-configurator{display:block}.guide-list.sc-guides-configurator{display:flex;flex-direction:column;width:100%;min-height:10px}.guide-list.hidden-empty-content.sc-guides-configurator::before{content:var(--no-hidden-guides-message, "Nenhuma guia oculta");display:block;font-size:16px;font-weight:400;color:#AFB6C0;margin:auto;padding:8px}.guide-list.visible-empty-content.sc-guides-configurator::before{content:var(--no-visible-guides-message, "Nenhuma guia visível");display:block;font-size:16px;font-weight:400;color:#AFB6C0;margin:auto;padding:8px}.item-label.sc-guides-configurator{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-grow:1}.guide-item.sc-guides-configurator{margin:0 3px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:5px 10px;border-radius:6px;transition:all 0.2s ease-in-out;height:32px}.guide-item.sc-guides-configurator .actions.sc-guides-configurator{display:flex;gap:8px;transition:0.2s ease-in-out;visibility:hidden;opacity:0}.guide-item.sc-guides-configurator:hover .actions.sc-guides-configurator{visibility:visible;opacity:1}ez-button.sc-guides-configurator{width:24px;align-items:center;justify-content:center;display:flex}.ghost.sc-guides-configurator{opacity:.5;background:#e2eaf4}.main-guide.sc-guides-configurator{padding:12px;margin:12px 0;border:1px solid #dce0e8;border-radius:6px;transition:all 0.2s ease-in-out}.guide-item.selected.sc-guides-configurator,.main-guide.selected.sc-guides-configurator{background:#E2F4EF}.guide-item.sc-guides-configurator:hover,.main-guide.sc-guides-configurator:hover{background:#f5fcfa}';export{l as guides_configurator}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as s,F as e,g as a}from"./p-d8d8169b.js";import{KeyboardManager as r,Action as n,ElementIDUtils as o,ApplicationContext as d,StringUtils as h}from"@sankhyalabs/core";import{T as l}from"./p-7de79adf.js";import{C as c}from"./p-3dba3468.js";import{P as u,E as g}from"./p-0f3698af.js";import{T as m}from"./p-1a0caadb.js";import{s as k}from"./p-a349689a.js";import{C as v,S as p,a as T,R as f,b,c as C}from"./p-16fc4acd.js";import{SelectionMode as E}from"@sankhyalabs/core/dist/dataunit/DataUnit";import"./p-0dac8fef.js";import"./p-ba4979b4.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-b35574b5.js";import"./p-ff1990ad.js";import"./p-c6331595.js";import"./p-9019a32f.js";import{g as R}from"./p-7dd49d15.js";import{buildFieldSearch as O}from"@sankhyalabs/ezui/dist/collection/utils";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource";import"./p-8f3f2306.js";import"./p-8d884fab.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";class _ extends v{getFilters(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getAppliedFilters()}getOrders(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getSort()}getResourceURI(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.name}getSelectedNumber(){return this.dataUnit.getSelectionInfo().length}getTotalRecords(){var i,t,s;const{total:e}=(null===(i=this.dataUnit)||void 0===i?void 0:i.getPaginationInfo())||{};return null!=e?e:null===(s=null===(t=this.dataUnit)||void 0===t?void 0:t.records)||void 0===s?void 0:s.length}getSelectedIDs(){return R(this.dataUnit)}getOffset(){return this.getExporterOffset(this.getPaginationInfo())}getPageSize(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.pageSize}getExportLimit(){return 5e3}getRecordID(){var i,t,s;return null===(s=null===(t=null===(i=this.dataUnit)||void 0===i?void 0:i.records)||void 0===t?void 0:t[0])||void 0===s?void 0:s.__record__id__}getPaginationInfo(){var i;return null===(i=this.dataUnit)||void 0===i?void 0:i.getPaginationInfo()}getExporterOffset(i){if(null==i)return;const t=i.firstRecord;return t>0?t-1:t}}const I=class{constructor(s){i(this,s),this.actionClick=t(this,"actionClick",7),this.gridDoubleClick=t(this,"gridDoubleClick",7),this.componentReady=t(this,"componentReady",7),this._customEditors=new Map,this._customRenders=new Map,this._keyboardManager=new r,this._topTaskbarProcessor=new m({"snkGridTopTaskbar.regular":["FORM_MODE","CONFIGURATOR","INSERT"],"snkGridTopTaskbar.regular.secondary":["FORM_MODE","CONFIGURATOR","INSERT"],"snkGridTopTaskbar.regular.singleTaskbar":[],"snkGridTopTaskbar.finish_edition":["CANCEL","SAVE",this.handleAddFormMode()],"snkGridTopTaskbar.finish_edition.secondary":[],"snkGridTopTaskbar.finish_edition.singleTaskbar":[]}),this._headerTaskbarProcessor=new m({"snkGridHeaderTaskbar.unselected":["REFRESH","DATA_EXPORTER","ACTIONS_BUTTON","MORE_OPTIONS"],"snkGridHeaderTaskbar.selected":this.getGridHeaderSelectedBtns(),"snkGridHeaderTaskbar.detail.unselected":["REFRESH","MORE_OPTIONS"],"snkGridHeaderTaskbar.detail.selected":["UPDATE","ATTACH","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","REFRESH"],"snkGridHeaderTaskbar.singleTaskbar.unselected":["INSERT","FORM_MODE","CONFIGURATOR","REFRESH","DATA_EXPORTER","ACTIONS_BUTTON","MORE_OPTIONS"],"snkGridHeaderTaskbar.singleTaskbar.selected":["UPDATE","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","ATTACH","FORM_MODE","CONFIGURATOR","REFRESH","DATA_EXPORTER","ACTIONS_BUTTON"],"snkGridHeaderTaskbar.singleTaskbar.detail.unselected":["INSERT","FORM_MODE","CONFIGURATOR","REFRESH","MORE_OPTIONS"],"snkGridHeaderTaskbar.singleTaskbar.detail.selected":["UPDATE","ATTACH","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","FORM_MODE","CONFIGURATOR","REFRESH"],"snkGridHeaderTaskbar.singleTaskbar.finish_edition":["CANCEL","SAVE",this.handleAddFormMode()]}),this.dataUnitInterceptor={interceptAction:async i=>i.type===n.METADATA_LOADED?await this.interceptMetadataLoaded(i):i},this._dataUnit=void 0,this._dataState=void 0,this._gridConfig=void 0,this._popUpGridConfig=!1,this._showSnkFilterBar=!0,this._enableContinuousInsert=!1,this.columnFilterDataSource=new p,this.enableLockManagerLoadingComp=!1,this.enableLockManagerTaskbarClick=!1,this.configName=void 0,this.filterBarTitle=void 0,this.resourceID=void 0,this.selectionToastConfig=void 0,this.actionsList=void 0,this.isDetail=void 0,this.taskbarManager=void 0,this.statusResolver=void 0,this.multipleSelection=void 0,this.presentationMode=u.PRIMARY,this.messagesBuilder=void 0,this.useEnterLikeTab=!1,this.recordsValidator=void 0,this.canEdit=!0,this.taskbarCustomContainerId=void 0,this.gridHeaderCustomSlotId="GRID_HEADER_CUSTOM_ELEMENTS",this.topTaskbarCustomSlotId="GRID_TASKBAR_CUSTOM_ELEMENTS",this.disablePersonalizedFilter=void 0,this.gridLegacyConfigName=void 0,this.filterBarLegacyConfigName=void 0,this.autoLoad=void 0,this.autoFocus=!0,this.enableGridInsert=!1,this.outlineMode=!1,this.suppressHorizontalScroll=!1,this.strategyExporter=g.SERVER_SIDE,this.useSearchColumn=!0,this.multipleEditionEnabled=!0,this.paginationCounterMode="auto",this.suppressCheckboxColumn=void 0,this.compact=void 0}getGridHeaderSelectedBtns(){const i=[l.UPDATE,l.CLONE,l.REMOVE,l.MORE_OPTIONS,l.DIVIDER,l.ATTACH,l.FORM_MODE,l.CONFIGURATOR,l.REFRESH,l.DATA_EXPORTER,l.ACTIONS_BUTTON];return this.multipleEditionEnabled&&i.unshift(l.UPDATE_MULTIPLE),i}reloadConfig(){this.loadConfig()}async showConfig(){null!=this._grid&&this.openGridConfig()}async hideConfig(){null!=this._grid&&this.closeGridConfig()}async setConfig(i){this.setGridConfig(i)}async reloadFilterBar(){var i;null===(i=this._snkFilterBar)||void 0===i||i.reload()}async getFilterBar(){return this._snkFilterBar}async addCustomEditor(i,t,s){if(this._grid)return void this._grid.addCustomEditor(i,t,s);const e=new Map(this._customEditors);e.set(i,{customEditor:t,detailContext:s}),this._customEditors=e}async addGridCustomRender(i,t,s){if(this._grid)return void this._grid.addGridCustomRender(i,t,s);const e=new Map(this._customRenders);e.set(i,{customRender:t,detailContext:s}),this._customRenders=e}async addCustomValueFormatter(i,t){this._grid.addCustomValueFormatter(i,t)}async removeCustomValueFormatter(i){this._grid.removeCustomValueFormatter(i)}async setFocus(){this._grid.setFocus()}async handleClick(i){var t;if(this.hasToBlockEvent(i)){if(i.preventDefault(),i.stopPropagation(),!await this._dataUnit.cancelEdition())return;const s=new i.constructor(i.type,i);null===(t=i.target)||void 0===t||t.dispatchEvent(s)}this._grid&&!this._grid.contains(i.target)&&this._grid.stopEdit()}hasToBlockEvent(i){var t;return(null===(t=this._snkFilterBar)||void 0===t?void 0:t.contains(i.target))&&this.enableGridInsert&&this._dataUnit.hasNewRecord()}async handleGridLegacyConfigName(i,t){i&&i!==t&&(this.addGridLegacyConfigName(),this.loadConfig())}handleAddFormMode(){return this.enableGridInsert?l.FORM_MODE:""}openGridConfig(){this._grid.getColumnsState().then((i=>{this._snkGridConfig.columns=i.filter((i=>i.name)),this._popUpGridConfig=!0}))}closeGridConfig(){this._popUpGridConfig=!1}setGridConfig(i){this._gridConfig=i,T.assertDefaultSorting(this._gridConfig,this._dataUnit)}fixColumNameCharset(i){try{return decodeURIComponent(escape(i))}catch(t){return i}}normalizeGridConfig(i){if(!i)return i;const t=i.columns.map((i=>Object.assign(Object.assign({},i),{name:this.fixColumNameCharset(i.name)})));return Object.assign(Object.assign({},i),{columns:t})}loadConfig(){c.loadGridConfig(this.configName,this.resourceID).then((i=>{this.setGridConfig(this.normalizeGridConfig(i))})).catch((i=>{console.warn(i)}))}addGridLegacyConfigName(){this.gridLegacyConfigName&&this.configName&&c.addGridLegacyConfig(this.configName,this.gridLegacyConfigName)}gridConfigChangeHandler(i){const t=this.normalizeGridConfig(i.detail);c.saveGridConfig(t,this.configName,this.resourceID),i.stopPropagation()}modalConfigChangeHandler(i){const t=this.normalizeGridConfig(i.detail);this._grid.setColumnsState(t.columns).then((()=>{this.setGridConfig(t),this.closeGridConfig(),this.dataExporterProviderStore()})),i.stopPropagation()}async dataExporterProviderStore(){const i=this.strategyExporter===g.SERVER_SIDE?new _(this._dataUnit,this._grid):new C(this._dataUnit,this._grid);k.set("exporterProviders",Object.assign(Object.assign({},k.get("exporterProviders")),{[this.configName]:i}))}addElementID(){o.addIDInfo(this._element,null,{dataUnit:this._dataUnit})}loadGridCustomFormatters(i){i&&this._grid&&i.forEach((i=>{var t;(null===(t=i.properties)||void 0===t?void 0:t.rm_precision)&&this.addCustomValueFormatter(i.name,this._rmPrecisionCustomValueFormatter)}))}async interceptMetadataLoaded(i){return this.loadGridCustomFormatters(i.payload.fields),i}finishLoading(){this._dataUnit.addInterceptor(this.dataUnitInterceptor),T.assertDefaultSorting(this._gridConfig,this._dataUnit),this.addElementID(),null!=this.columnFilterDataSource&&(this.columnFilterDataSource.setApplication(this._application),this.columnFilterDataSource.setDataUnit(this._dataUnit))}setCustomRenders(){if(this._grid)for(const[i,t]of this._customRenders)this._grid.addGridCustomRender(i,t.customRender,t.detailContext),this._customRenders.delete(i)}setCustomEditors(){if(this._grid)for(const[i,t]of this._customEditors)this._grid.addCustomEditor(i,t.customEditor,t.detailContext),this._customEditors.delete(i)}componentWillLoad(){this._application=d.getContextValue("__SNK__APPLICATION__");let i=this._element.parentElement;for(;i;){if("SNK-DATA-UNIT"===i.tagName.toUpperCase()){this._snkDataUnit=i,this._dataUnit=this._snkDataUnit.dataUnit,this._dataUnit?this.finishLoading():this._snkDataUnit.addEventListener("dataUnitReady",(i=>{this._dataUnit=i.detail,this.finishLoading()})),this.messagesBuilder||(this.messagesBuilder=this._snkDataUnit.messagesBuilder),this._snkDataUnit.addEventListener("dataStateChange",this.handleDataStateChange.bind(this)),this._snkDataUnit.addEventListener("cancelEdition",(()=>{var i;(null===(i=this._dataState)||void 0===i?void 0:i.recordsIsEmpty)&&this._dataUnit.clearSelection()}));break}i=i.parentElement}this._rmPrecisionCustomValueFormatter=new f,this.addGridLegacyConfigName(),this.loadConfig(),this._continuousInsertUtils=new b(this._application,this.resourceID,this.configName),this.enableGridInsert&&this._continuousInsertUtils.getConfig().then((i=>this._enableContinuousInsert=i))}componentDidRender(){var i,t;this._rmPrecisionCustomValueFormatter.setGrid(this._grid),this.loadGridCustomFormatters(null===(t=null===(i=this._dataUnit)||void 0===i?void 0:i.metadata)||void 0===t?void 0:t.fields),this.setCustomRenders(),this.setCustomEditors()}async handleDataStateChange(i){this._dataState=i.detail,this._rmPrecisionCustomValueFormatter.setDataState(this._dataState)}getHeaderDisabledButtons(){var i;const t=[];return(null===(i=this._dataState)||void 0===i?void 0:i.selectionInfo)&&(this._dataState.selectionInfo.length>1&&t.push(l.CLONE,l.ATTACH,l.UPDATE),this._dataState.selectionInfo.isAllRecords()&&t.push(l.REMOVE)),t}getInvisibleButtons(){var i,t;let s=[];return this._dataUnit&&0!==this._dataUnit.records.length||s.push(l.DATA_EXPORTER),(null===(i=this._dataState)||void 0===i?void 0:i.selectionInfo.mode)===E.ALL_RECORDS&&s.push(l.ACTIONS_BUTTON),1===(null===(t=this._dataState)||void 0===t?void 0:t.selectionInfo.length)&&s.push(l.UPDATE_MULTIPLE),s}componentWillRender(){const i=this.getInvisibleButtons();this._headerTaskbarProcessor.process(this.getHeaderTaskbarId(),this.taskbarManager,this._dataState,this.getHeaderDisabledButtons(),i),this._topTaskbarProcessor.process(this.getTopTaskBarId(),this.taskbarManager,this._dataState,void 0,i),this.dataExporterProviderStore()}getHeaderTaskbarId(){var i,t;const s=this._dataState&&!!(null===(i=this._dataState.selectionInfo)||void 0===i?void 0:i.length),e={primary:this.isDetail?"snkGridHeaderTaskbar.detail":"snkGridHeaderTaskbar",secondary:this.isDetail?"snkGridHeaderTaskbar.detail":"snkGridHeaderTaskbar",singleTaskbar:this.isDetail?"snkGridHeaderTaskbar.singleTaskbar.detail":"snkGridHeaderTaskbar.singleTaskbar"}[this.presentationMode];let a=s?`${e}.selected`:`${e}.unselected`;return(null===(t=this._dataState)||void 0===t?void 0:t.isDirty)&&this.presentationMode===u.SINGLE_TASKBAR&&(a="snkGridHeaderTaskbar.singleTaskbar.finish_edition"),a}getTopTaskBarId(){var i;const t={primary:"",secondary:".secondary",singleTaskbar:".singleTaskbar"}[this.presentationMode];return(null===(i=this._dataState)||void 0===i?void 0:i.isDirty)?`snkGridTopTaskbar.finish_edition${t}`:`snkGridTopTaskbar.regular${t}`}getPrimaryButton(){return{primary:"INSERT",secondary:"",singleTaskbar:"INSERT"}[this.presentationMode]}getColumnSearch(i){return null!=this._columnSearch||(this._columnSearch=O(i,(({argument:i})=>new Promise((t=>{this._grid.filterColumns(i).then((i=>{t(i.filter((i=>!i.hidden)).map((i=>({label:i.label,value:i.name}))))}))}))),(i=>{null!=i&&this._grid.locateColumn(i.value)}))),this._columnSearch}getActionsList(){const i=[];if(this.enableGridInsert&&i.push(this._continuousInsertUtils.actionContinuousInsert(this._enableContinuousInsert,(()=>{this._enableContinuousInsert=!this._enableContinuousInsert,this._continuousInsertUtils.handleSaveConfig(this._enableContinuousInsert)}))),this.isGridInsertActive())return i;if(null!=this.taskbarManager&&null!=this.taskbarManager.getMoreOptions){const t=this.getTopTaskBarId();return i.concat(this.taskbarManager.getMoreOptions(t,this.configName,this._dataState,this.actionsList))}return i.concat(this.actionsList)}getActionsSettingsList(){return[{value:h.generateUUID(),label:this.messagesBuilder.getMessage("snkGrid.findColumn",{}),disableCloseOnSelect:!0,eagerInitialize:!0,itemBuilder:(i,t)=>this.getColumnSearch(t)}]}handleFilterConfigUpdated(i){this._showSnkFilterBar=!!i.length&&(1!==i.length||"PERSONALIZED_FILTER_GROUP"!==i[0].id||i[0].groupedItems.length>0)}getGridHeaderButtons(){return this.isGridInsertActive()?l.MORE_OPTIONS:this._headerTaskbarProcessor.buttons}isGridInsertActive(){return this.enableGridInsert&&this._dataUnit.hasNewRecord()}render(){if(this._dataUnit)return s("div",{class:"snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline",tabindex:"0"},s("div",{class:"snk-grid__header ez-margin-bottom--extra-small"},this._showSnkFilterBar&&s(e,null,s("snk-filter-bar",{ref:i=>this._snkFilterBar=i,title:this.filterBarTitle,dataUnit:this._dataUnit,"data-element-id":"gridFilter",class:"snk-grid__filter-bar ez-align--top",configName:this.configName,messagesBuilder:this.messagesBuilder,resourceID:this.resourceID,onConfigUpdated:i=>this.handleFilterConfigUpdated(i.detail),disablePersonalizedFilter:this.disablePersonalizedFilter,filterBarLegacyConfigName:this.filterBarLegacyConfigName,autoLoad:this.autoLoad,enableLockManagerLoadingComp:this.enableLockManagerLoadingComp}),s("hr",{class:"ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider"})),s("snk-taskbar",{class:"ez-padding-left--medium ez-padding-top--extra-small","data-element-id":"grid_top",key:"topTaskbar",configName:this.configName,dataUnit:this._dataUnit,messagesBuilder:this.messagesBuilder,buttons:this._topTaskbarProcessor.buttons,disabledButtons:this._topTaskbarProcessor.disabledButtons,customButtons:this._topTaskbarProcessor.customButtons,primaryButton:this.getPrimaryButton(),resourceID:this.resourceID,customContainerId:this.taskbarCustomContainerId,customSlotId:this.topTaskbarCustomSlotId,overflowStrategy:"none",actionsSettingsList:this.getActionsSettingsList()},s("slot",{name:this.topTaskbarCustomSlotId}))),s("ez-grid",{ref:i=>this._grid=i,class:(this.presentationMode===u.SECONDARY?"snk-grid-container__without-shadow ":"")+"snk-grid__table","data-element-id":"embedded",dataUnit:this._dataUnit,key:"grid-"+this._snkDataUnit.entityName,config:this._gridConfig,onConfigChange:i=>{this.gridConfigChangeHandler(i)},onEzDoubleClick:i=>this.gridDoubleClick.emit(i.detail),statusResolver:this.statusResolver,multipleSelection:this.multipleSelection,columnfilterDataSource:this.columnFilterDataSource,selectionToastConfig:this.selectionToastConfig,useEnterLikeTab:this.useEnterLikeTab,recordsValidator:this.recordsValidator,canEdit:this.canEdit,autoFocus:this.autoFocus,enableGridInsert:this.enableGridInsert,enableContinuousInsert:this._enableContinuousInsert,enableLockManagerTaskbarClick:this.enableLockManagerTaskbarClick,enableLockManagerLoadingComp:this.enableLockManagerLoadingComp,outlineMode:this.outlineMode,useSearchColumn:this.useSearchColumn,suppressHorizontalScroll:this.suppressHorizontalScroll,paginationCounterMode:this.paginationCounterMode,suppressCheckboxColumn:this.suppressCheckboxColumn,compact:this.compact},s("snk-taskbar",{id:"teste",dataUnit:this._dataUnit,configName:this.configName,messagesBuilder:this.messagesBuilder,"data-element-id":"grid_left",buttons:this.getGridHeaderButtons(),presentationMode:this.presentationMode,disabledButtons:this._headerTaskbarProcessor.disabledButtons,customButtons:this._headerTaskbarProcessor.customButtons,slot:"leftButtons",actionsList:this.getActionsList(),primaryButton:this.getPrimaryButton(),resourceID:this.resourceID,customContainerId:this.taskbarCustomContainerId,customSlotId:this.gridHeaderCustomSlotId,actionsSettingsList:this.getActionsSettingsList()},s("slot",{name:this.gridHeaderCustomSlotId}))),s("div",{class:"ez-col ez-col--sd-12 snk-grid-container__footer"},s("slot",{name:"SnkGridFooter"})),s("ez-popup",{size:"medium",heightMode:"auto",useHeader:!1,opened:this._popUpGridConfig,onEzClosePopup:()=>this.closeGridConfig()},s("snk-grid-config",{ref:i=>this._snkGridConfig=i,config:this._gridConfig,"data-element-id":this._element.getAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME),selectedIndex:0,configName:this.configName,onConfigChange:i=>this.modalConfigChangeHandler(i),onConfigCancel:()=>this.closeGridConfig(),resourceID:this.resourceID})))}get _element(){return a(this)}static get watchers(){return{gridLegacyConfigName:["handleGridLegacyConfigName"]}}};I.style=".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--small)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding);outline:none}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}.snk-grid-container__footer.sc-snk-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}";export{I as snk_grid}