@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-11997.0 → 0.0.0-bugfix-dev-KB-99999.0

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 (407) hide show
  1. package/dist/cjs/{ConfigStorage-0e4275f5.js → ConfigStorage-8009ecb2.js} +20 -4
  2. package/dist/cjs/{DataFetcher-bd3d53a8.js → DataFetcher-ba94ed5b.js} +142 -102
  3. package/dist/cjs/{PersonalizedFilterUtils-1aeb625d.js → PersonalizedFilterUtils-0184ffbb.js} +11 -4
  4. package/dist/cjs/PreloadManager-84466da6.js +224 -0
  5. package/dist/cjs/{SnkFormConfigManager-5b485cd4.js → SnkFormConfigManager-7d850fbc.js} +23 -6
  6. package/dist/cjs/{SnkMessageBuilder-d0abb63d.js → SnkMessageBuilder-7293d0ad.js} +29 -8
  7. package/dist/cjs/{SnkMultiSelectionListDataSource-804ff4c7.js → SnkMultiSelectionListDataSource-ba5838c2.js} +15 -0
  8. package/dist/cjs/Sortable-fb1c4cbb.js +2853 -0
  9. package/dist/cjs/{auth-fetcher-1583fe43.js → auth-fetcher-c8467c07.js} +1 -1
  10. package/dist/cjs/{constants-d187e03e.js → constants-35ddd366.js} +4 -0
  11. package/dist/cjs/dataunit-fetcher-de65b9fc.js +725 -0
  12. package/dist/cjs/{taskbar-processor-bce3f499.js → field-search-f56aa7d6.js} +35 -0
  13. package/dist/cjs/{filter-item-type.enum-aa823a00.js → filter-item-type.enum-a7ffdaa6.js} +1 -0
  14. package/dist/cjs/filterNumberVariation-d65332da.js +7 -0
  15. package/dist/cjs/{form-config-fetcher-f6cb55e6.js → form-config-fetcher-df043d3d.js} +1 -1
  16. package/dist/cjs/{index-0e663819.js → index-0922807b.js} +1 -0
  17. package/dist/cjs/index-f9e81701.js +10 -6
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/cjs/{pesquisa-fetcher-3356b3df.js → pesquisa-fetcher-ef050a47.js} +1 -1
  20. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  21. package/dist/cjs/{snk-actions-button.cjs.entry.js → snk-actions-button_2.cjs.entry.js} +214 -91
  22. package/dist/cjs/snk-application.cjs.entry.js +474 -140
  23. package/dist/cjs/snk-attach.cjs.entry.js +27 -11
  24. package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
  25. package/dist/cjs/snk-configurator.cjs.entry.js +17 -2
  26. package/dist/cjs/snk-crud.cjs.entry.js +127 -17
  27. package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +20 -0
  28. package/dist/cjs/snk-data-exporter.cjs.entry.js +12 -11
  29. package/dist/cjs/{snk-data-unit-7cc1846d.js → snk-data-unit-1bc69073.js} +15 -5
  30. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  31. package/dist/cjs/snk-detail-view.cjs.entry.js +34 -14
  32. package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
  33. package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +2 -2
  34. package/dist/cjs/snk-filter-bar.cjs.entry.js +163 -17
  35. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
  36. package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +52 -0
  37. package/dist/cjs/snk-filter-detail.cjs.entry.js +9 -2
  38. package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +2 -2
  39. package/dist/cjs/snk-filter-item.cjs.entry.js +39 -15
  40. package/dist/cjs/snk-filter-list.cjs.entry.js +1 -1
  41. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +9 -9
  42. package/dist/cjs/snk-filter-modal.cjs.entry.js +38 -7
  43. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
  44. package/dist/cjs/snk-filter-number.cjs.entry.js +42 -3
  45. package/dist/cjs/snk-filter-period.cjs.entry.js +3 -3
  46. package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
  47. package/dist/cjs/snk-form-config.cjs.entry.js +16 -15
  48. package/dist/cjs/snk-form-view.cjs.entry.js +14 -0
  49. package/dist/cjs/snk-form.cjs.entry.js +6 -7
  50. package/dist/cjs/snk-grid-config.cjs.entry.js +6 -7
  51. package/dist/cjs/snk-grid.cjs.entry.js +131 -40
  52. package/dist/cjs/{snk-guides-viewer-5e22097d.js → snk-guides-viewer-7f9b6d94.js} +161 -22
  53. package/dist/cjs/snk-guides-viewer.cjs.entry.js +16 -13
  54. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
  55. package/dist/cjs/snk-personalized-filter.cjs.entry.js +24 -13
  56. package/dist/cjs/snk-select-box.cjs.entry.js +1 -1
  57. package/dist/cjs/snk-simple-crud.cjs.entry.js +127 -103
  58. package/dist/cjs/snk-tab-config.cjs.entry.js +12 -11
  59. package/dist/cjs/snk-taskbar.cjs.entry.js +3 -3
  60. package/dist/cjs/{taskbar-elements-39949c7a.js → taskbar-elements-01b85b99.js} +4 -4
  61. package/dist/collection/collection-manifest.json +3 -1
  62. package/dist/collection/components/snk-actions-button/actions/executor/java.executor.js +2 -2
  63. package/dist/collection/components/snk-actions-button/actions/executor/javascript.executor.js +2 -2
  64. package/dist/collection/components/snk-actions-button/actions/executor/procedure.executor.js +2 -2
  65. package/dist/collection/components/snk-actions-button/clientEvent/index.js +81 -76
  66. package/dist/collection/components/snk-actions-button/snk-actions-button.css +4 -11
  67. package/dist/collection/components/snk-actions-button/snk-actions-button.js +2 -2
  68. package/dist/collection/components/snk-application/snk-application.js +485 -84
  69. package/dist/collection/components/snk-attach/snk-attach.css +6 -0
  70. package/dist/collection/components/snk-attach/snk-attach.js +15 -3
  71. package/dist/collection/components/snk-attach/structure/data-unit-builder.js +4 -1
  72. package/dist/collection/components/snk-configurator/snk-configurator.js +33 -1
  73. package/dist/collection/components/snk-crud/snk-crud.js +136 -10
  74. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +21 -1
  75. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +45 -0
  76. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +178 -22
  77. package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.css +3 -0
  78. package/dist/collection/components/{snk-taskbar/snk-taskbar-custom-elements.js → snk-custom-slot-elements/snk-custom-slot-elements.js} +10 -10
  79. package/dist/collection/components/snk-data-exporter/snk-data-exporter.css +1 -9
  80. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
  81. package/dist/collection/components/snk-data-unit/snk-data-unit.js +15 -12
  82. package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +69 -2
  83. package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/filterNumberVariation.js +5 -0
  84. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +95 -0
  85. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +93 -8
  86. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +2 -2
  87. package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +1 -0
  88. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +7 -0
  89. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +38 -14
  90. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +1 -1
  91. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +87 -6
  92. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +4 -3
  93. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +5 -6
  94. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +218 -7
  95. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
  96. package/dist/collection/components/snk-form/SnkFormConfigManager.js +22 -5
  97. package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +10 -8
  98. package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +10 -8
  99. package/dist/collection/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.js +11 -0
  100. package/dist/collection/components/snk-grid/snk-grid.css +7 -2
  101. package/dist/collection/components/snk-grid/snk-grid.js +166 -39
  102. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +32 -6
  103. package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +13 -4
  104. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +8 -2
  105. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +115 -6
  106. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +6 -0
  107. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +310 -0
  108. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +3 -3
  109. package/dist/collection/components/snk-taskbar/snk-taskbar.css +0 -4
  110. package/dist/collection/components/snk-taskbar/snk-taskbar.js +1 -1
  111. package/dist/collection/components/snk-taskbar/subcomponents/field-search.js +31 -0
  112. package/dist/collection/lib/@types/index.js +1 -0
  113. package/dist/collection/lib/dataUnit/InMemoryLoader.js +74 -15
  114. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +61 -43
  115. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +118 -0
  116. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +80 -0
  117. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +139 -0
  118. package/dist/collection/lib/http/data-fetcher/fetchers/{dataunit-fetcher.js → data-unit/dataunit-fetcher.js} +49 -100
  119. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataResult.js +1 -0
  120. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataStrategy.js +1 -0
  121. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadingInfo.js +1 -0
  122. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRecordField.js +1 -0
  123. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IResponseRecord.js +1 -0
  124. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DataUnitStrategy.js +68 -0
  125. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +162 -0
  126. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +3 -2
  127. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher.js +3 -2
  128. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +14 -1
  129. package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +3 -0
  130. package/dist/collection/lib/index.js +1 -1
  131. package/dist/collection/lib/message/SnkMessageBuilder.js +9 -3
  132. package/dist/collection/lib/message/resources/snk-application.msg.js +9 -0
  133. package/dist/collection/lib/message/resources/snk-crud.msg.js +1 -0
  134. package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +5 -4
  135. package/dist/collection/lib/message/resources/snk-grid.msg.js +3 -1
  136. package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +4 -0
  137. package/dist/collection/lib/utils/constants.js +3 -0
  138. package/dist/collection/lib/utils/urlutils.js +10 -4
  139. package/dist/collection/lib/workspace/workspace.js +27 -0
  140. package/dist/components/ConfigStorage.js +17 -1
  141. package/dist/components/DataFetcher.js +101 -61
  142. package/dist/components/PersonalizedFilterUtils.js +10 -3
  143. package/dist/components/SnkFormConfigManager.js +22 -5
  144. package/dist/components/SnkMessageBuilder.js +29 -8
  145. package/dist/components/constants.js +4 -1
  146. package/dist/components/dataunit-fetcher.js +846 -100
  147. package/dist/components/{SnkMultiSelectionListDataSource.js → field-search.js} +44 -1
  148. package/dist/components/filter-item-type.enum.js +1 -0
  149. package/dist/components/filterNumberVariation.js +7 -0
  150. package/dist/components/index.d.ts +3 -1
  151. package/dist/components/index.js +3 -1
  152. package/dist/components/index2.js +1 -0
  153. package/dist/components/snk-actions-button2.js +91 -86
  154. package/dist/components/snk-application2.js +392 -55
  155. package/dist/components/snk-attach2.js +39 -19
  156. package/dist/components/snk-configurator2.js +18 -2
  157. package/dist/components/snk-crud.js +184 -70
  158. package/dist/components/snk-custom-slot-elements.d.ts +11 -0
  159. package/dist/components/snk-custom-slot-elements.js +35 -0
  160. package/dist/components/snk-data-exporter2.js +7 -5
  161. package/dist/components/snk-data-unit2.js +15 -5
  162. package/dist/components/snk-detail-view2.js +264 -96
  163. package/dist/components/snk-filter-bar2.js +164 -13
  164. package/dist/components/snk-filter-checkbox-list.d.ts +11 -0
  165. package/dist/components/snk-filter-checkbox-list.js +68 -0
  166. package/dist/components/snk-filter-detail2.js +7 -0
  167. package/dist/components/snk-filter-item2.js +38 -14
  168. package/dist/components/snk-filter-list.js +1 -1
  169. package/dist/components/snk-filter-modal-item2.js +4 -3
  170. package/dist/components/snk-filter-modal.js +40 -7
  171. package/dist/components/snk-filter-number.js +43 -2
  172. package/dist/components/snk-filter-period.js +2 -2
  173. package/dist/components/snk-form-config2.js +13 -11
  174. package/dist/components/snk-form-view2.js +15 -0
  175. package/dist/components/snk-grid2.js +166 -68
  176. package/dist/components/snk-personalized-filter2.js +18 -6
  177. package/dist/components/snk-simple-crud2.js +132 -104
  178. package/dist/components/snk-tab-config2.js +2203 -6233
  179. package/dist/components/snk-taskbar2.js +16 -10
  180. package/dist/components/taskbar-actions-button.d.ts +11 -0
  181. package/dist/components/taskbar-actions-button.js +6 -0
  182. package/dist/components/taskbar-actions-button2.js +140 -0
  183. package/dist/esm/{ConfigStorage-f359573c.js → ConfigStorage-1244b8b0.js} +20 -4
  184. package/dist/esm/{DataFetcher-8daff9ad.js → DataFetcher-aa159c5a.js} +101 -61
  185. package/dist/esm/{PersonalizedFilterUtils-75fb0106.js → PersonalizedFilterUtils-e2b38ef7.js} +11 -4
  186. package/dist/esm/PreloadManager-c1c2f2b4.js +222 -0
  187. package/dist/esm/{SnkFormConfigManager-35876bad.js → SnkFormConfigManager-9be0e7d4.js} +24 -7
  188. package/dist/esm/{SnkMessageBuilder-68c1c25a.js → SnkMessageBuilder-ca843d1b.js} +29 -8
  189. package/dist/esm/{SnkMultiSelectionListDataSource-892f37f9.js → SnkMultiSelectionListDataSource-44494b0e.js} +11 -0
  190. package/dist/esm/Sortable-83960219.js +2851 -0
  191. package/dist/esm/{auth-fetcher-299fed55.js → auth-fetcher-c05dc474.js} +1 -1
  192. package/dist/esm/{constants-3644f1b6.js → constants-8457af36.js} +4 -1
  193. package/dist/esm/dataunit-fetcher-e218c6d2.js +722 -0
  194. package/dist/esm/{taskbar-processor-94402e6e.js → field-search-efbe307f.js} +34 -1
  195. package/dist/esm/{filter-item-type.enum-5028ed3f.js → filter-item-type.enum-d45e026f.js} +1 -0
  196. package/dist/esm/filterNumberVariation-8cee02ea.js +7 -0
  197. package/dist/esm/{form-config-fetcher-8ef7be16.js → form-config-fetcher-36219cd3.js} +1 -1
  198. package/dist/esm/{index-1564817d.js → index-0ece87a6.js} +1 -0
  199. package/dist/esm/index-a7d3d3f1.js +10 -6
  200. package/dist/esm/loader.js +1 -1
  201. package/dist/{components/pesquisa-fetcher.js → esm/pesquisa-fetcher-dd3ca0a5.js} +1 -1
  202. package/dist/esm/sankhyablocks.js +1 -1
  203. package/dist/esm/{snk-actions-button.entry.js → snk-actions-button_2.entry.js} +215 -93
  204. package/dist/esm/snk-application.entry.js +475 -141
  205. package/dist/esm/snk-attach.entry.js +27 -11
  206. package/dist/esm/snk-config-options.entry.js +1 -1
  207. package/dist/esm/snk-configurator.entry.js +18 -3
  208. package/dist/esm/snk-crud.entry.js +128 -18
  209. package/dist/esm/snk-custom-slot-elements.entry.js +16 -0
  210. package/dist/esm/snk-data-exporter.entry.js +13 -12
  211. package/dist/esm/{snk-data-unit-1715d2f1.js → snk-data-unit-6208ebf0.js} +16 -6
  212. package/dist/esm/snk-data-unit.entry.js +2 -2
  213. package/dist/esm/snk-detail-view.entry.js +34 -14
  214. package/dist/esm/snk-field-config.entry.js +1 -1
  215. package/dist/esm/snk-filter-advanced-mode_2.entry.js +2 -2
  216. package/dist/esm/snk-filter-bar.entry.js +165 -19
  217. package/dist/esm/snk-filter-binary-select.entry.js +1 -1
  218. package/dist/esm/snk-filter-checkbox-list.entry.js +48 -0
  219. package/dist/esm/snk-filter-detail.entry.js +9 -2
  220. package/dist/esm/snk-filter-field-search_2.entry.js +2 -2
  221. package/dist/esm/snk-filter-item.entry.js +39 -15
  222. package/dist/esm/snk-filter-list.entry.js +1 -1
  223. package/dist/esm/snk-filter-modal-item.entry.js +9 -9
  224. package/dist/esm/snk-filter-modal.entry.js +38 -7
  225. package/dist/esm/snk-filter-multi-select.entry.js +1 -1
  226. package/dist/esm/snk-filter-number.entry.js +42 -3
  227. package/dist/esm/snk-filter-period.entry.js +3 -3
  228. package/dist/esm/snk-filter-search.entry.js +1 -1
  229. package/dist/esm/snk-form-config.entry.js +16 -15
  230. package/dist/esm/snk-form-view.entry.js +14 -0
  231. package/dist/esm/snk-form.entry.js +6 -7
  232. package/dist/esm/snk-grid-config.entry.js +6 -7
  233. package/dist/esm/snk-grid.entry.js +132 -41
  234. package/dist/esm/{snk-guides-viewer-b0e32a7d.js → snk-guides-viewer-9d5e073f.js} +161 -22
  235. package/dist/esm/snk-guides-viewer.entry.js +16 -13
  236. package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
  237. package/dist/esm/snk-personalized-filter.entry.js +24 -13
  238. package/dist/esm/snk-select-box.entry.js +1 -1
  239. package/dist/esm/snk-simple-crud.entry.js +126 -102
  240. package/dist/esm/snk-tab-config.entry.js +12 -11
  241. package/dist/esm/snk-taskbar.entry.js +3 -3
  242. package/dist/esm/{taskbar-elements-0a6b8b95.js → taskbar-elements-d4d0b424.js} +4 -4
  243. package/dist/sankhyablocks/p-01ba23cd.entry.js +1 -0
  244. package/dist/sankhyablocks/p-03dcc5ff.entry.js +1 -0
  245. package/dist/sankhyablocks/{p-5c1aacc7.js → p-057fad05.js} +1 -1
  246. package/dist/sankhyablocks/p-0874adb5.entry.js +1 -0
  247. package/dist/sankhyablocks/p-094c30cb.js +1 -0
  248. package/dist/sankhyablocks/p-0d084a0f.entry.js +1 -0
  249. package/dist/sankhyablocks/{p-c870b530.js → p-0d7863ed.js} +1 -1
  250. package/dist/sankhyablocks/p-11081798.entry.js +1 -0
  251. package/dist/sankhyablocks/p-143425c0.entry.js +1 -0
  252. package/dist/sankhyablocks/{p-cb37982f.entry.js → p-20726710.entry.js} +1 -1
  253. package/dist/sankhyablocks/p-32f0935f.js +1 -0
  254. package/dist/sankhyablocks/p-3520c088.entry.js +1 -0
  255. package/dist/sankhyablocks/p-374d03f6.js +1 -0
  256. package/dist/sankhyablocks/p-38289a55.js +1 -0
  257. package/dist/sankhyablocks/{p-25c5428f.entry.js → p-3ab6df3d.entry.js} +1 -1
  258. package/dist/sankhyablocks/p-3b60db06.entry.js +1 -0
  259. package/dist/sankhyablocks/{p-eb636e15.entry.js → p-41f8bfa3.entry.js} +1 -1
  260. package/dist/sankhyablocks/p-4775a293.entry.js +1 -0
  261. package/dist/sankhyablocks/p-4b0938f6.entry.js +1 -0
  262. package/dist/sankhyablocks/p-585294ee.js +56 -0
  263. package/dist/sankhyablocks/p-5f74c859.entry.js +1 -0
  264. package/dist/sankhyablocks/p-69754d94.entry.js +1 -0
  265. package/dist/sankhyablocks/p-6977a26c.entry.js +1 -0
  266. package/dist/sankhyablocks/{p-648a7c72.entry.js → p-69efa80d.entry.js} +1 -1
  267. package/dist/sankhyablocks/p-70589af8.entry.js +1 -0
  268. package/dist/sankhyablocks/p-776ee8e3.js +1 -0
  269. package/dist/sankhyablocks/{p-959e0835.entry.js → p-7e2ded86.entry.js} +1 -1
  270. package/dist/sankhyablocks/p-7f9d6b5d.entry.js +11 -0
  271. package/dist/sankhyablocks/{p-0885ed3c.entry.js → p-8002dcd0.entry.js} +1 -1
  272. package/dist/sankhyablocks/p-809f367d.entry.js +1 -0
  273. package/dist/sankhyablocks/p-8437508f.js +1 -0
  274. package/dist/sankhyablocks/p-8eb67fa4.entry.js +1 -0
  275. package/dist/sankhyablocks/{p-f30526a7.entry.js → p-95df461f.entry.js} +1 -1
  276. package/dist/sankhyablocks/p-9695f78b.js +1 -0
  277. package/dist/sankhyablocks/{p-838f8234.entry.js → p-98674137.entry.js} +1 -1
  278. package/dist/sankhyablocks/p-a87229cd.entry.js +1 -0
  279. package/dist/sankhyablocks/p-a9e5b094.entry.js +1 -0
  280. package/dist/sankhyablocks/p-aaa3ee68.entry.js +1 -0
  281. package/dist/sankhyablocks/p-b0ef4383.js +1 -0
  282. package/dist/sankhyablocks/p-ba627e85.js +60 -0
  283. package/dist/sankhyablocks/p-c22c1d8e.js +1 -0
  284. package/dist/sankhyablocks/p-c2495304.js +1 -0
  285. package/dist/sankhyablocks/{p-26ad62b9.entry.js → p-c758265f.entry.js} +1 -1
  286. package/dist/sankhyablocks/{p-fe49067d.entry.js → p-c8622597.entry.js} +1 -1
  287. package/dist/sankhyablocks/p-cb7419e0.entry.js +1 -0
  288. package/dist/sankhyablocks/p-d1007720.entry.js +1 -0
  289. package/dist/sankhyablocks/{p-a1e1b305.entry.js → p-d3f53df2.entry.js} +1 -1
  290. package/dist/sankhyablocks/p-d6317851.entry.js +1 -0
  291. package/dist/sankhyablocks/{p-b13cb8b5.js → p-d9bb09b3.js} +2 -2
  292. package/dist/sankhyablocks/p-e3132789.entry.js +1 -0
  293. package/dist/sankhyablocks/p-e6380c60.js +1 -0
  294. package/dist/sankhyablocks/p-f514913b.entry.js +1 -0
  295. package/dist/sankhyablocks/p-fa80e546.js +1 -0
  296. package/dist/sankhyablocks/p-fa816fb2.js +1 -0
  297. package/dist/sankhyablocks/p-fd8814b9.entry.js +1 -0
  298. package/dist/sankhyablocks/{p-584d7212.js → p-ff1990ad.js} +1 -1
  299. package/dist/sankhyablocks/p-ff6064e7.js +1 -0
  300. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  301. package/dist/types/components/snk-actions-button/clientEvent/index.d.ts +1 -1
  302. package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
  303. package/dist/types/components/snk-application/snk-application.d.ts +90 -15
  304. package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
  305. package/dist/types/components/snk-configurator/snk-configurator.d.ts +6 -0
  306. package/dist/types/components/snk-crud/snk-crud.d.ts +13 -0
  307. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +3 -0
  308. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +10 -1
  309. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +49 -12
  310. package/dist/types/components/snk-custom-slot-elements/snk-custom-slot-elements.d.ts +7 -0
  311. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +1 -0
  312. package/dist/types/components/snk-filter-bar/filter-item/editors/enum/filterNumberVariation.d.ts +4 -0
  313. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.d.ts +27 -0
  314. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +24 -2
  315. package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +2 -1
  316. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +2 -0
  317. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +15 -1
  318. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +30 -0
  319. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +5 -1
  320. package/dist/types/components/snk-form/SnkFormConfigManager.d.ts +6 -1
  321. package/dist/types/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.d.ts +2 -0
  322. package/dist/types/components/snk-grid/snk-grid.d.ts +20 -6
  323. package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +4 -1
  324. package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.d.ts +1 -1
  325. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +24 -2
  326. package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +59 -0
  327. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +18 -2
  328. package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +4 -0
  329. package/dist/types/components.d.ts +256 -32
  330. package/dist/types/lib/@types/index.d.ts +2 -1
  331. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +5 -1
  332. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +8 -4
  333. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +13 -0
  334. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +19 -0
  335. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +22 -0
  336. package/dist/types/lib/http/data-fetcher/fetchers/{dataunit-fetcher.d.ts → data-unit/dataunit-fetcher.d.ts} +5 -3
  337. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataResult.d.ts +6 -0
  338. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataStrategy.d.ts +7 -0
  339. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadingInfo.d.ts +10 -0
  340. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRecordField.d.ts +4 -0
  341. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IResponseRecord.d.ts +6 -0
  342. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DataUnitStrategy.d.ts +9 -0
  343. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +16 -0
  344. package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +1 -1
  345. package/dist/types/lib/index.d.ts +1 -1
  346. package/dist/types/lib/message/resources/snk-application.msg.d.ts +2 -0
  347. package/dist/types/lib/message/resources/snk-simple-crud.msg.d.ts +2 -0
  348. package/dist/types/lib/utils/constants.d.ts +3 -4
  349. package/dist/types/lib/workspace/workspace.d.ts +6 -0
  350. package/package.json +4 -4
  351. package/react/components.d.ts +3 -1
  352. package/react/components.js +3 -1
  353. package/react/components.js.map +1 -1
  354. package/dist/cjs/_commonjsHelpers-537d719a.js +0 -20
  355. package/dist/cjs/dataunit-fetcher-910be4ce.js +0 -356
  356. package/dist/cjs/draggable.bundle-82a25c06.js +0 -6886
  357. package/dist/cjs/snk-taskbar-custom-elements.cjs.entry.js +0 -20
  358. package/dist/collection/components/snk-data-unit/snk-data-unit.css +0 -6
  359. package/dist/components/_commonjsHelpers.js +0 -17
  360. package/dist/components/snk-taskbar-custom-elements.d.ts +0 -11
  361. package/dist/components/snk-taskbar-custom-elements.js +0 -35
  362. package/dist/esm/_commonjsHelpers-9943807e.js +0 -17
  363. package/dist/esm/dataunit-fetcher-bd8f9572.js +0 -354
  364. package/dist/esm/draggable.bundle-41d56f06.js +0 -6884
  365. package/dist/esm/pesquisa-fetcher-27819123.js +0 -165
  366. package/dist/esm/snk-taskbar-custom-elements.entry.js +0 -16
  367. package/dist/sankhyablocks/p-0df2ead8.entry.js +0 -11
  368. package/dist/sankhyablocks/p-112455b1.js +0 -1
  369. package/dist/sankhyablocks/p-324ce41e.entry.js +0 -1
  370. package/dist/sankhyablocks/p-34604220.entry.js +0 -1
  371. package/dist/sankhyablocks/p-4a78e118.js +0 -1
  372. package/dist/sankhyablocks/p-5534e08c.js +0 -1
  373. package/dist/sankhyablocks/p-5d04ae42.entry.js +0 -1
  374. package/dist/sankhyablocks/p-6a38bda5.entry.js +0 -1
  375. package/dist/sankhyablocks/p-7bcd2f89.js +0 -56
  376. package/dist/sankhyablocks/p-7bd5aea7.js +0 -1
  377. package/dist/sankhyablocks/p-8014cc25.entry.js +0 -1
  378. package/dist/sankhyablocks/p-928efcaa.entry.js +0 -1
  379. package/dist/sankhyablocks/p-989937ee.entry.js +0 -1
  380. package/dist/sankhyablocks/p-9a270401.entry.js +0 -1
  381. package/dist/sankhyablocks/p-a7ee0e6f.entry.js +0 -1
  382. package/dist/sankhyablocks/p-ac0556a3.js +0 -1
  383. package/dist/sankhyablocks/p-ae6aff81.js +0 -1
  384. package/dist/sankhyablocks/p-b244640b.js +0 -1
  385. package/dist/sankhyablocks/p-b6d6b172.js +0 -1
  386. package/dist/sankhyablocks/p-bba91710.entry.js +0 -1
  387. package/dist/sankhyablocks/p-bd628455.entry.js +0 -1
  388. package/dist/sankhyablocks/p-c2beb95c.js +0 -1
  389. package/dist/sankhyablocks/p-c555075c.entry.js +0 -1
  390. package/dist/sankhyablocks/p-c9841939.js +0 -1
  391. package/dist/sankhyablocks/p-d3ec3586.entry.js +0 -1
  392. package/dist/sankhyablocks/p-d708b4ab.entry.js +0 -1
  393. package/dist/sankhyablocks/p-d84bc5c1.js +0 -1
  394. package/dist/sankhyablocks/p-de76b8a8.js +0 -76
  395. package/dist/sankhyablocks/p-e19014a9.entry.js +0 -1
  396. package/dist/sankhyablocks/p-e1cb1f0b.js +0 -1
  397. package/dist/sankhyablocks/p-e3a82e1c.entry.js +0 -1
  398. package/dist/sankhyablocks/p-e9b53a9a.entry.js +0 -1
  399. package/dist/sankhyablocks/p-ebf8c5df.entry.js +0 -1
  400. package/dist/sankhyablocks/p-ed5f1204.entry.js +0 -1
  401. package/dist/sankhyablocks/p-f9395c20.entry.js +0 -1
  402. package/dist/sankhyablocks/p-f94b999e.entry.js +0 -1
  403. package/dist/sankhyablocks/p-fa9d3f73.js +0 -1
  404. package/dist/sankhyablocks/p-fb1ecd0b.entry.js +0 -1
  405. package/dist/sankhyablocks/p-fcd09423.entry.js +0 -1
  406. package/dist/sankhyablocks/p-fd15aaac.entry.js +0 -1
  407. package/dist/types/components/snk-taskbar/snk-taskbar-custom-elements.d.ts +0 -7
