@sankhyalabs/sankhyablocks 8.15.0-dev.6 → 8.15.0-dev.61

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 (353) hide show
  1. package/dist/cjs/{ConfigStorage-8009ecb2.js → ConfigStorage-7df9d3bb.js} +102 -30
  2. package/dist/cjs/IExporterProvider-c307e2b1.js +187 -0
  3. package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
  4. package/dist/cjs/RecordIDUtils-3735135c.js +43 -0
  5. package/dist/cjs/{SnkFormConfigManager-7d850fbc.js → SnkFormConfigManager-4259edbe.js} +21 -13
  6. package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-66aa2557.js} +19 -1
  7. package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-e6112be7.js} +1 -1
  8. package/dist/cjs/{DataFetcher-ba94ed5b.js → form-config-fetcher-3c4daeb5.js} +258 -4
  9. package/dist/cjs/index-f9e81701.js +2 -10
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/{dataunit-fetcher-bd4c52da.js → pesquisa-fetcher-cbdaba63.js} +520 -86
  12. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  13. package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +529 -13
  14. package/dist/cjs/snk-application.cjs.entry.js +62 -28
  15. package/dist/cjs/snk-attach.cjs.entry.js +422 -62
  16. package/dist/cjs/snk-crud.cjs.entry.js +17 -12
  17. package/dist/cjs/snk-data-exporter.cjs.entry.js +204 -82
  18. package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-abd2113f.js} +3 -38
  19. package/dist/cjs/snk-data-unit.cjs.entry.js +3 -2
  20. package/dist/cjs/snk-detail-view.cjs.entry.js +10 -12
  21. package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
  22. package/dist/cjs/snk-filter-bar.cjs.entry.js +65 -10
  23. package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
  24. package/dist/cjs/snk-filter-item.cjs.entry.js +13 -6
  25. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +2 -3
  26. package/dist/cjs/snk-filter-modal.cjs.entry.js +2 -1
  27. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
  28. package/dist/cjs/snk-form-config.cjs.entry.js +46 -27
  29. package/dist/cjs/snk-form.cjs.entry.js +10 -4
  30. package/dist/cjs/snk-grid.cjs.entry.js +95 -116
  31. package/dist/cjs/{snk-guides-viewer-cb176c4d.js → snk-guides-viewer-b0c44e0c.js} +15 -11
  32. package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -10
  33. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +3 -1
  34. package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -3
  35. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  36. package/dist/cjs/snk-simple-crud.cjs.entry.js +367 -38
  37. package/dist/cjs/snk-taskbar.cjs.entry.js +124 -15
  38. package/dist/cjs/{taskbar-elements-01b85b99.js → taskbar-elements-d9392685.js} +11 -11
  39. package/dist/collection/collection-manifest.json +7 -7
  40. package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
  41. package/dist/collection/components/snk-application/snk-application.js +85 -2
  42. package/dist/collection/components/snk-attach/snk-attach.js +212 -39
  43. package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
  44. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
  45. package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
  46. package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
  47. package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
  48. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +118 -0
  49. package/dist/collection/components/snk-attach/structure/index.js +6 -3
  50. package/dist/collection/components/snk-crud/snk-crud.js +95 -3
  51. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
  52. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
  53. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +27 -3
  54. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +90 -0
  55. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +68 -0
  56. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +48 -1
  57. package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +1 -0
  58. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +53 -0
  59. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +55 -0
  60. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +42 -48
  61. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +88 -0
  62. package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +38 -0
  63. package/dist/collection/components/snk-data-unit/snk-data-unit.js +3 -42
  64. package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -3
  65. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
  66. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -1
  67. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +22 -1
  68. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +31 -6
  69. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +19 -1
  70. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +24 -1
  71. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +159 -5
  72. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
  73. package/dist/collection/components/snk-form/snk-form.js +25 -1
  74. package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +20 -12
  75. package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +50 -30
  76. package/dist/collection/components/snk-grid/snk-grid.js +102 -109
  77. package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
  78. package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
  79. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
  80. package/dist/collection/components/snk-simple-crud/regular-buttons.js +3 -0
  81. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +10 -2
  82. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +548 -20
  83. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +4 -2
  84. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +11 -11
  85. package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
  86. package/dist/collection/components/snk-taskbar/snk-taskbar.js +167 -14
  87. package/dist/collection/lib/configs/ConfigStorage.js +86 -16
  88. package/dist/collection/lib/dataUnit/InMemoryLoader.js +9 -40
  89. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +33 -0
  90. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +7 -4
  91. package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
  92. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
  93. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
  94. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
  95. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
  96. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
  97. package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
  98. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +3 -0
  99. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +4 -0
  100. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +11 -13
  101. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +32 -3
  102. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +36 -23
  103. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +12 -0
  104. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
  105. package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +6 -3
  106. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +12 -13
  107. package/dist/collection/lib/index.js +1 -1
  108. package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
  109. package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -1
  110. package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +4 -0
  111. package/dist/collection/lib/utils/CrudUtils.js +13 -1
  112. package/dist/components/ConfigStorage.js +93 -21
  113. package/dist/components/IExporterProvider.js +256 -0
  114. package/dist/components/ISave.js +42 -0
  115. package/dist/components/SnkFormConfigManager.js +19 -11
  116. package/dist/components/SnkMessageBuilder.js +19 -1
  117. package/dist/components/dataunit-fetcher.js +138 -91
  118. package/dist/components/form-config-fetcher.js +7035 -3
  119. package/dist/components/index.d.ts +6 -6
  120. package/dist/components/index2.js +198 -33
  121. package/dist/components/snk-actions-button2.js +3 -11
  122. package/dist/components/snk-application2.js +42 -3
  123. package/dist/components/snk-attach2.js +478 -70
  124. package/dist/components/snk-crud.js +18 -7
  125. package/dist/components/snk-data-exporter2.js +199 -82
  126. package/dist/components/snk-data-unit2.js +41 -39
  127. package/dist/components/snk-detail-view2.js +44 -12
  128. package/dist/components/snk-entity-list.js +5 -3
  129. package/dist/components/snk-expression-item2.js +1 -1
  130. package/dist/components/snk-filter-bar2.js +69 -8
  131. package/dist/components/snk-filter-detail2.js +5 -1
  132. package/dist/components/snk-filter-item2.js +14 -6
  133. package/dist/components/snk-filter-modal.js +4 -2
  134. package/dist/components/snk-filter-multi-select.js +2 -1
  135. package/dist/components/snk-form-config2.js +47 -27
  136. package/dist/components/snk-form.js +8 -0
  137. package/dist/components/snk-grid-config2.js +128 -102
  138. package/dist/components/snk-grid2.js +96 -112
  139. package/dist/components/snk-personalized-filter-editor.js +3 -1
  140. package/dist/components/snk-personalized-filter2.js +1 -1
  141. package/dist/components/snk-pesquisa2.js +1 -1
  142. package/dist/components/snk-simple-crud2.js +421 -34
  143. package/dist/components/snk-taskbar2.js +144 -29
  144. package/dist/components/taskbar-actions-button2.js +4 -2
  145. package/dist/esm/{ConfigStorage-1244b8b0.js → ConfigStorage-928c3bf4.js} +93 -21
  146. package/dist/esm/IExporterProvider-e2a1195d.js +179 -0
  147. package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
  148. package/dist/esm/RecordIDUtils-87d02110.js +41 -0
  149. package/dist/esm/{SnkFormConfigManager-9be0e7d4.js → SnkFormConfigManager-a87ade7a.js} +21 -13
  150. package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0a4becdd.js} +19 -1
  151. package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-e1cb288f.js} +1 -1
  152. package/dist/esm/{DataFetcher-aa159c5a.js → form-config-fetcher-e3094014.js} +257 -5
  153. package/dist/esm/index-a7d3d3f1.js +2 -10
  154. package/dist/esm/loader.js +1 -1
  155. package/dist/esm/{dataunit-fetcher-65714f21.js → pesquisa-fetcher-6d8e50bb.js} +494 -69
  156. package/dist/esm/sankhyablocks.js +1 -1
  157. package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +523 -9
  158. package/dist/esm/snk-application.entry.js +43 -9
  159. package/dist/esm/snk-attach.entry.js +422 -62
  160. package/dist/esm/snk-crud.entry.js +17 -12
  161. package/dist/esm/snk-data-exporter.entry.js +204 -82
  162. package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-29eba11a.js} +4 -39
  163. package/dist/esm/snk-data-unit.entry.js +3 -2
  164. package/dist/esm/snk-detail-view.entry.js +10 -12
  165. package/dist/esm/snk-entity-list.entry.js +5 -3
  166. package/dist/esm/snk-filter-bar.entry.js +65 -10
  167. package/dist/esm/snk-filter-detail.entry.js +4 -1
  168. package/dist/esm/snk-filter-item.entry.js +13 -6
  169. package/dist/esm/snk-filter-modal-item.entry.js +2 -3
  170. package/dist/esm/snk-filter-modal.entry.js +2 -1
  171. package/dist/esm/snk-filter-multi-select.entry.js +2 -1
  172. package/dist/esm/snk-form-config.entry.js +47 -28
  173. package/dist/esm/snk-form.entry.js +10 -4
  174. package/dist/esm/snk-grid.entry.js +95 -116
  175. package/dist/esm/{snk-guides-viewer-eeb8f354.js → snk-guides-viewer-1fd41a25.js} +15 -11
  176. package/dist/esm/snk-guides-viewer.entry.js +8 -10
  177. package/dist/esm/snk-personalized-filter-editor.entry.js +3 -1
  178. package/dist/esm/snk-personalized-filter.entry.js +2 -3
  179. package/dist/esm/snk-pesquisa.entry.js +1 -1
  180. package/dist/esm/snk-simple-crud.entry.js +359 -30
  181. package/dist/esm/snk-taskbar.entry.js +125 -16
  182. package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-ad766858.js} +11 -11
  183. package/dist/sankhyablocks/p-029bfc09.js +1 -0
  184. package/dist/sankhyablocks/p-07825198.js +1 -0
  185. package/dist/sankhyablocks/p-0e8702f0.js +1 -0
  186. package/dist/sankhyablocks/p-13ea113d.entry.js +1 -0
  187. package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
  188. package/dist/sankhyablocks/p-314e2d1a.entry.js +1 -0
  189. package/dist/sankhyablocks/p-32556aa6.js +1 -0
  190. package/dist/sankhyablocks/p-3357af48.js +1 -0
  191. package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
  192. package/dist/sankhyablocks/p-3c2a1f4d.js +65 -0
  193. package/dist/sankhyablocks/p-3e7167dd.js +1 -0
  194. package/dist/sankhyablocks/p-536eeb16.js +26 -0
  195. package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
  196. package/dist/sankhyablocks/p-587f9dcf.entry.js +1 -0
  197. package/dist/sankhyablocks/p-61984566.entry.js +1 -0
  198. package/dist/sankhyablocks/p-61dd89eb.js +1 -0
  199. package/dist/sankhyablocks/p-65b6dba3.entry.js +1 -0
  200. package/dist/sankhyablocks/p-6a7bc5c8.entry.js +1 -0
  201. package/dist/sankhyablocks/p-6c9edfd8.entry.js +1 -0
  202. package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
  203. package/dist/sankhyablocks/p-89bde7d3.entry.js +1 -0
  204. package/dist/sankhyablocks/p-91dceecf.entry.js +1 -0
  205. package/dist/sankhyablocks/p-9863d682.js +1 -0
  206. package/dist/sankhyablocks/p-a40cbad8.entry.js +1 -0
  207. package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
  208. package/dist/sankhyablocks/p-b86ea293.entry.js +1 -0
  209. package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
  210. package/dist/sankhyablocks/p-cfb98f51.entry.js +1 -0
  211. package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
  212. package/dist/sankhyablocks/p-d8ddb2a4.entry.js +11 -0
  213. package/dist/sankhyablocks/p-df73ac00.entry.js +1 -0
  214. package/dist/sankhyablocks/p-e27496ed.js +56 -0
  215. package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
  216. package/dist/sankhyablocks/p-f92f1f5f.entry.js +1 -0
  217. package/dist/sankhyablocks/p-fa84e72f.entry.js +1 -0
  218. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  219. package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
  220. package/dist/types/components/snk-application/snk-application.d.ts +15 -0
  221. package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
  222. package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
  223. package/dist/types/components/snk-attach/snk-attach.d.ts +29 -6
  224. package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
  225. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +40 -0
  226. package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
  227. package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
  228. package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
  229. package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +16 -0
  230. package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
  231. package/dist/types/components/snk-crud/snk-crud.d.ts +21 -0
  232. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
  233. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +6 -1
  234. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +13 -0
  235. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +11 -0
  236. package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +21 -4
  237. package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +5 -0
  238. package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +17 -0
  239. package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +17 -0
  240. package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +3 -1
  241. package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +77 -0
  242. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +3 -0
  243. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
  244. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +7 -3
  245. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +5 -0
  246. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +27 -1
  247. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -1
  248. package/dist/types/components/snk-form/snk-form.d.ts +6 -1
  249. package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +2 -1
  250. package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +5 -3
  251. package/dist/types/components/snk-grid/snk-grid.d.ts +19 -4
  252. package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
  253. package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
  254. package/dist/types/components/snk-simple-crud/regular-buttons.d.ts +3 -0
  255. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +98 -4
  256. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
  257. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +34 -1
  258. package/dist/types/components.d.ts +314 -12
  259. package/dist/types/lib/configs/ConfigStorage.d.ts +25 -1
  260. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +0 -2
  261. package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +4 -0
  262. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
  263. package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
  264. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
  265. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
  266. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
  267. package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
  268. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +2 -1
  269. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +1 -0
  270. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -0
  271. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -0
  272. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +1 -0
  273. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +1 -0
  274. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +2 -0
  275. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
  276. package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +2 -1
  277. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
  278. package/dist/types/lib/index.d.ts +1 -1
  279. package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
  280. package/package.json +15 -6
  281. package/dist/cjs/PreloadManager-84466da6.js +0 -224
  282. package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
  283. package/dist/cjs/form-config-fetcher-df043d3d.js +0 -244
  284. package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
  285. package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
  286. package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
  287. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +0 -34
  288. package/dist/components/DataFetcher.js +0 -7021
  289. package/dist/components/field-search.js +0 -121
  290. package/dist/components/index3.js +0 -199
  291. package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
  292. package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
  293. package/dist/esm/form-config-fetcher-36219cd3.js +0 -241
  294. package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
  295. package/dist/esm/snk-grid-config.entry.js +0 -479
  296. package/dist/esm/snk-select-box.entry.js +0 -21
  297. package/dist/sankhyablocks/p-0874adb5.entry.js +0 -1
  298. package/dist/sankhyablocks/p-094c30cb.js +0 -1
  299. package/dist/sankhyablocks/p-0d7863ed.js +0 -26
  300. package/dist/sankhyablocks/p-0dca29cb.entry.js +0 -1
  301. package/dist/sankhyablocks/p-11081798.entry.js +0 -1
  302. package/dist/sankhyablocks/p-20726710.entry.js +0 -1
  303. package/dist/sankhyablocks/p-29804fc5.js +0 -60
  304. package/dist/sankhyablocks/p-32f0935f.js +0 -1
  305. package/dist/sankhyablocks/p-3520c088.entry.js +0 -1
  306. package/dist/sankhyablocks/p-374d03f6.js +0 -1
  307. package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
  308. package/dist/sankhyablocks/p-585294ee.js +0 -56
  309. package/dist/sankhyablocks/p-6977a26c.entry.js +0 -1
  310. package/dist/sankhyablocks/p-69efa80d.entry.js +0 -1
  311. package/dist/sankhyablocks/p-6d20d38c.entry.js +0 -1
  312. package/dist/sankhyablocks/p-776ee8e3.js +0 -1
  313. package/dist/sankhyablocks/p-7d51d949.entry.js +0 -11
  314. package/dist/sankhyablocks/p-809f367d.entry.js +0 -1
  315. package/dist/sankhyablocks/p-95a3778f.entry.js +0 -1
  316. package/dist/sankhyablocks/p-9695f78b.js +0 -1
  317. package/dist/sankhyablocks/p-98674137.entry.js +0 -1
  318. package/dist/sankhyablocks/p-a9e5b094.entry.js +0 -1
  319. package/dist/sankhyablocks/p-b146a9f0.entry.js +0 -1
  320. package/dist/sankhyablocks/p-bedb8ad6.entry.js +0 -1
  321. package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
  322. package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
  323. package/dist/sankhyablocks/p-ca4d337a.entry.js +0 -1
  324. package/dist/sankhyablocks/p-cb7419e0.entry.js +0 -1
  325. package/dist/sankhyablocks/p-d1f5bc50.js +0 -1
  326. package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
  327. package/dist/sankhyablocks/p-d6317851.entry.js +0 -1
  328. package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
  329. package/dist/sankhyablocks/p-e6380c60.js +0 -1
  330. package/dist/sankhyablocks/p-f2056f66.entry.js +0 -1
  331. package/dist/sankhyablocks/p-f514913b.entry.js +0 -1
  332. package/dist/sankhyablocks/p-fd8814b9.entry.js +0 -1
  333. package/dist/sankhyablocks/p-ff6064e7.js +0 -1
  334. package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
  335. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +0 -3
  336. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
  337. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
  338. /package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
  339. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
  340. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
  341. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
  342. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
  343. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
  344. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
  345. /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
  346. /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
  347. /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
  348. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
  349. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
  350. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
  351. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
  352. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
  353. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -4,20 +4,22 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const DataFetcher = require('./DataFetcher-ba94ed5b.js');
