@sankhyalabs/sankhyablocks 8.15.0-dev.2 → 8.15.0-dev.21

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 (231) hide show
  1. package/dist/cjs/{ConfigStorage-0d507a8f.js → ConfigStorage-302bbbd4.js} +25 -15
  2. package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
  3. package/dist/cjs/{SnkFormConfigManager-467907f6.js → SnkFormConfigManager-71c4768e.js} +1 -1
  4. package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-e7dcf408.js} +13 -0
  5. package/dist/cjs/{index-0e663819.js → index-0922807b.js} +1 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{dataunit-fetcher-bdaf9482.js → pesquisa-fetcher-c790ffb7.js} +254 -34
  8. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  9. package/dist/cjs/snk-actions-button_2.cjs.entry.js +23 -5
  10. package/dist/cjs/snk-application.cjs.entry.js +95 -6
  11. package/dist/cjs/snk-attach.cjs.entry.js +395 -57
  12. package/dist/cjs/snk-crud.cjs.entry.js +10 -8
  13. package/dist/cjs/snk-data-exporter.cjs.entry.js +4 -4
  14. package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-82c08a8c.js} +1 -1
  15. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  16. package/dist/cjs/snk-detail-view.cjs.entry.js +8 -9
  17. package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
  18. package/dist/cjs/snk-filter-bar.cjs.entry.js +57 -7
  19. package/dist/cjs/snk-filter-item.cjs.entry.js +3 -0
  20. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -2
  21. package/dist/cjs/snk-filter-modal.cjs.entry.js +16 -1
  22. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
  23. package/dist/cjs/snk-form.cjs.entry.js +2 -2
  24. package/dist/cjs/snk-grid-config.cjs.entry.js +1 -1
  25. package/dist/cjs/snk-grid.cjs.entry.js +42 -18
  26. package/dist/cjs/{snk-guides-viewer-9342bca1.js → snk-guides-viewer-32c1d35d.js} +9 -10
  27. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -8
  28. package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
  29. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  30. package/dist/cjs/snk-simple-crud.cjs.entry.js +19 -8
  31. package/dist/cjs/snk-taskbar.cjs.entry.js +53 -5
  32. package/dist/cjs/{taskbar-elements-b8c428a9.js → taskbar-elements-01b85b99.js} +1 -1
  33. package/dist/collection/collection-manifest.json +1 -1
  34. package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
  35. package/dist/collection/components/snk-application/snk-application.js +111 -5
  36. package/dist/collection/components/snk-attach/snk-attach.js +194 -38
  37. package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
  38. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
  39. package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
  40. package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
  41. package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
  42. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
  43. package/dist/collection/components/snk-attach/structure/index.js +6 -3
  44. package/dist/collection/components/snk-crud/snk-crud.js +24 -4
  45. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
  46. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +4 -4
  47. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
  48. package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -3
  49. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
  50. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +3 -0
  51. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +84 -2
  52. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +0 -1
  53. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +101 -5
  54. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +5 -1
  55. package/dist/collection/components/snk-grid/snk-grid.js +57 -16
  56. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
  57. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
  58. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +53 -1
  59. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +26 -1
  60. package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
  61. package/dist/collection/components/snk-taskbar/snk-taskbar.js +89 -4
  62. package/dist/collection/lib/@types/index.js +1 -0
  63. package/dist/collection/lib/configs/ConfigStorage.js +24 -14
  64. package/dist/collection/lib/dataUnit/InMemoryLoader.js +1 -1
  65. package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
  66. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
  67. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
  68. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
  69. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
  70. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
  71. package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
  72. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +31 -3
  73. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +55 -31
  74. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +1 -1
  75. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
  76. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +10 -4
  77. package/dist/collection/lib/index.js +1 -1
  78. package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
  79. package/dist/components/ConfigStorage.js +25 -15
  80. package/dist/components/SnkMessageBuilder.js +13 -0
  81. package/dist/components/dataunit-fetcher.js +96 -38
  82. package/dist/components/index2.js +1 -0
  83. package/dist/components/snk-actions-button2.js +1 -0
  84. package/dist/components/snk-application2.js +94 -3
  85. package/dist/components/snk-attach2.js +400 -56
  86. package/dist/components/snk-crud.js +7 -3
  87. package/dist/components/snk-data-exporter2.js +1 -1
  88. package/dist/components/snk-detail-view2.js +4 -4
  89. package/dist/components/snk-entity-list.js +5 -3
  90. package/dist/components/snk-filter-bar2.js +59 -7
  91. package/dist/components/snk-filter-item2.js +3 -0
  92. package/dist/components/snk-filter-modal-item2.js +0 -1
  93. package/dist/components/snk-filter-modal.js +21 -3
  94. package/dist/components/snk-filter-multi-select.js +2 -1
  95. package/dist/components/snk-grid2.js +40 -15
  96. package/dist/components/snk-personalized-filter2.js +1 -1
  97. package/dist/components/snk-pesquisa2.js +1 -1
  98. package/dist/components/snk-simple-crud2.js +15 -1
  99. package/dist/components/snk-taskbar2.js +55 -4
  100. package/dist/components/taskbar-actions-button2.js +21 -2
  101. package/dist/esm/{ConfigStorage-379a9cba.js → ConfigStorage-4151acc8.js} +25 -15
  102. package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
  103. package/dist/esm/{SnkFormConfigManager-587e9030.js → SnkFormConfigManager-5c7d3771.js} +1 -1
  104. package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0fb796b9.js} +13 -0
  105. package/dist/esm/{index-1564817d.js → index-0ece87a6.js} +1 -0
  106. package/dist/esm/loader.js +1 -1
  107. package/dist/esm/{dataunit-fetcher-cc1650eb.js → pesquisa-fetcher-4000d0b8.js} +255 -36
  108. package/dist/esm/sankhyablocks.js +1 -1
  109. package/dist/esm/snk-actions-button_2.entry.js +23 -5
  110. package/dist/esm/snk-application.entry.js +95 -6
  111. package/dist/esm/snk-attach.entry.js +396 -58
  112. package/dist/esm/snk-crud.entry.js +10 -8
  113. package/dist/esm/snk-data-exporter.entry.js +4 -4
  114. package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-5d201fb3.js} +1 -1
  115. package/dist/esm/snk-data-unit.entry.js +2 -2
  116. package/dist/esm/snk-detail-view.entry.js +8 -9
  117. package/dist/esm/snk-entity-list.entry.js +5 -3
  118. package/dist/esm/snk-filter-bar.entry.js +57 -7
  119. package/dist/esm/snk-filter-item.entry.js +3 -0
  120. package/dist/esm/snk-filter-modal-item.entry.js +1 -2
  121. package/dist/esm/snk-filter-modal.entry.js +16 -1
  122. package/dist/esm/snk-filter-multi-select.entry.js +2 -1
  123. package/dist/esm/snk-form.entry.js +2 -2
  124. package/dist/esm/snk-grid-config.entry.js +1 -1
  125. package/dist/esm/snk-grid.entry.js +42 -18
  126. package/dist/esm/{snk-guides-viewer-9ce9588c.js → snk-guides-viewer-8adacfd4.js} +9 -10
  127. package/dist/esm/snk-guides-viewer.entry.js +7 -8
  128. package/dist/esm/snk-personalized-filter.entry.js +2 -2
  129. package/dist/esm/snk-pesquisa.entry.js +1 -1
  130. package/dist/esm/snk-simple-crud.entry.js +17 -6
  131. package/dist/esm/snk-taskbar.entry.js +54 -6
  132. package/dist/esm/{taskbar-elements-26c981af.js → taskbar-elements-d4d0b424.js} +1 -1
  133. package/dist/sankhyablocks/{p-ff6064e7.js → p-05243555.js} +1 -1
  134. package/dist/sankhyablocks/p-0574c231.entry.js +1 -0
  135. package/dist/sankhyablocks/p-0eb1ff03.js +65 -0
  136. package/dist/sankhyablocks/p-11bbb65e.entry.js +1 -0
  137. package/dist/sankhyablocks/{p-729f5f5b.entry.js → p-1d75d9f9.entry.js} +1 -1
  138. package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
  139. package/dist/sankhyablocks/p-2419f19f.js +1 -0
  140. package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
  141. package/dist/sankhyablocks/p-374d03f6.js +1 -0
  142. package/dist/sankhyablocks/p-38289a55.js +1 -0
  143. package/dist/sankhyablocks/p-3838d2ff.entry.js +1 -0
  144. package/dist/sankhyablocks/{p-35fe6e61.entry.js → p-40915359.entry.js} +1 -1
  145. package/dist/sankhyablocks/p-45d82274.entry.js +1 -0
  146. package/dist/sankhyablocks/{p-2028633c.js → p-573a07c5.js} +1 -1
  147. package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
  148. package/dist/sankhyablocks/{p-aaa1438e.entry.js → p-761ed32f.entry.js} +1 -1
  149. package/dist/sankhyablocks/p-79b4b271.entry.js +1 -0
  150. package/dist/sankhyablocks/p-7f3c7b09.entry.js +1 -0
  151. package/dist/sankhyablocks/{p-6977a26c.entry.js → p-86801b08.entry.js} +1 -1
  152. package/dist/sankhyablocks/p-96ef14f9.entry.js +1 -0
  153. package/dist/sankhyablocks/p-aa95fb2c.js +56 -0
  154. package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
  155. package/dist/sankhyablocks/p-c4874327.entry.js +1 -0
  156. package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
  157. package/dist/sankhyablocks/p-db4edd06.entry.js +11 -0
  158. package/dist/sankhyablocks/p-df2b84c4.entry.js +1 -0
  159. package/dist/sankhyablocks/p-e0b23084.entry.js +1 -0
  160. package/dist/sankhyablocks/p-e0fd9555.entry.js +1 -0
  161. package/dist/sankhyablocks/p-ed2dce4b.entry.js +1 -0
  162. package/dist/sankhyablocks/{p-32f0935f.js → p-f3d1c48e.js} +1 -1
  163. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  164. package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
  165. package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
  166. package/dist/types/components/snk-application/snk-application.d.ts +12 -2
  167. package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
  168. package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
  169. package/dist/types/components/snk-attach/snk-attach.d.ts +28 -6
  170. package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
  171. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
  172. package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
  173. package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
  174. package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
  175. package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
  176. package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
  177. package/dist/types/components/snk-crud/snk-crud.d.ts +5 -0
  178. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -1
  179. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +19 -1
  180. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +18 -0
  181. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +7 -1
  182. package/dist/types/components/snk-grid/snk-grid.d.ts +6 -0
  183. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -1
  184. package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +2 -0
  185. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +20 -1
  186. package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +1 -0
  187. package/dist/types/components.d.ts +140 -13
  188. package/dist/types/lib/@types/index.d.ts +2 -1
  189. package/dist/types/lib/configs/ConfigStorage.d.ts +4 -0
  190. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
  191. package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
  192. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
  193. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
  194. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
  195. package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
  196. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -0
  197. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +4 -1
  198. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
  199. package/dist/types/lib/index.d.ts +1 -1
  200. package/package.json +15 -6
  201. package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
  202. package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
  203. package/dist/sankhyablocks/p-145c4434.js +0 -1
  204. package/dist/sankhyablocks/p-17dda7a2.entry.js +0 -1
  205. package/dist/sankhyablocks/p-19f51c6b.entry.js +0 -11
  206. package/dist/sankhyablocks/p-20726710.entry.js +0 -1
  207. package/dist/sankhyablocks/p-311c6173.entry.js +0 -1
  208. package/dist/sankhyablocks/p-4396d1a6.js +0 -56
  209. package/dist/sankhyablocks/p-44e894af.entry.js +0 -1
  210. package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
  211. package/dist/sankhyablocks/p-4b0ea83f.entry.js +0 -1
  212. package/dist/sankhyablocks/p-5534e08c.js +0 -1
  213. package/dist/sankhyablocks/p-78777ae0.entry.js +0 -1
  214. package/dist/sankhyablocks/p-953346b9.entry.js +0 -1
  215. package/dist/sankhyablocks/p-9c3229fc.entry.js +0 -1
  216. package/dist/sankhyablocks/p-a037f5b4.entry.js +0 -1
  217. package/dist/sankhyablocks/p-a702a1a2.js +0 -60
  218. package/dist/sankhyablocks/p-c259545b.entry.js +0 -1
  219. package/dist/sankhyablocks/p-d1677df0.entry.js +0 -1
  220. package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
  221. package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
  222. package/dist/sankhyablocks/p-dd6a8377.js +0 -1
  223. package/dist/sankhyablocks/p-e138e7d4.entry.js +0 -1
  224. package/dist/sankhyablocks/p-e1b29d4c.entry.js +0 -1
  225. package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
  226. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
  227. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
  228. /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
  229. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
  230. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
  231. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -14,14 +14,21 @@ export class SnkGrid {
14
14
  this._topTaskbarProcessor = new TaskbarProcessor({
15
15
  "snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
16
16
  "snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
17
+ "snkGridTopTaskbar.regular.singleTaskbar": [],
17
18
  "snkGridTopTaskbar.finish_edition": ["CANCEL", "SAVE"],
18
- "snkGridTopTaskbar.finish_edition.secondary": []
19
+ "snkGridTopTaskbar.finish_edition.secondary": [],
20
+ "snkGridTopTaskbar.finish_edition.singleTaskbar": [],
19
21
  });
20
22
  this._headerTaskbarProcessor = new TaskbarProcessor({
21
23
  "snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
22
24
  "snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
23
25
  "snkGridHeaderTaskbar.detail.unselected": ["REFRESH", "MORE_OPTIONS"],
24
- "snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
26
+ "snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"],
27
+ "snkGridHeaderTaskbar.singleTaskbar.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
28
+ "snkGridHeaderTaskbar.singleTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
29
+ "snkGridHeaderTaskbar.singleTaskbar.detail.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "MORE_OPTIONS"],
30
+ "snkGridHeaderTaskbar.singleTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "FORM_MODE", "CONFIGURATOR", "REFRESH"],
31
+ "snkGridHeaderTaskbar.singleTaskbar.finish_edition": ["CANCEL", "SAVE"]
25
32
  });
