@sankhyalabs/sankhyablocks 8.15.0-dev.3 → 8.15.0-dev.30

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 (248) hide show
  1. package/dist/cjs/{ConfigStorage-0d507a8f.js → ConfigStorage-d4c99a5e.js} +27 -17
  2. package/dist/cjs/{DataFetcher-ba94ed5b.js → DataFetcher-99f0f6ed.js} +5 -3
  3. package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
  4. package/dist/cjs/{SnkFormConfigManager-467907f6.js → SnkFormConfigManager-3621bfc4.js} +2 -2
  5. package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-e7dcf408.js} +13 -0
  6. package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-5161d082.js} +1 -1
  7. package/dist/cjs/{form-config-fetcher-df043d3d.js → form-config-fetcher-9f1a13ca.js} +1 -1
  8. package/dist/cjs/{index-0e663819.js → index-0922807b.js} +1 -0
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{dataunit-fetcher-de65b9fc.js → pesquisa-fetcher-c416a6b7.js} +249 -34
  11. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  12. package/dist/cjs/snk-actions-button_2.cjs.entry.js +23 -8
  13. package/dist/cjs/snk-application.cjs.entry.js +98 -9
  14. package/dist/cjs/snk-attach.cjs.entry.js +396 -58
  15. package/dist/cjs/snk-crud.cjs.entry.js +14 -11
  16. package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
  17. package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-82c08a8c.js} +1 -1
  18. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  19. package/dist/cjs/snk-detail-view.cjs.entry.js +10 -11
  20. package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
  21. package/dist/cjs/snk-filter-bar.cjs.entry.js +68 -11
  22. package/dist/cjs/snk-filter-item.cjs.entry.js +3 -0
  23. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -4
  24. package/dist/cjs/snk-filter-modal.cjs.entry.js +16 -1
  25. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
  26. package/dist/cjs/snk-form-config.cjs.entry.js +2 -2
  27. package/dist/cjs/snk-form.cjs.entry.js +4 -4
  28. package/dist/cjs/snk-grid-config.cjs.entry.js +3 -3
  29. package/dist/cjs/snk-grid.cjs.entry.js +45 -20
  30. package/dist/cjs/{snk-guides-viewer-7e87ffce.js → snk-guides-viewer-bd69fce4.js} +11 -12
  31. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -10
  32. package/dist/cjs/snk-personalized-filter.cjs.entry.js +4 -4
  33. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  34. package/dist/cjs/snk-simple-crud.cjs.entry.js +22 -11
  35. package/dist/cjs/snk-taskbar.cjs.entry.js +91 -7
  36. package/dist/cjs/{taskbar-elements-b8c428a9.js → taskbar-elements-1e4fb2e0.js} +9 -9
  37. package/dist/collection/collection-manifest.json +1 -1
  38. package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
  39. package/dist/collection/components/snk-application/snk-application.js +111 -5
  40. package/dist/collection/components/snk-attach/snk-attach.js +194 -38
  41. package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
  42. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
  43. package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
  44. package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
  45. package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
  46. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
  47. package/dist/collection/components/snk-attach/structure/index.js +6 -3
  48. package/dist/collection/components/snk-crud/snk-crud.js +42 -4
  49. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
  50. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +4 -4
  51. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
  52. package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -3
  53. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
  54. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +3 -0
  55. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +84 -2
  56. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +0 -1
  57. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +23 -1
  58. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +175 -6
  59. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +5 -1
  60. package/dist/collection/components/snk-grid/snk-grid.js +75 -16
  61. package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
  62. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
  63. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +55 -3
  64. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +18 -2
  65. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +8 -8
  66. package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
  67. package/dist/collection/components/snk-taskbar/snk-taskbar.js +129 -7
  68. package/dist/collection/lib/@types/index.js +1 -0
  69. package/dist/collection/lib/configs/ConfigStorage.js +24 -14
  70. package/dist/collection/lib/dataUnit/InMemoryLoader.js +1 -1
  71. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +5 -3
  72. package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
  73. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
  74. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
  75. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
  76. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
  77. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
  78. package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
  79. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +31 -3
  80. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +48 -29
  81. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +1 -1
  82. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
  83. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +10 -4
  84. package/dist/collection/lib/index.js +1 -1
  85. package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
  86. package/dist/components/ConfigStorage.js +25 -15
  87. package/dist/components/DataFetcher.js +5 -3
  88. package/dist/components/SnkMessageBuilder.js +13 -0
  89. package/dist/components/dataunit-fetcher.js +90 -37
  90. package/dist/components/index2.js +1 -0
  91. package/dist/components/snk-actions-button2.js +1 -0
  92. package/dist/components/snk-application2.js +94 -3
  93. package/dist/components/snk-attach2.js +400 -56
  94. package/dist/components/snk-crud.js +9 -3
  95. package/dist/components/snk-data-exporter2.js +1 -1
  96. package/dist/components/snk-detail-view2.js +4 -4
  97. package/dist/components/snk-entity-list.js +5 -3
  98. package/dist/components/snk-filter-bar2.js +71 -9
  99. package/dist/components/snk-filter-item2.js +3 -0
  100. package/dist/components/snk-filter-modal-item2.js +0 -1
  101. package/dist/components/snk-filter-modal.js +21 -3
  102. package/dist/components/snk-filter-multi-select.js +2 -1
  103. package/dist/components/snk-grid2.js +42 -15
  104. package/dist/components/snk-personalized-filter2.js +1 -1
  105. package/dist/components/snk-pesquisa2.js +1 -1
  106. package/dist/components/snk-simple-crud2.js +17 -3
  107. package/dist/components/snk-taskbar2.js +103 -15
  108. package/dist/components/taskbar-actions-button2.js +18 -2
  109. package/dist/esm/{ConfigStorage-379a9cba.js → ConfigStorage-39ed8aeb.js} +27 -17
  110. package/dist/esm/{DataFetcher-aa159c5a.js → DataFetcher-a650ae58.js} +5 -3
  111. package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
  112. package/dist/esm/{SnkFormConfigManager-587e9030.js → SnkFormConfigManager-692e20c7.js} +2 -2
  113. package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0fb796b9.js} +13 -0
  114. package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-17dc5b5e.js} +1 -1
  115. package/dist/esm/{form-config-fetcher-36219cd3.js → form-config-fetcher-f121f880.js} +1 -1
  116. package/dist/esm/{index-1564817d.js → index-0ece87a6.js} +1 -0
  117. package/dist/esm/loader.js +1 -1
  118. package/dist/esm/{dataunit-fetcher-e218c6d2.js → pesquisa-fetcher-ab16a2e8.js} +249 -35
  119. package/dist/esm/sankhyablocks.js +1 -1
  120. package/dist/esm/snk-actions-button_2.entry.js +23 -8
  121. package/dist/esm/snk-application.entry.js +98 -9
  122. package/dist/esm/snk-attach.entry.js +397 -59
  123. package/dist/esm/snk-crud.entry.js +14 -11
  124. package/dist/esm/snk-data-exporter.entry.js +5 -5
  125. package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-5d201fb3.js} +1 -1
  126. package/dist/esm/snk-data-unit.entry.js +2 -2
  127. package/dist/esm/snk-detail-view.entry.js +10 -11
  128. package/dist/esm/snk-entity-list.entry.js +5 -3
  129. package/dist/esm/snk-filter-bar.entry.js +68 -11
  130. package/dist/esm/snk-filter-item.entry.js +3 -0
  131. package/dist/esm/snk-filter-modal-item.entry.js +3 -4
  132. package/dist/esm/snk-filter-modal.entry.js +16 -1
  133. package/dist/esm/snk-filter-multi-select.entry.js +2 -1
  134. package/dist/esm/snk-form-config.entry.js +2 -2
  135. package/dist/esm/snk-form.entry.js +4 -4
  136. package/dist/esm/snk-grid-config.entry.js +3 -3
  137. package/dist/esm/snk-grid.entry.js +45 -20
  138. package/dist/esm/{snk-guides-viewer-2134aba2.js → snk-guides-viewer-fde82cc1.js} +11 -12
  139. package/dist/esm/snk-guides-viewer.entry.js +9 -10
  140. package/dist/esm/snk-personalized-filter.entry.js +4 -4
  141. package/dist/esm/snk-pesquisa.entry.js +1 -1
  142. package/dist/esm/snk-simple-crud.entry.js +21 -10
  143. package/dist/esm/snk-taskbar.entry.js +92 -8
  144. package/dist/esm/{taskbar-elements-26c981af.js → taskbar-elements-846c027c.js} +9 -9
  145. package/dist/sankhyablocks/{p-ff6064e7.js → p-05243555.js} +1 -1
  146. package/dist/sankhyablocks/{p-cb7419e0.entry.js → p-0b0b36ac.entry.js} +1 -1
  147. package/dist/sankhyablocks/p-11ad137d.entry.js +1 -0
  148. package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
  149. package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
  150. package/dist/sankhyablocks/p-38289a55.js +1 -0
  151. package/dist/sankhyablocks/p-3e2e2424.entry.js +1 -0
  152. package/dist/sankhyablocks/p-50783a8b.js +1 -0
  153. package/dist/sankhyablocks/p-57212bb5.js +1 -0
  154. package/dist/sankhyablocks/p-5f5b58b6.entry.js +1 -0
  155. package/dist/sankhyablocks/p-67aedbe0.js +56 -0
  156. package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
  157. package/dist/sankhyablocks/{p-2028633c.js → p-725d04ba.js} +1 -1
  158. package/dist/sankhyablocks/p-827e4b01.entry.js +1 -0
  159. package/dist/sankhyablocks/p-84bb8f47.entry.js +1 -0
  160. package/dist/sankhyablocks/{p-6977a26c.entry.js → p-86801b08.entry.js} +1 -1
  161. package/dist/sankhyablocks/p-8c13d8d6.entry.js +1 -0
  162. package/dist/sankhyablocks/p-8c49760e.js +1 -0
  163. package/dist/sankhyablocks/p-91b7f78a.entry.js +1 -0
  164. package/dist/sankhyablocks/p-9d608b62.entry.js +1 -0
  165. package/dist/sankhyablocks/{p-0d7863ed.js → p-a13ccb86.js} +1 -1
  166. package/dist/sankhyablocks/p-b7004423.entry.js +1 -0
  167. package/dist/sankhyablocks/{p-9695f78b.js → p-be75153c.js} +1 -1
  168. package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
  169. package/dist/sankhyablocks/p-c4874327.entry.js +1 -0
  170. package/dist/sankhyablocks/p-c6247955.js +65 -0
  171. package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
  172. package/dist/sankhyablocks/p-d4802f81.entry.js +1 -0
  173. package/dist/sankhyablocks/{p-aaa1438e.entry.js → p-e3bd000e.entry.js} +1 -1
  174. package/dist/sankhyablocks/{p-32f0935f.js → p-f3d1c48e.js} +1 -1
  175. package/dist/sankhyablocks/p-fb842329.entry.js +1 -0
  176. package/dist/sankhyablocks/{p-729f5f5b.entry.js → p-fcdcb0e2.entry.js} +1 -1
  177. package/dist/sankhyablocks/p-fd0a8d68.entry.js +11 -0
  178. package/dist/sankhyablocks/{p-35fe6e61.entry.js → p-fdc4cb9b.entry.js} +1 -1
  179. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  180. package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
  181. package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
  182. package/dist/types/components/snk-application/snk-application.d.ts +12 -2
  183. package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
  184. package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
  185. package/dist/types/components/snk-attach/snk-attach.d.ts +28 -6
  186. package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
  187. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
  188. package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
  189. package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
  190. package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
  191. package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
  192. package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
  193. package/dist/types/components/snk-crud/snk-crud.d.ts +9 -0
  194. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -1
  195. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +19 -1
  196. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +30 -1
  197. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +7 -1
  198. package/dist/types/components/snk-grid/snk-grid.d.ts +10 -0
  199. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -1
  200. package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +1 -0
  201. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +27 -1
  202. package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +1 -0
  203. package/dist/types/components.d.ts +177 -13
  204. package/dist/types/lib/@types/index.d.ts +2 -1
  205. package/dist/types/lib/configs/ConfigStorage.d.ts +4 -0
  206. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
  207. package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
  208. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
  209. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
  210. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
  211. package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
  212. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -0
  213. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +2 -0
  214. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
  215. package/dist/types/lib/index.d.ts +1 -1
  216. package/package.json +15 -6
  217. package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
  218. package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
  219. package/dist/sankhyablocks/p-0cd2e986.entry.js +0 -1
  220. package/dist/sankhyablocks/p-145c4434.js +0 -1
  221. package/dist/sankhyablocks/p-20726710.entry.js +0 -1
  222. package/dist/sankhyablocks/p-4396d1a6.js +0 -56
  223. package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
  224. package/dist/sankhyablocks/p-4b0ea83f.entry.js +0 -1
  225. package/dist/sankhyablocks/p-5534e08c.js +0 -1
  226. package/dist/sankhyablocks/p-58218eb7.entry.js +0 -1
  227. package/dist/sankhyablocks/p-78777ae0.entry.js +0 -1
  228. package/dist/sankhyablocks/p-7915c452.entry.js +0 -1
  229. package/dist/sankhyablocks/p-953346b9.entry.js +0 -1
  230. package/dist/sankhyablocks/p-a037f5b4.entry.js +0 -1
  231. package/dist/sankhyablocks/p-a49b1019.entry.js +0 -1
  232. package/dist/sankhyablocks/p-a7923832.entry.js +0 -1
  233. package/dist/sankhyablocks/p-b52c2175.js +0 -1
  234. package/dist/sankhyablocks/p-ba627e85.js +0 -60
  235. package/dist/sankhyablocks/p-bf9b7149.entry.js +0 -11
  236. package/dist/sankhyablocks/p-c259545b.entry.js +0 -1
  237. package/dist/sankhyablocks/p-ca8e7da0.entry.js +0 -1
  238. package/dist/sankhyablocks/p-d1677df0.entry.js +0 -1
  239. package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
  240. package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
  241. package/dist/sankhyablocks/p-e6380c60.js +0 -1
  242. package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
  243. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
  244. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
  245. /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
  246. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
  247. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
  248. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -0,0 +1,111 @@