7
+ const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
8
8
  const ParamType = require('./ParamType-90b440a0.js');
9
- require('./pesquisa-fetcher-ef050a47.js');
9
+ require('./pesquisa-fetcher-cbdaba63.js');
10
10
  require('./index-0922807b.js');
11
- require('./ISave-d68ce3cd.js');
11
+ require('./ISave-e91b70a7.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
- require('./dataunit-fetcher-bd4c52da.js');
15
- require('./PreloadManager-84466da6.js');
16
14
  require('./filter-item-type.enum-a7ffdaa6.js');
17
- require('./form-config-fetcher-df043d3d.js');
18
15
  const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
16
+ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
17
+ const CheckMode = require('@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode');
18
+ const ConfigStorage = require('./ConfigStorage-7df9d3bb.js');
19
+ const constants = require('./constants-35ddd366.js');
19
20
  require('./PrintUtils-bcaeb82f.js');
20
21
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
22
+ require('@sankhyalabs/core/dist/utils/SortingUtils');
21
23
 
22
24
  const SERVICE_ACTION_EXECUTE_JAVA = 'ActionButtonsSP.executeJava';
23
25
  class JavaExecutor {
@@ -37,7 +39,7 @@ class JavaExecutor {
37
39
  javaCall: execSource
38
40
  }
39
41
  };
40
- await DataFetcher.DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_JAVA, JSON.stringify(request));
42
+ await formConfigFetcher.DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_JAVA, JSON.stringify(request));
41
43
  }