26
33
  this._dataUnit = undefined;
27
34
  this._dataState = undefined;
@@ -45,6 +52,7 @@ export class SnkGrid {
45
52
  this.taskbarCustomContainerId = undefined;
46
53
  this.gridHeaderCustomSlotId = 'GRID_HEADER_CUSTOM_ELEMENTS';
47
54
  this.topTaskbarCustomSlotId = 'GRID_TASKBAR_CUSTOM_ELEMENTS';
55
+ this.disablePersonalizedFilter = undefined;
48
56
  }
49
57
  /**
50
58
  * Exibe a janela de configurações da grade.
@@ -302,30 +310,46 @@ export class SnkGrid {
302
310
  return invisibleButtons;
303
311
  }
304
312
  componentWillRender() {
305
- var _a;
306
313
  const invisibleButtons = this.getInvisibleButtons();
307
- const hasSelectedRecord = this._dataState && !!((_a = this._dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.length);
308
- let headerTaskbarId;
309
- if (hasSelectedRecord) {
310
- headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.selected" : "snkGridHeaderTaskbar.selected";
311
- }
312
- else {
313
- headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.unselected" : "snkGridHeaderTaskbar.unselected";
314
- }
315
- this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
314
+ this._headerTaskbarProcessor.process(this.getHeaderTaskbarId(), this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
316
315
  this._topTaskbarProcessor.process(this.getTopTaskBarId(), this.taskbarManager, this._dataState, undefined, invisibleButtons);
317
316
  this.dataExporterProviderStore();
318
317
  }
318
+ getHeaderTaskbarId() {
319
+ var _a, _b;
320
+ const hasSelectedRecord = this._dataState && !!((_a = this._dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.length);
321
+ const taskbarIdPrefixLookup = {
322
+ primary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
323
+ secondary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
324
+ singleTaskbar: this.isDetail ? "snkGridHeaderTaskbar.singleTaskbar.detail" : "snkGridHeaderTaskbar.singleTaskbar"
325
+ };
326
+ const taskbarIdPrefix = taskbarIdPrefixLookup[this.presentationMode];
327
+ let headerTaskbarId = hasSelectedRecord ? `${taskbarIdPrefix}.selected` : `${taskbarIdPrefix}.unselected`;
328
+ if (((_b = this._dataState) === null || _b === void 0 ? void 0 : _b.isDirty) && this.presentationMode === PresentationMode.SINGLE_TASKBAR) {
329
+ headerTaskbarId = "snkGridHeaderTaskbar.singleTaskbar.finish_edition";
330
+ }
331
+ return headerTaskbarId;
332
+ }
319
333
  getTopTaskBarId() {
320
334
  var _a;
321
- const sufix = this.presentationMode === PresentationMode.SECONDARY ? ".secondary" : "";
335
+ const suffixLookup = {
336
+ primary: "",
337
+ secondary: ".secondary",
338
+ singleTaskbar: ".singleTaskbar"
339
+ };
340
+ const sufix = suffixLookup[this.presentationMode];
322
341
  if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
323
342
  return `snkGridTopTaskbar.finish_edition${sufix}`;
324
343
  }
325
344
  return `snkGridTopTaskbar.regular${sufix}`;
326
345
  }
327
346
  getPrimaryButton() {
328
- return this.presentationMode === PresentationMode.PRIMARY ? "INSERT" : "";
347
+ const primaryButtonLookup = {
348
+ primary: "INSERT",
349
+ secondary: "",
350
+ singleTaskbar: "INSERT"
351
+ };
352
+ return primaryButtonLookup[this.presentationMode];
329
353
  }
330
354
  getColumnSearch(actionButton, item) {
331
355
  if (this._columnSearch != undefined) {
@@ -376,7 +400,7 @@ export class SnkGrid {
376
400
  return undefined;
377
401
  }
378
402
  return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
379
- h(Fragment, null, 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) }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), 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 }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === 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 }, 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.getActionsList(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(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 }))));
403
+ h(Fragment, null, 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), disablePersonalizedFilter: this.disablePersonalizedFilter }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), 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, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === 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 }, h("snk-taskbar", { id: 'teste', 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 }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(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 }))));
380
404
  }
381
405
  static get is() { return "snk-grid"; }
382
406
  static get encapsulation() { return "scoped"; }
@@ -573,7 +597,7 @@ export class SnkGrid {
573
597
  "mutable": false,
574
598
  "complexType": {
575
599
  "original": "PresentationMode",
576
- "resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY",
600
+ "resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY | PresentationMode.SINGLE_TASKBAR",
577
601
  "references": {
578
602
  "PresentationMode": {
579
603
  "location": "import",
@@ -719,6 +743,23 @@ export class SnkGrid {
719
743
  "attribute": "top-taskbar-custom-slot-id",
720
744
  "reflect": false,
721
745
  "defaultValue": "'GRID_TASKBAR_CUSTOM_ELEMENTS'"
746
+ },
747
+ "disablePersonalizedFilter": {
748
+ "type": "boolean",
749
+ "mutable": false,
750
+ "complexType": {
751
+ "original": "boolean",
752
+ "resolved": "boolean",
753
+ "references": {}
754
+ },
755
+ "required": false,
756
+ "optional": false,
757
+ "docs": {
758
+ "tags": [],
759
+ "text": "Desabilita a apresenta\u00E7\u00E3o da op\u00E7\u00E3o de filtros personalizados na filter bar (chip de filtros) \ne no modal lateral de filtros (container de filtros personalizados)."
760
+ },
761
+ "attribute": "disable-personalized-filter",
762
+ "reflect": false
722
763
  }
723
764
  };
724
765
  }
@@ -190,7 +190,7 @@ export class SnkPersonalizedFilter {
190
190
  return personalizedFilter;
191
191
  }
192
192
  addFilterGroupCondition(personalizedFilter) {
193
- if (!personalizedFilter.assistent.operand) {
193
+ if (personalizedFilter.assistent && !personalizedFilter.assistent.operand) {
194
194
  personalizedFilter.assistent.operand = FilterGroupCondition.AND;
195
195
  }
196
196
  }
@@ -6,7 +6,7 @@
6
6
  --snk-pesquisa--font-family: var(--font-pattern, Arial);
7
7
  /*@doc Define o peso da fonte do componente.*/