1
+ import { Action, ApplicationContext, StringUtils } from "@sankhyalabs/core";
2
+ import { SaveErrorsEnum } from "../../../../../lib/http/data-fetcher/fetchers/AttachFetcher/interfaces";
3
+ import { AutorizationType } from "../../../../../lib/http/data-fetcher/fetchers/auth-fetcher";
4
+ import { attachFetcherMetadataBuilder } from "../../builder/attach-crud-config.builder";
5
+ import { VIEW_MODE } from "../../../../../lib/utils/constants";
6
+ const SERVICE_LOAD = "Attach.load";
7
+ export class AttachFetcherDataUnitFactory {
8
+ constructor(getMessage) {
9
+ this.getMessage = getMessage;
10
+ this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
11
+ }
12
+ initLoaders(dataUnit, fetcher, onSuccess) {
13
+ dataUnit.metadataLoader = (dataUnit) => this.metadataLoader(dataUnit);
14
+ dataUnit.dataLoader = (dataUnit, request) => this.dataLoader(dataUnit, request);
15
+ dataUnit.saveLoader = (_, changes) => this.saveLoader(changes, fetcher).then((recordIds) => {
16
+ if (recordIds.length)
17
+ onSuccess();
18
+ return recordIds;
19
+ });
20
+ dataUnit.removeLoader = (dataUnit, ids) => this.removeLoader(dataUnit, ids, fetcher).then((recordIds) => {
21
+ if (recordIds.length)
22
+ onSuccess();
23
+ return recordIds;
24
+ });
25
+ }
26
+ metadataLoader(_) {
27
+ return Promise.resolve(attachFetcherMetadataBuilder);
28
+ }
29
+ async dataLoader(_, request) {
30
+ if (!request.source) {
31
+ return Promise.resolve({ records: [] });
32
+ }
33
+ const criteria = {
34
+ criteria: {
35
+ codata: request.source,
36
+ tipoAnexo: "N"
37
+ }
38
+ };
39
+ const applicationDataFetcher = await this._application.getDataFetcher();
40
+ const { anexos: { anexo = [] } } = await applicationDataFetcher.callServiceBroker(SERVICE_LOAD, JSON.stringify(criteria));
41
+ const records = [];
42
+ anexo.forEach((param) => {
43
+ records.push(Object.assign({ __record__id__: StringUtils.generateUUID(), CAMINHO_ARQUIVO: [{
44
+ name: param === null || param === void 0 ? void 0 : param.ARQUIVO,
45
+ }] }, param));
46
+ });
47
+ return Promise.resolve({ records });
48
+ }
49
+ saveLoader(changes, fetcher) {
50
+ return new Promise((resolve) => {
51
+ const change = Array.isArray(changes) ? changes[0] : {};
52
+ fetcher.save(change)
53
+ .then(resolve)
54
+ .catch((error) => {
55
+ if (error.message === SaveErrorsEnum.DESCRIPTION_CANNOT_BE_CHANGED) {
56
+ this._application.alert(this.getMessage('snkAttach.alertValidation.descriptionCannotBeChanged.title'), this.getMessage('snkAttach.alertValidation.descriptionCannotBeChanged.message'));
57
+ return resolve([]);
58
+ }
59
+ if (error.message === SaveErrorsEnum.LINK_AND_FILE_AT_THE_SAME_TIME) {
60
+ this._application.alert(this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.title'), this.getMessage('snkAttach.alertValidation.fileAndLinkAtTheSameTime.message'));
61
+ return resolve([]);
62
+ }
63
+ if (error.message === SaveErrorsEnum.ANY_LINK_OR_FILE_FILLED) {
64
+ this._application.alert(this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.title'), this.getMessage('snkAttach.alertValidation.anyLinkOrFileFilled.message'));
65
+ return resolve([]);
66
+ }
67
+ if (error.message) {
68
+ this._application.error((error.title || error.name), error.message);
69
+ return resolve([]);
70
+ }
71
+ resolve([]);
72
+ });
73
+ });
74
+ }
75
+ removeLoader(dataUnit, ids, fetcher) {
76
+ return new Promise((resolve) => {
77
+ dataUnit.getSelectionInfo().records.forEach(async (record) => {
78
+ this._application.hasAccess(AutorizationType.REMOVE)
79
+ .then(async (hasAccess) => {
80
+ if (hasAccess) {
81
+ await fetcher.delete(record);
82
+ resolve(ids);
83
+ }
84
+ });
85
+ });
86
+ });
87
+ }
88
+ getFilters() {
89
+ throw new Error('Method not implemented.');
90
+ }
91
+ getInterceptions(dataUnit, action, crudRef) {
92
+ return new Promise((resolve) => {
93
+ if (action.type === Action.EDITION_CANCELED) {
94
+ if (!dataUnit.isDirty())
95
+ return resolve(action);
96
+ return this._application.confirm(this.getMessage('snkAttach.cancelConfirmation.title'), this.getMessage('snkAttach.cancelConfirmation.message')).then((cancellationConfirmed) => {
97
+ if (cancellationConfirmed) {
98
+ crudRef.goToView(VIEW_MODE.GRID);
99
+ return resolve(action);
100
+ }
101
+ return resolve(undefined);
102
+ });
103
+ }
104
+ if (action.type === Action.DATA_SAVED) {
105
+ dataUnit.loadData();
106
+ return resolve(action);
107
+ }
108
+ resolve(action);
109
+ });
110
+ }
111
+ }
@@ -1,3 +1,6 @@
1
- export * from './data-unit-builder';
2
- export * from './taskbar-builder';
3
- export * from './crud-config-builder';
1
+ export * from './fetcher/facade/fetcher.facade';
2
+ export * from './fetcher/factory/anexo-sistema-data-unit.factory';
3
+ export * from './fetcher/factory/attach-fetcher-data-unit.factory';
4
+ export * from './builder/taskbar-builder';
5
+ export * from './builder/anexo-sistema-crud-config.builder';
6
+ export * from './builder/attach-crud-config.builder';
@@ -20,6 +20,7 @@ export class SnkCrud {
20
20
  this._canEdit = undefined;
21
21
  this._resourceID = undefined;
22
22
  this.configName = undefined;
23
+ this.filterBarTitle = undefined;
23
24
  this.selectionToastConfig = undefined;
24
25
  this.showActionButtons = false;
25
26
  this.actionsList = undefined;
@@ -30,6 +31,7 @@ export class SnkCrud {
30
31
  this.presentationMode = PresentationMode.PRIMARY;
31
32
  this.messagesBuilder = undefined;
32
33
  this.useEnterLikeTab = false;
34
+ this.disablePersonalizedFilter = undefined;
33
35
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
34
36
  }
35
37
  /**
@@ -162,7 +164,8 @@ export class SnkCrud {
162
164
  window.removeEventListener("keydown", this._keyDownHandler);
163
165
  }
164
166
  async initKeyboardManager() {
165
- const keyboardManager = await this._application.getKeyboardManager();
167
+ var _a;
168
+ const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
166
169
  if (keyboardManager) {
167
170
  const dataUnit = this._dataUnit || await this._snkDataUnit.getDataUnit();
168
171
  async function saveDataUnitHandlingFocus() {
@@ -211,7 +214,8 @@ export class SnkCrud {
211
214
  }
212
215
  }
213
216
  async removeShortcuts() {
214
- const keyboardManager = await this._application.getKeyboardManager();
217
+ var _a;
218
+ const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
215
219
  if (keyboardManager) {
216
220
  keyboardManager
217
221
  .unbind("F6")
@@ -278,7 +282,7 @@ export class SnkCrud {
278
282
  return;
279
283
  }
280
284
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
281
- return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
285
+ return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
282
286
  }
283
287
  static get is() { return "snk-crud"; }
284
288
  static get encapsulation() { return "scoped"; }
@@ -311,6 +315,23 @@ export class SnkCrud {
311
315
  "attribute": "config-name",
312
316
  "reflect": false
313
317
  },
318
+ "filterBarTitle": {
319
+ "type": "string",
320
+ "mutable": false,
321
+ "complexType": {
322
+ "original": "string",
323
+ "resolved": "string",
324
+ "references": {}
325
+ },
326
+ "required": false,
327
+ "optional": false,
328
+ "docs": {
329
+ "tags": [],
330
+ "text": "T\u00EDtulo que ser\u00E1 apresentado na barra de filtros"
331
+ },
332
+ "attribute": "filter-bar-title",
333
+ "reflect": false
334
+ },
314
335
  "selectionToastConfig": {
315
336
  "type": "unknown",
316
337
  "mutable": false,
@@ -459,7 +480,7 @@ export class SnkCrud {
459
480
  "mutable": false,
460
481
  "complexType": {
461
482
  "original": "PresentationMode",
462
- "resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY",
483
+ "resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY | PresentationMode.SINGLE_TASKBAR",
463
484
  "references": {
464
485
  "PresentationMode": {
465
486
  "location": "import",
@@ -514,6 +535,23 @@ export class SnkCrud {
514
535
  "attribute": "use-enter-like-tab",
515
536
  "reflect": false,
516
537
  "defaultValue": "false"
538
+ },
539
+ "disablePersonalizedFilter": {
540
+ "type": "boolean",
541
+ "mutable": false,
542
+ "complexType": {
543
+ "original": "boolean",
544
+ "resolved": "boolean",
545
+ "references": {}
546
+ },
547
+ "required": false,
548
+ "optional": false,
549
+ "docs": {
550
+ "tags": [],
551
+ "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)."
552
+ },
553
+ "attribute": "disable-personalized-filter",
554
+ "reflect": false
517
555
  }
518
556
  };
519
557
  }
@@ -25,7 +25,7 @@ snk-form-view {
25
25
  position: relative;
26
26
  padding-left: 0px;
27
27
  padding-top: 0px;
28
-
28
+
29
29
  /*public*/
30
30
  padding-right: var(--snk-guides-viewer--space-large);
31
31
  padding-bottom: var(--snk-guides-viewer--space-large);
@@ -57,6 +57,15 @@ snk-form-view {
57
57
  margin-bottom: var(--snk-guides-viewer--space-medium);
58
58
  }
59
59
 
60
+ .snk-guides-viewer__header-breadcrumb{
61
+ width: 25%;
62
+ display: flex;
63
+ }
64
+
65
+ .snk-guides-viewer__header-taskbar{
66
+ width: 75%;
67
+ }
68
+
60
69
  .snk-guides-viewer__container {
61
70
  /*private*/
62
71
  display: grid;
@@ -88,4 +97,4 @@ snk-form-view {
88
97
  min-height: 100%;
89
98
  align-items: flex-start;
90
99
  align-content: flex-start;
91
- }
100
+ }
@@ -134,7 +134,7 @@ export class SnkGuidesViewer {
134
134
  });
135
135
  this._guides = this._guides.map(guide => {
136
136
  if (guide.id === guideItem.id) {
137
- return Object.assign(Object.assign({}, guide), guideItem);
137
+ return Object.assign(Object.assign(Object.assign({}, guide), guideItem), (guideItem.children !== undefined ? {} : { children: undefined }));
138
138
  }
139
139
  return guide;
140
140
  });
@@ -383,7 +383,7 @@ export class SnkGuidesViewer {
383
383
  }
384
384
  buildTaskBar() {
385
385
  var _a;
386
- return h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, 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" }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
386
+ return h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, 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", alignRigth: true }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
387
387
  }
388
388
  async dataUnitActionHandler(action) {
389
389
  var _a;
@@ -442,7 +442,7 @@ export class SnkGuidesViewer {
442
442
  }
443
443
  this.loadTaskbarProcessor();
444
444
  const showGuides = this._guides && (this._guides.length > 1);
445
- return (h("section", { class: "snk-guides-viewer" }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "ez-col ez-col--sd-6 ez-col--tb-6 ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.getMessage("snkCrud.title")), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
445
+ return (h("section", { class: "snk-guides-viewer" }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.getMessage("snkCrud.title")), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
446
446
  h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
447
447
  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) })
448
448
  :
@@ -690,7 +690,7 @@ export class SnkGuidesViewer {
690
690
  "mutable": false,
691
691
  "complexType": {
692
692
  "original": "PresentationMode",
693
- "resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY",
693
+ "resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY | PresentationMode.SINGLE_TASKBAR",
694
694
  "references": {
695
695
  "PresentationMode": {
696
696
  "location": "import",
@@ -239,7 +239,7 @@ export class SnkDataExporter {
239
239
  pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
240
240
  pkObject['pks'] = [];
241
241
  }
242
- const dataFields = { nome: name, tipo: type, valor: value };
242
+ const dataFields = { nome: name, tipo: this.parseDataType(type), valor: value };
243
243
  fields['fields'].push(dataFields);
244
244
  pkObject['pks'].push(fields);
245
245
  });
@@ -56,16 +56,18 @@ export class SnkEntityList {
56
56
  this.loadListSource();
57
57
  }
58
58
  optionLoader(searchArgument) {
59
- var _a, _b, _c, _d;
59
+ var _a, _b, _c, _d, _e, _f;
60
60
  const { mode, argument } = searchArgument;
61
61
  if (this._application === undefined) {
62
62
  return;
63
63
  }
64
64
  const searchOptions = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.searchContext) === null || _c === void 0 ? void 0 : _c.searchOptions;
65
+ const criteria = (_e = (_d = this.config) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.criteria;
65
66
  const options = {
66
- entityDescription: (_d = this.config) === null || _d === void 0 ? void 0 : _d.label,
67
+ entityDescription: (_f = this.config) === null || _f === void 0 ? void 0 : _f.label,
67
68
  entity: this._entityName,
68
- searchOptions: searchOptions
69
+ searchOptions: searchOptions,
70
+ criteria,
69
71
  };
70
72
  return this._application.executePreparedSearch(mode, argument, options);
71
73
  }
@@ -10,7 +10,8 @@ export class SnkFilterMultiSelect {
10
10
  * Emitido quando acontece a alteração de valor do componente snk-filter-multi-select
11
11
  */
12
12
  ezChangeListener(evt) {
13
- this.value = evt.detail.value;
13
+ var _a;
14
+ this.value = (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value;
14
15
  this.valueChanged.emit(this.value);
15
16
  }
16
17
  /**
@@ -254,6 +254,9 @@ export class SnkFilterItem {
254
254
  }
255
255
  canClearFilter() {
256
256
  const { value, groupedItems = [] } = this.config;
257
+ if (value != undefined && this.config.type === FilterItemType.MULTI_LIST) {
258
+ return value.some((item) => item.check);
259
+ }
257
260
  return value !== undefined || groupedItems.some(item => item.visible);
258
261
  }
259
262
  getRightIconName() {
@@ -15,6 +15,15 @@ export class SnkFilterModal {
15
15
  this.closeModal = undefined;
16
16
  this.addPersonalizedFilter = undefined;
17
17
  this.editPersonalizedFilter = undefined;
18
+ this.deletePersonalizedFilter = undefined;
19
+ this.filtersToDelete = [];
20
+ this.disablePersonalizedFilter = undefined;
21
+ }
22
+ /**
23
+ * Emitido quando um filtro personalizado é deletado.
24
+ */
25
+ deletePersonalizedFilterListener(event) {
26
+ this.filtersToDelete.push(event.detail);
18
27
  }
19
28
  getCustomMessage(key, params) {
20
29
  var _a;
@@ -82,6 +91,12 @@ export class SnkFilterModal {
82
91
  if (this.isValidCustomFilter(filterPersonalized)) {
83
92
  this.applyFilters(this.filters);
84
93
  }
94
+ if (this.filtersToDelete.length > 0) {
95
+ this.filtersToDelete.forEach(filter => {
96
+ this.deletePersonalizedFilter(filter, this.configName);
97
+ });
98
+ this.filtersToDelete = [];
99
+ }
85
100
  }
86
101
  isValidCustomFilter(filterPersonalized) {
87
102
  const isValid = PersonalizedFilterUtils.validateVariableValues(filterPersonalized);
@@ -219,7 +234,7 @@ export class SnkFilterModal {
219
234
  const customFilters = this.filters.filter(filter => filter.filterType === FilterType.CUSTOM_FILTER);
220
235
  const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
221
236
  const otherFilters = this.filters.filter(filter => filter.filterType === FilterType.OTHER_FILTERS);
222
- return (h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" }, this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true)))));
237
+ return (h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" }, !this.disablePersonalizedFilter && this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true)))));
223
238
  }
224
239
  static get is() { return "snk-filter-modal"; }
225
240
  static get originalStyleUrls() {
@@ -354,9 +369,76 @@ export class SnkFilterModal {
354
369
  "optional": false,
355
370
  "docs": {
356
371
  "tags": [],
357
- "text": "A\u00E7\u00E3o executada ao editart um filtro personalizado"
372
+ "text": "A\u00E7\u00E3o executada ao editar um filtro personalizado"
358
373
  }
374
+ },
375
+ "deletePersonalizedFilter": {
376
+ "type": "unknown",
377
+ "mutable": false,
378
+ "complexType": {
379
+ "original": "(filter: IPersonalizedFilter, configName: string) => void",
380
+ "resolved": "(filter: IPersonalizedFilter, configName: string) => void",
381
+ "references": {
382
+ "IPersonalizedFilter": {
383
+ "location": "import",
384
+ "path": "../../snk-personalized-filter/interfaces/IPersonalizedFilter"
385
+ }
386
+ }
387
+ },
388
+ "required": false,
389
+ "optional": false,
390
+ "docs": {
391
+ "tags": [],
392
+ "text": "A\u00E7\u00E3o executada ao deletar um filtro personalizado"
393
+ }
394
+ },
395
+ "filtersToDelete": {
396
+ "type": "unknown",
397
+ "mutable": false,
398
+ "complexType": {
399
+ "original": "IPersonalizedFilter[]",
400
+ "resolved": "IPersonalizedFilter[]",
401
+ "references": {
402
+ "IPersonalizedFilter": {
403
+ "location": "import",
404
+ "path": "../../snk-personalized-filter/interfaces/IPersonalizedFilter"
405
+ }
406
+ }
407
+ },
408
+ "required": false,
409
+ "optional": false,
410
+ "docs": {
411
+ "tags": [],
412
+ "text": "Guarda filtros a serem deletados no Apply do modal"
413
+ },
414
+ "defaultValue": "[]"
415
+ },
416
+ "disablePersonalizedFilter": {
417
+ "type": "boolean",
418
+ "mutable": false,
419
+ "complexType": {
420
+ "original": "boolean",
421
+ "resolved": "boolean",
422
+ "references": {}
423
+ },
424
+ "required": false,
425
+ "optional": false,
426
+ "docs": {
427
+ "tags": [],
428
+ "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)."
429
+ },
430
+ "attribute": "disable-personalized-filter",
431
+ "reflect": false
359
432
  }
360
433
  };
361
434
  }
435
+ static get listeners() {
436
+ return [{
437
+ "name": "deleteFilter",
438
+ "method": "deletePersonalizedFilterListener",
439
+ "target": undefined,
440
+ "capture": false,
441
+ "passive": false
442
+ }];
443
+ }
362
444
  }
@@ -41,7 +41,6 @@ export class SnkFilterModalItem {
41
41
  buildSnkFilterPersonalizedProps() {
42
42
  return {
43
43
  tag: "snk-personalized-filter-editor", props: {
44
- onDeleteFilter: (event) => this.handleDeleteFilter(event.detail, FilterItemType.PERSONALIZED),
45
44
  onEditFilter: (event) => this.editPersonalizedFilter.emit(event.detail),
46
45
  onAddFilter: () => this.addPersonalizedFilter.emit(),
47
46
  }
@@ -1,6 +1,6 @@
1
1
  :host {
2
2
  display: grid;
3
- grid-template-columns: minmax(100px, 100%) 1fr 1fr;
3
+ grid-template-columns: 1fr minmax(100px, 100%) 1fr 1fr;
4
4
 
5
5
  /*@doc Define o z-index do componente.*/
6
6
  --snk-personalized-filter--z-index: var(--elevation--20, 20);
@@ -8,6 +8,28 @@
8
8
  --snk-personalized-filter--background-color: var(--background--xlight, #fff);
9
9
  }
10
10
 
11
+ .snk-filter-bar__title {
12
+ max-width: 260px;
13
+ display: inline-block;
14
+ text-overflow: ellipsis;
15
+ overflow: hidden;
16
+ white-space: nowrap;
17
+ font-size: 16px;
18
+ font-family: var(--font-pattern, Arial);
19
+ font-weight: var(--text-weight--large, 600);
20
+ color: var(--color--title-primary, #2B3A54);
21
+ margin-top: 8px;
22
+ }
23
+
24
+ :host([data-mode="hidden"]) {
25
+ display: none;
26
+ }
27
+
28
+ :host([data-mode="button"]) {
29
+ grid-template-columns: 1fr;
30
+ width: fit-content;
31
+ }
32
+
11
33
  .snk-filter__popover-container{
12
34
  /*private*/
13
35
  display: flex;