@sankhyalabs/sankhyablocks 10.1.0-dev.8 → 10.1.0-rc.2

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 (920) hide show
  1. package/dist/cjs/AuthorizationConfig-79ffae4b.js.gz +0 -0
  2. package/dist/cjs/{ConfigStorage-72f34bd4.js → ConfigStorage-2c528adc.js} +2 -2
  3. package/dist/cjs/ConfigStorage-2c528adc.js.gz +0 -0
  4. package/dist/cjs/{DataFetcher-991b0349.js → DataFetcher-36fd8b26.js} +5 -2
  5. package/dist/cjs/DataFetcher-36fd8b26.js.gz +0 -0
  6. package/dist/cjs/{FormConfigHelper-e253a418.js → FormConfigHelper-1e8bb464.js} +4 -22
  7. package/dist/cjs/FormConfigHelper-1e8bb464.js.gz +0 -0
  8. package/dist/cjs/GetSelectedRecordsIDsInfo-bd50caf1.js.gz +0 -0
  9. package/dist/cjs/IFetchDataExporterParams-e78ec415.js.gz +0 -0
  10. package/dist/cjs/{ISave-ebf6b4ed.js → ISave-a43d8683.js} +4 -4
  11. package/dist/cjs/ISave-a43d8683.js.gz +0 -0
  12. package/dist/cjs/ParamType-90b440a0.js.gz +0 -0
  13. package/dist/cjs/PersonalizedFilterUtils-7259cf65.js.gz +0 -0
  14. package/dist/cjs/PrintUtils-bcaeb82f.js.gz +0 -0
  15. package/dist/cjs/ResourceIDUtils-5ff86aa7.js.gz +0 -0
  16. package/dist/cjs/ServicesNumberingConfig-69038a0f.js.gz +0 -0
  17. package/dist/cjs/{SnkFormConfigManager-cdbb29d4.js → SnkFormConfigManager-b3ff72a3.js} +5 -5
  18. package/dist/cjs/SnkFormConfigManager-b3ff72a3.js.gz +0 -0
  19. package/dist/cjs/{SnkMultiSelectionListDataSource-011bec79.js → SnkMultiSelectionListDataSource-ca893d61.js} +4 -4
  20. package/dist/cjs/SnkMultiSelectionListDataSource-ca893d61.js.gz +0 -0
  21. package/dist/cjs/{auth-fetcher-c3cac878.js → auth-fetcher-35ec1416.js} +1 -1
  22. package/dist/cjs/auth-fetcher-35ec1416.js.gz +0 -0
  23. package/dist/cjs/config-header.cjs.entry.js.gz +0 -0
  24. package/dist/cjs/configs-button.cjs.entry.js.gz +0 -0
  25. package/dist/cjs/constants-6d82e405.js.gz +0 -0
  26. package/dist/cjs/{dataunit-fetcher-8bf469e7.js → dataunit-fetcher-a71276bb.js} +1 -1
  27. package/dist/cjs/dataunit-fetcher-a71276bb.js.gz +0 -0
  28. package/dist/cjs/default-filters-a09bf82b.js.gz +0 -0
  29. package/dist/cjs/field-config_2.cjs.entry.js +1 -1
  30. package/dist/cjs/field-config_2.cjs.entry.js.gz +0 -0
  31. package/dist/cjs/fields-layout.cjs.entry.js +4 -4
  32. package/dist/cjs/fields-layout.cjs.entry.js.gz +0 -0
  33. package/dist/cjs/fields-selector.cjs.entry.js +1 -1
  34. package/dist/cjs/fields-selector.cjs.entry.js.gz +0 -0
  35. package/dist/cjs/filter-item-type.enum-a7ffdaa6.js.gz +0 -0
  36. package/dist/cjs/filter-type.enum-2bb46d2a.js.gz +0 -0
  37. package/dist/cjs/filter-validate-cb4ed41a.js.gz +0 -0
  38. package/dist/cjs/filterNumberVariation-d65332da.js.gz +0 -0
  39. package/dist/cjs/{form-config-fetcher-c7af90d8.js → form-config-fetcher-37296a56.js} +1 -1
  40. package/dist/cjs/form-config-fetcher-37296a56.js.gz +0 -0
  41. package/dist/cjs/guides-configurator.cjs.entry.js +2 -2
  42. package/dist/cjs/guides-configurator.cjs.entry.js.gz +0 -0
  43. package/dist/cjs/index-13d05f03.js.gz +0 -0
  44. package/dist/cjs/index-1cf293c1.js.gz +0 -0
  45. package/dist/cjs/index-62760a9c.js.gz +0 -0
  46. package/dist/cjs/index-8d94b7e0.js.gz +0 -0
  47. package/dist/cjs/index-e3e39724.js.gz +0 -0
  48. package/dist/cjs/index.cjs.js.gz +0 -0
  49. package/dist/cjs/loader.cjs.js +1 -1
  50. package/dist/cjs/loader.cjs.js.gz +0 -0
  51. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
  52. package/dist/cjs/pesquisa-grid_2.cjs.entry.js.gz +0 -0
  53. package/dist/cjs/presentationMode-52ec3bdd.js.gz +0 -0
  54. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  55. package/dist/cjs/sankhyablocks.cjs.js.gz +0 -0
  56. package/dist/cjs/snk-actions-button_9.cjs.entry.js +5 -5
  57. package/dist/cjs/snk-actions-button_9.cjs.entry.js.gz +0 -0
  58. package/dist/cjs/snk-actions-form.cjs.entry.js.gz +0 -0
  59. package/dist/cjs/snk-application.cjs.entry.js +69 -81
  60. package/dist/cjs/snk-application.cjs.entry.js.gz +0 -0
  61. package/dist/cjs/snk-attach.cjs.entry.js +5 -5
  62. package/dist/cjs/snk-attach.cjs.entry.js.gz +0 -0
  63. package/dist/cjs/snk-client-confirm.cjs.entry.js.gz +0 -0
  64. package/dist/cjs/snk-configurator.cjs.entry.js.gz +0 -0
  65. package/dist/cjs/snk-crud.cjs.entry.js +6 -92
  66. package/dist/cjs/snk-crud.cjs.entry.js.gz +0 -0
  67. package/dist/cjs/snk-custom-slot-elements.cjs.entry.js.gz +0 -0
  68. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
  69. package/dist/cjs/snk-data-exporter.cjs.entry.js.gz +0 -0
  70. package/dist/cjs/{snk-data-unit-7d587ad5.js → snk-data-unit-c2a0d85c.js} +2 -2
  71. package/dist/cjs/snk-data-unit-c2a0d85c.js.gz +0 -0
  72. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  73. package/dist/cjs/snk-data-unit.cjs.entry.js.gz +0 -0
  74. package/dist/cjs/snk-default-filter.cjs.entry.js.gz +0 -0
  75. package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
  76. package/dist/cjs/snk-detail-view.cjs.entry.js.gz +0 -0
  77. package/dist/cjs/snk-entity-list.cjs.entry.js.gz +0 -0
  78. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js.gz +0 -0
  79. package/dist/cjs/snk-expression-group_2.cjs.entry.js.gz +0 -0
  80. package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js.gz +0 -0
  81. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
  82. package/dist/cjs/snk-filter-bar_4.cjs.entry.js.gz +0 -0
  83. package/dist/cjs/snk-filter-binary-select.cjs.entry.js.gz +0 -0
  84. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js.gz +0 -0
  85. package/dist/cjs/snk-filter-detail.cjs.entry.js.gz +0 -0
  86. package/dist/cjs/snk-filter-field-search_2.cjs.entry.js.gz +0 -0
  87. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  88. package/dist/cjs/snk-filter-modal-item.cjs.entry.js.gz +0 -0
  89. package/dist/cjs/snk-filter-multi-select.cjs.entry.js.gz +0 -0
  90. package/dist/cjs/snk-filter-number.cjs.entry.js.gz +0 -0
  91. package/dist/cjs/snk-filter-period.cjs.entry.js.gz +0 -0
  92. package/dist/cjs/snk-filter-search.cjs.entry.js.gz +0 -0
  93. package/dist/cjs/snk-filter-text.cjs.entry.js.gz +0 -0
  94. package/dist/cjs/snk-form-summary.cjs.entry.js.gz +0 -0
  95. package/dist/cjs/snk-form-view.cjs.entry.js.gz +0 -0
  96. package/dist/cjs/snk-form_2.cjs.entry.js +18 -10
  97. package/dist/cjs/snk-form_2.cjs.entry.js.gz +0 -0
  98. package/dist/cjs/snk-grid.cjs.entry.js +10 -13
  99. package/dist/cjs/snk-grid.cjs.entry.js.gz +0 -0
  100. package/dist/cjs/{snk-guides-viewer-366d5c32.js → snk-guides-viewer-dee5ddd6.js} +29 -91
  101. package/dist/cjs/snk-guides-viewer-dee5ddd6.js.gz +0 -0
  102. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
  103. package/dist/cjs/snk-guides-viewer.cjs.entry.js.gz +0 -0
  104. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js.gz +0 -0
  105. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  106. package/dist/cjs/snk-personalized-filter.cjs.entry.js.gz +0 -0
  107. package/dist/cjs/snk-pesquisa.cjs.entry.js +5 -16
  108. package/dist/cjs/snk-pesquisa.cjs.entry.js.gz +0 -0
  109. package/dist/cjs/snk-print-selector.cjs.entry.js.gz +0 -0
  110. package/dist/cjs/snk-simple-bar.cjs.entry.js.gz +0 -0
  111. package/dist/cjs/snk-simple-crud.cjs.entry.js +7 -7
  112. package/dist/cjs/snk-simple-crud.cjs.entry.js.gz +0 -0
  113. package/dist/cjs/snk-taskbar.cjs.entry.js +4 -8
  114. package/dist/cjs/snk-taskbar.cjs.entry.js.gz +0 -0
  115. package/dist/cjs/sortable.esm-9a110bb7.js.gz +0 -0
  116. package/dist/cjs/taskbar-elements-fb5d1e08.js.gz +0 -0
  117. package/dist/cjs/taskbar-processor-2fba34a8.js.gz +0 -0
  118. package/dist/cjs/teste-pesquisa.cjs.entry.js.gz +0 -0
  119. package/dist/collection/collection-manifest.json +1 -1
  120. package/dist/collection/components/snk-actions-button/actions/enum/ActionsType.js.gz +0 -0
  121. package/dist/collection/components/snk-actions-button/actions/enum/ParamType.js.gz +0 -0
  122. package/dist/collection/components/snk-actions-button/actions/enum/RefreshType.js.gz +0 -0
  123. package/dist/collection/components/snk-actions-button/actions/executor/java.executor.js.gz +0 -0
  124. package/dist/collection/components/snk-actions-button/actions/executor/javascript.executor.js.gz +0 -0
  125. package/dist/collection/components/snk-actions-button/actions/executor/launch-screen.executor.js.gz +0 -0
  126. package/dist/collection/components/snk-actions-button/actions/executor/procedure.executor.js.gz +0 -0
  127. package/dist/collection/components/snk-actions-button/actions/factory/executor.factory.js.gz +0 -0
  128. package/dist/collection/components/snk-actions-button/actions/index.js.gz +0 -0
  129. package/dist/collection/components/snk-actions-button/actions/interfaces/IAction.js.gz +0 -0
  130. package/dist/collection/components/snk-actions-button/actions/interfaces/IExecSource.js.gz +0 -0
  131. package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActions.js.gz +0 -0
  132. package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActionsProps.js.gz +0 -0
  133. package/dist/collection/components/snk-actions-button/actions/interfaces/IResultParam.js.gz +0 -0
  134. package/dist/collection/components/snk-actions-button/clientEvent/index.js.gz +0 -0
  135. package/dist/collection/components/snk-actions-button/clientEvent/interfaces/IClientEventConfirm.js.gz +0 -0
  136. package/dist/collection/components/snk-actions-button/interfaces/index.js.gz +0 -0
  137. package/dist/collection/components/snk-actions-button/snk-actions-button.css.gz +0 -0
  138. package/dist/collection/components/snk-actions-button/snk-actions-button.js.gz +0 -0
  139. package/dist/collection/components/snk-actions-button/subcomponents/snk-actions-form.js.gz +0 -0
  140. package/dist/collection/components/snk-actions-button/subcomponents/snk-client-confirm.js.gz +0 -0
  141. package/dist/collection/components/snk-application/__mocks__/snk-application.js.gz +0 -0
  142. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js.gz +0 -0
  143. package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js.gz +0 -0
  144. package/dist/collection/components/snk-application/request-listener/RequestListenerFactory.js.gz +0 -0
  145. package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js.gz +0 -0
  146. package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +25 -5
  147. package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js.gz +0 -0
  148. package/dist/collection/components/snk-application/snk-application.css.gz +0 -0
  149. package/dist/collection/components/snk-application/snk-application.js +44 -87
  150. package/dist/collection/components/snk-application/snk-application.js.gz +0 -0
  151. package/dist/collection/components/snk-attach/interfaces/ICrudConfig.js.gz +0 -0
  152. package/dist/collection/components/snk-attach/interfaces/TFetcherType.js.gz +0 -0
  153. package/dist/collection/components/snk-attach/interfaces/index.js.gz +0 -0
  154. package/dist/collection/components/snk-attach/snk-attach.css.gz +0 -0
  155. package/dist/collection/components/snk-attach/snk-attach.js.gz +0 -0
  156. package/dist/collection/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.js.gz +0 -0
  157. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js.gz +0 -0
  158. package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js.gz +0 -0
  159. package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js.gz +0 -0
  160. package/dist/collection/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.js.gz +0 -0
  161. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js.gz +0 -0
  162. package/dist/collection/components/snk-attach/structure/index.js.gz +0 -0
  163. package/dist/collection/components/snk-configurator/AuthorizationConfig.js.gz +0 -0
  164. package/dist/collection/components/snk-configurator/snk-configurator.css.gz +0 -0
  165. package/dist/collection/components/snk-configurator/snk-configurator.js.gz +0 -0
  166. package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js.gz +0 -0
  167. package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js.gz +0 -0
  168. package/dist/collection/components/snk-crud/snk-crud.css.gz +0 -0
  169. package/dist/collection/components/snk-crud/snk-crud.js +2 -133
  170. package/dist/collection/components/snk-crud/snk-crud.js.gz +0 -0
  171. package/dist/collection/components/snk-crud/subcomponents/CardFormResizeObserver.js.gz +0 -0
  172. package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js.gz +0 -0
  173. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css.gz +0 -0
  174. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js.gz +0 -0
  175. package/dist/collection/components/snk-crud/subcomponents/snk-form-summary.css.gz +0 -0
  176. package/dist/collection/components/snk-crud/subcomponents/snk-form-summary.js.gz +0 -0
  177. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.css.gz +0 -0
  178. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js.gz +0 -0
  179. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css.gz +0 -0
  180. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +24 -125
  181. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js.gz +0 -0
  182. package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.css.gz +0 -0
  183. package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.js.gz +0 -0
  184. package/dist/collection/components/snk-data-exporter/data/attachment.js.gz +0 -0
  185. package/dist/collection/components/snk-data-exporter/data/email.js.gz +0 -0
  186. package/dist/collection/components/snk-data-exporter/data/export-config.js.gz +0 -0
  187. package/dist/collection/components/snk-data-exporter/data/export-result.js.gz +0 -0
  188. package/dist/collection/components/snk-data-exporter/data/report.js.gz +0 -0
  189. package/dist/collection/components/snk-data-exporter/exporter-email-sender/email-info-step.js.gz +0 -0
  190. package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js.gz +0 -0
  191. package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js.gz +0 -0
  192. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js.gz +0 -0
  193. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js.gz +0 -0
  194. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js.gz +0 -0
  195. package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js.gz +0 -0
  196. package/dist/collection/components/snk-data-exporter/interfaces/IRecordID.js.gz +0 -0
  197. package/dist/collection/components/snk-data-exporter/interfaces/ISelectedID.js.gz +0 -0
  198. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js.gz +0 -0
  199. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js.gz +0 -0
  200. package/dist/collection/components/snk-data-exporter/snk-data-exporter.css.gz +0 -0
  201. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js.gz +0 -0
  202. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js.gz +0 -0
  203. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js.gz +0 -0
  204. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js.gz +0 -0
  205. package/dist/collection/components/snk-data-unit/MultipleUpdateHelper.js.gz +0 -0
  206. package/dist/collection/components/snk-data-unit/snk-data-unit.js.gz +0 -0
  207. package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js.gz +0 -0
  208. package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js.gz +0 -0
  209. package/dist/collection/components/snk-entity-list/snk-entity-list.css.gz +0 -0
  210. package/dist/collection/components/snk-entity-list/snk-entity-list.js.gz +0 -0
  211. package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js.gz +0 -0
  212. package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/filterNumberVariation.js.gz +0 -0
  213. package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/presentationMode.js.gz +0 -0
  214. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js.gz +0 -0
  215. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js.gz +0 -0
  216. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js.gz +0 -0
  217. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js.gz +0 -0
  218. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js.gz +0 -0
  219. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js.gz +0 -0
  220. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js.gz +0 -0
  221. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.css.gz +0 -0
  222. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js.gz +0 -0
  223. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.js.gz +0 -0
  224. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js.gz +0 -0
  225. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js.gz +0 -0
  226. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css.gz +0 -0
  227. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js.gz +0 -0
  228. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js.gz +0 -0
  229. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css.gz +0 -0
  230. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js.gz +0 -0
  231. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.css.gz +0 -0
  232. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.js.gz +0 -0
  233. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.css.gz +0 -0
  234. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js.gz +0 -0
  235. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css.gz +0 -0
  236. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js.gz +0 -0
  237. package/dist/collection/components/snk-filter-bar/types/custom-element-filter.js.gz +0 -0
  238. package/dist/collection/components/snk-filter-bar/types/default-filters.js.gz +0 -0
  239. package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js.gz +0 -0
  240. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js.gz +0 -0
  241. package/dist/collection/components/snk-filter-bar/utils/filter-validate.js.gz +0 -0
  242. package/dist/collection/components/snk-filter-bar/utils/filters-mock.js.gz +0 -0
  243. package/dist/collection/components/snk-filter-field-search/interfaces/index.js.gz +0 -0
  244. package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.css.gz +0 -0
  245. package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.js.gz +0 -0
  246. package/dist/collection/components/snk-filter-field-search/subcomponents/index.js.gz +0 -0
  247. package/dist/collection/components/snk-filter-field-search/subcomponents/list-item.js.gz +0 -0
  248. package/dist/collection/components/snk-form/snk-form.css.gz +0 -0
  249. package/dist/collection/components/snk-form/snk-form.js.gz +0 -0
  250. package/dist/collection/components/snk-form-config/FormConfigHelper.js +4 -21
  251. package/dist/collection/components/snk-form-config/FormConfigHelper.js.gz +0 -0
  252. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +3 -3
  253. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js.gz +0 -0
  254. package/dist/collection/components/snk-form-config/config-header/config-header.css.gz +0 -0
  255. package/dist/collection/components/snk-form-config/config-header/config-header.js.gz +0 -0
  256. package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.css.gz +0 -0
  257. package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.js.gz +0 -0
  258. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css.gz +0 -0
  259. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.js.gz +0 -0
  260. package/dist/collection/components/snk-form-config/field-item/field-item.css.gz +0 -0
  261. package/dist/collection/components/snk-form-config/field-item/field-item.js.gz +0 -0
  262. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +16 -0
  263. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css.gz +0 -0
  264. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +4 -4
  265. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js.gz +0 -0
  266. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.css.gz +0 -0
  267. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js.gz +0 -0
  268. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +3 -3
  269. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css.gz +0 -0
  270. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +2 -2
  271. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js.gz +0 -0
  272. package/dist/collection/components/snk-form-config/snk-form-config.css.gz +0 -0
  273. package/dist/collection/components/snk-form-config/snk-form-config.js +14 -30
  274. package/dist/collection/components/snk-form-config/snk-form-config.js.gz +0 -0
  275. package/dist/collection/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.js.gz +0 -0
  276. package/dist/collection/components/snk-grid/snk-grid.css +0 -14
  277. package/dist/collection/components/snk-grid/snk-grid.css.gz +0 -0
  278. package/dist/collection/components/snk-grid/snk-grid.js +4 -26
  279. package/dist/collection/components/snk-grid/snk-grid.js.gz +0 -0
  280. package/dist/collection/components/snk-grid-config/snk-grid-config.css.gz +0 -0
  281. package/dist/collection/components/snk-grid-config/snk-grid-config.js.gz +0 -0
  282. package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.css.gz +0 -0
  283. package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.js.gz +0 -0
  284. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.css.gz +0 -0
  285. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js.gz +0 -0
  286. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.css.gz +0 -0
  287. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js.gz +0 -0
  288. package/dist/collection/components/snk-numbering-config/services/ServicesNumberingConfig.js.gz +0 -0
  289. package/dist/collection/components/snk-numbering-config/snk-numbering-config.css.gz +0 -0
  290. package/dist/collection/components/snk-numbering-config/snk-numbering-config.js.gz +0 -0
  291. package/dist/collection/components/snk-personalized-filter/interfaces/IExpressionGroup.js.gz +0 -0
  292. package/dist/collection/components/snk-personalized-filter/interfaces/IExpressionItem.js.gz +0 -0
  293. package/dist/collection/components/snk-personalized-filter/interfaces/IParameter.js.gz +0 -0
  294. package/dist/collection/components/snk-personalized-filter/interfaces/IPersonalizedFilter.js.gz +0 -0
  295. package/dist/collection/components/snk-personalized-filter/interfaces/ISystemFilterConfig.js.gz +0 -0
  296. package/dist/collection/components/snk-personalized-filter/interfaces/IUserFilterConfig.js.gz +0 -0
  297. package/dist/collection/components/snk-personalized-filter/interfaces/index.js.gz +0 -0
  298. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.css.gz +0 -0
  299. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js.gz +0 -0
  300. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css.gz +0 -0
  301. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js.gz +0 -0
  302. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js.gz +0 -0
  303. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.css.gz +0 -0
  304. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js.gz +0 -0
  305. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.css.gz +0 -0
  306. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.js.gz +0 -0
  307. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.css.gz +0 -0
  308. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js.gz +0 -0
  309. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.css.gz +0 -0
  310. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js.gz +0 -0
  311. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js.gz +0 -0
  312. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css.gz +0 -0
  313. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js.gz +0 -0
  314. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css.gz +0 -0
  315. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js.gz +0 -0
  316. package/dist/collection/components/snk-pesquisa/pesquisaHelper.js.gz +0 -0
  317. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +1 -5
  318. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css.gz +0 -0
  319. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +0 -43
  320. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js.gz +0 -0
  321. package/dist/collection/components/snk-print-selector/snk-print-selector.css.gz +0 -0
  322. package/dist/collection/components/snk-print-selector/snk-print-selector.js.gz +0 -0
  323. package/dist/collection/components/snk-simple-bar/snk-simple-bar.css.gz +0 -0
  324. package/dist/collection/components/snk-simple-bar/snk-simple-bar.js.gz +0 -0
  325. package/dist/collection/components/snk-simple-crud/snk-simple-crud.constants.js.gz +0 -0
  326. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css.gz +0 -0
  327. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js.gz +0 -0
  328. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css.gz +0 -0
  329. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js.gz +0 -0
  330. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css.gz +0 -0
  331. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js.gz +0 -0
  332. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js.gz +0 -0
  333. package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.css.gz +0 -0
  334. package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js.gz +0 -0
  335. package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js.gz +0 -0
  336. package/dist/collection/components/snk-taskbar/snk-taskbar.css.gz +0 -0
  337. package/dist/collection/components/snk-taskbar/snk-taskbar.js +4 -29
  338. package/dist/collection/components/snk-taskbar/snk-taskbar.js.gz +0 -0
  339. package/dist/collection/components/teste-pesquisa/teste-pesquisa.css.gz +0 -0
  340. package/dist/collection/components/teste-pesquisa/teste-pesquisa.js.gz +0 -0
  341. package/dist/collection/index.js.gz +0 -0
  342. package/dist/collection/lib/@types/index.js.gz +0 -0
  343. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js.gz +0 -0
  344. package/dist/collection/lib/applet-caller/applet-caller.js.gz +0 -0
  345. package/dist/collection/lib/auth/mgeauthorization.module.js.gz +0 -0
  346. package/dist/collection/lib/configs/ConfigStorage.js.gz +0 -0
  347. package/dist/collection/lib/configs/LayoutFormConfig.js.gz +0 -0
  348. package/dist/collection/lib/dataUnit/InMemoryLoader.js.gz +0 -0
  349. package/dist/collection/lib/dataUnit/ValueFormatter.js.gz +0 -0
  350. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js.gz +0 -0
  351. package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js.gz +0 -0
  352. package/dist/collection/lib/http/data-fetcher/DataFetcher.js.gz +0 -0
  353. package/dist/collection/lib/http/data-fetcher/custom-xhr-override.js.gz +0 -0
  354. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js.gz +0 -0
  355. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js.gz +0 -0
  356. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js.gz +0 -0
  357. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js.gz +0 -0
  358. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js.gz +0 -0
  359. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js.gz +0 -0
  360. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/ISave.js.gz +0 -0
  361. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/index.js.gz +0 -0
  362. package/dist/collection/lib/http/data-fetcher/fetchers/application-config-fetcher.js.gz +0 -0
  363. package/dist/collection/lib/http/data-fetcher/fetchers/auth-fetcher.js.gz +0 -0
  364. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js.gz +0 -0
  365. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js.gz +0 -0
  366. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js.gz +0 -0
  367. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js.gz +0 -0
  368. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js.gz +0 -0
  369. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js.gz +0 -0
  370. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataResult.js.gz +0 -0
  371. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataStrategy.js.gz +0 -0
  372. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadingInfo.js.gz +0 -0
  373. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRecordField.js.gz +0 -0
  374. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IResponseRecord.js.gz +0 -0
  375. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js.gz +0 -0
  376. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DataUnitStrategy.js.gz +0 -0
  377. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js.gz +0 -0
  378. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js.gz +0 -0
  379. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.js.gz +0 -0
  380. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.js.gz +0 -0
  381. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterResponse.js.gz +0 -0
  382. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IPersonalizedReport.js.gz +0 -0
  383. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/permission-export-pdf.js.gz +0 -0
  384. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher.js.gz +0 -0
  385. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js.gz +0 -0
  386. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js.gz +0 -0
  387. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js.gz +0 -0
  388. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js.gz +0 -0
  389. package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js.gz +0 -0
  390. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +3 -3
  391. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js.gz +0 -0
  392. package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js.gz +0 -0
  393. package/dist/collection/lib/http/data-fetcher/fetchers/totals-fetcher.js.gz +0 -0
  394. package/dist/collection/lib/http/data-fetcher/interfaces/IClientEventResponse.js.gz +0 -0
  395. package/dist/collection/lib/http/data-fetcher/recaller/GraphQLRecaller.js.gz +0 -0
  396. package/dist/collection/lib/http/data-fetcher/recaller/IDataFetcherRecaller.js.gz +0 -0
  397. package/dist/collection/lib/http/data-fetcher/recaller/ServiceBrokerRecaller.js.gz +0 -0
  398. package/dist/collection/lib/http/data-fetcher/state/LoadStateManager.js.gz +0 -0
  399. package/dist/collection/lib/index.js.gz +0 -0
  400. package/dist/collection/lib/message/SnkMessageBuilder.js.gz +0 -0
  401. package/dist/collection/lib/message/messageResourceEnUSUtils.js.gz +0 -0
  402. package/dist/collection/lib/message/messageResourceEsESUtils.js.gz +0 -0
  403. package/dist/collection/lib/message/messageResourcePtBRUtils.js.gz +0 -0
  404. package/dist/collection/lib/message/resources/en-us/continuousInsertUtils.msg.js.gz +0 -0
  405. package/dist/collection/lib/message/resources/en-us/crud-utils.msg.js.gz +0 -0
  406. package/dist/collection/lib/message/resources/en-us/dataFetcher.msg.js.gz +0 -0
  407. package/dist/collection/lib/message/resources/en-us/dataUnitDataLoaderHelper.msg.js.gz +0 -0
  408. package/dist/collection/lib/message/resources/en-us/file-viewer.msg.js.gz +0 -0
  409. package/dist/collection/lib/message/resources/en-us/snk-actions-button.msg.js.gz +0 -0
  410. package/dist/collection/lib/message/resources/en-us/snk-application.msg.js.gz +0 -0
  411. package/dist/collection/lib/message/resources/en-us/snk-attach.msg.js.gz +0 -0
  412. package/dist/collection/lib/message/resources/en-us/snk-configurator.msg.js.gz +0 -0
  413. package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js.gz +0 -0
  414. package/dist/collection/lib/message/resources/en-us/snk-data-exporter.msg.js.gz +0 -0
  415. package/dist/collection/lib/message/resources/en-us/snk-data-unit.msg.js.gz +0 -0
  416. package/dist/collection/lib/message/resources/en-us/snk-entity-list.msg.js.gz +0 -0
  417. package/dist/collection/lib/message/resources/en-us/snk-error-handler.msg.js.gz +0 -0
  418. package/dist/collection/lib/message/resources/en-us/snk-exporter.msg.js.gz +0 -0
  419. package/dist/collection/lib/message/resources/en-us/snk-filter-bar.msg.js.gz +0 -0
  420. package/dist/collection/lib/message/resources/en-us/snk-filter-field-search.msg.js.gz +0 -0
  421. package/dist/collection/lib/message/resources/en-us/snk-filter-list.msg.js.gz +0 -0
  422. package/dist/collection/lib/message/resources/en-us/snk-filter-param-config.msg.js.gz +0 -0
  423. package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +1 -0
  424. package/dist/collection/lib/message/resources/en-us/snk-form.msg.js.gz +0 -0
  425. package/dist/collection/lib/message/resources/en-us/snk-grid.msg.js.gz +0 -0
  426. package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js.gz +0 -0
  427. package/dist/collection/lib/message/resources/en-us/snk-numbering-config.msg.js.gz +0 -0
  428. package/dist/collection/lib/message/resources/en-us/snk-personalized-filter.msg.js.gz +0 -0
  429. package/dist/collection/lib/message/resources/en-us/snk-pesquisa.msg.js.gz +0 -0
  430. package/dist/collection/lib/message/resources/en-us/snk-print-selector.msg.js.gz +0 -0
  431. package/dist/collection/lib/message/resources/en-us/snk-simple-bar.msg.js.gz +0 -0
  432. package/dist/collection/lib/message/resources/en-us/snk-simple-crud.msg.js.gz +0 -0
  433. package/dist/collection/lib/message/resources/en-us/snk-simple-form-config.msg.js.gz +0 -0
  434. package/dist/collection/lib/message/resources/en-us/snk-taskbar.msg.js.gz +0 -0
  435. package/dist/collection/lib/message/resources/es-es/continuousInsertUtils.msg.js.gz +0 -0
  436. package/dist/collection/lib/message/resources/es-es/crud-utils.msg.js.gz +0 -0
  437. package/dist/collection/lib/message/resources/es-es/dataFetcher.msg.js.gz +0 -0
  438. package/dist/collection/lib/message/resources/es-es/dataUnitDataLoaderHelper.msg.js.gz +0 -0
  439. package/dist/collection/lib/message/resources/es-es/file-viewer.msg.js.gz +0 -0
  440. package/dist/collection/lib/message/resources/es-es/snk-actions-button.msg.js.gz +0 -0
  441. package/dist/collection/lib/message/resources/es-es/snk-application.msg.js.gz +0 -0
  442. package/dist/collection/lib/message/resources/es-es/snk-attach.msg.js.gz +0 -0
  443. package/dist/collection/lib/message/resources/es-es/snk-configurator.msg.js.gz +0 -0
  444. package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js.gz +0 -0
  445. package/dist/collection/lib/message/resources/es-es/snk-data-exporter.msg.js.gz +0 -0
  446. package/dist/collection/lib/message/resources/es-es/snk-data-unit.msg.js.gz +0 -0
  447. package/dist/collection/lib/message/resources/es-es/snk-entity-list.msg.js.gz +0 -0
  448. package/dist/collection/lib/message/resources/es-es/snk-error-handler.msg.js.gz +0 -0
  449. package/dist/collection/lib/message/resources/es-es/snk-exporter.msg.js.gz +0 -0
  450. package/dist/collection/lib/message/resources/es-es/snk-filter-bar.msg.js.gz +0 -0
  451. package/dist/collection/lib/message/resources/es-es/snk-filter-field-search.msg.js.gz +0 -0
  452. package/dist/collection/lib/message/resources/es-es/snk-filter-list.msg.js.gz +0 -0
  453. package/dist/collection/lib/message/resources/es-es/snk-filter-param-config.msg.js.gz +0 -0
  454. package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +1 -0
  455. package/dist/collection/lib/message/resources/es-es/snk-form.msg.js.gz +0 -0
  456. package/dist/collection/lib/message/resources/es-es/snk-grid.msg.js.gz +0 -0
  457. package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js.gz +0 -0
  458. package/dist/collection/lib/message/resources/es-es/snk-numbering-config.msg.js.gz +0 -0
  459. package/dist/collection/lib/message/resources/es-es/snk-personalized-filter.msg.js.gz +0 -0
  460. package/dist/collection/lib/message/resources/es-es/snk-pesquisa.msg.js.gz +0 -0
  461. package/dist/collection/lib/message/resources/es-es/snk-print-selector.msg.js.gz +0 -0
  462. package/dist/collection/lib/message/resources/es-es/snk-simple-bar.msg.js.gz +0 -0
  463. package/dist/collection/lib/message/resources/es-es/snk-simple-crud.msg.js.gz +0 -0
  464. package/dist/collection/lib/message/resources/es-es/snk-simple-form-config.msg.js.gz +0 -0
  465. package/dist/collection/lib/message/resources/es-es/snk-taskbar.msg.js.gz +0 -0
  466. package/dist/collection/lib/message/resources/pt-br/continuousInsertUtils.msg.js.gz +0 -0
  467. package/dist/collection/lib/message/resources/pt-br/crud-utils.msg.js.gz +0 -0
  468. package/dist/collection/lib/message/resources/pt-br/dataFetcher.msg.js.gz +0 -0
  469. package/dist/collection/lib/message/resources/pt-br/dataUnitDataLoaderHelper.msg.js.gz +0 -0
  470. package/dist/collection/lib/message/resources/pt-br/file-viewer.msg.js.gz +0 -0
  471. package/dist/collection/lib/message/resources/pt-br/snk-actions-button.msg.js.gz +0 -0
  472. package/dist/collection/lib/message/resources/pt-br/snk-application.msg.js.gz +0 -0
  473. package/dist/collection/lib/message/resources/pt-br/snk-attach.msg.js.gz +0 -0
  474. package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js.gz +0 -0
  475. package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js.gz +0 -0
  476. package/dist/collection/lib/message/resources/pt-br/snk-data-exporter.msg.js.gz +0 -0
  477. package/dist/collection/lib/message/resources/pt-br/snk-data-unit.msg.js.gz +0 -0
  478. package/dist/collection/lib/message/resources/pt-br/snk-entity-list.msg.js.gz +0 -0
  479. package/dist/collection/lib/message/resources/pt-br/snk-error-handler.msg.js.gz +0 -0
  480. package/dist/collection/lib/message/resources/pt-br/snk-exporter.msg.js.gz +0 -0
  481. package/dist/collection/lib/message/resources/pt-br/snk-filter-bar.msg.js.gz +0 -0
  482. package/dist/collection/lib/message/resources/pt-br/snk-filter-field-search.msg.js.gz +0 -0
  483. package/dist/collection/lib/message/resources/pt-br/snk-filter-list.msg.js.gz +0 -0
  484. package/dist/collection/lib/message/resources/pt-br/snk-filter-param-config.msg.js.gz +0 -0
  485. package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +2 -1
  486. package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js.gz +0 -0
  487. package/dist/collection/lib/message/resources/pt-br/snk-grid.msg.js.gz +0 -0
  488. package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js.gz +0 -0
  489. package/dist/collection/lib/message/resources/pt-br/snk-numbering-config.msg.js.gz +0 -0
  490. package/dist/collection/lib/message/resources/pt-br/snk-personalized-filter.msg.js.gz +0 -0
  491. package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js +1 -1
  492. package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js.gz +0 -0
  493. package/dist/collection/lib/message/resources/pt-br/snk-print-selector.msg.js.gz +0 -0
  494. package/dist/collection/lib/message/resources/pt-br/snk-simple-bar.msg.js.gz +0 -0
  495. package/dist/collection/lib/message/resources/pt-br/snk-simple-crud.msg.js.gz +0 -0
  496. package/dist/collection/lib/message/resources/pt-br/snk-simple-form-config.msg.js.gz +0 -0
  497. package/dist/collection/lib/message/resources/pt-br/snk-taskbar.msg.js.gz +0 -0
  498. package/dist/collection/lib/resourceid/ResourceIDUtils.js.gz +0 -0
  499. package/dist/collection/lib/store/index.js.gz +0 -0
  500. package/dist/collection/lib/utils/ContinuousInsertUtils.js.gz +0 -0
  501. package/dist/collection/lib/utils/CrudUtils.js.gz +0 -0
  502. package/dist/collection/lib/utils/GetSelectedRecordsIDsInfo.js.gz +0 -0
  503. package/dist/collection/lib/utils/PrintUtils.js.gz +0 -0
  504. package/dist/collection/lib/utils/constants.js.gz +0 -0
  505. package/dist/collection/lib/utils/fileViewer/index.js.gz +0 -0
  506. package/dist/collection/lib/utils/fileViewer/interfaces/IFileViewerParams.js.gz +0 -0
  507. package/dist/collection/lib/utils/pesquisa.js.gz +0 -0
  508. package/dist/collection/lib/utils/urlutils.js.gz +0 -0
  509. package/dist/collection/lib/workspace/workspace.js.gz +0 -0
  510. package/dist/collection/sw.js.gz +0 -0
  511. package/dist/components/AuthorizationConfig.js.gz +0 -0
  512. package/dist/components/ConfigStorage.js.gz +0 -0
  513. package/dist/components/ContinuousInsertUtils.js.gz +0 -0
  514. package/dist/components/DataFetcher.js +5 -2
  515. package/dist/components/DataFetcher.js.gz +0 -0
  516. package/dist/components/GetSelectedRecordsIDsInfo.js.gz +0 -0
  517. package/dist/components/ISave.js +3 -3
  518. package/dist/components/ISave.js.gz +0 -0
  519. package/dist/components/ParamType.js.gz +0 -0
  520. package/dist/components/PersonalizedFilterUtils.js.gz +0 -0
  521. package/dist/components/PrintUtils.js.gz +0 -0
  522. package/dist/components/ResourceIDUtils.js.gz +0 -0
  523. package/dist/components/SnkFormConfigManager.js +3 -3
  524. package/dist/components/SnkFormConfigManager.js.gz +0 -0
  525. package/dist/components/auth-fetcher.js.gz +0 -0
  526. package/dist/components/config-header.js.gz +0 -0
  527. package/dist/components/config-header2.js.gz +0 -0
  528. package/dist/components/configs-button.js.gz +0 -0
  529. package/dist/components/configs-button2.js.gz +0 -0
  530. package/dist/components/constants.js.gz +0 -0
  531. package/dist/components/dataunit-fetcher.js.gz +0 -0
  532. package/dist/components/field-config.js.gz +0 -0
  533. package/dist/components/field-config2.js +5 -22
  534. package/dist/components/field-config2.js.gz +0 -0
  535. package/dist/components/field-item.js.gz +0 -0
  536. package/dist/components/field-item2.js.gz +0 -0
  537. package/dist/components/fields-layout.js.gz +0 -0
  538. package/dist/components/fields-layout2.js +4 -4
  539. package/dist/components/fields-layout2.js.gz +0 -0
  540. package/dist/components/fields-selector.js.gz +0 -0
  541. package/dist/components/fields-selector2.js.gz +0 -0
  542. package/dist/components/filter-item-type.enum.js.gz +0 -0
  543. package/dist/components/filterNumberVariation.js.gz +0 -0
  544. package/dist/components/form-config-fetcher.js.gz +0 -0
  545. package/dist/components/guides-configurator.js.gz +0 -0
  546. package/dist/components/guides-configurator2.js +2 -2
  547. package/dist/components/guides-configurator2.js.gz +0 -0
  548. package/dist/components/index.js.gz +0 -0
  549. package/dist/components/index2.js.gz +0 -0
  550. package/dist/components/pesquisa-grid.js.gz +0 -0
  551. package/dist/components/pesquisa-grid2.js.gz +0 -0
  552. package/dist/components/pesquisa-tree.js.gz +0 -0
  553. package/dist/components/pesquisa-tree2.js.gz +0 -0
  554. package/dist/components/presentationMode.js.gz +0 -0
  555. package/dist/components/snk-actions-button.js.gz +0 -0
  556. package/dist/components/snk-actions-button2.js.gz +0 -0
  557. package/dist/components/snk-actions-form.js.gz +0 -0
  558. package/dist/components/snk-application.js.gz +0 -0
  559. package/dist/components/snk-application2.js +63 -76
  560. package/dist/components/snk-application2.js.gz +0 -0
  561. package/dist/components/snk-attach.js.gz +0 -0
  562. package/dist/components/snk-attach2.js.gz +0 -0
  563. package/dist/components/snk-client-confirm.js.gz +0 -0
  564. package/dist/components/snk-configurator.js.gz +0 -0
  565. package/dist/components/snk-configurator2.js.gz +0 -0
  566. package/dist/components/snk-crud.js +1 -92
  567. package/dist/components/snk-crud.js.gz +0 -0
  568. package/dist/components/snk-custom-slot-elements.js.gz +0 -0
  569. package/dist/components/snk-data-exporter.js.gz +0 -0
  570. package/dist/components/snk-data-exporter2.js.gz +0 -0
  571. package/dist/components/snk-data-unit.js.gz +0 -0
  572. package/dist/components/snk-data-unit2.js.gz +0 -0
  573. package/dist/components/snk-default-filter.js.gz +0 -0
  574. package/dist/components/snk-default-filter2.js.gz +0 -0
  575. package/dist/components/snk-detail-view.js.gz +0 -0
  576. package/dist/components/snk-detail-view2.js +24 -87
  577. package/dist/components/snk-detail-view2.js.gz +0 -0
  578. package/dist/components/snk-entity-list.js.gz +0 -0
  579. package/dist/components/snk-exporter-email-sender.js.gz +0 -0
  580. package/dist/components/snk-exporter-email-sender2.js.gz +0 -0
  581. package/dist/components/snk-expression-group.js.gz +0 -0
  582. package/dist/components/snk-expression-group2.js.gz +0 -0
  583. package/dist/components/snk-expression-item.js.gz +0 -0
  584. package/dist/components/snk-expression-item2.js.gz +0 -0
  585. package/dist/components/snk-filter-advanced-mode.js.gz +0 -0
  586. package/dist/components/snk-filter-advanced-mode2.js.gz +0 -0
  587. package/dist/components/snk-filter-assistent-mode.js.gz +0 -0
  588. package/dist/components/snk-filter-assistent-mode2.js.gz +0 -0
  589. package/dist/components/snk-filter-bar.js.gz +0 -0
  590. package/dist/components/snk-filter-bar2.js.gz +0 -0
  591. package/dist/components/snk-filter-binary-select.js.gz +0 -0
  592. package/dist/components/snk-filter-checkbox-list.js.gz +0 -0
  593. package/dist/components/snk-filter-detail.js.gz +0 -0
  594. package/dist/components/snk-filter-detail2.js.gz +0 -0
  595. package/dist/components/snk-filter-field-search.js.gz +0 -0
  596. package/dist/components/snk-filter-field-search2.js.gz +0 -0
  597. package/dist/components/snk-filter-item.js.gz +0 -0
  598. package/dist/components/snk-filter-item2.js.gz +0 -0
  599. package/dist/components/snk-filter-list.js.gz +0 -0
  600. package/dist/components/snk-filter-modal-item.js.gz +0 -0
  601. package/dist/components/snk-filter-modal-item2.js.gz +0 -0
  602. package/dist/components/snk-filter-modal.js.gz +0 -0
  603. package/dist/components/snk-filter-modal2.js.gz +0 -0
  604. package/dist/components/snk-filter-multi-select.js.gz +0 -0
  605. package/dist/components/snk-filter-number.js.gz +0 -0
  606. package/dist/components/snk-filter-param-config.js.gz +0 -0
  607. package/dist/components/snk-filter-param-config2.js.gz +0 -0
  608. package/dist/components/snk-filter-period.js.gz +0 -0
  609. package/dist/components/snk-filter-search.js.gz +0 -0
  610. package/dist/components/snk-filter-text.js.gz +0 -0
  611. package/dist/components/snk-form-config.js.gz +0 -0
  612. package/dist/components/snk-form-config2.js +14 -7
  613. package/dist/components/snk-form-config2.js.gz +0 -0
  614. package/dist/components/snk-form-summary.js.gz +0 -0
  615. package/dist/components/snk-form-summary2.js.gz +0 -0
  616. package/dist/components/snk-form-view.js.gz +0 -0
  617. package/dist/components/snk-form-view2.js.gz +0 -0
  618. package/dist/components/snk-form.js.gz +0 -0
  619. package/dist/components/snk-grid-config.js.gz +0 -0
  620. package/dist/components/snk-grid-config2.js.gz +0 -0
  621. package/dist/components/snk-grid.js.gz +0 -0
  622. package/dist/components/snk-grid2.js +4 -9
  623. package/dist/components/snk-grid2.js.gz +0 -0
  624. package/dist/components/snk-guides-viewer.js.gz +0 -0
  625. package/dist/components/snk-layout-form-config.js.gz +0 -0
  626. package/dist/components/snk-layout-form-config2.js.gz +0 -0
  627. package/dist/components/snk-numbering-config.js.gz +0 -0
  628. package/dist/components/snk-numbering-config2.js.gz +0 -0
  629. package/dist/components/snk-personalized-filter-editor.js.gz +0 -0
  630. package/dist/components/snk-personalized-filter.js.gz +0 -0
  631. package/dist/components/snk-personalized-filter2.js.gz +0 -0
  632. package/dist/components/snk-pesquisa.js.gz +0 -0
  633. package/dist/components/snk-pesquisa2.js +2 -14
  634. package/dist/components/snk-pesquisa2.js.gz +0 -0
  635. package/dist/components/snk-print-selector.js.gz +0 -0
  636. package/dist/components/snk-select-box.js.gz +0 -0
  637. package/dist/components/snk-select-box2.js.gz +0 -0
  638. package/dist/components/snk-simple-bar.js.gz +0 -0
  639. package/dist/components/snk-simple-bar2.js.gz +0 -0
  640. package/dist/components/snk-simple-crud.js.gz +0 -0
  641. package/dist/components/snk-simple-crud2.js.gz +0 -0
  642. package/dist/components/snk-simple-form-config.js.gz +0 -0
  643. package/dist/components/snk-simple-form-config2.js.gz +0 -0
  644. package/dist/components/snk-taskbar.js.gz +0 -0
  645. package/dist/components/snk-taskbar2.js +4 -9
  646. package/dist/components/snk-taskbar2.js.gz +0 -0
  647. package/dist/components/snk-view-representation.js.gz +0 -0
  648. package/dist/components/snk-view-representation2.js.gz +0 -0
  649. package/dist/components/sortable.esm.js.gz +0 -0
  650. package/dist/components/taskbar-actions-button.js.gz +0 -0
  651. package/dist/components/taskbar-actions-button2.js.gz +0 -0
  652. package/dist/components/taskbar-split-button.js.gz +0 -0
  653. package/dist/components/taskbar-split-button2.js.gz +0 -0
  654. package/dist/components/teste-pesquisa.js.gz +0 -0
  655. package/dist/esm/AuthorizationConfig-dcbd207a.js.gz +0 -0
  656. package/dist/esm/{ConfigStorage-22324b6b.js → ConfigStorage-eb0dad92.js} +2 -2
  657. package/dist/esm/ConfigStorage-eb0dad92.js.gz +0 -0
  658. package/dist/esm/{DataFetcher-450828a0.js → DataFetcher-727f545c.js} +5 -2
  659. package/dist/esm/DataFetcher-727f545c.js.gz +0 -0
  660. package/dist/esm/{FormConfigHelper-e89ca25c.js → FormConfigHelper-b9cf7758.js} +5 -22
  661. package/dist/esm/FormConfigHelper-b9cf7758.js.gz +0 -0
  662. package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js.gz +0 -0
  663. package/dist/esm/IFetchDataExporterParams-d73bed3d.js.gz +0 -0
  664. package/dist/esm/{ISave-61153166.js → ISave-e130962a.js} +4 -4
  665. package/dist/esm/ISave-e130962a.js.gz +0 -0
  666. package/dist/esm/ParamType-d5152b06.js.gz +0 -0
  667. package/dist/esm/PersonalizedFilterUtils-2db38ff2.js.gz +0 -0
  668. package/dist/esm/PrintUtils-3e4ff0f5.js.gz +0 -0
  669. package/dist/esm/ResourceIDUtils-a114189a.js.gz +0 -0
  670. package/dist/esm/ServicesNumberingConfig-2f7b050e.js.gz +0 -0
  671. package/dist/esm/{SnkFormConfigManager-b5a92e12.js → SnkFormConfigManager-58544896.js} +5 -5
  672. package/dist/esm/SnkFormConfigManager-58544896.js.gz +0 -0
  673. package/dist/esm/{SnkMultiSelectionListDataSource-d7ce2e54.js → SnkMultiSelectionListDataSource-411fd553.js} +4 -4
  674. package/dist/esm/SnkMultiSelectionListDataSource-411fd553.js.gz +0 -0
  675. package/dist/esm/{auth-fetcher-eef9d01e.js → auth-fetcher-1278c5c6.js} +1 -1
  676. package/dist/esm/auth-fetcher-1278c5c6.js.gz +0 -0
  677. package/dist/esm/config-header.entry.js.gz +0 -0
  678. package/dist/esm/configs-button.entry.js.gz +0 -0
  679. package/dist/esm/constants-7b422de0.js.gz +0 -0
  680. package/dist/esm/{dataunit-fetcher-da9596f6.js → dataunit-fetcher-288a8bd8.js} +1 -1
  681. package/dist/esm/dataunit-fetcher-288a8bd8.js.gz +0 -0
  682. package/dist/esm/default-filters-50105e43.js.gz +0 -0
  683. package/dist/esm/field-config_2.entry.js +1 -1
  684. package/dist/esm/field-config_2.entry.js.gz +0 -0
  685. package/dist/esm/fields-layout.entry.js +4 -4
  686. package/dist/esm/fields-layout.entry.js.gz +0 -0
  687. package/dist/esm/fields-selector.entry.js +1 -1
  688. package/dist/esm/fields-selector.entry.js.gz +0 -0
  689. package/dist/esm/filter-item-type.enum-d45e026f.js.gz +0 -0
  690. package/dist/esm/filter-type.enum-f6a8fe23.js.gz +0 -0
  691. package/dist/esm/filter-validate-faf51fa9.js.gz +0 -0
  692. package/dist/esm/filterNumberVariation-8cee02ea.js.gz +0 -0
  693. package/dist/esm/{form-config-fetcher-8d0a5e1c.js → form-config-fetcher-d65f7148.js} +1 -1
  694. package/dist/esm/form-config-fetcher-d65f7148.js.gz +0 -0
  695. package/dist/esm/guides-configurator.entry.js +2 -2
  696. package/dist/esm/guides-configurator.entry.js.gz +0 -0
  697. package/dist/esm/index-446f9341.js.gz +0 -0
  698. package/dist/esm/index-479e1293.js.gz +0 -0
  699. package/dist/esm/index-620ac460.js.gz +0 -0
  700. package/dist/esm/index-8acbae97.js.gz +0 -0
  701. package/dist/esm/index-b40568ff.js.gz +0 -0
  702. package/dist/esm/index.js.gz +0 -0
  703. package/dist/esm/loader.js +1 -1
  704. package/dist/esm/loader.js.gz +0 -0
  705. package/dist/esm/pesquisa-grid_2.entry.js +4 -4
  706. package/dist/esm/pesquisa-grid_2.entry.js.gz +0 -0
  707. package/dist/esm/polyfills/core-js.js.gz +0 -0
  708. package/dist/esm/polyfills/css-shim.js.gz +0 -0
  709. package/dist/esm/polyfills/dom.js.gz +0 -0
  710. package/dist/esm/polyfills/es5-html-element.js.gz +0 -0
  711. package/dist/esm/polyfills/index.js.gz +0 -0
  712. package/dist/esm/polyfills/system.js.gz +0 -0
  713. package/dist/esm/presentationMode-783bbf9d.js.gz +0 -0
  714. package/dist/esm/sankhyablocks.js +1 -1
  715. package/dist/esm/sankhyablocks.js.gz +0 -0
  716. package/dist/esm/snk-actions-button_9.entry.js +5 -5
  717. package/dist/esm/snk-actions-button_9.entry.js.gz +0 -0
  718. package/dist/esm/snk-actions-form.entry.js.gz +0 -0
  719. package/dist/esm/snk-application.entry.js +69 -81
  720. package/dist/esm/snk-application.entry.js.gz +0 -0
  721. package/dist/esm/snk-attach.entry.js +5 -5
  722. package/dist/esm/snk-attach.entry.js.gz +0 -0
  723. package/dist/esm/snk-client-confirm.entry.js.gz +0 -0
  724. package/dist/esm/snk-configurator.entry.js.gz +0 -0
  725. package/dist/esm/snk-crud.entry.js +6 -92
  726. package/dist/esm/snk-crud.entry.js.gz +0 -0
  727. package/dist/esm/snk-custom-slot-elements.entry.js.gz +0 -0
  728. package/dist/esm/snk-data-exporter.entry.js +5 -5
  729. package/dist/esm/snk-data-exporter.entry.js.gz +0 -0
  730. package/dist/esm/{snk-data-unit-99616a07.js → snk-data-unit-d102cdf8.js} +2 -2
  731. package/dist/esm/snk-data-unit-d102cdf8.js.gz +0 -0
  732. package/dist/esm/snk-data-unit.entry.js +3 -3
  733. package/dist/esm/snk-data-unit.entry.js.gz +0 -0
  734. package/dist/esm/snk-default-filter.entry.js.gz +0 -0
  735. package/dist/esm/snk-detail-view.entry.js +7 -7
  736. package/dist/esm/snk-detail-view.entry.js.gz +0 -0
  737. package/dist/esm/snk-entity-list.entry.js.gz +0 -0
  738. package/dist/esm/snk-exporter-email-sender.entry.js.gz +0 -0
  739. package/dist/esm/snk-expression-group_2.entry.js.gz +0 -0
  740. package/dist/esm/snk-filter-advanced-mode_2.entry.js.gz +0 -0
  741. package/dist/esm/snk-filter-bar_4.entry.js +3 -3
  742. package/dist/esm/snk-filter-bar_4.entry.js.gz +0 -0
  743. package/dist/esm/snk-filter-binary-select.entry.js.gz +0 -0
  744. package/dist/esm/snk-filter-checkbox-list.entry.js.gz +0 -0
  745. package/dist/esm/snk-filter-detail.entry.js.gz +0 -0
  746. package/dist/esm/snk-filter-field-search_2.entry.js.gz +0 -0
  747. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  748. package/dist/esm/snk-filter-modal-item.entry.js.gz +0 -0
  749. package/dist/esm/snk-filter-multi-select.entry.js.gz +0 -0
  750. package/dist/esm/snk-filter-number.entry.js.gz +0 -0
  751. package/dist/esm/snk-filter-period.entry.js.gz +0 -0
  752. package/dist/esm/snk-filter-search.entry.js.gz +0 -0
  753. package/dist/esm/snk-filter-text.entry.js.gz +0 -0
  754. package/dist/esm/snk-form-summary.entry.js.gz +0 -0
  755. package/dist/esm/snk-form-view.entry.js.gz +0 -0
  756. package/dist/esm/snk-form_2.entry.js +18 -10
  757. package/dist/esm/snk-form_2.entry.js.gz +0 -0
  758. package/dist/esm/snk-grid.entry.js +10 -13
  759. package/dist/esm/snk-grid.entry.js.gz +0 -0
  760. package/dist/esm/{snk-guides-viewer-240de636.js → snk-guides-viewer-3bf6463a.js} +29 -91
  761. package/dist/esm/snk-guides-viewer-3bf6463a.js.gz +0 -0
  762. package/dist/esm/snk-guides-viewer.entry.js +7 -7
  763. package/dist/esm/snk-guides-viewer.entry.js.gz +0 -0
  764. package/dist/esm/snk-personalized-filter-editor.entry.js.gz +0 -0
  765. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  766. package/dist/esm/snk-personalized-filter.entry.js.gz +0 -0
  767. package/dist/esm/snk-pesquisa.entry.js +5 -16
  768. package/dist/esm/snk-pesquisa.entry.js.gz +0 -0
  769. package/dist/esm/snk-print-selector.entry.js.gz +0 -0
  770. package/dist/esm/snk-simple-bar.entry.js.gz +0 -0
  771. package/dist/esm/snk-simple-crud.entry.js +7 -7
  772. package/dist/esm/snk-simple-crud.entry.js.gz +0 -0
  773. package/dist/esm/snk-taskbar.entry.js +4 -8
  774. package/dist/esm/snk-taskbar.entry.js.gz +0 -0
  775. package/dist/esm/sortable.esm-842f85a3.js.gz +0 -0
  776. package/dist/esm/taskbar-elements-faaf5d8f.js.gz +0 -0
  777. package/dist/esm/taskbar-processor-3436124c.js.gz +0 -0
  778. package/dist/esm/teste-pesquisa.entry.js.gz +0 -0
  779. package/dist/index.cjs.js.gz +0 -0
  780. package/dist/index.js.gz +0 -0
  781. package/dist/sankhyablocks/index.esm.js.gz +0 -0
  782. package/dist/sankhyablocks/p-00c3c94b.js +1 -0
  783. package/dist/sankhyablocks/p-00c3c94b.js.gz +0 -0
  784. package/dist/sankhyablocks/{p-c35fc941.js → p-02459408.js} +1 -1
  785. package/dist/sankhyablocks/p-02459408.js.gz +0 -0
  786. package/dist/sankhyablocks/{p-5ea893c5.entry.js → p-07c5289b.entry.js} +1 -1
  787. package/dist/sankhyablocks/p-07c5289b.entry.js.gz +0 -0
  788. package/dist/sankhyablocks/p-093f58fa.entry.js.gz +0 -0
  789. package/dist/sankhyablocks/{p-62aef37a.js → p-0acb3a2a.js} +1 -1
  790. package/dist/sankhyablocks/p-0acb3a2a.js.gz +0 -0
  791. package/dist/sankhyablocks/p-0f3698af.js.gz +0 -0
  792. package/dist/sankhyablocks/{p-e91c3c57.entry.js → p-1077ce69.entry.js} +1 -1
  793. package/dist/sankhyablocks/p-1077ce69.entry.js.gz +0 -0
  794. package/dist/sankhyablocks/p-162bddae.entry.js.gz +0 -0
  795. package/dist/sankhyablocks/p-180716b2.entry.js.gz +0 -0
  796. package/dist/sankhyablocks/p-1a0caadb.js.gz +0 -0
  797. package/dist/sankhyablocks/p-1a68fb59.js.gz +0 -0
  798. package/dist/sankhyablocks/{p-ea729922.entry.js → p-1e9c546e.entry.js} +1 -1
  799. package/dist/sankhyablocks/p-1e9c546e.entry.js.gz +0 -0
  800. package/dist/sankhyablocks/p-1f274f8e.entry.js +11 -0
  801. package/dist/sankhyablocks/p-1f274f8e.entry.js.gz +0 -0
  802. package/dist/sankhyablocks/p-21107f0d.entry.js.gz +0 -0
  803. package/dist/sankhyablocks/p-27482793.entry.js.gz +0 -0
  804. package/dist/sankhyablocks/p-279f1ef9.entry.js +1 -0
  805. package/dist/sankhyablocks/p-279f1ef9.entry.js.gz +0 -0
  806. package/dist/sankhyablocks/p-2fdac5e6.entry.js.gz +0 -0
  807. package/dist/sankhyablocks/{p-840fb68c.js → p-328236dd.js} +2 -2
  808. package/dist/sankhyablocks/p-328236dd.js.gz +0 -0
  809. package/dist/sankhyablocks/{p-7cac3870.entry.js → p-3b167a03.entry.js} +1 -1
  810. package/dist/sankhyablocks/p-3b167a03.entry.js.gz +0 -0
  811. package/dist/sankhyablocks/p-3c18c65a.entry.js +1 -0
  812. package/dist/sankhyablocks/p-3c18c65a.entry.js.gz +0 -0
  813. package/dist/sankhyablocks/p-3d41f5a8.entry.js.gz +0 -0
  814. package/dist/sankhyablocks/p-3ed04f0d.entry.js.gz +0 -0
  815. package/dist/sankhyablocks/{p-7d6f1285.js → p-4157ea10.js} +1 -1
  816. package/dist/sankhyablocks/p-4157ea10.js.gz +0 -0
  817. package/dist/sankhyablocks/{p-86e54841.entry.js → p-44240cc6.entry.js} +1 -1
  818. package/dist/sankhyablocks/p-44240cc6.entry.js.gz +0 -0
  819. package/dist/sankhyablocks/{p-f5e942b7.entry.js → p-45437447.entry.js} +1 -1
  820. package/dist/sankhyablocks/p-45437447.entry.js.gz +0 -0
  821. package/dist/sankhyablocks/p-471b34f4.entry.js.gz +0 -0
  822. package/dist/sankhyablocks/p-49ddc27a.entry.js.gz +0 -0
  823. package/dist/sankhyablocks/p-4c763b10.entry.js.gz +0 -0
  824. package/dist/sankhyablocks/{p-58683e28.js → p-50dd4ef8.js} +2 -2
  825. package/dist/sankhyablocks/p-50dd4ef8.js.gz +0 -0
  826. package/dist/sankhyablocks/{p-002d4d2b.js → p-513912ed.js} +1 -1
  827. package/dist/sankhyablocks/p-513912ed.js.gz +0 -0
  828. package/dist/sankhyablocks/p-51833248.js.gz +0 -0
  829. package/dist/sankhyablocks/{p-0b9a42ad.entry.js → p-5340c04e.entry.js} +1 -1
  830. package/dist/sankhyablocks/p-5340c04e.entry.js.gz +0 -0
  831. package/dist/sankhyablocks/p-55798617.js.gz +0 -0
  832. package/dist/sankhyablocks/p-60dd1d27.entry.js.gz +0 -0
  833. package/dist/sankhyablocks/p-667cab42.entry.js.gz +0 -0
  834. package/dist/sankhyablocks/p-688dcb4c.js.gz +0 -0
  835. package/dist/sankhyablocks/p-6a4b21dd.js.gz +0 -0
  836. package/dist/sankhyablocks/p-6b804983.entry.js +1 -0
  837. package/dist/sankhyablocks/p-6b804983.entry.js.gz +0 -0
  838. package/dist/sankhyablocks/p-6bf4cfbf.entry.js +1 -0
  839. package/dist/sankhyablocks/p-6bf4cfbf.entry.js.gz +0 -0
  840. package/dist/sankhyablocks/p-7345782c.entry.js.gz +0 -0
  841. package/dist/sankhyablocks/p-75af335e.entry.js.gz +0 -0
  842. package/dist/sankhyablocks/p-76e66fd9.js.gz +0 -0
  843. package/dist/sankhyablocks/p-7dd49d15.js.gz +0 -0
  844. package/dist/sankhyablocks/p-7e250432.entry.js.gz +0 -0
  845. package/dist/sankhyablocks/p-7f7fe6c4.entry.js.gz +0 -0
  846. package/dist/sankhyablocks/p-825098c1.entry.js.gz +0 -0
  847. package/dist/sankhyablocks/p-84345e7a.js.gz +0 -0
  848. package/dist/sankhyablocks/p-8d884fab.js.gz +0 -0
  849. package/dist/sankhyablocks/p-8f3f2306.js.gz +0 -0
  850. package/dist/sankhyablocks/{p-ada013c0.entry.js → p-8f4a718b.entry.js} +1 -1
  851. package/dist/sankhyablocks/p-8f4a718b.entry.js.gz +0 -0
  852. package/dist/sankhyablocks/p-9019a32f.js.gz +0 -0
  853. package/dist/sankhyablocks/p-91a9abb6.entry.js.gz +0 -0
  854. package/dist/sankhyablocks/p-96d45943.entry.js.gz +0 -0
  855. package/dist/sankhyablocks/{p-6ee2ca7a.entry.js → p-9732e099.entry.js} +1 -1
  856. package/dist/sankhyablocks/p-9732e099.entry.js.gz +0 -0
  857. package/dist/sankhyablocks/p-988afe78.js.gz +0 -0
  858. package/dist/sankhyablocks/p-9a63f3f7.entry.js.gz +0 -0
  859. package/dist/sankhyablocks/{p-cadf4846.entry.js → p-a4736498.entry.js} +1 -1
  860. package/dist/sankhyablocks/p-a4736498.entry.js.gz +0 -0
  861. package/dist/sankhyablocks/p-a992ae16.entry.js +1 -0
  862. package/dist/sankhyablocks/p-a992ae16.entry.js.gz +0 -0
  863. package/dist/sankhyablocks/{p-92cfc028.js → p-ad4b3547.js} +1 -1
  864. package/dist/sankhyablocks/p-ad4b3547.js.gz +0 -0
  865. package/dist/sankhyablocks/{p-669bb869.entry.js → p-b201e0c0.entry.js} +1 -1
  866. package/dist/sankhyablocks/p-b201e0c0.entry.js.gz +0 -0
  867. package/dist/sankhyablocks/p-b568c1d4.js.gz +0 -0
  868. package/dist/sankhyablocks/p-b7e891cc.entry.js.gz +0 -0
  869. package/dist/sankhyablocks/p-b987e15d.js.gz +0 -0
  870. package/dist/sankhyablocks/p-bce53657.entry.js +1 -0
  871. package/dist/sankhyablocks/p-bce53657.entry.js.gz +0 -0
  872. package/dist/sankhyablocks/p-c3dbf441.entry.js.gz +0 -0
  873. package/dist/sankhyablocks/p-c4fcf1fb.entry.js.gz +0 -0
  874. package/dist/sankhyablocks/p-cad964b5.js.gz +0 -0
  875. package/dist/sankhyablocks/p-cb4343c4.entry.js.gz +0 -0
  876. package/dist/sankhyablocks/p-ccd1ab5b.js +1 -0
  877. package/dist/sankhyablocks/p-ccd1ab5b.js.gz +0 -0
  878. package/dist/sankhyablocks/{p-28f50632.js → p-d0209a52.js} +1 -1
  879. package/dist/sankhyablocks/p-d0209a52.js.gz +0 -0
  880. package/dist/sankhyablocks/{p-118c221e.js → p-d68904a9.js} +1 -1
  881. package/dist/sankhyablocks/p-d68904a9.js.gz +0 -0
  882. package/dist/sankhyablocks/p-d8d8169b.js.gz +0 -0
  883. package/dist/sankhyablocks/p-dc36cfbf.js.gz +0 -0
  884. package/dist/sankhyablocks/{p-91005a00.entry.js → p-de18d737.entry.js} +1 -1
  885. package/dist/sankhyablocks/p-de18d737.entry.js.gz +0 -0
  886. package/dist/sankhyablocks/{p-88b337fe.entry.js → p-de9fe235.entry.js} +1 -1
  887. package/dist/sankhyablocks/p-de9fe235.entry.js.gz +0 -0
  888. package/dist/sankhyablocks/{p-4963dd2a.entry.js → p-dfdd0035.entry.js} +1 -1
  889. package/dist/sankhyablocks/p-dfdd0035.entry.js.gz +0 -0
  890. package/dist/sankhyablocks/p-e258de96.entry.js.gz +0 -0
  891. package/dist/sankhyablocks/p-eaad0aa8.js.gz +0 -0
  892. package/dist/sankhyablocks/p-f4184ce7.js.gz +0 -0
  893. package/dist/sankhyablocks/p-fa80e546.js.gz +0 -0
  894. package/dist/sankhyablocks/p-ff1990ad.js.gz +0 -0
  895. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  896. package/dist/sankhyablocks/sankhyablocks.esm.js.gz +0 -0
  897. package/dist/types/components/snk-application/snk-application.d.ts +0 -9
  898. package/dist/types/components/snk-crud/snk-crud.d.ts +0 -18
  899. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +0 -22
  900. package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +1 -3
  901. package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +2 -2
  902. package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +1 -1
  903. package/dist/types/components/snk-form-config/snk-form-config.d.ts +1 -5
  904. package/dist/types/components/snk-grid/snk-grid.d.ts +0 -5
  905. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +0 -8
  906. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +1 -6
  907. package/dist/types/components.d.ts +0 -68
  908. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +0 -1
  909. package/package.json +1 -1
  910. package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.js +0 -27
  911. package/dist/sankhyablocks/p-0948dc0a.entry.js +0 -11
  912. package/dist/sankhyablocks/p-11f94056.entry.js +0 -1
  913. package/dist/sankhyablocks/p-1d589380.entry.js +0 -1
  914. package/dist/sankhyablocks/p-39be771c.js +0 -1
  915. package/dist/sankhyablocks/p-55f6fef2.entry.js +0 -1
  916. package/dist/sankhyablocks/p-56f16390.entry.js +0 -1
  917. package/dist/sankhyablocks/p-62e9b9b8.entry.js +0 -1
  918. package/dist/sankhyablocks/p-c98c79c3.entry.js +0 -1
  919. package/dist/sankhyablocks/p-ec5fbad8.js +0 -1
  920. package/dist/types/components/snk-application/search-strategy/exec-prepared-search-advaced-mode.d.ts +0 -5