8
8
  --snk-pesquisa--font-weight: var(--text-weight--medium, 400);
9
-
9
+
10
10
  /* records */
11
11
  /*@doc Define a cor da fonte do indicador de registros do componente.*/
12
12
  --snk-pesquisa__records--color: var(--text--primary, #626e82);
@@ -39,7 +39,6 @@
39
39
  /*@doc Define a largura da barra de rolagem do componente.*/
40
40
  --snk-pesquisa__scrollbar--width: var(--space--medium, 12px);
41
41
 
42
- max-height: 100%;
43
42
  height: 100%;
44
43
  display: flex;
45
44
  flex-direction: column;
@@ -70,7 +69,6 @@
70
69
  .snk-pesquisa__content {
71
70
  display: flex;
72
71
  flex-direction: column;
73
- height: 100%;
74
72
  overflow-y: auto;
75
73
  scrollbar-width: thin;
76
74
 
@@ -148,4 +146,4 @@
148
146
  .snk-pesquisa__btn:hover {
149
147
  /*public*/
150
148
  color: var(--snk-pesquisa__btn-hover--color);
151
- }
149
+ }
@@ -34,6 +34,8 @@ export class SnkSimpleCrud {
34
34
  this.taskbarManager = undefined;
35
35
  this.messagesBuilder = undefined;
36
36
  this.useEnterLikeTab = false;
37
+ this.actionsList = undefined;
38
+ this.configName = undefined;
37
39
  }
38
40
  resolveInMemoryBtns(taskbarButtons) {
39
41
  const newTaskBarConfig = [...taskbarButtons];
@@ -232,7 +234,7 @@ export class SnkSimpleCrud {
232
234
  }
233
235
  getActionsList() {
234
236
  var _a, _b;
235
- return [{
237
+ const hardList = [{
236
238
  value: StringUtils.generateUUID(),
237
239
  label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findColumn", undefined)) !== null && _b !== void 0 ? _b : "Buscar",
238
240
  disableCloseOnSelect: true,
@@ -241,6 +243,16 @@ export class SnkSimpleCrud {
241
243
  ? this.getColumnSearch(actionButton, item)
242
244
  : this.getFieldSearch(actionButton, item)
243
245
  }];
246
+ if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
247
+ const taskbarID = this.getTopTaskBarId();
248
+ return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this.dataState, this.actionsList));
249
+ }
250
+ return hardList.concat(this.actionsList);
251
+ }
252
+ getTopTaskBarId() {
253
+ var _a;
254
+ return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? `snkGridTopTaskbar.finish_edition${PresentationMode.PRIMARY}` :
255
+ `snkGridTopTaskbar.regular${PresentationMode.PRIMARY}`;
244
256
  }
245
257
  async keyDownListener(event) {
246
258
  if (!event.ctrlKey || event.key == undefined || event.key.toUpperCase() !== "F") {
@@ -494,6 +506,46 @@ export class SnkSimpleCrud {
494
506
  "attribute": "use-enter-like-tab",
495
507
  "reflect": false,
496
508
  "defaultValue": "false"
509
+ },
510
+ "actionsList": {
511
+ "type": "unknown",
512
+ "mutable": false,
513
+ "complexType": {
514
+ "original": "Array<Action>",
515
+ "resolved": "Action[]",
516
+ "references": {
517
+ "Array": {
518
+ "location": "global"
519
+ },
520
+ "Action": {
521
+ "location": "import",
522
+ "path": "../snk-taskbar/snk-taskbar"
523
+ }
524
+ }
525
+ },
526
+ "required": false,
527
+ "optional": false,
528
+ "docs": {
529
+ "tags": [],
530
+ "text": "A\u00E7\u00F5es a serem colocadas no bot\u00E3o \"Mais op\u00E7\u00F5es\" do componente snk-taskbar."
531
+ }
532
+ },
533
+ "configName": {
534
+ "type": "string",
535
+ "mutable": true,
536
+ "complexType": {
537
+ "original": "string",
538
+ "resolved": "string",
539
+ "references": {}
540
+ },
541
+ "required": false,
542
+ "optional": false,
543
+ "docs": {
544
+ "tags": [],
545
+ "text": "Usado para salvar as configura\u00E7\u00F5es dos blocos de constru\u00E7\u00E3o."
546
+ },
547
+ "attribute": "config-name",
548
+ "reflect": false
497
549
  }
498
550
  };
499
551
  }
@@ -11,6 +11,9 @@ export class TaskbarActionsButton {
11
11
  await this.hideActions();
12
12
  }
13
13
  }
14
+ async handleClose() {
15
+ await this.hideActions();
16
+ }
14
17
  /**
15
18
  * Exibe a lista de ações.
16
19
  */
@@ -56,12 +59,28 @@ export class TaskbarActionsButton {
56
59
  return this._showDropdown && ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
57
60
  }
58
61
  onSelectAction(iAction) {
59
- const selectedAction = this.actions.find(action => action.value === iAction.id);
62
+ const actions = this.actions.map(action => (Object.assign(Object.assign({}, action), { id: action.value })));
63
+ const selectedAction = this.getSelectedAction(iAction.id, actions);
60
64
  this.taskbarActionSelected.emit(selectedAction);
61
65
  if (!selectedAction.disableCloseOnSelect) {
62
66
  this._showDropdown = false;
63
67
  }
64
68
  }
69
+ getSelectedAction(id, actions) {
70
+ let selectedItem = null;
71
+ for (const item of actions) {
72
+ if (item.id === id) {
73
+ selectedItem = item;
74
+ break;
75
+ }
76
+ if (!(item === null || item === void 0 ? void 0 : item.children))
77
+ continue;
78
+ selectedItem = this.getSelectedAction(id, item.children);
79
+ if (selectedItem)
80
+ break;
81
+ }
82
+ return selectedItem;
83
+ }
65
84
  dropdownItemBuilder(item, _level) {
66
85
  const itemAction = this.actions.find(action => action.value === item.id);
67
86
  if (!itemAction || !itemAction.itemBuilder) {
@@ -296,6 +315,12 @@ export class TaskbarActionsButton {
296
315
  "target": "window",
297
316
  "capture": false,
298
317
  "passive": false
318
+ }, {
319
+ "name": "ezOpenModal",
320
+ "method": "handleClose",
321
+ "target": "window",
322
+ "capture": false,
323
+ "passive": false
299
324
  }];
300
325
  }
301
326
  }