@@ -5,42 +5,52 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
8
- const taskbarElements = require('./taskbar-elements-39949c7a.js');
9
- const ConfigStorage = require('./ConfigStorage-0e4275f5.js');
10
- const index$1 = require('./index-0e663819.js');
11
- const taskbarProcessor = require('./taskbar-processor-bce3f499.js');
8
+ const taskbarElements = require('./taskbar-elements-01b85b99.js');
9
+ const ConfigStorage = require('./ConfigStorage-8009ecb2.js');
10
+ const index$1 = require('./index-0922807b.js');
11
+ const fieldSearch = require('./field-search-f56aa7d6.js');
12
12
  const index$2 = require('./index-102ba62d.js');
13
- const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-804ff4c7.js');
13
+ const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-ba5838c2.js');
14
14
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
15
- require('./form-config-fetcher-f6cb55e6.js');
16
- require('./DataFetcher-bd3d53a8.js');
17
- require('./_commonjsHelpers-537d719a.js');
15
+ require('./form-config-fetcher-df043d3d.js');
16
+ require('./DataFetcher-ba94ed5b.js');
18
17
  require('./PrintUtils-bcaeb82f.js');
19
- require('./filter-item-type.enum-aa823a00.js');
18
+ require('./filter-item-type.enum-a7ffdaa6.js');
19
+ require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
20
+ require('./PreloadManager-84466da6.js');
21
+ require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
20
22
 
