@sankhyalabs/sankhyablocks 9.2.0-ms.9 → 9.2.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 (977) hide show
  1. package/dist/cjs/AuthorizationConfig-79ffae4b.js.gz +0 -0
  2. package/dist/cjs/{ConfigStorage-1931defc.js → ConfigStorage-8b6def32.js} +2 -2
  3. package/dist/cjs/ConfigStorage-8b6def32.js.gz +0 -0
  4. package/dist/cjs/{DataFetcher-ad9fb3bb.js → DataFetcher-2c37b6a1.js} +52 -1
  5. package/dist/cjs/DataFetcher-2c37b6a1.js.gz +0 -0
  6. package/dist/cjs/FormConfigHelper-ebb77625.js.gz +0 -0
  7. package/dist/cjs/GetSelectedRecordsIDsInfo-bd50caf1.js.gz +0 -0
  8. package/dist/cjs/IFetchDataExporterParams-e78ec415.js.gz +0 -0
  9. package/dist/cjs/{ISave-18ffb73e.js → ISave-b22b3cf0.js} +1 -1
  10. package/dist/cjs/ISave-b22b3cf0.js.gz +0 -0
  11. package/dist/cjs/ParamType-90b440a0.js.gz +0 -0
  12. package/dist/cjs/PersonalizedFilterUtils-7259cf65.js.gz +0 -0
  13. package/dist/cjs/PrintUtils-bcaeb82f.js.gz +0 -0
  14. package/dist/cjs/ResourceIDUtils-5ff86aa7.js.gz +0 -0
  15. package/dist/cjs/{SnkFormConfigManager-65e5288e.js → SnkFormConfigManager-477a27de.js} +2 -2
  16. package/dist/cjs/SnkFormConfigManager-477a27de.js.gz +0 -0
  17. package/dist/cjs/{ClientSideExporterProvider-994f6e26.js → SnkMultiSelectionListDataSource-b7ab26ba.js} +82 -79
  18. package/dist/cjs/SnkMultiSelectionListDataSource-b7ab26ba.js.gz +0 -0
  19. package/dist/cjs/{auth-fetcher-afbe69ab.js → auth-fetcher-78a90b36.js} +1 -1
  20. package/dist/cjs/auth-fetcher-78a90b36.js.gz +0 -0
  21. package/dist/cjs/config-header.cjs.entry.js.gz +0 -0
  22. package/dist/cjs/configs-button.cjs.entry.js.gz +0 -0
  23. package/dist/cjs/constants-6d82e405.js.gz +0 -0
  24. package/dist/cjs/{dataunit-fetcher-c7253b02.js → dataunit-fetcher-877944a9.js} +1 -1
  25. package/dist/cjs/dataunit-fetcher-877944a9.js.gz +0 -0
  26. package/dist/cjs/default-filters-a09bf82b.js.gz +0 -0
  27. package/dist/cjs/field-config_2.cjs.entry.js.gz +0 -0
  28. package/dist/cjs/fields-layout.cjs.entry.js.gz +0 -0
  29. package/dist/cjs/fields-selector.cjs.entry.js.gz +0 -0
  30. package/dist/cjs/filter-item-type.enum-a7ffdaa6.js.gz +0 -0
  31. package/dist/cjs/filter-type.enum-2bb46d2a.js.gz +0 -0
  32. package/dist/cjs/filter-validate-6993f6f2.js +30 -0
  33. package/dist/cjs/filter-validate-6993f6f2.js.gz +0 -0
  34. package/dist/cjs/filterNumberVariation-d65332da.js.gz +0 -0
  35. package/dist/cjs/{form-config-fetcher-f6e66d64.js → form-config-fetcher-dee08eb4.js} +1 -1
  36. package/dist/cjs/form-config-fetcher-dee08eb4.js.gz +0 -0
  37. package/dist/cjs/guides-configurator.cjs.entry.js.gz +0 -0
  38. package/dist/cjs/{index-0ad2baeb.js → index-13d05f03.js} +21 -5
  39. package/dist/cjs/index-13d05f03.js.gz +0 -0
  40. package/dist/cjs/index-1cf293c1.js +8 -8
  41. package/dist/cjs/index-1cf293c1.js.gz +0 -0
  42. package/dist/cjs/index-62760a9c.js.gz +0 -0
  43. package/dist/cjs/index-8d94b7e0.js.gz +0 -0
  44. package/dist/cjs/index-e3e39724.js.gz +0 -0
  45. package/dist/cjs/index.cjs.js.gz +0 -0
  46. package/dist/cjs/loader.cjs.js +1 -1
  47. package/dist/cjs/loader.cjs.js.gz +0 -0
  48. package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
  49. package/dist/cjs/pesquisa-grid_2.cjs.entry.js.gz +0 -0
  50. package/dist/cjs/presentationMode-52ec3bdd.js.gz +0 -0
  51. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  52. package/dist/cjs/sankhyablocks.cjs.js.gz +0 -0
  53. package/dist/cjs/snk-actions-button_8.cjs.entry.js +5 -5
  54. package/dist/cjs/snk-actions-button_8.cjs.entry.js.gz +0 -0
  55. package/dist/cjs/snk-actions-form.cjs.entry.js.gz +0 -0
  56. package/dist/cjs/snk-application.cjs.entry.js +8 -7
  57. package/dist/cjs/snk-application.cjs.entry.js.gz +0 -0
  58. package/dist/cjs/snk-attach.cjs.entry.js +7 -7
  59. package/dist/cjs/snk-attach.cjs.entry.js.gz +0 -0
  60. package/dist/cjs/snk-client-confirm.cjs.entry.js.gz +0 -0
  61. package/dist/cjs/snk-configurator.cjs.entry.js.gz +0 -0
  62. package/dist/cjs/snk-crud.cjs.entry.js +7 -7
  63. package/dist/cjs/snk-crud.cjs.entry.js.gz +0 -0
  64. package/dist/cjs/snk-custom-slot-elements.cjs.entry.js.gz +0 -0
  65. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
  66. package/dist/cjs/snk-data-exporter.cjs.entry.js.gz +0 -0
  67. package/dist/cjs/{snk-data-unit-72715da9.js → snk-data-unit-0cfa7622.js} +3 -3
  68. package/dist/cjs/snk-data-unit-0cfa7622.js.gz +0 -0
  69. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
  70. package/dist/cjs/snk-data-unit.cjs.entry.js.gz +0 -0
  71. package/dist/cjs/snk-default-filter.cjs.entry.js.gz +0 -0
  72. package/dist/cjs/snk-detail-view.cjs.entry.js +9 -9
  73. package/dist/cjs/snk-detail-view.cjs.entry.js.gz +0 -0
  74. package/dist/cjs/snk-entity-list.cjs.entry.js +10 -3
  75. package/dist/cjs/snk-entity-list.cjs.entry.js.gz +0 -0
  76. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js.gz +0 -0
  77. package/dist/cjs/snk-expression-group_2.cjs.entry.js +1 -1
  78. package/dist/cjs/snk-expression-group_2.cjs.entry.js.gz +0 -0
  79. package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js.gz +0 -0
  80. package/dist/cjs/snk-filter-bar_4.cjs.entry.js +167 -100
  81. package/dist/cjs/snk-filter-bar_4.cjs.entry.js.gz +0 -0
  82. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +23 -2
  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 +20 -2
  85. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js.gz +0 -0
  86. package/dist/cjs/snk-filter-detail.cjs.entry.js +25 -8
  87. package/dist/cjs/snk-filter-detail.cjs.entry.js.gz +0 -0
  88. package/dist/cjs/snk-filter-field-search_2.cjs.entry.js.gz +0 -0
  89. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +9 -14
  90. package/dist/cjs/snk-filter-modal-item.cjs.entry.js.gz +0 -0
  91. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +16 -3
  92. package/dist/cjs/snk-filter-multi-select.cjs.entry.js.gz +0 -0
  93. package/dist/cjs/snk-filter-number.cjs.entry.js +34 -3
  94. package/dist/cjs/snk-filter-number.cjs.entry.js.gz +0 -0
  95. package/dist/cjs/snk-filter-period.cjs.entry.js +59 -14
  96. package/dist/cjs/snk-filter-period.cjs.entry.js.gz +0 -0
  97. package/dist/cjs/snk-filter-search.cjs.entry.js +14 -3
  98. package/dist/cjs/snk-filter-search.cjs.entry.js.gz +0 -0
  99. package/dist/cjs/snk-filter-text.cjs.entry.js +18 -1
  100. package/dist/cjs/snk-filter-text.cjs.entry.js.gz +0 -0
  101. package/dist/cjs/snk-form-summary.cjs.entry.js.gz +0 -0
  102. package/dist/cjs/snk-form-view.cjs.entry.js.gz +0 -0
  103. package/dist/cjs/snk-form_2.cjs.entry.js +4 -4
  104. package/dist/cjs/snk-form_2.cjs.entry.js.gz +0 -0
  105. package/dist/cjs/snk-grid.cjs.entry.js +106 -59
  106. package/dist/cjs/snk-grid.cjs.entry.js.gz +0 -0
  107. package/dist/cjs/{snk-guides-viewer-c23ed218.js → snk-guides-viewer-38277265.js} +6 -6
  108. package/dist/cjs/snk-guides-viewer-38277265.js.gz +0 -0
  109. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
  110. package/dist/cjs/snk-guides-viewer.cjs.entry.js.gz +0 -0
  111. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js.gz +0 -0
  112. package/dist/cjs/snk-personalized-filter.cjs.entry.js +14 -6
  113. package/dist/cjs/snk-personalized-filter.cjs.entry.js.gz +0 -0
  114. package/dist/cjs/snk-pesquisa.cjs.entry.js +4 -4
  115. package/dist/cjs/snk-pesquisa.cjs.entry.js.gz +0 -0
  116. package/dist/cjs/snk-print-selector.cjs.entry.js.gz +0 -0
  117. package/dist/cjs/snk-simple-bar.cjs.entry.js +5 -5
  118. package/dist/cjs/snk-simple-bar.cjs.entry.js.gz +0 -0
  119. package/dist/cjs/snk-simple-crud.cjs.entry.js +60 -23
  120. package/dist/cjs/snk-simple-crud.cjs.entry.js.gz +0 -0
  121. package/dist/cjs/snk-taskbar.cjs.entry.js +2 -2
  122. package/dist/cjs/snk-taskbar.cjs.entry.js.gz +0 -0
  123. package/dist/cjs/sortable.esm-9a110bb7.js.gz +0 -0
  124. package/dist/cjs/{taskbar-elements-3b74cd21.js → taskbar-elements-fb5d1e08.js} +1 -1
  125. package/dist/cjs/taskbar-elements-fb5d1e08.js.gz +0 -0
  126. package/dist/cjs/taskbar-processor-2fba34a8.js.gz +0 -0
  127. package/dist/cjs/teste-pesquisa.cjs.entry.js.gz +0 -0
  128. package/dist/collection/components/snk-actions-button/actions/enum/ActionsType.js.gz +0 -0
  129. package/dist/collection/components/snk-actions-button/actions/enum/ParamType.js.gz +0 -0
  130. package/dist/collection/components/snk-actions-button/actions/enum/RefreshType.js.gz +0 -0
  131. package/dist/collection/components/snk-actions-button/actions/executor/java.executor.js.gz +0 -0
  132. package/dist/collection/components/snk-actions-button/actions/executor/javascript.executor.js.gz +0 -0
  133. package/dist/collection/components/snk-actions-button/actions/executor/launch-screen.executor.js.gz +0 -0
  134. package/dist/collection/components/snk-actions-button/actions/executor/procedure.executor.js.gz +0 -0
  135. package/dist/collection/components/snk-actions-button/actions/factory/executor.factory.js.gz +0 -0
  136. package/dist/collection/components/snk-actions-button/actions/index.js.gz +0 -0
  137. package/dist/collection/components/snk-actions-button/actions/interfaces/IAction.js.gz +0 -0
  138. package/dist/collection/components/snk-actions-button/actions/interfaces/IExecSource.js.gz +0 -0
  139. package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActions.js.gz +0 -0
  140. package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActionsProps.js.gz +0 -0
  141. package/dist/collection/components/snk-actions-button/actions/interfaces/IResultParam.js.gz +0 -0
  142. package/dist/collection/components/snk-actions-button/clientEvent/index.js.gz +0 -0
  143. package/dist/collection/components/snk-actions-button/clientEvent/interfaces/IClientEventConfirm.js.gz +0 -0
  144. package/dist/collection/components/snk-actions-button/interfaces/index.js.gz +0 -0
  145. package/dist/collection/components/snk-actions-button/snk-actions-button.css.gz +0 -0
  146. package/dist/collection/components/snk-actions-button/snk-actions-button.js.gz +0 -0
  147. package/dist/collection/components/snk-actions-button/subcomponents/snk-actions-form.js.gz +0 -0
  148. package/dist/collection/components/snk-actions-button/subcomponents/snk-client-confirm.js.gz +0 -0
  149. package/dist/collection/components/snk-application/__mocks__/snk-application.js.gz +0 -0
  150. package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js.gz +0 -0
  151. package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js.gz +0 -0
  152. package/dist/collection/components/snk-application/request-listener/RequestListenerFactory.js.gz +0 -0
  153. package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js.gz +0 -0
  154. package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js.gz +0 -0
  155. package/dist/collection/components/snk-application/snk-application.css.gz +0 -0
  156. package/dist/collection/components/snk-application/snk-application.js +3 -2
  157. package/dist/collection/components/snk-application/snk-application.js.gz +0 -0
  158. package/dist/collection/components/snk-attach/interfaces/ICrudConfig.js.gz +0 -0
  159. package/dist/collection/components/snk-attach/interfaces/TFetcherType.js.gz +0 -0
  160. package/dist/collection/components/snk-attach/interfaces/index.js.gz +0 -0
  161. package/dist/collection/components/snk-attach/snk-attach.css.gz +0 -0
  162. package/dist/collection/components/snk-attach/snk-attach.js.gz +0 -0
  163. package/dist/collection/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.js.gz +0 -0
  164. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js.gz +0 -0
  165. package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js.gz +0 -0
  166. package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js.gz +0 -0
  167. package/dist/collection/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.js.gz +0 -0
  168. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js.gz +0 -0
  169. package/dist/collection/components/snk-attach/structure/index.js.gz +0 -0
  170. package/dist/collection/components/snk-configurator/AuthorizationConfig.js.gz +0 -0
  171. package/dist/collection/components/snk-configurator/snk-configurator.css.gz +0 -0
  172. package/dist/collection/components/snk-configurator/snk-configurator.js.gz +0 -0
  173. package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js.gz +0 -0
  174. package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js.gz +0 -0
  175. package/dist/collection/components/snk-crud/snk-crud.css.gz +0 -0
  176. package/dist/collection/components/snk-crud/snk-crud.js.gz +0 -0
  177. package/dist/collection/components/snk-crud/subcomponents/CardFormResizeObserver.js.gz +0 -0
  178. package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js.gz +0 -0
  179. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css.gz +0 -0
  180. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js.gz +0 -0
  181. package/dist/collection/components/snk-crud/subcomponents/snk-form-summary.css.gz +0 -0
  182. package/dist/collection/components/snk-crud/subcomponents/snk-form-summary.js.gz +0 -0
  183. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.css.gz +0 -0
  184. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js.gz +0 -0
  185. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css.gz +0 -0
  186. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js.gz +0 -0
  187. package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.css.gz +0 -0
  188. package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.js.gz +0 -0
  189. package/dist/collection/components/snk-data-exporter/data/attachment.js.gz +0 -0
  190. package/dist/collection/components/snk-data-exporter/data/email.js.gz +0 -0
  191. package/dist/collection/components/snk-data-exporter/data/export-config.js.gz +0 -0
  192. package/dist/collection/components/snk-data-exporter/data/export-result.js.gz +0 -0
  193. package/dist/collection/components/snk-data-exporter/data/report.js.gz +0 -0
  194. package/dist/collection/components/snk-data-exporter/exporter-email-sender/email-info-step.js.gz +0 -0
  195. package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js.gz +0 -0
  196. package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js.gz +0 -0
  197. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js.gz +0 -0
  198. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js.gz +0 -0
  199. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js.gz +0 -0
  200. package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js.gz +0 -0
  201. package/dist/collection/components/snk-data-exporter/interfaces/IRecordID.js.gz +0 -0
  202. package/dist/collection/components/snk-data-exporter/interfaces/ISelectedID.js.gz +0 -0
  203. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +4 -1
  204. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js.gz +0 -0
  205. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js.gz +0 -0
  206. package/dist/collection/components/snk-data-exporter/snk-data-exporter.css.gz +0 -0
  207. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js.gz +0 -0
  208. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js.gz +0 -0
  209. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js.gz +0 -0
  210. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js.gz +0 -0
  211. package/dist/collection/components/snk-data-unit/MultipleUpdateHelper.js.gz +0 -0
  212. package/dist/collection/components/snk-data-unit/snk-data-unit.js +1 -1
  213. package/dist/collection/components/snk-data-unit/snk-data-unit.js.gz +0 -0
  214. package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js.gz +0 -0
  215. package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js.gz +0 -0
  216. package/dist/collection/components/snk-entity-list/snk-entity-list.css.gz +0 -0
  217. package/dist/collection/components/snk-entity-list/snk-entity-list.js +28 -4
  218. package/dist/collection/components/snk-entity-list/snk-entity-list.js.gz +0 -0
  219. package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js.gz +0 -0
  220. package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/filterNumberVariation.js.gz +0 -0
  221. package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/presentationMode.js.gz +0 -0
  222. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +72 -2
  223. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js.gz +0 -0
  224. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +73 -2
  225. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js.gz +0 -0
  226. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +51 -5
  227. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js.gz +0 -0
  228. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +83 -3
  229. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js.gz +0 -0
  230. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +118 -27
  231. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js.gz +0 -0
  232. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +49 -5
  233. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js.gz +0 -0
  234. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +71 -1
  235. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js.gz +0 -0
  236. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.css.gz +0 -0
  237. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js.gz +0 -0
  238. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.js.gz +0 -0
  239. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js.gz +0 -0
  240. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +62 -11
  241. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js.gz +0 -0
  242. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css.gz +0 -0
  243. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +70 -8
  244. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js.gz +0 -0
  245. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js.gz +0 -0
  246. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +0 -4
  247. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css.gz +0 -0
  248. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +112 -16
  249. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js.gz +0 -0
  250. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.css.gz +0 -0
  251. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.js.gz +0 -0
  252. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.css.gz +0 -0
  253. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +8 -16
  254. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js.gz +0 -0
  255. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css.gz +0 -0
  256. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +128 -51
  257. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js.gz +0 -0
  258. package/dist/collection/components/snk-filter-bar/types/custom-element-filter.js.gz +0 -0
  259. package/dist/collection/components/snk-filter-bar/types/default-filters.js.gz +0 -0
  260. package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js.gz +0 -0
  261. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
  262. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js.gz +0 -0
  263. package/dist/collection/components/snk-filter-bar/utils/filter-validate.js +24 -0
  264. package/dist/collection/components/snk-filter-bar/utils/filter-validate.js.gz +0 -0
  265. package/dist/collection/components/snk-filter-bar/utils/filters-mock.js.gz +0 -0
  266. package/dist/collection/components/snk-filter-field-search/interfaces/index.js.gz +0 -0
  267. package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.css.gz +0 -0
  268. package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.js.gz +0 -0
  269. package/dist/collection/components/snk-filter-field-search/subcomponents/index.js.gz +0 -0
  270. package/dist/collection/components/snk-filter-field-search/subcomponents/list-item.js.gz +0 -0
  271. package/dist/collection/components/snk-form/snk-form.css.gz +0 -0
  272. package/dist/collection/components/snk-form/snk-form.js.gz +0 -0
  273. package/dist/collection/components/snk-form-config/FormConfigHelper.js.gz +0 -0
  274. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js.gz +0 -0
  275. package/dist/collection/components/snk-form-config/config-header/config-header.css.gz +0 -0
  276. package/dist/collection/components/snk-form-config/config-header/config-header.js.gz +0 -0
  277. package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.css.gz +0 -0
  278. package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.js.gz +0 -0
  279. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css.gz +0 -0
  280. package/dist/collection/components/snk-form-config/field-item/field-config/field-config.js.gz +0 -0
  281. package/dist/collection/components/snk-form-config/field-item/field-item.css.gz +0 -0
  282. package/dist/collection/components/snk-form-config/field-item/field-item.js.gz +0 -0
  283. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css.gz +0 -0
  284. package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js.gz +0 -0
  285. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.css.gz +0 -0
  286. package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js.gz +0 -0
  287. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css.gz +0 -0
  288. package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js.gz +0 -0
  289. package/dist/collection/components/snk-form-config/snk-form-config.css.gz +0 -0
  290. package/dist/collection/components/snk-form-config/snk-form-config.js.gz +0 -0
  291. package/dist/collection/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.js.gz +0 -0
  292. package/dist/collection/components/snk-grid/snk-grid.css.gz +0 -0
  293. package/dist/collection/components/snk-grid/snk-grid.js +176 -55
  294. package/dist/collection/components/snk-grid/snk-grid.js.gz +0 -0
  295. package/dist/collection/components/snk-grid-config/snk-grid-config.css.gz +0 -0
  296. package/dist/collection/components/snk-grid-config/snk-grid-config.js.gz +0 -0
  297. package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.css.gz +0 -0
  298. package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.js.gz +0 -0
  299. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.css.gz +0 -0
  300. package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js.gz +0 -0
  301. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.css.gz +0 -0
  302. package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js.gz +0 -0
  303. package/dist/collection/components/snk-personalized-filter/interfaces/IExpressionGroup.js.gz +0 -0
  304. package/dist/collection/components/snk-personalized-filter/interfaces/IExpressionItem.js.gz +0 -0
  305. package/dist/collection/components/snk-personalized-filter/interfaces/IParameter.js.gz +0 -0
  306. package/dist/collection/components/snk-personalized-filter/interfaces/IPersonalizedFilter.js.gz +0 -0
  307. package/dist/collection/components/snk-personalized-filter/interfaces/ISystemFilterConfig.js.gz +0 -0
  308. package/dist/collection/components/snk-personalized-filter/interfaces/IUserFilterConfig.js.gz +0 -0
  309. package/dist/collection/components/snk-personalized-filter/interfaces/index.js.gz +0 -0
  310. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.css.gz +0 -0
  311. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +83 -21
  312. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js.gz +0 -0
  313. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css.gz +0 -0
  314. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js.gz +0 -0
  315. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js.gz +0 -0
  316. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.css.gz +0 -0
  317. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js.gz +0 -0
  318. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.css.gz +0 -0
  319. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.js.gz +0 -0
  320. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.css.gz +0 -0
  321. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js.gz +0 -0
  322. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.css.gz +0 -0
  323. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js.gz +0 -0
  324. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js.gz +0 -0
  325. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css.gz +0 -0
  326. package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js.gz +0 -0
  327. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css.gz +0 -0
  328. package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js.gz +0 -0
  329. package/dist/collection/components/snk-pesquisa/pesquisaHelper.js.gz +0 -0
  330. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css.gz +0 -0
  331. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +80 -14
  332. package/dist/collection/components/snk-pesquisa/snk-pesquisa.js.gz +0 -0
  333. package/dist/collection/components/snk-print-selector/snk-print-selector.css.gz +0 -0
  334. package/dist/collection/components/snk-print-selector/snk-print-selector.js.gz +0 -0
  335. package/dist/collection/components/snk-simple-bar/snk-simple-bar.css.gz +0 -0
  336. package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +9 -9
  337. package/dist/collection/components/snk-simple-bar/snk-simple-bar.js.gz +0 -0
  338. package/dist/collection/components/snk-simple-crud/snk-simple-crud.constants.js.gz +0 -0
  339. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css.gz +0 -0
  340. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +414 -119
  341. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js.gz +0 -0
  342. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css.gz +0 -0
  343. package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js.gz +0 -0
  344. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css.gz +0 -0
  345. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js.gz +0 -0
  346. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js.gz +0 -0
  347. package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.css.gz +0 -0
  348. package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js.gz +0 -0
  349. package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js.gz +0 -0
  350. package/dist/collection/components/snk-taskbar/snk-taskbar.css.gz +0 -0
  351. package/dist/collection/components/snk-taskbar/snk-taskbar.js.gz +0 -0
  352. package/dist/collection/components/teste-pesquisa/teste-pesquisa.css.gz +0 -0
  353. package/dist/collection/components/teste-pesquisa/teste-pesquisa.js.gz +0 -0
  354. package/dist/collection/index.js.gz +0 -0
  355. package/dist/collection/lib/@types/index.js.gz +0 -0
  356. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js.gz +0 -0
  357. package/dist/collection/lib/applet-caller/applet-caller.js.gz +0 -0
  358. package/dist/collection/lib/auth/mgeauthorization.module.js.gz +0 -0
  359. package/dist/collection/lib/configs/ConfigStorage.js.gz +0 -0
  360. package/dist/collection/lib/configs/LayoutFormConfig.js.gz +0 -0
  361. package/dist/collection/lib/dataUnit/InMemoryLoader.js.gz +0 -0
  362. package/dist/collection/lib/dataUnit/ValueFormatter.js.gz +0 -0
  363. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js.gz +0 -0
  364. package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js.gz +0 -0
  365. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +1 -0
  366. package/dist/collection/lib/http/data-fetcher/DataFetcher.js.gz +0 -0
  367. package/dist/collection/lib/http/data-fetcher/custom-xhr-override.js +39 -0
  368. package/dist/collection/lib/http/data-fetcher/custom-xhr-override.js.gz +0 -0
  369. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js.gz +0 -0
  370. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js.gz +0 -0
  371. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js.gz +0 -0
  372. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js.gz +0 -0
  373. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js.gz +0 -0
  374. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js.gz +0 -0
  375. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/ISave.js.gz +0 -0
  376. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/index.js.gz +0 -0
  377. package/dist/collection/lib/http/data-fetcher/fetchers/application-config-fetcher.js.gz +0 -0
  378. package/dist/collection/lib/http/data-fetcher/fetchers/auth-fetcher.js.gz +0 -0
  379. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js.gz +0 -0
  380. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js.gz +0 -0
  381. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js.gz +0 -0
  382. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js.gz +0 -0
  383. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js.gz +0 -0
  384. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js.gz +0 -0
  385. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataResult.js.gz +0 -0
  386. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataStrategy.js.gz +0 -0
  387. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadingInfo.js.gz +0 -0
  388. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRecordField.js.gz +0 -0
  389. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IResponseRecord.js.gz +0 -0
  390. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js.gz +0 -0
  391. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DataUnitStrategy.js.gz +0 -0
  392. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js.gz +0 -0
  393. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js.gz +0 -0
  394. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.js.gz +0 -0
  395. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.js.gz +0 -0
  396. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterResponse.js.gz +0 -0
  397. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IPersonalizedReport.js.gz +0 -0
  398. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/permission-export-pdf.js.gz +0 -0
  399. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher.js.gz +0 -0
  400. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js.gz +0 -0
  401. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js.gz +0 -0
  402. package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js.gz +0 -0
  403. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js.gz +0 -0
  404. package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js.gz +0 -0
  405. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js.gz +0 -0
  406. package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js.gz +0 -0
  407. package/dist/collection/lib/http/data-fetcher/fetchers/totals-fetcher.js.gz +0 -0
  408. package/dist/collection/lib/http/data-fetcher/interfaces/IClientEventResponse.js.gz +0 -0
  409. package/dist/collection/lib/http/data-fetcher/recaller/GraphQLRecaller.js.gz +0 -0
  410. package/dist/collection/lib/http/data-fetcher/recaller/IDataFetcherRecaller.js.gz +0 -0
  411. package/dist/collection/lib/http/data-fetcher/recaller/ServiceBrokerRecaller.js.gz +0 -0
  412. package/dist/collection/lib/http/data-fetcher/state/LoadStateManager.js.gz +0 -0
  413. package/dist/collection/lib/index.js.gz +0 -0
  414. package/dist/collection/lib/message/SnkMessageBuilder.js.gz +0 -0
  415. package/dist/collection/lib/message/messageResourceEnUSUtils.js.gz +0 -0
  416. package/dist/collection/lib/message/messageResourceEsESUtils.js.gz +0 -0
  417. package/dist/collection/lib/message/messageResourcePtBRUtils.js.gz +0 -0
  418. package/dist/collection/lib/message/resources/en-us/continuousInsertUtils.msg.js.gz +0 -0
  419. package/dist/collection/lib/message/resources/en-us/crud-utils.msg.js.gz +0 -0
  420. package/dist/collection/lib/message/resources/en-us/dataFetcher.msg.js.gz +0 -0
  421. package/dist/collection/lib/message/resources/en-us/dataUnitDataLoaderHelper.msg.js.gz +0 -0
  422. package/dist/collection/lib/message/resources/en-us/file-viewer.msg.js.gz +0 -0
  423. package/dist/collection/lib/message/resources/en-us/snk-actions-button.msg.js.gz +0 -0
  424. package/dist/collection/lib/message/resources/en-us/snk-application.msg.js.gz +0 -0
  425. package/dist/collection/lib/message/resources/en-us/snk-attach.msg.js.gz +0 -0
  426. package/dist/collection/lib/message/resources/en-us/snk-configurator.msg.js.gz +0 -0
  427. package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js.gz +0 -0
  428. package/dist/collection/lib/message/resources/en-us/snk-data-exporter.msg.js.gz +0 -0
  429. package/dist/collection/lib/message/resources/en-us/snk-data-unit.msg.js.gz +0 -0
  430. package/dist/collection/lib/message/resources/en-us/snk-entity-list.msg.js.gz +0 -0
  431. package/dist/collection/lib/message/resources/en-us/snk-error-handler.msg.js.gz +0 -0
  432. package/dist/collection/lib/message/resources/en-us/snk-exporter.msg.js.gz +0 -0
  433. package/dist/collection/lib/message/resources/en-us/snk-filter-bar.msg.js +1 -0
  434. package/dist/collection/lib/message/resources/en-us/snk-filter-bar.msg.js.gz +0 -0
  435. package/dist/collection/lib/message/resources/en-us/snk-filter-field-search.msg.js.gz +0 -0
  436. package/dist/collection/lib/message/resources/en-us/snk-filter-list.msg.js.gz +0 -0
  437. package/dist/collection/lib/message/resources/en-us/snk-filter-param-config.msg.js.gz +0 -0
  438. package/dist/collection/lib/message/resources/en-us/snk-form.msg.js.gz +0 -0
  439. package/dist/collection/lib/message/resources/en-us/snk-grid.msg.js +4 -0
  440. package/dist/collection/lib/message/resources/en-us/snk-grid.msg.js.gz +0 -0
  441. package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js.gz +0 -0
  442. package/dist/collection/lib/message/resources/en-us/snk-personalized-filter.msg.js.gz +0 -0
  443. package/dist/collection/lib/message/resources/en-us/snk-pesquisa.msg.js.gz +0 -0
  444. package/dist/collection/lib/message/resources/en-us/snk-print-selector.msg.js.gz +0 -0
  445. package/dist/collection/lib/message/resources/en-us/snk-simple-bar.msg.js.gz +0 -0
  446. package/dist/collection/lib/message/resources/en-us/snk-simple-crud.msg.js.gz +0 -0
  447. package/dist/collection/lib/message/resources/en-us/snk-simple-form-config.msg.js.gz +0 -0
  448. package/dist/collection/lib/message/resources/en-us/snk-taskbar.msg.js.gz +0 -0
  449. package/dist/collection/lib/message/resources/es-es/continuousInsertUtils.msg.js.gz +0 -0
  450. package/dist/collection/lib/message/resources/es-es/crud-utils.msg.js.gz +0 -0
  451. package/dist/collection/lib/message/resources/es-es/dataFetcher.msg.js.gz +0 -0
  452. package/dist/collection/lib/message/resources/es-es/dataUnitDataLoaderHelper.msg.js.gz +0 -0
  453. package/dist/collection/lib/message/resources/es-es/file-viewer.msg.js.gz +0 -0
  454. package/dist/collection/lib/message/resources/es-es/snk-actions-button.msg.js.gz +0 -0
  455. package/dist/collection/lib/message/resources/es-es/snk-application.msg.js.gz +0 -0
  456. package/dist/collection/lib/message/resources/es-es/snk-attach.msg.js.gz +0 -0
  457. package/dist/collection/lib/message/resources/es-es/snk-configurator.msg.js.gz +0 -0
  458. package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js.gz +0 -0
  459. package/dist/collection/lib/message/resources/es-es/snk-data-exporter.msg.js.gz +0 -0
  460. package/dist/collection/lib/message/resources/es-es/snk-data-unit.msg.js.gz +0 -0
  461. package/dist/collection/lib/message/resources/es-es/snk-entity-list.msg.js.gz +0 -0
  462. package/dist/collection/lib/message/resources/es-es/snk-error-handler.msg.js.gz +0 -0
  463. package/dist/collection/lib/message/resources/es-es/snk-exporter.msg.js.gz +0 -0
  464. package/dist/collection/lib/message/resources/es-es/snk-filter-bar.msg.js +1 -0
  465. package/dist/collection/lib/message/resources/es-es/snk-filter-bar.msg.js.gz +0 -0
  466. package/dist/collection/lib/message/resources/es-es/snk-filter-field-search.msg.js.gz +0 -0
  467. package/dist/collection/lib/message/resources/es-es/snk-filter-list.msg.js.gz +0 -0
  468. package/dist/collection/lib/message/resources/es-es/snk-filter-param-config.msg.js.gz +0 -0
  469. package/dist/collection/lib/message/resources/es-es/snk-form.msg.js.gz +0 -0
  470. package/dist/collection/lib/message/resources/es-es/snk-grid.msg.js +4 -0
  471. package/dist/collection/lib/message/resources/es-es/snk-grid.msg.js.gz +0 -0
  472. package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js.gz +0 -0
  473. package/dist/collection/lib/message/resources/es-es/snk-personalized-filter.msg.js.gz +0 -0
  474. package/dist/collection/lib/message/resources/es-es/snk-pesquisa.msg.js.gz +0 -0
  475. package/dist/collection/lib/message/resources/es-es/snk-print-selector.msg.js.gz +0 -0
  476. package/dist/collection/lib/message/resources/es-es/snk-simple-bar.msg.js.gz +0 -0
  477. package/dist/collection/lib/message/resources/es-es/snk-simple-crud.msg.js.gz +0 -0
  478. package/dist/collection/lib/message/resources/es-es/snk-simple-form-config.msg.js.gz +0 -0
  479. package/dist/collection/lib/message/resources/es-es/snk-taskbar.msg.js.gz +0 -0
  480. package/dist/collection/lib/message/resources/pt-br/continuousInsertUtils.msg.js.gz +0 -0
  481. package/dist/collection/lib/message/resources/pt-br/crud-utils.msg.js.gz +0 -0
  482. package/dist/collection/lib/message/resources/pt-br/dataFetcher.msg.js.gz +0 -0
  483. package/dist/collection/lib/message/resources/pt-br/dataUnitDataLoaderHelper.msg.js.gz +0 -0
  484. package/dist/collection/lib/message/resources/pt-br/file-viewer.msg.js.gz +0 -0
  485. package/dist/collection/lib/message/resources/pt-br/snk-actions-button.msg.js.gz +0 -0
  486. package/dist/collection/lib/message/resources/pt-br/snk-application.msg.js.gz +0 -0
  487. package/dist/collection/lib/message/resources/pt-br/snk-attach.msg.js.gz +0 -0
  488. package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js.gz +0 -0
  489. package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js.gz +0 -0
  490. package/dist/collection/lib/message/resources/pt-br/snk-data-exporter.msg.js.gz +0 -0
  491. package/dist/collection/lib/message/resources/pt-br/snk-data-unit.msg.js.gz +0 -0
  492. package/dist/collection/lib/message/resources/pt-br/snk-entity-list.msg.js.gz +0 -0
  493. package/dist/collection/lib/message/resources/pt-br/snk-error-handler.msg.js.gz +0 -0
  494. package/dist/collection/lib/message/resources/pt-br/snk-exporter.msg.js.gz +0 -0
  495. package/dist/collection/lib/message/resources/pt-br/snk-filter-bar.msg.js +1 -0
  496. package/dist/collection/lib/message/resources/pt-br/snk-filter-bar.msg.js.gz +0 -0
  497. package/dist/collection/lib/message/resources/pt-br/snk-filter-field-search.msg.js.gz +0 -0
  498. package/dist/collection/lib/message/resources/pt-br/snk-filter-list.msg.js.gz +0 -0
  499. package/dist/collection/lib/message/resources/pt-br/snk-filter-param-config.msg.js.gz +0 -0
  500. package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js.gz +0 -0
  501. package/dist/collection/lib/message/resources/pt-br/snk-grid.msg.js +4 -0
  502. package/dist/collection/lib/message/resources/pt-br/snk-grid.msg.js.gz +0 -0
  503. package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js.gz +0 -0
  504. package/dist/collection/lib/message/resources/pt-br/snk-personalized-filter.msg.js.gz +0 -0
  505. package/dist/collection/lib/message/resources/pt-br/snk-pesquisa.msg.js.gz +0 -0
  506. package/dist/collection/lib/message/resources/pt-br/snk-print-selector.msg.js.gz +0 -0
  507. package/dist/collection/lib/message/resources/pt-br/snk-simple-bar.msg.js.gz +0 -0
  508. package/dist/collection/lib/message/resources/pt-br/snk-simple-crud.msg.js.gz +0 -0
  509. package/dist/collection/lib/message/resources/pt-br/snk-simple-form-config.msg.js.gz +0 -0
  510. package/dist/collection/lib/message/resources/pt-br/snk-taskbar.msg.js.gz +0 -0
  511. package/dist/collection/lib/resourceid/ResourceIDUtils.js.gz +0 -0
  512. package/dist/collection/lib/store/index.js.gz +0 -0
  513. package/dist/collection/lib/utils/ContinuousInsertUtils.js.gz +0 -0
  514. package/dist/collection/lib/utils/CrudUtils.js.gz +0 -0
  515. package/dist/collection/lib/utils/GetSelectedRecordsIDsInfo.js.gz +0 -0
  516. package/dist/collection/lib/utils/PrintUtils.js.gz +0 -0
  517. package/dist/collection/lib/utils/constants.js.gz +0 -0
  518. package/dist/collection/lib/utils/fileViewer/index.js.gz +0 -0
  519. package/dist/collection/lib/utils/fileViewer/interfaces/IFileViewerParams.js.gz +0 -0
  520. package/dist/collection/lib/utils/pesquisa.js.gz +0 -0
  521. package/dist/collection/lib/utils/urlutils.js.gz +0 -0
  522. package/dist/collection/lib/workspace/workspace.js.gz +0 -0
  523. package/dist/collection/sw.js.gz +0 -0
  524. package/dist/components/AuthorizationConfig.js.gz +0 -0
  525. package/dist/components/ConfigStorage.js.gz +0 -0
  526. package/dist/components/ContinuousInsertUtils.js +4 -1
  527. package/dist/components/ContinuousInsertUtils.js.gz +0 -0
  528. package/dist/components/DataFetcher.js +52 -1
  529. package/dist/components/DataFetcher.js.gz +0 -0
  530. package/dist/components/GetSelectedRecordsIDsInfo.js.gz +0 -0
  531. package/dist/components/ISave.js.gz +0 -0
  532. package/dist/components/ParamType.js.gz +0 -0
  533. package/dist/components/PersonalizedFilterUtils.js.gz +0 -0
  534. package/dist/components/PrintUtils.js.gz +0 -0
  535. package/dist/components/ResourceIDUtils.js.gz +0 -0
  536. package/dist/components/SnkFormConfigManager.js.gz +0 -0
  537. package/dist/components/auth-fetcher.js.gz +0 -0
  538. package/dist/components/config-header.js.gz +0 -0
  539. package/dist/components/config-header2.js.gz +0 -0
  540. package/dist/components/configs-button.js.gz +0 -0
  541. package/dist/components/configs-button2.js.gz +0 -0
  542. package/dist/components/constants.js.gz +0 -0
  543. package/dist/components/dataunit-fetcher.js.gz +0 -0
  544. package/dist/components/field-config.js.gz +0 -0
  545. package/dist/components/field-config2.js.gz +0 -0
  546. package/dist/components/field-item.js.gz +0 -0
  547. package/dist/components/field-item2.js.gz +0 -0
  548. package/dist/components/fields-layout.js.gz +0 -0
  549. package/dist/components/fields-layout2.js.gz +0 -0
  550. package/dist/components/fields-selector.js.gz +0 -0
  551. package/dist/components/fields-selector2.js.gz +0 -0
  552. package/dist/components/filter-item-type.enum.js.gz +0 -0
  553. package/dist/components/filterNumberVariation.js.gz +0 -0
  554. package/dist/components/form-config-fetcher.js.gz +0 -0
  555. package/dist/components/guides-configurator.js.gz +0 -0
  556. package/dist/components/guides-configurator2.js.gz +0 -0
  557. package/dist/components/index.js.gz +0 -0
  558. package/dist/components/index2.js +21 -5
  559. package/dist/components/index2.js.gz +0 -0
  560. package/dist/components/pesquisa-grid.js.gz +0 -0
  561. package/dist/components/pesquisa-grid2.js.gz +0 -0
  562. package/dist/components/pesquisa-tree.js.gz +0 -0
  563. package/dist/components/pesquisa-tree2.js.gz +0 -0
  564. package/dist/components/presentationMode.js.gz +0 -0
  565. package/dist/components/snk-actions-button.js.gz +0 -0
  566. package/dist/components/snk-actions-button2.js.gz +0 -0
  567. package/dist/components/snk-actions-form.js.gz +0 -0
  568. package/dist/components/snk-application.js.gz +0 -0
  569. package/dist/components/snk-application2.js +3 -2
  570. package/dist/components/snk-application2.js.gz +0 -0
  571. package/dist/components/snk-attach.js.gz +0 -0
  572. package/dist/components/snk-attach2.js.gz +0 -0
  573. package/dist/components/snk-client-confirm.js.gz +0 -0
  574. package/dist/components/snk-configurator.js.gz +0 -0
  575. package/dist/components/snk-configurator2.js.gz +0 -0
  576. package/dist/components/snk-crud.js +62 -44
  577. package/dist/components/snk-crud.js.gz +0 -0
  578. package/dist/components/snk-custom-slot-elements.js.gz +0 -0
  579. package/dist/components/snk-data-exporter.js.gz +0 -0
  580. package/dist/components/snk-data-exporter2.js.gz +0 -0
  581. package/dist/components/snk-data-unit.js.gz +0 -0
  582. package/dist/components/snk-data-unit2.js +1 -1
  583. package/dist/components/snk-data-unit2.js.gz +0 -0
  584. package/dist/components/snk-default-filter.js.gz +0 -0
  585. package/dist/components/snk-default-filter2.js.gz +0 -0
  586. package/dist/components/snk-detail-view.js.gz +0 -0
  587. package/dist/components/snk-detail-view2.js +89 -56
  588. package/dist/components/snk-detail-view2.js.gz +0 -0
  589. package/dist/components/snk-entity-list.js +11 -3
  590. package/dist/components/snk-entity-list.js.gz +0 -0
  591. package/dist/components/snk-exporter-email-sender.js.gz +0 -0
  592. package/dist/components/snk-exporter-email-sender2.js.gz +0 -0
  593. package/dist/components/snk-expression-group.js.gz +0 -0
  594. package/dist/components/snk-expression-group2.js.gz +0 -0
  595. package/dist/components/snk-expression-item.js.gz +0 -0
  596. package/dist/components/snk-expression-item2.js.gz +0 -0
  597. package/dist/components/snk-filter-advanced-mode.js.gz +0 -0
  598. package/dist/components/snk-filter-advanced-mode2.js.gz +0 -0
  599. package/dist/components/snk-filter-assistent-mode.js.gz +0 -0
  600. package/dist/components/snk-filter-assistent-mode2.js.gz +0 -0
  601. package/dist/components/snk-filter-bar.js.gz +0 -0
  602. package/dist/components/snk-filter-bar2.js +81 -93
  603. package/dist/components/snk-filter-bar2.js.gz +0 -0
  604. package/dist/components/snk-filter-binary-select.js +27 -3
  605. package/dist/components/snk-filter-binary-select.js.gz +0 -0
  606. package/dist/components/snk-filter-checkbox-list.js +24 -3
  607. package/dist/components/snk-filter-checkbox-list.js.gz +0 -0
  608. package/dist/components/snk-filter-detail.js.gz +0 -0
  609. package/dist/components/snk-filter-detail2.js +28 -9
  610. package/dist/components/snk-filter-detail2.js.gz +0 -0
  611. package/dist/components/snk-filter-field-search.js.gz +0 -0
  612. package/dist/components/snk-filter-field-search2.js.gz +0 -0
  613. package/dist/components/snk-filter-item.js.gz +0 -0
  614. package/dist/components/snk-filter-item2.js +70 -8
  615. package/dist/components/snk-filter-item2.js.gz +0 -0
  616. package/dist/components/snk-filter-list.js.gz +0 -0
  617. package/dist/components/snk-filter-modal-item.js.gz +0 -0
  618. package/dist/components/snk-filter-modal-item2.js +7 -12
  619. package/dist/components/snk-filter-modal-item2.js.gz +0 -0
  620. package/dist/components/snk-filter-modal.js +1 -325
  621. package/dist/components/snk-filter-modal.js.gz +0 -0
  622. package/dist/components/snk-filter-modal2.js +391 -0
  623. package/dist/components/snk-filter-modal2.js.gz +0 -0
  624. package/dist/components/snk-filter-multi-select.js +19 -4
  625. package/dist/components/snk-filter-multi-select.js.gz +0 -0
  626. package/dist/components/snk-filter-number.js +38 -4
  627. package/dist/components/snk-filter-number.js.gz +0 -0
  628. package/dist/components/snk-filter-param-config.js.gz +0 -0
  629. package/dist/components/snk-filter-param-config2.js.gz +0 -0
  630. package/dist/components/snk-filter-period.js +64 -16
  631. package/dist/components/snk-filter-period.js.gz +0 -0
  632. package/dist/components/snk-filter-search.js +17 -4
  633. package/dist/components/snk-filter-search.js.gz +0 -0
  634. package/dist/components/snk-filter-text.js +22 -2
  635. package/dist/components/snk-filter-text.js.gz +0 -0
  636. package/dist/components/snk-form-config.js.gz +0 -0
  637. package/dist/components/snk-form-config2.js.gz +0 -0
  638. package/dist/components/snk-form-summary.js.gz +0 -0
  639. package/dist/components/snk-form-summary2.js.gz +0 -0
  640. package/dist/components/snk-form-view.js.gz +0 -0
  641. package/dist/components/snk-form-view2.js.gz +0 -0
  642. package/dist/components/snk-form.js.gz +0 -0
  643. package/dist/components/snk-grid-config.js.gz +0 -0
  644. package/dist/components/snk-grid-config2.js.gz +0 -0
  645. package/dist/components/snk-grid.js.gz +0 -0
  646. package/dist/components/snk-grid2.js +135 -68
  647. package/dist/components/snk-grid2.js.gz +0 -0
  648. package/dist/components/snk-guides-viewer.js.gz +0 -0
  649. package/dist/components/snk-layout-form-config.js.gz +0 -0
  650. package/dist/components/snk-layout-form-config2.js.gz +0 -0
  651. package/dist/components/snk-personalized-filter-editor.js.gz +0 -0
  652. package/dist/components/snk-personalized-filter.js.gz +0 -0
  653. package/dist/components/snk-personalized-filter2.js +10 -2
  654. package/dist/components/snk-personalized-filter2.js.gz +0 -0
  655. package/dist/components/snk-pesquisa.js.gz +0 -0
  656. package/dist/components/snk-pesquisa2.js.gz +0 -0
  657. package/dist/components/snk-print-selector.js.gz +0 -0
  658. package/dist/components/snk-select-box.js.gz +0 -0
  659. package/dist/components/snk-select-box2.js.gz +0 -0
  660. package/dist/components/snk-simple-bar.js.gz +0 -0
  661. package/dist/components/snk-simple-bar2.js +5 -5
  662. package/dist/components/snk-simple-bar2.js.gz +0 -0
  663. package/dist/components/snk-simple-crud.js.gz +0 -0
  664. package/dist/components/snk-simple-crud2.js +45 -8
  665. package/dist/components/snk-simple-crud2.js.gz +0 -0
  666. package/dist/components/snk-simple-form-config.js.gz +0 -0
  667. package/dist/components/snk-simple-form-config2.js.gz +0 -0
  668. package/dist/components/snk-taskbar.js.gz +0 -0
  669. package/dist/components/snk-taskbar2.js.gz +0 -0
  670. package/dist/components/snk-view-representation.js.gz +0 -0
  671. package/dist/components/snk-view-representation2.js.gz +0 -0
  672. package/dist/components/sortable.esm.js.gz +0 -0
  673. package/dist/components/taskbar-actions-button.js.gz +0 -0
  674. package/dist/components/taskbar-actions-button2.js.gz +0 -0
  675. package/dist/components/taskbar-split-button.js.gz +0 -0
  676. package/dist/components/taskbar-split-button2.js.gz +0 -0
  677. package/dist/components/teste-pesquisa.js.gz +0 -0
  678. package/dist/esm/AuthorizationConfig-dcbd207a.js.gz +0 -0
  679. package/dist/esm/{ConfigStorage-b5a1dba3.js → ConfigStorage-22eace3a.js} +2 -2
  680. package/dist/esm/ConfigStorage-22eace3a.js.gz +0 -0
  681. package/dist/esm/{DataFetcher-6f6de657.js → DataFetcher-f6b2961a.js} +52 -1
  682. package/dist/esm/DataFetcher-f6b2961a.js.gz +0 -0
  683. package/dist/esm/FormConfigHelper-4e42f0b6.js.gz +0 -0
  684. package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js.gz +0 -0
  685. package/dist/esm/IFetchDataExporterParams-d73bed3d.js.gz +0 -0
  686. package/dist/esm/{ISave-7ecdca20.js → ISave-6b7b0423.js} +1 -1
  687. package/dist/esm/ISave-6b7b0423.js.gz +0 -0
  688. package/dist/esm/ParamType-d5152b06.js.gz +0 -0
  689. package/dist/esm/PersonalizedFilterUtils-2db38ff2.js.gz +0 -0
  690. package/dist/esm/PrintUtils-3e4ff0f5.js.gz +0 -0
  691. package/dist/esm/ResourceIDUtils-a114189a.js.gz +0 -0
  692. package/dist/esm/{SnkFormConfigManager-34fc1dc7.js → SnkFormConfigManager-968b97e7.js} +2 -2
  693. package/dist/esm/SnkFormConfigManager-968b97e7.js.gz +0 -0
  694. package/dist/esm/{ClientSideExporterProvider-7c2781f4.js → SnkMultiSelectionListDataSource-1136c4e7.js} +87 -84
  695. package/dist/esm/SnkMultiSelectionListDataSource-1136c4e7.js.gz +0 -0
  696. package/dist/esm/{auth-fetcher-7332a9a9.js → auth-fetcher-cf39e42b.js} +1 -1
  697. package/dist/esm/auth-fetcher-cf39e42b.js.gz +0 -0
  698. package/dist/esm/config-header.entry.js.gz +0 -0
  699. package/dist/esm/configs-button.entry.js.gz +0 -0
  700. package/dist/esm/constants-7b422de0.js.gz +0 -0
  701. package/dist/esm/{dataunit-fetcher-f21cbad0.js → dataunit-fetcher-6314b19d.js} +1 -1
  702. package/dist/esm/dataunit-fetcher-6314b19d.js.gz +0 -0
  703. package/dist/esm/default-filters-50105e43.js.gz +0 -0
  704. package/dist/esm/field-config_2.entry.js.gz +0 -0
  705. package/dist/esm/fields-layout.entry.js.gz +0 -0
  706. package/dist/esm/fields-selector.entry.js.gz +0 -0
  707. package/dist/esm/filter-item-type.enum-d45e026f.js.gz +0 -0
  708. package/dist/esm/filter-type.enum-f6a8fe23.js.gz +0 -0
  709. package/dist/esm/filter-validate-d765d450.js +27 -0
  710. package/dist/esm/filter-validate-d765d450.js.gz +0 -0
  711. package/dist/esm/filterNumberVariation-8cee02ea.js.gz +0 -0
  712. package/dist/esm/{form-config-fetcher-6ab4e805.js → form-config-fetcher-bc6f0f1f.js} +1 -1
  713. package/dist/esm/form-config-fetcher-bc6f0f1f.js.gz +0 -0
  714. package/dist/esm/guides-configurator.entry.js.gz +0 -0
  715. package/dist/esm/{index-b72af127.js → index-446f9341.js} +21 -5
  716. package/dist/esm/index-446f9341.js.gz +0 -0
  717. package/dist/esm/index-479e1293.js +8 -8
  718. package/dist/esm/index-479e1293.js.gz +0 -0
  719. package/dist/esm/index-620ac460.js.gz +0 -0
  720. package/dist/esm/index-8acbae97.js.gz +0 -0
  721. package/dist/esm/index-b40568ff.js.gz +0 -0
  722. package/dist/esm/index.js.gz +0 -0
  723. package/dist/esm/loader.js +1 -1
  724. package/dist/esm/loader.js.gz +0 -0
  725. package/dist/esm/pesquisa-grid_2.entry.js +4 -4
  726. package/dist/esm/pesquisa-grid_2.entry.js.gz +0 -0
  727. package/dist/esm/polyfills/core-js.js.gz +0 -0
  728. package/dist/esm/polyfills/css-shim.js.gz +0 -0
  729. package/dist/esm/polyfills/dom.js.gz +0 -0
  730. package/dist/esm/polyfills/es5-html-element.js.gz +0 -0
  731. package/dist/esm/polyfills/index.js.gz +0 -0
  732. package/dist/esm/polyfills/system.js.gz +0 -0
  733. package/dist/esm/presentationMode-783bbf9d.js.gz +0 -0
  734. package/dist/esm/sankhyablocks.js +1 -1
  735. package/dist/esm/sankhyablocks.js.gz +0 -0
  736. package/dist/esm/snk-actions-button_8.entry.js +5 -5
  737. package/dist/esm/snk-actions-button_8.entry.js.gz +0 -0
  738. package/dist/esm/snk-actions-form.entry.js.gz +0 -0
  739. package/dist/esm/snk-application.entry.js +9 -8
  740. package/dist/esm/snk-application.entry.js.gz +0 -0
  741. package/dist/esm/snk-attach.entry.js +7 -7
  742. package/dist/esm/snk-attach.entry.js.gz +0 -0
  743. package/dist/esm/snk-client-confirm.entry.js.gz +0 -0
  744. package/dist/esm/snk-configurator.entry.js.gz +0 -0
  745. package/dist/esm/snk-crud.entry.js +7 -7
  746. package/dist/esm/snk-crud.entry.js.gz +0 -0
  747. package/dist/esm/snk-custom-slot-elements.entry.js.gz +0 -0
  748. package/dist/esm/snk-data-exporter.entry.js +5 -5
  749. package/dist/esm/snk-data-exporter.entry.js.gz +0 -0
  750. package/dist/esm/{snk-data-unit-d31619fb.js → snk-data-unit-4acf4781.js} +3 -3
  751. package/dist/esm/snk-data-unit-4acf4781.js.gz +0 -0
  752. package/dist/esm/snk-data-unit.entry.js +3 -3
  753. package/dist/esm/snk-data-unit.entry.js.gz +0 -0
  754. package/dist/esm/snk-default-filter.entry.js.gz +0 -0
  755. package/dist/esm/snk-detail-view.entry.js +9 -9
  756. package/dist/esm/snk-detail-view.entry.js.gz +0 -0
  757. package/dist/esm/snk-entity-list.entry.js +10 -3
  758. package/dist/esm/snk-entity-list.entry.js.gz +0 -0
  759. package/dist/esm/snk-exporter-email-sender.entry.js.gz +0 -0
  760. package/dist/esm/snk-expression-group_2.entry.js +1 -1
  761. package/dist/esm/snk-expression-group_2.entry.js.gz +0 -0
  762. package/dist/esm/snk-filter-advanced-mode_2.entry.js.gz +0 -0
  763. package/dist/esm/snk-filter-bar_4.entry.js +168 -101
  764. package/dist/esm/snk-filter-bar_4.entry.js.gz +0 -0
  765. package/dist/esm/snk-filter-binary-select.entry.js +23 -2
  766. package/dist/esm/snk-filter-binary-select.entry.js.gz +0 -0
  767. package/dist/esm/snk-filter-checkbox-list.entry.js +20 -2
  768. package/dist/esm/snk-filter-checkbox-list.entry.js.gz +0 -0
  769. package/dist/esm/snk-filter-detail.entry.js +25 -8
  770. package/dist/esm/snk-filter-detail.entry.js.gz +0 -0
  771. package/dist/esm/snk-filter-field-search_2.entry.js.gz +0 -0
  772. package/dist/esm/snk-filter-modal-item.entry.js +9 -14
  773. package/dist/esm/snk-filter-modal-item.entry.js.gz +0 -0
  774. package/dist/esm/snk-filter-multi-select.entry.js +16 -3
  775. package/dist/esm/snk-filter-multi-select.entry.js.gz +0 -0
  776. package/dist/esm/snk-filter-number.entry.js +34 -3
  777. package/dist/esm/snk-filter-number.entry.js.gz +0 -0
  778. package/dist/esm/snk-filter-period.entry.js +59 -14
  779. package/dist/esm/snk-filter-period.entry.js.gz +0 -0
  780. package/dist/esm/snk-filter-search.entry.js +14 -3
  781. package/dist/esm/snk-filter-search.entry.js.gz +0 -0
  782. package/dist/esm/snk-filter-text.entry.js +18 -1
  783. package/dist/esm/snk-filter-text.entry.js.gz +0 -0
  784. package/dist/esm/snk-form-summary.entry.js.gz +0 -0
  785. package/dist/esm/snk-form-view.entry.js.gz +0 -0
  786. package/dist/esm/snk-form_2.entry.js +4 -4
  787. package/dist/esm/snk-form_2.entry.js.gz +0 -0
  788. package/dist/esm/snk-grid.entry.js +100 -53
  789. package/dist/esm/snk-grid.entry.js.gz +0 -0
  790. package/dist/esm/{snk-guides-viewer-fbfece85.js → snk-guides-viewer-19cb7f1f.js} +6 -6
  791. package/dist/esm/snk-guides-viewer-19cb7f1f.js.gz +0 -0
  792. package/dist/esm/snk-guides-viewer.entry.js +9 -9
  793. package/dist/esm/snk-guides-viewer.entry.js.gz +0 -0
  794. package/dist/esm/snk-personalized-filter-editor.entry.js.gz +0 -0
  795. package/dist/esm/snk-personalized-filter.entry.js +14 -6
  796. package/dist/esm/snk-personalized-filter.entry.js.gz +0 -0
  797. package/dist/esm/snk-pesquisa.entry.js +4 -4
  798. package/dist/esm/snk-pesquisa.entry.js.gz +0 -0
  799. package/dist/esm/snk-print-selector.entry.js.gz +0 -0
  800. package/dist/esm/snk-simple-bar.entry.js +5 -5
  801. package/dist/esm/snk-simple-bar.entry.js.gz +0 -0
  802. package/dist/esm/snk-simple-crud.entry.js +55 -18
  803. package/dist/esm/snk-simple-crud.entry.js.gz +0 -0
  804. package/dist/esm/snk-taskbar.entry.js +2 -2
  805. package/dist/esm/snk-taskbar.entry.js.gz +0 -0
  806. package/dist/esm/sortable.esm-842f85a3.js.gz +0 -0
  807. package/dist/esm/{taskbar-elements-171476d4.js → taskbar-elements-faaf5d8f.js} +1 -1
  808. package/dist/esm/taskbar-elements-faaf5d8f.js.gz +0 -0
  809. package/dist/esm/taskbar-processor-3436124c.js.gz +0 -0
  810. package/dist/esm/teste-pesquisa.entry.js.gz +0 -0
  811. package/dist/index.cjs.js.gz +0 -0
  812. package/dist/index.js.gz +0 -0
  813. package/dist/sankhyablocks/index.esm.js.gz +0 -0
  814. package/dist/sankhyablocks/p-0024d3fd.entry.js.gz +0 -0
  815. package/dist/sankhyablocks/p-093f58fa.entry.js +1 -0
  816. package/dist/sankhyablocks/p-093f58fa.entry.js.gz +0 -0
  817. package/dist/sankhyablocks/{p-8b601472.js → p-0a317e81.js} +1 -1
  818. package/dist/sankhyablocks/p-0a317e81.js.gz +0 -0
  819. package/dist/sankhyablocks/{p-ad2ae575.entry.js → p-0e1f0344.entry.js} +1 -1
  820. package/dist/sankhyablocks/p-0e1f0344.entry.js.gz +0 -0
  821. package/dist/sankhyablocks/p-0f3698af.js.gz +0 -0
  822. package/dist/sankhyablocks/p-11346b8d.entry.js.gz +0 -0
  823. package/dist/sankhyablocks/p-162bddae.entry.js.gz +0 -0
  824. package/dist/sankhyablocks/{p-69b815ab.entry.js → p-16c1c209.entry.js} +1 -1
  825. package/dist/sankhyablocks/p-16c1c209.entry.js.gz +0 -0
  826. package/dist/sankhyablocks/p-180716b2.entry.js.gz +0 -0
  827. package/dist/sankhyablocks/p-1a0caadb.js.gz +0 -0
  828. package/dist/sankhyablocks/p-1a68fb59.js.gz +0 -0
  829. package/dist/sankhyablocks/p-21107f0d.entry.js.gz +0 -0
  830. package/dist/sankhyablocks/p-27482793.entry.js.gz +0 -0
  831. package/dist/sankhyablocks/p-29cacaf3.entry.js +1 -0
  832. package/dist/sankhyablocks/p-29cacaf3.entry.js.gz +0 -0
  833. package/dist/sankhyablocks/p-2fdac5e6.entry.js.gz +0 -0
  834. package/dist/sankhyablocks/{p-eb0616d3.entry.js → p-32450ea2.entry.js} +1 -1
  835. package/dist/sankhyablocks/p-32450ea2.entry.js.gz +0 -0
  836. package/dist/sankhyablocks/{p-b49281be.entry.js → p-3c29939c.entry.js} +1 -1
  837. package/dist/sankhyablocks/p-3c29939c.entry.js.gz +0 -0
  838. package/dist/sankhyablocks/p-3d41f5a8.entry.js.gz +0 -0
  839. package/dist/sankhyablocks/p-3ed04f0d.entry.js +1 -0
  840. package/dist/sankhyablocks/p-3ed04f0d.entry.js.gz +0 -0
  841. package/dist/sankhyablocks/{p-4872dc3a.entry.js → p-44c5ec49.entry.js} +1 -1
  842. package/dist/sankhyablocks/p-44c5ec49.entry.js.gz +0 -0
  843. package/dist/sankhyablocks/p-471b34f4.entry.js.gz +0 -0
  844. package/dist/sankhyablocks/p-49ddc27a.entry.js +1 -0
  845. package/dist/sankhyablocks/p-49ddc27a.entry.js.gz +0 -0
  846. package/dist/sankhyablocks/p-4c763b10.entry.js +1 -0
  847. package/dist/sankhyablocks/p-4c763b10.entry.js.gz +0 -0
  848. package/dist/sankhyablocks/p-4eeb06fc.js +1 -0
  849. package/dist/sankhyablocks/p-4eeb06fc.js.gz +0 -0
  850. package/dist/sankhyablocks/p-505172c8.entry.js +1 -0
  851. package/dist/sankhyablocks/p-505172c8.entry.js.gz +0 -0
  852. package/dist/sankhyablocks/p-51833248.js.gz +0 -0
  853. package/dist/sankhyablocks/p-519f74be.entry.js +11 -0
  854. package/dist/sankhyablocks/p-519f74be.entry.js.gz +0 -0
  855. package/dist/sankhyablocks/p-55798617.js +1 -0
  856. package/dist/sankhyablocks/p-55798617.js.gz +0 -0
  857. package/dist/sankhyablocks/p-60dd1d27.entry.js.gz +0 -0
  858. package/dist/sankhyablocks/p-658f67a5.js +1 -0
  859. package/dist/sankhyablocks/p-658f67a5.js.gz +0 -0
  860. package/dist/sankhyablocks/p-667cab42.entry.js.gz +0 -0
  861. package/dist/sankhyablocks/p-6703336d.entry.js.gz +0 -0
  862. package/dist/sankhyablocks/p-688dcb4c.js.gz +0 -0
  863. package/dist/sankhyablocks/p-6a4b21dd.js.gz +0 -0
  864. package/dist/sankhyablocks/{p-a2e8c7a7.entry.js → p-701b024c.entry.js} +1 -1
  865. package/dist/sankhyablocks/p-701b024c.entry.js.gz +0 -0
  866. package/dist/sankhyablocks/p-72a9285d.entry.js +1 -0
  867. package/dist/sankhyablocks/p-72a9285d.entry.js.gz +0 -0
  868. package/dist/sankhyablocks/p-7345782c.entry.js.gz +0 -0
  869. package/dist/sankhyablocks/p-75af335e.entry.js.gz +0 -0
  870. package/dist/sankhyablocks/p-7b3ca294.entry.js.gz +0 -0
  871. package/dist/sankhyablocks/p-7dd49d15.js.gz +0 -0
  872. package/dist/sankhyablocks/p-7e250432.entry.js.gz +0 -0
  873. package/dist/sankhyablocks/p-7f7fe6c4.entry.js +1 -0
  874. package/dist/sankhyablocks/p-7f7fe6c4.entry.js.gz +0 -0
  875. package/dist/sankhyablocks/p-84345e7a.js.gz +0 -0
  876. package/dist/sankhyablocks/p-88b7bc09.js +1 -0
  877. package/dist/sankhyablocks/p-88b7bc09.js.gz +0 -0
  878. package/dist/sankhyablocks/{p-c6331595.js → p-8d256def.js} +1 -1
  879. package/dist/sankhyablocks/p-8d256def.js.gz +0 -0
  880. package/dist/sankhyablocks/p-8d884fab.js.gz +0 -0
  881. package/dist/sankhyablocks/p-8f37b75b.entry.js +1 -0
  882. package/dist/sankhyablocks/p-8f37b75b.entry.js.gz +0 -0
  883. package/dist/sankhyablocks/p-8f3f2306.js.gz +0 -0
  884. package/dist/sankhyablocks/p-8f73da95.js.gz +0 -0
  885. package/dist/sankhyablocks/p-9019a32f.js.gz +0 -0
  886. package/dist/sankhyablocks/{p-b35574b5.js → p-9062d640.js} +1 -1
  887. package/dist/sankhyablocks/p-9062d640.js.gz +0 -0
  888. package/dist/sankhyablocks/p-91a9abb6.entry.js.gz +0 -0
  889. package/dist/sankhyablocks/{p-72c8c847.entry.js → p-95c71f5e.entry.js} +1 -1
  890. package/dist/sankhyablocks/p-95c71f5e.entry.js.gz +0 -0
  891. package/dist/sankhyablocks/p-96d45943.entry.js +1 -0
  892. package/dist/sankhyablocks/p-96d45943.entry.js.gz +0 -0
  893. package/dist/sankhyablocks/p-988afe78.js.gz +0 -0
  894. package/dist/sankhyablocks/p-9a63f3f7.entry.js.gz +0 -0
  895. package/dist/sankhyablocks/p-a5108625.entry.js.gz +0 -0
  896. package/dist/sankhyablocks/{p-eacff4b7.entry.js → p-b2d7f4cd.entry.js} +1 -1
  897. package/dist/sankhyablocks/p-b2d7f4cd.entry.js.gz +0 -0
  898. package/dist/sankhyablocks/p-b568c1d4.js.gz +0 -0
  899. package/dist/sankhyablocks/{p-6a015ba2.js → p-b7f5caf6.js} +1 -1
  900. package/dist/sankhyablocks/p-b7f5caf6.js.gz +0 -0
  901. package/dist/sankhyablocks/{p-7de79adf.js → p-b987e15d.js} +1 -1
  902. package/dist/sankhyablocks/p-b987e15d.js.gz +0 -0
  903. package/dist/sankhyablocks/{p-ba4979b4.js → p-bf017a1f.js} +1 -1
  904. package/dist/sankhyablocks/p-bf017a1f.js.gz +0 -0
  905. package/dist/sankhyablocks/{p-735a1175.entry.js → p-c3dbf441.entry.js} +1 -1
  906. package/dist/sankhyablocks/p-c3dbf441.entry.js.gz +0 -0
  907. package/dist/sankhyablocks/{p-3dba3468.js → p-c71dcb2d.js} +1 -1
  908. package/dist/sankhyablocks/p-c71dcb2d.js.gz +0 -0
  909. package/dist/sankhyablocks/{p-5e282b33.entry.js → p-c95f20d9.entry.js} +1 -1
  910. package/dist/sankhyablocks/p-c95f20d9.entry.js.gz +0 -0
  911. package/dist/sankhyablocks/p-c98e2085.js +1 -0
  912. package/dist/sankhyablocks/p-c98e2085.js.gz +0 -0
  913. package/dist/sankhyablocks/p-cb4343c4.entry.js +1 -0
  914. package/dist/sankhyablocks/p-cb4343c4.entry.js.gz +0 -0
  915. package/dist/sankhyablocks/{p-6fa3d474.entry.js → p-d03ae54e.entry.js} +1 -1
  916. package/dist/sankhyablocks/p-d03ae54e.entry.js.gz +0 -0
  917. package/dist/sankhyablocks/p-d235314c.entry.js +1 -0
  918. package/dist/sankhyablocks/p-d235314c.entry.js.gz +0 -0
  919. package/dist/sankhyablocks/p-d75a732c.js +1 -0
  920. package/dist/sankhyablocks/p-d75a732c.js.gz +0 -0
  921. package/dist/sankhyablocks/p-d8d8169b.js.gz +0 -0
  922. package/dist/sankhyablocks/p-dc36cfbf.js.gz +0 -0
  923. package/dist/sankhyablocks/{p-f39b0ebe.entry.js → p-df7979fd.entry.js} +1 -1
  924. package/dist/sankhyablocks/p-df7979fd.entry.js.gz +0 -0
  925. package/dist/sankhyablocks/p-e258de96.entry.js +1 -0
  926. package/dist/sankhyablocks/p-e258de96.entry.js.gz +0 -0
  927. package/dist/sankhyablocks/p-eaad0aa8.js.gz +0 -0
  928. package/dist/sankhyablocks/p-f4184ce7.js.gz +0 -0
  929. package/dist/sankhyablocks/{p-d377aa7a.entry.js → p-f8e87cf1.entry.js} +1 -1
  930. package/dist/sankhyablocks/p-f8e87cf1.entry.js.gz +0 -0
  931. package/dist/sankhyablocks/p-f8f29e1a.entry.js.gz +0 -0
  932. package/dist/sankhyablocks/p-fa80e546.js.gz +0 -0
  933. package/dist/sankhyablocks/p-ff1990ad.js.gz +0 -0
  934. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  935. package/dist/sankhyablocks/sankhyablocks.esm.js.gz +0 -0
  936. package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +8 -4
  937. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +12 -0
  938. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.d.ts +12 -0
  939. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +12 -4
  940. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +16 -4
  941. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +17 -3
  942. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +10 -2
  943. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +12 -0
  944. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +8 -3
  945. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +27 -4
  946. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +17 -3
  947. package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +2 -3
  948. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +16 -2
  949. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +4 -2
  950. package/dist/types/components/snk-filter-bar/utils/filter-validate.d.ts +11 -0
  951. package/dist/types/components/snk-grid/snk-grid.d.ts +40 -24
  952. package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +53 -5
  953. package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +44 -6
  954. package/dist/types/components/snk-simple-bar/snk-simple-bar.d.ts +15 -15
  955. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +100 -43
  956. package/dist/types/components.d.ts +450 -108
  957. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
  958. package/package.json +1 -1
  959. package/dist/sankhyablocks/p-012208e0.entry.js +0 -1
  960. package/dist/sankhyablocks/p-07b14811.entry.js +0 -1
  961. package/dist/sankhyablocks/p-0dac8fef.js +0 -1
  962. package/dist/sankhyablocks/p-1210500e.js +0 -1
  963. package/dist/sankhyablocks/p-16fc4acd.js +0 -1
  964. package/dist/sankhyablocks/p-25209340.entry.js +0 -1
  965. package/dist/sankhyablocks/p-295b83ae.entry.js +0 -1
  966. package/dist/sankhyablocks/p-398cdd67.entry.js +0 -1
  967. package/dist/sankhyablocks/p-49436976.entry.js +0 -1
  968. package/dist/sankhyablocks/p-4e63ffed.entry.js +0 -1
  969. package/dist/sankhyablocks/p-5bab470d.entry.js +0 -1
  970. package/dist/sankhyablocks/p-5c7af8a9.entry.js +0 -1
  971. package/dist/sankhyablocks/p-665dd170.entry.js +0 -11
  972. package/dist/sankhyablocks/p-9fd87bfd.entry.js +0 -1
  973. package/dist/sankhyablocks/p-a349689a.js +0 -1
  974. package/dist/sankhyablocks/p-a76e6d51.entry.js +0 -1
  975. package/dist/sankhyablocks/p-c6a8a8bc.entry.js +0 -1
  976. package/dist/sankhyablocks/p-c9e6d720.js +0 -1
  977. package/dist/sankhyablocks/p-dff65083.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as e,g as h}from"./p-d8d8169b.js";import{StringUtils as a,ElementIDUtils as o,ApplicationContext as n,KeyboardManager as r}from"@sankhyalabs/core";import{T as d}from"./p-7de79adf.js";import"./p-0dac8fef.js";import"./p-ba4979b4.js";import{P as c,E as l}from"./p-0f3698af.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-b35574b5.js";import"./p-ff1990ad.js";import"./p-c6331595.js";import{V as u}from"./p-9019a32f.js";import{A as m}from"./p-c9e6d720.js";import"./p-a349689a.js";import"./p-8d884fab.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";const f=class{constructor(s){t(this,s),this.actionClick=i(this,"actionClick",7),this.configuratorSave=i(this,"configuratorSave",7),this.configuratorCancel=i(this,"configuratorCancel",7),this.formItemsReady=i(this,"formItemsReady",7),this.viewModeChanged=i(this,"viewModeChanged",7),this._viewHistory=[],this._customEditors=new Map,this._customRenders=new Map,this._dataUnit=void 0,this._dataState=void 0,this.attachmentRegisterKey=void 0,this._currentViewMode=u.GRID,this._canEdit=void 0,this._resourceID=void 0,this.enableLockManagerLoadingComp=!1,this.enableLockManagerTaskbarClick=!1,this.configName=void 0,this.filterBarTitle=void 0,this.selectionToastConfig=void 0,this.showActionButtons=!1,this.actionsList=void 0,this.taskbarManager=void 0,this.recordsValidator=void 0,this.statusResolver=void 0,this.multipleSelection=!0,this.presentationMode=c.PRIMARY,this.messagesBuilder=void 0,this.useEnterLikeTab=!1,this.gridLegacyConfigName=void 0,this.filterBarLegacyConfigName=void 0,this.formLegacyConfigName=void 0,this.disablePersonalizedFilter=void 0,this.autoLoad=void 0,this.autoFocus=!0,this.enableGridInsert=!1,this.domainMessagesBuilder=void 0,this.ignoreReadOnlyFormFields=void 0,this.setCustomFormTitle=void 0,this.strategyExporter=l.SERVER_SIDE,this.layoutFormConfig=!1,this.multipleEditionEnabled=!0,this.paginationCounterMode="auto",this.layoutFormConfig=!1,this.customContainerId=`SNK-CRUD-CUSTOM-CONTAINER-${a.generateUUID()}`}async goToView(t){this.executeAction(t)}async openConfigurator(){var t;null===(t=this._snkConfigurator)||void 0===t||t.open()}async closeConfigurator(){var t;null===(t=this._snkConfigurator)||void 0===t||t.close()}async reloadFilterBar(){var t;null===(t=this._snkGrid)||void 0===t||t.reloadFilterBar()}async getFilterBar(){return await this._snkGrid.getFilterBar()}async addCustomEditor(t,i){if(this._guidesViewer&&this._snkGrid)return this._guidesViewer.addCustomEditor(t,i),void this._snkGrid.addCustomEditor(t,i);const s=new Map(this._customEditors);s.set(t,i),this._customEditors=s}async addGridCustomRender(t,i){if(this._snkGrid)return void this._snkGrid.addGridCustomRender(t,i);const s=new Map(this._customRenders);s.set(t,i),this._customRenders=s}async addCustomValueFormatter(t,i){this._snkGrid.addCustomValueFormatter(t,i)}async removeCustomValueFormatter(t){this._snkGrid.removeCustomValueFormatter(t)}async setFieldProp(t,i,s){await this._guidesViewer.setFieldProp(t,i,s)}currentViewModeWatcher(t){this._viewHistory=[...this._viewHistory.slice(-1),t]}async gridToForm(t=!1){this._backToGrid=!t&&await this._viewStack.getSelectedIndex()===u.GRID,this.setViewMode(u.FORM)}async executeAction(t){switch(t){case d.GRID_MODE:return this.setViewMode(u.GRID);case d.FORM_MODE:case d.UPDATE:return this.gridToForm(t!==d.UPDATE);case d.UPDATE_MULTIPLE:return this._dataUnit.isMultipleEdition=!0,this.setViewMode(u.FORM);case d.CONFIGURATOR:return this._snkConfigurator.open();case d.ATTACH:return this.setViewMode(u.ATTACHMENT)}}backView(){const t=this._viewHistory.at(-2)||u.GRID;this.setViewMode(t)}setViewMode(t){this._viewStack.show(t),this._currentViewMode=t,t===u.GRID?(this._dataUnit.isMultipleEdition=!1,this._snkGrid.setFocus()):t===u.FORM&&this._guidesViewer.setFocus(),this.viewModeChanged.emit(t)}openConfig(t){this._snkConfigurator.close(),t===u.GRID?this._snkGrid.showConfig():t===u.FORM&&this._guidesViewer.showFormConfig()}addDataElementID(){o.addIDInfo(this._element,null,{dataUnit:this._dataUnit})}insertionModeHandler(){this.enableGridInsert||this.gridToForm()}cancelHandler(){this._backToGrid&&this.setViewMode(u.GRID)}async getAttachmentRegisterKey(){if(this._snkDataUnit)return(await this._snkDataUnit.getSelectedRecordsIDsInfo()).map((({value:t})=>t)).join("_")}setCustomRenders(){if(this._snkGrid)for(const[t,i]of this._customRenders)this._snkGrid.addGridCustomRender(t,i),this._customRenders.delete(t)}setCustomEditors(){if(this._snkGrid&&this._guidesViewer)for(const[t,i]of this._customEditors)this._guidesViewer.addCustomEditor(t,i),this._snkGrid.addCustomEditor(t,i),this._customEditors.delete(t)}componentDidRender(){this.setCustomRenders(),this.setCustomEditors()}componentWillLoad(){this._application=n.getContextValue("__SNK__APPLICATION__");let t=this._element.parentElement;for(this._application.hasAccess(m.UPDATE,this._resourceID).then((t=>this._canEdit=t));t;){if("SNK-DATA-UNIT"===t.tagName.toUpperCase()){this._snkDataUnit=t,this._snkDataUnit.addEventListener("insertionMode",(()=>this.insertionModeHandler())),this._snkDataUnit.addEventListener("cancelEdition",(()=>this.cancelHandler())),this._snkDataUnit.domainMessagesBuilder=this.domainMessagesBuilder,this._dataUnit=this._snkDataUnit.dataUnit,this._dataState=this._snkDataUnit.dataState,this._dataUnit?this.initDataUnit():this._snkDataUnit.addEventListener("dataUnitReady",(t=>{this._dataUnit=t.detail,this.initDataUnit()})),this._snkDataUnit.addEventListener("dataStateChange",this.handleDataStateChange.bind(this));break}t=t.parentElement}this.configName||(this.configName=this._application.configName)}componentDidLoad(){this.initKeyboardManager()}disconnectedCallback(){this.removeShortcuts()}async handleDataStateChange(t){var i;this._dataState=t.detail,void 0!==this._dataState.selectedRecord&&(this.attachmentRegisterKey=await this.getAttachmentRegisterKey());const s=await this._snkDataUnit.getFieldsWithRmPrecision();for(const t of s||[]){if(!t)continue;const s=null===(i=this._dataState.rowMetadata)||void 0===i?void 0:i.getProp("rm_precision",t);(s||0===s)&&(await this.setFieldProp(t,"precision",s),await this.setFieldProp(t,"prettyPrecision",s))}}async initKeyboardManager(){this._keyboardManager=new r({propagate:!1,element:this._element});const t=this._dataUnit||await this._snkDataUnit.getDataUnit();async function i(){const i=document.activeElement,s=i==document.body;s||i.blur(),await t.saveData(),s||null==i.setFocus?s||i.focus():i.setFocus()}this._keyboardManager&&this._keyboardManager.bind("F6",this.toggleView.bind(this),{description:this.getMessage("snkCrud.shortcuts.toggleView"),element:this._element}).bind("F7",i.bind(this),{description:this.getMessage("snkCrud.shortcuts.saveData"),element:this._element}).bind("ctrl + \\",i.bind(this),{description:this.getMessage("snkCrud.shortcuts.addRecord"),element:this._element}).bind("F8",async function(){t.hasNewRecord()||t.addRecord()}.bind(this),{description:this.getMessage("snkCrud.shortcuts.addRecord"),element:this._element}).bind("F9",t.removeSelectedRecords.bind(t),{description:this.getMessage("snkCrud.shortcuts.removeRecord"),element:this._element}).bind("ctrl + F9",t.removeSelectedRecords.bind(t),{description:this.getMessage("snkCrud.shortcuts.removeRecord"),element:this._element}).bind("F5",(async()=>{const i=await this._viewStack.getSelectedIndex();u.GRID===i&&t.loadData()}),{description:this.getMessage("snkCrud.shortcuts.refreshData"),element:this._element}).bind("Escape",(()=>{t.isDirty()&&t.cancelEdition()}),{debounceTime:1e3,description:this.getMessage("snkCrud.shortcuts.cancelAction"),element:this._element})}getMessage(t,i){if(this.messagesBuilder)return this.messagesBuilder.getMessage(t,i)}async removeShortcuts(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}async toggleView(){const t=await this._viewStack.getSelectedIndex();this.setViewMode(u.GRID===t?u.FORM:u.GRID)}async initDataUnit(){this.addDataElementID(),this.messagesBuilder||(this.messagesBuilder=this._snkDataUnit.messagesBuilder),null==this._resourceID&&(this._resourceID=this._snkDataUnit.resourceID,null==this._resourceID&&(this._resourceID=await this._application.getResourceID()))}handleConfiguratorEvent(t,i){t.stopImmediatePropagation(),"SAVE"!==i?this.configuratorCancel.emit():this.configuratorSave.emit()}render(){if(null!=this._resourceID)return this._snkDataUnit.ignoreSaveMessage=this._currentViewMode===u.GRID&&!this.enableGridInsert,s(e,null,s("ez-view-stack",{ref:t=>this._viewStack=t,"data-element-id":"crud"},s("stack-item",{class:"ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium"},s("snk-grid",{ref:t=>this._snkGrid=t,class:"ez-flex ez-flex--column ez-size-height--full ez-size-width--full",filterBarTitle:this.filterBarTitle,"data-element-id":"crud_grid",configName:this.configName,onGridDoubleClick:()=>this.gridToForm(!0),taskbarManager:this.taskbarManager,onActionClick:t=>this.executeAction(t.detail),messagesBuilder:this.messagesBuilder,actionsList:this.actionsList,statusResolver:this.statusResolver,multipleSelection:this.multipleSelection,presentationMode:this.presentationMode,recordsValidator:this.recordsValidator,selectionToastConfig:this.selectionToastConfig,useEnterLikeTab:this.useEnterLikeTab,canEdit:this._canEdit,resourceID:this._resourceID,disablePersonalizedFilter:this.disablePersonalizedFilter,gridLegacyConfigName:this.gridLegacyConfigName,filterBarLegacyConfigName:this.filterBarLegacyConfigName,autoLoad:this.autoLoad,autoFocus:this.autoFocus,enableGridInsert:this.enableGridInsert,enableLockManagerTaskbarClick:this.enableLockManagerTaskbarClick,enableLockManagerLoadingComp:this.enableLockManagerLoadingComp,strategyExporter:this.strategyExporter,multipleEditionEnabled:this.multipleEditionEnabled,paginationCounterMode:this.paginationCounterMode},s("slot",{name:"GRID_TASKBAR_CUSTOM_ELEMENTS"}),s("slot",{name:"GRID_HEADER_CUSTOM_ELEMENTS"}),s("slot",{name:"SnkGridHeader"}),s("slot",{name:"SnkGridFooter"}),s("slot",{name:"SnkGridTaskBar"}))),s("stack-item",null,s("snk-guides-viewer",{ref:t=>this._guidesViewer=t,entityPath:this._snkDataUnit.entityName,messagesBuilder:this.messagesBuilder,onExit:()=>this.setViewMode(u.GRID),dataState:this._dataState,dataUnit:this._dataUnit,actionsList:this.actionsList,taskbarManager:this.taskbarManager,configName:this.configName,onActionClick:t=>this.executeAction(t.detail),presentationMode:this.presentationMode,"data-element-id":"crud_form",canEdit:this._canEdit,recordsValidator:this.recordsValidator,resourceID:this._resourceID,detailTaskbarCustomContainerId:this.customContainerId,formLegacyConfigName:this.formLegacyConfigName,enableGridInsert:this.enableGridInsert,getCustomTitle:this.setCustomFormTitle,ignoreReadOnlyFormFields:this.ignoreReadOnlyFormFields},s("slot",{name:"GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS"}),s("slot",{name:"SnkFormTaskBar"}))),s("stack-item",{tabIndex:"0"},s("snk-attach",{registerKey:this.attachmentRegisterKey,messagesBuilder:this.messagesBuilder,entityName:this._snkDataUnit.entityName,onBack:this.backView.bind(this)})),s("snk-configurator",{ref:t=>this._snkConfigurator=t,viewMode:this._currentViewMode,messagesBuilder:this.messagesBuilder,onConfigSelected:t=>this.setViewMode(t.detail),onOpenConfig:t=>this.openConfig(t.detail),showActionButtons:this.showActionButtons,onSave:t=>this.handleConfiguratorEvent(t,"SAVE"),onCancel:t=>this.handleConfiguratorEvent(t,"CANCEL"),resourceID:this._resourceID,customContainerId:this.customContainerId,layoutFormConfig:this.layoutFormConfig})),s("div",{id:`${this.customContainerId}`},s("slot",{name:"SnkConfigContainerSlot"}),s("slot",{name:"DETAIL_GRID_HEADER_CUSTOM_ELEMENTS"}),s("slot",{name:"DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS"}),s("slot",{name:"DETAIL_TASKBAR_CUSTOM_ELEMENTS"})))}get _element(){return h(this)}static get watchers(){return{_currentViewMode:["currentViewModeWatcher"]}}};f.style=".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";export{f as snk_crud}