@@ -1,3 +1,20 @@
1
1
  :host {
2
2
  display: flex;
3
+ flex-wrap: wrap;
4
+ }
5
+
6
+ :host.no-wrap {
7
+ flex-wrap: nowrap;
8
+ }
9
+
10
+ :host.full-width{
11
+ width: 100%;
12
+ }
13
+
14
+ :host.align-right{
15
+ justify-content: flex-end;
16
+ }
17
+
18
+ .overflowed {
19
+ display: none;
3
20
  }
@@ -1,4 +1,4 @@
1
- import { ApplicationContext, ElementIDUtils, StringUtils } from '@sankhyalabs/core';
1
+ import { ApplicationContext, ElementIDUtils, OverflowDirection, OverflowWatcher, StringUtils, OVERFLOWED_CLASS_NAME } from '@sankhyalabs/core';
2
2
  import { h, Host } from '@stencil/core';
3
3
  import { AuthorizationConfig } from '../snk-configurator/AuthorizationConfig';
4
4
  import { AuthorizationElements, buildCustomButton, buildElem, TaskbarElement, VisibleWhenForbidden, } from './elements/taskbar-elements';
@@ -6,6 +6,8 @@ import { PresentationMode } from '../../lib/@types';
6
6
  export class SnkTaskbar {
7
7
  constructor() {
8
8
  this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
9
+ this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
10
+ this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
9
11
  this._titleKeyByElement = {
10
12
  [TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
11
13
  [TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
@@ -23,11 +25,14 @@ export class SnkTaskbar {
23
25
  [TaskbarElement.ATTACH]: "snkTaskbar.titleAttach",
24
26
  };
25
27
  this._permissions = undefined;
28
+ this._overFlowedElements = [];
26
29
  this._customElements = undefined;
27
30
  this._customElementsId = undefined;
28
31
  this._slotContainer = undefined;
32
+ this.alignRigth = false;
29
33
  this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
30
34
  this.customContainerId = undefined;
35
+ this.overflowStrategy = 'hiddenItems';
31
36
  this.configName = undefined;
32
37
  this.resourceID = undefined;
33
38
  this.buttons = undefined;
@@ -41,6 +46,7 @@ export class SnkTaskbar {
41
46
  }
42
47
  observeButtons() {
43
48
  this._definitions = undefined;
49
+ requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
44
50
  }
45
51
  // Internal methods
46
52
  elementsFromString(strButtons) {
@@ -221,15 +227,52 @@ export class SnkTaskbar {
221
227
  }
222
228
  this.validatePresentationMode();
223
229
  }
230
+ handleOverFlow(overFlowingElements) {
231
+ const elementsToHandle = overFlowingElements.filter(element => !this.hasToIgnoreOverFlow(element));
232
+ this.resetOverFlowedElements();
233
+ this.doOverFlowElements(elementsToHandle);
234
+ }
235
+ resetOverFlowedElements() {
236
+ this._overFlowedElements.forEach(element => {
237
+ element.classList.remove(OVERFLOWED_CLASS_NAME);
238
+ });
239
+ this._overFlowedElements = [];
240
+ }
241
+ doOverFlowElements(overFlowedElements) {
242
+ overFlowedElements.forEach(element => {
243
+ element.classList.add(OVERFLOWED_CLASS_NAME);
244
+ this._overFlowedElements.push(element);
245
+ });
246
+ }
247
+ hasToIgnoreOverFlow(element) {
248
+ return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME);
249
+ }
250
+ handleOverFlowStrategy() {
251
+ if (this.overflowStrategy === 'hiddenItems') {
252
+ this._overFlowWatcher = new OverflowWatcher(this.buildOverFlowWatcherParams());
253
+ }
254
+ }
255
+ buildOverFlowWatcherParams() {
256
+ return {
257
+ element: this._element,
258
+ callback: this.handleOverFlow.bind(this),
259
+ overFlowDirection: OverflowDirection.HORIZONTAL,
260
+ deltaSize: 1,
261
+ notOverFlow: ["moreOptions"]
262
+ };
263
+ }
224
264
  componentDidLoad() {
225
265
  const dataInfo = { dataUnit: this.dataUnit };
226
266
  ElementIDUtils.addIDInfo(this._element, null, dataInfo);
267
+ this.handleOverFlowStrategy();
227
268
  }
228
269
  componentDidRender() {
229
270
  this.appendCustomElementsInTaskbar();
230
271
  }
231
272
  disconnectedCallback() {
273
+ var _a;
232
274
  this.unlinkAllCustomElements();
275
+ (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
233
276
  }
234
277
  unlinkAllCustomElements() {
235
278
  var _a;
@@ -247,7 +290,7 @@ export class SnkTaskbar {
247
290
  return undefined;
248
291
  }
249
292
  let index = 0;
250
- return (h(Host, null, this.removeEmpty(this._definitions.map((elem) => {
293
+ return (h(Host, { class: this.getHostClasses() }, this.removeEmpty(this._definitions.map((elem) => {
251
294
  var _a;
252
295
  if (elem === TaskbarElement.DIVIDER) {
253
296
  index = 0;
@@ -265,7 +308,12 @@ export class SnkTaskbar {
265
308
  return this.addCustomElementContainer(elem);
266
309
  }
267
310
  return h("slot", { name: elem });
268
- })), h("div", { class: "taskbar-custom-elements-container" }, h("slot", { name: this.customSlotId }))));
311
+ })), h("div", { class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, h("slot", { name: this.customSlotId }))));
312
+ }
313
+ getHostClasses() {
314
+ if (this.overflowStrategy !== 'hiddenItems')
315
+ return 'no-wrap';
316
+ return `full-width ${this.alignRigth ? 'align-right' : ""}`;
269
317
  }
270
318
  static get is() { return "snk-taskbar"; }
271
319
  static get encapsulation() { return "scoped"; }
@@ -281,6 +329,24 @@ export class SnkTaskbar {
281
329
  }
282
330
  static get properties() {
283
331
  return {
332
+ "alignRigth": {
333
+ "type": "boolean",
334
+ "mutable": false,
335
+ "complexType": {
336
+ "original": "boolean",
337
+ "resolved": "boolean",
338
+ "references": {}
339
+ },
340
+ "required": false,
341
+ "optional": false,
342
+ "docs": {
343
+ "tags": [],
344
+ "text": "Usado para determinar O alinhamento dos items na taskbar."
345
+ },
346
+ "attribute": "align-rigth",
347
+ "reflect": false,
348
+ "defaultValue": "false"
349
+ },
284
350
  "customSlotId": {
285
351
  "type": "string",
286
352
  "mutable": false,
@@ -316,6 +382,24 @@ export class SnkTaskbar {
316
382
  "attribute": "custom-container-id",
317
383
  "reflect": false
318
384
  },
385
+ "overflowStrategy": {
386
+ "type": "string",
387
+ "mutable": false,
388
+ "complexType": {
389
+ "original": "'hiddenItems' | 'none'",
390
+ "resolved": "\"hiddenItems\" | \"none\"",
391
+ "references": {}
392
+ },
393
+ "required": false,
394
+ "optional": false,
395
+ "docs": {
396
+ "tags": [],
397
+ "text": "Define como ser\u00E1 o comportamento da taskbar quando ocorrer overflow"
398
+ },
399
+ "attribute": "overflow-strategy",
400
+ "reflect": false,
401
+ "defaultValue": "'hiddenItems'"
402
+ },
319
403
  "configName": {
320
404
  "type": "string",
321
405
  "mutable": false,
@@ -472,7 +556,7 @@ export class SnkTaskbar {
472
556
  "mutable": true,
473
557
  "complexType": {
474
558
  "original": "PresentationMode",
475
- "resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY",
559
+ "resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY | PresentationMode.SINGLE_TASKBAR",
476
560
  "references": {
477
561
  "PresentationMode": {
478
562
  "location": "import",
@@ -515,6 +599,7 @@ export class SnkTaskbar {
515
599
  static get states() {
516
600
  return {
517
601
  "_permissions": {},
602
+ "_overFlowedElements": {},
518
603
  "_customElements": {},
519
604
  "_customElementsId": {},
520
605
  "_slotContainer": {}
@@ -2,6 +2,7 @@ export var PresentationMode;
2
2
  (function (PresentationMode) {
3
3
  PresentationMode["PRIMARY"] = "primary";
4
4
  PresentationMode["SECONDARY"] = "secondary";
5
+ PresentationMode["SINGLE_TASKBAR"] = "singleTaskbar";
5
6
  })(PresentationMode || (PresentationMode = {}));
6
7
  export var DataExporterOption;
7
8
  (function (DataExporterOption) {
@@ -2,11 +2,12 @@ import { FormConfigFetcher } from "../http/data-fetcher/fetchers/form-config-fet
2
2
  import GridConfigFetcher from "../http/data-fetcher/fetchers/grid-config-fetcher";
3
3
  import FilterBarConfigFetcher from "../http/data-fetcher/fetchers/filter-bar-config-fetcher";
4
4
  import PersonalizedFilterFetcher from "../http/data-fetcher/fetchers/personalized-filter-fetcher";
5
- const CONFIG_SOURCE = {
6
- form: "form",
7
- grid: "grid",
8
- filterBar: "filterBar"
9
- };
5
+ var CONFIG_SOURCE;
6
+ (function (CONFIG_SOURCE) {
7
+ CONFIG_SOURCE["form"] = "form";
8
+ CONFIG_SOURCE["grid"] = "grid";
9
+ CONFIG_SOURCE["filterBar"] = "filterBar";
10
+ })(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
10
11
  export class ConfigStorage {
11
12
  static preload(resourceID, configName) {
12
13
  ConfigStorage.loadFormConfig(configName, resourceID);
@@ -34,13 +35,11 @@ export class ConfigStorage {
34
35
  return ConfigStorage.configById.get(cacheID);
35
36
  }
36
37
  static async saveFilterBarConfig(config, name, resourceID) {
37
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.filterBar, resourceID);
38
- this.configById.delete(cacheID);
38
+ await this.deleteFilterBarConfigCache(name, resourceID);
39
39
  return this.filterBarConfigFetcher.saveConfig(config, resourceID, name);
40
40
  }
41
41
  static async saveFormConfig(config, name, resourceID) {
42
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.form, resourceID);
43
- this.configById.delete(cacheID);
42
+ await this.deleteFormConfigCache(name, resourceID);
44
43
  return this.formConfigFetcher.saveConfig(config, name, resourceID);
45
44
  }
46
45
  static async saveCardState(config, name, resourceID) {
@@ -50,18 +49,16 @@ export class ConfigStorage {
50
49
  if (config == undefined) {
51
50
  return;
52
51
  }
53
- const cacheID = this.buildCacheID(name, CONFIG_SOURCE.grid, resourceID);
54
- this.configById.delete(cacheID);
52
+ await this.deleteGridConfigCache(name, resourceID);
55
53
  return this.gridConfigFetcher.saveConfig(config, name, resourceID);
56
54
  }
57
55
  static async loadPersonalizedFilter(filterId, resourceID, configName) {
58
56
  return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName);
59
57
  }
60
58
  static async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
61
- //Ao criar ou alterar um filtro personalizado,
59
+ //Ao criar ou alterar um filtro personalizado,
62
60
  //precisamos remover o cache do status da filterbar.
63
- const cacheID = this.buildCacheID(configName, CONFIG_SOURCE.filterBar, resourceID);
64
- this.configById.delete(cacheID);
61
+ await this.deleteFilterBarConfigCache(configName, resourceID);
65
62
  return this.personalizedFilterFetcher.savePersonalizedFilter(personalizedFilter, resourceID, configName);
66
63
  }
67
64
  static async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
@@ -70,6 +67,19 @@ export class ConfigStorage {
70
67
  static async validatePersonalizedFilter(dataUnitName, expression) {
71
68
  return this.personalizedFilterFetcher.validatePersonalizedFilter(dataUnitName, expression);
72
69
  }
70
+ static async deleteGridConfigCache(name, resourceID) {
71
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.grid);
72
+ }
73
+ static async deleteFormConfigCache(name, resourceID) {
74
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.form);
75
+ }
76
+ static async deleteFilterBarConfigCache(name, resourceID) {
77
+ await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
78
+ }
79
+ static async deleteConfigCache(name, resourceID, source) {
80
+ const cacheID = ConfigStorage.buildCacheID(name, source, resourceID);
81
+ this.configById.delete(cacheID);
82
+ }
73
83
  static buildCacheID(name, source, resourceID) {
74
84
  if (name == undefined) {
75
85
  return `req_${source}_${resourceID}`;
@@ -13,7 +13,7 @@ export default class InMemoryLoader {
13
13
  this.dataUnit.loadMetadata().then(() => this.dataUnit.loadData());
14
14
  }
15
15
  getRecordsToLoad() {
16
- if (this._initialRecords == undefined && this.dataUnit.records.length > 0) {
16
+ if (this._initialRecords == undefined || this.dataUnit.records.length > 0) {
17
17
  this._initialRecords = this.dataUnit.records;
18
18
  }
19
19
  return this._initialRecords;