21
- const snkGridCss = ".snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{display:flex;flex-wrap:nowrap;width:100%}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:300px}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";
23
+ const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";
22
24
 
23
25
  const SnkGrid = class {
24
26
  constructor(hostRef) {
25
27
  index.registerInstance(this, hostRef);
26
28
  this.actionClick = index.createEvent(this, "actionClick", 7);
27
29
  this.gridDoubleClick = index.createEvent(this, "gridDoubleClick", 7);
28
- this._topTaskbarProcessor = new taskbarProcessor.TaskbarProcessor({
30
+ this._topTaskbarProcessor = new fieldSearch.TaskbarProcessor({
29
31
  "snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
30
32
  "snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
33
+ "snkGridTopTaskbar.regular.singleTaskbar": [],
31
34
  "snkGridTopTaskbar.finish_edition": ["CANCEL", "SAVE"],
32
- "snkGridTopTaskbar.finish_edition.secondary": []
35
+ "snkGridTopTaskbar.finish_edition.secondary": [],
36
+ "snkGridTopTaskbar.finish_edition.singleTaskbar": [],
33
37
  });
34
- this._headerTaskbarProcessor = new taskbarProcessor.TaskbarProcessor({
35
- "snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
38
+ this._headerTaskbarProcessor = new fieldSearch.TaskbarProcessor({
39
+ "snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
36
40
  "snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
37
- "snkGridHeaderTaskbar.detail.unselected": ["REFRESH"],
38
- "snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
41
+ "snkGridHeaderTaskbar.detail.unselected": ["REFRESH", "MORE_OPTIONS"],
42
+ "snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"],
43
+ "snkGridHeaderTaskbar.singleTaskbar.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
44
+ "snkGridHeaderTaskbar.singleTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
45
+ "snkGridHeaderTaskbar.singleTaskbar.detail.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "MORE_OPTIONS"],
46
+ "snkGridHeaderTaskbar.singleTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "FORM_MODE", "CONFIGURATOR", "REFRESH"],
47
+ "snkGridHeaderTaskbar.singleTaskbar.finish_edition": ["CANCEL", "SAVE"]
39
48
  });
40
49
  this._dataUnit = undefined;
41
50
  this._dataState = undefined;
42
51
  this._gridConfig = undefined;
43
52
  this._popUpGridConfig = false;
53
+ this._showSnkFilterBar = true;
44
54
  this.columnFilterDataSource = new SnkMultiSelectionListDataSource.SnkMultiSelectionListDataSource();
45
55
  this.configName = undefined;
46
56
  this.resourceID = undefined;
@@ -90,6 +100,18 @@ const SnkGrid = class {
90
100
  var _a;
91
101
  (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.reload();
92
102
  }
103
+ /**
104
+ * Retorna o elemento da filter-bar da grade.
105
+ */
106
+ async getFilterBar() {
107
+ return this._snkFilterBar;
108
+ }
109
+ /**
110
+ * Abre o localizador de colunas
111
+ */
112
+ async findColumn() {
113
+ await fieldSearch.openFieldSearch(this._moreOptions, this._columnSearch);
114
+ }
93
115
  openGridConfig() {
94
116
  this._grid.getColumnsState()
95
117
  .then((gridColumns) => {
@@ -103,6 +125,19 @@ const SnkGrid = class {
103
125
  }
104
126
  setGridConfig(config) {
105
127
  this._gridConfig = config;
128
+ this.assertDefaultSorting();
129
+ }
130
+ assertDefaultSorting() {
131
+ if (this._gridConfig && this._dataUnit) {
132
+ this._dataUnit.defaultSorting = this._gridConfig
133
+ .columns
134
+ .filter(col => col.ascending != undefined)
135
+ .sort((colA, colB) => colA.orderIndex - colB.orderIndex)
136
+ .map(({ name: field, ascending }) => {
137
+ const { dataType } = this._dataUnit.getField(field);
138
+ return { field, dataType, mode: ascending ? UnitMetadata.SortMode.ASC : UnitMetadata.SortMode.DESC };
139
+ });
140
+ }
106
141
  }
107
142
  loadConfig() {
108
143
  ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this.resourceID)
@@ -228,11 +263,12 @@ const SnkGrid = class {
228
263
  core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
229
264
  }
230
265
  finshLoading() {
231
- var _a, _b;
232
- this._dataUnitLoadLockerResolver = this._dataUnit.addLoadingLocker();
266
+ this.assertDefaultSorting();
233
267
  this.addElementID();
234
- (_a = this.columnFilterDataSource) === null || _a === void 0 ? void 0 : _a.setApplication(this._application);
235
- (_b = this.columnFilterDataSource) === null || _b === void 0 ? void 0 : _b.setDataUnit(this._dataUnit);
268
+ if (this.columnFilterDataSource != undefined) {
269
+ this.columnFilterDataSource.setApplication(this._application);
270
+ this.columnFilterDataSource.setDataUnit(this._dataUnit);
271
+ }
236
272
  }
237
273
  componentWillLoad() {
238
274
  this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
@@ -285,46 +321,101 @@ const SnkGrid = class {
285
321
  if (!this._dataUnit || this._dataUnit.records.length === 0)
286
322
  invisibleButtons.push("DATA_EXPORTER");
287
323
  if (this._dataState && this._dataState.selectionInfo.mode === DataUnit.SelectionMode.ALL_RECORDS)
288
- invisibleButtons.push("ACTIONS_BUTTON", taskbarElements.TaskbarElement.UPDATE);
324
+ invisibleButtons.push("ACTIONS_BUTTON");
289
325
  return invisibleButtons;
290
326
  }
291
327
  componentWillRender() {
292
- var _a;
293
328
  const invisibleButtons = this.getInvisibleButtons();
329
+ this._headerTaskbarProcessor.process(this.getHeaderTaskbarId(), this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
330
+ this._topTaskbarProcessor.process(this.getTopTaskBarId(), this.taskbarManager, this._dataState, undefined, invisibleButtons);
331
+ this.dataExporterProviderStore();
332
+ }
333
+ getHeaderTaskbarId() {
334
+ var _a, _b;
294
335
  const hasSelectedRecord = this._dataState && !!((_a = this._dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.length);
295
- let headerTaskbarId;
296
- if (hasSelectedRecord) {
297
- headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.selected" : "snkGridHeaderTaskbar.selected";
298
- }
299
- else {
300
- headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.unselected" : "snkGridHeaderTaskbar.unselected";
336
+ const taskbarIdPrefixLookup = {
337
+ primary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
338
+ secondary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
339
+ singleTaskbar: this.isDetail ? "snkGridHeaderTaskbar.singleTaskbar.detail" : "snkGridHeaderTaskbar.singleTaskbar"
340
+ };
341
+ const taskbarIdPrefix = taskbarIdPrefixLookup[this.presentationMode];
342
+ let headerTaskbarId = hasSelectedRecord ? `${taskbarIdPrefix}.selected` : `${taskbarIdPrefix}.unselected`;
343
+ if (((_b = this._dataState) === null || _b === void 0 ? void 0 : _b.isDirty) && this.presentationMode === index$1.PresentationMode.SINGLE_TASKBAR) {
344
+ headerTaskbarId = "snkGridHeaderTaskbar.singleTaskbar.finish_edition";
301
345
  }
302
- this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
303
- this._topTaskbarProcessor.process(this.getTopTaskBarId(this.presentationMode === index$1.PresentationMode.SECONDARY ? ".secondary" : ""), this.taskbarManager, this._dataState, undefined, invisibleButtons);
304
- this.dataExporterProviderStore();
346
+ return headerTaskbarId;
305
347
  }
306
- getTopTaskBarId(sufix) {
348
+ getTopTaskBarId() {
307
349
  var _a;
350
+ const suffixLookup = {
351
+ primary: "",
352
+ secondary: ".secondary",
353
+ singleTaskbar: ".singleTaskbar"
354
+ };
355
+ const sufix = suffixLookup[this.presentationMode];
308
356
  if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
309
357
  return `snkGridTopTaskbar.finish_edition${sufix}`;
310
358
  }
311
359
  return `snkGridTopTaskbar.regular${sufix}`;
312
360
  }
313
361
  getPrimaryButton() {
314
- return this.presentationMode === index$1.PresentationMode.PRIMARY ? "INSERT" : "";
362
+ const primaryButtonLookup = {
363
+ primary: "INSERT",
364
+ secondary: "",
365
+ singleTaskbar: "INSERT"
366
+ };
367
+ return primaryButtonLookup[this.presentationMode];
315
368
  }
316
- onEzGridReady() {
317
- var _a;
318
- (_a = this._dataUnitLoadLockerResolver) === null || _a === void 0 ? void 0 : _a.call(this);
319
- this._dataUnitLoadLockerResolver = undefined;
369
+ getColumnSearch(actionButton, item) {
370
+ if (this._columnSearch != undefined) {
371
+ return this._columnSearch;
372
+ }
373
+ this._moreOptions = actionButton;
374
+ this._columnSearch = fieldSearch.buildFieldSearch(item, ({ argument }) => new Promise(accept => {
375
+ this._grid.filterColumns(argument).then((columns) => {
376
+ accept(columns
377
+ .filter(column => !column.hidden)
378
+ .map(column => ({ label: column.label, value: column.name })));
379
+ });
380
+ }), (option) => {
381
+ if (option != undefined) {
382
+ this._grid.locateColumn(option.value);
383
+ actionButton.hideActions();
384
+ }
385
+ });
386
+ return this._columnSearch;
387
+ }
388
+ getActionsList() {
389
+ const hardList = [{
390
+ value: core.StringUtils.generateUUID(),
391
+ label: this.messagesBuilder.getMessage("snkGrid.findColumn", {}),
392
+ disableCloseOnSelect: true,
393
+ eagerInitialize: true,
394
+ itemBuilder: (actionButton, item) => this.getColumnSearch(actionButton, item)
395
+ }];
396
+ if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
397
+ const taskbarID = this.getTopTaskBarId();
398
+ return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this._dataState, this.actionsList));
399
+ }
400
+ return hardList.concat(this.actionsList);
401
+ }
402
+ handleFilterConfigUpdated(filterConfig) {
403
+ if (!filterConfig.length) {
404
+ this._showSnkFilterBar = false;
405
+ return;
406
+ }
407
+ if (filterConfig.length === 1 && filterConfig[0].id === 'PERSONALIZED_FILTER_GROUP') {
408
+ this._showSnkFilterBar = filterConfig[0].groupedItems.length > 0;
409
+ return;
410
+ }
411
+ this._showSnkFilterBar = true;
320
412
  }
321
413
  render() {
322
- var _a, _b;
323
414
  if (!this._dataUnit) {
324
415
  return undefined;
325
416
  }
326
- return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID }), ((_b = (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
327
- index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady(), columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, index.h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
417
+ return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
418
+ index.h(index.Fragment, null, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail) }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, index.h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
328
419
  }
329
420
  get _element() { return index.getElement(this); }
330
421
  };
@@ -2,19 +2,21 @@
2
2
 
3
3
  const index = require('./index-f9e81701.js');
4
4
  const core = require('@sankhyalabs/core');
5
- const SnkFormConfigManager = require('./SnkFormConfigManager-5b485cd4.js');
5
+ const SnkFormConfigManager = require('./SnkFormConfigManager-7d850fbc.js');
6
6
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
7
- const taskbarProcessor = require('./taskbar-processor-bce3f499.js');
8
- const taskbarElements = require('./taskbar-elements-39949c7a.js');
9
- const constants = require('./constants-d187e03e.js');
10
- require('./DataFetcher-bd3d53a8.js');
11
- require('./pesquisa-fetcher-3356b3df.js');
12
- const index$1 = require('./index-0e663819.js');
7
+ const fieldSearch = require('./field-search-f56aa7d6.js');
8
+ const taskbarElements = require('./taskbar-elements-01b85b99.js');
9
+ const constants = require('./constants-35ddd366.js');
10
+ require('./DataFetcher-ba94ed5b.js');
11
+ require('./pesquisa-fetcher-ef050a47.js');
12
+ const index$1 = require('./index-0922807b.js');
13
13
  require('./ISave-d68ce3cd.js');
14
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
15
15
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
16
- require('./filter-item-type.enum-aa823a00.js');
17
- require('./form-config-fetcher-f6cb55e6.js');
16
+ require('./dataunit-fetcher-de65b9fc.js');
17
+ require('./PreloadManager-84466da6.js');
18
+ require('./filter-item-type.enum-a7ffdaa6.js');
19
+ require('./form-config-fetcher-df043d3d.js');
18
20
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
19
21
 
20
22
  const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-medium:var(--space--medium, 12px);--snk-guides-viewer__header--min-height:94px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-medium);margin-left:calc(var(--snk-guides-viewer--space-large) * -1);margin-right:calc(var(--snk-guides-viewer--space-large) * -1);margin-bottom:var(--snk-guides-viewer--space-medium)}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-medium));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-medium))}.snk-guides-viewer__guide-navigator[open].sc-snk-guides-viewer{width:var(--snk-guides-viewer__guide-navigator--width);max-width:var(--snk-guides-viewer__guide-navigator--width);min-width:var(--snk-guides-viewer__guide-navigator--width)}.snk-guides-viewer__detail-content.sc-snk-guides-viewer{min-height:100%;align-items:flex-start;align-content:flex-start}";
@@ -41,10 +43,12 @@ const SnkGuidesViewer = class {
41
43
  this.presentationMode = undefined;
42
44
  this.resourceID = undefined;
43
45
  this.detailTaskbarCustomContainerId = undefined;
46
+ this._hasToCreateFieldSearch = true;
44
47
  this._breadcrumbItems = [];
45
48
  this._guides = undefined;
46
49
  this._formEditorConfigManager = undefined;
47
50
  this._formEditorDataUnit = undefined;
51
+ this._fieldToGetFocus = undefined;
48
52
  }
49
53
  observeDataUnit() {
50
54
  this.loadGuides(true);
@@ -69,6 +73,12 @@ const SnkGuidesViewer = class {
69
73
  this._formEditorConfigManager = masterConfig ? this._configManager : this._currentDetail.formConfigManager;
70
74
  this._formEditorDataUnit = masterConfig ? this.dataUnit : this._currentDetail.dataUnit;
71
75
  }
76
+ /**
77
+ * Abre o localizador de campos
78
+ */
79
+ async findField() {
80
+ await fieldSearch.openFieldSearch(this._moreOptions, this._fieldSearch);
81
+ }
72
82
  exitViewer() {
73
83
  if (this.dataUnit.isDirty()) {
74
84
  this.dataUnit.cancelEdition({ after: () => this.exit.emit() });
@@ -139,11 +149,21 @@ const SnkGuidesViewer = class {
139
149
  this._breadcrumbItems = breadcrumbs;
140
150
  });
141
151
  });
152
+ this._guides = this._guides.map(guide => {
153
+ if (guide.id === guideItem.id) {
154
+ return Object.assign(Object.assign({}, guide), guideItem);
155
+ }
156
+ return guide;
157
+ });
142
158
  }
143
159
  }
160
+ getTaskBarId() {
161
+ var _a;
162
+ return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "snkGuideViewer.finish_edition" : "snkGuideViewer.regular";
163
+ }
144
164
  loadTaskbarProcessor() {
145
- var _a, _b;
146
- const taskbarId = ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "snkGuideViewer.finish_edition" : "snkGuideViewer.regular";
165
+ var _a;
166
+ const taskbarId = this.getTaskBarId();
147
167
  const disabledButtons = [];
148
168
  if (!this.dataState || !this.dataState.hasPrevious) {
149
169
  disabledButtons.push("PREVIOUS");
@@ -151,7 +171,7 @@ const SnkGuidesViewer = class {
151
171
  if (!this.dataState || !this.dataState.hasNext) {
152
172
  disabledButtons.push("NEXT");
153
173
  }
154
- if ((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.selectionInfo) {
174
+ if ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.selectionInfo) {
155
175
  if (this.dataState.selectionInfo.length > 1) {
156
176
  disabledButtons.push("CLONE");
157
177
  }
@@ -167,7 +187,7 @@ const SnkGuidesViewer = class {
167
187
  btnsRegularMode.push("INSERT");
168
188
  }
169
189
  const invisibleButtons = this.getInvisibleButtons();
170
- this._taskbarProcessor = new taskbarProcessor.TaskbarProcessor({
190
+ this._taskbarProcessor = new fieldSearch.TaskbarProcessor({
171
191
  "snkGuideViewer.regular": btnsRegularMode,
172
192
  "snkGuideViewer.finish_edition": ["CANCEL", "SAVE"],
173
193
  });
@@ -182,25 +202,26 @@ const SnkGuidesViewer = class {
182
202
  static updateContentCard(formName, cardConfig, propertyChanged, configManager) {
183
203
  return configManager.saveCardState(formName, cardConfig, propertyChanged);
184
204
  }
185
- static buildFixedForms(formConfig, formMetadata, selectedForm, dataUnit, recordsValidator, levelPath) {
186
- const cardsState = formConfig === null || formConfig === void 0 ? void 0 : formConfig.cardsState;
205
+ static buildFixedForms(params) {
206
+ var _a;
207
+ const cardsState = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.cardsState;
187
208
  if (cardsState == undefined) {
188
209
  return;
189
210
  }
190
211
  return (index.h(index.Fragment, null, Array.from(cardsState.entries())
191
- .filter(([formName, cardConfig]) => (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed) && formName != selectedForm)
212
+ .filter(([formName, cardConfig]) => (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed) && formName != params.selectedForm)
192
213
  .sort(([, cardConfigA], [, cardConfigB]) => {
193
214
  const indexA = (cardConfigA === null || cardConfigA === void 0 ? void 0 : cardConfigA.fixSequence) || 0;
194
215
  const indexB = (cardConfigB === null || cardConfigB === void 0 ? void 0 : cardConfigB.fixSequence) || 0;
195
216
  return indexA - indexB;
196
217
  })
197
218
  .map(([formName, cardConfig]) => {
198
- var _a;
199
- const sheet = formMetadata.getSheet(formName);
219
+ var _a, _b;
220
+ const sheet = params.formMetadata.getSheet(formName);
200
221
  if (sheet == undefined) {
201
222
  return;
202
223
  }
203
- return index.h("snk-form-view", { levelPath: levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: formMetadata, dataUnit: dataUnit, recordsValidator: recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_a = formConfig === null || formConfig === void 0 ? void 0 : formConfig.summary) === null || _a === void 0 ? void 0 : _a.get(formName), key: formName });
224
+ return index.h("snk-form-view", { levelPath: params.levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_b = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.summary) === null || _b === void 0 ? void 0 : _b.get(formName), fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); } });
204
225
  })));
205
226
  }
206
227
  wrapDetail(levels, content) {
@@ -249,7 +270,7 @@ const SnkGuidesViewer = class {
249
270
  const sheet = this._masterFormMetadata.getSheet(cardId);
250
271
  if (sheet) {
251
272
  const cardConfig = (_c = (_b = this.masterFormConfig) === null || _b === void 0 ? void 0 : _b.cardsState) === null || _c === void 0 ? void 0 : _c.get(cardId);
252
- content = index.h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, key: guideId }, this.presentationMode == index$1.PresentationMode.SECONDARY && this.buildTaskBar());
273
+ content = index.h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: guideId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler() }, this.presentationMode == index$1.PresentationMode.SECONDARY && this.buildTaskBar());
253
274
  }
254
275
  }
255
276
  return content;
@@ -266,6 +287,35 @@ const SnkGuidesViewer = class {
266
287
  this._guideNavigator.getCurrentPath().then(breadcrumbs => {
267
288
  this._breadcrumbItems = breadcrumbs;
268
289
  });
290
+ this.resetGuideBadge(currentItem);
291
+ }
292
+ changeGuideHandler(guideName) {
293
+ var _a;
294
+ (_a = this._guideNavigator) === null || _a === void 0 ? void 0 : _a.selectGuide(guideName);
295
+ }
296
+ clearFieldToFocusHandler() {
297
+ this._fieldToGetFocus = undefined;
298
+ }
299
+ resetGuideBadge(selectedGuide) {
300
+ var _a;
301
+ this._guides = [...(_a = this._guides) === null || _a === void 0 ? void 0 : _a.map(guide => {
302
+ if (this.canClearGuideBadge(guide, selectedGuide.id)) {
303
+ return Object.assign(Object.assign({}, guide), { badge: null });
304
+ }
305
+ return guide;
306
+ })];
307
+ }
308
+ canClearGuideBadge(guide, idToCheck) {
309
+ return (guide.id === idToCheck) || this.isIncludedInChildrenList(guide, idToCheck);
310
+ }
311
+ isIncludedInChildrenList(guide, guideId) {
312
+ return this.hasChildren(guide) && this.getChildrenIdList(guide).includes(guideId);
313
+ }
314
+ hasChildren(guide) {
315
+ return guide.children && Array.isArray(guide.children);
316
+ }
317
+ getChildrenIdList(guide) {
318
+ return (guide.children).map(guideChild => guideChild.id);
269
319
  }
270
320
  getConfigViewMode() {
271
321
  return constants.VIEW_MODE.GRID;
@@ -311,9 +361,90 @@ const SnkGuidesViewer = class {
311
361
  }
312
362
  this._guideHasChanged = false;
313
363
  }
364
+ getFieldsSearch(actionButton, item) {
365
+ if (this._fieldSearch == undefined || this._hasToCreateFieldSearch) {
366
+ this._hasToCreateFieldSearch = false;
367
+ this._moreOptions = actionButton;
368
+ actionButton.addEventListener("taskbarActionsButtonDisconnected", () => this._hasToCreateFieldSearch = true);
369
+ this._fieldSearch = fieldSearch.buildFieldSearch(item, ({ argument }) => this.fieldsOptionLoader(argument), (option) => this.onSelectField(option, actionButton));
370
+ }
371
+ return this._fieldSearch;
372
+ }
373
+ fieldsOptionLoader(argument) {
374
+ return Promise.resolve(this._configManager.getFieldsList(this.dataUnit, argument)
375
+ .map(field => ({ value: field.name, label: field.label })));
376
+ }
377
+ onSelectField(option, actionButton) {
378
+ if (option == undefined) {
379
+ return;
380
+ }
381
+ this._fieldToGetFocus = option.value;
382
+ const fieldGuideName = this.getGuideName(option.value);
383
+ if (fieldGuideName !== this.selectedGuide.id) {
384
+ this.changeGuideHandler(fieldGuideName);
385
+ }
386
+ actionButton.hideActions();
387
+ }
388
+ getActionsList() {
389
+ const hardList = [{
390
+ value: "",
391
+ label: this.getMessage("snkCrud.findColumn"),
392
+ disableCloseOnSelect: true,
393
+ eagerInitialize: true,
394
+ itemBuilder: (actionButton, item) => this.getFieldsSearch(actionButton, item)
395
+ }];
396
+ if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
397
+ return hardList.concat(this.taskbarManager.getMoreOptions(this.getTaskBarId(), this.configName, this.dataState, this.actionsList));
398
+ }
399
+ return hardList.concat(this.actionsList);
400
+ }
314
401
  buildTaskBar() {
315
402
  var _a;
316
- return index.h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != index$1.PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, index.h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
403
+ return index.h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != index$1.PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, index.h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.getActionsList(), messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
404
+ }
405
+ async dataUnitActionHandler(action) {
406
+ var _a;
407
+ if (action.type === core.Action.FIELD_INVALIDATED) {
408
+ const guideName = this.getGuideName((_a = action.payload) === null || _a === void 0 ? void 0 : _a.fieldName);
409
+ await this.addErrorBadgeToGuide(guideName);
410
+ await this.openGuideNavigator(guideName);
411
+ }
412
+ }
413
+ async addErrorBadgeToGuide(guideName) {
414
+ var _a;
415
+ this._guides = [...(_a = this._guides) === null || _a === void 0 ? void 0 : _a.map(guide => {
416
+ return Object.assign(Object.assign({}, guide), { badge: this.getBadge(guide, guideName) });
417
+ })];
418
+ }
419
+ async openGuideNavigator(guideName) {
420
+ if (this.selectedGuide.id !== guideName) {
421
+ await this._guideNavigator.openGuideNavidator();
422
+ }
423
+ }
424
+ getBadge(guide, tabName) {
425
+ var _a;
426
+ if (this.selectedGuide.id === tabName) {
427
+ return null;
428
+ }
429
+ if (tabName === guide.id) {
430
+ return "error";
431
+ }
432
+ return (_a = guide.badge) !== null && _a !== void 0 ? _a : null;
433
+ }
434
+ getGuideName(fieldName) {
435
+ var _a;
436
+ for (const sheet of this._masterFormMetadata.getAllSheets()) {
437
+ const formFields = (_a = sheet[1]) === null || _a === void 0 ? void 0 : _a.fields;
438
+ for (const field of formFields) {
439
+ if (field.name === fieldName) {
440
+ return sheet[0];
441
+ }
442
+ }
443
+ }
444
+ return "";
445
+ }
446
+ componentDidLoad() {
447
+ this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
317
448
  }
318
449
  render() {
319
450
  var _a, _b;
@@ -332,7 +463,15 @@ const SnkGuidesViewer = class {
332
463
  index.h("div", { class: "ez-margin-top--extra-small" }, index.h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != index$1.PresentationMode.SECONDARY && this.buildTaskBar()), index.h("div", { class: "snk-guides-viewer__container" }, showGuides ?
333
464
  index.h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
334
465
  :
335
- index.h("div", null), index.h("div", { class: "snk-guides-viewer__detail-container" }, SnkGuidesViewer.buildFixedForms(this.masterFormConfig, this._masterFormMetadata, (_b = this.selectedGuide) === null || _b === void 0 ? void 0 : _b.id, this.dataUnit, this.recordsValidator), this.getContent())), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
466
+ index.h("div", null), index.h("div", { class: "snk-guides-viewer__detail-container" }, SnkGuidesViewer.buildFixedForms({
467
+ formConfig: this.masterFormConfig,
468
+ formMetadata: this._masterFormMetadata,
469
+ selectedForm: (_b = this.selectedGuide) === null || _b === void 0 ? void 0 : _b.id,
470
+ dataUnit: this.dataUnit,
471
+ recordsValidator: this.recordsValidator,
472
+ fieldToFocus: this._fieldToGetFocus,
473
+ onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this)
474
+ }), this.getContent())), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
336
475
  }
337
476
  static get watchers() { return {
338
477
  "dataUnit": ["observeDataUnit"],
@@ -2,26 +2,29 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-5e22097d.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-7f9b6d94.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
- require('./SnkFormConfigManager-5b485cd4.js');
9
- require('./ConfigStorage-0e4275f5.js');
10
- require('./form-config-fetcher-f6cb55e6.js');
11
- require('./DataFetcher-bd3d53a8.js');
12
- require('./_commonjsHelpers-537d719a.js');
13
- require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
8
+ require('./SnkFormConfigManager-7d850fbc.js');
9
+ require('./ConfigStorage-8009ecb2.js');
10
+ require('./form-config-fetcher-df043d3d.js');
11
+ require('./DataFetcher-ba94ed5b.js');
14
12
  require('./PrintUtils-bcaeb82f.js');
15
- require('./filter-item-type.enum-aa823a00.js');
13
+ require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
+ require('./filter-item-type.enum-a7ffdaa6.js');
16
15
  require('@sankhyalabs/ezui/dist/collection/utils/form');
17
- require('./taskbar-processor-bce3f499.js');
18
- require('./taskbar-elements-39949c7a.js');
19
- require('./index-0e663819.js');
16
+ require('./field-search-f56aa7d6.js');
17
+ require('./taskbar-elements-01b85b99.js');
18
+ require('./index-0922807b.js');
20
19
  require('./index-102ba62d.js');
21
- require('./constants-d187e03e.js');
22
- require('./pesquisa-fetcher-3356b3df.js');
20
+ require('./constants-35ddd366.js');
21
+ require('./pesquisa-fetcher-ef050a47.js');
23
22
  require('./ISave-d68ce3cd.js');
24
23
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
24
+ require('./dataunit-fetcher-de65b9fc.js');
25
+ require('./PreloadManager-84466da6.js');
26
+ require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
27
+ require('./ResourceIDUtils-5ff86aa7.js');
25
28
  require('@sankhyalabs/core/dist/dataunit/DataUnit');
26
29
 
27
30
 
@@ -4,7 +4,7 @@ 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 filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
7
+ const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
8
8
  const presentationMode = require('./presentationMode-52ec3bdd.js');
9
9
  const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
10
10
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');