@@ -1 +1 @@
1
- import{r as i,h as t,H as s,g as e,c as n}from"./p-d8d8169b.js";import{ApplicationContext as o,StringUtils as r,ErrorException as a,WarningException as l,ObjectUtils as c,DateUtils as d,ServiceUtils as h,StorageType as u,ArrayUtils as g,ElementIDUtils as m}from"@sankhyalabs/core";import{D as f}from"./p-39be771c.js";import{P as v}from"./p-eaad0aa8.js";import"./p-840fb68c.js";import"./p-0f3698af.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-58683e28.js";import"./p-ff1990ad.js";import{F as p}from"./p-c35fc941.js";import{O as b}from"./p-9019a32f.js";import{g as _}from"./p-7dd49d15.js";import{R as k}from"./p-688dcb4c.js";import{ApplicationUtils as y,DialogType as w,FormLayout as C}from"@sankhyalabs/ezui/dist/collection/utils";import{C as x}from"./p-7d6f1285.js";import{S as z}from"./p-cad964b5.js";import"./p-8d884fab.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";class S{execute(i){var t;const s={actionID:i.actionID,refreshType:null===(t=i.actionConfig.javaCall)||void 0===t?void 0:t.refreshType};return new Promise((i=>{i({execSource:s,callback:this.callExecJava})}))}async callExecJava(i){const t={requestBody:{javaCall:i}};await f.get().callServiceBroker("ActionButtonsSP.executeJava",JSON.stringify(t))}}class L{execute(i){var t;const s={actionID:i.actionID,refreshType:null===(t=i.actionConfig.runScript)||void 0===t?void 0:t.refreshType};return new Promise((i=>{i({execSource:s,callback:this.callExecScript})}))}async callExecScript(i){const t={runScript:i};await f.get().callServiceBroker("ActionButtonsSP.executeScript",t)}}class A{constructor(){this._application=o.getContextValue("__SNK__APPLICATION__")}async execute(i,t){const s=i.resourceID;if(!s)return;let e=await this.buildLaunchObject(i,t);return this._application.openApp(s,e),null}buildLaunchObject(i,t){return new Promise((s=>{let e=i.actionConfig.params.param;if(e&&e.length>0){let n={},o=[];e.forEach((s=>{const e=s.localField;let l=t.getFieldValue(e);if(!l){let s=t.getField(e).label;throw s=r.isEmpty(t.getField(e).label)?e:s,new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.launchScreen.emptyField",{description:i.description,localFieldLabel:s}))}l=r.isEmpty(l.toString())?void 0:l.toString(),n[s.targetField]=l,o.push({fieldName:s.targetField,value:l})})),n.ACTION_PARAMETERS=o,n.call_time=Date.now(),s(n)}s(null)}))}}class N{execute(i){var t,s,e;const n=null===(t=i.actionConfig.dbCall)||void 0===t?void 0:t.name,o=null===(s=i.actionConfig.dbCall)||void 0===s?void 0:s.rootEntity,r={actionID:i.actionID,refreshType:null===(e=i.actionConfig.dbCall)||void 0===e?void 0:e.refreshType,procName:n,rootEntity:o};return new Promise((i=>{i({execSource:r,callback:this.callExecProcedure})}))}async callExecProcedure(i){const t={requestBody:{stpCall:i}};await f.get().callServiceBroker("ActionButtonsSP.executeSTP",JSON.stringify(t))}}var P,O;!function(i){i.LAUNCH_SCREEN="LC",i.JAVASCRIPT="SC",i.JAVA="RJ",i.PROCEDURE="SP",i.EMBEDDED="EB"}(P||(P={}));class I{constructor(i){this.actionType=i,this._application=o.getContextValue("__SNK__APPLICATION__")}get executor(){switch(this.actionType){case P.LAUNCH_SCREEN:return new A;case P.JAVASCRIPT:return new L;case P.JAVA:return new S;case P.PROCEDURE:return new N;default:throw new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.nonExistentType",{actionType:this.actionType}))}}}!function(i){i.NONE="NONE",i.PARENT="PARENT",i.MASTER="MASTER",i.ALL="ALL"}(O||(O={}));const E="__MASTER_ROW__";class D{constructor(i,t,s){var e;this._lastValuesCache={},this._actionsExecuteInterface=i,this._dataUnit=t,this._selectedRows=(null===(e=null==t?void 0:t.getSelectionInfo())||void 0===e?void 0:e.isAllRecords())?[]:null==t?void 0:t.getSelectionInfo().records,this._application=o.getContextValue("__SNK__APPLICATION__"),this._appResourceId=s}getPrimaryKeys(){return _(this._dataUnit).map((({name:i})=>i))}apply(i,t){this._application.closePopUp(),this._actionsExecuteInterface.execute(i,this._dataUnit).then((({execSource:s,callback:e})=>{this.resolvePromptParams(i,s,t).then((()=>{this.actionExecute(s,e)}))}))}async execute(i){var t;if(!i.actionConfig)throw new l(this._application.messagesBuilder.getMessage("snkActionsButton.title.warning",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.incorrectAction",{description:i.description}));if(null===(t=i.actionConfig.params)||void 0===t?void 0:t.promptParam){const t=i.actionConfig.params.promptParam;let s=!1;for(let i=0;i<t.length;i++)if(!s&&"true"===t[i].saveLast){s=!0;break}s&&(i.actionConfig.params.promptParam=await this.loadSavedValuesIntoParams(i));const e=document.createElement("snk-actions-form");window.document.body.appendChild(e),e.action=c.copy(i),e.applyParameters=i=>{this.apply(i,s)},e.openPopup()}else i.type!=P.LAUNCH_SCREEN?this._actionsExecuteInterface.execute(i,this._dataUnit).then((({execSource:i,callback:t})=>{this.actionExecute(i,t)})):this._actionsExecuteInterface.execute(i,this._dataUnit)}loadSavedValuesIntoParams(i){return this.loadLastValues(i).then((t=>{let s=i.actionConfig.params.promptParam;return t&&t.param.forEach((i=>{s=s.map((t=>t.name!==i.paramName?t:Object.assign(Object.assign({},t),"B"===t.paramType?{value:"S"===i.$}:{value:i.$})))})),s}))}async actionExecute(i,t){i.virtualPage=this.buildVirtualPage(),await this.prepareAndExecute(i,t),this.recordsReloader(i.refreshType)}resolvePromptParams(i,t,s){return new Promise((e=>{let n=[];i.actionConfig.params.promptParam.forEach((i=>{n.push(this.buildPromptParam(i))})),this.putParamsOnExecSource(n,t),s&&this.saveLastValues(i,n),e()}))}buildPromptParam(i){let t,s,e=i.paramType,n=!1,o=i.value;switch(e){case v.DATE:e="D";break;case v.DATETIME:e="H";break;case v.DECIMAL:e="F",t={"sk-precision":Number(i.precision)};break;case v.BOOLEAN:e="S",n=!0,o=i.value?"S":"N";break;case v.ENTITY:t={"sk-entity-name":i.entityName,"sk-allow-show-hierarchical-mode":i.hierarchyEntity,"sk-data-type":"S"},i.hierarchyEntity&&i.entityPK&&(s=i.entityPK),o=i.value?Number(i.value):null;break;case v.OPTIONS:e="O";let r=i.options.split(";").map((function(i,t){let s,e;if(i.indexOf("=")>-1){let t=i.split("=");s=t[0],e=t[1]}else s=t+1,e=i;return{data:s,value:e}}));t={"sk-options":r}}return{description:i.label,required:"true"==i.required,fieldName:i.name,fieldNameOri:i.name,entityPK:s,paramType:i.paramType,type:e,isCheckbox:n,saveLast:i.saveLast,fieldProp:t,value:o,isGeneratedName:i.isGeneratedName}}putParamsOnExecSource(i,t){t.params={param:[]},i.forEach((i=>{if(i.isGeneratedName&&i.value)throw new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.emptyParamName",void 0));r.isEmpty(i.value)||t.params.param.push({type:this.getParamDataType(i.paramType),paramName:i.fieldName,$:this.getParamValue(i)})}))}getParamDataType(i){let t;switch(i){case"D":t="F";break;case"DT":case"DH":t="D";break;case"B":case"ENTITY":case"SO":t="S";break;default:t=i}return t}getParamValue(i){let t=i.value;return t?("DT"==i.paramType?t=d.formatDate(t):"DH"==i.paramType&&(t=d.formatDateTime(t)),t):t}async loadLastValues(i){const t=await this.buildResourceId(i.actionID);return new Promise(((i,s)=>{if(this._lastValuesCache[t])i(this._lastValuesCache[t]);else{const e={config:{chave:t,tipo:"T"}};f.get().callServiceBroker("SystemUtilsSP.getConf",e).then((s=>{var e,n;let o;(null===(n=null===(e=s.config)||void 0===e?void 0:e.data)||void 0===n?void 0:n.params)&&(o=s.config.data.params,Array.isArray(o.param)||(o.param=[o.param])),this._lastValuesCache[t]=o,i(o)})).catch((i=>{s(i)}))}}))}async saveLastValues(i,t){if(this._application){let s={params:{param:[]}};t.forEach((i=>{"true"==i.saveLast&&s.params.param.push({paramName:i.fieldName,$:i.value})}));const e=await this.buildResourceId(i.actionID);this._lastValuesCache[e]=s.params,this._application.saveConfig(e,s)}}async buildResourceId(i){return this._appResourceId+".actionconfig."+i}async prepareAndExecute(i,t){this.addRows(i),await t(i)}addRows(i){const t=this.getPrimaryKeys(),s={row:[]},e=this._selectedRows;for(const i in e){const n=e[i],o={};n.hasOwnProperty(E)&&(o.master="S",o.entityName=n.__ENTITY_NAME__,delete n[E],delete n.__ENTITY_NAME__),o.field||(o.field=[]);for(const i of t)o.field.push({fieldName:i,$:n[i]});s.row.push(o)}s.row.length>0&&(i.rows=s)}recordsReloader(i){switch(i){case O.NONE:break;case O.PARENT:case O.MASTER:case O.ALL:this._dataUnit.loadData();break;default:this._dataUnit.reloadCurrentRecord()}}buildVirtualPage(){var i,t,s,e;if(null===(t=null===(i=this._dataUnit)||void 0===i?void 0:i.getSelectionInfo())||void 0===t?void 0:t.isAllRecords())return{filters:{filters:null===(s=this._dataUnit)||void 0===s?void 0:s.getAppliedFilters()},orders:{orders:null===(e=this._dataUnit)||void 0===e?void 0:e.getSort()}}}}class T{async clientConfirm(i,t){return new Promise((s=>{var e,n;const r=o.getContextValue("__SNK__APPLICATION__");let a="";i.content.event.hasOwnProperty("stpCall")?(t.requestBody=i.content.event.stpCall,a=P.PROCEDURE):i.content.event.hasOwnProperty("runScript")?(t.requestBody=i.content.event.runScript,a=P.JAVASCRIPT):i.content.event.hasOwnProperty("javaCall")&&(t.requestBody=i.content.event.javaCall,a=P.JAVA);let l={type:"S",sequence:i.content.event.sequence};t.requestBody.params?Array.isArray(t.requestBody.params.param)||(t.requestBody.params.param=[t.requestBody.params.param]):t.requestBody.params={param:[]},t.requestBody.params.param.push(l);const c=i.content.event.title.$,d=i.content.event.message.$;let h;switch(a){case P.JAVASCRIPT:h={runScript:t.requestBody};break;case P.PROCEDURE:h={requestBody:{stpCall:t.requestBody}};break;case P.JAVA:h={requestBody:{javaCall:t.requestBody}}}if("S"==i.content.event.showNoOption){l.paramName="__ESCOLHA_SIMNAO__";const i=document.createElement("snk-client-confirm");window.document.body.appendChild(i),i.titleMessage=c,i.message=d,i.accept=async()=>{l.$="S",await t.reCall(h),s()},i.cancel=async()=>{l.$="N",await t.reCall(h),s()},i.openPopup()}else r.confirm(c,d,null,"warn",{labelCancel:null===(e=null==r?void 0:r.messagesBuilder)||void 0===e?void 0:e.getMessage("snkActionsButton.clientEvent.labelCancel"),labelConfirm:null===(n=null==r?void 0:r.messagesBuilder)||void 0===n?void 0:n.getMessage("snkActionsButton.clientEvent.labelConfirm")}).then((async i=>{i&&(l.paramName="__CONFIRMACAO__",l.$="S",await t.reCall(h),s())}))}))}}const B=class{constructor(t){i(this,t),this.CLIENT_EVENT_CONFIRM_NAME="br.com.sankhya.actionbutton.clientconfirm",this._actions=[],this.handleClick=i=>{const t=this._actions.find((t=>t.actionID==i.detail.id)),s=new I(t.type).executor;new D(s,this._dataUnit,this._resourceID).execute(Object.assign({},t)),this._showDropdown=!1},this._items=[],this._showDropdown=!1}async getActions(){const i=await h.useCacheWithService(`SnkActionsButton_${this._entityName}-${this._resourceID}`,(async()=>{var i;const t={param:{entityName:this._entityName,resourceID:this._resourceID}};return(null===(i=(await f.get().callServiceBroker("ActionButtonsSP.getActions",t)).actions)||void 0===i?void 0:i.action)||[]}),u.IN_MEMORY_CACHE);this._actions=B.parameters.isOrderActions?g.sortAlphabetically(i,"description"):i}controlDropdown(){this._showDropdown=!this._showDropdown}canShowDropdown(){var i;return this._showDropdown&&(null===(i=this._items)||void 0===i?void 0:i.length)>0}positionDropdown(){var i;const t=null===(i=this._ezButton)||void 0===i?void 0:i.getBoundingClientRect();t&&this._dropdownParent&&(this._dropdownParent.style.top=t.y+t.height+5+"px",this._dropdownParent.style.left=t.x+"px")}closeDropdown(i){const t=null==i?void 0:i.target;t&&(t.closest(".snk-actions-button")||(this._showDropdown=!1))}setEvents(){document.removeEventListener("click",this.closeDropdown.bind(this)),document.addEventListener("click",this.closeDropdown.bind(this)),document.removeEventListener("scroll",this.positionDropdown.bind(this)),document.addEventListener("scroll",this.positionDropdown.bind(this))}async componentWillLoad(){this._application=o.getContextValue("__SNK__APPLICATION__"),await this.loadParameters();const i=this._element.parentElement;this._dataUnit=null==i?void 0:i.dataUnit,this._resourceID=null==i?void 0:i.resourceID,this._entityName=this._dataUnit.name.split("/")[2],null==this._resourceID&&(this._resourceID=await k.getResourceID()),this.setEvents(),await this.getActions(),this.loadItems()}async componentDidLoad(){if(this._element&&(m.addIDInfo(this._element),this.positionDropdown(),!await this._application.hasClientEvent(this.CLIENT_EVENT_CONFIRM_NAME))){const i=new T;this._application.addClientEvent(this.CLIENT_EVENT_CONFIRM_NAME,i.clientConfirm)}}componentDidUpdate(){this.positionDropdown()}loadItems(){this._actions&&0!=this._actions.length&&this._actions.forEach((i=>{this._items.push({id:i.actionID,label:i.description})}))}getElementID(i){return{[m.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:m.getInternalIDInfo(i)}}async loadParameters(){null==B.parameters.isOrderActions&&(B.parameters.isOrderActions=await this._application.getBooleanParam("global.ordenar.acoes.personalizadas"))}render(){return t(s,null,this._actions&&this._actions.length>0&&t("div",{class:`ez-padding-left--medium snk-actions-button\n ${this.canShowDropdown()?" ez-elevation--16":""}\n `},t("ez-button",Object.assign({ref:i=>this._ezButton=i,iconName:"acao",size:"small",mode:"icon",title:this._application.messagesBuilder.getMessage("snkActionsButton.title.actions",void 0),onClick:()=>this.controlDropdown()},this.getElementID("button"))),t("div",Object.assign({ref:i=>this._dropdownParent=i,class:(this.canShowDropdown()?"snk-actions-button__dropdown--show":"snk-actions-button__dropdown")+"\n "},this.getElementID("dropdown")),this.canShowDropdown()&&t("ez-dropdown",Object.assign({items:this._items,onEzClick:i=>this.handleClick(i)},this.getElementID("dropdown"))))),this.canShowDropdown()&&t("div",Object.assign({class:"ez-scrim ez-scrim--light"},this.getElementID("ezScrim"))))}get _element(){return e(this)}};B.parameters={isOrderActions:null},B.style=".sc-snk-actions-button-h{display:flex;width:fit-content;height:fit-content}.snk-actions-button.sc-snk-actions-button{display:flex;width:fit-content;height:fit-content}.snk-actions-button__dropdown--show.sc-snk-actions-button{display:flex;flex-direction:column;position:fixed}.snk-actions-button__dropdown.sc-snk-actions-button>ez-dropdown.sc-snk-actions-button{position:relative}.snk-actions-button__dropdown.sc-snk-actions-button{display:none}";const j=class{constructor(t){i(this,t),this.configChange=n(this,"configChange",7),this.configCancel=n(this,"configCancel",7),this._orderListItems=[],this._orderPriorityList=[],this._visibleList=[],this._hiddenList=[],this._columListItems=[],this._dataChanged=!1,this._componenteInternalKey=Date.now(),this.selectedIndex=0,this.columns=void 0,this.config=void 0,this.configName=void 0,this.resourceID=void 0,this._collapsibleBoxListOrder=!0,this._collapsibleBoxListSelect=!1}getMessage(i,t){return o.getContextValue("__SNK__APPLICATION__").messagesBuilder.getMessage(i,t)}getSortableColumns(){let i=[];return this.columns.filter((i=>{var t;return r.getBooleanValue(null===(t=null==i?void 0:i.props)||void 0===t?void 0:t.get("sortable"),!0)})).forEach((t=>{var s,e;let n=null===(s=this.config)||void 0===s?void 0:s.columns.find((i=>i.name===t.name)),o={label:t.label,sort:null!==(e=null==t?void 0:t.sort)&&void 0!==e?e:b.asc.value,id:t.name};n&&(o.orderIndex=n.orderIndex,o.ascending=n.ascending),t.hidden||i.push(o)})),i}createOrderList(){let i=this.getSortableColumns();i.sort(((i,t)=>0!=i.orderIndex||0!=t.orderIndex||null==i.ascending&&null==t.ascending?null!=i.ascending&&null!=t.ascending?i.orderIndex-t.orderIndex:null!=i.ascending||null!=t.ascending?null!=i.ascending?-1:null!=t.ascending?1:0:i.orderIndex-t.orderIndex:null!=i.ascending?-1:null!=t.ascending?1:0)),this._orderListItems=i}createColumnList(){const i=this.buildVisibleGroup(),t=this.buildHiddenGroup();this.columns.forEach((s=>{const e=this.buildListItemFromColumn(s);s.hidden?t.items.push(e):i.items.push(e)})),this._columListItems=[i,t],this._visibleList=i.items,this._hiddenList=t.items,this.createOrderList()}buildVisibleGroup(){return{group:this.getMessage("snkGridConfig.group.visible"),items:[]}}buildHiddenGroup(){return{group:this.getMessage("snkGridConfig.group.hidden"),items:[],sort:b.asc.value}}createOrderListSlotDataElementId(i){return`${this._element.getAttribute(m.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_configItem_${r.toCamelCase(i.label)}`}buildOrderListSlot(i){const s=this.createOrderListSlotDataElementId(i);let e=b.none.value;return null!=(null==i?void 0:i.ascending)&&(e=1==i.ascending?b.asc.value:b.desc.value),t("snk-select-box",{selectedOption:e,key:"snk-select-box-"+this._componenteInternalKey+"-"+i,"data-element-id":s,onEzChange:t=>{t.stopPropagation(),this.updateOrder(t.detail,i.label)},preventAutoFocus:!0})}updateOrder(i,t){var s;this._dataChanged=!0;let e,n=[...this.columns],o=n.find((i=>i.label===t));o&&(o.sort=i.value===b.none.value?void 0:i.value),(null===(s=this._orderPriorityList)||void 0===s?void 0:s.length)>0?(this._orderPriorityList.find((i=>i.label===o.label)).sort=i,this._orderPriorityList.filter((i=>i.sort)).forEach(((i,t)=>{i.label===o.label&&(o.sortIndex=t)}))):(e=n.filter((i=>i.sort&&!0!==i.hidden)).map(((i,t)=>({label:i.label,orderIndex:t}))),e.forEach((i=>{n.find((t=>t.label===i.label)).sortIndex=i.orderIndex}))),this.columns=n}finish(){this._dataChanged?(this.updateColumns(),this._dataChanged=!1,this.closeConfig(),this.save()):this.closeConfig()}updateColumns(){this.columns=this._columListItems.flatMap((i=>i.items.map((t=>this.buildColumnFromListItem(t,i)))))}buildColumnFromListItem(i,t){const s=this.columns.find((t=>t.label===i.label));if(!s)throw new Error(`Column with label "${i.label}" not found.`);return Object.assign(Object.assign({},s),{hidden:t.group===this.getMessage("snkGridConfig.group.hidden")})}saveGridConfigOnStorage(i){x.saveGridConfig(i,this.configName,this.resourceID).then((i=>{this.configChange.emit(i),y.info(this.getMessage("snkGridConfig.info.successfullyConfigSaved"),{iconName:"check"})}))}reOrderPriorityColumns(i,t){let s=[];s=i.filter((i=>i.sort&&!0!==i.hidden)).map((i=>({label:i.label,orderIndex:0})));let e=0,n=[];return t.forEach((i=>{let t=s.find((t=>t.label===i.label));t&&(t.orderIndex=e,n.push(t),e++)})),n.length>0&&(s=n),s}save(){var i;let t;t=this.config?this.config:this.createConfigFromState(this.columns);let s,e=[];(null===(i=this._orderPriorityList)||void 0===i?void 0:i.length)>0&&(s=this.reOrderPriorityColumns(this.columns,this._orderPriorityList)),this.columns.forEach((i=>{let n=t.columns.find((t=>i.name===t.name));!0===i.hidden&&n||(n?n.width=i.width:!1===i.hidden&&(n={name:i.name,width:i.width,orderIndex:0}),n&&(i.sort?(n.ascending=i.sort.toUpperCase()===b.asc.value,s?function(i,t){if(s){let e=s.find((t=>t.label===i.label));e&&(t.orderIndex=e.orderIndex)}}(i,n):n.orderIndex=i.sortIndex):(delete n.ascending,n.orderIndex=0),n.configVersion=j.CURRENT_CONFIG_VERSION,e.push(n)))})),t.columns=e,this.saveGridConfigOnStorage(t)}createConfigFromState(i){let t={columns:[]};return i.forEach((i=>{if(!i.hidden){let s={name:i.name};i.width&&(s.width=i.width),i.sort?(s.ascending=i.sort.toUpperCase()===b.asc.value,s.orderIndex=i.sortIndex):s.orderIndex=0,s&&t.columns.push(s)}})),t}closeConfig(){if(this._dataChanged){let i={canClose:!1,labelCancel:this.getMessage("snkGridConfig.confirm.cancel"),labelConfirm:this.getMessage("snkGridConfig.confirm.save"),btnConfirmDanger:!1};y.confirm(this.getMessage("snkGridConfig.confirm.alert"),this.getMessage("snkGridConfig.confirm.msgCancel"),null,w.WARN,i).then((i=>{i?this.finish():(this._dataChanged=!1,this.configCancel.emit(),this._componenteInternalKey=Date.now())}))}else this.configCancel.emit()}handleColumnListChange(i){var t;if(i.detail){let s=null===(t=i.detail.find((i=>i.group===this.getMessage("snkGridConfig.group.visible"))))||void 0===t?void 0:t.items;s&&(this._dataChanged=!0,this._orderListItems=s)}}handleOrderListChange(i){if(i.detail){let t=i.detail;t&&(this._dataChanged=!0,this._orderPriorityList=t)}}componentWillRender(){var i;(null===(i=this.columns)||void 0===i?void 0:i.length)>0&&this.createColumnList()}componentDidLoad(){m.addIDInfo(this._element)}handleRightListChange(i){const t=this._columListItems.find((i=>i.group===this.getMessage("snkGridConfig.group.visible")));t&&t.items!=i&&(t.items=i,this._dataChanged=!0)}getListSlots(){return{RIGHT_LIST:{itemRightSlotBuilder:i=>this.buildOrderListSlot(i)}}}renderResetConfigBtn(){if(this.resourceID)return t("ez-button",{class:"padding-right--medium",label:this.getMessage("snkGridConfig.reset"),onClick:()=>this.setDefaultConfig()})}async setDefaultConfig(){var i;if(!this.resourceID)return;this._dataChanged=!0;const t=await x.getDefaultGridConfig(this.resourceID),s=null!==(i=null==t?void 0:t.columns.map((i=>i.name)))&&void 0!==i?i:[],e=this.buildVisibleGroup(),n=this.buildHiddenGroup(),o=new Map;this.columns.forEach((i=>{const t=this.buildListItemFromColumn(i);s.includes(i.name)?o.set(i.name,t):n.items.push(t)})),e.items=s.map((i=>o.get(i))).filter((i=>i)),this._columListItems=[e,n],this._visibleList=e.items,this._hiddenList=n.items,this.updateColumns(),this.createOrderList()}buildListItemFromColumn(i){var t;return{label:i.label,selected:!1,sort:null!==(t=null==i?void 0:i.sort)&&void 0!==t?t:b.asc.value,id:i.name}}render(){return t(s,null,t("div",{class:"grid-config__header"},t("div",{class:"title-container"},t("div",{class:"ez-margin-bottom--medium"},t("label",{class:"title"},this.getMessage("snkGridConfig.gridConfiguration")),t("label",{class:"subtitle"},this.getMessage("snkGridConfig.columnVisibilityOrder"))),t("div",{class:"button-close"},t("ez-button",{mode:"icon",iconName:"close",size:"medium",class:"ez-button--tertiary",onClick:()=>this.closeConfig()})))),t("div",{class:"grid-config__body"},t("ez-collapsible-box",{id:"group-select-columns",label:this.getMessage("snkGridConfig.columnsSelection"),"header-size":"medium",key:"key_group-select-columns",value:this._collapsibleBoxListSelect,onEzChange:({detail:i})=>this._collapsibleBoxListOrder=!i},t("div",{class:"grid-config__main"},t("ez-double-list",{leftList:this._hiddenList,leftTitle:this.getMessage("snkGridConfig.availableColumns"),rightList:this._visibleList,rightTitle:this.getMessage("snkGridConfig.selectedColumns"),onEzRightListChanged:({detail:i})=>this.handleRightListChange(i),emptyMessage:{LEFT_LIST:this.getMessage("snkGridConfig.emptyMensage.left"),RIGHT_LIST:this.getMessage("snkGridConfig.emptyMensage.right")},entityLabel:"coluna",entityLabelPlural:"colunas"}))),t("ez-collapsible-box",{id:"ID_group-order-columns",label:this.getMessage("snkGridConfig.dataOrdering"),"header-size":"medium",key:"KEY_group-order-columns",value:this._collapsibleBoxListOrder,onEzChange:({detail:i})=>this._collapsibleBoxListSelect=!i},t("div",{class:"grid-config__main"},t("ez-double-list",{rightList:this._orderListItems,rightTitle:this.getMessage("snkGridConfig.selectedColumns"),useOnlyRightList:!0,slotsListBuilder:this.getListSlots(),emptyMessage:{RIGHT_LIST:this.getMessage("snkGridConfig.emptyMensage.right")},entityLabel:"coluna",entityLabelPlural:"colunas"})))),t("div",{class:"grid-config__footer"},this.renderResetConfigBtn(),t("ez-button",{class:"padding-right--medium",label:this.getMessage("snkGridConfig.cancel"),onClick:()=>this.closeConfig()}),t("ez-button",{label:this.getMessage("snkGridConfig.complete"),class:"ez-button--primary",onClick:()=>this.finish()})))}static get assetsDirs(){return["../assets"]}get _element(){return e(this)}};j.CURRENT_CONFIG_VERSION=1,j.style='.sc-snk-grid-config-h{--snk-grid-config__footer--padding-top:var(--space--medium, 12px);--snk-grid-config__main--padding-right:var(--space--medium, 12px);--snk-grid-config__tabselector-container--padding:var(--space--medium, 12px);--snk-grid-config__button-close--padding-left:var(--space--medium, 12px);--snk-grid-config__title--color:var(--title--primary, #2B3A54);--snk-grid-config__title--font-family:var(--font-pattern, "Roboto");--snk-grid-config__title--font-size:var(--title--large, 20px);--snk-grid-config__title--font-weight:var(--text-weight--extra-large, 700);--snk-grid-config__subtitle--font-family:var(--font-pattern, "Roboto");--snk-grid-config__subtitle--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-family:var(--font-pattern, "Roboto");--snk-grid-config__group--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-weight:var(--text-weight--large, 600);--snk-grid-config__group--padding-bottom:var(--space-small, 6px);--snk-grid-config__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-grid-config__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-grid-config__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-grid-config__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-grid-config__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-grid-config__scrollbar--width:var(--space--small, 6px);display:flex;flex-direction:column;max-height:100%;width:100%}.grid-config__body.sc-snk-grid-config{overflow:auto}.padding-right--medium.sc-snk-grid-config{padding-right:var(--space--medium)}ez-list.sc-snk-grid-config{height:100%}.height-calc.sc-snk-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-snk-grid-config{display:flex;justify-content:flex-end;width:100%;padding-top:var(--snk-grid-config__footer--padding-top)}.hidden.sc-snk-grid-config{display:none}.tabselector-container.sc-snk-grid-config{padding:var(--snk-grid-config__tabselector-container--padding) 0}.button-close.sc-snk-grid-config{padding-left:var(--snk-grid-config__button-close--padding-left)}.title-container.sc-snk-grid-config{display:flex;justify-content:space-between;align-items:center;width:100%}.title.sc-snk-grid-config{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-grid-config__title--color);font-size:var(--snk-grid-config__title--font-size);font-family:var(--snk-grid-config__title--font-family);font-weight:var(--snk-grid-config__title--font-weight)}.subtitle.sc-snk-grid-config{color:var(--text--primary);font-size:var(--snk-grid-config__subtitle--font-size);font-family:var(--snk-grid-config__subtitle--font-family)}.grid-config__main.sc-snk-grid-config{overflow-y:auto;scrollbar-width:thin;width:100%;padding-bottom:20px;scrollbar-color:var(--snk-grid-config__scrollbar--color-clicked) var(--snk-grid-config__scrollbar--color-background)}.group-name.sc-snk-grid-config{font-family:var(--snk-grid-config__group--font-family);font-size:var(--snk-grid-config__group--font-size);font-weight:var(--snk-grid-config__group--font-weight);padding-bottom:var(--snk-grid-config__group--padding-bottom)}';const F=class{constructor(t){i(this,t),this._formConfigFetcher=new p,this.messagesBuilder=void 0,this.layoutType=C.SIDE_BY_SIDE}async save(){this._LayoutFormConfigSingleton.setConfig(this.layoutType),this._formConfigFetcher.saveLayoutFormConfig("formColCfg."+this._resourceID,{config:this.layoutType,newConfig:!0})}async componentWillLoad(){const i=o.getContextValue("__SNK__APPLICATION__");this._LayoutFormConfigSingleton=await(null==i?void 0:i.getLayoutFormConfig()),this._resourceID=await(null==i?void 0:i.getResourceID()),this.setLayoutInit()}setLayoutInit(){if(!this._LayoutFormConfigSingleton)return;const{config:i}=this._LayoutFormConfigSingleton;if(null==i)return void(this.layoutType=C.SIDE_BY_SIDE);const t=Number(i);this.layoutType=Object.values(C).includes(t)?t:C.SIDE_BY_SIDE}toggleLayout(i){this.layoutType=i}getMessage(i,t){var s;return null===(s=this.messagesBuilder)||void 0===s?void 0:s.getMessage(i,t)}render(){return t("div",{class:"ez-flex ez-flex--column"},t("div",{class:"ez-margin-bottom--small"},t("ez-check",{label:this.getMessage("snkLayoutFormConfig.cascadeLayout.label"),class:"ez-margin-bottom--small",onEzChange:()=>this.toggleLayout(C.CASCADE),value:this.layoutType===C.CASCADE}),t("snk-view-representation",{mode:C.CASCADE}),t("label",{class:"ez-label ez-margin--small ez-flex ez-text--medium"},this.getMessage("snkLayoutFormConfig.cascadeLayout.description"))),t("div",null,t("ez-check",{label:this.getMessage("snkLayoutFormConfig.sideBySideLayout.label"),class:"ez-margin-bottom--small",onEzChange:()=>this.toggleLayout(C.SIDE_BY_SIDE),value:this.layoutType===C.SIDE_BY_SIDE}),t("snk-view-representation",{mode:C.SIDE_BY_SIDE}),t("label",{class:"ez-label ez-margin--small ez-flex ez-text--medium"},this.getMessage("snkLayoutFormConfig.sideBySideLayout.description"))))}};F.style=".sc-snk-layout-form-config-h{display:block}";const G=class{constructor(t){i(this,t),this.handleNumberingConfigChanged=i=>{const t=i.detail;t&&this.applyConfiguration(t)},this.autoNumbering=!1,this.initialNumber=void 0,this.messagesBuilder=void 0,this.entityName=void 0,this.resourceID=void 0}async save(){try{if(this._savedConfig&&this._savedConfig.isAutoNumbering===this.autoNumbering&&this._savedConfig.initialNumber===this.initialNumber)return!0;const i={entityName:this.entityName,isAutoNum:this.autoNumbering,numInicial:this.initialNumber};return await this._servicesNumberingConfig.saveConfig(i),this._savedConfig={isAutoNumbering:this.autoNumbering,initialNumber:this.initialNumber},this._snkCrud&&this._snkCrud.updateNumberingConfig&&await this._snkCrud.updateNumberingConfig(this._savedConfig),!0}catch(i){return console.error("Error saving numbering config:",i),!1}}async componentWillLoad(){const i=o.getContextValue("__SNK__APPLICATION__");this.findParentSnkCrud(),this._servicesNumberingConfig=new z(i,this.resourceID),this.entityName&&await this.loadNumberingConfiguration()}findParentSnkCrud(){const i=this._element.closest("snk-crud");i&&(this._snkCrud=i,this._snkCrud.addEventListener("numberingConfigChanged",this.handleNumberingConfigChanged.bind(this)))}async loadNumberingConfiguration(){try{const i=await this.tryGetConfigFromSnkCrud();if(i)return void this.applyConfiguration(i);const t=await this.loadConfigFromService();this.applyConfiguration(t),await this.updateSnkCrudConfig(t)}catch(i){console.error("Error loading numbering config:",i),this.setDefaultConfiguration()}}async tryGetConfigFromSnkCrud(){if(!this._snkCrud)return null;try{const i=await this._snkCrud.getNumberingConfig();if(i)return i}catch(i){console.log("snk-crud não tem configuração ainda, carregando diretamente...")}return null}async loadConfigFromService(){return await this._servicesNumberingConfig.getConfig(this.entityName)}applyConfiguration(i){this._savedConfig=i,this.autoNumbering=i.isAutoNumbering,this.initialNumber=i.initialNumber}async updateSnkCrudConfig(i){if(this._snkCrud)try{await this._snkCrud.updateNumberingConfig(i)}catch(i){console.warn("Erro ao atualizar configuração no snk-crud:",i)}}setDefaultConfiguration(){this.autoNumbering=!1,this.initialNumber=null}getMessage(i,t){var s;return null===(s=this.messagesBuilder)||void 0===s?void 0:s.getMessage(i,t)}disconnectedCallback(){this._snkCrud&&this._snkCrud.removeEventListener("numberingConfigChanged",this.handleNumberingConfigChanged)}render(){return t("div",{class:"ez-flex ez-flex--column"},t("ez-check",{mode:"SWITCH",label:this.getMessage("snkNumberingConfig.labelAutoNumbering"),class:"ez-margin-bottom--medium",onEzChange:({detail:i})=>this.autoNumbering=i,value:this.autoNumbering}),t("ez-number-input",{label:this.getMessage("snkNumberingConfig.labelInitialNumber"),onEzChange:({detail:i})=>this.initialNumber=i,value:this.initialNumber,precision:0,prettyPrecision:0,allowNegative:!1,enabled:this.autoNumbering}))}get _element(){return e(this)}};G.style=".sc-snk-numbering-config-h{display:block}";const R=class{constructor(t){i(this,t),this.ezChange=n(this,"ezChange",7),this.selectedOption=b.none,this.preventAutoFocus=!1}render(){return t("ez-combo-box",{class:"grid-config-combo ez-input--inverted",label:"",suppressSearch:!0,value:this.selectedOption,enabled:!0,canShowError:!1,suppressEmptyOption:!0,preventAutoFocus:this.preventAutoFocus},Object.keys(b).map((i=>t("option",{value:b[i].value},b[i].label))))}static get assetsDirs(){return["../assets"]}};R.style="ez-combo-box{width:100px;--ez-text-input__margin-bottom:0px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";const M=class{constructor(t){i(this,t),this.snkConfigSaved=n(this,"snkConfigSaved",7),this._formConfigFetcher=new p,this.fieldsToSave=[],this.dataUnit=void 0,this.configName=void 0,this.messagesBuilder=void 0,this.avaliableFields=[],this.selectedFields=[]}async show(){var i;await(null===(i=this.ezDoubleListRef)||void 0===i?void 0:i.resetSelectedLists()),await this.initializeFormConfig(),this.ezPopupRef.opened=!0}async initializeFormConfig(){if(!this.configName)return;const i=this.getAllVisibleFieldsFromDataUnit(),t=await this.getConfig();if(0===t.length)return this.avaliableFields=[],this.selectedFields=[...i],void(this.fieldsToSave=[...this.selectedFields]);const s=this.sortDisplayedFields(t,i),e=i.filter((i=>!t.includes(i.id)));this.avaliableFields=[...e],this.selectedFields=[...s],this.fieldsToSave=[...this.selectedFields]}async getConfig(){const i=await this._formConfigFetcher.fetchSimpleFormConfig(this.configName);return[...this.removeDuplicates(i)]}getMessage(i,t){var s;return null===(s=this.messagesBuilder)||void 0===s?void 0:s.getMessage(i,t)}removeDuplicates(i){return i.filter(((t,s)=>i.indexOf(t)===s))}sortDisplayedFields(i,t){const s=[];return i.forEach((i=>{const e=t.find((t=>t.id===i));e&&s.push(e)})),s}getAllVisibleFieldsFromDataUnit(){var i,t,s;return(null!==(s=null===(t=null===(i=this.dataUnit)||void 0===i?void 0:i.metadata)||void 0===t?void 0:t.fields)&&void 0!==s?s:[]).filter((i=>i.visible)).map((i=>({id:i.name,label:i.label})))}close(){this.ezPopupRef.opened=!1}async handleResetConfigs(){await this._formConfigFetcher.restoreFormConfig(this.configName),await this.initializeFormConfig(),await this.handleSave()}handleCancel(){this.close()}async handleSave(){const i=this.fieldsToSave.map((i=>i.id));await this._formConfigFetcher.saveSimpleFormConfig(this.configName,i),this.close(),this.snkConfigSaved.emit()}render(){return t("ez-popup",{ref:i=>this.ezPopupRef=i,heightMode:"auto",size:"medium",ezTitle:this.getMessage("snkSimpleFormConfig.popup.title")},t("div",{class:"config-container"},t("div",{class:"config-lists"},t("ez-double-list",{ref:i=>this.ezDoubleListRef=i,leftList:this.avaliableFields,leftTitle:this.getMessage("snkSimpleFormConfig.lists.availableFields"),rightList:this.selectedFields,rightTitle:this.getMessage("snkSimpleFormConfig.lists.selectedFields"),onEzRightListChanged:({detail:i})=>this.fieldsToSave=[...i],entityLabel:this.getMessage("snkSimpleFormConfig.lists.entityLabel"),entityLabelPlural:this.getMessage("snkSimpleFormConfig.lists.entityLabelPlural")})),t("div",{class:"config-actions"},t("ez-button",{label:this.getMessage("snkSimpleFormConfig.buttons.restore"),onClick:this.handleResetConfigs.bind(this),size:"small"}),t("ez-button",{label:this.getMessage("snkSimpleFormConfig.buttons.cancel"),onClick:this.handleCancel.bind(this),size:"small"}),t("ez-button",{label:this.getMessage("snkSimpleFormConfig.buttons.save"),class:"ez-button--primary",onClick:this.handleSave.bind(this),size:"small"}))))}};M.style=":host{display:block}.config-container{display:flex;flex-direction:column;align-items:center;justify-content:space-between}.config-lists{width:100%;margin-bottom:12px}.config-actions{display:flex;flex-direction:row;justify-content:flex-end;width:100%;gap:12px}";const H=class{constructor(t){i(this,t),this.mode=C.SIDE_BY_SIDE}renderCascadeLayout(){return t("div",{class:"svg-container__collumn"},[...Array(3)].map((()=>t("div",{class:"svg-container__section"},t("div",{class:"svg-container__line svg-container__line--short"}),t("div",{class:"svg-container__line svg-container__line--long"})))))}renderSideBySideLayout(){return t("div",{class:"svg-container__inline"},[...Array(2)].map((()=>this.renderCascadeLayout())))}render(){return t("div",{class:"svg-container ez-margin-left--small"},t("div",{class:"svg-container__background"},t("div",{class:"svg-container__header"},t("div",{class:"svg-container__circle svg-container__circle--red"}),t("div",{class:"svg-container__circle svg-container__circle--yellow"}),t("div",{class:"svg-container__circle svg-container__circle--green"})),this.mode===C.CASCADE?this.renderCascadeLayout():this.renderSideBySideLayout()))}};H.style=".sc-snk-view-representation-h{display:block}.svg-container.sc-snk-view-representation{display:flex;width:185px;height:125px;border-radius:8px;background-color:#f7f7f7;padding:10px 12px;box-sizing:border-box;position:relative}.svg-container__background.sc-snk-view-representation{display:flex;flex-direction:column;width:100%}.svg-container__header.sc-snk-view-representation{display:flex;gap:2px;margin-bottom:12px}.svg-container__circle.sc-snk-view-representation{width:9px;height:9px;border-radius:50%}.svg-container__circle--red.sc-snk-view-representation{background-color:#ed7678}.svg-container__circle--yellow.sc-snk-view-representation{background-color:#eddb76}.svg-container__circle--green.sc-snk-view-representation{background-color:#7ad08e}.svg-container__section.sc-snk-view-representation{width:100%}.svg-container__collumn.sc-snk-view-representation{width:100%;display:flex;flex-direction:column}.svg-container__inline.sc-snk-view-representation{display:flex;flex-direction:row;gap:6px}.svg-container__line.sc-snk-view-representation{height:13px;border-radius:4px;background-color:#d9d9d9;margin-bottom:4px}.svg-container__line--short.sc-snk-view-representation{width:39.68px;height:7px;border-radius:3.5px}.svg-container__line--long.sc-snk-view-representation{width:100%}";const K=class{constructor(t){i(this,t),this.taskbarActionSelected=n(this,"taskbarActionSelected",7),this.taskbarActionsOpened=n(this,"taskbarActionsOpened",7),this.taskbarActionsButtonDisconnected=n(this,"taskbarActionsButtonDisconnected",7),this._showDropdown=!1,this.title=void 0,this.enabled=void 0,this.actions=void 0}async handleKeyDown(i){"Escape"!==i.key&&"Esc"!==i.key||await this.hideActions()}async handleClose(){await this.hideActions()}async showActions(){this._showDropdown=!0,requestAnimationFrame((()=>{this._element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}))}async hideActions(){this._showDropdown=!1}async isOpened(){return this._showDropdown}controlDropdown(){this._showDropdown=!this._showDropdown}loadItems(){return this.actions.filter((i=>void 0!==i)).map((i=>{var t;return{id:i.value,label:i.label,value:i.value,type:null!==(t=i.type)&&void 0!==t?t:"item",children:i.children,iconName:i.iconName,subAction:i.subAction,group:i.group,disableCloseOnSelect:i.disableCloseOnSelect}}))}canShowDropdown(){var i;return this._showDropdown&&(null===(i=this.actions)||void 0===i?void 0:i.length)>0}onSelectAction(i){const t=this.actions.map((i=>Object.assign(Object.assign({},i),{id:i.value}))),s=this.getSelectedAction(i.id,t);this.taskbarActionSelected.emit(s),s.disableCloseOnSelect||(this._showDropdown=!1)}getSelectedAction(i,t){let s=null;for(const e of t){if(e.id===i){s=e;break}if((null==e?void 0:e.children)&&(s=this.getSelectedAction(i,e.children),s))break}return s}dropdownItemBuilder(i,s){const e=this.actions.find((t=>t.value===i.id));if(!e||!e.itemBuilder)return;const n=e.itemBuilder(this._element,e);return"string"==typeof n?t("div",{innerHTML:n}):n}initializeEagerItems(){var i;null===(i=this.actions)||void 0===i||i.forEach((i=>{var t;i&&i.eagerInitialize&&i.itemBuilder&&(null===(t=i.itemBuilder)||void 0===t||t.call(i,this._element,i))}))}componentDidLoad(){this.initializeEagerItems()}componentDidRender(){this._showDropdown&&this.taskbarActionsOpened.emit(this._element)}disconnectedCallback(){this.taskbarActionsButtonDisconnected.emit()}render(){return t(s,null,t("div",{class:(this.canShowDropdown()?" ez-elevation--16":"")+" ez-dropdown-container"},t("ez-button",{title:this.title,mode:"icon",iconName:"dots-vertical",size:"small",enabled:this.enabled,onClick:()=>this.controlDropdown()}),this.canShowDropdown()&&t("ez-dropdown",{class:"ez-dropdown--sticky",items:this.loadItems(),onEzClick:i=>this.onSelectAction(i.detail),onEzOutsideClick:()=>this._showDropdown=!1,itemBuilder:(i,t)=>this.dropdownItemBuilder(i,t)})))}get _element(){return e(this)}};K.style=".sc-taskbar-actions-button-h{--ez-dropdown--min-width:150px;display:flex;width:fit-content;height:fit-content}.ez-dropdown-container.sc-taskbar-actions-button{position:relative;display:inline-block}.ez-dropdown--sticky.sc-taskbar-actions-button{position:absolute;display:block;min-width:var(--ez-dropdown--min-width)}";const $=class{constructor(t){i(this,t),this._showDropdown=!1,this.iconName=void 0,this.action=void 0,this.name=void 0,this.className=void 0,this.dataElementId=void 0,this.title=void 0,this.enabled=void 0,this.actions=void 0}initializeEagerItems(){var i;null===(i=this.actions)||void 0===i||i.forEach((i=>{var t;i&&i.eagerInitialize&&i.itemBuilder&&(null===(t=i.itemBuilder)||void 0===t||t.call(i,this._splitButtonRef,i))}))}componentDidLoad(){this.initializeEagerItems()}dropdownItemBuilder(i,s){const e=this.actions.find((t=>t.value===i.id));if(!e||!e.itemBuilder)return;const n=e.itemBuilder(this._splitButtonRef,e);return"string"==typeof n?t("div",{innerHTML:n}):n}loadItems(){return this.actions.filter((i=>void 0!==i)).map((i=>{var t;return{id:i.value,label:i.label,value:i.value,type:null!==(t=i.type)&&void 0!==t?t:"item",children:i.children,iconName:i.iconName,subAction:i.subAction,group:i.group,disableCloseOnSelect:i.disableCloseOnSelect}}))}render(){return t(s,null,t("ez-split-button",{ref:i=>this._splitButtonRef=i,key:this.dataElementId,class:`${this.className} "ez-split-button--tertiary ez-padding--medium"`,items:this.loadItems(),mode:"icon-only",iconName:this.iconName,enabled:this.enabled,show:this._showDropdown,onButtonClick:()=>this.action(this.name),itemBuilder:(i,t)=>this.dropdownItemBuilder(i,t)}))}};$.style="";export{B as snk_actions_button,j as snk_grid_config,F as snk_layout_form_config,G as snk_numbering_config,R as snk_select_box,M as snk_simple_form_config,H as snk_view_representation,K as taskbar_actions_button,$ as taskbar_split_button}
1
+ import{r as i,h as t,H as s,g as e,c as n}from"./p-d8d8169b.js";import{ApplicationContext as o,StringUtils as r,ErrorException as a,WarningException as l,ObjectUtils as c,DateUtils as d,ServiceUtils as h,StorageType as u,ArrayUtils as g,ElementIDUtils as m}from"@sankhyalabs/core";import{D as f}from"./p-ccd1ab5b.js";import{P as v}from"./p-eaad0aa8.js";import"./p-328236dd.js";import"./p-0f3698af.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-50dd4ef8.js";import"./p-ff1990ad.js";import{F as p}from"./p-02459408.js";import{O as b}from"./p-9019a32f.js";import{g as _}from"./p-7dd49d15.js";import{R as k}from"./p-688dcb4c.js";import{ApplicationUtils as y,DialogType as w,FormLayout as C}from"@sankhyalabs/ezui/dist/collection/utils";import{C as x}from"./p-4157ea10.js";import{S as z}from"./p-cad964b5.js";import"./p-8d884fab.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";class S{execute(i){var t;const s={actionID:i.actionID,refreshType:null===(t=i.actionConfig.javaCall)||void 0===t?void 0:t.refreshType};return new Promise((i=>{i({execSource:s,callback:this.callExecJava})}))}async callExecJava(i){const t={requestBody:{javaCall:i}};await f.get().callServiceBroker("ActionButtonsSP.executeJava",JSON.stringify(t))}}class L{execute(i){var t;const s={actionID:i.actionID,refreshType:null===(t=i.actionConfig.runScript)||void 0===t?void 0:t.refreshType};return new Promise((i=>{i({execSource:s,callback:this.callExecScript})}))}async callExecScript(i){const t={runScript:i};await f.get().callServiceBroker("ActionButtonsSP.executeScript",t)}}class A{constructor(){this._application=o.getContextValue("__SNK__APPLICATION__")}async execute(i,t){const s=i.resourceID;if(!s)return;let e=await this.buildLaunchObject(i,t);return this._application.openApp(s,e),null}buildLaunchObject(i,t){return new Promise((s=>{let e=i.actionConfig.params.param;if(e&&e.length>0){let n={},o=[];e.forEach((s=>{const e=s.localField;let l=t.getFieldValue(e);if(!l){let s=t.getField(e).label;throw s=r.isEmpty(t.getField(e).label)?e:s,new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.launchScreen.emptyField",{description:i.description,localFieldLabel:s}))}l=r.isEmpty(l.toString())?void 0:l.toString(),n[s.targetField]=l,o.push({fieldName:s.targetField,value:l})})),n.ACTION_PARAMETERS=o,n.call_time=Date.now(),s(n)}s(null)}))}}class N{execute(i){var t,s,e;const n=null===(t=i.actionConfig.dbCall)||void 0===t?void 0:t.name,o=null===(s=i.actionConfig.dbCall)||void 0===s?void 0:s.rootEntity,r={actionID:i.actionID,refreshType:null===(e=i.actionConfig.dbCall)||void 0===e?void 0:e.refreshType,procName:n,rootEntity:o};return new Promise((i=>{i({execSource:r,callback:this.callExecProcedure})}))}async callExecProcedure(i){const t={requestBody:{stpCall:i}};await f.get().callServiceBroker("ActionButtonsSP.executeSTP",JSON.stringify(t))}}var P,O;!function(i){i.LAUNCH_SCREEN="LC",i.JAVASCRIPT="SC",i.JAVA="RJ",i.PROCEDURE="SP",i.EMBEDDED="EB"}(P||(P={}));class I{constructor(i){this.actionType=i,this._application=o.getContextValue("__SNK__APPLICATION__")}get executor(){switch(this.actionType){case P.LAUNCH_SCREEN:return new A;case P.JAVASCRIPT:return new L;case P.JAVA:return new S;case P.PROCEDURE:return new N;default:throw new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.nonExistentType",{actionType:this.actionType}))}}}!function(i){i.NONE="NONE",i.PARENT="PARENT",i.MASTER="MASTER",i.ALL="ALL"}(O||(O={}));const E="__MASTER_ROW__";class D{constructor(i,t,s){var e;this._lastValuesCache={},this._actionsExecuteInterface=i,this._dataUnit=t,this._selectedRows=(null===(e=null==t?void 0:t.getSelectionInfo())||void 0===e?void 0:e.isAllRecords())?[]:null==t?void 0:t.getSelectionInfo().records,this._application=o.getContextValue("__SNK__APPLICATION__"),this._appResourceId=s}getPrimaryKeys(){return _(this._dataUnit).map((({name:i})=>i))}apply(i,t){this._application.closePopUp(),this._actionsExecuteInterface.execute(i,this._dataUnit).then((({execSource:s,callback:e})=>{this.resolvePromptParams(i,s,t).then((()=>{this.actionExecute(s,e)}))}))}async execute(i){var t;if(!i.actionConfig)throw new l(this._application.messagesBuilder.getMessage("snkActionsButton.title.warning",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.incorrectAction",{description:i.description}));if(null===(t=i.actionConfig.params)||void 0===t?void 0:t.promptParam){const t=i.actionConfig.params.promptParam;let s=!1;for(let i=0;i<t.length;i++)if(!s&&"true"===t[i].saveLast){s=!0;break}s&&(i.actionConfig.params.promptParam=await this.loadSavedValuesIntoParams(i));const e=document.createElement("snk-actions-form");window.document.body.appendChild(e),e.action=c.copy(i),e.applyParameters=i=>{this.apply(i,s)},e.openPopup()}else i.type!=P.LAUNCH_SCREEN?this._actionsExecuteInterface.execute(i,this._dataUnit).then((({execSource:i,callback:t})=>{this.actionExecute(i,t)})):this._actionsExecuteInterface.execute(i,this._dataUnit)}loadSavedValuesIntoParams(i){return this.loadLastValues(i).then((t=>{let s=i.actionConfig.params.promptParam;return t&&t.param.forEach((i=>{s=s.map((t=>t.name!==i.paramName?t:Object.assign(Object.assign({},t),"B"===t.paramType?{value:"S"===i.$}:{value:i.$})))})),s}))}async actionExecute(i,t){i.virtualPage=this.buildVirtualPage(),await this.prepareAndExecute(i,t),this.recordsReloader(i.refreshType)}resolvePromptParams(i,t,s){return new Promise((e=>{let n=[];i.actionConfig.params.promptParam.forEach((i=>{n.push(this.buildPromptParam(i))})),this.putParamsOnExecSource(n,t),s&&this.saveLastValues(i,n),e()}))}buildPromptParam(i){let t,s,e=i.paramType,n=!1,o=i.value;switch(e){case v.DATE:e="D";break;case v.DATETIME:e="H";break;case v.DECIMAL:e="F",t={"sk-precision":Number(i.precision)};break;case v.BOOLEAN:e="S",n=!0,o=i.value?"S":"N";break;case v.ENTITY:t={"sk-entity-name":i.entityName,"sk-allow-show-hierarchical-mode":i.hierarchyEntity,"sk-data-type":"S"},i.hierarchyEntity&&i.entityPK&&(s=i.entityPK),o=i.value?Number(i.value):null;break;case v.OPTIONS:e="O";let r=i.options.split(";").map((function(i,t){let s,e;if(i.indexOf("=")>-1){let t=i.split("=");s=t[0],e=t[1]}else s=t+1,e=i;return{data:s,value:e}}));t={"sk-options":r}}return{description:i.label,required:"true"==i.required,fieldName:i.name,fieldNameOri:i.name,entityPK:s,paramType:i.paramType,type:e,isCheckbox:n,saveLast:i.saveLast,fieldProp:t,value:o,isGeneratedName:i.isGeneratedName}}putParamsOnExecSource(i,t){t.params={param:[]},i.forEach((i=>{if(i.isGeneratedName&&i.value)throw new a(this._application.messagesBuilder.getMessage("snkActionsButton.title.error",void 0),this._application.messagesBuilder.getMessage("snkActionsButton.action.emptyParamName",void 0));r.isEmpty(i.value)||t.params.param.push({type:this.getParamDataType(i.paramType),paramName:i.fieldName,$:this.getParamValue(i)})}))}getParamDataType(i){let t;switch(i){case"D":t="F";break;case"DT":case"DH":t="D";break;case"B":case"ENTITY":case"SO":t="S";break;default:t=i}return t}getParamValue(i){let t=i.value;return t?("DT"==i.paramType?t=d.formatDate(t):"DH"==i.paramType&&(t=d.formatDateTime(t)),t):t}async loadLastValues(i){const t=await this.buildResourceId(i.actionID);return new Promise(((i,s)=>{if(this._lastValuesCache[t])i(this._lastValuesCache[t]);else{const e={config:{chave:t,tipo:"T"}};f.get().callServiceBroker("SystemUtilsSP.getConf",e).then((s=>{var e,n;let o;(null===(n=null===(e=s.config)||void 0===e?void 0:e.data)||void 0===n?void 0:n.params)&&(o=s.config.data.params,Array.isArray(o.param)||(o.param=[o.param])),this._lastValuesCache[t]=o,i(o)})).catch((i=>{s(i)}))}}))}async saveLastValues(i,t){if(this._application){let s={params:{param:[]}};t.forEach((i=>{"true"==i.saveLast&&s.params.param.push({paramName:i.fieldName,$:i.value})}));const e=await this.buildResourceId(i.actionID);this._lastValuesCache[e]=s.params,this._application.saveConfig(e,s)}}async buildResourceId(i){return this._appResourceId+".actionconfig."+i}async prepareAndExecute(i,t){this.addRows(i),await t(i)}addRows(i){const t=this.getPrimaryKeys(),s={row:[]},e=this._selectedRows;for(const i in e){const n=e[i],o={};n.hasOwnProperty(E)&&(o.master="S",o.entityName=n.__ENTITY_NAME__,delete n[E],delete n.__ENTITY_NAME__),o.field||(o.field=[]);for(const i of t)o.field.push({fieldName:i,$:n[i]});s.row.push(o)}s.row.length>0&&(i.rows=s)}recordsReloader(i){switch(i){case O.NONE:break;case O.PARENT:case O.MASTER:case O.ALL:this._dataUnit.loadData();break;default:this._dataUnit.reloadCurrentRecord()}}buildVirtualPage(){var i,t,s,e;if(null===(t=null===(i=this._dataUnit)||void 0===i?void 0:i.getSelectionInfo())||void 0===t?void 0:t.isAllRecords())return{filters:{filters:null===(s=this._dataUnit)||void 0===s?void 0:s.getAppliedFilters()},orders:{orders:null===(e=this._dataUnit)||void 0===e?void 0:e.getSort()}}}}class T{async clientConfirm(i,t){return new Promise((s=>{var e,n;const r=o.getContextValue("__SNK__APPLICATION__");let a="";i.content.event.hasOwnProperty("stpCall")?(t.requestBody=i.content.event.stpCall,a=P.PROCEDURE):i.content.event.hasOwnProperty("runScript")?(t.requestBody=i.content.event.runScript,a=P.JAVASCRIPT):i.content.event.hasOwnProperty("javaCall")&&(t.requestBody=i.content.event.javaCall,a=P.JAVA);let l={type:"S",sequence:i.content.event.sequence};t.requestBody.params?Array.isArray(t.requestBody.params.param)||(t.requestBody.params.param=[t.requestBody.params.param]):t.requestBody.params={param:[]},t.requestBody.params.param.push(l);const c=i.content.event.title.$,d=i.content.event.message.$;let h;switch(a){case P.JAVASCRIPT:h={runScript:t.requestBody};break;case P.PROCEDURE:h={requestBody:{stpCall:t.requestBody}};break;case P.JAVA:h={requestBody:{javaCall:t.requestBody}}}if("S"==i.content.event.showNoOption){l.paramName="__ESCOLHA_SIMNAO__";const i=document.createElement("snk-client-confirm");window.document.body.appendChild(i),i.titleMessage=c,i.message=d,i.accept=async()=>{l.$="S",await t.reCall(h),s()},i.cancel=async()=>{l.$="N",await t.reCall(h),s()},i.openPopup()}else r.confirm(c,d,null,"warn",{labelCancel:null===(e=null==r?void 0:r.messagesBuilder)||void 0===e?void 0:e.getMessage("snkActionsButton.clientEvent.labelCancel"),labelConfirm:null===(n=null==r?void 0:r.messagesBuilder)||void 0===n?void 0:n.getMessage("snkActionsButton.clientEvent.labelConfirm")}).then((async i=>{i&&(l.paramName="__CONFIRMACAO__",l.$="S",await t.reCall(h),s())}))}))}}const B=class{constructor(t){i(this,t),this.CLIENT_EVENT_CONFIRM_NAME="br.com.sankhya.actionbutton.clientconfirm",this._actions=[],this.handleClick=i=>{const t=this._actions.find((t=>t.actionID==i.detail.id)),s=new I(t.type).executor;new D(s,this._dataUnit,this._resourceID).execute(Object.assign({},t)),this._showDropdown=!1},this._items=[],this._showDropdown=!1}async getActions(){const i=await h.useCacheWithService(`SnkActionsButton_${this._entityName}-${this._resourceID}`,(async()=>{var i;const t={param:{entityName:this._entityName,resourceID:this._resourceID}};return(null===(i=(await f.get().callServiceBroker("ActionButtonsSP.getActions",t)).actions)||void 0===i?void 0:i.action)||[]}),u.IN_MEMORY_CACHE);this._actions=B.parameters.isOrderActions?g.sortAlphabetically(i,"description"):i}controlDropdown(){this._showDropdown=!this._showDropdown}canShowDropdown(){var i;return this._showDropdown&&(null===(i=this._items)||void 0===i?void 0:i.length)>0}positionDropdown(){var i;const t=null===(i=this._ezButton)||void 0===i?void 0:i.getBoundingClientRect();t&&this._dropdownParent&&(this._dropdownParent.style.top=t.y+t.height+5+"px",this._dropdownParent.style.left=t.x+"px")}closeDropdown(i){const t=null==i?void 0:i.target;t&&(t.closest(".snk-actions-button")||(this._showDropdown=!1))}setEvents(){document.removeEventListener("click",this.closeDropdown.bind(this)),document.addEventListener("click",this.closeDropdown.bind(this)),document.removeEventListener("scroll",this.positionDropdown.bind(this)),document.addEventListener("scroll",this.positionDropdown.bind(this))}async componentWillLoad(){this._application=o.getContextValue("__SNK__APPLICATION__"),await this.loadParameters();const i=this._element.parentElement;this._dataUnit=null==i?void 0:i.dataUnit,this._resourceID=null==i?void 0:i.resourceID,this._entityName=this._dataUnit.name.split("/")[2],null==this._resourceID&&(this._resourceID=await k.getResourceID()),this.setEvents(),await this.getActions(),this.loadItems()}async componentDidLoad(){if(this._element&&(m.addIDInfo(this._element),this.positionDropdown(),!await this._application.hasClientEvent(this.CLIENT_EVENT_CONFIRM_NAME))){const i=new T;this._application.addClientEvent(this.CLIENT_EVENT_CONFIRM_NAME,i.clientConfirm)}}componentDidUpdate(){this.positionDropdown()}loadItems(){this._actions&&0!=this._actions.length&&this._actions.forEach((i=>{this._items.push({id:i.actionID,label:i.description})}))}getElementID(i){return{[m.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:m.getInternalIDInfo(i)}}async loadParameters(){null==B.parameters.isOrderActions&&(B.parameters.isOrderActions=await this._application.getBooleanParam("global.ordenar.acoes.personalizadas"))}render(){return t(s,null,this._actions&&this._actions.length>0&&t("div",{class:`ez-padding-left--medium snk-actions-button\n ${this.canShowDropdown()?" ez-elevation--16":""}\n `},t("ez-button",Object.assign({ref:i=>this._ezButton=i,iconName:"acao",size:"small",mode:"icon",title:this._application.messagesBuilder.getMessage("snkActionsButton.title.actions",void 0),onClick:()=>this.controlDropdown()},this.getElementID("button"))),t("div",Object.assign({ref:i=>this._dropdownParent=i,class:(this.canShowDropdown()?"snk-actions-button__dropdown--show":"snk-actions-button__dropdown")+"\n "},this.getElementID("dropdown")),this.canShowDropdown()&&t("ez-dropdown",Object.assign({items:this._items,onEzClick:i=>this.handleClick(i)},this.getElementID("dropdown"))))),this.canShowDropdown()&&t("div",Object.assign({class:"ez-scrim ez-scrim--light"},this.getElementID("ezScrim"))))}get _element(){return e(this)}};B.parameters={isOrderActions:null},B.style=".sc-snk-actions-button-h{display:flex;width:fit-content;height:fit-content}.snk-actions-button.sc-snk-actions-button{display:flex;width:fit-content;height:fit-content}.snk-actions-button__dropdown--show.sc-snk-actions-button{display:flex;flex-direction:column;position:fixed}.snk-actions-button__dropdown.sc-snk-actions-button>ez-dropdown.sc-snk-actions-button{position:relative}.snk-actions-button__dropdown.sc-snk-actions-button{display:none}";const j=class{constructor(t){i(this,t),this.configChange=n(this,"configChange",7),this.configCancel=n(this,"configCancel",7),this._orderListItems=[],this._orderPriorityList=[],this._visibleList=[],this._hiddenList=[],this._columListItems=[],this._dataChanged=!1,this._componenteInternalKey=Date.now(),this.selectedIndex=0,this.columns=void 0,this.config=void 0,this.configName=void 0,this.resourceID=void 0,this._collapsibleBoxListOrder=!0,this._collapsibleBoxListSelect=!1}getMessage(i,t){return o.getContextValue("__SNK__APPLICATION__").messagesBuilder.getMessage(i,t)}getSortableColumns(){let i=[];return this.columns.filter((i=>{var t;return r.getBooleanValue(null===(t=null==i?void 0:i.props)||void 0===t?void 0:t.get("sortable"),!0)})).forEach((t=>{var s,e;let n=null===(s=this.config)||void 0===s?void 0:s.columns.find((i=>i.name===t.name)),o={label:t.label,sort:null!==(e=null==t?void 0:t.sort)&&void 0!==e?e:b.asc.value,id:t.name};n&&(o.orderIndex=n.orderIndex,o.ascending=n.ascending),t.hidden||i.push(o)})),i}createOrderList(){let i=this.getSortableColumns();i.sort(((i,t)=>0!=i.orderIndex||0!=t.orderIndex||null==i.ascending&&null==t.ascending?null!=i.ascending&&null!=t.ascending?i.orderIndex-t.orderIndex:null!=i.ascending||null!=t.ascending?null!=i.ascending?-1:null!=t.ascending?1:0:i.orderIndex-t.orderIndex:null!=i.ascending?-1:null!=t.ascending?1:0)),this._orderListItems=i}createColumnList(){const i=this.buildVisibleGroup(),t=this.buildHiddenGroup();this.columns.forEach((s=>{const e=this.buildListItemFromColumn(s);s.hidden?t.items.push(e):i.items.push(e)})),this._columListItems=[i,t],this._visibleList=i.items,this._hiddenList=t.items,this.createOrderList()}buildVisibleGroup(){return{group:this.getMessage("snkGridConfig.group.visible"),items:[]}}buildHiddenGroup(){return{group:this.getMessage("snkGridConfig.group.hidden"),items:[],sort:b.asc.value}}createOrderListSlotDataElementId(i){return`${this._element.getAttribute(m.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_configItem_${r.toCamelCase(i.label)}`}buildOrderListSlot(i){const s=this.createOrderListSlotDataElementId(i);let e=b.none.value;return null!=(null==i?void 0:i.ascending)&&(e=1==i.ascending?b.asc.value:b.desc.value),t("snk-select-box",{selectedOption:e,key:"snk-select-box-"+this._componenteInternalKey+"-"+i,"data-element-id":s,onEzChange:t=>{t.stopPropagation(),this.updateOrder(t.detail,i.label)},preventAutoFocus:!0})}updateOrder(i,t){var s;this._dataChanged=!0;let e,n=[...this.columns],o=n.find((i=>i.label===t));o&&(o.sort=i.value===b.none.value?void 0:i.value),(null===(s=this._orderPriorityList)||void 0===s?void 0:s.length)>0?(this._orderPriorityList.find((i=>i.label===o.label)).sort=i,this._orderPriorityList.filter((i=>i.sort)).forEach(((i,t)=>{i.label===o.label&&(o.sortIndex=t)}))):(e=n.filter((i=>i.sort&&!0!==i.hidden)).map(((i,t)=>({label:i.label,orderIndex:t}))),e.forEach((i=>{n.find((t=>t.label===i.label)).sortIndex=i.orderIndex}))),this.columns=n}finish(){this._dataChanged?(this.updateColumns(),this._dataChanged=!1,this.closeConfig(),this.save()):this.closeConfig()}updateColumns(){this.columns=this._columListItems.flatMap((i=>i.items.map((t=>this.buildColumnFromListItem(t,i)))))}buildColumnFromListItem(i,t){const s=this.columns.find((t=>t.label===i.label));if(!s)throw new Error(`Column with label "${i.label}" not found.`);return Object.assign(Object.assign({},s),{hidden:t.group===this.getMessage("snkGridConfig.group.hidden")})}saveGridConfigOnStorage(i){x.saveGridConfig(i,this.configName,this.resourceID).then((i=>{this.configChange.emit(i),y.info(this.getMessage("snkGridConfig.info.successfullyConfigSaved"),{iconName:"check"})}))}reOrderPriorityColumns(i,t){let s=[];s=i.filter((i=>i.sort&&!0!==i.hidden)).map((i=>({label:i.label,orderIndex:0})));let e=0,n=[];return t.forEach((i=>{let t=s.find((t=>t.label===i.label));t&&(t.orderIndex=e,n.push(t),e++)})),n.length>0&&(s=n),s}save(){var i;let t;t=this.config?this.config:this.createConfigFromState(this.columns);let s,e=[];(null===(i=this._orderPriorityList)||void 0===i?void 0:i.length)>0&&(s=this.reOrderPriorityColumns(this.columns,this._orderPriorityList)),this.columns.forEach((i=>{let n=t.columns.find((t=>i.name===t.name));!0===i.hidden&&n||(n?n.width=i.width:!1===i.hidden&&(n={name:i.name,width:i.width,orderIndex:0}),n&&(i.sort?(n.ascending=i.sort.toUpperCase()===b.asc.value,s?function(i,t){if(s){let e=s.find((t=>t.label===i.label));e&&(t.orderIndex=e.orderIndex)}}(i,n):n.orderIndex=i.sortIndex):(delete n.ascending,n.orderIndex=0),n.configVersion=j.CURRENT_CONFIG_VERSION,e.push(n)))})),t.columns=e,this.saveGridConfigOnStorage(t)}createConfigFromState(i){let t={columns:[]};return i.forEach((i=>{if(!i.hidden){let s={name:i.name};i.width&&(s.width=i.width),i.sort?(s.ascending=i.sort.toUpperCase()===b.asc.value,s.orderIndex=i.sortIndex):s.orderIndex=0,s&&t.columns.push(s)}})),t}closeConfig(){if(this._dataChanged){let i={canClose:!1,labelCancel:this.getMessage("snkGridConfig.confirm.cancel"),labelConfirm:this.getMessage("snkGridConfig.confirm.save"),btnConfirmDanger:!1};y.confirm(this.getMessage("snkGridConfig.confirm.alert"),this.getMessage("snkGridConfig.confirm.msgCancel"),null,w.WARN,i).then((i=>{i?this.finish():(this._dataChanged=!1,this.configCancel.emit(),this._componenteInternalKey=Date.now())}))}else this.configCancel.emit()}handleColumnListChange(i){var t;if(i.detail){let s=null===(t=i.detail.find((i=>i.group===this.getMessage("snkGridConfig.group.visible"))))||void 0===t?void 0:t.items;s&&(this._dataChanged=!0,this._orderListItems=s)}}handleOrderListChange(i){if(i.detail){let t=i.detail;t&&(this._dataChanged=!0,this._orderPriorityList=t)}}componentWillRender(){var i;(null===(i=this.columns)||void 0===i?void 0:i.length)>0&&this.createColumnList()}componentDidLoad(){m.addIDInfo(this._element)}handleRightListChange(i){const t=this._columListItems.find((i=>i.group===this.getMessage("snkGridConfig.group.visible")));t&&t.items!=i&&(t.items=i,this._dataChanged=!0)}getListSlots(){return{RIGHT_LIST:{itemRightSlotBuilder:i=>this.buildOrderListSlot(i)}}}renderResetConfigBtn(){if(this.resourceID)return t("ez-button",{class:"padding-right--medium",label:this.getMessage("snkGridConfig.reset"),onClick:()=>this.setDefaultConfig()})}async setDefaultConfig(){var i;if(!this.resourceID)return;this._dataChanged=!0;const t=await x.getDefaultGridConfig(this.resourceID),s=null!==(i=null==t?void 0:t.columns.map((i=>i.name)))&&void 0!==i?i:[],e=this.buildVisibleGroup(),n=this.buildHiddenGroup(),o=new Map;this.columns.forEach((i=>{const t=this.buildListItemFromColumn(i);s.includes(i.name)?o.set(i.name,t):n.items.push(t)})),e.items=s.map((i=>o.get(i))).filter((i=>i)),this._columListItems=[e,n],this._visibleList=e.items,this._hiddenList=n.items,this.updateColumns(),this.createOrderList()}buildListItemFromColumn(i){var t;return{label:i.label,selected:!1,sort:null!==(t=null==i?void 0:i.sort)&&void 0!==t?t:b.asc.value,id:i.name}}render(){return t(s,null,t("div",{class:"grid-config__header"},t("div",{class:"title-container"},t("div",{class:"ez-margin-bottom--medium"},t("label",{class:"title"},this.getMessage("snkGridConfig.gridConfiguration")),t("label",{class:"subtitle"},this.getMessage("snkGridConfig.columnVisibilityOrder"))),t("div",{class:"button-close"},t("ez-button",{mode:"icon",iconName:"close",size:"medium",class:"ez-button--tertiary",onClick:()=>this.closeConfig()})))),t("div",{class:"grid-config__body"},t("ez-collapsible-box",{id:"group-select-columns",label:this.getMessage("snkGridConfig.columnsSelection"),"header-size":"medium",key:"key_group-select-columns",value:this._collapsibleBoxListSelect,onEzChange:({detail:i})=>this._collapsibleBoxListOrder=!i},t("div",{class:"grid-config__main"},t("ez-double-list",{leftList:this._hiddenList,leftTitle:this.getMessage("snkGridConfig.availableColumns"),rightList:this._visibleList,rightTitle:this.getMessage("snkGridConfig.selectedColumns"),onEzRightListChanged:({detail:i})=>this.handleRightListChange(i),emptyMessage:{LEFT_LIST:this.getMessage("snkGridConfig.emptyMensage.left"),RIGHT_LIST:this.getMessage("snkGridConfig.emptyMensage.right")},entityLabel:"coluna",entityLabelPlural:"colunas"}))),t("ez-collapsible-box",{id:"ID_group-order-columns",label:this.getMessage("snkGridConfig.dataOrdering"),"header-size":"medium",key:"KEY_group-order-columns",value:this._collapsibleBoxListOrder,onEzChange:({detail:i})=>this._collapsibleBoxListSelect=!i},t("div",{class:"grid-config__main"},t("ez-double-list",{rightList:this._orderListItems,rightTitle:this.getMessage("snkGridConfig.selectedColumns"),useOnlyRightList:!0,slotsListBuilder:this.getListSlots(),emptyMessage:{RIGHT_LIST:this.getMessage("snkGridConfig.emptyMensage.right")},entityLabel:"coluna",entityLabelPlural:"colunas"})))),t("div",{class:"grid-config__footer"},this.renderResetConfigBtn(),t("ez-button",{class:"padding-right--medium",label:this.getMessage("snkGridConfig.cancel"),onClick:()=>this.closeConfig()}),t("ez-button",{label:this.getMessage("snkGridConfig.complete"),class:"ez-button--primary",onClick:()=>this.finish()})))}static get assetsDirs(){return["../assets"]}get _element(){return e(this)}};j.CURRENT_CONFIG_VERSION=1,j.style='.sc-snk-grid-config-h{--snk-grid-config__footer--padding-top:var(--space--medium, 12px);--snk-grid-config__main--padding-right:var(--space--medium, 12px);--snk-grid-config__tabselector-container--padding:var(--space--medium, 12px);--snk-grid-config__button-close--padding-left:var(--space--medium, 12px);--snk-grid-config__title--color:var(--title--primary, #2B3A54);--snk-grid-config__title--font-family:var(--font-pattern, "Roboto");--snk-grid-config__title--font-size:var(--title--large, 20px);--snk-grid-config__title--font-weight:var(--text-weight--extra-large, 700);--snk-grid-config__subtitle--font-family:var(--font-pattern, "Roboto");--snk-grid-config__subtitle--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-family:var(--font-pattern, "Roboto");--snk-grid-config__group--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-weight:var(--text-weight--large, 600);--snk-grid-config__group--padding-bottom:var(--space-small, 6px);--snk-grid-config__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-grid-config__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-grid-config__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-grid-config__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-grid-config__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-grid-config__scrollbar--width:var(--space--small, 6px);display:flex;flex-direction:column;max-height:100%;width:100%}.grid-config__body.sc-snk-grid-config{overflow:auto}.padding-right--medium.sc-snk-grid-config{padding-right:var(--space--medium)}ez-list.sc-snk-grid-config{height:100%}.height-calc.sc-snk-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-snk-grid-config{display:flex;justify-content:flex-end;width:100%;padding-top:var(--snk-grid-config__footer--padding-top)}.hidden.sc-snk-grid-config{display:none}.tabselector-container.sc-snk-grid-config{padding:var(--snk-grid-config__tabselector-container--padding) 0}.button-close.sc-snk-grid-config{padding-left:var(--snk-grid-config__button-close--padding-left)}.title-container.sc-snk-grid-config{display:flex;justify-content:space-between;align-items:center;width:100%}.title.sc-snk-grid-config{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-grid-config__title--color);font-size:var(--snk-grid-config__title--font-size);font-family:var(--snk-grid-config__title--font-family);font-weight:var(--snk-grid-config__title--font-weight)}.subtitle.sc-snk-grid-config{color:var(--text--primary);font-size:var(--snk-grid-config__subtitle--font-size);font-family:var(--snk-grid-config__subtitle--font-family)}.grid-config__main.sc-snk-grid-config{overflow-y:auto;scrollbar-width:thin;width:100%;padding-bottom:20px;scrollbar-color:var(--snk-grid-config__scrollbar--color-clicked) var(--snk-grid-config__scrollbar--color-background)}.group-name.sc-snk-grid-config{font-family:var(--snk-grid-config__group--font-family);font-size:var(--snk-grid-config__group--font-size);font-weight:var(--snk-grid-config__group--font-weight);padding-bottom:var(--snk-grid-config__group--padding-bottom)}';const F=class{constructor(t){i(this,t),this._formConfigFetcher=new p,this.messagesBuilder=void 0,this.layoutType=C.SIDE_BY_SIDE}async save(){this._LayoutFormConfigSingleton.setConfig(this.layoutType),this._formConfigFetcher.saveLayoutFormConfig("formColCfg."+this._resourceID,{config:this.layoutType,newConfig:!0})}async componentWillLoad(){const i=o.getContextValue("__SNK__APPLICATION__");this._LayoutFormConfigSingleton=await(null==i?void 0:i.getLayoutFormConfig()),this._resourceID=await(null==i?void 0:i.getResourceID()),this.setLayoutInit()}setLayoutInit(){if(!this._LayoutFormConfigSingleton)return;const{config:i}=this._LayoutFormConfigSingleton;if(null==i)return void(this.layoutType=C.SIDE_BY_SIDE);const t=Number(i);this.layoutType=Object.values(C).includes(t)?t:C.SIDE_BY_SIDE}toggleLayout(i){this.layoutType=i}getMessage(i,t){var s;return null===(s=this.messagesBuilder)||void 0===s?void 0:s.getMessage(i,t)}render(){return t("div",{class:"ez-flex ez-flex--column"},t("div",{class:"ez-margin-bottom--small"},t("ez-check",{label:this.getMessage("snkLayoutFormConfig.cascadeLayout.label"),class:"ez-margin-bottom--small",onEzChange:()=>this.toggleLayout(C.CASCADE),value:this.layoutType===C.CASCADE}),t("snk-view-representation",{mode:C.CASCADE}),t("label",{class:"ez-label ez-margin--small ez-flex ez-text--medium"},this.getMessage("snkLayoutFormConfig.cascadeLayout.description"))),t("div",null,t("ez-check",{label:this.getMessage("snkLayoutFormConfig.sideBySideLayout.label"),class:"ez-margin-bottom--small",onEzChange:()=>this.toggleLayout(C.SIDE_BY_SIDE),value:this.layoutType===C.SIDE_BY_SIDE}),t("snk-view-representation",{mode:C.SIDE_BY_SIDE}),t("label",{class:"ez-label ez-margin--small ez-flex ez-text--medium"},this.getMessage("snkLayoutFormConfig.sideBySideLayout.description"))))}};F.style=".sc-snk-layout-form-config-h{display:block}";const G=class{constructor(t){i(this,t),this.handleNumberingConfigChanged=i=>{const t=i.detail;t&&this.applyConfiguration(t)},this.autoNumbering=!1,this.initialNumber=void 0,this.messagesBuilder=void 0,this.entityName=void 0,this.resourceID=void 0}async save(){try{if(this._savedConfig&&this._savedConfig.isAutoNumbering===this.autoNumbering&&this._savedConfig.initialNumber===this.initialNumber)return!0;const i={entityName:this.entityName,isAutoNum:this.autoNumbering,numInicial:this.initialNumber};return await this._servicesNumberingConfig.saveConfig(i),this._savedConfig={isAutoNumbering:this.autoNumbering,initialNumber:this.initialNumber},this._snkCrud&&this._snkCrud.updateNumberingConfig&&await this._snkCrud.updateNumberingConfig(this._savedConfig),!0}catch(i){return console.error("Error saving numbering config:",i),!1}}async componentWillLoad(){const i=o.getContextValue("__SNK__APPLICATION__");this.findParentSnkCrud(),this._servicesNumberingConfig=new z(i,this.resourceID),this.entityName&&await this.loadNumberingConfiguration()}findParentSnkCrud(){const i=this._element.closest("snk-crud");i&&(this._snkCrud=i,this._snkCrud.addEventListener("numberingConfigChanged",this.handleNumberingConfigChanged.bind(this)))}async loadNumberingConfiguration(){try{const i=await this.tryGetConfigFromSnkCrud();if(i)return void this.applyConfiguration(i);const t=await this.loadConfigFromService();this.applyConfiguration(t),await this.updateSnkCrudConfig(t)}catch(i){console.error("Error loading numbering config:",i),this.setDefaultConfiguration()}}async tryGetConfigFromSnkCrud(){if(!this._snkCrud)return null;try{const i=await this._snkCrud.getNumberingConfig();if(i)return i}catch(i){console.log("snk-crud não tem configuração ainda, carregando diretamente...")}return null}async loadConfigFromService(){return await this._servicesNumberingConfig.getConfig(this.entityName)}applyConfiguration(i){this._savedConfig=i,this.autoNumbering=i.isAutoNumbering,this.initialNumber=i.initialNumber}async updateSnkCrudConfig(i){if(this._snkCrud)try{await this._snkCrud.updateNumberingConfig(i)}catch(i){console.warn("Erro ao atualizar configuração no snk-crud:",i)}}setDefaultConfiguration(){this.autoNumbering=!1,this.initialNumber=null}getMessage(i,t){var s;return null===(s=this.messagesBuilder)||void 0===s?void 0:s.getMessage(i,t)}disconnectedCallback(){this._snkCrud&&this._snkCrud.removeEventListener("numberingConfigChanged",this.handleNumberingConfigChanged)}render(){return t("div",{class:"ez-flex ez-flex--column"},t("ez-check",{mode:"SWITCH",label:this.getMessage("snkNumberingConfig.labelAutoNumbering"),class:"ez-margin-bottom--medium",onEzChange:({detail:i})=>this.autoNumbering=i,value:this.autoNumbering}),t("ez-number-input",{label:this.getMessage("snkNumberingConfig.labelInitialNumber"),onEzChange:({detail:i})=>this.initialNumber=i,value:this.initialNumber,precision:0,prettyPrecision:0,allowNegative:!1,enabled:this.autoNumbering}))}get _element(){return e(this)}};G.style=".sc-snk-numbering-config-h{display:block}";const R=class{constructor(t){i(this,t),this.ezChange=n(this,"ezChange",7),this.selectedOption=b.none,this.preventAutoFocus=!1}render(){return t("ez-combo-box",{class:"grid-config-combo ez-input--inverted",label:"",suppressSearch:!0,value:this.selectedOption,enabled:!0,canShowError:!1,suppressEmptyOption:!0,preventAutoFocus:this.preventAutoFocus},Object.keys(b).map((i=>t("option",{value:b[i].value},b[i].label))))}static get assetsDirs(){return["../assets"]}};R.style="ez-combo-box{width:100px;--ez-text-input__margin-bottom:0px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";const M=class{constructor(t){i(this,t),this.snkConfigSaved=n(this,"snkConfigSaved",7),this._formConfigFetcher=new p,this.fieldsToSave=[],this.dataUnit=void 0,this.configName=void 0,this.messagesBuilder=void 0,this.avaliableFields=[],this.selectedFields=[]}async show(){var i;await(null===(i=this.ezDoubleListRef)||void 0===i?void 0:i.resetSelectedLists()),await this.initializeFormConfig(),this.ezPopupRef.opened=!0}async initializeFormConfig(){if(!this.configName)return;const i=this.getAllVisibleFieldsFromDataUnit(),t=await this.getConfig();if(0===t.length)return this.avaliableFields=[],this.selectedFields=[...i],void(this.fieldsToSave=[...this.selectedFields]);const s=this.sortDisplayedFields(t,i),e=i.filter((i=>!t.includes(i.id)));this.avaliableFields=[...e],this.selectedFields=[...s],this.fieldsToSave=[...this.selectedFields]}async getConfig(){const i=await this._formConfigFetcher.fetchSimpleFormConfig(this.configName);return[...this.removeDuplicates(i)]}getMessage(i,t){var s;return null===(s=this.messagesBuilder)||void 0===s?void 0:s.getMessage(i,t)}removeDuplicates(i){return i.filter(((t,s)=>i.indexOf(t)===s))}sortDisplayedFields(i,t){const s=[];return i.forEach((i=>{const e=t.find((t=>t.id===i));e&&s.push(e)})),s}getAllVisibleFieldsFromDataUnit(){var i,t,s;return(null!==(s=null===(t=null===(i=this.dataUnit)||void 0===i?void 0:i.metadata)||void 0===t?void 0:t.fields)&&void 0!==s?s:[]).filter((i=>i.visible)).map((i=>({id:i.name,label:i.label})))}close(){this.ezPopupRef.opened=!1}async handleResetConfigs(){await this._formConfigFetcher.restoreFormConfig(this.configName),await this.initializeFormConfig(),await this.handleSave()}handleCancel(){this.close()}async handleSave(){const i=this.fieldsToSave.map((i=>i.id));await this._formConfigFetcher.saveSimpleFormConfig(this.configName,i),this.close(),this.snkConfigSaved.emit()}render(){return t("ez-popup",{ref:i=>this.ezPopupRef=i,heightMode:"auto",size:"medium",ezTitle:this.getMessage("snkSimpleFormConfig.popup.title")},t("div",{class:"config-container"},t("div",{class:"config-lists"},t("ez-double-list",{ref:i=>this.ezDoubleListRef=i,leftList:this.avaliableFields,leftTitle:this.getMessage("snkSimpleFormConfig.lists.availableFields"),rightList:this.selectedFields,rightTitle:this.getMessage("snkSimpleFormConfig.lists.selectedFields"),onEzRightListChanged:({detail:i})=>this.fieldsToSave=[...i],entityLabel:this.getMessage("snkSimpleFormConfig.lists.entityLabel"),entityLabelPlural:this.getMessage("snkSimpleFormConfig.lists.entityLabelPlural")})),t("div",{class:"config-actions"},t("ez-button",{label:this.getMessage("snkSimpleFormConfig.buttons.restore"),onClick:this.handleResetConfigs.bind(this),size:"small"}),t("ez-button",{label:this.getMessage("snkSimpleFormConfig.buttons.cancel"),onClick:this.handleCancel.bind(this),size:"small"}),t("ez-button",{label:this.getMessage("snkSimpleFormConfig.buttons.save"),class:"ez-button--primary",onClick:this.handleSave.bind(this),size:"small"}))))}};M.style=":host{display:block}.config-container{display:flex;flex-direction:column;align-items:center;justify-content:space-between}.config-lists{width:100%;margin-bottom:12px}.config-actions{display:flex;flex-direction:row;justify-content:flex-end;width:100%;gap:12px}";const H=class{constructor(t){i(this,t),this.mode=C.SIDE_BY_SIDE}renderCascadeLayout(){return t("div",{class:"svg-container__collumn"},[...Array(3)].map((()=>t("div",{class:"svg-container__section"},t("div",{class:"svg-container__line svg-container__line--short"}),t("div",{class:"svg-container__line svg-container__line--long"})))))}renderSideBySideLayout(){return t("div",{class:"svg-container__inline"},[...Array(2)].map((()=>this.renderCascadeLayout())))}render(){return t("div",{class:"svg-container ez-margin-left--small"},t("div",{class:"svg-container__background"},t("div",{class:"svg-container__header"},t("div",{class:"svg-container__circle svg-container__circle--red"}),t("div",{class:"svg-container__circle svg-container__circle--yellow"}),t("div",{class:"svg-container__circle svg-container__circle--green"})),this.mode===C.CASCADE?this.renderCascadeLayout():this.renderSideBySideLayout()))}};H.style=".sc-snk-view-representation-h{display:block}.svg-container.sc-snk-view-representation{display:flex;width:185px;height:125px;border-radius:8px;background-color:#f7f7f7;padding:10px 12px;box-sizing:border-box;position:relative}.svg-container__background.sc-snk-view-representation{display:flex;flex-direction:column;width:100%}.svg-container__header.sc-snk-view-representation{display:flex;gap:2px;margin-bottom:12px}.svg-container__circle.sc-snk-view-representation{width:9px;height:9px;border-radius:50%}.svg-container__circle--red.sc-snk-view-representation{background-color:#ed7678}.svg-container__circle--yellow.sc-snk-view-representation{background-color:#eddb76}.svg-container__circle--green.sc-snk-view-representation{background-color:#7ad08e}.svg-container__section.sc-snk-view-representation{width:100%}.svg-container__collumn.sc-snk-view-representation{width:100%;display:flex;flex-direction:column}.svg-container__inline.sc-snk-view-representation{display:flex;flex-direction:row;gap:6px}.svg-container__line.sc-snk-view-representation{height:13px;border-radius:4px;background-color:#d9d9d9;margin-bottom:4px}.svg-container__line--short.sc-snk-view-representation{width:39.68px;height:7px;border-radius:3.5px}.svg-container__line--long.sc-snk-view-representation{width:100%}";const K=class{constructor(t){i(this,t),this.taskbarActionSelected=n(this,"taskbarActionSelected",7),this.taskbarActionsOpened=n(this,"taskbarActionsOpened",7),this.taskbarActionsButtonDisconnected=n(this,"taskbarActionsButtonDisconnected",7),this._showDropdown=!1,this.title=void 0,this.enabled=void 0,this.actions=void 0}async handleKeyDown(i){"Escape"!==i.key&&"Esc"!==i.key||await this.hideActions()}async handleClose(){await this.hideActions()}async showActions(){this._showDropdown=!0,requestAnimationFrame((()=>{this._element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}))}async hideActions(){this._showDropdown=!1}async isOpened(){return this._showDropdown}controlDropdown(){this._showDropdown=!this._showDropdown}loadItems(){return this.actions.filter((i=>void 0!==i)).map((i=>{var t;return{id:i.value,label:i.label,value:i.value,type:null!==(t=i.type)&&void 0!==t?t:"item",children:i.children,iconName:i.iconName,subAction:i.subAction,group:i.group,disableCloseOnSelect:i.disableCloseOnSelect}}))}canShowDropdown(){var i;return this._showDropdown&&(null===(i=this.actions)||void 0===i?void 0:i.length)>0}onSelectAction(i){const t=this.actions.map((i=>Object.assign(Object.assign({},i),{id:i.value}))),s=this.getSelectedAction(i.id,t);this.taskbarActionSelected.emit(s),s.disableCloseOnSelect||(this._showDropdown=!1)}getSelectedAction(i,t){let s=null;for(const e of t){if(e.id===i){s=e;break}if((null==e?void 0:e.children)&&(s=this.getSelectedAction(i,e.children),s))break}return s}dropdownItemBuilder(i,s){const e=this.actions.find((t=>t.value===i.id));if(!e||!e.itemBuilder)return;const n=e.itemBuilder(this._element,e);return"string"==typeof n?t("div",{innerHTML:n}):n}initializeEagerItems(){var i;null===(i=this.actions)||void 0===i||i.forEach((i=>{var t;i&&i.eagerInitialize&&i.itemBuilder&&(null===(t=i.itemBuilder)||void 0===t||t.call(i,this._element,i))}))}componentDidLoad(){this.initializeEagerItems()}componentDidRender(){this._showDropdown&&this.taskbarActionsOpened.emit(this._element)}disconnectedCallback(){this.taskbarActionsButtonDisconnected.emit()}render(){return t(s,null,t("div",{class:(this.canShowDropdown()?" ez-elevation--16":"")+" ez-dropdown-container"},t("ez-button",{title:this.title,mode:"icon",iconName:"dots-vertical",size:"small",enabled:this.enabled,onClick:()=>this.controlDropdown()}),this.canShowDropdown()&&t("ez-dropdown",{class:"ez-dropdown--sticky",items:this.loadItems(),onEzClick:i=>this.onSelectAction(i.detail),onEzOutsideClick:()=>this._showDropdown=!1,itemBuilder:(i,t)=>this.dropdownItemBuilder(i,t)})))}get _element(){return e(this)}};K.style=".sc-taskbar-actions-button-h{--ez-dropdown--min-width:150px;display:flex;width:fit-content;height:fit-content}.ez-dropdown-container.sc-taskbar-actions-button{position:relative;display:inline-block}.ez-dropdown--sticky.sc-taskbar-actions-button{position:absolute;display:block;min-width:var(--ez-dropdown--min-width)}";const $=class{constructor(t){i(this,t),this._showDropdown=!1,this.iconName=void 0,this.action=void 0,this.name=void 0,this.className=void 0,this.dataElementId=void 0,this.title=void 0,this.enabled=void 0,this.actions=void 0}initializeEagerItems(){var i;null===(i=this.actions)||void 0===i||i.forEach((i=>{var t;i&&i.eagerInitialize&&i.itemBuilder&&(null===(t=i.itemBuilder)||void 0===t||t.call(i,this._splitButtonRef,i))}))}componentDidLoad(){this.initializeEagerItems()}dropdownItemBuilder(i,s){const e=this.actions.find((t=>t.value===i.id));if(!e||!e.itemBuilder)return;const n=e.itemBuilder(this._splitButtonRef,e);return"string"==typeof n?t("div",{innerHTML:n}):n}loadItems(){return this.actions.filter((i=>void 0!==i)).map((i=>{var t;return{id:i.value,label:i.label,value:i.value,type:null!==(t=i.type)&&void 0!==t?t:"item",children:i.children,iconName:i.iconName,subAction:i.subAction,group:i.group,disableCloseOnSelect:i.disableCloseOnSelect}}))}render(){return t(s,null,t("ez-split-button",{ref:i=>this._splitButtonRef=i,key:this.dataElementId,class:`${this.className} "ez-split-button--tertiary ez-padding--medium"`,items:this.loadItems(),mode:"icon-only",iconName:this.iconName,enabled:this.enabled,show:this._showDropdown,onButtonClick:()=>this.action(this.name),itemBuilder:(i,t)=>this.dropdownItemBuilder(i,t)}))}};$.style="";export{B as snk_actions_button,j as snk_grid_config,F as snk_layout_form_config,G as snk_numbering_config,R as snk_select_box,M as snk_simple_form_config,H as snk_view_representation,K as taskbar_actions_button,$ as taskbar_split_button}
@@ -0,0 +1 @@
1
+ import{r as s,h as i,H as e,g as t}from"./p-d8d8169b.js";import{ObjectUtils as a,StringUtils as r,ApplicationContext as n,ElementIDUtils as o}from"@sankhyalabs/core";import{P as l,b as c,a as h}from"./p-328236dd.js";import"./p-ccd1ab5b.js";import"./p-0f3698af.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-50dd4ef8.js";import"./p-ff1990ad.js";import"./p-02459408.js";import"./p-9019a32f.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 u=class{constructor(i){s(this,i),this._mdByName={},this._startHighlightTag="<span class='card-item__highlight'>",this._endHighlightTag="</span>",this._specialCharsRegex=/[[.\-\$\+\*,_\&\(\)%\/\\#@!:\|\=\'\"]/gim,this._charsWithAccentuation="ÁÉÍÓÚ_ÃÕ_ÂÊÎÔÛ_ÀÈÌÒÙ_Ü_Ç_áéíóú_ãõ_âêîôû_àèìòù_ü_ç",this._charsWithoutAccentuation="AEIOU_AO_AEIOU_AEIOU_U_C_aeiou_ao_aeiou_aeiou_u_c",this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=450,this._gridDataSource=[],this.pesquisaFetcher=new l,this._itemList=void 0,this._startLoading=!1,this._presentationMode="list",this._currentView=void 0,this._valideDataSource=!1,this.searchLoader=void 0,this.treeLoader=void 0,this.selectItem=void 0,this.entityName=void 0,this.argument=void 0,this.isHierarchyEntity=!1,this.allowsNonAnalytic=!1}observeArgument(){this._textInput&&(this._textInput.value=this.argument)}clearSearch(){this.argument="",this._itemList=void 0}buildDetails(s,i){let e={};for(let t=0;t<s.length;t++){const a=s[t],r=i[a.fieldName];e[a.description]=this.highlightValue(i.__matchFields,a.options&&a.options[r]||r,s,!0)}return e}buildFirstFields(s,i,e=6){return s&&Array.isArray(s)&&s.forEach((s=>{let e=this.removeReference(i,this._mdByName[s]);e&&i.unshift(e)})),i=i.slice(0,e)}doSearch(s){this.searchLoader&&"function"==typeof this.searchLoader&&(this._startLoading=!0,this.searchLoader(s).then((s=>{s&&this.processSearchResponse(s)})).finally((()=>{this._startLoading=!1})))}processSearchResponse(s){let i=(s=a.stringToObject(s.json.$)).descriptionField,e=s.pkField;e&&(this._gridMetadata=c(s),this._gridDataSource=[...s.data],this._pkField=e,this._descriptionField=i,this._itemList=this.buildCardItemList(s,e,i))}buildCardItemList(s,i,e){var t;return null===(t=s.data)||void 0===t?void 0:t.map((t=>{var a;let r=this.filterFieldsMetadata(s,t),n=this.buildFirstFields(t.__matchFields,r);return{key:this.highlightValue(t.__matchFields,null===(a=t[i])||void 0===a?void 0:a.toString(),n,!0),title:e?this.highlightValue(t.__matchFields,t[e],n,!0):"",details:this.buildDetails(n,t)}}))}filterFieldsMetadata(s,i){return s.fieldsMetadata.filter((e=>{let t=!r.isEmpty(i[e.fieldName])&&!1!==e.visible&&"B"!==e.type&&s.pkField!==e.fieldName&&s.descriptionField!==e.fieldName&&(e.isPrimaryKey||!e.isLinkField)&&!("S"===e.type&&"H"===e.presentationType);return t&&(this._mdByName[e.fieldName]=e),("string"!=typeof i[e.fieldName]||!(i[e.fieldName].indexOf("<img")>-1||i[e.fieldName].indexOf("<svg")>-1))&&t}))}removeAtIndex(s,i){if(i>=0&&i<s.length)return s.splice(i,1)[0]}removeReference(s,i){let e=this.indexOf(s,i);return this.removeAtIndex(s,e)}indexOf(s,i){let e=-1;return Array.isArray(s)&&this.find(s,((s,t)=>(e=t,this.equals(i,s)))),e}equals(s,i){return a.objectToString(s)===a.objectToString(i)}find(s,i){if(s)for(let e=0,t=s.length;e<t;e++)if(i(s[e],e,s))return s[e]}highlightValue(s,i,e,t){let a=this.replaceHtmlEntities(i);if(this.argument&&(t||this.isIn(s,e.fieldName))){const s=this.getArgumentNumber();let i=(isNaN(s)?this.argument:s.toString()).split(/%|,|\s+/),t=0,r=this.replaceAccentuatedChars(a);i.forEach((s=>{if(s){s=this.replaceAccentuatedChars(s);let i=this.getSpecialCharacters(s);null!=i&&i.length>0&&(s=this.removeSpecialCharacters(s)),(e.mask||"CGC_CPF"===e.uiType||"Phone"===e.uiType)&&(s=s.split("").join("\\.?\\-?\\/?\\(?\\)?"));let n=new RegExp(s,"ig");n.lastIndex=t;let o=n.exec(r);if(o&&o.length>0){t=o.index;let s=o[0].length,i=a.substring(t,t+s),e=(null==i?void 0:i.trim())?this._startHighlightTag+i+this._endHighlightTag:"",n=a.substring(0,t),l=a.substring(t+s);a=n+e+l,t+=e.length,r=this.replaceAccentuatedChars(a)}}}))}return a}replaceHtmlEntities(s){return null==s?s:String(s).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}replaceAccentuatedChars(s){return null==s?s:this.replaceToSpace(s,["&amp;","&lt;","&gt;","&quot;"]).replace(/[^\w ]/g,(s=>{let i=this._charsWithAccentuation.indexOf(s);return i>-1&&(s=this._charsWithoutAccentuation.charAt(i)),s||""}))}replaceToSpace(s,i=[]){return null==s||i.forEach((i=>{const e=new RegExp(i,"g");let t="";for(let s=0;s<i.length;s++)t+=" ";s=String(s).replace(e,t)})),s}isIn(s,i){return this.indexOf(s,i)>-1}getSpecialCharacters(s){let i,e=[];for(;i=this._specialCharsRegex.exec(s);)e.push(s[i.index]);return e}removeSpecialCharacters(s){return this.getSpecialCharacters(s).forEach((i=>{s=this.replaceAll(s,i,"")})),s}replaceAll(s,i,e){let t=(null!=s?s:"").indexOf(i);for(;t>-1;)t=(s=s.replace(i,e)).indexOf(i);return s}getArgumentNumber(){return Number(this.argument||void 0)}createOption(s){let{key:i,title:e}=s;const t=new RegExp(this._startHighlightTag,"g"),a=new RegExp(this._endHighlightTag,"g");e=r.decodeHtmlEntities(e);const n={value:null==i?void 0:i.replace(t,"").replace(a,""),label:null==e?void 0:e.replace(t,"").replace(a,"")};this.selectItem(n)}onChangeValue(s){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=setTimeout((()=>{this.onChangeValue(s)}),this._deboucingTime));if(this.argument=(s.detail||"").trim(),this.isHierarchyEntity&&"list"===this._presentationMode)return void(null===(i=this._pesquisaTree)||void 0===i||i.applyFilter());const e=this.getArgumentNumber();this.argument&&(!isNaN(e)||this.argument.length>=this._limitCharsToSearch)?this._changeDeboucingTimeout=setTimeout((()=>{this.doSearch(this.argument),this._valideDataSource=!0}),this._deboucingTime):(this._itemList=void 0,this._gridDataSource=[],this._valideDataSource=!1)}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=void 0)}onClickSearch(){this.doSearch((this.argument||"").trim()),this._valideDataSource=!0}getMessageView(){if(this._startLoading)return this.getMessage("snkPesquisa.search.waitMessage");if(!this._itemList)return this.getMessage("snkPesquisa.search.initialMessage");const s=this._itemList.length;return s<1?this.getMessage("snkPesquisa.search.noResultsMessage"):1===s?this.getMessage("snkPesquisa.search.resultsFoundSingular"):this.getMessage("snkPesquisa.search.resultsFoundPlural",{COUNT:s})}async componentWillLoad(){var s;this._application=n.getContextValue("__SNK__APPLICATION__"),this._messagesBuilder=null===(s=this._application)||void 0===s?void 0:s.messagesBuilder;const i=await this.pesquisaFetcher.loadPresentationConfig(this.entityName);this._presentationMode="list"===i?"list":"table"}async componentDidLoad(){o.addIDInfo(this._element),await this.chooseViewMode()}getMessage(s,i){return this._messagesBuilder.getMessage(s,i)}async handleChangeViewMode(){this._presentationMode="list"===this._presentationMode?"table":"list",await this.chooseViewMode(),await this.pesquisaFetcher.savePresentationConfig(this.entityName,this._presentationMode)}async chooseViewMode(){var s,i;if("list"!==this._presentationMode)return await(null===(s=this._viewStack)||void 0===s?void 0:s.show(h.GRID)),void(this._currentView=h.GRID);const e=this.isHierarchyEntity?h.TREE:h.CARDS;await(null===(i=this._viewStack)||void 0===i?void 0:i.show(e)),this._currentView=e}hideLimitMessage(){return!this._itemList||this._itemList.length<100}hideRecordsMessage(){return"list"===this._presentationMode&&this.isHierarchyEntity}getButtonModeInfo(){return"list"===this._presentationMode?{iconName:"table",title:this.getMessage("snkPesquisa.viewMode.tableMode")}:this.isHierarchyEntity?{iconName:"hierarchical-tree",title:this.getMessage("snkPesquisa.viewMode.tableMode")}:{iconName:"list",title:this.getMessage("snkPesquisa.viewMode.listMode")}}render(){var s,t;return i(e,null,i("div",{class:"snk-pesquisa"},i("div",{class:"snk-pesquisa__input"},i("ez-text-input",{label:this.getMessage("snkPesquisa.search.label"),class:"ez-margin-right--medium",canShowError:!1,ref:s=>this._textInput=s,onEzChange:s=>this.onChangeValue(s),value:this.argument,"data-element-id":"searchInput"},i("ez-icon",{slot:"leftIcon",iconName:"search"}),this.argument&&(null===(s=this._textInput)||void 0===s?void 0:s.value)?i("button",{slot:"rightIcon",class:"snk-pesquisa__btn",onClick:()=>this.clearSearch()},i("ez-icon",{iconName:"close"})):void 0),i("ez-button",{class:"ez-button--primary",label:this.getMessage("snkPesquisa.search.button"),onClick:()=>this.onClickSearch()}),i("ez-button",{class:"ez-margin-left--medium",mode:"icon",iconName:this.getButtonModeInfo().iconName,title:this.getButtonModeInfo().title,onClick:async()=>await this.handleChangeViewMode()})),i("div",{class:"snk-pesquisa__records-label "+(this._currentView===h.TREE?"hidden":"")},i("label",{class:"snk-pesquisa__records "+(this.hideRecordsMessage()?"hidden":"")},this.getMessageView()),i("label",{class:"snk-pesquisa__records-limit "+(this.hideLimitMessage()?"hidden":"")},this.getMessage("snkPesquisa.search.limitMessage"))),i("div",{class:"snk-pesquisa__content"},i("ez-view-stack",{ref:s=>this._viewStack=s,"data-element-id":"simple-crud"},i("stack-item",null,this._valideDataSource&&i("pesquisa-grid",{metadata:this._gridMetadata,dataSource:this._gridDataSource,pkField:this._pkField,descriptionField:this._descriptionField,entityName:this.entityName,shouldLoadConfig:this._currentView===h.GRID,onPesquisaGridSelectItem:({detail:s})=>this.selectItem(s)})),i("stack-item",null,i("div",{class:"snk-pesquisa__cards-container"},null===(t=this._itemList)||void 0===t?void 0:t.map((s=>i("ez-card-item",{onEzClick:s=>this.createOption(s.detail),item:s}))))),i("stack-item",null,i("pesquisa-tree",{ref:s=>this._pesquisaTree=s,argument:this.argument,treeLoader:this.treeLoader,allowsNonAnalytic:this.allowsNonAnalytic,shouldLoadTree:this._currentView===h.TREE,onPesquisaTreeSelectItem:({detail:s})=>this.selectItem(s),messagesBuilder:this._messagesBuilder}))))))}get _element(){return t(this)}static get watchers(){return{argument:["observeArgument"]}}};u.style=".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--color-secondary:var(--text--secondary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);--snk-pesquisa__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-pesquisa__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-pesquisa__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-pesquisa__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-pesquisa__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__scrollbar--width:var(--space--small, 6px);height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__scrollbar--color-clicked) var(--snk-pesquisa__scrollbar--color-background);padding-right:var(--snk-pesquisa__content--padding-right);height:100vh}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__scrollbar--color-background);width:var(--snk-pesquisa__scrollbar--width);max-width:var(--snk-pesquisa__scrollbar--width);min-width:var(--snk-pesquisa__scrollbar--width)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__scrollbar--color-background);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__scrollbar--color-default);border-radius:var(--snk-pesquisa__scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:hover,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-pesquisa__scrollbar--color-hover)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:vertical:active,.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-pesquisa__scrollbar--color-clicked)}.snk-pesquisa__records-label.sc-snk-pesquisa{display:flex;flex-direction:row;justify-content:space-between;font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__records-label.hidden.sc-snk-pesquisa{display:none}.snk-pesquisa__records.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color)}.snk-pesquisa__records-limit.sc-snk-pesquisa{color:var(--snk-pesquisa__records--color-secondary)}.snk-pesquisa__records-limit.hidden.sc-snk-pesquisa,.snk-pesquisa__records.hidden.sc-snk-pesquisa{visibility:hidden}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}.snk-pesquisa__cards-container.sc-snk-pesquisa{height:100%;overflow-y:auto}";export{u as snk_pesquisa}
@@ -1 +1 @@
1
- import{ObjectUtils as t,StringUtils as i}from"@sankhyalabs/core";import{C as e}from"./p-7d6f1285.js";import{F as s}from"./p-c35fc941.js";import{a as r}from"./p-9019a32f.js";class n{constructor(t,i,e,s){this._resourceID=i,this._configName=t,this._onConfigChange=e,this._dataUnit=s}addFormLegacyConfig(t){this._configName&&e.addFormLegacyConfig(this._configName,t)}async loadConfig(){return new Promise((t=>{e.loadFormConfig(this._configName,this._resourceID).then((i=>{i=this.buildFormMetadataUITabs(i),this.setConfig(i),t(i)})).catch((t=>{console.warn(t)}))}))}getEmptyConfig(){return this.buildFormMetadataUITabs({fields:[],emptyConfig:!0},!0)}saveConfig(i){const s=t.copy(i);return new Promise((t=>{e.saveFormConfig(i,this._configName,this._resourceID).then((i=>{this.setConfig(Object.assign(Object.assign({},s),i)),t(Object.assign(Object.assign({},s),i))}))}))}saveCardState(t,i,s){return new Promise((r=>{var n;const l=(null===(n=this._config)||void 0===n?void 0:n.cardsState)||new Map,o=l.get(t);l.set(t,"fixed"===s?this.updateFixSequence(Object.assign(Object.assign({},o),{fixed:i.fixed}),l):Object.assign(Object.assign({},o),{[s]:i[s]})),e.saveCardState(l,this._configName,this._resourceID).then((t=>{this._config=Object.assign(Object.assign({},this._config),{cardsState:l}),r(t)}))}))}updateFixSequence(t,i){let e=-1;return Array.from(i.values()).forEach((i=>{i.fixed||delete t.fixSequence,null!=i.fixSequence&&(e=Math.max(e,i.fixSequence))})),t.fixed?t.fixSequence=e+1:delete t.fixSequence,t}hasConfig(t){var i;const e=null!=t?t:this._config;return!(!e||!(null===(i=e.fields)||void 0===i?void 0:i.length))}getFieldsList(t,i=!1){var e,s;const r=null===(e=this._config)||void 0===e?void 0:e.fields;return this.hasConfig()&&!i?r.map((({label:t,name:i,readOnly:e,visible:s,required:r,tab:n,group:l})=>{var o;if(null==t){const t=null===(o=this._dataUnit)||void 0===o?void 0:o.getField(i);if(!t)return;return Object.assign(Object.assign({},t),{name:null!=i?i:t.name,readOnly:null!=e?e:t.readOnly,visible:null!=s?s:t.visible,required:null!=r?r:t.required,tab:n,group:l})}return{name:i,label:t,readOnly:e,visible:s,required:r,tab:n,group:l}})).filter((i=>this.isFieldVisible(i,t))):this._dataUnit&&(null===(s=this._dataUnit.metadata)||void 0===s?void 0:s.fields)?this._dataUnit.metadata.fields.filter((i=>this.isFieldVisible(i,t))).map((({label:t,name:i,readOnly:e,visible:s,required:r,properties:n})=>({label:t,name:i,readOnly:e,visible:s,required:r,tab:null==n?void 0:n.UITabName}))):[]}isFieldVisible(t,e){if(void 0===t||!1===t.visible)return!1;if(null==e)return!0;const s=i.replaceAccentuatedCharsLower((t.label||t.name).toLocaleLowerCase()),r=i.replaceAccentuatedCharsLower(e.toLocaleLowerCase());return s.includes(r)}getFormConfig(t,i,e=!1){let s=this.getFieldsList(void 0,e);return i&&(s=s.filter((i=>{if(t){const e=t.getField(i.name);if(e&&e.readOnly)return!1}return!i.readOnly}))),Object.assign(Object.assign({},this._config),{fields:s})}setConfig(t){this.isLoaded=!0;const{cardsState:i,summary:e,defaultVars:s}=this._config||{};this._config=Object.assign({},t),i&&(this._config.cardsState=i),e&&(this._config.summary=e),s&&(this._config.defaultVars=s),this._onConfigChange&&this._onConfigChange(Object.assign({},this._config))}getConfig(t,i){return this.getFormConfig(t,i)}getFormConfigFetcher(){return null==this._formConfigFetcher&&(this._formConfigFetcher=new s),this._formConfigFetcher}async fetchUserAvailableConfigs(){return null!=this._configName?Promise.resolve(void 0):this.getFormConfigFetcher().fetchUserAvailableConfigs(this._configName,this._resourceID)}async fetchLegacyConfig(){return this.getFormConfigFetcher().fetchLegacyConfig(this._configName,this._resourceID)}async fetchDefaultConfig(){return this.getFormConfigFetcher().fetchDefaultConfig(this._configName,this._resourceID)}parseObjectList(t){return t?Array.isArray(t)?t:[t]:[]}buildFormMetadataUITabs(t,i=!1){var e;const s=this.hasConfig(t);if(!i&&(!this._dataUnit||s))return t;(t=this.getFormConfig(this._dataUnit,!1,!0)).tabs=this.parseObjectList(t.tabs),t.emptyConfig=!1,t.defaultConfiguration=!0;const n=this._dataUnit.metadata.fields;for(const i of n){const s=t.fields.find((t=>t.name===i.name)),n=null===(e=i.properties)||void 0===e?void 0:e.UITabName;n&&n!==r.main&&(t.tabs.some((t=>t.label===n))||t.tabs.push({label:n,name:n,order:0,visible:!0}),s&&(s.tab=n))}return t}}export{n as S}
1
+ import{ObjectUtils as t,StringUtils as i}from"@sankhyalabs/core";import{C as e}from"./p-4157ea10.js";import{F as s}from"./p-02459408.js";import{a as r}from"./p-9019a32f.js";class n{constructor(t,i,e,s){this._resourceID=i,this._configName=t,this._onConfigChange=e,this._dataUnit=s}addFormLegacyConfig(t){this._configName&&e.addFormLegacyConfig(this._configName,t)}async loadConfig(){return new Promise((t=>{e.loadFormConfig(this._configName,this._resourceID).then((i=>{i=this.buildFormMetadataUITabs(i),this.setConfig(i),t(i)})).catch((t=>{console.warn(t)}))}))}getEmptyConfig(){return this.buildFormMetadataUITabs({fields:[],emptyConfig:!0},!0)}saveConfig(i){const s=t.copy(i);return new Promise((t=>{e.saveFormConfig(i,this._configName,this._resourceID).then((i=>{this.setConfig(Object.assign(Object.assign({},s),i)),t(Object.assign(Object.assign({},s),i))}))}))}saveCardState(t,i,s){return new Promise((r=>{var n;const l=(null===(n=this._config)||void 0===n?void 0:n.cardsState)||new Map,o=l.get(t);l.set(t,"fixed"===s?this.updateFixSequence(Object.assign(Object.assign({},o),{fixed:i.fixed}),l):Object.assign(Object.assign({},o),{[s]:i[s]})),e.saveCardState(l,this._configName,this._resourceID).then((t=>{this._config=Object.assign(Object.assign({},this._config),{cardsState:l}),r(t)}))}))}updateFixSequence(t,i){let e=-1;return Array.from(i.values()).forEach((i=>{i.fixed||delete t.fixSequence,null!=i.fixSequence&&(e=Math.max(e,i.fixSequence))})),t.fixed?t.fixSequence=e+1:delete t.fixSequence,t}hasConfig(t){var i;const e=null!=t?t:this._config;return!(!e||!(null===(i=e.fields)||void 0===i?void 0:i.length))}getFieldsList(t,i=!1){var e,s;const r=null===(e=this._config)||void 0===e?void 0:e.fields;return this.hasConfig()&&!i?r.map((({label:t,name:i,readOnly:e,visible:s,required:r,tab:n,group:l})=>{var o;if(null==t){const t=null===(o=this._dataUnit)||void 0===o?void 0:o.getField(i);if(!t)return;return Object.assign(Object.assign({},t),{name:null!=i?i:t.name,readOnly:null!=e?e:t.readOnly,visible:null!=s?s:t.visible,required:null!=r?r:t.required,tab:n,group:l})}return{name:i,label:t,readOnly:e,visible:s,required:r,tab:n,group:l}})).filter((i=>this.isFieldVisible(i,t))):this._dataUnit&&(null===(s=this._dataUnit.metadata)||void 0===s?void 0:s.fields)?this._dataUnit.metadata.fields.filter((i=>this.isFieldVisible(i,t))).map((({label:t,name:i,readOnly:e,visible:s,required:r,properties:n})=>({label:t,name:i,readOnly:e,visible:s,required:r,tab:null==n?void 0:n.UITabName}))):[]}isFieldVisible(t,e){if(void 0===t||!1===t.visible)return!1;if(null==e)return!0;const s=i.replaceAccentuatedCharsLower((t.label||t.name).toLocaleLowerCase()),r=i.replaceAccentuatedCharsLower(e.toLocaleLowerCase());return s.includes(r)}getFormConfig(t,i,e=!1){let s=this.getFieldsList(void 0,e);return i&&(s=s.filter((i=>{if(t){const e=t.getField(i.name);if(e&&e.readOnly)return!1}return!i.readOnly}))),Object.assign(Object.assign({},this._config),{fields:s})}setConfig(t){this.isLoaded=!0;const{cardsState:i,summary:e,defaultVars:s}=this._config||{};this._config=Object.assign({},t),i&&(this._config.cardsState=i),e&&(this._config.summary=e),s&&(this._config.defaultVars=s),this._onConfigChange&&this._onConfigChange(Object.assign({},this._config))}getConfig(t,i){return this.getFormConfig(t,i)}getFormConfigFetcher(){return null==this._formConfigFetcher&&(this._formConfigFetcher=new s),this._formConfigFetcher}async fetchUserAvailableConfigs(){return null!=this._configName?Promise.resolve(void 0):this.getFormConfigFetcher().fetchUserAvailableConfigs(this._configName,this._resourceID)}async fetchLegacyConfig(){return this.getFormConfigFetcher().fetchLegacyConfig(this._configName,this._resourceID)}async fetchDefaultConfig(){return this.getFormConfigFetcher().fetchDefaultConfig(this._configName,this._resourceID)}parseObjectList(t){return t?Array.isArray(t)?t:[t]:[]}buildFormMetadataUITabs(t,i=!1){var e,s,n;const l=this.hasConfig(t);if(!i&&(!this._dataUnit||l))return t;(t=this.getFormConfig(this._dataUnit,!1,!0)).tabs=this.parseObjectList(t.tabs),t.emptyConfig=!1,t.defaultConfiguration=!0;const o=null!==(s=null===(e=this._dataUnit.metadata)||void 0===e?void 0:e.fields)&&void 0!==s?s:[];for(const i of o){const e=t.fields.find((t=>t.name===i.name)),s=null===(n=i.properties)||void 0===n?void 0:n.UITabName;s&&s!==r.main&&(t.tabs.some((t=>t.label===s))||t.tabs.push({label:s,name:s,order:0,visible:!0}),e&&(e.tab=s))}return t}}export{n as S}
@@ -1 +1 @@
1
- import{r as t,h as e,H as i,g as s}from"./p-d8d8169b.js";import{ApplicationContext as o,ObjectUtils as r,UserInterface as n,DataType as l,ElementIDUtils as a}from"@sankhyalabs/core";import{ApplicationUtils as d,DialogType as h}from"@sankhyalabs/ezui/dist/collection/utils";import{I as c}from"./p-8f3f2306.js";import{D as u,a as p,b as m}from"./p-0f3698af.js";import{R as v}from"./p-9019a32f.js";import{D as x}from"./p-39be771c.js";import{S as f}from"./p-28f50632.js";import"./p-840fb68c.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-58683e28.js";import"./p-ff1990ad.js";import"./p-c35fc941.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/DataType";import"./p-7dd49d15.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";class g{constructor(t,e){this._selectedNumber=0,this._getMessage=t,this._selectedNumber=e}setExportOption(t,e){const i=this.getExportGroupName();t===u.EXPORT_TO_PDF&&e.push(this.getExportToPDF(i)),t===u.EXPORT_TO_XLS&&e.push(this.getExportToXLS(i)),this.setExportCurrentPage(t,e),this._selectedNumber>0&&this.setExportAllRecords(t,e),this.setExportByEmail(t,e)}setExportCurrentPage(t,e){var i;const s=[u.EXPORT_PAGE_TO_PDF,u.EXPORT_PAGE_TO_XLS];if(t===u.EXPORT_CURRENT_PAGE&&e.push(this.getCurrentPage()),s.includes(t)){let s=e.find((t=>t.id===u.EXPORT_CURRENT_PAGE));null==s&&(e.push(this.getCurrentPage()),s=e.find((t=>t.id===u.EXPORT_CURRENT_PAGE))),(null===(i=null==s?void 0:s.children)||void 0===i?void 0:i.length)||(s.children=[]),t===u.EXPORT_PAGE_TO_PDF&&s.children.push(this.getExportPageToPDF()),t===u.EXPORT_PAGE_TO_XLS&&s.children.push(this.getExportPageToXLS())}}setExportAllRecords(t,e){var i;const s=[u.EXPORT_ALL_RECORDS_TO_PDF,u.EXPORT_ALL_RECORDS_TO_XLS];if(t===u.EXPORT_ALL_RECORDS&&e.push(this.getAllRecords()),s.includes(t)){let s=e.find((t=>t.id===u.EXPORT_ALL_RECORDS));null==s&&(e.push(this.getAllRecords()),s=e.find((t=>t.id===u.EXPORT_ALL_RECORDS))),(null===(i=s.children)||void 0===i?void 0:i.length)||(s.children=[]),t===u.EXPORT_ALL_RECORDS_TO_PDF&&s.children.push(this.getExportAllRecordsToPDF()),t===u.EXPORT_ALL_RECORDS_TO_XLS&&s.children.push(this.getExportAllRecordsToXLS())}}setExportByEmail(t,e){t===u.EXPORT_BY_EMAIL&&e.push(this.getExportByEmail())}getExportToPDF(t){return{id:u.EXPORT_TO_PDF,label:"PDF (.pdf)",group:t}}getExportToXLS(t){return{id:u.EXPORT_TO_XLS,label:`${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`,group:t}}getCurrentPage(){return{id:u.EXPORT_CURRENT_PAGE,label:this._getMessage("snkDataExporter.label.currentPage"),group:this._getMessage("snkDataExporter.group.custom")}}getAllRecords(){return{id:u.EXPORT_ALL_RECORDS,label:this._getMessage("snkDataExporter.label.allRecords"),group:this._getMessage("snkDataExporter.group.custom")}}getExportPageToPDF(){return{id:u.EXPORT_PAGE_TO_PDF,label:"PDF (.pdf)"}}getExportPageToXLS(){return{id:u.EXPORT_PAGE_TO_XLS,label:`${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`}}getExportAllRecordsToPDF(){return{id:u.EXPORT_ALL_RECORDS_TO_PDF,label:"PDF (.pdf)"}}getExportAllRecordsToXLS(){return{id:u.EXPORT_ALL_RECORDS_TO_XLS,label:`${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`}}getExportByEmail(){return{id:u.EXPORT_BY_EMAIL,label:`${this._getMessage("snkDataExporter.label.sendByEmail")}...`}}getExportGroupName(){return 1===this._selectedNumber?this._getMessage("snkDataExporter.group.export.selectedLine"):this._selectedNumber>1?this._getMessage("snkDataExporter.group.export.multiSelected").replace("{0}",this._selectedNumber.toString()):this._getMessage("snkDataExporter.group.export.default")}}function b(t){const e=[];let i=0;for(const s of t){if(i+=s.width,i>=860)break;e.push(s)}return e}function E(t){return Object.keys(u).find((e=>u[e]===t))}class w{constructor(t){this._provider=t}async getParsedColumns(){return b(await this._provider.getColumnsMetadata())}async getColumns(t){var e;return(null===(e=E(null==t?void 0:t.exportOption))||void 0===e?void 0:e.includes("PDF"))?await this.getParsedColumns():await this._provider.getColumnsMetadata()}async getParams(t){var e,i,s,o,r,n;const l=null===(i=(e=this._provider).getFilters)||void 0===i?void 0:i.call(e),a=await this.getColumns(t),d=null===(o=(s=this._provider).getOrders)||void 0===o?void 0:o.call(s),h=null===(n=(r=this._provider).getResourceURI)||void 0===n?void 0:n.call(r),c=this._provider.getSelectedIDs(),p=t.exportOption,m=[u.EXPORT_PAGE_TO_PDF,u.EXPORT_PAGE_TO_XLS];delete t.exportOption;let v=Object.assign({filters:l,columns:a,sort:d,resourceURI:h,selectedIDs:c.slice(0,this._provider.getExportLimit())},t);if(m.includes(p)||"page"==t.type){const t=this._provider.getOffset(),e=this._provider.getPageSize();v=Object.assign(Object.assign({},v),{offset:t,limit:e,selectedIDs:[]})}else"all"==t.type&&(v=Object.assign(Object.assign({},v),{offset:0,limit:this._provider.getExportLimit(),selectedIDs:[]}));return Promise.resolve(v)}async executeExport(t){const e=await this.getParams(t),{methodName:i}=e,s=function(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(i[s[o]]=t[s[o]])}return i}(e,["methodName"]),n=`${o.getContextValue("__SNK__APPLICATION__").getModuleName()}@DataExporterSPBean.${i}`,l={serviceName:n,requestBody:s};return new Promise(((t,e)=>{x.get().callServiceBroker(n,r.objectToString(l)).then((e=>t(this.getFormatResponse(e)))).catch((t=>e(t)))}))}getFormatResponse(t){var e;const i=null===(e=null==t?void 0:t.json)||void 0===e?void 0:e.$;if(null!=i)return r.stringToObject(i)}}class D{constructor(t){this._provider=t}async getParsedColumns(){return b(await this._provider.getColumnsMetadata())}async executeExport(t){var e;const{methodName:i,gridTitle:s}=t,o=await this._provider.getRecords(t.type),r=(null===(e=E(null==t?void 0:t.exportOption))||void 0===e?void 0:e.includes("PDF"))?await this.getParsedColumns():await this._provider.getColumnsMetadata(),[n,l]=this.getExecutor(i),a={serviceName:n,requestBody:{grid:{gridTitle:s,columns:this.buildColumnsObject(r),rows:this.buildRowsObject(r,o),customOptions:{xlsxExtension:!1}}}};return new Promise(((t,e)=>{x.get().callServiceBroker(n,a).then((e=>t(l(e)))).catch((t=>e(t)))}))}getExecutor(t){return"exportToPDF"===t?["GridPDFBuilderSP.buildPDFFromJson",t=>({fileSessionKey:t.chavePDF.valor,canPrint:"S"===t.permiteImprimir.valor,canExport:"S"===t.permiteExportar.valor,canSendEmail:"S"===t.canSendEmail.valor,useAppPrint:!0})]:["GridXLSBuilderSP.buildXLSFromJson",t=>({fileSessionKey:t.chaveXLS.valor,canPrint:!0,canExport:!0,canSendEmail:!0,useAppPrint:!1})]}buildColumnsObject(t){return{column:t.map(((t,e)=>{const{label:i,id:s,width:o,userInterface:r}=t;return Object.assign({index:e+1,id:s,label:i,width:o,presentationType:"P"},k[r]||{type:"S",align:"left"})}))}}buildRowsObject(t,e){return{row:e.map((e=>{const i={};return t.forEach(((t,s)=>i["c"+(s+1)]={$:this.formatValue(e,t)})),i}))}}formatValue(t,e){return null!=this._provider.formatValue?this._provider.formatValue(t,e):t[e.id]||""}}const k={[n.DATE]:{type:"D",align:"center"},[n.DATETIME]:{type:"H",align:"center"},[n.TIME]:{type:"I",align:"right"},[n.ELAPSEDTIME]:{type:"I",align:"right"},[n.DECIMALNUMBER]:{type:"F",align:"right"},[n.INTEGERNUMBER]:{type:"I",align:"right"},[n.SEARCH]:{type:"S",align:"right"}},y=class{constructor(e){t(this,e),this._selectedNumber=0,this._customPrefix="$custom$",this._releasedToExport=[u.EXPORT_TO_PDF,u.EXPORT_TO_XLS,u.EXPORT_BY_EMAIL,u.EXPORT_PDF_TO_EMAIL,u.EXPORT_XLS_TO_EMAIL,u.EXPORT_PAGE_TO_PDF,u.EXPORT_PAGE_TO_XLS,u.EXPORT_ALL_RECORDS_TO_PDF,u.EXPORT_ALL_RECORDS_TO_XLS],this._items=[],this._showDropdown=!1,this.provider=null,this.messagesBuilder=void 0}async exportByEmail(){const t=this._selectedNumber;this._snkEmailSender.open({type:t>0?"selection":"all",selectedRows:t,email:{attachments:[{name:this._appLabel}]},resolver:({type:t,format:e,email:{to:i,subject:s,message:o}})=>{var r;const n=null!==(r=m[null==e?void 0:e.toUpperCase()])&&void 0!==r?r:m.PDF;this.resolveExporter({type:t,methodName:n,to:i,subject:s,message:o,fileName:this._appLabel,gridTitle:this._appLabel},(()=>{this._snkEmailSender.close(),d.info(this.getMessage("snkDataExporter.message.emailSuccess"),{iconName:"check"})}))}})}getMessage(t,e){if(null==this.messagesBuilder){const t=f.getNearestInstance(this._element);t&&(this.messagesBuilder=t.messagesBuilder)}return this.messagesBuilder.getMessage(t,e)}positionDropdown(){var t;const e=null===(t=this._ezButton)||void 0===t?void 0:t.getBoundingClientRect();null!=e&&null!=this._dropdownParent&&(this._dropdownParent.style.top=e.y+e.height+5+"px",this._dropdownParent.style.left=e.x+"px")}closeDropdown(t){const e=null==t?void 0:t.target;null!=e&&(e.closest(".snk-data-exporter")||(this._showDropdown=!1))}setEvents(){document.removeEventListener("click",this.closeDropdown.bind(this)),document.addEventListener("click",this.closeDropdown.bind(this)),document.removeEventListener("scroll",this.positionDropdown.bind(this)),document.addEventListener("scroll",this.positionDropdown.bind(this))}controlDropdown(){this._showDropdown=!this._showDropdown}async resolveExporter(t,e){null!=this.provider&&null!=t&&null!=e&&this.getExporterStrategy().executeExport(t).then((t=>e(t))).catch((t=>{console.error(t);let{title:e,message:i,statusMessage:s}=t||{};d.error(e||this.getMessage("snkDataExporter.message.exportError"),s||i||this.getMessage("snkDataExporter.message.unknownFailure"))}))}getExporterStrategy(){return null==this.provider.getRecords?new w(this.provider):new D(this.provider)}getOptionKey(t){return Object.keys(u).find((e=>u[e]===t))}getExportType(t){return t===u.EXPORT_ALL_RECORDS_TO_PDF||t===u.EXPORT_ALL_RECORDS_TO_XLS?c.ALL:t===u.EXPORT_PAGE_TO_PDF||t===u.EXPORT_PAGE_TO_XLS?c.PAGE:c.SELECTION}async dispatchExporter(t){var e,i,s;const r=this.getOptionKey(t),n=null!==(e=p[r])&&void 0!==e?e:p.EXPORT_TO_PDF,l={methodName:u[`EXPORT_TO_${n}`],fileName:this._appLabel,gridTitle:this._appLabel,exportOption:t,limit:null===(s=null===(i=this.provider)||void 0===i?void 0:i.getExportLimit)||void 0===s?void 0:s.call(i),type:this.getExportType(t)};await this.resolveExporter(l,(t=>{t.canExport||n===p.EXPORT_TO_PDF?function({fileSessionKey:t,isDownload:e}){const i=o.getContextValue("__SNK__APPLICATION__");window.open(`${window.location.protocol}//${window.location.hostname}:${window.location.port}/mge/visualizadorArquivos.mge?chaveArquivo=${t}${e?"&download=S":""}`),d.info(function(t){var e;return null===(e=null==t?void 0:t.messagesBuilder)||void 0===e?void 0:e.getMessage("fileViewer.message.exportSuccess",void 0)}(i),{iconName:"check"})}(Object.assign(Object.assign({},t),{fileType:n})):d.error(this.getMessage("snkDataExporter.title.permission"),this.getMessage("snkDataExporter.message.exportPermission"))}))}async processExporter(t){var e,i,s,o,r,n,l;const a=null==t?void 0:t.detail,c=[u.EXPORT_PAGE_TO_PDF,u.EXPORT_PAGE_TO_XLS],p=null===(e=null==a?void 0:a.id)||void 0===e?void 0:e.includes(this._customPrefix);if((null==a?void 0:a.id)===u.EXPORT_CURRENT_PAGE)return;const m=null===(i=this.provider)||void 0===i?void 0:i.getSelectedIDs(),v=null===(s=this.provider)||void 0===s?void 0:s.getTotalRecords(),x=null===(r=null===(o=this.provider)||void 0===o?void 0:o.getPageSize)||void 0===r?void 0:r.call(o),f=null===(l=null===(n=this.provider)||void 0===n?void 0:n.getExportLimit)||void 0===l?void 0:l.call(n);let g=!1;if(c.includes(null==a?void 0:a.id)&&x<=f||p?g=!1:(null==m?void 0:m.length)?g=m.length>f:v>f&&(g=!0),g){const t=f.toLocaleString("pt-BR",{minimumFractionDigits:0}),e={title:this.getMessage("snkDataExporter.limitExceeded.title"),description:`\n ${this.getMessage("snkDataExporter.limitExceeded.description",{limit:t})}\n <br/><br/>\n <b>\n ${this.getMessage("snkDataExporter.limitExceeded.subdescription")}\n </b>\n `,cancel:this.getMessage("snkDataExporter.limitExceeded.cancel"),confirm:this.getMessage("snkDataExporter.limitExceeded.continue")};if(!await d.confirm(e.title,e.description,null,h.WARN,{labelCancel:e.cancel,labelConfirm:e.confirm}))return}if(p)return this.openPersonalizedReports(a.id),void(this._showDropdown=!1);this.getFilteredReleasedToExport().includes(null==a?void 0:a.id)&&(a.id===u.EXPORT_BY_EMAIL?this.exportByEmail():this.dispatchExporter(a.id),this._showDropdown=!1)}getFilteredReleasedToExport(){var t,e;if(null==this.provider)return this._releasedToExport;const i=null===(e=(t=this.provider).getHiddenOptions)||void 0===e?void 0:e.call(t);return null==i?this._releasedToExport:this._releasedToExport.filter((t=>!i.includes(t)))}loadItems(){const t=[];this.getFilteredReleasedToExport().forEach((e=>{var i;null===(i=this._itemBuilder)||void 0===i||i.setExportOption(e,t)})),this.loadPersonalizedItems(t)}async loadPersonalizedItems(t){var e,i;const s=null===(i=null===(e=this.provider)||void 0===e?void 0:e.getRecordID)||void 0===i?void 0:i.call(e);if(null==s)return void(this._items=t);const n=await function(t){const e=`${o.getContextValue("__SNK__APPLICATION__").getModuleName()}@DataExporterSPBean.getPersonalizedReports`,i={serviceName:e,requestBody:t};return new Promise(((t,s)=>x.get().callServiceBroker(e,r.objectToString(i)).then((e=>t(function(t){var e;const i=null===(e=null==t?void 0:t.json)||void 0===e?void 0:e.$;if(null!=i)return r.stringToObject(i)}(e)))).catch((t=>s(t)))))}({recordID:s});null==n||n.forEach((e=>{t.push({id:`${this._customPrefix}_${e.ID}`,label:e.label,group:this.getMessage("snkDataExporter.group.custom")})})),this._items=t}openPersonalizedReports(t){var e,i;const s=[],o=(null==t?void 0:t.replace(this._customPrefix,""))||"";null===(i=null===(e=this.provider)||void 0===e?void 0:e.getSelectedIDs)||void 0===i||i.call(e).forEach((({name:t,type:e,value:i},o)=>{const r={fields:[]};0===o&&(s[`PK_${t}`]={type:this.parseDataType(e),value:i},s.pks=[]);const n={nome:`PK_${t}`,tipo:this.parseDataType(e),valor:i};r.fields.push(n),s.pks.push(r)})),this._application.openApp(`${v}${o}`,s)}parseDataType(t){switch(t){case l.NUMBER:return"I";case l.DATE:return"D";default:return"S"}}loadDropdown(){var t;this._selectedNumber=(null===(t=this.provider)||void 0===t?void 0:t.getSelectedNumber())||0,this._itemBuilder=new g(this.getMessage.bind(this),this._selectedNumber),this.loadItems()}getElementID(t){return{[a.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:a.getInternalIDInfo(t)}}canShowDropdown(){var t;return this._showDropdown&&(null===(t=this._items)||void 0===t?void 0:t.length)>0}componentWillLoad(){var t;this._application=o.getContextValue("__SNK__APPLICATION__"),null===(t=this._application)||void 0===t||t.getAppLabel().then((t=>this._appLabel=t)),this.setEvents()}componentDidLoad(){null!=this._element&&(a.addIDInfo(this._element),this.positionDropdown())}componentWillUpdate(){var t;this._showDropdown&&!(null===(t=this._items)||void 0===t?void 0:t.length)&&this.loadDropdown()}componentDidUpdate(){var t;this._showDropdown?this.positionDropdown():(null===(t=this._items)||void 0===t?void 0:t.length)>0&&(this._items=[])}render(){return e(i,null,e("div",{class:`snk-data-exporter\n ${this.canShowDropdown()?" ez-elevation--16":""}\n `},e("ez-button",Object.assign({ref:t=>this._ezButton=t,iconName:"file-download",size:"small",mode:"icon",title:this.getMessage("snkDataExporter.group.export.title"),onClick:()=>this.controlDropdown()},this.getElementID("button"))),e("div",Object.assign({ref:t=>this._dropdownParent=t,class:`snk-data-exporter__dropdown\n ${this.canShowDropdown()?"snk-data-exporter__dropdown--show":""}\n `},this.getElementID("dropdown")),this.canShowDropdown()&&e("ez-dropdown",Object.assign({items:this._items,onEzClick:t=>this.processExporter(t)},this.getElementID("dropdown"))))),this.canShowDropdown()&&e("div",Object.assign({class:"ez-scrim ez-scrim--light"},this.getElementID("ezScrim"))),e("snk-exporter-email-sender",Object.assign({ref:t=>this._snkEmailSender=t,getMessage:(t,e)=>this.getMessage(t,e)},this.getElementID("snkExporterEmailSender"))))}get _element(){return s(this)}};y.style=".sc-snk-data-exporter-h{display:flex;width:fit-content;height:fit-content}.snk-data-exporter.sc-snk-data-exporter{display:flex;width:fit-content;height:fit-content}.snk-data-exporter__dropdown.sc-snk-data-exporter{display:none}.snk-data-exporter__dropdown--show.sc-snk-data-exporter{display:flex;flex-direction:column;position:fixed}.snk-data-exporter__dropdown.sc-snk-data-exporter>ez-dropdown.sc-snk-data-exporter{position:relative}";export{y as snk_data_exporter}
1
+ import{r as t,h as e,H as i,g as s}from"./p-d8d8169b.js";import{ApplicationContext as o,ObjectUtils as r,UserInterface as n,DataType as l,ElementIDUtils as a}from"@sankhyalabs/core";import{ApplicationUtils as d,DialogType as h}from"@sankhyalabs/ezui/dist/collection/utils";import{I as c}from"./p-8f3f2306.js";import{D as u,a as p,b as m}from"./p-0f3698af.js";import{R as v}from"./p-9019a32f.js";import{D as x}from"./p-ccd1ab5b.js";import{S as g}from"./p-d0209a52.js";import"./p-328236dd.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-50dd4ef8.js";import"./p-ff1990ad.js";import"./p-02459408.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/DataType";import"./p-7dd49d15.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";class f{constructor(t,e){this._selectedNumber=0,this._getMessage=t,this._selectedNumber=e}setExportOption(t,e){const i=this.getExportGroupName();t===u.EXPORT_TO_PDF&&e.push(this.getExportToPDF(i)),t===u.EXPORT_TO_XLS&&e.push(this.getExportToXLS(i)),this.setExportCurrentPage(t,e),this._selectedNumber>0&&this.setExportAllRecords(t,e),this.setExportByEmail(t,e)}setExportCurrentPage(t,e){var i;const s=[u.EXPORT_PAGE_TO_PDF,u.EXPORT_PAGE_TO_XLS];if(t===u.EXPORT_CURRENT_PAGE&&e.push(this.getCurrentPage()),s.includes(t)){let s=e.find((t=>t.id===u.EXPORT_CURRENT_PAGE));null==s&&(e.push(this.getCurrentPage()),s=e.find((t=>t.id===u.EXPORT_CURRENT_PAGE))),(null===(i=null==s?void 0:s.children)||void 0===i?void 0:i.length)||(s.children=[]),t===u.EXPORT_PAGE_TO_PDF&&s.children.push(this.getExportPageToPDF()),t===u.EXPORT_PAGE_TO_XLS&&s.children.push(this.getExportPageToXLS())}}setExportAllRecords(t,e){var i;const s=[u.EXPORT_ALL_RECORDS_TO_PDF,u.EXPORT_ALL_RECORDS_TO_XLS];if(t===u.EXPORT_ALL_RECORDS&&e.push(this.getAllRecords()),s.includes(t)){let s=e.find((t=>t.id===u.EXPORT_ALL_RECORDS));null==s&&(e.push(this.getAllRecords()),s=e.find((t=>t.id===u.EXPORT_ALL_RECORDS))),(null===(i=s.children)||void 0===i?void 0:i.length)||(s.children=[]),t===u.EXPORT_ALL_RECORDS_TO_PDF&&s.children.push(this.getExportAllRecordsToPDF()),t===u.EXPORT_ALL_RECORDS_TO_XLS&&s.children.push(this.getExportAllRecordsToXLS())}}setExportByEmail(t,e){t===u.EXPORT_BY_EMAIL&&e.push(this.getExportByEmail())}getExportToPDF(t){return{id:u.EXPORT_TO_PDF,label:"PDF (.pdf)",group:t}}getExportToXLS(t){return{id:u.EXPORT_TO_XLS,label:`${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`,group:t}}getCurrentPage(){return{id:u.EXPORT_CURRENT_PAGE,label:this._getMessage("snkDataExporter.label.currentPage"),group:this._getMessage("snkDataExporter.group.custom")}}getAllRecords(){return{id:u.EXPORT_ALL_RECORDS,label:this._getMessage("snkDataExporter.label.allRecords"),group:this._getMessage("snkDataExporter.group.custom")}}getExportPageToPDF(){return{id:u.EXPORT_PAGE_TO_PDF,label:"PDF (.pdf)"}}getExportPageToXLS(){return{id:u.EXPORT_PAGE_TO_XLS,label:`${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`}}getExportAllRecordsToPDF(){return{id:u.EXPORT_ALL_RECORDS_TO_PDF,label:"PDF (.pdf)"}}getExportAllRecordsToXLS(){return{id:u.EXPORT_ALL_RECORDS_TO_XLS,label:`${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`}}getExportByEmail(){return{id:u.EXPORT_BY_EMAIL,label:`${this._getMessage("snkDataExporter.label.sendByEmail")}...`}}getExportGroupName(){return 1===this._selectedNumber?this._getMessage("snkDataExporter.group.export.selectedLine"):this._selectedNumber>1?this._getMessage("snkDataExporter.group.export.multiSelected").replace("{0}",this._selectedNumber.toString()):this._getMessage("snkDataExporter.group.export.default")}}function b(t){const e=[];let i=0;for(const s of t){if(i+=s.width,i>=860)break;e.push(s)}return e}function E(t){return Object.keys(u).find((e=>u[e]===t))}class w{constructor(t){this._provider=t}async getParsedColumns(){return b(await this._provider.getColumnsMetadata())}async getColumns(t){var e;return(null===(e=E(null==t?void 0:t.exportOption))||void 0===e?void 0:e.includes("PDF"))?await this.getParsedColumns():await this._provider.getColumnsMetadata()}async getParams(t){var e,i,s,o,r,n;const l=null===(i=(e=this._provider).getFilters)||void 0===i?void 0:i.call(e),a=await this.getColumns(t),d=null===(o=(s=this._provider).getOrders)||void 0===o?void 0:o.call(s),h=null===(n=(r=this._provider).getResourceURI)||void 0===n?void 0:n.call(r),c=this._provider.getSelectedIDs(),p=t.exportOption,m=[u.EXPORT_PAGE_TO_PDF,u.EXPORT_PAGE_TO_XLS];delete t.exportOption;let v=Object.assign({filters:l,columns:a,sort:d,resourceURI:h,selectedIDs:c.slice(0,this._provider.getExportLimit())},t);if(m.includes(p)||"page"==t.type){const t=this._provider.getOffset(),e=this._provider.getPageSize();v=Object.assign(Object.assign({},v),{offset:t,limit:e,selectedIDs:[]})}else"all"==t.type&&(v=Object.assign(Object.assign({},v),{offset:0,limit:this._provider.getExportLimit(),selectedIDs:[]}));return Promise.resolve(v)}async executeExport(t){const e=await this.getParams(t),{methodName:i}=e,s=function(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(i[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(i[s[o]]=t[s[o]])}return i}(e,["methodName"]),n=`${o.getContextValue("__SNK__APPLICATION__").getModuleName()}@DataExporterSPBean.${i}`,l={serviceName:n,requestBody:s};return new Promise(((t,e)=>{x.get().callServiceBroker(n,r.objectToString(l)).then((e=>t(this.getFormatResponse(e)))).catch((t=>e(t)))}))}getFormatResponse(t){var e;const i=null===(e=null==t?void 0:t.json)||void 0===e?void 0:e.$;if(null!=i)return r.stringToObject(i)}}class D{constructor(t){this._provider=t}async getParsedColumns(){return b(await this._provider.getColumnsMetadata())}async executeExport(t){var e;const{methodName:i,gridTitle:s}=t,o=await this._provider.getRecords(t.type),r=(null===(e=E(null==t?void 0:t.exportOption))||void 0===e?void 0:e.includes("PDF"))?await this.getParsedColumns():await this._provider.getColumnsMetadata(),[n,l]=this.getExecutor(i),a={serviceName:n,requestBody:{grid:{gridTitle:s,columns:this.buildColumnsObject(r),rows:this.buildRowsObject(r,o),customOptions:{xlsxExtension:!1}}}};return new Promise(((t,e)=>{x.get().callServiceBroker(n,a).then((e=>t(l(e)))).catch((t=>e(t)))}))}getExecutor(t){return"exportToPDF"===t?["GridPDFBuilderSP.buildPDFFromJson",t=>({fileSessionKey:t.chavePDF.valor,canPrint:"S"===t.permiteImprimir.valor,canExport:"S"===t.permiteExportar.valor,canSendEmail:"S"===t.canSendEmail.valor,useAppPrint:!0})]:["GridXLSBuilderSP.buildXLSFromJson",t=>({fileSessionKey:t.chaveXLS.valor,canPrint:!0,canExport:!0,canSendEmail:!0,useAppPrint:!1})]}buildColumnsObject(t){return{column:t.map(((t,e)=>{const{label:i,id:s,width:o,userInterface:r}=t;return Object.assign({index:e+1,id:s,label:i,width:o,presentationType:"P"},k[r]||{type:"S",align:"left"})}))}}buildRowsObject(t,e){return{row:e.map((e=>{const i={};return t.forEach(((t,s)=>i["c"+(s+1)]={$:this.formatValue(e,t)})),i}))}}formatValue(t,e){return null!=this._provider.formatValue?this._provider.formatValue(t,e):t[e.id]||""}}const k={[n.DATE]:{type:"D",align:"center"},[n.DATETIME]:{type:"H",align:"center"},[n.TIME]:{type:"I",align:"right"},[n.ELAPSEDTIME]:{type:"I",align:"right"},[n.DECIMALNUMBER]:{type:"F",align:"right"},[n.INTEGERNUMBER]:{type:"I",align:"right"},[n.SEARCH]:{type:"S",align:"right"}},y=class{constructor(e){t(this,e),this._selectedNumber=0,this._customPrefix="$custom$",this._releasedToExport=[u.EXPORT_TO_PDF,u.EXPORT_TO_XLS,u.EXPORT_BY_EMAIL,u.EXPORT_PDF_TO_EMAIL,u.EXPORT_XLS_TO_EMAIL,u.EXPORT_PAGE_TO_PDF,u.EXPORT_PAGE_TO_XLS,u.EXPORT_ALL_RECORDS_TO_PDF,u.EXPORT_ALL_RECORDS_TO_XLS],this._items=[],this._showDropdown=!1,this.provider=null,this.messagesBuilder=void 0}async exportByEmail(){const t=this._selectedNumber;this._snkEmailSender.open({type:t>0?"selection":"all",selectedRows:t,email:{attachments:[{name:this._appLabel}]},resolver:({type:t,format:e,email:{to:i,subject:s,message:o}})=>{var r;const n=null!==(r=m[null==e?void 0:e.toUpperCase()])&&void 0!==r?r:m.PDF;this.resolveExporter({type:t,methodName:n,to:i,subject:s,message:o,fileName:this._appLabel,gridTitle:this._appLabel},(()=>{this._snkEmailSender.close(),d.info(this.getMessage("snkDataExporter.message.emailSuccess"),{iconName:"check"})}))}})}getMessage(t,e){if(null==this.messagesBuilder){const t=g.getNearestInstance(this._element);t&&(this.messagesBuilder=t.messagesBuilder)}return this.messagesBuilder.getMessage(t,e)}positionDropdown(){var t;const e=null===(t=this._ezButton)||void 0===t?void 0:t.getBoundingClientRect();null!=e&&null!=this._dropdownParent&&(this._dropdownParent.style.top=e.y+e.height+5+"px",this._dropdownParent.style.left=e.x+"px")}closeDropdown(t){const e=null==t?void 0:t.target;null!=e&&(e.closest(".snk-data-exporter")||(this._showDropdown=!1))}setEvents(){document.removeEventListener("click",this.closeDropdown.bind(this)),document.addEventListener("click",this.closeDropdown.bind(this)),document.removeEventListener("scroll",this.positionDropdown.bind(this)),document.addEventListener("scroll",this.positionDropdown.bind(this))}controlDropdown(){this._showDropdown=!this._showDropdown}async resolveExporter(t,e){null!=this.provider&&null!=t&&null!=e&&this.getExporterStrategy().executeExport(t).then((t=>e(t))).catch((t=>{console.error(t);let{title:e,message:i,statusMessage:s}=t||{};d.error(e||this.getMessage("snkDataExporter.message.exportError"),s||i||this.getMessage("snkDataExporter.message.unknownFailure"))}))}getExporterStrategy(){return null==this.provider.getRecords?new w(this.provider):new D(this.provider)}getOptionKey(t){return Object.keys(u).find((e=>u[e]===t))}getExportType(t){return t===u.EXPORT_ALL_RECORDS_TO_PDF||t===u.EXPORT_ALL_RECORDS_TO_XLS?c.ALL:t===u.EXPORT_PAGE_TO_PDF||t===u.EXPORT_PAGE_TO_XLS?c.PAGE:c.SELECTION}async dispatchExporter(t){var e,i,s;const r=this.getOptionKey(t),n=null!==(e=p[r])&&void 0!==e?e:p.EXPORT_TO_PDF,l={methodName:u[`EXPORT_TO_${n}`],fileName:this._appLabel,gridTitle:this._appLabel,exportOption:t,limit:null===(s=null===(i=this.provider)||void 0===i?void 0:i.getExportLimit)||void 0===s?void 0:s.call(i),type:this.getExportType(t)};await this.resolveExporter(l,(t=>{t.canExport||n===p.EXPORT_TO_PDF?function({fileSessionKey:t,isDownload:e}){const i=o.getContextValue("__SNK__APPLICATION__");window.open(`${window.location.protocol}//${window.location.hostname}:${window.location.port}/mge/visualizadorArquivos.mge?chaveArquivo=${t}${e?"&download=S":""}`),d.info(function(t){var e;return null===(e=null==t?void 0:t.messagesBuilder)||void 0===e?void 0:e.getMessage("fileViewer.message.exportSuccess",void 0)}(i),{iconName:"check"})}(Object.assign(Object.assign({},t),{fileType:n})):d.error(this.getMessage("snkDataExporter.title.permission"),this.getMessage("snkDataExporter.message.exportPermission"))}))}async processExporter(t){var e,i,s,o,r,n,l;const a=null==t?void 0:t.detail,c=[u.EXPORT_PAGE_TO_PDF,u.EXPORT_PAGE_TO_XLS],p=null===(e=null==a?void 0:a.id)||void 0===e?void 0:e.includes(this._customPrefix);if((null==a?void 0:a.id)===u.EXPORT_CURRENT_PAGE)return;const m=null===(i=this.provider)||void 0===i?void 0:i.getSelectedIDs(),v=null===(s=this.provider)||void 0===s?void 0:s.getTotalRecords(),x=null===(r=null===(o=this.provider)||void 0===o?void 0:o.getPageSize)||void 0===r?void 0:r.call(o),g=null===(l=null===(n=this.provider)||void 0===n?void 0:n.getExportLimit)||void 0===l?void 0:l.call(n);let f=!1;if(c.includes(null==a?void 0:a.id)&&x<=g||p?f=!1:(null==m?void 0:m.length)?f=m.length>g:v>g&&(f=!0),f){const t=g.toLocaleString("pt-BR",{minimumFractionDigits:0}),e={title:this.getMessage("snkDataExporter.limitExceeded.title"),description:`\n ${this.getMessage("snkDataExporter.limitExceeded.description",{limit:t})}\n <br/><br/>\n <b>\n ${this.getMessage("snkDataExporter.limitExceeded.subdescription")}\n </b>\n `,cancel:this.getMessage("snkDataExporter.limitExceeded.cancel"),confirm:this.getMessage("snkDataExporter.limitExceeded.continue")};if(!await d.confirm(e.title,e.description,null,h.WARN,{labelCancel:e.cancel,labelConfirm:e.confirm}))return}if(p)return this.openPersonalizedReports(a.id),void(this._showDropdown=!1);this.getFilteredReleasedToExport().includes(null==a?void 0:a.id)&&(a.id===u.EXPORT_BY_EMAIL?this.exportByEmail():this.dispatchExporter(a.id),this._showDropdown=!1)}getFilteredReleasedToExport(){var t,e;if(null==this.provider)return this._releasedToExport;const i=null===(e=(t=this.provider).getHiddenOptions)||void 0===e?void 0:e.call(t);return null==i?this._releasedToExport:this._releasedToExport.filter((t=>!i.includes(t)))}loadItems(){const t=[];this.getFilteredReleasedToExport().forEach((e=>{var i;null===(i=this._itemBuilder)||void 0===i||i.setExportOption(e,t)})),this.loadPersonalizedItems(t)}async loadPersonalizedItems(t){var e,i;const s=null===(i=null===(e=this.provider)||void 0===e?void 0:e.getRecordID)||void 0===i?void 0:i.call(e);if(null==s)return void(this._items=t);const n=await function(t){const e=`${o.getContextValue("__SNK__APPLICATION__").getModuleName()}@DataExporterSPBean.getPersonalizedReports`,i={serviceName:e,requestBody:t};return new Promise(((t,s)=>x.get().callServiceBroker(e,r.objectToString(i)).then((e=>t(function(t){var e;const i=null===(e=null==t?void 0:t.json)||void 0===e?void 0:e.$;if(null!=i)return r.stringToObject(i)}(e)))).catch((t=>s(t)))))}({recordID:s});null==n||n.forEach((e=>{t.push({id:`${this._customPrefix}_${e.ID}`,label:e.label,group:this.getMessage("snkDataExporter.group.custom")})})),this._items=t}openPersonalizedReports(t){var e,i;const s=[],o=(null==t?void 0:t.replace(this._customPrefix,""))||"";null===(i=null===(e=this.provider)||void 0===e?void 0:e.getSelectedIDs)||void 0===i||i.call(e).forEach((({name:t,type:e,value:i},o)=>{const r={fields:[]};0===o&&(s[`PK_${t}`]={type:this.parseDataType(e),value:i},s.pks=[]);const n={nome:`PK_${t}`,tipo:this.parseDataType(e),valor:i};r.fields.push(n),s.pks.push(r)})),this._application.openApp(`${v}${o}`,s)}parseDataType(t){switch(t){case l.NUMBER:return"I";case l.DATE:return"D";default:return"S"}}loadDropdown(){var t;this._selectedNumber=(null===(t=this.provider)||void 0===t?void 0:t.getSelectedNumber())||0,this._itemBuilder=new f(this.getMessage.bind(this),this._selectedNumber),this.loadItems()}getElementID(t){return{[a.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:a.getInternalIDInfo(t)}}canShowDropdown(){var t;return this._showDropdown&&(null===(t=this._items)||void 0===t?void 0:t.length)>0}componentWillLoad(){var t;this._application=o.getContextValue("__SNK__APPLICATION__"),null===(t=this._application)||void 0===t||t.getAppLabel().then((t=>this._appLabel=t)),this.setEvents()}componentDidLoad(){null!=this._element&&(a.addIDInfo(this._element),this.positionDropdown())}componentWillUpdate(){var t;this._showDropdown&&!(null===(t=this._items)||void 0===t?void 0:t.length)&&this.loadDropdown()}componentDidUpdate(){var t;this._showDropdown?this.positionDropdown():(null===(t=this._items)||void 0===t?void 0:t.length)>0&&(this._items=[])}render(){return e(i,null,e("div",{class:`snk-data-exporter\n ${this.canShowDropdown()?" ez-elevation--16":""}\n `},e("ez-button",Object.assign({ref:t=>this._ezButton=t,iconName:"file-download",size:"small",mode:"icon",title:this.getMessage("snkDataExporter.group.export.title"),onClick:()=>this.controlDropdown()},this.getElementID("button"))),e("div",Object.assign({ref:t=>this._dropdownParent=t,class:`snk-data-exporter__dropdown\n ${this.canShowDropdown()?"snk-data-exporter__dropdown--show":""}\n `},this.getElementID("dropdown")),this.canShowDropdown()&&e("ez-dropdown",Object.assign({items:this._items,onEzClick:t=>this.processExporter(t)},this.getElementID("dropdown"))))),this.canShowDropdown()&&e("div",Object.assign({class:"ez-scrim ez-scrim--light"},this.getElementID("ezScrim"))),e("snk-exporter-email-sender",Object.assign({ref:t=>this._snkEmailSender=t,getMessage:(t,e)=>this.getMessage(t,e)},this.getElementID("snkExporterEmailSender"))))}get _element(){return s(this)}};y.style=".sc-snk-data-exporter-h{display:flex;width:fit-content;height:fit-content}.snk-data-exporter.sc-snk-data-exporter{display:flex;width:fit-content;height:fit-content}.snk-data-exporter__dropdown.sc-snk-data-exporter{display:none}.snk-data-exporter__dropdown--show.sc-snk-data-exporter{display:flex;flex-direction:column;position:fixed}.snk-data-exporter__dropdown.sc-snk-data-exporter>ez-dropdown.sc-snk-data-exporter{position:relative}";export{y as snk_data_exporter}
@@ -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{Action as n,StringUtils as a,ElementIDUtils as o,ApplicationContext as r,KeyboardManager as d}from"@sankhyalabs/core";import"./p-ccd1ab5b.js";import"./p-328236dd.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-50dd4ef8.js";import"./p-ff1990ad.js";import"./p-02459408.js";import{V as u}from"./p-9019a32f.js";import{A as m}from"./p-513912ed.js";import{S as f}from"./p-cad964b5.js";import{T as g}from"./p-b987e15d.js";import"./p-8d884fab.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";import"./p-55798617.js";const p=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.numberingConfigChanged=i(this,"numberingConfigChanged",7),this._viewHistory=[],this._customEditors=new Map,this._customRenders=new Map,this.dataUnitInterceptor={interceptAction:t=>(t.type===n.DATA_SAVED&&(t=this.interceptDataSaved(t)),t)},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.customContainerId=`SNK-CRUD-CUSTOM-CONTAINER-${a.generateUUID()}`,this.numberingConfig=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=!0,this.multipleEditionEnabled=!0,this.paginationCounterMode="auto",this.disableNumberingConfig=!1}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)}async getNumberingConfig(){return this.numberingConfig}async updateNumberingConfig(t){this.numberingConfig=t,this.applyNumberingConfigToFields()}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 g.GRID_MODE:return this.setViewMode(u.GRID);case g.FORM_MODE:case g.UPDATE:return this.gridToForm(t!==g.UPDATE);case g.UPDATE_MULTIPLE:return this._dataUnit.isMultipleEdition=!0,this.setViewMode(u.FORM);case g.CONFIGURATOR:return this._snkConfigurator.open();case g.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=r.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(){var t;this.removeShortcuts(),null===(t=this._dataUnit)||void 0===t||t.removeInterceptor(this.dataUnitInterceptor)}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 d({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)}getLastRecordSaved(t){var i;return(null===(i=t.payload)||void 0===i?void 0:i.records.length)?t.payload.records[t.payload.records.length-1]:null}async saveNumberingConfig(){const t={entityName:this._snkDataUnit.entityName,isAutoNum:this.numberingConfig.isAutoNumbering,numInicial:this.numberingConfig.initialNumber};await this._servicesNumberingConfig.saveConfig(t)}updateNumberingConfigAfterInsert(t){var i,s;if(!(null===(i=t.payload)||void 0===i?void 0:i.changes.length)||this.disableNumberingConfig||!(null===(s=this.numberingConfig)||void 0===s?void 0:s.isAutoNumbering)||!this._fieldAutoNum)return t;if(!t.payload.changes.some((t=>"INSERT"===t.operation||"COPY"===t.operation)))return t;const e=this.getLastRecordSaved(t);if(e&&e.hasOwnProperty(this._fieldAutoNum)){const t=Number(e[this._fieldAutoNum]);this.numberingConfig.initialNumber=t,this.saveNumberingConfig()}else this.numberingConfig.initialNumber=this.numberingConfig.initialNumber+1;return this.numberingConfigChanged.emit(this.numberingConfig),t}interceptDataSaved(t){return this.updateNumberingConfigAfterInsert(t),t}onDataUnitReady(){var t;null===(t=this._dataUnit)||void 0===t||t.addInterceptor(this.dataUnitInterceptor),this.loadNumberingConfig()}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())),this.onDataUnitReady()}async loadNumberingConfig(){if(!this.numberingConfig&&this._snkDataUnit&&this._snkDataUnit.entityName&&!this.disableNumberingConfig){this._servicesNumberingConfig||(this._servicesNumberingConfig=new f(this._application,this._resourceID));try{this.numberingConfig=await this._servicesNumberingConfig.getConfig(this._snkDataUnit.entityName),this.getFieldAutoNum(),this.applyNumberingConfigToFields()}catch(t){console.error("Error loading numbering config in snk-crud:",t),this.numberingConfig={isAutoNumbering:!1,initialNumber:null}}}}getFieldAutoNum(){if(this._fieldAutoNum)return;const t=this._dataUnit.metadata.fields.find((t=>{var i;return"true"===(null===(i=t.properties)||void 0===i?void 0:i.isAutoNumField)}));this._fieldAutoNum=(null==t?void 0:t.name)||null}async applyNumberingConfigToFields(){if(!this.numberingConfig||!this._snkDataUnit||!this._fieldAutoNum)return;const t=this._dataUnit.getField(this._fieldAutoNum);t.readOnly=this.numberingConfig.isAutoNumbering,t.required=!this.numberingConfig.isAutoNumbering}handleConfiguratorEvent(t,i){if(t.stopImmediatePropagation(),"SAVE"===i)return this._guidesViewer.reloadGuides(),void this.configuratorSave.emit();this.configuratorCancel.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,entityName:this._snkDataUnit.entityName,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"]}}};p.style=".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";export{p as snk_crud}