42
44
  }
43
45
 
@@ -57,7 +59,7 @@ class JavascriptExecutor {
57
59
  const request = {
58
60
  runScript: execSource
59
61
  };
60
- await DataFetcher.DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_SCRIPT, request);
62
+ await formConfigFetcher.DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_SCRIPT, request);
61
63
  }
62
64
  }
63
65
 
@@ -125,7 +127,7 @@ class ProcedureExecutor {
125
127
  stpCall: execSource
126
128
  }
127
129
  };
128
- await DataFetcher.DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_STP, JSON.stringify(request));
130
+ await formConfigFetcher.DataFetcher.get().callServiceBroker(SERVICE_ACTION_EXECUTE_STP, JSON.stringify(request));
129
131
  }
130
132
  }
131
133
 
@@ -403,7 +405,7 @@ class Actions {
403
405
  tipo: 'T'
404
406
  }
405
407
  };
406
- DataFetcher.DataFetcher.get().callServiceBroker(SERVICE_GET_CONFIGURATIONS, config)
408
+ formConfigFetcher.DataFetcher.get().callServiceBroker(SERVICE_GET_CONFIGURATIONS, config)
407
409
  .then((result) => {
408
410
  var _a, _b;
409
411
  let lastParams;
@@ -621,7 +623,7 @@ const SnkActionsButton = class {
621
623
  resourceID: this._resourceID
622
624
  }
623
625
  };
624
- return DataFetcher.DataFetcher.get().callServiceBroker('ActionButtonsSP.getActions', param).then((result) => {
626
+ return formConfigFetcher.DataFetcher.get().callServiceBroker('ActionButtonsSP.getActions', param).then((result) => {
625
627
  var _a;
626
628
  if (!((_a = result.actions) === null || _a === void 0 ? void 0 : _a.action))
627
629
  return;
@@ -717,6 +719,516 @@ const SnkActionsButton = class {
717
719
  };
718
720
  SnkActionsButton.style = snkActionsButtonCss;
719
721
 
722
+ const snkGridConfigCss = ".sc-snk-grid-config-h{--snk-grid-config__footer--padding-top:var(--space--medium, 12px);--snk-grid-config__main--padding-right:var(--space--medium, 12px);--snk-grid-config__tabselector-container--padding:var(--space--medium, 12px);--snk-grid-config__button-close--padding-left:var(--space--medium, 12px);--snk-grid-config__title--color:var(--title--primary, #2B3A54);--snk-grid-config__title--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__title--font-size:var(--title--large, 20px);--snk-grid-config__title--font-weight:var(--text-weight--extra-large, 700);--snk-grid-config__subtitle--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__subtitle--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__group--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-weight:var(--text-weight--large, 600);--snk-grid-config__group--padding-bottom:var(--space-small, 6px);--snk-grid-config__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-grid-config__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-grid-config__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-grid-config__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-grid-config__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-grid-config__scrollbar--width:var(--space--medium, 12px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}@media screen and (min-width: 480px){.sc-snk-grid-config-h{width:359px;max-width:359px}}.padding-right--medium.sc-snk-grid-config{padding-right:var(--space--medium)}ez-list.sc-snk-grid-config{height:100%}.height-calc.sc-snk-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-snk-grid-config{display:flex;justify-content:flex-end;width:100%;padding-top:var(--snk-grid-config__footer--padding-top)}.hidden.sc-snk-grid-config{display:none}.tabselector-container.sc-snk-grid-config{padding:var(--snk-grid-config__tabselector-container--padding) 0}.button-close.sc-snk-grid-config{padding-left:var(--snk-grid-config__button-close--padding-left)}.title-container.sc-snk-grid-config{display:flex;justify-content:space-between;align-items:center;width:100%}.title.sc-snk-grid-config{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-grid-config__title--color);font-size:var(--snk-grid-config__title--font-size);font-family:var(--snk-grid-config__title--font-family);font-weight:var(--snk-grid-config__title--font-weight)}.subtitle.sc-snk-grid-config{color:var(--text--primary);font-size:var(--snk-grid-config__subtitle--font-size);font-family:var(--snk-grid-config__subtitle--font-family)}.grid-config__main.sc-snk-grid-config{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-grid-config__scrollbar--color-clicked) var(--snk-grid-config__scrollbar--color-background);padding-right:var(--snk-grid-config__main--padding-right)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar{width:var(--snk-grid-config__scrollbar--width);max-width:var(--snk-grid-config__scrollbar--width);min-width:var(--snk-grid-config__scrollbar--width);background-color:var(--snk-grid-config__scrollbar--color-background)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-track{background-color:var(--snk-grid-config__scrollbar--color-background);border-radius:var(--snk-grid-config__scrollbar--border-radius)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb{background-color:var(--snk-grid-config__scrollbar--color-default);border-radius:var(--snk-grid-config__scrollbar--border-radius)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:vertical:hover,.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-grid-config__scrollbar--color-hover)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:vertical:active,.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-grid-config__scrollbar--color-clicked)}.group-name.sc-snk-grid-config{font-family:var(--snk-grid-config__group--font-family);font-size:var(--snk-grid-config__group--font-size);font-weight:var(--snk-grid-config__group--font-weight);padding-bottom:var(--snk-grid-config__group--padding-bottom)}";
723
+
724
+ const SnkGridConfig = class {
725
+ constructor(hostRef) {
726
+ index.registerInstance(this, hostRef);
727
+ this.configChange = index.createEvent(this, "configChange", 7);
728
+ this.configCancel = index.createEvent(this, "configCancel", 7);
729
+ this._orderListItems = [];
730
+ this._orderPriorityList = [];
731
+ this._columListItems = [];
732
+ this._selectedIndex = -1;
733
+ this._dataChanged = false;
734
+ this._componenteInternalKey = Date.now();
735
+ this.selectedIndex = 0;
736
+ this.columns = undefined;
737
+ this.config = undefined;
738
+ this.configName = undefined;
739
+ this.resourceID = undefined;
740
+ }
741
+ /* Creation Methods */
742
+ /**
743
+ * Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
744
+ * através de um pequeno modulo na estrutura da aplicação:
745
+ * - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
746
+ * Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-grid.msg.ts"
747
+ */
748
+ getMessage(key, params) {
749
+ const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
750
+ return application.messagesBuilder.getMessage(key, params);
751
+ }
752
+ getSortableColumns() {
753
+ let newList = [];
754
+ this.columns.filter(col => { var _a; return core.StringUtils.getBooleanValue((_a = col === null || col === void 0 ? void 0 : col.props) === null || _a === void 0 ? void 0 : _a.get("sortable"), true); }).forEach((column) => {
755
+ var _a;
756
+ let configItem = (_a = this.config) === null || _a === void 0 ? void 0 : _a.columns.find((item) => item.name === column.name);
757
+ let item = { name: column.name, label: column.label };
758
+ if (configItem) {
759
+ item['orderIndex'] = configItem.orderIndex;
760
+ item['ascending'] = configItem.ascending;
761
+ }
762
+ if (!column.hidden) {
763
+ newList.push(item);
764
+ }
765
+ });
766
+ return newList;
767
+ }
768
+ createOrderList() {
769
+ let newSortableList = this.getSortableColumns();
770
+ newSortableList.sort((a, b) => {
771
+ //OS dois tem order index 0 e pelo menos um deles tem orientação de ordenação.
772
+ if (a.orderIndex == 0 && b.orderIndex == 0 && (a.ascending != undefined || b.ascending != undefined)) {
773
+ if (a.ascending != undefined)
774
+ return -1;
775
+ if (b.ascending != undefined)
776
+ return 1;
777
+ return 0;
778
+ //Pelo menos um deles tem order index diferente de 0 e os dois tem orientação de ordenação.
779
+ }
780
+ else if (a.ascending != undefined && b.ascending != undefined) {
781
+ return (a.orderIndex - b.orderIndex);
782
+ //Pelo menos um deles tem order index diferente de 0 e pelo menos um deles tem orientação de ordenação.
783
+ }
784
+ else if (a.ascending != undefined || b.ascending != undefined) {
785
+ if (a.ascending != undefined)
786
+ return -1;
787
+ if (b.ascending != undefined)
788
+ return 1;
789
+ return 0;
790
+ }
791
+ return (a.orderIndex - b.orderIndex);
792
+ });
793
+ this._orderListItems = newSortableList;
794
+ }
795
+ createColumnList() {
796
+ let visibleGroup = {
797
+ group: this.getMessage("snkGridConfig.group.visible"),
798
+ items: [],
799
+ };
800
+ let hiddenGroup = {
801
+ group: this.getMessage("snkGridConfig.group.hidden"),
802
+ items: [],
803
+ sort: constants.ORDER_VALUES.asc.value
804
+ };
805
+ this.columns.forEach((column) => {
806
+ let item = { label: column.label };
807
+ if (column.hidden) {
808
+ hiddenGroup.items.push(item);
809
+ }
810
+ else {
811
+ visibleGroup.items.push(item);
812
+ }
813
+ });
814
+ this._columListItems = [visibleGroup, hiddenGroup];
815
+ }
816
+ createColumnListSlotDataElementId(item) {
817
+ return `configItem_${core.StringUtils.replaceAccentuatedChars(core.StringUtils.toCamelCase(item.label))}`;
818
+ }
819
+ buildColumnListSlot(item, group) {
820
+ const dataElementId = this.createColumnListSlotDataElementId(item);
821
+ return (index.h("div", null, index.h("ez-check", { mode: CheckMode.CheckMode.SWITCH, id: CheckMode.CheckMode.SWITCH + ((item === null || item === void 0 ? void 0 : item.label) || '') + ((group === null || group === void 0 ? void 0 : group.group) || ''), value: group.group === this.getMessage("snkGridConfig.group.visible"), "data-element-id": dataElementId, onEzChange: (evt) => { this.switchColumnGroup(evt, item); } })));
822
+ }
823
+ createOrderListSlotDataElementId(item) {
824
+ return `${this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME)}_configItem_${core.StringUtils.toCamelCase(item.label)}`;
825
+ }
826
+ buildOrderListSlot(item) {
827
+ const dataElementId = this.createOrderListSlotDataElementId(item);
828
+ let selectedOption = constants.ORDER_VALUES.none.value;
829
+ if ((item === null || item === void 0 ? void 0 : item.ascending) != undefined) {
830
+ selectedOption = item.ascending == true ? constants.ORDER_VALUES.asc.value : constants.ORDER_VALUES.desc.value;
831
+ }
832
+ return (index.h("div", null, index.h("snk-select-box", { selectedOption: selectedOption, key: 'snk-select-box-' + this._componenteInternalKey + '-' + item, "data-element-id": dataElementId, onEzChange: (evt) => { evt.stopPropagation(); this.updateOrder(evt.detail, item.label); } })));
833
+ }
834
+ updateOrder(sortOrder, updatedItemLabel) {
835
+ var _a;
836
+ this._dataChanged = true;
837
+ let newList = [...this.columns];
838
+ let newItem = newList.find((item) => item.label === updatedItemLabel);
839
+ if (newItem) {
840
+ newItem.sort = sortOrder.value === constants.ORDER_VALUES.none.value ? undefined : sortOrder.value;
841
+ }
842
+ let orderArray;
843
+ if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
844
+ this._orderPriorityList.find((item) => item.label === newItem.label).sort = sortOrder;
845
+ this._orderPriorityList.filter((item) => item.sort).forEach((item, index) => {
846
+ if (item.label === newItem.label) {
847
+ newItem.sortIndex = index;
848
+ }
849
+ });
850
+ }
851
+ else {
852
+ orderArray = newList.filter((item) => item.sort && item.hidden !== true)
853
+ .map((item, index) => {
854
+ return { label: item.label, orderIndex: index };
855
+ });
856
+ orderArray.forEach((element) => {
857
+ newList.find((item) => item.label === element.label).sortIndex = element.orderIndex;
858
+ });
859
+ }
860
+ this.columns = newList;
861
+ }
862
+ /* Actions Methods */
863
+ switchColumnGroup(evt, switchedItem) {
864
+ evt.stopPropagation();
865
+ let newList = [...this._columListItems];
866
+ this._dataChanged = true;
867
+ if (evt.detail === true) {
868
+ let hiddenGroup = newList.find((group) => group.group === this.getMessage("snkGridConfig.group.hidden"));
869
+ let index = hiddenGroup.items.findIndex((item) => item.label === switchedItem.label);
870
+ if (index >= 0) {
871
+ hiddenGroup.items.splice(index, 1);
872
+ }
873
+ let visibleGroup = newList.find((group) => group.group === this.getMessage("snkGridConfig.group.visible"));
874
+ visibleGroup.items.push(switchedItem);
875
+ this._columListItems = newList;
876
+ this.createOrderList();
877
+ }
878
+ else if (evt.detail === false) {
879
+ let visibleGroup = newList.find((group) => group.group === this.getMessage("snkGridConfig.group.visible"));
880
+ let index = visibleGroup.items.findIndex((item) => item.label === switchedItem.label);
881
+ if (index >= 0) {
882
+ visibleGroup.items.splice(index, 1);
883
+ }
884
+ let hiddenGroup = newList.find((group) => group.group === this.getMessage("snkGridConfig.group.hidden"));
885
+ hiddenGroup.items.push(switchedItem);
886
+ this._columListItems = newList;
887
+ this.createOrderList();
888
+ }
889
+ }
890
+ finish() {
891
+ if (!this._dataChanged) {
892
+ this.closeConfig();
893
+ return;
894
+ }
895
+ let newColumnList = [];
896
+ this._columListItems.forEach((group) => {
897
+ group.items.forEach((item) => {
898
+ const baseColumn = this.columns.find((column) => column.label === item.label);
899
+ let newColumnItem = Object.assign({}, baseColumn);
900
+ if (group.group === this.getMessage("snkGridConfig.group.hidden")) {
901
+ newColumnItem.hidden = true;
902
+ }
903
+ else {
904
+ newColumnItem.hidden = false;
905
+ }
906
+ newColumnList.push(newColumnItem);
907
+ });
908
+ });
909
+ this.columns = newColumnList;
910
+ this._dataChanged = false;
911
+ this.closeConfig();
912
+ this.save();
913
+ }
914
+ saveGridConfigOnStorage(_newConfig) {
915
+ ConfigStorage.ConfigStorage.saveGridConfig(_newConfig, this.configName, this.resourceID)
916
+ .then((savedConfig) => {
917
+ this.configChange.emit(savedConfig);
918
+ this._orderList.clearHistory();
919
+ utils.ApplicationUtils.info(this.getMessage("snkGridConfig.info.successfullyConfigSaved"), { iconName: "check" });
920
+ });
921
+ }
922
+ reOrderPriorityColumns(columns, orderPriorityList) {
923
+ let orderArray = [];
924
+ orderArray = columns.filter((item) => item.sort && item.hidden !== true)
925
+ .map((item) => {
926
+ return { label: item.label, orderIndex: 0 };
927
+ });
928
+ let indexCount = 0;
929
+ let newOrderArray = [];
930
+ orderPriorityList.forEach((orderPriorityItem) => {
931
+ let item = orderArray.find((column) => column.label === orderPriorityItem.label);
932
+ if (item) {
933
+ item.orderIndex = indexCount;
934
+ newOrderArray.push(item);
935
+ indexCount++;
936
+ }
937
+ });
938
+ if (newOrderArray.length > 0) {
939
+ orderArray = newOrderArray;
940
+ }
941
+ return orderArray;
942
+ }
943
+ save() {
944
+ var _a;
945
+ let _newConfig;
946
+ if (this.config) {
947
+ _newConfig = this.config;
948
+ }
949
+ else {
950
+ _newConfig = this.createConfigFromState(this.columns);
951
+ }
952
+ let _newColumnConfigList = [];
953
+ let orderArray;
954
+ if (((_a = this._orderPriorityList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
955
+ orderArray = this.reOrderPriorityColumns(this.columns, this._orderPriorityList);
956
+ }
957
+ this.columns.forEach((column) => {
958
+ let _newColumnConfig = _newConfig.columns.find((_newColumnConfig) => column.name === _newColumnConfig.name);
959
+ if (column.hidden === true && _newColumnConfig)
960
+ return;
961
+ if (_newColumnConfig) {
962
+ _newColumnConfig.width = column.width;
963
+ }
964
+ else if (column.hidden === false) {
965
+ _newColumnConfig = { name: column.name, width: column.width, orderIndex: 0 };
966
+ }
967
+ if (_newColumnConfig) {
968
+ if (column.sort) {
969
+ _newColumnConfig.ascending = column.sort.toUpperCase() === constants.ORDER_VALUES.asc.value ? true : false;
970
+ if (orderArray) {
971
+ adjustPriorityOrder(column, _newColumnConfig);
972
+ }
973
+ else {
974
+ _newColumnConfig.orderIndex = column.sortIndex;
975
+ }
976
+ }
977
+ else {
978
+ delete _newColumnConfig.ascending;
979
+ _newColumnConfig.orderIndex = 0;
980
+ }
981
+ _newColumnConfigList.push(_newColumnConfig);
982
+ }
983
+ });
984
+ _newConfig.columns = _newColumnConfigList;
985
+ this.saveGridConfigOnStorage(_newConfig);
986
+ function adjustPriorityOrder(column, _newColumnConfig) {
987
+ if (orderArray) {
988
+ let orderItem = orderArray.find((item) => item.label === column.label);
989
+ if (orderItem) {
990
+ _newColumnConfig.orderIndex = orderItem.orderIndex;
991
+ }
992
+ }
993
+ }
994
+ }
995
+ createConfigFromState(state) {
996
+ let newConfig = { columns: [] };
997
+ state.forEach((columnState) => {
998
+ if (!columnState.hidden) {
999
+ let newConfigColumn = { name: columnState.name };
1000
+ if (columnState.width) {
1001
+ newConfigColumn['width'] = columnState.width;
1002
+ }
1003
+ if (columnState.sort) {
1004
+ newConfigColumn['ascending'] = (columnState.sort.toUpperCase() === constants.ORDER_VALUES.asc.value);
1005
+ newConfigColumn['orderIndex'] = columnState.sortIndex;
1006
+ }
1007
+ else {
1008
+ newConfigColumn['orderIndex'] = 0;
1009
+ }
1010
+ if (newConfigColumn) {
1011
+ newConfig.columns.push(newConfigColumn);
1012
+ }
1013
+ }
1014
+ });
1015
+ return newConfig;
1016
+ }
1017
+ async locateColumn(evt, searchingText) {
1018
+ var _a;
1019
+ const hitEnter = evt.key === "Enter";
1020
+ searchingText = searchingText || ((_a = evt.currentTarget) === null || _a === void 0 ? void 0 : _a.value);
1021
+ if (!searchingText) {
1022
+ this.removeSelection();
1023
+ return;
1024
+ }
1025
+ const matchedIndexes = await this.getMatchedIndexes(searchingText);
1026
+ const newSelected = this.getNewSelectedIndex(matchedIndexes, hitEnter);
1027
+ this._selectedIndex = newSelected;
1028
+ if (this.selectedIndex === 1) {
1029
+ this.updateOrderListSelection(newSelected);
1030
+ }
1031
+ else {
1032
+ this.updateColumnListSelection(newSelected);
1033
+ }
1034
+ }
1035
+ async getMatchedIndexes(searchingText) {
1036
+ const matchedIndexes = [];
1037
+ if (this.selectedIndex === 1) {
1038
+ const orderListDatasource = await this._orderList.getList();
1039
+ orderListDatasource.forEach((column, index) => {
1040
+ if (this.compareWords(column, searchingText)) {
1041
+ matchedIndexes.push(index);
1042
+ }
1043
+ });
1044
+ }
1045
+ else {
1046
+ this.columns.forEach((column, index) => {
1047
+ if (this.compareWords(column, searchingText)) {
1048
+ matchedIndexes.push(index);
1049
+ }
1050
+ });
1051
+ }
1052
+ return matchedIndexes;
1053
+ }
1054
+ getNewSelectedIndex(matchedIndexes, hitEnter) {
1055
+ if (matchedIndexes.length === 0)
1056
+ return -1;
1057
+ if (hitEnter) {
1058
+ for (const index of matchedIndexes) {
1059
+ if (index > this._selectedIndex) {
1060
+ return index;
1061
+ }
1062
+ }
1063
+ }
1064
+ return matchedIndexes[0];
1065
+ }
1066
+ updateOrderListSelection(newSelected) {
1067
+ if (newSelected === -1) {
1068
+ this._orderList.removeSelection();
1069
+ return;
1070
+ }
1071
+ this._orderList.getList().then((orderListDatasource) => {
1072
+ const selectedColumn = orderListDatasource[newSelected];
1073
+ if (selectedColumn) {
1074
+ this._orderList.setSelection(selectedColumn, true);
1075
+ }
1076
+ else {
1077
+ this._orderList.removeSelection();
1078
+ }
1079
+ });
1080
+ }
1081
+ updateColumnListSelection(newSelected) {
1082
+ if (newSelected === -1) {
1083
+ this._columnList.removeSelection();
1084
+ return;
1085
+ }
1086
+ const selectedColumn = this.columns[newSelected];
1087
+ if (selectedColumn) {
1088
+ const listItem = this._columListItems
1089
+ .map(group => group.items)
1090
+ .flat()
1091
+ .find(item => item.label === selectedColumn.label);
1092
+ if (listItem) {
1093
+ this._columnList.setSelection(listItem, true);
1094
+ }
1095
+ else {
1096
+ this._columnList.removeSelection();
1097
+ }
1098
+ }
1099
+ else {
1100
+ this._columnList.removeSelection();
1101
+ }
1102
+ }
1103
+ removeSelection() {
1104
+ if (this.selectedIndex === 1) {
1105
+ this._orderList.removeSelection();
1106
+ }
1107
+ else {
1108
+ this._columnList.removeSelection();
1109
+ }
1110
+ }
1111
+ compareWords(column, searchingText) {
1112
+ var _a, _b;
1113
+ const columnLabel = (_a = core.StringUtils.replaceAccentuatedChars(column === null || column === void 0 ? void 0 : column.label)) === null || _a === void 0 ? void 0 : _a.toUpperCase();
1114
+ const argument = (_b = core.StringUtils.replaceAccentuatedChars(searchingText)) === null || _b === void 0 ? void 0 : _b.toUpperCase();
1115
+ if (core.StringUtils.isEmpty(columnLabel) || core.StringUtils.isEmpty(argument)) {
1116
+ return false;
1117
+ }
1118
+ return columnLabel.includes(argument);
1119
+ }
1120
+ getColumnNames() {
1121
+ const listNames = [];
1122
+ listNames.push(this.getMessage("snkGridConfig.tab.columns"));
1123
+ listNames.push(this.getMessage("snkGridConfig.tab.lineOrdering"));
1124
+ return listNames.join(',');
1125
+ }
1126
+ closeConfig() {
1127
+ this._orderList.scrollToTop();
1128
+ this._columnList.scrollToTop();
1129
+ this._searchElement.value = "";
1130
+ if (this._dataChanged) {
1131
+ let options = {
1132
+ canClose: false,
1133
+ labelCancel: this.getMessage("snkGridConfig.confirm.cancel"),
1134
+ labelConfirm: this.getMessage("snkGridConfig.confirm.save"),
1135
+ btnConfirmDanger: false
1136
+ };
1137
+ utils.ApplicationUtils.confirm(this.getMessage("snkGridConfig.confirm.alert"), this.getMessage("snkGridConfig.confirm.msgCancel"), null, utils.DialogType.WARN, options)
1138
+ .then((response) => {
1139
+ if (!response) {
1140
+ this._dataChanged = false;
1141
+ this.configCancel.emit();
1142
+ this._orderList.clearHistory();
1143
+ this._componenteInternalKey = Date.now();
1144
+ }
1145
+ else {
1146
+ this.finish();
1147
+ }
1148
+ });
1149
+ }
1150
+ else {
1151
+ this.configCancel.emit();
1152
+ this._orderList.clearHistory();
1153
+ }
1154
+ }
1155
+ /* Handlers */
1156
+ handleTabChange(tab) {
1157
+ if ((tab === null || tab === void 0 ? void 0 : tab.index) != undefined) {
1158
+ if (this.selectedIndex !== tab.index) {
1159
+ if (tab.index === 0) {
1160
+ this._orderList.scrollToTop();
1161
+ }
1162
+ else if (tab.index === 1) {
1163
+ this._columnList.scrollToTop();
1164
+ }
1165
+ this._searchElement.value = "";
1166
+ }
1167
+ if (tab.index === 1) {
1168
+ this.createOrderList();
1169
+ }
1170
+ this.selectedIndex = tab.index;
1171
+ }
1172
+ }
1173
+ handleColumnListChange(evt) {
1174
+ var _a;
1175
+ if (evt.detail) {
1176
+ let visibleItems = (_a = evt.detail.find((group) => group.group === this.getMessage("snkGridConfig.group.visible"))) === null || _a === void 0 ? void 0 : _a.items;
1177
+ if (visibleItems) {
1178
+ this._dataChanged = true;
1179
+ this._orderListItems = visibleItems;
1180
+ }
1181
+ }
1182
+ }
1183
+ handleOrderListChange(evt) {
1184
+ if (evt.detail) {
1185
+ let orderPriorityList = evt.detail;
1186
+ if (orderPriorityList) {
1187
+ this._dataChanged = true;
1188
+ this._orderPriorityList = orderPriorityList;
1189
+ }
1190
+ }
1191
+ }
1192
+ componentWillRender() {
1193
+ var _a;
1194
+ if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
1195
+ this.createColumnList();
1196
+ }
1197
+ }
1198
+ componentDidRender() {
1199
+ var _a;
1200
+ if (((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
1201
+ this.locateColumn(new KeyboardEvent("arrow-right", { key: "ArrowRight" }), this._searchElement.value);
1202
+ }
1203
+ }
1204
+ componentDidLoad() {
1205
+ core.ElementIDUtils.addIDInfo(this._element);
1206
+ }
1207
+ render() {
1208
+ return (index.h(index.Host, null, index.h("div", { class: "grid-config__header" }, index.h("div", { class: "title-container" }, index.h("div", { class: "" }, index.h("label", { class: "title" }, this.getMessage("snkGridConfig.gridConfiguration")), index.h("label", { class: "subtitle" }, this.getMessage("snkGridConfig.columnVisibilityOrder"))), index.h("div", { class: "button-close" }, index.h("ez-button", { mode: 'icon', iconName: "close", size: 'medium', onClick: () => this.closeConfig() }))), index.h("div", { class: "tabselector-container" }, index.h("ez-tabselector", { selectedIndex: this.selectedIndex, onEzChange: (evt) => { this.handleTabChange(evt.detail); }, tabs: this.getColumnNames() })), index.h("div", null, index.h("ez-text-input", { "data-element-id": "searchColums", ref: (el) => this._searchElement = el, label: this.getMessage("snkGridConfig.findColumn"), onKeyUp: (evt) => this.locateColumn(evt) }, index.h("ez-icon", { slot: "leftIcon", size: "medium", iconName: "search" })))), index.h("div", { class: "grid-config__main" }, index.h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedIndex === 0 ? "" : "hidden", dataSource: this._columListItems, onEzChange: (evt) => this.handleColumnListChange(evt), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true, "data-element-id": "configCols" }), index.h("div", { class: this.selectedIndex === 1 ? "group-name" : "hidden" }, this.getMessage("snkGridConfig.info.sortingSequence")), index.h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedIndex === 1 ? "height-calc" : "hidden", dataSource: this._orderListItems, ezSelectable: true, onEzChange: (evt) => this.handleOrderListChange(evt), ezDraggable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item), "data-element-id": "configDataOrder" })), index.h("div", { class: "grid-config__footer" }, index.h("ez-button", { class: "padding-right--medium", label: this.getMessage("snkGridConfig.cancel"), onClick: () => this.closeConfig() }), index.h("ez-button", { label: this.getMessage("snkGridConfig.complete"), class: "ez-button--primary", onClick: () => this.finish() }))));
1209
+ }
1210
+ static get assetsDirs() { return ["../assets"]; }
1211
+ get _element() { return index.getElement(this); }
1212
+ };
1213
+ SnkGridConfig.style = snkGridConfigCss;
1214
+
1215
+ const snkSelectBoxCss = "ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";
1216
+
1217
+ const SelectBox = class {
1218
+ constructor(hostRef) {
1219
+ index.registerInstance(this, hostRef);
1220
+ this.ezChange = index.createEvent(this, "ezChange", 7);
1221
+ this.selectedOption = constants.ORDER_VALUES.none;
1222
+ }
1223
+ render() {
1224
+ return (index.h("ez-combo-box", { class: "grid-config-combo ez-input--inverted", label: "", suppressSearch: true, value: this.selectedOption, enabled: true, canShowError: false, suppressEmptyOption: true }, Object.keys(constants.ORDER_VALUES).map((key) => {
1225
+ return index.h("option", { value: constants.ORDER_VALUES[key].value }, constants.ORDER_VALUES[key].label);
1226
+ })));
1227
+ }
1228
+ static get assetsDirs() { return ["../assets"]; }
1229
+ };
1230
+ SelectBox.style = snkSelectBoxCss;
1231
+
720
1232
  const taskbarActionsButtonCss = ".sc-taskbar-actions-button-h{display:flex;width:fit-content;height:fit-content}";
721
1233
 
722
1234
  const TaskbarActionsButton = class {
@@ -791,7 +1303,7 @@ const TaskbarActionsButton = class {
791
1303
  }
792
1304
  }
793
1305
  getSelectedAction(id, actions) {
794
- let selectedItem;
1306
+ let selectedItem = null;
795
1307
  for (const item of actions) {
796
1308
  if (item.id === id) {
797
1309
  selectedItem = item;
@@ -800,6 +1312,8 @@ const TaskbarActionsButton = class {
800
1312
  if (!(item === null || item === void 0 ? void 0 : item.children))
801
1313
  continue;
802
1314
  selectedItem = this.getSelectedAction(id, item.children);
1315
+ if (selectedItem)
1316
+ break;
803
1317
  }
804
1318
  return selectedItem;
805
1319
  }
@@ -840,11 +1354,13 @@ const TaskbarActionsButton = class {
840
1354
  this.taskbarActionsButtonDisconnected.emit();
841
1355
  }
842
1356
  render() {
843
- return (index.h(index.Host, null, index.h("div", { class: `ez-padding-left--medium ${this.canShowDropdown() ? ' ez-elevation--16' : ''}` }, index.h("ez-button", { title: this.title, mode: 'icon', iconName: 'dots-vertical', size: 'small', enabled: this.enabled, onClick: () => this.controlDropdown() }), this.canShowDropdown() && index.h("ez-dropdown", { items: this.loadItems(), onEzClick: (evt) => this.onSelectAction(evt.detail), onEzOutsideClick: () => this._showDropdown = false, itemBuilder: (item, level) => this.dropdownItemBuilder(item, level) }))));
1357
+ return (index.h(index.Host, null, index.h("div", { class: `${this.canShowDropdown() ? ' ez-elevation--16' : ''}` }, index.h("ez-button", { title: this.title, mode: 'icon', iconName: 'dots-vertical', size: 'small', enabled: this.enabled, onClick: () => this.controlDropdown() }), this.canShowDropdown() && index.h("ez-dropdown", { items: this.loadItems(), onEzClick: (evt) => this.onSelectAction(evt.detail), onEzOutsideClick: () => this._showDropdown = false, itemBuilder: (item, level) => this.dropdownItemBuilder(item, level) }))));
844
1358
  }
845
1359
  get _element() { return index.getElement(this); }
846
1360
  };
847
1361
  TaskbarActionsButton.style = taskbarActionsButtonCss;
848
1362
 
849
1363
  exports.snk_actions_button = SnkActionsButton;
1364
+ exports.snk_grid_config = SnkGridConfig;
1365
+ exports.snk_select_box = SelectBox;
850
1366
  exports.taskbar_actions_button = TaskbarActionsButton;