1
+ import{r as t,c as i,h as s,H as e,g as h}from"./p-d8d8169b.js";import{StringUtils as a,ElementIDUtils as o,ApplicationContext as n,KeyboardManager as r}from"@sankhyalabs/core";import{T as d}from"./p-b987e15d.js";import"./p-d75a732c.js";import"./p-bf017a1f.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-9062d640.js";import"./p-ff1990ad.js";import"./p-8d256def.js";import{V as u}from"./p-9019a32f.js";import{A as m}from"./p-c98e2085.js";import"./p-55798617.js";import"./p-8d884fab.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";const f=class{constructor(s){t(this,s),this.actionClick=i(this,"actionClick",7),this.configuratorSave=i(this,"configuratorSave",7),this.configuratorCancel=i(this,"configuratorCancel",7),this.formItemsReady=i(this,"formItemsReady",7),this.viewModeChanged=i(this,"viewModeChanged",7),this._viewHistory=[],this._customEditors=new Map,this._customRenders=new Map,this._dataUnit=void 0,this._dataState=void 0,this.attachmentRegisterKey=void 0,this._currentViewMode=u.GRID,this._canEdit=void 0,this._resourceID=void 0,this.enableLockManagerLoadingComp=!1,this.enableLockManagerTaskbarClick=!1,this.configName=void 0,this.filterBarTitle=void 0,this.selectionToastConfig=void 0,this.showActionButtons=!1,this.actionsList=void 0,this.taskbarManager=void 0,this.recordsValidator=void 0,this.statusResolver=void 0,this.multipleSelection=!0,this.presentationMode=c.PRIMARY,this.messagesBuilder=void 0,this.useEnterLikeTab=!1,this.gridLegacyConfigName=void 0,this.filterBarLegacyConfigName=void 0,this.formLegacyConfigName=void 0,this.disablePersonalizedFilter=void 0,this.autoLoad=void 0,this.autoFocus=!0,this.enableGridInsert=!1,this.domainMessagesBuilder=void 0,this.ignoreReadOnlyFormFields=void 0,this.setCustomFormTitle=void 0,this.strategyExporter=l.SERVER_SIDE,this.layoutFormConfig=!1,this.multipleEditionEnabled=!0,this.paginationCounterMode="auto",this.layoutFormConfig=!1,this.customContainerId=`SNK-CRUD-CUSTOM-CONTAINER-${a.generateUUID()}`}async goToView(t){this.executeAction(t)}async openConfigurator(){var t;null===(t=this._snkConfigurator)||void 0===t||t.open()}async closeConfigurator(){var t;null===(t=this._snkConfigurator)||void 0===t||t.close()}async reloadFilterBar(){var t;null===(t=this._snkGrid)||void 0===t||t.reloadFilterBar()}async getFilterBar(){return await this._snkGrid.getFilterBar()}async addCustomEditor(t,i){if(this._guidesViewer&&this._snkGrid)return this._guidesViewer.addCustomEditor(t,i),void this._snkGrid.addCustomEditor(t,i);const s=new Map(this._customEditors);s.set(t,i),this._customEditors=s}async addGridCustomRender(t,i){if(this._snkGrid)return void this._snkGrid.addGridCustomRender(t,i);const s=new Map(this._customRenders);s.set(t,i),this._customRenders=s}async addCustomValueFormatter(t,i){this._snkGrid.addCustomValueFormatter(t,i)}async removeCustomValueFormatter(t){this._snkGrid.removeCustomValueFormatter(t)}async setFieldProp(t,i,s){await this._guidesViewer.setFieldProp(t,i,s)}currentViewModeWatcher(t){this._viewHistory=[...this._viewHistory.slice(-1),t]}async gridToForm(t=!1){this._backToGrid=!t&&await this._viewStack.getSelectedIndex()===u.GRID,this.setViewMode(u.FORM)}async executeAction(t){switch(t){case d.GRID_MODE:return this.setViewMode(u.GRID);case d.FORM_MODE:case d.UPDATE:return this.gridToForm(t!==d.UPDATE);case d.UPDATE_MULTIPLE:return this._dataUnit.isMultipleEdition=!0,this.setViewMode(u.FORM);case d.CONFIGURATOR:return this._snkConfigurator.open();case d.ATTACH:return this.setViewMode(u.ATTACHMENT)}}backView(){const t=this._viewHistory.at(-2)||u.GRID;this.setViewMode(t)}setViewMode(t){this._viewStack.show(t),this._currentViewMode=t,t===u.GRID?(this._dataUnit.isMultipleEdition=!1,this._snkGrid.setFocus()):t===u.FORM&&this._guidesViewer.setFocus(),this.viewModeChanged.emit(t)}openConfig(t){this._snkConfigurator.close(),t===u.GRID?this._snkGrid.showConfig():t===u.FORM&&this._guidesViewer.showFormConfig()}addDataElementID(){o.addIDInfo(this._element,null,{dataUnit:this._dataUnit})}insertionModeHandler(){this.enableGridInsert||this.gridToForm()}cancelHandler(){this._backToGrid&&this.setViewMode(u.GRID)}async getAttachmentRegisterKey(){if(this._snkDataUnit)return(await this._snkDataUnit.getSelectedRecordsIDsInfo()).map((({value:t})=>t)).join("_")}setCustomRenders(){if(this._snkGrid)for(const[t,i]of this._customRenders)this._snkGrid.addGridCustomRender(t,i),this._customRenders.delete(t)}setCustomEditors(){if(this._snkGrid&&this._guidesViewer)for(const[t,i]of this._customEditors)this._guidesViewer.addCustomEditor(t,i),this._snkGrid.addCustomEditor(t,i),this._customEditors.delete(t)}componentDidRender(){this.setCustomRenders(),this.setCustomEditors()}componentWillLoad(){this._application=n.getContextValue("__SNK__APPLICATION__");let t=this._element.parentElement;for(this._application.hasAccess(m.UPDATE,this._resourceID).then((t=>this._canEdit=t));t;){if("SNK-DATA-UNIT"===t.tagName.toUpperCase()){this._snkDataUnit=t,this._snkDataUnit.addEventListener("insertionMode",(()=>this.insertionModeHandler())),this._snkDataUnit.addEventListener("cancelEdition",(()=>this.cancelHandler())),this._snkDataUnit.domainMessagesBuilder=this.domainMessagesBuilder,this._dataUnit=this._snkDataUnit.dataUnit,this._dataState=this._snkDataUnit.dataState,this._dataUnit?this.initDataUnit():this._snkDataUnit.addEventListener("dataUnitReady",(t=>{this._dataUnit=t.detail,this.initDataUnit()})),this._snkDataUnit.addEventListener("dataStateChange",this.handleDataStateChange.bind(this));break}t=t.parentElement}this.configName||(this.configName=this._application.configName)}componentDidLoad(){this.initKeyboardManager()}disconnectedCallback(){this.removeShortcuts()}async handleDataStateChange(t){var i;this._dataState=t.detail,void 0!==this._dataState.selectedRecord&&(this.attachmentRegisterKey=await this.getAttachmentRegisterKey());const s=await this._snkDataUnit.getFieldsWithRmPrecision();for(const t of s||[]){if(!t)continue;const s=null===(i=this._dataState.rowMetadata)||void 0===i?void 0:i.getProp("rm_precision",t);(s||0===s)&&(await this.setFieldProp(t,"precision",s),await this.setFieldProp(t,"prettyPrecision",s))}}async initKeyboardManager(){this._keyboardManager=new r({propagate:!1,element:this._element});const t=this._dataUnit||await this._snkDataUnit.getDataUnit();async function i(){const i=document.activeElement,s=i==document.body;s||i.blur(),await t.saveData(),s||null==i.setFocus?s||i.focus():i.setFocus()}this._keyboardManager&&this._keyboardManager.bind("F6",this.toggleView.bind(this),{description:this.getMessage("snkCrud.shortcuts.toggleView"),element:this._element}).bind("F7",i.bind(this),{description:this.getMessage("snkCrud.shortcuts.saveData"),element:this._element}).bind("ctrl + \\",i.bind(this),{description:this.getMessage("snkCrud.shortcuts.addRecord"),element:this._element}).bind("F8",async function(){t.hasNewRecord()||t.addRecord()}.bind(this),{description:this.getMessage("snkCrud.shortcuts.addRecord"),element:this._element}).bind("F9",t.removeSelectedRecords.bind(t),{description:this.getMessage("snkCrud.shortcuts.removeRecord"),element:this._element}).bind("ctrl + F9",t.removeSelectedRecords.bind(t),{description:this.getMessage("snkCrud.shortcuts.removeRecord"),element:this._element}).bind("F5",(async()=>{const i=await this._viewStack.getSelectedIndex();u.GRID===i&&t.loadData()}),{description:this.getMessage("snkCrud.shortcuts.refreshData"),element:this._element}).bind("Escape",(()=>{t.isDirty()&&t.cancelEdition()}),{debounceTime:1e3,description:this.getMessage("snkCrud.shortcuts.cancelAction"),element:this._element})}getMessage(t,i){if(this.messagesBuilder)return this.messagesBuilder.getMessage(t,i)}async removeShortcuts(){var t;null===(t=this._keyboardManager)||void 0===t||t.unbindAllShortcutKeys()}async toggleView(){const t=await this._viewStack.getSelectedIndex();this.setViewMode(u.GRID===t?u.FORM:u.GRID)}async initDataUnit(){this.addDataElementID(),this.messagesBuilder||(this.messagesBuilder=this._snkDataUnit.messagesBuilder),null==this._resourceID&&(this._resourceID=this._snkDataUnit.resourceID,null==this._resourceID&&(this._resourceID=await this._application.getResourceID()))}handleConfiguratorEvent(t,i){t.stopImmediatePropagation(),"SAVE"!==i?this.configuratorCancel.emit():this.configuratorSave.emit()}render(){if(null!=this._resourceID)return this._snkDataUnit.ignoreSaveMessage=this._currentViewMode===u.GRID&&!this.enableGridInsert,s(e,null,s("ez-view-stack",{ref:t=>this._viewStack=t,"data-element-id":"crud"},s("stack-item",{class:"ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium"},s("snk-grid",{ref:t=>this._snkGrid=t,class:"ez-flex ez-flex--column ez-size-height--full ez-size-width--full",filterBarTitle:this.filterBarTitle,"data-element-id":"crud_grid",configName:this.configName,onGridDoubleClick:()=>this.gridToForm(!0),taskbarManager:this.taskbarManager,onActionClick:t=>this.executeAction(t.detail),messagesBuilder:this.messagesBuilder,actionsList:this.actionsList,statusResolver:this.statusResolver,multipleSelection:this.multipleSelection,presentationMode:this.presentationMode,recordsValidator:this.recordsValidator,selectionToastConfig:this.selectionToastConfig,useEnterLikeTab:this.useEnterLikeTab,canEdit:this._canEdit,resourceID:this._resourceID,disablePersonalizedFilter:this.disablePersonalizedFilter,gridLegacyConfigName:this.gridLegacyConfigName,filterBarLegacyConfigName:this.filterBarLegacyConfigName,autoLoad:this.autoLoad,autoFocus:this.autoFocus,enableGridInsert:this.enableGridInsert,enableLockManagerTaskbarClick:this.enableLockManagerTaskbarClick,enableLockManagerLoadingComp:this.enableLockManagerLoadingComp,strategyExporter:this.strategyExporter,multipleEditionEnabled:this.multipleEditionEnabled,paginationCounterMode:this.paginationCounterMode},s("slot",{name:"GRID_TASKBAR_CUSTOM_ELEMENTS"}),s("slot",{name:"GRID_HEADER_CUSTOM_ELEMENTS"}),s("slot",{name:"SnkGridHeader"}),s("slot",{name:"SnkGridFooter"}),s("slot",{name:"SnkGridTaskBar"}))),s("stack-item",null,s("snk-guides-viewer",{ref:t=>this._guidesViewer=t,entityPath:this._snkDataUnit.entityName,messagesBuilder:this.messagesBuilder,onExit:()=>this.setViewMode(u.GRID),dataState:this._dataState,dataUnit:this._dataUnit,actionsList:this.actionsList,taskbarManager:this.taskbarManager,configName:this.configName,onActionClick:t=>this.executeAction(t.detail),presentationMode:this.presentationMode,"data-element-id":"crud_form",canEdit:this._canEdit,recordsValidator:this.recordsValidator,resourceID:this._resourceID,detailTaskbarCustomContainerId:this.customContainerId,formLegacyConfigName:this.formLegacyConfigName,enableGridInsert:this.enableGridInsert,getCustomTitle:this.setCustomFormTitle,ignoreReadOnlyFormFields:this.ignoreReadOnlyFormFields},s("slot",{name:"GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS"}),s("slot",{name:"SnkFormTaskBar"}))),s("stack-item",{tabIndex:"0"},s("snk-attach",{registerKey:this.attachmentRegisterKey,messagesBuilder:this.messagesBuilder,entityName:this._snkDataUnit.entityName,onBack:this.backView.bind(this)})),s("snk-configurator",{ref:t=>this._snkConfigurator=t,viewMode:this._currentViewMode,messagesBuilder:this.messagesBuilder,onConfigSelected:t=>this.setViewMode(t.detail),onOpenConfig:t=>this.openConfig(t.detail),showActionButtons:this.showActionButtons,onSave:t=>this.handleConfiguratorEvent(t,"SAVE"),onCancel:t=>this.handleConfiguratorEvent(t,"CANCEL"),resourceID:this._resourceID,customContainerId:this.customContainerId,layoutFormConfig:this.layoutFormConfig})),s("div",{id:`${this.customContainerId}`},s("slot",{name:"SnkConfigContainerSlot"}),s("slot",{name:"DETAIL_GRID_HEADER_CUSTOM_ELEMENTS"}),s("slot",{name:"DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS"}),s("slot",{name:"DETAIL_TASKBAR_CUSTOM_ELEMENTS"})))}get _element(){return h(this)}static get watchers(){return{_currentViewMode:["currentViewModeWatcher"]}}};f.style=".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";export{f as snk_crud}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,F as s,H as l,g as r}from"./p-d8d8169b.js";import{ElementIDUtils as n,ObjectUtils as a}from"@sankhyalabs/core";import{ApplicationUtils as h}from"@sankhyalabs/ezui/dist/collection/utils";import{P as o}from"./p-988afe78.js";import{E as c}from"./p-1a68fb59.js";import{F as d}from"./p-ff1990ad.js";import"./p-84345e7a.js";const u=class{constructor(e){t(this,e),this.filterChange=i(this,"filterChange",7),this.config=void 0,this.getMessage=void 0,this.showHardFixed=!0,this.removalBlocked=!1}async setFocusField(){var t,i,e,s;this._editor&&(this._editor.setFocus?null===(i=null===(t=this._editor)||void 0===t?void 0:t.setFocus)||void 0===i||i.call(t):this._editor.focus&&(null===(s=null===(e=this._editor)||void 0===e?void 0:e.focus)||void 0===s||s.call(e)))}async clearValue(){this._editor&&this._editor.clearValue&&await this._editor.clearValue()}observeConfig(t){var i,e;this._editor&&(this._editor.config=t),null===(e=null===(i=this._editor)||void 0===i?void 0:i.reloadList)||void 0===e||e.call(i),this._customElementObject=this.getContentEditor()}componentDidLoad(){if(this._element){n.addIDInfo(this._element);const t=this._element.getAttribute(n.DATA_ELEMENT_ID_ATTRIBUTE_NAME);this._idContentEditor=`${t}_${this.config.id}`}}changeConfig(t){this.filterChange.emit(t)}getContentEditor(){switch(this.config.type){case d.BINARY_SELECT:return{tag:"snk-filter-binary-select"};case d.MULTI_SELECT:return{tag:"snk-filter-multi-select"};case d.PERIOD:return{tag:"snk-filter-period"};case d.SEARCH:return{tag:"snk-filter-search"};case d.NUMBER:return{tag:"snk-filter-number"};case d.PERSONALIZED:return{tag:"snk-personalized-filter-editor",props:{presentationMode:c.CHIP,onValueChanged:t=>this.handleValueChanged(t)}};case d.CHECK_BOX_LIST:return{tag:"snk-filter-checkbox-list",props:{onValueChanged:t=>this.config=Object.assign(Object.assign({},this.config),{value:t.detail})}};case d.MULTI_LIST:return{tag:"snk-entity-list",props:{onValueChanged:t=>this.config=Object.assign(Object.assign({},this.config),{value:t.detail})}}}return{tag:"snk-filter-text"}}handleValueChanged({detail:t}){const i=(null==t?void 0:t.items)||this.config.groupedItems;this.config=Object.assign(Object.assign({},this.config),{groupedItems:i,visible:(i||[]).filter((t=>t.visible)).length>0})}removeItem(){const t=this.config.type===d.MULTI_LIST&&Array.isArray(this.config.value)?this.config.value.map((t=>Object.assign(Object.assign({},t),{check:!1}))):void 0,i=Object.assign(Object.assign({},this.config),{visible:!1,fixed:!1,value:t});null!=i.groupedItems&&(i.groupedItems=i.groupedItems.map((t=>Object.assign(Object.assign({},t),{visible:!1,fixed:!1,value:void 0})))),this.changeConfig(i)}removeItemFromGroup(t){return Object.assign(Object.assign({},t),{visible:!1,fixed:!1,value:void 0})}getPopUpHeaderButtons(){return e(s,null,!this.removalBlocked&&!this.config.removalBlocked&&this.buildIcon(this.getMessage("snkFilterBar.removeFilter"),"delete",(()=>this.removeItem())),this.showHardFixed&&!this.config.hardFixed&&this.buildIcon(this.getMessage(this.config.fixed?"snkFilterBar.unpinFilter":"snkFilterBar.pinFilter"),this.config.fixed?"un-pin":"push-pin",(()=>this.changeConfig(Object.assign(Object.assign({},this.config),{fixed:!this.config.fixed})))))}buildIcon(t,i,s){return e("button",{onClick:()=>s(),class:"sc-snk-filter-bar snk-filter-item__editor-header-button",ref:i=>i&&this.buildIdButton(i,t)},e("ez-icon",Object.assign({title:t,iconName:i},{[n.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${n.getInternalIDInfo(`_${t}`)}`})))}buildIdButton(t,i){if(!t)return;const e={id:i};t.removeAttribute(n.DATA_ELEMENT_ID_ATTRIBUTE_NAME),n.addIDInfoIfNotExists(t,"button",e)}clearBinarySelectValues(){var t;const i=this._editor||{};null===(t=i.resetValues)||void 0===t||t.call(i),this.config=a.copy(this.originalConfig),this.changeConfig(Object.assign(Object.assign({},this.config),{value:void 0}))}apply(){if(!o.validateVariableValues(this.config,this._editor.value))return h.alert(this.getMessage("snkFilterBar.filterModal.validations.notFullFilled.title"),this.getMessage("snkFilterBar.filterModal.validations.notFullFilled.message"));const t=void 0!==this._editor.value?this._editor.value:this.config.value;this.changeConfig(Object.assign(Object.assign({},this.config),{visible:this.isVisible(),value:t}))}isVisible(){return!(this.config.groupedItems&&this.config.groupedItems.length>0)||this.config.groupedItems.filter((t=>t.visible)).length>0}clear(){var t;if(this.config.type!==d.BINARY_SELECT){if(d.MULTI_LIST===this.config.type){const i=a.copy(this.config);return null===(t=i.value)||void 0===t||t.forEach((t=>!!t&&(t.check=!1))),void(this.config=a.copy(i))}this.changeConfig(Object.assign(Object.assign({},this.config),{value:void 0}))}else this.clearBinarySelectValues()}filterCanBeCleared(){return this.config.type!==d.PERSONALIZED}onKeyDonwListener(t){"Enter"===t.key&&this._applyButton.setFocus().then((()=>this.apply()))}buildRightSlot(t){return e("ez-icon",{iconName:"delete",onClick:()=>this.removeValueFromConfig(t)})}removeValueFromConfig(t){var i,e;if(this.config){const s=a.copy(this.config),l=null===(i=s.value)||void 0===i?void 0:i.findIndex((i=>(null==i?void 0:i.id)===t.id));null===(e=s.value)||void 0===e||e.splice(l,1),this.config=a.copy(s)}}componentWillLoad(){this.originalConfig=a.copy(this.config),this._customElementObject=this.getContentEditor()}render(){const{tag:t,props:i}=this._customElementObject;return e(l,null,e("div",{class:"col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center"},e("div",{class:"ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header"},this.config.detailTitle),this.getPopUpHeaderButtons()),e(t,Object.assign({maxHeightList:"240px",ref:t=>this._editor=t,value:this.config.value,config:this.config,onKeyDown:t=>this.onKeyDonwListener(t),"data-element-id":this._idContentEditor,getMessage:this.getMessage,rightListSlotBuilder:t=>this.buildRightSlot(t)},i)),e("hr",{class:"sc-snk-filter-bar snk-filter__popover-rule"}),e("div",{class:"ez-col ez-col--sd-12 ez-align--right"},this.filterCanBeCleared()&&e("ez-button",{label:this.getMessage("snkFilterBar.cleanFilter"),onClick:()=>this.clear(),size:"small"}),e("ez-button",{ref:t=>this._applyButton=t,label:this.getMessage("snkFilterBar.applyFilter"),onClick:()=>this.apply(),size:"small",class:"ez-button--primary ez-padding-left--medium"})))}get _element(){return r(this)}static get watchers(){return{config:["observeConfig"]}}};export{u as snk_filter_detail}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i,g as e}from"./p-d8d8169b.js";import{ElementIDUtils as h}from"@sankhyalabs/core";const a=class{constructor(i){t(this,i),this.valueChanged=s(this,"valueChanged",7),this.config=void 0,this.value=void 0,this.errorMessage=void 0}ezChangeListener(t){this.errorMessage=void 0,this.value=t.detail,this.valueChanged.emit(this.value)}async setFocus(){this._textInputElement.setFocus()}async clearValue(){this.value=this.config.value,this._textInputElement&&(this._textInputElement.value=this.config.value)}componentDidLoad(){this._element&&h.addIDInfo(this._element,"filterContentEditor")}render(){var t;if(this.config)return i("ez-tooltip",{active:!1===this.config.enabled,message:this.config.disabledMessage,type:"warning"},i("ez-text-input",{id:this.config.id,ref:t=>this._textInputElement=t,value:this.config.value,mask:null===(t=this.config)||void 0===t?void 0:t.mask,enabled:this.config.enabled,cleanValueMask:!0,errorMessage:this.errorMessage}))}get _element(){return e(this)}};export{a as snk_filter_text}
@@ -0,0 +1 @@
1
+ import{F as n}from"./p-ff1990ad.js";function o(o){return o.filter((o=>!!o.required&&(o.type===n.MULTI_LIST?!function(n){var o;const r=Array.isArray(n)?n:null==n?void 0:n.elements;return(null===(o=null==r?void 0:r.filter((n=>null==n?void 0:n.check)))||void 0===o?void 0:o.length)>0}(o.value):!o.value)))}function r(n){return 0===o(n).length}export{o as g,r as v}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,H as s,g as r}from"./p-d8d8169b.js";import{ElementIDUtils as o,ObjectUtils as a}from"@sankhyalabs/core";import{C as l}from"./p-c71dcb2d.js";import{E as n}from"./p-1a68fb59.js";import{F as h}from"./p-ff1990ad.js";import{F as d}from"./p-b568c1d4.js";import"./p-8d256def.js";import"./p-d75a732c.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";const p=class{constructor(e){t(this,e),this.filterChange=i(this,"filterChange",7),this.editPersonalizedFilter=i(this,"editPersonalizedFilter",7),this.addPersonalizedFilter=i(this,"addPersonalizedFilter",7),this.filterItem=void 0,this.configName=void 0,this.resourceID=void 0}getContentEditorConfig(){const t={presentationMode:n.MODAL};switch(this.filterItem.type){case h.BINARY_SELECT:return{tag:"snk-filter-binary-select",props:t};case h.MULTI_SELECT:return{tag:"snk-filter-multi-select"};case h.PERIOD:return{tag:"snk-filter-period",props:t};case h.SEARCH:return{tag:"snk-filter-search"};case h.NUMBER:return{tag:"snk-filter-number",props:t};case h.PERSONALIZED:return this.buildSnkFilterPersonalizedProps();case h.CHECK_BOX_LIST:return{tag:"snk-filter-checkbox-list",props:t};case h.MULTI_LIST:return{tag:"snk-entity-list",props:{maxHeightList:"640px",rightListSlotBuilder:t=>this.buildRightSlot(t)}}}return{tag:"snk-filter-text"}}buildSnkFilterPersonalizedProps(){return{tag:"snk-personalized-filter-editor",props:{onEditFilter:t=>this.editPersonalizedFilter.emit(t.detail),onAddFilter:()=>this.addPersonalizedFilter.emit()}}}isVisible(t){return!!this.filterItem.visible||void 0!==t}updateFilterValue(t){var i,e;const s=void 0!==(null==t?void 0:t.value)?t.value:t;this.filterItem=Object.assign(Object.assign({},this.filterItem),null!=this.filterItem.groupedItems?{visible:s>0,value:s,groupedItems:t.items}:{value:this.filterItem.type===(h.SEARCH||h.CHECK_BOX_LIST)?t:s,visible:this.isVisible(s)}),this._editor&&(this._editor.config=this.filterItem),null===(e=null===(i=this._editor)||void 0===i?void 0:i.reloadList)||void 0===e||e.call(i),this.filterChange.emit(this.filterItem)}handleDeleteFilter(t,i){i===h.PERSONALIZED&&l.removePersonalizedFilter(t,this.resourceID,this.configName)}componentDidLoad(){if(this._element){o.addIDInfo(this._element);const t=this._element.getAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME);this._idContentEditor=`${t}_${this.filterItem.id}`}}buildRightSlot(t){return e("ez-icon",{iconName:"delete",onClick:()=>this.removeValueFromConfig(t)})}removeValueFromConfig(t){var i,e,s;const r=null===(e=null===(i=this.filterItem)||void 0===i?void 0:i.value)||void 0===e?void 0:e.findIndex((({id:i})=>i===t.id)),o=a.copy(this.filterItem);null===(s=null==o?void 0:o.value)||void 0===s||s.splice(r,1),this.updateFilterValue(o.value)}canShowDetailModal(){const{CUSTOM_FILTER:t,OTHER_FILTERS:i}=d;return![t,i].includes(this.filterItem.filterType)&&this.filterItem.type!==h.BINARY_SELECT}render(){const{tag:t,props:i}=this.getContentEditorConfig();return e(s,null,e("div",{class:"ez-flex ez-flex--column grow"},this.canShowDetailModal()&&e("label",{class:"ez-text ez-text--medium ez-text--primary ez-margin-bottom--extra-small",htmlFor:`filter-item-${this.filterItem.id}`},this.filterItem.detailModal),e(t,Object.assign({ref:t=>this._editor=t,id:`filter-item-${this.filterItem.id}`,config:this.filterItem,value:this.filterItem.value,onValueChanged:t=>this.updateFilterValue(t.detail),"data-element-id":this._idContentEditor},i))))}get _element(){return r(this)}};p.style=".grow{flex-grow:1}.gap{gap:4px}";export{p as snk_filter_modal_item}
@@ -0,0 +1,11 @@
1
+ import{r as t,c as e,h as i,H as s,g as n}from"./p-d8d8169b.js";import{DateUtils as r,StringUtils as a,ObjectUtils as o,WaitingChangeException as h,SilentException as l,WarningException as c,ErrorException as d,ElementIDUtils as u,SearchUtils as p,ArrayUtils as m,KeyboardManager as g,OnboardingUtils as w,DependencyType as y,DataType as v,ApplicationContext as f,ErrorTracking as P,UserAgentUtils as k,LockManager as z,LockManagerOperation as _}from"@sankhyalabs/core";import{ApplicationUtils as x}from"@sankhyalabs/ezui/dist/collection/utils";import{C as A}from"./p-c71dcb2d.js";import{d as S,D as b,U as I,S as T}from"./p-d75a732c.js";import{A as N,a as L}from"./p-c98e2085.js";import{P as E,D as C}from"./p-9062d640.js";import{P as O}from"./p-bf017a1f.js";import{T as D}from"./p-9019a32f.js";import"./p-0f3698af.js";import"./p-ff1990ad.js";import{F as R}from"./p-8d256def.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";class M{static webConnectionCaller(t,e,i){var s;null===(s=window.AppletCaller)||void 0===s||s.webConnectionCaller(t,e,i)}}const F=U;function U(t,e){const i=$();return(U=function(t){return i[t-=378]})(t,e)}function $(){const t=["true","863GKWjmo","parse","56355fjjjAm","isSup","putAccess","4324480sjuCdS","hasOwnProperty","239748okvJLB","name","6055770tXeRaU","actions","forEach","7RPRvzn","1042CHxkUw","2988126NIwRMm","20MTNzmH","authorizationSf","item","string","hasAccess","isArray","Objeto não pode ser indefinido.","3071943fWslZp","parseFromJSON"];return($=function(){return t})()}!function(){const t=U,e=$();for(;;)try{if(281287==parseInt(t(399))/1*(-parseInt(t(387))/2)+-parseInt(t(401))/3+parseInt(t(381))/4*(-parseInt(t(389))/5)+parseInt(t(388))/6*(-parseInt(t(386))/7)+parseInt(t(379))/8+parseInt(t(396))/9+parseInt(t(383))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class j{[F(397)](t){const e=F;if(typeof(t=utxt(t[e(390)]))==e(392)&&(t=JSON[e(400)](t)),null==t)throw Error(e(395));const i=new H("S"===t[e(402)]||!0===t[e(402)]);return Array[e(394)](t[e(391)])&&t[e(391)][e(385)]((t=>i.putAccess(t[e(382)],String(t.status)==e(398)))),i}}class H{constructor(t){const e=F;this.isSup=t,this[e(384)]={}}[F(378)](t,e){this[F(384)][t]=e}[F(393)](t){const e=F;if(this[e(402)])return!0;let i=!0;return this[e(384)][e(380)](t)&&(i=this.actions[t]),i}isUserSup(){return this.isSup}}class B{constructor(){this._embeddedParams=new Map,this._cachedParams=new Map,this.templateByQuery=new Map;try{if(null!=window.MGE_PARAMS){atob(window.MGE_PARAMS).split("__;__").forEach((t=>{const[e,i]=t.split("__=__");this._embeddedParams.set(e,i)}))}}catch(t){console.error("Problemas ao obter parâmetros embarcados"),console.error(t)}this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchParam",S.gql`query($name: String!) {
2
+ $queryAlias$: fetchResource(name: $name){
3
+ name
4
+ resource
5
+ }
6
+ }`)}async getParam(t){if(this._embeddedParams.has(t))return Promise.resolve(this._embeddedParams.get(t));if(this._cachedParams.has(t))return this._cachedParams.get(t);const e=`param://application?params=${t}`,i=await b.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchParam")});return this._cachedParams.set(t,i),i}async asString(t){const e=await this.getParam(t);return this.getValue(e)}async asInteger(t){const e=await this.getParam(t);return parseInt(this.getValue(e))}async asFloat(t){const e=await this.getParam(t);return parseFloat(this.getValue(e))}async asBoolean(t){const e=await this.getParam(t);return"S"===this.getValue(e)}async asDate(t){const e=await this.getParam(t);return r.strToDate(this.getValue(e))}async getBatchParams(t){const e=await this.getParam(t.join(",")),i={};return e.forEach((t=>i[t.name]=t.resource)),i}getValue(t={}){if(Array.isArray(t)&&t.length>0&&(t=t[0]),"string"==typeof t)return t;if(a.isEmpty(t.resource))return"";try{const e=o.stringToObject(t.resource),[i]=Object.keys(e);return e[i]}catch(t){console.warn("Erro ao converter string JSON.")}}}class q{constructor(){this.templateByQuery=new Map,this.cancel=[],this.buildTemplates()}buildTemplates(){this.templateByQuery.set("fetchTotals",S.gql`query($filters: [InputFilter!] $name: String!) {
7
+ $queryAlias$: fetchTotals(name: $name, filters: $filters ){
8
+ name
9
+ value
10
+ }
11
+ }`)}fetchTotals(t,e,i=[]){const s=`${t}_${e}`,n=this.cancel.findIndex((t=>t[s]));return n>=0&&(this.cancel[n][s](),this.cancel.splice(n,1)),Promise.race([new Promise((t=>this.cancel.push({[s]:t}))),this.getTotals(t,e,i)]).then((t=>{let e=new Map;if(t){e=t;const i=this.cancel.findIndex((t=>t[s]));i>=0&&this.cancel.splice(i,1)}return e}))}getTotals(t,e,i=[]){return new Promise(((s,n)=>{b.get().callGraphQL({query:this.templateByQuery.get("fetchTotals"),values:{name:`totals://${t}/${e}`,filters:i}}).then((t=>{if(t.length>0){const e=new Map;return t.forEach((t=>e.set(t.name,parseFloat(t.value)))),s(e)}return n("Não foi possível recuperar os totalizadores")})).catch(n)}))}}var K;class V{static openAppActivity(t,e){var i;null===(i=window.workspace)||void 0===i||i.openAppActivity(t,e)}static getAppLabel(t){if(null!=(null===window||void 0===window?void 0:window.workspace))return null==window.workspace.getAppLabel&&(window.workspace.getAppLabel=t=>(t||"").split(".").pop()),window.workspace.getAppLabel(t)}static setScreenToUseV3Layout(){var t;null===(t=window.workspace)||void 0===t||t.setScreenToUseV3Layout()}static setScreenToUseOldLayout(){var t;null===(t=window.workspace)||void 0===t||t.setScreenToUseOldLayout()}static showDesktop(){var t,e;null===(e=null===(t=window.workspace)||void 0===t?void 0:t.showDesktop)||void 0===e||e.call(t)}static searchApp(){var t,e;null===(e=null===(t=window.workspace)||void 0===t?void 0:t.searchApp)||void 0===e||e.call(t)}static openHelp(){var t,e;null===(e=null===(t=window.workspace)||void 0===t?void 0:t.openHelp)||void 0===e||e.call(t)}static applicationClick(){var t,e;(null===(t=window.workspace)||void 0===t?void 0:t.applicationClick)&&(null===(e=window.workspace)||void 0===e||e.applicationClick())}}V.resourceID=null===(K=window.workspace)||void 0===K?void 0:K.resourceID;class W{constructor(t){this._app=t,window.addEventListener("error",(t=>this.errorHandler(t))),window.addEventListener("unhandledrejection",(t=>this.rejectionHandler(t)))}getMessage(t,e){return this._app.messagesBuilder.getMessage(t,e)}rejectionHandler(t){const e=t.reason;e instanceof h||(e?this.processException(e):this._app.isDebugMode().then((t=>{t&&this._app.error(this.getMessage("snkErrorHandler.title.promiseRejected"),this.getMessage("snkErrorHandler.message.undeterminedPromiseRejection"))})))}errorHandler(t){this.processException(t.error)}buildErrorCodeHTML(t){return`<br><a href="#" onclick="try{window.workspace.openHelp('_tbcode:${t}')} catch(e){alert('${this.getMessage("snkErrorHandler.message.cannotOpenHelp")}');}">${this.getMessage("snkErrorHandler.errorCode.label")}${t}</a>`}processException(t){t.errorCode&&(t.message+=this.buildErrorCodeHTML(t.errorCode)),t instanceof l?console.warn(this.getMessage("snkErrorHandler.message.silentExceptionIgnored"),t):t instanceof h||t instanceof c?this._app.alert(t.title,t.message):t instanceof d?this._app.error(t.title,t.message):this._app.isDebugMode().then((e=>{if(e)if(t instanceof Error)this._app.error(t.name,t.message);else{const e=(null==t?void 0:t.title)||this.getMessage("snkErrorHandler.title.errorDetected",void 0),i="string"==typeof t?t:t.message||`${this.getMessage("snkErrorHandler.error.internal")} "${o.objectToString(t)}"`;this._app.error(e,i)}}))}}class G{constructor(){this._debounceTime=1500,this.requests=new Map,this.requestsLoadingBar=[]}onRequestStart(t){if(t.url.includes("quietMode=true"))return;this.requestsLoadingBar.push(t.requestId);const e=setTimeout((()=>{this.ezLoadingBar.show()}),this._debounceTime);this.requests.set(t.requestId,e)}onRequestEnd(t){var e,i,s;const n=this.requests.get(t.requestId);clearTimeout(n),(null===(e=this.requestsLoadingBar)||void 0===e?void 0:e.includes(t.requestId))&&(this.requestsLoadingBar=null===(i=this.requestsLoadingBar)||void 0===i?void 0:i.filter((e=>e!==t.requestId)),!this.requestsLoadingBar.length&&(null===(s=this.ezLoadingBar)||void 0===s||s.hide()))}}class J{constructor(){this._debounceTime=1e3,this._ignoredNameTypes=["totals"],this._countRequest=0}onRequestStart(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest++,this.ezLoadingBar.show(),this._timerLoading&&clearTimeout(this._timerLoading))}onRequestEnd(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest--,this._timerLoading=setTimeout((()=>{this._countRequest<=0&&this.ezLoadingBar.hide()}),this._debounceTime))}isIgnoreLoadingOnRequest(t){if(null==t)return!1;if(t.url.includes("quietMode=true"))return!0;if(null==t.requestBody)return!1;if(1==t.requestBody.length){const{name:e}=t.requestBody[0].variables;if(e){const t=e.split(":");return this._ignoredNameTypes.indexOf(t[0])>=0}}return!1}}class Y{static create({strategy:t}){switch(t){case"request_name":return new J;case"request_time":return new G;default:throw new Error("Strategy not found")}}}const Z=["<img","<svg"];class X{constructor(){this._config=null,this.listeners=[]}static getInstance(){return X.instance||(X.instance=new X),X.instance}get config(){return this._config}setConfig(t){this._config=t,this.notifyListeners()}onConfigChange(t){this.listeners.push(t)}notifyListeners(){this.listeners.forEach((t=>t(this._config)))}}const Q=class{constructor(i){t(this,i),this.applicationLoaded=e(this,"applicationLoaded",7),this.applicationLoading=e(this,"applicationLoading",7),this.NEW_VERSION_POPUP_LOCKER="NEW_VERSION_POPUP_LOCKER",this.FEATURE_FLAG_CACHE_DURATION=36e5,this._authPromises=[],this._keyboardManager=new g,this._waitingAppReady=new Array,this._duCache=new Map,this._duPromises=new Map,this._requestListener=Y.create({strategy:"request_time"}),this._maxTimerAppLoading=1e4,this._featureFlagsCache=new Map,this._isBrowserTypeElectron=!1,this._pendingActions=new Map,this._loadPkParameter=null,this._isLoadedByPk=!1,this._formConfigFetcher=new R,this._LayoutFormConfigSingleton=X.getInstance(),this._applicationReady=!1,this._templateSkeleton=D.GRID,this._activeScrimWindow=!1,this.enableLockManagerLoadingApp=void 0,this.messagesBuilder=void 0,this.configName=void 0,this.gridLegacyConfigName=void 0,this.formLegacyConfigName=void 0,this.loadByPK=void 0}async processPendingActions(t){const e=this._pendingActions.get(t);e&&e.length&&(e.forEach((t=>t())),this._pendingActions.set(t,[]))}get parameters(){return this._parameters||(this._parameters=new B),this._parameters}async getAuth(t){return null==t?this.getApplicationAuth():new Promise(((e,i)=>{this.authFetcher.getData(t).then((t=>{e(t)})).catch((t=>{i(t)}))}))}async getApplicationAuth(){return this._auth?Promise.resolve(this._auth):new Promise(((t,e)=>{const i=this._authPromises.length>0;this._authPromises.push(new tt(t,e)),i||this.authFetcher.getData(this.applicationResourceID).then((t=>{for(this._auth=t;this._authPromises.length>0;)this._authPromises.pop().resolve(this._auth)})).catch((t=>{for(;this._authPromises.length>0;)this._authPromises.pop().reject(t)}))}))}watchPropHandler(t,e){t&&this._loadPkParameter&&(this.loadByPK(this._loadPkParameter.pk,this._loadPkParameter.redirect),this._loadPkParameter=null)}async getKeyboardManager(){return Promise.resolve(this._keyboardManager)}async getLayoutFormConfig(){return Promise.resolve(this._LayoutFormConfigSingleton)}async isUserSup(){return new Promise(((t,e)=>{this.getAuth().then((i=>{this.getAuthList(i).then((e=>{t(e.isSup)})).catch((t=>e(t)))}))}))}async addPendingAction(t,e){var i;const s=null!==(i=this._pendingActions.get(t))&&void 0!==i?i:[];this._pendingActions.set(t,[...s,e])}async callServiceBroker(t,e,i){return b.get().callServiceBroker(t,e,i)}async initOnboarding(t){this.hasToShowNewVersionPopup()?await this.addPendingAction(this.NEW_VERSION_POPUP_LOCKER,(()=>this.doInitOnboarding(t))):this.doInitOnboarding(t)}doInitOnboarding(t){w.getInstance().init(t,window.envContext)}async hasAccess(t,e){return new Promise(((i,s)=>{this.getAuth(e).then((e=>{this.getAuthList(e).then((e=>{i(e.isSup||e.actions[t])})).catch((t=>s(t)))}))}))}async getAllAccess(t){return new Promise(((e,i)=>{this.getAuth(t).then((t=>{this.getAuthList(t).then((t=>{const i={};i.isSup=t.isSup,Object.entries(N).forEach((e=>{i[e[0]]=e[1]===N.CLONE?t.actions[N.INSERT]&&t.actions[N.CLONE]||!1:t.actions[e[1]]||!1})),e(i)})).catch((t=>i(t)))}))}))}async getStringParam(t){return this.parameters.asString(t)}async getIntParam(t){return this.parameters.asInteger(t)}async getFloatParam(t){return this.parameters.asFloat(t)}async getBooleanParam(t){return this.parameters.asBoolean(t)}async getDateParam(t){return this.parameters.asDate(t)}async showPopUp(t,e="full",i=!0,s){this.clearContent(this._popUp),this._popUp.addEventListener("ezClosePopup",(()=>{s()}),{once:!0}),this._popUp.appendChild(t),this._popUp.opened=!0,this._popUp.heightMode=e,this._popUp.useHeader=i,"EZ-MODAL-CONTAINER"===t.tagName&&(this._popUp.useHeader=!1)}async showModal(t){this.clearContent(this._rightModal),this._rightModal.appendChild(t),this._rightModal.opened=!0}showAlerts(t){return x.showAlerts({alerts:t})}async closeModal(){this.clearContent(this._rightModal),this._rightModal.opened=!1}async closePopUp(){this.clearContent(this._popUp),this._popUp.opened=!1,this._popUp.useHeader=!0,this._popUp.heightMode="full"}async temOpcional(t){const e=t.split(",");return new Promise(((t,i)=>{this.getAttributeFromHTMLWrapper("opc0009").then((s=>{"1"===s?t(!0):Promise.all(e.map((t=>this.getAttributeFromHTMLWrapper("opc"+t)))).then((e=>{t(e.includes("1"))})).catch((t=>{i(t)}))})).catch((t=>{i(t)}))}))}async getConfig(t){let e={serviceName:"SystemUtilsSP.getConf",requestBody:{config:{chave:t,tipo:"T"}}};return new Promise(((t,i)=>{b.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(e)).then((e=>{var i;return t(null===(i=e.config)||void 0===i?void 0:i.data)})).catch((t=>i(t)))}))}async isFeatureActive(t){const e=Date.now();let i={serviceName:"SystemUtilsSP.featureIsActive",requestBody:{featureName:t}};if(this._featureFlagsCache.get(t)&&e<this._featureFlagsCache.get(t).expires)return Promise.resolve(this._featureFlagsCache.get(t).isActive);const s=(await b.get().callServiceBroker("SystemUtilsSP.featureIsActive",JSON.stringify(i))).isActive;return this._featureFlagsCache.set(t,{isActive:s,expires:e+this.FEATURE_FLAG_CACHE_DURATION}),s}async saveConfig(t,e){let i={serviceName:"SystemUtilsSP.saveConf",requestBody:{config:{chave:t,tipo:"T",data:e}}};return new Promise(((t,e)=>{b.get().callServiceBroker("SystemUtilsSP.saveConf",JSON.stringify(i)).then((e=>t(e))).catch((t=>e(t)))}))}async getAttributeFromHTMLWrapper(t){return Promise.resolve(window[t])}async openApp(t,e){V.openAppActivity(t,e)}async webConnection(t,e,i){this.getStringParam(t).then((t=>{M.webConnectionCaller(t,e,i)}))}getDuPromissesStack(t){let e;return t&&(e=this._duPromises.get(t),e||(e=[],this._duPromises.set(t,e))),e||[]}async createDataunit(t,e,i,s,n){return null==n&&(n=this.applicationResourceID),new Promise(((r,a)=>{const o=this.getDuPromissesStack(e),h=o.length>0;if(o.push(new tt(r,a)),!h){const r=this.dataUnitFetcher.getDataUnit(t,n,i,s);r.loadMetadata().then((()=>{this.processResolveDataUnit(r,e,o)})).catch((t=>{for(;o.length>0;)o.pop().reject(t)}))}}))}processResolveDataUnit(t,e,i){for(e&&this.updateDataunitCache(void 0,e,t);i.length>0;)i.pop().resolve(t)}async updateDataunitCache(t,e,i){t&&this._duCache.delete(t),this._duCache.set(e,i)}async getDataUnit(t,e,i,s,n){return new Promise(((r,a)=>{const o=this._duCache.get(e);o?r(o):this.createDataunit(t,e,i,s,n).then((t=>{r(t)})).catch((t=>a(t)))}))}async addClientEvent(t,e){return new Promise((i=>{b.addClientEvent(t,e),i()}))}async removeClientEvent(t){return new Promise((e=>{b.removeClientEvent(t),e()}))}async hasClientEvent(t){return new Promise((e=>{e(b.hasClientEvent(t))}))}get applicationResourceID(){return this._applicationResourceID||(this._applicationResourceID=this.urlParams.get("workspaceResourceID")||this.urlParams.get("resourceID")||V.resourceID||"unknown.resource.id"),this._applicationResourceID}async getResourceID(){return Promise.resolve(this.applicationResourceID)}async getUserID(){return Promise.resolve(window.UID)}async alert(t,e,i,s){return x.alert(t,e,i,s)}async error(t,e,i,s){return x.error(t,e,i,s)}async success(t,e,i,s){return x.success(t,e,i,s)}async message(t,e,i,s){return x.message(t,e,i,s)}async confirm(t,e,i,s,n){return x.confirm(t,e,i,s,n)}async info(t,e){return x.info(t,e)}async loadTotals(t,e,i){return this.totalsFetcher.fetchTotals(t,e,i)}async isLoadedByPk(){return Promise.resolve(this._isLoadedByPk)}async preloadMangerRemoveRecord(t,e){const i=e.map((t=>({__record__id__:t})));E.removeRecords(t,i)}getCountSkeleton(t,e,i){i=i||160;const s=window.innerHeight-i;return Math.floor(s/(t+(e||10)))-1||1}getSkeletonRandomWidth(){return`${Math.floor(71*Math.random())+30}%`}async getAuthList(t){return await(new j).parseFromJSON(t)}get urlParams(){return this._urlParams||(this._urlParams=I.getQueryParams(location.search)),this._urlParams}getMessage(t,e){var i;return null===(i=this.messagesBuilder)||void 0===i?void 0:i.getMessage(t,e)}get dataUnitFetcher(){return this._dataUnitFetcher||(this._dataUnitFetcher=new C),this._dataUnitFetcher}get totalsFetcher(){return this._totalsFetcher||(this._totalsFetcher=new q),this._totalsFetcher}get pesquisaFetcher(){return this._pesquisaFetcher||(this._pesquisaFetcher=new O),this._pesquisaFetcher}get authFetcher(){return this._authFetcher||(this._authFetcher=new L),this._authFetcher}async executeSearch(t,e,i,s){const n=null==i?void 0:i.getField(e);if(n){const{mode:e,argument:a}=t,{ENTITYNAME:o,CODEFIELD:h,DESCRIPTIONFIELD:l,ROOTENTITY:c,DESCRIPTIONENTITY:d,ISHIERARCHYENTITY:u}=n.properties,p=n.dependencies;let m;const g={rootEntity:c,descriptionFieldName:l,codeFieldName:h,showInactives:!1,dataUnitId:i.dataUnitId};null==p||p.filter((t=>t.masterFields)).forEach((t=>{var e;t.type===y.SEARCHING&&(null===(e=t.masterFields)||void 0===e?void 0:e.length)>0&&(m={expression:t.expression,params:t.masterFields.map((t=>{const e=i.getField(t),s=(null==e?void 0:e.dataType)||v.TEXT,n=s===v.DATE?r.formatDate(new Date(null==e?void 0:e.defaultValue)):null==e?void 0:e.defaultValue,a=i.getFieldValue(t)||n;if(null==a)throw this.alert(this.getMessage("snkApplication.search.error.title"),this.getMessage("snkApplication.search.error.requiredField",{fieldLabel:e.label})),new Error(this.getMessage("snkApplication.search.error.requiredField",{fieldLabel:e.label}));return{name:t,value:a,dataType:s}}))})}));const w={entity:o,entityDescription:d,isHierarchyEntity:u,criteria:m,searchOptions:g,allowsNonAnalytic:null==s?void 0:s.allowsNonAnalytic};return(null==s?void 0:s.useSearchPlus)?this.executePreparedSearchPlus(e,a,w):this.executePreparedSearch(e,a,w)}}filterInvalidFields(t,e,i){return t.fieldsMetadata.filter((s=>{let n=!a.isEmpty(e[s.fieldName])&&!1!==s.visible&&"B"!==s.type&&t.pkField!==s.fieldName&&t.descriptionField!==s.fieldName&&(s.isPrimaryKey||!s.isLinkField)&&!("S"===s.type&&"H"===s.presentationType);return n&&(i[s.fieldName]=s),("string"!=typeof e[s.fieldName]||!(e[s.fieldName].indexOf("<img")>-1||e[s.fieldName].indexOf("<svg")>-1))&&n}))}filterMathFields(t,e,i,s){return t&&Array.isArray(t)&&t.forEach((t=>{let i=m.removeReference(e,s[t]);i&&e.unshift(i)})),e=e.slice(0,i)}builOptionItem(t,e,i,s,n){var r;return{value:a.highlightValue(t,e.__matchFields,null===(r=e[n])||void 0===r?void 0:r.toString(),i,!0),label:s?a.highlightValue(t,e.__matchFields,e[s],i,!0):"",details:p.buildDetails(t,i,e)}}async executePreparedSearchPlus(t,e,i){return await this.executePreparedSearch(t,e,Object.assign(Object.assign({},i),{useSearchPlus:!0}))}async executePreparedSearch(t,e,i){const s={},{entity:n,entityDescription:r,criteria:h,searchOptions:l,isHierarchyEntity:c,allowsNonAnalytic:d,useSearchPlus:g}=i;return g?(async(t,e,i,s,n)=>{var r;const h={},{entity:l,entityDescription:c,criteria:d,searchOptions:g,isHierarchyEntity:w,allowsNonAnalytic:y}=i;if("ADVANCED"===t)return new Promise(((t,i)=>{const r=document.createElement("snk-pesquisa");r[u.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=`entity_${l}`,r.entityName=l,r.argument=e,r.searchLoader=t=>n.loadAdvancedSearch(l,t,d,g),r.isHierarchyEntity=w,w&&(r.treeLoader=t=>n.loadTree(l,t,d,g),r.allowsNonAnalytic=y),r.selectItem=e=>{t(e),s.clearPopUpTitle(),s.closePopUp()},s.setPopUpTitle(c),s.showPopUp(r,void 0,void 0,i)}));if("LOAD_DESCRIPTION"===t){let t=await n.loadByCode(l,e,d,g);t=o.stringToObject(t.json.$);const i=null===(r=t.data)||void 0===r?void 0:r[0];return i?{value:e,label:i[t.descriptionField]}:{value:e,label:""}}{let t,i=await n.loadAdvancedSearch(l,e,d,g,t);i=o.stringToObject(i.json.$);let s=i.descriptionField,r=i.pkField;return i.data.map((t=>{let n=((t,e,i)=>t.fieldsMetadata.filter((s=>{let n=!a.isEmpty(e[s.fieldName])&&!1!==s.visible&&"B"!==s.type&&t.pkField!==s.fieldName&&t.descriptionField!==s.fieldName&&(s.isPrimaryKey||!s.isLinkField)&&!("S"===s.type&&"H"===s.presentationType);return n&&(i[s.fieldName]=s),("string"!=typeof e[s.fieldName]||!Z.some((t=>e[s.fieldName].includes(t))))&&n})))(i,t,h),o=((t,e,i,s)=>(t&&Array.isArray(t)&&t.forEach((t=>{let i=m.removeReference(e,s[t]);i&&e.unshift(i)})),e=e.slice(0,i)))(t.__matchFields,n,6,h);return((t,e,i,s,n)=>{var r;const o=e.__matchFields,h=null!==(r=e[s])&&void 0!==r?r:"",l=e[n];return{value:l,label:h,presentationValue:a.highlightValue(t,o,l,i,!0),presentationLabel:s?a.highlightValue(t,o,h,i,!0):"",details:p.buildDetails(t,i,e)}})(e,t,o,s,r)}))}})(t,e,i,this,this.pesquisaFetcher):new Promise("ADVANCED"===t?(t,i)=>{const s=document.createElement("snk-pesquisa");s[u.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=`entity_${n}`,s.entityName=n,s.argument=e,s.searchLoader=t=>this.pesquisaFetcher.loadAdvancedSearch(n,t,h,l),s.isHierarchyEntity=c,c&&(s.treeLoader=t=>this.pesquisaFetcher.loadTree(n,t,h,l),s.allowsNonAnalytic=d),s.selectItem=e=>{t(e),this.clearPopUpTitle(),this.closePopUp()},this.setPopUpTitle(r),this.showPopUp(s,void 0,void 0,i)}:(t,i)=>{this.pesquisaFetcher.loadAdvancedSearch(n,e,h,l).then((i=>{let n=(i=o.stringToObject(i.json.$)).descriptionField,r=i.pkField;const a=[];i.data.forEach((t=>{let o=this.filterInvalidFields(i,t,s),h=this.filterMathFields(t.__matchFields,o,6,s);a.push(this.builOptionItem(e,t,h,n,r))})),t(a)})).catch((t=>{i(t)}))})}async isDebugMode(){return new Promise((t=>{t(window.isDebugMode)}))}async getAppLabel(){return V.getAppLabel(this.applicationResourceID)}addSearchListener(t,e,i){return new Promise((s=>{s(this.pesquisaFetcher.addSearchListener(t,e.dataUnitId,i))}))}importScript(t){return new Promise((e=>{this.getApplicationPath().then((i=>{let s=[];Array.isArray(t)||(s=[t]),s.forEach((t=>{const e=document.createElement("script");e.src=`${i}/${t}`,e.async=!0,document.body.appendChild(e)})),e()}))}))}async getApplicationPath(){return new Promise((t=>{"dev"===window.applicationenv?t(""):t(`/${this.getModuleName()}/labsApps/${window.APPLICATION_NAME}/build`)}))}getModuleName(){return window.MGE_MODULE_NAME||"mgefin-bff"}executeSelectDistinct(t,e,i){return this.dataUnitFetcher.loadSelectDistinct(t,e,i)}getDataFetcher(){return Promise.resolve(b.get())}async whenApplicationReady(){return f.getContextValue("__SNK__APPLICATION__LOADING__")?Promise.resolve(this):new Promise((t=>{this._waitingAppReady.push((()=>t(this)))}))}async setSearchFilterContext(t,e){f.setContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${t})__`,e)}clearContent(t){t&&Array.from(t.children).forEach((e=>{t.removeChild(e)}))}async clearPopUpTitle(){this._popUp.ezTitle=""}async setPopUpTitle(t){this._popUp.ezTitle=t}async pkChangeListener(){const t=top.window.location.hash.split("/")[2];if(this._currentPkParameter===t)return;const e=this.getResourceIdFromToken(),i=I.getPkObjectFromUrlToken(top.window.location.hash),s=window.redirectFrom;if(void 0===i)return;if((!s||-1===s.split("_")[0].indexOf(e.split("_")[0]))&&e!==this.applicationResourceID)return;const n={pk:i};if(this._isLoadedByPk=!0,this.loadByPK)return this.loadByPK(n,s),void(this._currentPkParameter=t);this._loadPkParameter={pk:n,redirect:s},this.defaultLoadByPK(n,t)}getResourceIdFromToken(){var t;return(null===(t=top.window.location.pathname)||void 0===t?void 0:t.indexOf("tabContent.jsp"))>-1&&window.location.generateHash?I.getResourceIdFromUrlToken(window.location.generateHash(window.location.hash)):I.getResourceIdFromUrlToken(top.window.location.hash)}defaultLoadByPK(t,e){if(!(null==t?void 0:t.pk))return;const i=this.getFirstDataUnitFromDOM(),s=i.dataUnit;if(!s)return console.warn(this.getMessage("snkApplication.dataUnit.initDataUnitError")),void i.addEventListener("dataUnitReady",(i=>{this.loadDataWithPKFilter(t,i.detail),this._currentPkParameter=e}));this.loadDataWithPKFilter(t,s),this._currentPkParameter=e}loadDataWithPKFilter(t,e){const i={term:"",filter:{name:"LOAD_BY_PK_FILTER",expression:this.buildFilterExpressionByPkObject(t),params:this.getFilterParamsFromPkObject(t,e)}};e.loadData(i)}getFirstDataUnitFromDOM(){let t=this._element.querySelector("snk-data-unit[data-load-by-pk]");if(t||(t=this._element.querySelector("snk-data-unit")),t)return t}getFilterParamsFromPkObject(t,e){var i;const s=[];for(const n in t.pk)t.pk.hasOwnProperty(n)&&!Array.isArray(t.pk[n])&&s.push({name:n,dataType:(null===(i=e.getField(n))||void 0===i?void 0:i.dataType)||this.getDefaultDataTypeLoadByPK(t.pk[n]),value:t.pk[n]});return s}getDefaultDataTypeLoadByPK(t){return"number"==typeof t||t instanceof Number?v.NUMBER:"boolean"==typeof t||t instanceof Boolean?v.BOOLEAN:t instanceof Date?v.DATE:v.TEXT}buildFilterExpressionByPkObject(t){let e="";for(const i in t.pk)a.isEmpty(e)||(e+=" AND "),Array.isArray(t.pk[i])?e+=`${i} IN (${t.pk[i].toString()})`:e+=`${i} = :${i}`;return e}async showNewVersionPopup(){const t=document.createElement("ez-modal-container"),e=await this.getAppLabel();t.modalTitle=this.getMessage("snkApplication.newVersionPopup.title",{screenName:e}),t.okButtonLabel=this.getMessage("snkApplication.newVersionPopup.okButton"),t.cancelButtonLabel=this.getMessage("snkApplication.newVersionPopup.cancelButton");const i=document.createElement("p");i.innerText=this.getMessage("snkApplication.newVersionPopup.info"),i.className="ez-text",t.appendChild(i),t.addEventListener("ezModalAction",this.newVersionPopupEventListener.bind(this));const s=await x.showPopup({content:t});this._removeVersionLayoutPopup=async()=>{await s(),await this.processPendingActions(this.NEW_VERSION_POPUP_LOCKER)}}async newVersionPopupEventListener(t){"LOAD"!==t.detail&&("OK"===t.detail&&V.setScreenToUseV3Layout(),"CANCEL"===t.detail&&V.setScreenToUseOldLayout(),this._popUp.opened=!1,this._removeVersionLayoutPopup&&await this._removeVersionLayoutPopup())}async handleShowNewVersionPopup(){this.hasToShowNewVersionPopup()&&await this.showNewVersionPopup()}hasToShowNewVersionPopup(){const t=new URLSearchParams(window.location.search).get("firstLoadConv");return t&&"S"===t}registerPkChangeListener(){window.hasOwnProperty("onhashchange")?window.onhashchange=this.pkChangeListener.bind(this):setInterval(this.pkChangeListener.bind(this),100)}componentWillLoad(){f.setContextValue("__SNK__APPLICATION__LOADING__",!0),this._errorHandler=new W(this),this.messagesBuilder=new T,f.setContextValue("__EZUI__UPLOAD__ADD__URL__",`${I.getUrlBase()}/mge/upload/file`),f.setContextValue("__EZUI__SEARCH__OPTION__LOADER__",((t,e,i,s)=>this.executeSearch(t,e,i,s))),f.setContextValue("__EZUI__SEARCH__PLUS__OPTION__LOADER__",((t,e,i,s)=>this.executeSearch(t,e,i,Object.assign(Object.assign({},s),{useSearchPlus:!0})))),this.registerPkChangeListener(),P.init(),A.preload(this.applicationResourceID,this.configName,{gridLegacyConfig:this.gridLegacyConfigName,formLegacyConfig:this.formLegacyConfigName}),document.addEventListener("click",(()=>V.applicationClick())),this._waitingAppReady.forEach((t=>t())),this.setLayoutFormConfig()}async setLayoutFormConfig(){const t=await this._formConfigFetcher.fetchLayoutFormConfig("formColCfg."+this.applicationResourceID),e=isNaN(Number(null==t?void 0:t.config))?null:Number(null==t?void 0:t.config);this._LayoutFormConfigSingleton.setConfig(e)}connectedCallback(){this._isBrowserTypeElectron=k.isElectron(),f.setContextValue("__SNK__APPLICATION__",this),b.addRequestListener(this._requestListener)}disconnectedCallback(){null==b||b.removeRequestListener(this._requestListener),this.removeShortcuts(),this._lockManagerTimer&&clearTimeout(this._lockManagerTimer),this._scrimWindowTimer&&clearTimeout(this._scrimWindowTimer)}async componentDidLoad(){this.applicationLoading.emit(!0),window.requestAnimationFrame((()=>{f.setContextValue("__SNK__APPLICATION__LOADING__",!1),this.applicationLoaded.emit(!0),this.pkChangeListener()})),u.addIDInfo(this._element,`resource_${this.applicationResourceID}`),await this.handleShowNewVersionPopup(),this.initKeyboardManager(),this.enableLockManagerLoadingApp?(z.addLockManagerCtxId(this._element),this.resolveApplicationReady()):this._applicationReady=!0}async showScrimApp(t){if(!this.enableLockManagerLoadingApp||!this._applicationReady||!t)return this._activeScrimWindow=!1,void(this._scrimWindowTimer&&clearTimeout(this._scrimWindowTimer));this._activeScrimWindow=!0,this._scrimWindowTimer=setTimeout((async()=>{this._activeScrimWindow&&(this._activeScrimWindow=!1,clearTimeout(this._scrimWindowTimer))}),this._maxTimerAppLoading)}async changeTemplateSkeleton(t){this._templateSkeleton=t||this._templateSkeleton}async markToReload(t){this.enableLockManagerLoadingApp&&(await this.changeTemplateSkeleton(t),this._applicationReady=!1,await z.resetLocks(this._element,_.APP_LOADING),this.resolveApplicationReady())}async addLoadingLock(t=!1,e){if(this.enableLockManagerLoadingApp)return await this.changeTemplateSkeleton(e),t&&(this._applicationReady=!1,this._activeScrimWindow=!!this._applicationReady,await z.resetLocks(this._element,_.APP_LOADING)),this.resolveApplicationReady(),await z.lock(this._element,_.APP_LOADING)}async resolveApplicationReady(){if(!this._applicationReady)try{await this.checkTimeoutLimitLockManager(),await z.whenHasLock(this._element,_.APP_LOADING),await z.whenResolve(this._element,_.APP_LOADING,200),await z.resetLocks(this._element,_.APP_LOADING),this._applicationReady=!0}catch(t){console.warn(t),this._applicationReady=!0}}stopTimeoutLockManager(){this._lockManagerTimer&&clearTimeout(this._lockManagerTimer)}async checkTimeoutLimitLockManager(){this.stopTimeoutLockManager(),this._applicationReady||(this._lockManagerTimer=setTimeout((async()=>{this._applicationReady||(await z.resetLocks(this._element,_.APP_LOADING),this.stopTimeoutLockManager(),this._applicationReady=!0)}),this._maxTimerAppLoading))}initKeyboardManager(){this._keyboardManager.bind("ctrl + g",V.searchApp.bind(this),{description:this.getMessage("snkApplication.keyboard.shortcuts.searchApp")}).bind("ctrl + d",V.showDesktop.bind(this),{description:this.getMessage("snkApplication.keyboard.shortcuts.showDesktop")}).bind("F1",V.openHelp.bind(this),{description:this.getMessage("snkApplication.keyboard.shortcuts.openHelp")})}removeShortcuts(){this._keyboardManager.unbindAllShortcutKeys()}renderLoadingSkeleton(){if(this.enableLockManagerLoadingApp){if(this._isBrowserTypeElectron)return this.getSpinnerLoadingDefault();switch(this._templateSkeleton){case D.CUSTOM_TEMPLATE:case D.GRID:return this.getSkeletonTemplateGrid();case D.GRID_WITH_SIDEBAR:return this.getSkeletonTemplateGridWithSidebar();case D.GRID_WITH_PANEL:return this.getSkeletonTemplateGridWithPanel();case D.FORM_WITH_SIDEBAR:return this.getSkeletonTemplateFormWithSidebar();default:return this.getSkeletonTemplateGrid()}}}getLoadingVisibilityStyle(){return{visibility:this._applicationReady?"hidden":"initial",display:this._applicationReady?"none":"unset"}}getSkeletonTemplateGrid(){return i("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},i("div",{class:"ez-flex ez-flex--column ez-margin--large ez-margin-top--medium"},i("div",{class:"ez-margin-bottom--medium"},i("ez-skeleton",{count:1,variant:"text",width:"20%",height:"35px",animation:"progress"})),i("div",{class:""},i("ez-skeleton",{count:1,variant:"text",width:"70%",height:"25px",animation:"progress"}))),i("div",{class:"ez-flex ez-flex--justify-start skeleton-content-column ez-margin-horizontal--large",style:{height:"calc(-105px + 100vh)"}},[1,2,3,4].map(((t,e)=>i("div",{class:"ez-margin-right--large",key:e,style:{width:"25%"}},i("ez-skeleton",{count:this.getCountSkeleton(50,10),variant:"text",width:"100%",height:"50px",animation:"progress",marginBottom:"10px"}))))))}getSkeletonTemplateGridWithSidebar(){return i("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},i("div",{class:"ez-flex ez-flex--column ez-margin--large ez-margin-top--medium"},i("div",{class:"ez-margin-bottom--medium"},i("ez-skeleton",{count:1,variant:"text",width:"20%",height:"35px",animation:"progress"})),i("div",{class:""},i("ez-skeleton",{count:1,variant:"text",width:"70%",height:"25px",animation:"progress"}))),i("div",{class:"ez-flex ez-flex--justify-start skeleton-content-column ez-margin-horizontal--large",style:{height:"calc(100vh - 160px)"}},i("div",{class:"ez-flex ez-flex--column ez-margin-right--large",style:{width:"25%",overflow:"hidden"}},Array(this.getCountSkeleton(30,6)).fill(null).map(((t,e)=>i("ez-skeleton",{key:e,count:1,variant:"text",width:this.getSkeletonRandomWidth(),height:"30px",animation:"progress",marginBottom:"10px"})))),i("div",{class:"ez-margin-right--large",style:{width:"75%"}},i("ez-skeleton",{count:this.getCountSkeleton(50,10),variant:"text",width:"100%",height:"50px",animation:"progress",marginBottom:"10px"}))))}getSkeletonTemplateGridWithPanel(){return i("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},i("div",{class:"ez-margin--medium ez-margin-top--medium ez-padding--medium"},i("ez-skeleton",{count:1,variant:"text",width:"70%",height:"25px",animation:"progress"})),i("div",{class:"ez-flex ez-margin--medium ez-margin-top--medium",style:{maxHeight:"calc(-105px + 100vh)",overflow:"hidden"}},i("div",{class:"",style:{width:"70%",overflow:"hidden"}},i("div",{class:"ez-padding--medium",style:{height:"50%"}},i("ez-skeleton",{count:1,variant:"text",width:"100%",height:"100%",animation:"progress"})),i("div",{class:"ez-padding--medium",style:{}},i("ez-skeleton",{count:1,variant:"text",width:"250px",height:"25px",animation:"progress"})),i("div",{class:"ez-flex ez-padding--medium",style:{height:"45%"}},[1,2].map((()=>i("div",{style:{width:"50%"}},i("ez-skeleton",{count:1,variant:"text",width:"100%",height:"100%",animation:"progress"})))))),i("div",{class:"ez-flex ez-flex--column ez-padding--medium",style:{width:"30%",overflow:"hidden"}},Array(this.getCountSkeleton(30,10)).fill(null).map(((t,e)=>i("ez-skeleton",{key:e,count:1,variant:"text",width:"100%",height:"50px",animation:"progress",marginBottom:"10px"}))))))}getSkeletonTemplateFormWithSidebar(){return i("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},i("div",{class:"ez-margin--medium ez-margin-top--medium ez-padding--medium"},i("ez-skeleton",{count:1,variant:"text",width:"70%",height:"25px",animation:"progress"})),i("div",{class:"ez-flex ez-margin--medium ez-margin-top--medium",style:{maxHeight:"calc(-105px + 100vh)",overflow:"hidden"}},i("div",{class:"ez-flex ez-flex--column ez-margin-right--large",style:{width:"25%",overflow:"hidden"}},Array(this.getCountSkeleton(30,6)).fill(null).map(((t,e)=>i("ez-skeleton",{key:e,count:1,variant:"text",width:this.getSkeletonRandomWidth(),height:"30px",animation:"progress",marginBottom:"10px"})))),i("div",{class:"ez-flex ez-flex--column",style:{width:"75%"}},i("div",{class:"ez-padding--medium",style:{width:"100%"}},i("ez-skeleton",{count:1,variant:"text",width:"30%",height:"25px",animation:"progress"})),i("div",{class:"ez-padding--medium",style:{height:"45%"}},i("div",{class:"ez-flex",style:{width:"100%",height:"100%"}},[1,2,3,4].map(((t,e)=>i("div",{key:e,class:"ez-padding-right--large",style:{width:"25%",overflow:"hidden"}},Array(this.getCountSkeleton(50,20)).fill(null).map(((t,e)=>i("ez-skeleton",{key:e,count:1,variant:"text",width:"100%",height:"50px",animation:"progress",marginBottom:"10px"})))))))),i("div",{class:"ez-padding--medium",style:{width:"100%"}},i("ez-skeleton",{count:1,variant:"text",width:"30%",height:"25px",animation:"progress"})),i("div",{class:"ez-padding--medium",style:{height:"45%"}},i("div",{class:"ez-flex",style:{width:"100%",height:"100%"}},[1,2,3,4].map(((t,e)=>i("div",{key:e,class:"ez-padding-right--large",style:{width:"25%",overflow:"hidden"}},Array(this.getCountSkeleton(50,20)).fill(null).map(((t,e)=>i("ez-skeleton",{key:e,count:1,variant:"text",width:"100%",height:"50px",animation:"progress",marginBottom:"10px"})))))))))))}getSpinnerLoadingDefault(){return i("div",{class:"loading-hidden",style:this.getLoadingVisibilityStyle()},i("div",{class:"ez-flex ez-size-height--full ez-size-width--full ez-flex--justify-center ez-flex--align-items-center spinner"},i("ez-icon",{iconName:"sync",size:"x-large",class:"spin"}),i("span",{class:"ez-title ez-title--secondary ez-title--extra-large"},this.getMessage("snkApplication.loading.text"))))}render(){return i(s,{style:{visibility:!this.enableLockManagerLoadingApp||this._applicationReady?"unset":"hidden",overflow:!this.enableLockManagerLoadingApp||this._applicationReady?"unset":"hidden"}},i("div",null,i("ez-loading-bar",{ref:t=>this._requestListener.ezLoadingBar=t}),i("ez-popup",{opened:!1,ref:t=>this._popUp=t,onEzClosePopup:()=>this.closePopUp()}),i("ez-modal",{opened:!1,ref:t=>this._rightModal=t,"modal-size":"small",closeOutsideClick:!0,closeEsc:!0}),this.renderLoadingSkeleton(),this._activeScrimWindow&&i("div",{class:"ez-scrim ez-scrim--light",style:{cursor:"progress",zIndex:"var(--scrim-z-index)"}})))}get _element(){return n(this)}static get watchers(){return{loadByPK:["watchPropHandler"]}}};class tt{constructor(t,e){this.resolve=t,this.reject=e}}Q.style=".sc-snk-application-h{--scrim-z-index:var(--elevation--100, 100);display:flex;flex-direction:column;height:100%}.sc-snk-application-h>.loading-hidden.sc-snk-application{display:none;pointer-events:none}.skeleton-content-left.sc-snk-application{width:300px;padding-right:5px}.skeleton-content.sc-snk-application{height:calc(100vh - 310px)}.spinner.sc-snk-application{height:100vh;gap:10px}.spinner.sc-snk-application>.spin.sc-snk-application{animation-name:spin;animation-duration:5000ms;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";export{Q as snk_application}
@@ -0,0 +1 @@
1
+ import{a as e,f as t}from"./p-d8d8169b.js";const s=e=>!("isConnected"in e)||e.isConnected,o=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(s))})(...t)}),2e3)}})(),r=e=>"function"==typeof e?e():e,n=(e,t)=>{const s=e.indexOf(t);s>=0&&(e[s]=e[e.length-1],e.length--)},c=(()=>{const s=((e,t=((e,t)=>e!==t))=>{const s=r(e);let o=new Map(Object.entries(s??{}));const c={dispose:[],get:[],set:[],reset:[]},a=new Map,i=()=>{o=new Map(Object.entries(r(e)??{})),c.reset.forEach((e=>e()))},p=e=>(c.get.forEach((t=>t(e))),o.get(e)),d=(e,s)=>{const r=o.get(e);t(s,r,e)&&(o.set(e,s),c.set.forEach((t=>t(e,s,r))))},u="undefined"==typeof Proxy?{}:new Proxy(s,{get:(e,t)=>p(t),ownKeys:()=>Array.from(o.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>o.has(t),set:(e,t,s)=>(d(t,s),!0)}),f=(e,t)=>(c[e].push(t),()=>{n(c[e],t)});return{state:u,get:p,set:d,on:f,onChange:(t,s)=>{const o=(e,o)=>{e===t&&s(o)},n=()=>s(r(e)[t]),c=f("set",o),i=f("reset",n);return a.set(s,{setHandler:o,resetHandler:n,propName:t}),()=>{c(),i(),a.delete(s)}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(f("set",t.set)),t.get&&e.push(f("get",t.get)),t.reset&&e.push(f("reset",t.reset)),t.dispose&&e.push(f("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{c.dispose.forEach((e=>e())),i()},reset:i,forceUpdate:e=>{const t=o.get(e);c.set.forEach((s=>s(e,t,t)))},removeListener:(e,t)=>{const s=a.get(t);s&&s.propName===e&&(n(c.set,s.setHandler),n(c.reset,s.resetHandler),a.delete(t))}}})({exporterProviders:{},filterFieldsDataSource:void 0},void 0);return s.use((()=>{if("function"!=typeof e)return{};const s=new Map;return{dispose:()=>s.clear(),get:t=>{const o=e();o&&((e,t,s)=>{const o=e.get(t);o?o.includes(s)||o.push(s):e.set(t,[s])})(s,t,o)},set:e=>{const r=s.get(e);r&&s.set(e,r.filter(t)),o(s)},reset:()=>{s.forEach((e=>e.forEach(t))),o(s)}}})()),s})();export{c as s}
@@ -0,0 +1 @@
1
+ import{C as t}from"./p-c71dcb2d.js";import{ObjectUtils as e,StringUtils as i}from"@sankhyalabs/core";import{F as s}from"./p-8d256def.js";import{a as r}from"./p-9019a32f.js";class n{constructor(t,e,i,s){this._resourceID=e,this._configName=t,this._onConfigChange=i,this._dataUnit=s}addFormLegacyConfig(e){this._configName&&t.addFormLegacyConfig(this._configName,e)}async loadConfig(){return new Promise((e=>{t.loadFormConfig(this._configName,this._resourceID).then((t=>{t=this.buildFormMetadataUITabs(t),this.setConfig(t),e(t)})).catch((t=>{console.warn(t)}))}))}getEmptyConfig(){return this.buildFormMetadataUITabs({fields:[],emptyConfig:!0},!0)}saveConfig(i){const s=e.copy(i);return new Promise((e=>{t.saveFormConfig(i,this._configName,this._resourceID).then((t=>{this.setConfig(Object.assign(Object.assign({},s),t)),e(Object.assign(Object.assign({},s),t))}))}))}saveCardState(e,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(e);l.set(e,"fixed"===s?this.updateFixSequence(Object.assign(Object.assign({},o),{fixed:i.fixed}),l):Object.assign(Object.assign({},o),{[s]:i[s]})),t.saveCardState(l,this._configName,this._resourceID).then((t=>{this._config=Object.assign(Object.assign({},this._config),{cardsState:l}),r(t)}))}))}updateFixSequence(t,e){let i=-1;return Array.from(e.values()).forEach((e=>{e.fixed||delete t.fixSequence,null!=e.fixSequence&&(i=Math.max(i,e.fixSequence))})),t.fixed?t.fixSequence=i+1:delete t.fixSequence,t}hasConfig(t){var e;const i=null!=t?t:this._config;return!(!i||!(null===(e=i.fields)||void 0===e?void 0:e.length))}getFieldsList(t,e=!1){var i;const s=null===(i=this._config)||void 0===i?void 0:i.fields;return this.hasConfig()&&!e?s.map((({label:t,name:e,readOnly:i,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(e);if(!t)return;return Object.assign(Object.assign({},t),{name:null!=e?e:t.name,readOnly:null!=i?i:t.readOnly,visible:null!=s?s:t.visible,required:null!=r?r:t.required,tab:n,group:l})}return{name:e,label:t,readOnly:i,visible:s,required:r,tab:n,group:l}})).filter((e=>this.isFieldVisible(e,t))):this._dataUnit?this._dataUnit.metadata.fields.filter((e=>this.isFieldVisible(e,t))).map((({label:t,name:e,readOnly:i,visible:s,required:r,properties:n})=>({label:t,name:e,readOnly:i,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,e,i=!1){let s=this.getFieldsList(void 0,i);return e&&(s=s.filter((e=>{if(t){const i=t.getField(e.name);if(i&&i.readOnly)return!1}return!e.readOnly}))),Object.assign(Object.assign({},this._config),{fields:s})}setConfig(t){this.isLoaded=!0;const{cardsState:e,summary:i,defaultVars:s}=this._config||{};this._config=Object.assign({},t),e&&(this._config.cardsState=e),i&&(this._config.summary=i),s&&(this._config.defaultVars=s),this._onConfigChange&&this._onConfigChange(Object.assign({},this._config))}getConfig(t,e){return this.getFormConfig(t,e)}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,e=!1){var i;const s=this.hasConfig(t);if(!e&&(!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 e of n){const s=t.fields.find((t=>t.name===e.name)),n=null===(i=e.properties)||void 0===i?void 0:i.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 +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-0dac8fef.js";import{S as f}from"./p-8b601472.js";import"./p-ba4979b4.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-b35574b5.js";import"./p-ff1990ad.js";import"./p-c6331595.js";import"./p-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-d75a732c.js";import{S as f}from"./p-0a317e81.js";import"./p-bf017a1f.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-9062d640.js";import"./p-ff1990ad.js";import"./p-8d256def.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}
@@ -0,0 +1 @@
1
+ export{S as snk_guides_viewer}from"./p-b7f5caf6.js";import"./p-d8d8169b.js";import"@sankhyalabs/core";import"./p-658f67a5.js";import"./p-c71dcb2d.js";import"./p-8d256def.js";import"./p-d75a732c.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-ff1990ad.js";import"./p-9019a32f.js";import"@sankhyalabs/ezui/dist/collection/utils/form";import"./p-1a0caadb.js";import"./p-b987e15d.js";import"./p-0f3698af.js";import"./p-55798617.js";import"./p-bf017a1f.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"./p-9062d640.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"@sankhyalabs/core/dist/utils/SortingUtils";import"./p-688dcb4c.js";import"@sankhyalabs/core/dist/dataunit/DataUnit";import"@sankhyalabs/ezui/dist/collection/utils";
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,g as e}from"./p-d8d8169b.js";import{ElementIDUtils as l}from"@sankhyalabs/core";import{F as o}from"./p-ff1990ad.js";const h=class{constructor(s){t(this,s),this.valueChanged=i(this,"valueChanged",7),this.config=void 0,this.errorMessage=void 0,this.optionsList=[]}async setFocus(){var t,i;null===(i=null===(t=this._element)||void 0===t?void 0:t.querySelector("ez-check"))||void 0===i||i.setFocus()}async clearValue(){var t;this.config=Object.assign(Object.assign({},this.config),{value:this.config.value}),this.valueChanged.emit(null===(t=this.config)||void 0===t?void 0:t.value)}componentDidLoad(){this._element&&l.addIDInfo(this._element,"filterContentEditor")}handleToggleCheck(t,i){var s,e;this.errorMessage=void 0;let l=null!==(s=this.config.value)&&void 0!==s?s:{};l[t.name]=i,this.config=Object.assign(Object.assign({},this.config),{value:l}),this.valueChanged.emit(null===(e=this.config)||void 0===e?void 0:e.value)}renderOptions(){return this.optionsList.map((t=>s("ez-check",{label:t.label,onEzChange:i=>this.handleToggleCheck(t,i.detail),value:!!this.isChecked(t.name),enabled:this.config.enabled})))}isChecked(t){var i;return null===(i=this.config.value)||void 0===i?void 0:i[t]}buidOptions(){var t,i,s;const e=null!==(s=null===(i=null===(t=this.config)||void 0===t?void 0:t.props)||void 0===i?void 0:i.options)&&void 0!==s?s:[];this.optionsList=[...e]}componentWillRender(){this.buidOptions()}render(){if(this.config&&this.config.type===o.CHECK_BOX_LIST)return s("ez-tooltip",{active:!1===this.config.enabled,message:this.config.disabledMessage,type:"warning"},s("div",{class:"ez-flex ez-flex--column"},this.renderOptions(),this.errorMessage&&s("span",{class:"ez-text ez-text--small ez-text--error ez-margin--small"},this.errorMessage)))}get _element(){return e(this)}};export{h as snk_filter_checkbox_list}
@@ -0,0 +1 @@
1
+ import{D as t}from"./p-d75a732c.js";import"./p-bf017a1f.js";import{SortMode as i,ApplicationContext as s,ObjectUtils as e,StringUtils as r,NumberUtils as n,DataType as o,UserInterface as l,DateUtils as a}from"@sankhyalabs/core";import{D as d}from"./p-0f3698af.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import{UserInterface as u}from"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import{P as c}from"./p-9062d640.js";import"./p-ff1990ad.js";import"./p-8d256def.js";import"./p-9019a32f.js";import{h}from"./p-d8d8169b.js";import{g as v}from"./p-7dd49d15.js";import{I as f}from"./p-8f3f2306.js";import m from"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource";class p{static assertDefaultSorting(t,s){t&&s&&(s.defaultSorting=t.columns.filter((t=>null!=t.ascending)).sort(((t,i)=>t.orderIndex-i.orderIndex)).map((({name:t,ascending:e})=>{const{dataType:r}=s.getField(t);return{field:t,dataType:r,mode:e?i.ASC:i.DESC}})))}static parseCrudResults(t,i){Array.isArray(t)||(t=[t]);const s=[];for(const e of t){let t={fields:new Map};for(let s in e){let r=e[s];if(r.hasOwnProperty("$")&&t.fields.set(s,r.$),i)break}s.push(t)}return s.length>1?s:s[0]}static find(i,e,r,n=!0,o,l){let a=[],d=[],u={},c=s.getContextValue("__SNK__APPLICATION__");if(e){if(!Array.isArray(e))throw new Error(c.messagesBuilder.getMessage("crudUtils.errorArray",null));e.forEach((t=>{a.push({name:t})}))}if(r)for(const t in r)r.hasOwnProperty(t)&&d.push({nome:t,valor:r[t]});o&&(u={expression:{$:o}});let h={requestBody:{entity:{name:i,criterio:d,fields:{field:a},literalCriteria:u,orderby:l}}};return new Promise((i=>{t.get().callServiceBroker("mge@crud.find",JSON.stringify(h)).then((t=>{var s;let e=null===(s=t.entidades)||void 0===s?void 0:s.entidade;e||i(null);const r=this.parseCrudResults(e,n);i(r)}))}))}}class b{setGrid(t){this._grid||(this._grid=t,this.refreshSelectedRows())}setDataState(t){this._dataState&&e.equals(null==t?void 0:t.metadataByRow,this._dataState.metadataByRow)||(this._dataState=t,this.refreshSelectedRows())}format(t,i,s){var e;if(r.isEmpty(t))return t;const o=null===(e=this._dataState)||void 0===e?void 0:e.metadataByRow.get(s),l=null==o?void 0:o.getProp("rm_precision",i.name);if(l||0===l)return n.format(t,l,l);if(null==i?void 0:i.props){const s=null==i?void 0:i.props.get("precision"),e=null==i?void 0:i.props.get("prettyPrecision");if(void 0!==s&&void 0!==e)return n.format(t,s,e)}return t}refreshSelectedRows(){var t;null===(t=this._grid)||void 0===t||t.refreshSelectedRows()}}class g{constructor(t,i,s){this.snkApplication=t,this.keyConfigEnableContinuousInsert=`${i}enableContinuousInsert${s||""}`}handleSaveConfig(t){return this.snkApplication.saveConfig(this.keyConfigEnableContinuousInsert,t)}getConfig(){return this.snkApplication.getConfig(this.keyConfigEnableContinuousInsert).then((t=>!!t&&"true"==t)).catch((()=>!1))}getMessage(t,i){var s,e;return null===(e=null===(s=this.snkApplication)||void 0===s?void 0:s.messagesBuilder)||void 0===e?void 0:e.getMessage(t,i)}actionContinuousInsert(t,i){return{value:r.generateUUID(),label:this.getMessage(t?"continuousInsertUtils.actions.disable":"continuousInsertUtils.actions.enable"),enabled:!0,itemBuilder:()=>h("div",{class:"ez-dropdown__item-wrapper",onClick:i},h("span",{class:"ez-dropdown__item-label"},this.getMessage(t?"continuousInsertUtils.actions.disable":"continuousInsertUtils.actions.enable")))}}}class y{constructor(t,i){this.MAX_WIDTH_COD=60,this.MIN_WIDTH_COD=10,this.DEFAULT_FONT_SIZE=13,this.dataUnit=t,this.grid=i}async getColumnsMetadata(){var t;return this.columnsState=await(null===(t=this.grid)||void 0===t?void 0:t.getColumnsState())||[],await this.buildColumnsMetadata(this.columnsState)}getColumnsState(){return this.columnsState}async buildColumnsMetadata(t){var i,s,e;const r=[];for(const n of t){if(n.hidden&&"RECDESP"!==n.name)continue;const t=null===(i=this.dataUnit)||void 0===i?void 0:i.getField(n.name),l=await this.grid.getCustomValueFormatter(n.name),a=(null==t?void 0:t.userInterface)===u.SEARCH,d=a?"Cód. ":n.label;let c,h={id:n.name,label:d,width:a?d.length*this.DEFAULT_FONT_SIZE:n.width,type:null==t?void 0:t.dataType,userInterface:null==t?void 0:t.userInterface,customFormatter:l};if(a&&null!=(null===(s=null==t?void 0:t.properties)||void 0===s?void 0:s.DESCRIPTIONFIELD)){const i=null===(e=null==t?void 0:t.properties)||void 0===e?void 0:e.DESCRIPTIONENTITY,s=t.properties.mergedFrom;c={id:`${s?s+".":""}${t.properties.ENTITYNAME}.${t.properties.DESCRIPTIONFIELD}`,label:i,width:a&&i?i.length*this.DEFAULT_FONT_SIZE-60:n.width,type:o.TEXT,userInterface:u.LONGTEXT,descriptionFrom:t.name};const r=this.getWidthByMetaData(null==n?void 0:n.width,null==h?void 0:h.width,null==c?void 0:c.width);h=Object.assign(Object.assign({},h),{width:null==r?void 0:r.codWidth}),c=Object.assign(Object.assign({},c),{width:null==r?void 0:r.descWidth,label:(null==c?void 0:c.label)||(null==n?void 0:n.label)})}r.push(h),c&&r.push(c)}return r||[]}getWidthByMetaData(t,i,s){const e=i+s,r=s/e;let n=Math.round(t*(i/e)),o=Math.round(t*r);return n>this.MAX_WIDTH_COD?(n=this.MAX_WIDTH_COD,o=t-this.MAX_WIDTH_COD):n<this.MIN_WIDTH_COD&&(n=this.MIN_WIDTH_COD,o=t-this.MIN_WIDTH_COD),{codWidth:n,descWidth:o}}}class w extends y{getSelectedNumber(){return this.dataUnit.getSelectionInfo().length}getTotalRecords(){var t,i,s;const{total:e}=(null===(t=this.dataUnit)||void 0===t?void 0:t.getPaginationInfo())||{};return null!=e?e:null===(s=null===(i=this.dataUnit)||void 0===i?void 0:i.records)||void 0===s?void 0:s.length}getSelectedIDs(){return v(this.dataUnit)}getRecordID(){var t,i,s;return null===(s=null===(i=null===(t=this.dataUnit)||void 0===t?void 0:t.records)||void 0===i?void 0:i[0])||void 0===s?void 0:s.__record__id__}async getRecords(t){if(0===this.dataUnit.records.length)return[];switch(t){case f.ALL:return this.dataUnit.getSelectionInfo().getAllRecords();case f.SELECTION:return this.resolveRecordsFromSelection();case f.PAGE:return this.dataUnit.records;default:return this.resolveRecordsFromSelection()}}resolveRecordsFromSelection(){const t=this.dataUnit.getSelectionInfo();if(t.isEmpty())return this.dataUnit.records;const i=t.isAllRecords()?t.getAllRecords():t.records;return i.length?i:this.dataUnit.records}getHiddenOptions(){return[d.EXPORT_BY_EMAIL,d.EXPORT_PDF_TO_EMAIL,d.EXPORT_XLS_TO_EMAIL,d.EXPORT_PAGE_TO_PDF,d.EXPORT_PAGE_TO_XLS]}formatValue(t,i){const{id:s,descriptionFrom:e}=i,r=t[e||s];if(null==r)return"";if(null!=e)return r.label;if(this.dataUnit.getField(s).userInterface===l.SEARCH)return r.value;if(i.customFormatter){const s=this.getColumnsState().find((t=>i.id===t.name));return i.customFormatter.format(r,s,t.__record__id__)}return this.dataUnit.getFormattedValue(s,r)}}class I{setDataUnit(t){this._dataUnit=t}setApplication(t){this._application=t}formatLabel(t,i){const{userInterface:s}=this._dataUnit.getField(t);return s===l.DATETIME?a.formatDate(this._dataUnit.valueFromString(t,i)):String(this._dataUnit.getFormattedValue(t,i))}async getStaticOptions(t,i){return Promise.resolve(null==t?void 0:await c.getDistinct(this._dataUnit,t,null==i?void 0:i.onlyLabel))}fetchData(t,i){return new Promise((s=>{this._application.executeSelectDistinct(this._dataUnit,i,t).then((t=>{s(t.map((t=>this._dataUnit.getField(i).userInterface===l.SEARCH?Object.assign(Object.assign({},JSON.parse(t)),{check:!0}):{value:t,label:this.formatLabel(i,t),check:!0})))}))}))}sortItems(t,i){return m.defaultSorterMultSelectionOption(this._dataUnit,t,i)}}export{y as C,b as R,I as S,p as a,g as b,w as c}
@@ -1,4 +1,4 @@
1
- import{d as e,D as t}from"./p-0dac8fef.js";import{ObjectUtils as n}from"@sankhyalabs/core";class o{constructor(){this.templateByQuery=new Map,this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchResource",e.gql`query($name: String!) {
1
+ import{d as e,D as t}from"./p-d75a732c.js";import{ObjectUtils as n}from"@sankhyalabs/core";class o{constructor(){this.templateByQuery=new Map,this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchResource",e.gql`query($name: String!) {
2
2
  $queryAlias$: fetchResource(name: $name){
3
3
  resource
4
4
  }
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,H as s,g as r}from"./p-d8d8169b.js";import{DataType as l,StringUtils as a,ObjectUtils as n,ElementIDUtils as o,ErrorException as h,ApplicationContext as d,LockManager as c,LockManagerOperation as u,DateUtils as f,MaskFormatter as m,KeyboardManager as p,FloatingManager as v,ArrayUtils as b}from"@sankhyalabs/core";import{EzScrollDirection as g}from"@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection";import{C as k}from"./p-c71dcb2d.js";import{P as _}from"./p-988afe78.js";import{toString as F}from"@sankhyalabs/core/dist/dataunit/metadata/DataType";import{F as y}from"./p-ff1990ad.js";import{F as z,D as x}from"./p-84345e7a.js";import{F as w}from"./p-fa80e546.js";import{ModalAction as C}from"@sankhyalabs/ezui/dist/collection/components/ez-modal-container";import{ApplicationUtils as I}from"@sankhyalabs/ezui/dist/collection/utils";import{A as $}from"./p-6a4b21dd.js";import{F as N}from"./p-b568c1d4.js";import{g as T}from"./p-4eeb06fc.js";import"./p-8d256def.js";import"./p-d75a732c.js";import"./p-8d884fab.js";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";function L(t){let i="";return t.forEach(((t,e)=>{var s;i+=` ${e>0?null!==(s=t.operand)&&void 0!==s?s:"OR":""} ${t.expression}`})),i.trim()}const A=class{constructor(e){t(this,e),this.configUpdated=i(this,"configUpdated",7),this._updateSequence=[],this._loadingPending=!1,this._configUpdated=!1,this._firstLoad=!0,this._pendingVariables=!1,this._isDefaultFilter=!1,this._customfiltersToBeUpdated=[],this._resolveLoading=void 0,this._calculateSortIndex=t=>{if(!t.visible)return 0;if(t.hardFixed)return 1e6;let i=t.fixed?1e5:0;return i+=this.hasValidValue(t)?1e4:0,i+=this._updateSequence.lastIndexOf(t.id)+1,i},this._filtersComparator=(t,i)=>this._calculateSortIndex(i)-this._calculateSortIndex(t),this.enableLockManagerLoadingComp=!1,this.customFilterBarConfig=void 0,this.dataUnit=void 0,this.title=void 0,this.configName=void 0,this.resourceID=void 0,this.mode="regular",this.filterConfig=void 0,this.messagesBuilder=void 0,this.disablePersonalizedFilter=void 0,this.filterBarLegacyConfigName=void 0,this.autoLoad=void 0,this.afterApplyConfig=void 0,this.filterCustomConfig=void 0,this.filterCustomConfigInterceptor=void 0,this.allowDefault=void 0,this.scrollerLocked=!1,this.showPersonalizedFilter=!1,this.personalizedFilterId=void 0,this.isFilterModalOpen=!1}hasValidValue(t){return null!=t.value&&(!Array.isArray(t.value)||t.value.some((t=>!0===t.check)))}observeFilterConfig(t,i){n.equals(t,i)||this.handleFilterConfigsChanged(i,t)}handleFilterConfigsChanged(t,i){if(null!=t&&null==i)this._loadingPending=!0,this._configUpdated=!0;else{const e=new Map(t?t.map((t=>[t.id,t])):void 0);0===e.size&&i.length>0?(this._loadingPending=!0,this._configUpdated=!1):i.forEach((t=>{const i=e.get(t.id);if(null!=i){if(this._configUpdated=this._configUpdated||n.objectToString(i)!=n.objectToString(t),this._loadingPending=this._loadingPending||n.objectToString(i.value)!==n.objectToString(t.value),!this._loadingPending){const e=n.objectToString(i.groupedItems)!=n.objectToString(t.groupedItems);this._configUpdated=this._configUpdated||e,this._loadingPending=this._loadingPending||e}}else this._configUpdated=!0,this._loadingPending=this._loadingPending||null!=t.value}))}(this._loadingPending||this._configUpdated)&&this.configUpdated.emit(i),this.processAfterUpdateConfig()}async reload(){this.loadConfigFromStorage(!0)}async getFilterItem(t){const i=this.filterConfig.find((i=>i.id===t));return Promise.resolve(n.copy(i))}async updateFilterItem(t){return-1==this.filterConfig.findIndex((i=>i.id===t.id))?(console.warn("[SnkFilterBar.updateFilterItem] "+this.getMessage("snkFilterBar.filterItem.updateFilterItemNotFound")),Promise.resolve()):(this._loadingPending=!0,this.updateFilter(t),Promise.resolve())}async addFilterItem(t){return this.filterConfig.findIndex((i=>i.id===t.id))>-1?(console.warn("[SnkFilterBar.addFilterItem] "+this.getMessage("snkFilterBar.filterItem.addFilterItemExists")),Promise.resolve()):(this.filterConfig.push(t),this._loadingPending=!0,this.updateFilter(t),Promise.resolve())}async removeFilterItem(t){const i=this.filterConfig.findIndex((i=>i.id===t));if(-1==i)return console.warn("[SnkFilterBar.removeFilterItem] "+this.getMessage("snkFilterBar.filterItem.removeFilterItemNotFound")),Promise.resolve(void 0);const e=this.filterConfig[i];return this.filterConfig=this.filterConfig.filter((i=>i.id!==t)),Promise.resolve(e)}componentDidLoad(){this._element&&o.addIDInfo(this._element,null,{dataUnit:this.dataUnit})}processPendingFilter(){if(this._pendingVariables){const t=this._element.querySelector("#filter-PERSONALIZED_FILTER_GROUP");t&&t.showUp(!0).then((()=>{this.processAfterUpdateConfig()}))}else this.processAfterUpdateConfig()}getPersonalizedFilterItem(){return this.filterConfig.find((t=>t.type===y.PERSONALIZED))}async processAfterUpdateConfig(){var t;if(this._loadingPending){if(await this._application.isLoadedByPk()&&!this._configUpdated)return;const t=this.getPersonalizedFilterItem();if(this._pendingVariables=!_.validateVariableValues(t),this._pendingVariables)return;this._loadingPending=!1,this.doLoadData()}this._configUpdated&&(this._configUpdated=!1,k.saveFilterBarConfig(this.filterConfig,this.configName,this.resourceID),null===(t=this.afterApplyConfig)||void 0===t||t.call(this))}async doLoadData(t=!1){try{if(this._firstLoad&&!1===this.autoLoad)return;if(this._firstLoad&&!t&&void 0===this.autoLoad&&!await this._application.getBooleanParam("global.carregar.registros.iniciar.tela"))return;this.dataUnit.loadData(void 0,void 0,!0)}finally{this._firstLoad=!1}}getMessage(t,i,e){var s;return null==this.messagesBuilder&&this._application&&(this.messagesBuilder=this._application.messagesBuilder),(null===(s=this.messagesBuilder)||void 0===s?void 0:s.getMessage(t,i))||e}async getFilters(){return this.getFilter(null)}getFilter(t){var i;const e=[];return null===(i=this.filterConfig)||void 0===i||i.filter((t=>this.isActiveFilter(t))).forEach((t=>{const i=(t=>{switch(t.type){case y.DEFAULT_FILTER:return function(t){return{name:t.id,expression:t.props.expression,params:[]}}(t);case y.BINARY_SELECT:return function(t){const{id:i,value:e,props:s}=t;return{name:i,expression:s.options.find((t=>t.name===e)).expression,params:[]}}(t);case y.MULTI_SELECT:return function(t){const{id:i,value:e,props:s}=t;return{name:i,expression:s.expression,params:[{name:i,dataType:l.TEXT,value:e}]}}(t);case y.MULTI_LIST:return function(t){const{id:i,value:e,props:s}=t,r=(null!==(o=null!==(n=null==(a=e)?void 0:a.elements)&&void 0!==n?n:null==a?void 0:a.members)&&void 0!==o?o:a).filter((t=>null==t?void 0:t.check)).map((({id:t})=>Number.isNaN(+t)?String(t):Number(t)));var a,n,o;if(r.length>0)return{name:i,expression:s.expression,params:[{name:i,dataType:l.TEXT,value:JSON.stringify(r)}]}}(t);case y.PERIOD:return function(t){const{id:i,value:e,props:s}=t;let{end:r,start:a}=e;"string"==typeof r&&(r=new Date(r)),"string"==typeof a&&(a=new Date(a));const n=[];let o;return r&&a?(o=s.expression.fullfill,n.push({name:`${i}.START`,dataType:l.DATE,value:F(l.DATE,a)},{name:`${i}.END`,dataType:l.DATE,value:F(l.DATE,r)})):a?(o=s.expression.onlystart,n.push({name:i,dataType:l.DATE,value:F(l.DATE,a)})):(o=s.expression.onlyend,n.push({name:i,dataType:l.DATE,value:F(l.DATE,r)})),{name:i,expression:o,params:n}}(t);case y.SEARCH:return function(t){const{id:i,value:e,props:s}=t;return{name:i,expression:s.expression,params:[{name:i,dataType:l.TEXT,value:F(l.TEXT,null==e?void 0:e.value)}]}}(t);case y.TEXT:return function(t){let{id:i,value:e,props:s}=t;const r=s.expression;var n,o;return a.isEmpty(s.likeAs)||(n=e,e="CONTANIS"===(o=s.likeAs)?`%${n}%`:"STARTS_WITH"===o?`${n}%`:"ENDS_WITH"===o?`%${n}`:n),{name:i,expression:r,params:[{name:i,dataType:l.TEXT,value:F(l.TEXT,e)}]}}(t);case y.NUMBER:return function(t){const{id:i,value:e,props:s}=t;if(s.variation===w.INTERVAL){const{start:t,end:r}=null!=e?e:{start:0,end:0};if(!isNaN(t)&&!isNaN(r))return{name:i,expression:s.intervalExpression.fullfill,params:[{name:`${i}.START`,dataType:l.NUMBER,value:F(l.NUMBER,t)},{name:`${i}.END`,dataType:l.NUMBER,value:F(l.NUMBER,r)}]};if(!isNaN(t))return{name:i,expression:s.intervalExpression.onlystart,params:[{name:i,dataType:l.NUMBER,value:F(l.NUMBER,t)}]};if(!isNaN(r))return{name:i,expression:s.intervalExpression.onlyend,params:[{name:i,dataType:l.NUMBER,value:F(l.NUMBER,r)}]}}return{name:i,expression:s.expression,params:[{name:i,dataType:l.NUMBER,value:F(l.NUMBER,e)}]}}(t);case y.PERSONALIZED:return function(t){const{id:i,groupedItems:e=[]}=t,s=e.filter((t=>!!t.visible)).map((t=>{var i;const e=t.props.expression,s=((null===(i=t.props.personalizedFilter)||void 0===i?void 0:i.parameters)||[]).map(((i,e)=>{const s=Array.from(t.value||0),r=i.dataType;let a=e>=0&&e<s.length?s[e]:null;return null!=a&&"object"==typeof a&&"value"in a&&(a=a.value),null==a&&r===l.BOOLEAN&&(a=!1),{name:i.name,dataType:r,value:"string"==typeof a?a:F(r,a)}}));return{expression:e,name:t.id,params:s}}));return{name:i,expression:s.map((t=>`(${t.expression})`)).join(` ${z.AND} `),params:s.flatMap((t=>t.params))}}(t);case y.CHECK_BOX_LIST:return function(t){var i;const{id:e,value:s,props:r}=t,l=Object.entries(null!=s?s:{}).filter((([t,i])=>!0===i)).map((([t,i])=>t));return{name:e,expression:L(null===(i=r.options)||void 0===i?void 0:i.filter((t=>l.includes(t.name)))),params:[]}}(t);default:return}})(t);i&&e.push(i)})),e}isActiveFilter(t){return t.type===y.DEFAULT_FILTER||this.filterActiveFilter(t)&&(t.groupedItems||null!=t.value)}async registryFilterProvider(){this.dataUnit.addFilterProvider(this),this.filterConfig&&await this.doLoadData()}itemFocused(t){this._element.querySelectorAll("snk-filter-item,snk-filter-list").forEach((i=>{i.id===t?"snk-filter-item"===i.tagName.toLowerCase()&&i.getClientRects()[0].x<0&&i.scrollIntoView({behavior:"auto",inline:"nearest"}):i.hideDetail()}))}filterActiveFilter(t){return t.visible||t.removalBlocked}filterPersonalizedItems(t){return t.type===y.PERSONALIZED}getPersonalizedFilterVariableItems(){return this.filterConfig.filter(this.filterPersonalizedItems).map((t=>{const i=`filter-${t.id}`;return e("snk-filter-item",{key:t.id,id:i,config:Object.assign({},t),onFocusin:()=>this.itemFocused(i),onVisibleChanged:t=>this.scrollerLocked=t.detail,onFilterChange:t=>this.updateFilter(t.detail),getMessage:(t,i)=>this.getMessage(t,i),showChips:!1})}))}getFilterItems(){const t=[],i=[];this.filterConfig.sort(((t,i)=>this._filtersComparator(t,i))).filter(this.filterActiveFilter).forEach((s=>{const r=`filter-${(s=n.copy(s)).id}`,l=e("snk-filter-item",{onVisibleChanged:t=>this.scrollerLocked=t.detail,onFilterChange:t=>this.updateFilter(t.detail),onFocusin:()=>this.itemFocused(r),id:r,config:s,class:"ez-margin-horizontal--extra-small",getMessage:(t,i)=>this.getMessage(t,i),key:s.id});return s.fixed||s.hardFixed||s.required?t.push(l):i.push(l),l}));const s=[];return s.push(...t.reverse()),t.length>0&&i.length>0&&s.push(e("hr",{class:"ez-margin-horizontal--small ez-margin-vertical--auto ez-divider-vertical ez-divider--dark snk-filter-bar__divider"})),s.push(...i),s}calculateUpdateSequence(t){t&&(this._updateSequence=this._updateSequence.filter((i=>t.id!==i)),this._updateSequence.push(t.id))}normalizeItem(t){const i=Object.assign({},t);return["props","value","hardFixed","fixed"].forEach((t=>{null==i[t]&&delete i[t]})),""===t.value&&delete t.value,i}updateFilter(t){let i=this.filterConfig.map((i=>(t=this.normalizeItem(t),i.id===t.id?(n.objectToString(i)!=n.objectToString(t)&&this.calculateUpdateSequence(t),t):i))).sort(((t,i)=>this._filtersComparator(t,i)));this.filterCustomConfigInterceptor&&(i=this.filterCustomConfigInterceptor(i)),this.filterConfig=i}loadPermitions(){this._application.isUserSup().then((t=>this.allowDefault=t))}addFilterBarLegacyConfigName(){this.filterBarLegacyConfigName&&k.addFilterBarLegacyConfig(this.configName,this.filterBarLegacyConfigName)}async loadConfigFromStorage(t){try{let i;t&&await k.deleteFilterBarConfigCache(this.configName,this.resourceID),i=this.customFilterBarConfig?await this.customFilterBarConfig(this.configName,this.resourceID,{contextURI:this.dataUnit.name}):await k.loadFilterBarConfig(this.configName,this.resourceID,{contextURI:this.dataUnit.name}),this.filterCustomConfig&&(i=[...this.filterCustomConfig,...i]),this.filterCustomConfigInterceptor&&(i=this.filterCustomConfigInterceptor(i)),this.filterConfig=i.map((t=>this.normalizeItem(t))),this.filterConfig.sort(((t,i)=>this._filtersComparator(t,i)))}catch(t){throw new h(this.getMessage("snkFilterBar.failToLoadConfig"),t)}}async attachDataUnit(){if(null==this.dataUnit){let t=this._element.parentElement;for(;t;)if("SNK-DATA-UNIT"===t.tagName.toUpperCase()){const i=t;this.dataUnit=i.dataUnit,this.dataUnit?await this.registryFilterProvider():i.addEventListener("dataUnitReady",(async t=>{this.dataUnit=t.detail,await this.registryFilterProvider()}));break}t=t.parentElement}else await this.registryFilterProvider()}filterChangeListener(t){this.updateFilter(t.detail)}async showFilterModal(){this.isFilterModalOpen||(this.isFilterModalOpen=!0)}addPersonalizedFilter(t=!1){this.isFilterModalOpen=!1,this._isDefaultFilter=t,this.personalizedFilterId=void 0,this.showPersonalizedFilter=!0,window.requestAnimationFrame((()=>{this._elPersonalizedFilter.createPersonalizedFilter()}))}editPersonalizedFilter(t,i=!1){this.isFilterModalOpen=!1,this._isDefaultFilter=i,this.showPersonalizedFilter=!0,this.personalizedFilterId=t}deletePersonalizedFilter(t,i,e,s=!1){if(s)return k.removeDefaultFilter(t,this.resourceID,e),void(this._isDefaultFilter=!1);i===y.PERSONALIZED&&k.removePersonalizedFilter(t,this.resourceID,e)}closeFilterModal(){this.isFilterModalOpen=!1}applyFiltersFromModal(t){var i;this.filterConfig=t.map(this.normalizeItem).sort(((t,i)=>this._filtersComparator(t,i))),null===(i=this.afterApplyConfig)||void 0===i||i.call(this),this.isFilterModalOpen=!1}handleHidePersonalizedFilter(t){t?this.loadConfigFromStorage().then((()=>{this.hidePersonalizedFilter()})):this.hidePersonalizedFilter()}hidePersonalizedFilter(){this.personalizedFilterId=void 0,this.showPersonalizedFilter=!1,this._isDefaultFilter=!1}async componentWillLoad(){var t;try{if(this._application=d.getContextValue("__SNK__APPLICATION__"),await this.attachDataUnit(),this._application){if(this._application.enableLockManagerLoadingApp&&this.enableLockManagerLoadingComp){const t=c.addLockManagerCtxId(this._element);this._resolveLoading=c.lock(t,u.APP_LOADING)}await Promise.all([this.loadPermitions(),this.addFilterBarLegacyConfigName(),this.loadConfigFromStorage()])}}finally{null===(t=this._resolveLoading)||void 0===t||t.call(this)}}componentDidRender(){this.processPendingFilter()}render(){if(!this.dataUnit||!this.filterConfig||0===this.filterConfig.length)return;if(this.showPersonalizedFilter)return e("snk-personalized-filter",{class:"filter-bar__personalized-filter",filterId:this.personalizedFilterId,ref:t=>this._elPersonalizedFilter=t,isDefaultFilter:this._isDefaultFilter,onEzCancel:()=>this.handleHidePersonalizedFilter(!1),onEzAfterSave:()=>this.handleHidePersonalizedFilter(!0),entityUri:this.dataUnit.name,configName:this.configName,resourceID:this.resourceID});let t=n.copy(this.filterConfig);return t=t.sort(((t,i)=>t.originOrder-i.originOrder)),"regular"!==this.mode?e(s,{"data-mode":this.mode},this.getPersonalizedFilterVariableItems(),"button"===this.mode&&e("ez-button",{class:"ez-margin-left--medium",size:"small",label:this.getMessage("snkFilterBar.filters",void 0,this.getMessage("snkFilterBar.filters")),onClick:this.showFilterModal.bind(this)}),e("snk-filter-modal",{opened:this.isFilterModalOpen,filterConfig:this.filterConfig,configName:this.configName,disablePersonalizedFilter:this.disablePersonalizedFilter,getMessage:(t,i)=>this.getMessage(t,i),applyFilters:t=>this.applyFiltersFromModal(t),closeModal:()=>this.closeFilterModal(),addPersonalizedFilter:t=>this.addPersonalizedFilter(t),editPersonalizedFilter:(t,i)=>this.editPersonalizedFilter(t,i),deletePersonalizedFilter:(t,i,e)=>this.deletePersonalizedFilter(t,y.PERSONALIZED,i,e),filterCustomConfigInterceptor:this.filterCustomConfigInterceptor})):e(s,null,e("div",null,e("span",{class:"snk-filter-bar__title",title:this.title,"data-tooltip":this.title,"data-flow":"bottom"},this.title)),e("ez-scroller",{class:"snk-filter-bar__scroller",direction:g.HORIZONTAL,activeShadow:!0,locked:this.scrollerLocked},e("section",{class:"snk-filter-bar__filter-item-container"},this.getFilterItems())),e("ez-button",{class:"ez-padding-left--medium ez-margin-top--extra-small",size:"small",label:this.getMessage("snkFilterBar.filters",void 0,this.getMessage("snkFilterBar.filters")),onClick:this.showFilterModal.bind(this)},e("ez-icon",{slot:"leftIcon",iconName:"plus",class:"ez-padding-right--small"})),e("snk-filter-modal",{opened:this.isFilterModalOpen,filterConfig:this.filterConfig,configName:this.configName,disablePersonalizedFilter:this.disablePersonalizedFilter,getMessage:(t,i)=>this.getMessage(t,i),applyFilters:t=>this.applyFiltersFromModal(t),closeModal:()=>this.closeFilterModal(),addPersonalizedFilter:t=>this.addPersonalizedFilter(t),editPersonalizedFilter:(t,i)=>this.editPersonalizedFilter(t,i),deletePersonalizedFilter:(t,i,e)=>this.deletePersonalizedFilter(t,y.PERSONALIZED,i,e),filterCustomConfigInterceptor:this.filterCustomConfigInterceptor}))}get _element(){return r(this)}static get watchers(){return{filterConfig:["observeFilterConfig"]}}};A.style='.sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:12px}[data-mode="hidden"].sc-snk-filter-bar-h{width:0px;height:0px}[data-mode="button"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small);height:80%}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-items:start;margin:var(--space--2, 2px) 0}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:"";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}';const P=class{constructor(e){t(this,e),this.visibleChanged=i(this,"visibleChanged",7),this.filterChange=i(this,"filterChange",3),this._keyboardManager=void 0,this.detailIsVisible=void 0,this.config=void 0,this.getMessage=void 0,this.showChips=!0}observeDetailIsVisible(t){this.visibleChanged.emit(t)}filterChangeListener(){this.hideDetail()}async showUp(t=!1){var i;this._filterItemElement.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}),t&&(await(null===(i=this._chipElement)||void 0===i?void 0:i.setBlur()),await this._popover.showUnder(this._chipElement),await this._filterDetail.setFocusField())}async hideDetail(){var t;await(null===(t=this._popover)||void 0===t?void 0:t.hide())}getConfigChanges(){var t;const i=this.config;(null===(t=i.groupedItems)||void 0===t?void 0:t.length)&&(i.visible=!1,i.groupedItems=i.groupedItems.map((t=>Object.assign(Object.assign({},t),{visible:!1}))));const e=i.type===y.MULTI_LIST&&Array.isArray(i.value)?i.value.map((t=>Object.assign(Object.assign({},t),{check:!1}))):void 0;return Object.assign(Object.assign({},i),{value:e})}clearFilter(t){if(null==t||t.stopPropagation(),this.canClearFilter()){const t=this.getConfigChanges();this.filterChange.emit(t)}else this.togglePopover(t)}async togglePopover(t){null==t||t.preventDefault(),null==t||t.stopPropagation(),!1!==this.config.enabled&&(this.detailIsVisible?await this.hideDetail():await this.showUp(!0))}getLabel(t=!1){var i,e;const{type:s,value:r,label:l,props:a,groupedItems:n=[]}=this.config;if(r||n.length){if(s===y.BINARY_SELECT){const[i,e]=a.options,s=this.getMessage("snkFilterBar.binarySelectTooltip");if(i.name===r)return t?`${s} ${String(i.label).toLowerCase()}`:i.label;if(e.name===r)return t?`${s} ${String(e.label).toLowerCase()}`:e.label}if(s===y.MULTI_SELECT)return`${l}: ${a.options.find((t=>t.value===r)).label}`;if(s===y.PERIOD){let{end:i,start:e}=r;"string"==typeof i&&(i=new Date(i),i.setMinutes(i.getMinutes()+i.getTimezoneOffset())),"string"==typeof e&&(e=new Date(e),e.setMinutes(e.getMinutes()+e.getTimezoneOffset()));const s=new Intl.DateTimeFormat("pt-BR");if(i&&e){const s=e.getFullYear()===i.getFullYear(),r=Object.assign({day:"2-digit",month:"2-digit"},(!s||t)&&{year:"2-digit"}),a=f.formatDate(e,r),n=f.formatDate(i,r);return t?this.getMessage("snkFilterBar.fullPeriodTooltip",{LABEL:l,START_LABEL:a,END_LABEL:n}):`${l}: ${a} → ${n}`}return e?`${l}: ${this.getMessage("snkFilterBar.onlyStartToltip")} ${s.format(e)}`:i?`${l}: ${this.getMessage("snkFilterBar.onlyEndToltip")} ${s.format(i)}`:l}if(s===y.SEARCH)return`${l}: ${r.value} - ${r.label}`;if(s===y.PERSONALIZED){const t=this.calculateActiveCount(n);return t<=0?l:`${l}: ${this.getMessage("snkFilterBar.personalizedCount",{activeCount:t})}`}if(s===y.MULTI_LIST){const e=(null!==(i=r.elements)&&void 0!==i?i:r).filter((t=>null==t?void 0:t.check));return this.getLabelFromCheckedOptions(e,l,t)}if(s===y.CHECK_BOX_LIST){const i=Object.entries(null!=r?r:{}).filter((([t,i])=>!0===i)).map((([t,i])=>t)),s=(null!==(e=a.options)&&void 0!==e?e:[]).filter((t=>i.includes(t.name)));return this.getLabelFromCheckedOptions(s,l,t)}if(s===y.NUMBER&&a.variation===w.INTERVAL){const{start:t,end:i}=r;if(!isNaN(t)&&!isNaN(i))return this.getMessage("snkFilterBar.fullIntervalTooltip",{LABEL:l,START_LABEL:t,END_LABEL:i});if(!isNaN(t))return`${l}: ${this.getMessage("snkFilterBar.onlyStartToltip")} ${Number(t)}`;if(!isNaN(i))return`${l}: ${this.getMessage("snkFilterBar.onlyEndToltip")} ${Number(i)}`}return this.config.mask?`${l}: ${new m(this.config.mask).format(r)}`:`${l}: ${r}`}return l}getLabelFromCheckedOptions(t,i,e){const s=t.length;return 0===s?`${i}`:s>1?e?`${i}: ${t.map((t=>t.label)).join(",")}`:`${i}: ${s} ${this.getMessage("snkFilterBar.multiListToltip")}`:`${i}: ${t[0].label}`}calculateActiveCount(t){return t.reduce(((t,i)=>i.visible?t+1:t),0)}componentDidLoad(){this._filterItemElement&&(o.addIDInfo(this._filterItemElement),this._idSnkFilterDetail=`filterDetail_${this.config.id}`)}canClearFilter(){const{value:t,groupedItems:i=[]}=this.config;return null!=t&&this.config.type===y.MULTI_LIST?t.some((t=>t.check)):void 0!==t||i.some((t=>t.visible))}getRightIconName(){return this.canClearFilter()?"close":this.detailIsVisible?"chevron-up":"chevron-down"}getLeftIconName(){switch(this.config.type){case y.PERIOD:return"calendar";case y.PERSONALIZED:return"tune"}}hasActiveElements(t){var i;const e=Array.isArray(t)?t:null==t?void 0:t.elements;return(null===(i=null==e?void 0:e.filter((t=>null==t?void 0:t.check)))||void 0===i?void 0:i.length)>0}hasActiveValue(t){return t.type!==y.MULTI_LIST&&void 0!==t.value||this.hasActiveElements(t.value)}getEnabledChip(){if(this.detailIsVisible)return!0;if(this.config.type===y.PERSONALIZED){const{groupedItems:t=[]}=this.config;return t.some((t=>t.visible))}return this.hasActiveValue(this.config)}async handleVisibilityPopover(t){this.detailIsVisible=t.detail,this.detailIsVisible||await this._filterDetail.clearValue()}getCustomMessage(t,i){var e;return null===(e=this.getMessage)||void 0===e?void 0:e.call(this,`snkFilterBar.filterModal.${t}`,i)}hasValue(){return this.config.type===y.MULTI_LIST?this.hasActiveElements(this.config.value):null!=this.config.value}getTooltipMessage(){var t,i;return this.config.required&&!this.hasValue()?{message:null!==(t=this.config.requiredMessage)&&void 0!==t?t:this.getCustomMessage("validations.requiredFilter"),type:"error"}:!1===this.config.enabled&&this.config.disabledMessage?{message:this.config.disabledMessage,type:"warning"}:{message:null!==(i=this.config.defaultMessage)&&void 0!==i?i:this.getLabel(!0),type:"default"}}getTypeChip(t){switch(t){case"default":return"secondary";case"warning":return"warning-light";case"error":return"error-light";case"success":return"success-light";default:return t}}initKeyboardManager(){this._keyboardManager=new p({element:this._filterItemElement,propagate:!0}),this._keyboardManager.bind("Escape",(()=>this.hideDetail()))}connectedCallback(){this.initKeyboardManager()}disconnectedCallback(){this._keyboardManager.unbindAllShortcutKeys()}render(){const t=this.getLeftIconName(),{type:i,message:r}=this.getTooltipMessage();return e(s,null,this.showChips&&e("ez-tooltip",{id:this.config.id,message:r,type:i,active:!this.detailIsVisible,strategy:"fixed"},e("ez-chip",{id:this.config.id,ref:t=>this._chipElement=t,label:this.getLabel(),value:this.getEnabledChip(),onClick:t=>this.togglePopover(t),disableAutoUpdateValue:!0,type:this.getTypeChip(i),enabled:this.config.enabled},t&&e("ez-icon",{ref:t=>this._leftIconElement=t,iconName:t,slot:"leftIcon"}),e("ez-icon",{ref:t=>this._rightIconElement=t,iconName:this.getRightIconName(),slot:"rightIcon",id:"removeFilter",onClick:t=>this.clearFilter(t)}))),e("ez-popover-core",{ref:t=>this._popover=t,onEzVisibilityChange:t=>this.handleVisibilityPopover(t)},e("snk-filter-detail",{ref:t=>this._filterDetail=t,key:this.config.id,config:this.config,getMessage:this.getMessage,class:"sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16","data-element-id":this._idSnkFilterDetail,showHardFixed:this.showChips&&!this.config.required,removalBlocked:this.config.required})))}get _filterItemElement(){return r(this)}static get watchers(){return{detailIsVisible:["observeDetailIsVisible"]}}};P.style="ez-popover-core.sc-snk-filter-item{--ez-popover__box--z-index:var(--elevation--20, 20);--ez-popover__box--overlay-z-index:var(--elevation--16, 16)}";const D="__SHOWMORE__",S=class{constructor(e){t(this,e),this.snkItemSelected=i(this,"snkItemSelected",7),this._preselection=-1,this.innerClickCheck=(t,i)=>i.id!=v.MODAL_ELEMENT_ID||(this._detailIsVisible=!1,!1),this._filterArgument=void 0,this._showAll=void 0,this.label=void 0,this.iconName=void 0,this.items=void 0,this.getMessage=void 0,this.emptyText=void 0,this.findFilterText=void 0,this.buttonClass=void 0}showDetail(){this._preselection=-1,this._floatingID=v.float(this._popover,this._popoverContainer,{autoClose:!0,innerClickTest:this.innerClickCheck,backClickListener:()=>this.onListCloseCallback(),useOverlay:!0}),this._detailIsVisible=!0,this._showAll=!1,this._filterArgument="",this._filterInput.setFocus()}async hideDetail(){null!=this._floatingID&&v.close(this._floatingID)}onListCloseCallback(){this._floatingID=void 0,this._detailIsVisible=!1}buttonClick(){this._detailIsVisible?this.hideDetail():this.showDetail()}componentDidLoad(){this._element&&o.addIDInfo(this._element)}componentDidRender(){null==this._floatingID&&this._popover&&this._popover.remove()}buildIdElement(t,i){if(!t)return;const e={id:i};t.removeAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME),o.addIDInfoIfNotExists(t,"filterItemList",e)}buildItemElement(t){const i=++this._selectableItemsCount;return e("button",{ref:i=>i&&this.buildIdElement(i,t.label),id:`filter-item${i}`,onFocusin:()=>this._preselection=i,class:"ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item",onClick:()=>this.itemSelected(t.name),name:t.label,key:i},t.iconName?e("ez-icon",{iconName:t.iconName,size:"small",class:`ez-padding-right--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__icon ${t.iconClass||""}`}):void 0,e("div",{class:`ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__label ${t.labelClass||""}`},t.label))}itemSelected(t){t===D?this._showAll=!0:(this.hideDetail(),this.snkItemSelected.emit(t))}getFilterItems(){const t=this.items?b.applyStringFilter(this._filterArgument,this.items.filter((t=>"FILTER"===t.kind))):[];return 0===t.length?e("div",{class:"ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-items-container--empty"},this.emptyText):(!this._filterArgument&&!this._showAll&&t.length>6&&(t.splice(5),t.push({kind:"INTERNAL",label:this.getMessage("snkFilterList.showMore"),iconName:"dots-horizontal",name:D,iconClass:"snk-filter-bar__filter-list-item__icon--secondary",labelClass:"snk-filter-bar__filter-list-item__label--secondary"})),this._selectableItemsCount=0,e("div",{class:"sc-snk-filter-bar snk-filter-bar__filter-list-items-container"},t.map((t=>this.buildItemElement(t)))))}getFooterItems(){return this.items.filter((t=>"FOOTER"===t.kind))}keyDownHandler(t){switch(t.key){case"ArrowDown":this.changePreselection(this._preselection+1),t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault();break;case"ArrowUp":this.changePreselection(this._preselection-1),t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault()}}changePreselection(t){if(t<0&&(t=this._selectableItemsCount),this._preselection=t>this._selectableItemsCount?0:t,0===this._preselection)this._filterInput.setFocus();else{const t=this._element.querySelector(`#filter-item${this._preselection}`);t&&t.focus()}}render(){return e(s,{class:"ez-flex ez-flex--column"},e("ez-button",{class:this.buttonClass,label:this.label,onClick:()=>this.buttonClick(),mode:this.iconName?"icon":void 0,iconName:this.iconName,size:"small"},e("slot",{name:"leftIcon"})),e("section",{class:"ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container",ref:t=>this._popoverContainer=t},e("div",{class:"sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--4",ref:t=>this._popover=t},e("ez-filter-input",{ref:t=>this._filterInput=t,"data-element-id":"serachFilters",mode:"slim",label:this.findFilterText,value:this._filterArgument,onEzChange:t=>this._filterArgument=t.detail,onFocus:()=>this._preselection=0}),this.getFilterItems(),e("hr",{class:"sc-snk-filter-bar snk-filter__popover-rule"}),this.items?this.getFooterItems().map((t=>this.buildItemElement(t))):void 0)))}get _element(){return r(this)}},B=class{constructor(i){t(this,i),this.filters=[],this.filtersWithError=[],this.getMessage=void 0,this.configName=void 0,this.filterConfig=void 0,this.opened=!1,this.applyFilters=void 0,this.closeModal=void 0,this.addPersonalizedFilter=void 0,this.editPersonalizedFilter=void 0,this.deletePersonalizedFilter=void 0,this.filtersToDelete=[],this.filterDefaultToDelete=void 0,this.disablePersonalizedFilter=void 0,this.filterCustomConfigInterceptor=void 0}filterConfigChangeHandler(t){this.filters=n.copy(t),this.validateFilters()}deletePersonalizedFilterListener(t){this.filtersToDelete.push(t.detail)}getCustomMessage(t,i){var e;return null===(e=this.getMessage)||void 0===e?void 0:e.call(this,`snkFilterBar.filterModal.${t}`,i)}handleClearAll(){const{customFilters:t,quickFilters:i,otherFilters:e,multiListFilters:s}=this.filters.reduce(((t,i)=>i.type===y.MULTI_LIST?(t.multiListFilters.push(i),t):i.filterType===N.QUICK_FILTER?(t.quickFilters.push(i),t):i.filterType===N.CUSTOM_FILTER?(t.customFilters.push(i),t):i.filterType===N.OTHER_FILTERS?(t.otherFilters.push(i),t):t),{quickFilters:[],customFilters:[],otherFilters:[],multiListFilters:[]});this.handleClearFilterList(i),this.handleClearCustomFilters(t),this.handleClearOthersFilters(e),s.forEach((t=>this.handleClearSigleFilter(t)))}handleClearOthersFilters(t){this.filters=this.filters.map((i=>t.includes(i)?Object.assign(Object.assign({},i),{value:void 0}):i))}handleClearCustomFilters(t){this.filters.forEach(((i,e)=>{i.filterType===N.CUSTOM_FILTER&&(this.filters[e]=this.clearAllCustomFilter(t).shift())}))}clearAllCustomFilter(t){return t.map((t=>{const i=Object.assign({},t);return delete i.value,i.visible=!1,i.groupedItems&&(i.groupedItems=this.clearAllCustomFilter(i.groupedItems)),i}))}hasChangeToSave(){return n.objectToString(this.filters)!=n.objectToString(this.filters)}handleClose(){if(this.hasChangeToSave())return I.confirm(this.getCustomMessage("validations.notSaved.title"),this.getCustomMessage("validations.notSaved.message")).then((t=>{t&&this.closeModal()}));this.closeModal()}handleApplyFilters(){if(!this.validateFilters())return;const t=this.filters.find((t=>t.filterType===N.CUSTOM_FILTER||t.filterType===N.DEFAULT_FILTER));this.isValidCustomFilter(t)&&this.applyFilters(this.filters),this.filtersToDelete.length>0&&(this.filtersToDelete.forEach((t=>{this.deletePersonalizedFilter(t,this.configName)})),this.filtersToDelete=[]),this.filterDefaultToDelete&&(this.deletePersonalizedFilter(this.filterDefaultToDelete,this.configName,!0),this._defaultFilter=void 0,this.filterDefaultToDelete=void 0)}isValidCustomFilter(t){return!!_.validateVariableValues(t)||(I.alert(this.getCustomMessage("validations.notFullFilled.title"),this.getCustomMessage("validations.notFullFilled.message")),!1)}modalActionListener(t){switch(t.detail){case C.CANCEL:this.handleClearAll();break;case C.OK:this.handleApplyFilters();break;case C.CLOSE:this.handleClose()}}handleFilterChange(t){t.stopPropagation();const i=t.detail;let e=this.filters.map((t=>t.id===i.id?i:t));this.filterCustomConfigInterceptor&&(e=this.filterCustomConfigInterceptor(e)),this.filters=n.copy(e)}handleClearFilterList(t){this.filters=this.filters.map((i=>t.includes(i)?Object.assign(Object.assign({},i),{value:void 0}):i))}handleClearSigleFilter(t){if(y.MULTI_LIST===t.type){let i=n.copy(t);this.uncheckFilterValues(i.value);const e=n.copy(this.filters),s=e.findIndex((i=>i.id===t.id));return e.splice(s,1,i),void(this.filters=n.copy(e))}if(y.CHECK_BOX_LIST===t.type){const i=n.copy(this.filters);return i.find((i=>i.id===t.id)).value=void 0,void(this.filters=n.copy(i))}this.filters.find((i=>i.id===t.id)).value=void 0,this.filters=n.copy(this.filters)}uncheckFilterValues(t){return t.forEach((t=>{t&&(t.check=!1)})),t}validateFilters(){const t=T(this.filters);return this.filtersWithError=t.map((t=>t.id)),0===t.length||(t.forEach((t=>{const i=this._element.querySelector(`#filter-item-${t.id}`);i&&(i.errorMessage=t.requiredMessage||this.getCustomMessage("validations.requiredFilter"))})),!1)}renderFilterItem(t,i){return e("snk-filter-modal-item",{key:`modal-item-${t.id}`,class:i?"ez-col ez-col--sd-12":"ez-col ez-col--sd-6 ez-padding--small",filterItem:t,configName:this.configName,onFilterChange:t=>this.handleFilterChange(t),onEditPersonalizedFilter:t=>this.editPersonalizedFilter(t.detail),onAddPersonalizedFilter:()=>this.addPersonalizedFilter()})}isDefaultFilterNumberVariation(t){var i;return t.type===y.NUMBER&&(!t.props.variation||(null===(i=t.props)||void 0===i?void 0:i.variation)===w.DEFAULT)}mountFiltersLines(t){let i=0,e=!1;const s={};for(let r=0;r<t.length;r++){s[i]=s[i]||[];const l=t[r],a=r===t.length-1,n=l.type===y.TEXT||this.isDefaultFilterNumberVariation(l),o=!a&&(t[r+1].type===y.TEXT||this.isDefaultFilterNumberVariation(t[r+1]));n&&o||e?(s[i].push(l),e=s[i].length<2,2===s[i].length&&++i):(s[i]=s[i]||[],s[i].push(l),++i)}return Object.values(s)}renderFilterLine(t){const i=1===t.length;return t.map((t=>this.renderFilterItem(t,i)))}getIformedFiltersCount(t){let i=0;return t.forEach((t=>{var e,s,r,l,a,n;const o=this.filterConfig.find((i=>i.id===t.id));y.MULTI_LIST!==o.type?y.CHECK_BOX_LIST!==o.type?null==o.groupedItems?o.value&&i++:i=o.groupedItems.filter((t=>t.visible)).length:i+=Object.entries(null!==(n=o.value)&&void 0!==n?n:{}).filter((([t,i])=>!0===i)).map((([t,i])=>t)).length:i+=null!==(a=null===(l=null===(r=null!==(s=null===(e=o.value)||void 0===e?void 0:e.elements)&&void 0!==s?s:o.value)||void 0===r?void 0:r.filter((t=>null==t?void 0:t.check)))||void 0===l?void 0:l.length)&&void 0!==a?a:0})),i}renderCollapsibleFilterBox(t,i,s,r=!0){if(!i.length)return null;const l=this.getIformedFiltersCount(i),a=this.mountFiltersLines(i),n=this.filtersWithError.filter((t=>i.some((i=>i.id===t)))).length;return e("ez-collapsible-box",{class:"snk-filter-modal__collapsible-box",headerSize:"medium",value:!0,label:t},e("div",{class:"ez-flex ez-flex--justify-end grow",slot:"rightSlot"},!!l&&e("ez-badge",{class:"ez-badge--primary-subtle",label:null==l?void 0:l.toString()}),!!n&&e("ez-badge",{class:"ez-badge--error-subtle",label:null==n?void 0:n.toString()})),e("div",{class:"ez-row snk-filter-modal__rendered-items"},a.map(this.renderFilterLine.bind(this))),r&&e("div",{class:"ez-flex ez-flex--justify-end grow"},e("ez-button",{class:"ez-button--tertiary",size:"medium",label:this.getCustomMessage("clearModal"),onClick:()=>s?this.handleClearSigleFilter(i[0]):this.handleClearFilterList(i)})))}handleDeleteFilter(){this._application.confirm(this.getMessage("snkPersonalizedFilter.deleteConfirm.title"),this.getMessage("snkPersonalizedFilter.info.deleteDefaultFilterConfirm"),"alert-circle-inverted","critical").then((t=>{t&&(this.filterDefaultToDelete=this._defaultFilter,this.filters=this.filters.filter((t=>t.id!==N.DEFAULT_FILTER)))}))}handleActionSelectedDefaultFilter({detail:t}){switch(t){case $.CREATE:this.addPersonalizedFilter(!0);break;case $.EDIT:this.editPersonalizedFilter(this._defaultFilter.id,!0);break;case $.REMOVE:this.handleDeleteFilter()}}getCustomFilter(t){return t.filter((t=>t.filterType===N.CUSTOM_FILTER))}getDefaultFilter(t){return t.find((t=>t.id===x.id))}componentWillLoad(){this._application=d.getContextValue("__SNK__APPLICATION__"),this.filters=n.copy(this.filterConfig)}componentWillRender(){this._modalTitle=this.getCustomMessage("title"),this._okButtonLabel=this.getCustomMessage("okButtonLabel"),this._cancelButtonLabel=this.getCustomMessage("cancelButtonLabel")}componentDidLoad(){this.validateFilters()}render(){this._defaultFilter=this.getDefaultFilter(this.filters);const t=this.getCustomFilter(this.filters),i=this.filters.filter((t=>t.filterType===N.QUICK_FILTER)),s=this.filters.filter((t=>t.filterType===N.OTHER_FILTERS));return e("ez-modal",{opened:this.opened,modalSize:"col--sd-3",align:"right",heightMode:"full",closeEsc:!0},e("ez-modal-container",{class:"snk-filter-modal__container",modalTitle:this._modalTitle,cancelButtonLabel:this._cancelButtonLabel,okButtonLabel:this._okButtonLabel,onEzModalAction:this.modalActionListener.bind(this)},e("div",{class:"snk-filter-modal__content ez-col--sd-12"},e("snk-default-filter",{getMessage:this.getCustomMessage.bind(this),hasDefaultFilter:!!this._defaultFilter,onActionSelected:this.handleActionSelectedDefaultFilter.bind(this)}),!this.disablePersonalizedFilter&&this.renderCollapsibleFilterBox(this.getCustomMessage("customFilters"),t,!1,!1),this.renderCollapsibleFilterBox(this.getCustomMessage("quickFilters"),i,!1),s.map((t=>this.renderCollapsibleFilterBox(t.label,[t],!0))))))}get _element(){return r(this)}static get watchers(){return{filterConfig:["filterConfigChangeHandler"]}}};B.style="ez-modal{--ez-modal-content-padding:24px 12px}.snk-filter-modal__container{min-width:344px;overflow:hidden}.snk-filter-modal__content{display:flex;flex-direction:column;gap:var(--space--medium, 12px);padding-right:var(--space--3xs, 4px)}.snk-filter-modal__collapsible-box{border:var(--border--small, 1px solid) var(--color--strokes, #DCE0E8);border-radius:var(--border--radius-medium);padding:var(--space--medium, 12px) var(--space--small, 6px)}.snk-filter-modal__rendered-items{max-height:760px}.snk-filter-modal__rendered-items::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";export{A as snk_filter_bar,P as snk_filter_item,S as snk_filter_list,B as snk_filter_modal}