@sankhyalabs/sankhyablocks 8.15.0-rc.2 → 8.15.0-rc.20

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 (243) hide show
  1. package/dist/cjs/{ConfigStorage-302bbbd4.js → ConfigStorage-8d4e9d53.js} +70 -7
  2. package/dist/cjs/{DataFetcher-ba94ed5b.js → DataFetcher-99f0f6ed.js} +5 -3
  3. package/dist/cjs/{SnkFormConfigManager-71c4768e.js → SnkFormConfigManager-33995e92.js} +21 -13
  4. package/dist/cjs/{SnkMessageBuilder-e7dcf408.js → SnkMessageBuilder-66aa2557.js} +6 -1
  5. package/dist/cjs/SnkMultiSelectionListDataSource-d15f7aac.js +140 -0
  6. package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-bb8e9ae4.js} +1 -1
  7. package/dist/cjs/{form-config-fetcher-df043d3d.js → form-config-fetcher-d73f4449.js} +13 -1
  8. package/dist/cjs/index-f9e81701.js +2 -10
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{pesquisa-fetcher-e4a7c4c3.js → pesquisa-fetcher-bdbbe9ac.js} +277 -61
  11. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  12. package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +520 -5
  13. package/dist/cjs/snk-application.cjs.entry.js +13 -8
  14. package/dist/cjs/snk-attach.cjs.entry.js +67 -47
  15. package/dist/cjs/snk-crud.cjs.entry.js +16 -10
  16. package/dist/cjs/snk-data-exporter.cjs.entry.js +10 -6
  17. package/dist/cjs/{snk-data-unit-82c08a8c.js → snk-data-unit-41c29713.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 +9 -10
  20. package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
  21. package/dist/cjs/snk-filter-bar.cjs.entry.js +36 -5
  22. package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
  23. package/dist/cjs/snk-filter-item.cjs.entry.js +10 -6
  24. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  25. package/dist/cjs/snk-form-config.cjs.entry.js +47 -27
  26. package/dist/cjs/snk-form.cjs.entry.js +11 -4
  27. package/dist/cjs/snk-grid.cjs.entry.js +37 -22
  28. package/dist/cjs/{snk-guides-viewer-d32c096f.js → snk-guides-viewer-a8dd24a3.js} +15 -9
  29. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -8
  30. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +3 -1
  31. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  32. package/dist/cjs/snk-simple-crud.cjs.entry.js +249 -23
  33. package/dist/cjs/snk-taskbar.cjs.entry.js +123 -15
  34. package/dist/cjs/{taskbar-elements-01b85b99.js → taskbar-elements-3ecd1278.js} +9 -9
  35. package/dist/collection/collection-manifest.json +6 -6
  36. package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
  37. package/dist/collection/components/snk-application/snk-application.js +51 -11
  38. package/dist/collection/components/snk-attach/snk-attach.js +39 -24
  39. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +1 -1
  40. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +29 -22
  41. package/dist/collection/components/snk-crud/snk-crud.js +95 -3
  42. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
  43. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
  44. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +27 -3
  45. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +7 -3
  46. package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -3
  47. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -1
  48. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +22 -1
  49. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +28 -6
  50. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +24 -1
  51. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +116 -2
  52. package/dist/collection/components/snk-form/snk-form.js +25 -1
  53. package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +20 -12
  54. package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +50 -30
  55. package/dist/collection/components/snk-grid/snk-grid.js +100 -16
  56. package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
  57. package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
  58. package/dist/collection/components/snk-simple-crud/regular-buttons.js +3 -0
  59. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +10 -2
  60. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +414 -18
  61. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +1 -1
  62. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +9 -9
  63. package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
  64. package/dist/collection/components/snk-taskbar/snk-taskbar.js +166 -14
  65. package/dist/collection/lib/configs/ConfigStorage.js +63 -3
  66. package/dist/collection/lib/dataUnit/InMemoryLoader.js +9 -40
  67. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +33 -0
  68. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +5 -3
  69. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +12 -0
  70. package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +6 -3
  71. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -11
  72. package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -1
  73. package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +4 -0
  74. package/dist/collection/lib/utils/CrudUtils.js +13 -1
  75. package/dist/components/ConfigStorage.js +68 -5
  76. package/dist/components/DataFetcher.js +5 -3
  77. package/dist/components/SnkFormConfigManager.js +19 -11
  78. package/dist/components/SnkMessageBuilder.js +6 -1
  79. package/dist/components/dataunit-fetcher.js +45 -50
  80. package/dist/components/field-search.js +93 -3
  81. package/dist/components/form-config-fetcher.js +12 -0
  82. package/dist/components/index.d.ts +6 -6
  83. package/dist/components/snk-application2.js +9 -1
  84. package/dist/components/snk-attach2.js +115 -52
  85. package/dist/components/snk-crud.js +15 -3
  86. package/dist/components/snk-data-exporter2.js +7 -3
  87. package/dist/components/snk-detail-view2.js +40 -7
  88. package/dist/components/snk-entity-list.js +5 -3
  89. package/dist/components/snk-filter-bar2.js +38 -3
  90. package/dist/components/snk-filter-detail2.js +5 -1
  91. package/dist/components/snk-filter-item2.js +11 -6
  92. package/dist/components/snk-form-config2.js +46 -26
  93. package/dist/components/snk-form.js +8 -0
  94. package/dist/components/snk-grid-config2.js +128 -102
  95. package/dist/components/snk-grid2.js +38 -17
  96. package/dist/components/snk-personalized-filter-editor.js +3 -1
  97. package/dist/components/snk-simple-crud2.js +310 -30
  98. package/dist/components/snk-taskbar2.js +139 -25
  99. package/dist/components/taskbar-actions-button2.js +1 -1
  100. package/dist/esm/{ConfigStorage-4151acc8.js → ConfigStorage-6e241cd7.js} +70 -7
  101. package/dist/esm/{DataFetcher-aa159c5a.js → DataFetcher-a650ae58.js} +5 -3
  102. package/dist/esm/{SnkFormConfigManager-5c7d3771.js → SnkFormConfigManager-7a4e678f.js} +21 -13
  103. package/dist/esm/{SnkMessageBuilder-0fb796b9.js → SnkMessageBuilder-0a4becdd.js} +6 -1
  104. package/dist/esm/SnkMultiSelectionListDataSource-7084f3b3.js +133 -0
  105. package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-8ec448b0.js} +1 -1
  106. package/dist/esm/{form-config-fetcher-36219cd3.js → form-config-fetcher-765b8498.js} +13 -1
  107. package/dist/esm/index-a7d3d3f1.js +2 -10
  108. package/dist/esm/loader.js +1 -1
  109. package/dist/esm/{pesquisa-fetcher-fa0c2540.js → pesquisa-fetcher-96d2f351.js} +266 -54
  110. package/dist/esm/sankhyablocks.js +1 -1
  111. package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +519 -6
  112. package/dist/esm/snk-application.entry.js +13 -8
  113. package/dist/esm/snk-attach.entry.js +66 -46
  114. package/dist/esm/snk-crud.entry.js +16 -10
  115. package/dist/esm/snk-data-exporter.entry.js +10 -6
  116. package/dist/esm/{snk-data-unit-5d201fb3.js → snk-data-unit-de1d140d.js} +1 -1
  117. package/dist/esm/snk-data-unit.entry.js +2 -2
  118. package/dist/esm/snk-detail-view.entry.js +9 -10
  119. package/dist/esm/snk-entity-list.entry.js +5 -3
  120. package/dist/esm/snk-filter-bar.entry.js +36 -5
  121. package/dist/esm/snk-filter-detail.entry.js +4 -1
  122. package/dist/esm/snk-filter-item.entry.js +10 -6
  123. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  124. package/dist/esm/snk-form-config.entry.js +48 -28
  125. package/dist/esm/snk-form.entry.js +11 -4
  126. package/dist/esm/snk-grid.entry.js +38 -23
  127. package/dist/esm/{snk-guides-viewer-f49613c6.js → snk-guides-viewer-131e9660.js} +15 -9
  128. package/dist/esm/snk-guides-viewer.entry.js +7 -8
  129. package/dist/esm/snk-personalized-filter-editor.entry.js +3 -1
  130. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  131. package/dist/esm/snk-simple-crud.entry.js +250 -24
  132. package/dist/esm/snk-taskbar.entry.js +124 -16
  133. package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-2473c8ac.js} +9 -9
  134. package/dist/sankhyablocks/p-004c356e.js +26 -0
  135. package/dist/sankhyablocks/p-0624f62d.js +56 -0
  136. package/dist/sankhyablocks/p-075bba4c.entry.js +1 -0
  137. package/dist/sankhyablocks/p-07a61550.entry.js +1 -0
  138. package/dist/sankhyablocks/p-103c5956.entry.js +1 -0
  139. package/dist/sankhyablocks/p-1048bd26.entry.js +1 -0
  140. package/dist/sankhyablocks/{p-e6380c60.js → p-125bb902.js} +1 -1
  141. package/dist/sankhyablocks/p-13ae1a89.entry.js +1 -0
  142. package/dist/sankhyablocks/p-19a56978.entry.js +1 -0
  143. package/dist/sankhyablocks/{p-e0fd9555.entry.js → p-24ed6ad6.entry.js} +1 -1
  144. package/dist/sankhyablocks/p-32556aa6.js +1 -0
  145. package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
  146. package/dist/sankhyablocks/p-34a7f2ab.js +65 -0
  147. package/dist/sankhyablocks/{p-f3d1c48e.js → p-52c8e589.js} +1 -1
  148. package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
  149. package/dist/sankhyablocks/p-5833cff9.js +1 -0
  150. package/dist/sankhyablocks/p-5a2e016a.entry.js +1 -0
  151. package/dist/sankhyablocks/p-619c5f6f.entry.js +11 -0
  152. package/dist/sankhyablocks/p-6f560924.entry.js +1 -0
  153. package/dist/sankhyablocks/p-8967fa78.js +1 -0
  154. package/dist/sankhyablocks/p-a87149e4.entry.js +1 -0
  155. package/dist/sankhyablocks/{p-7f3c7b09.entry.js → p-ac77949b.entry.js} +1 -1
  156. package/dist/sankhyablocks/p-ae4fc9a9.js +1 -0
  157. package/dist/sankhyablocks/p-b10b9934.entry.js +1 -0
  158. package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
  159. package/dist/sankhyablocks/{p-9695f78b.js → p-be75153c.js} +1 -1
  160. package/dist/sankhyablocks/p-bf39bdb8.entry.js +1 -0
  161. package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
  162. package/dist/sankhyablocks/p-efeca7ba.js +1 -0
  163. package/dist/sankhyablocks/p-f7d0fab9.entry.js +1 -0
  164. package/dist/sankhyablocks/p-f7d9d148.entry.js +1 -0
  165. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  166. package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
  167. package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
  168. package/dist/types/components/snk-application/snk-application.d.ts +8 -0
  169. package/dist/types/components/snk-attach/snk-attach.d.ts +2 -1
  170. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +10 -1
  171. package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +5 -4
  172. package/dist/types/components/snk-crud/snk-crud.d.ts +21 -0
  173. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
  174. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +6 -1
  175. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
  176. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +6 -2
  177. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +20 -1
  178. package/dist/types/components/snk-form/snk-form.d.ts +6 -1
  179. package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +2 -1
  180. package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +5 -3
  181. package/dist/types/components/snk-grid/snk-grid.d.ts +19 -1
  182. package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
  183. package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
  184. package/dist/types/components/snk-simple-crud/regular-buttons.d.ts +3 -0
  185. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +75 -3
  186. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +34 -1
  187. package/dist/types/components.d.ts +226 -12
  188. package/dist/types/lib/configs/ConfigStorage.d.ts +21 -1
  189. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +0 -2
  190. package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +4 -0
  191. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +2 -0
  192. package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +2 -1
  193. package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
  194. package/package.json +9 -2
  195. package/dist/cjs/PreloadManager-84466da6.js +0 -224
  196. package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
  197. package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
  198. package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
  199. package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
  200. package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
  201. package/dist/esm/snk-grid-config.entry.js +0 -479
  202. package/dist/esm/snk-select-box.entry.js +0 -21
  203. package/dist/sankhyablocks/p-02e3a45b.entry.js +0 -1
  204. package/dist/sankhyablocks/p-05243555.js +0 -1
  205. package/dist/sankhyablocks/p-094c30cb.js +0 -1
  206. package/dist/sankhyablocks/p-0d7863ed.js +0 -26
  207. package/dist/sankhyablocks/p-0ec5b2e5.js +0 -1
  208. package/dist/sankhyablocks/p-1d75d9f9.entry.js +0 -1
  209. package/dist/sankhyablocks/p-2582537c.entry.js +0 -1
  210. package/dist/sankhyablocks/p-282789a6.entry.js +0 -1
  211. package/dist/sankhyablocks/p-374d03f6.js +0 -1
  212. package/dist/sankhyablocks/p-3b0e4e08.js +0 -65
  213. package/dist/sankhyablocks/p-40915359.entry.js +0 -1
  214. package/dist/sankhyablocks/p-573a07c5.js +0 -1
  215. package/dist/sankhyablocks/p-69efa80d.entry.js +0 -1
  216. package/dist/sankhyablocks/p-761ed32f.entry.js +0 -1
  217. package/dist/sankhyablocks/p-86801b08.entry.js +0 -1
  218. package/dist/sankhyablocks/p-96ef14f9.entry.js +0 -1
  219. package/dist/sankhyablocks/p-98674137.entry.js +0 -1
  220. package/dist/sankhyablocks/p-9b5944a4.entry.js +0 -1
  221. package/dist/sankhyablocks/p-9bdbc7d8.entry.js +0 -1
  222. package/dist/sankhyablocks/p-a52b9254.entry.js +0 -11
  223. package/dist/sankhyablocks/p-aa95fb2c.js +0 -56
  224. package/dist/sankhyablocks/p-ac384baf.entry.js +0 -1
  225. package/dist/sankhyablocks/p-b05ab13d.entry.js +0 -1
  226. package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
  227. package/dist/sankhyablocks/p-c4874327.entry.js +0 -1
  228. package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
  229. package/dist/sankhyablocks/p-cb7419e0.entry.js +0 -1
  230. package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
  231. package/dist/sankhyablocks/p-d6317851.entry.js +0 -1
  232. /package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
  233. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
  234. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
  235. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
  236. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
  237. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
  238. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
  239. /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
  240. /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
  241. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
  242. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
  243. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
@@ -4,21 +4,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const DataFetcher = require('./DataFetcher-ba94ed5b.js');
8
- const pesquisaFetcher = require('./pesquisa-fetcher-e4a7c4c3.js');
7
+ const DataFetcher = require('./DataFetcher-99f0f6ed.js');
8
+ const pesquisaFetcher = require('./pesquisa-fetcher-bdbbe9ac.js');
9
9
  require('./index-0922807b.js');
10
10
  const ISave = require('./ISave-e91b70a7.js');
11
11
  require('./filter-item-type.enum-a7ffdaa6.js');
12
- require('./form-config-fetcher-df043d3d.js');
12
+ require('./form-config-fetcher-d73f4449.js');
13
13
  const constants = require('./constants-35ddd366.js');
14
- const PreloadManager = require('./PreloadManager-84466da6.js');
15
- const authFetcher = require('./auth-fetcher-c8467c07.js');
16
- const taskbarElements = require('./taskbar-elements-01b85b99.js');
14
+ const authFetcher = require('./auth-fetcher-bb8e9ae4.js');
15
+ const taskbarElements = require('./taskbar-elements-3ecd1278.js');
17
16
  require('./PrintUtils-bcaeb82f.js');
18
17
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
19
18
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
20
- require('./ResourceIDUtils-5ff86aa7.js');
21
19
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
20
+ require('./ResourceIDUtils-5ff86aa7.js');
22
21
  require('./index-102ba62d.js');
23
22
 
24
23
  const SERVICE$1 = {
@@ -314,7 +313,7 @@ class AnexoSistemaDataUnitFactory {
314
313
  const { records } = dataUnit.getSelectionInfo();
315
314
  const recordToDelete = records[0];
316
315
  fetcher.delete(recordToDelete).then(() => {
317
- PreloadManager.PreloadManager.removeRecords(dataUnit, [recordToDelete]);
316
+ pesquisaFetcher.PreloadManager.removeRecords(dataUnit, [recordToDelete]);
318
317
  return resolve(ids);
319
318
  });
320
319
  });
@@ -394,7 +393,7 @@ const attachFetcherMetadataBuilder = {
394
393
  label: "Attach List",
395
394
  fields: [
396
395
  { name: "CODATA", label: getMessage$1("snkAttach.attachMetadata.lblCode"), dataType: core.DataType.TEXT },
397
- { name: "DESCRICAO", label: getMessage$1("snkAttach.attachMetadata.lblDescription"), dataType: core.DataType.TEXT },
396
+ { name: "DESCRICAO", label: getMessage$1("snkAttach.attachMetadata.lblDescription"), dataType: core.DataType.TEXT, readOnly: false },
398
397
  { name: "ARQUIVO", label: getMessage$1("snkAttach.attachMetadata.lblFileOrLink"), dataType: core.DataType.TEXT },
399
398
  { name: "USUARIO", label: getMessage$1("snkAttach.attachMetadata.lblUser"), dataType: core.DataType.TEXT },
400
399
  { name: "DTALTER", label: getMessage$1("snkAttach.attachMetadata.lblDate"), dataType: core.DataType.TEXT },
@@ -420,6 +419,7 @@ const SERVICE_LOAD = "Attach.load";
420
419
  class AttachFetcherDataUnitFactory {
421
420
  constructor(getMessage) {
422
421
  this.getMessage = getMessage;
422
+ this._records = [];
423
423
  this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
424
424
  }
425
425
  initLoaders(dataUnit, fetcher, onSuccess) {
@@ -439,25 +439,30 @@ class AttachFetcherDataUnitFactory {
439
439
  metadataLoader(_) {
440
440
  return Promise.resolve(attachFetcherMetadataBuilder);
441
441
  }
442
- async dataLoader(_, request) {
442
+ async dataLoader(dataUnit, request) {
443
443
  if (!request.source) {
444
- return Promise.resolve({ records: [] });
444
+ return Promise.resolve({ records: this._records });
445
445
  }
446
- const criteria = {
447
- criteria: {
448
- codata: request.source,
449
- tipoAnexo: "N"
450
- }
451
- };
452
- const applicationDataFetcher = await this._application.getDataFetcher();
453
- const { anexos: { anexo = [] } } = await applicationDataFetcher.callServiceBroker(SERVICE_LOAD, JSON.stringify(criteria));
454
- const records = [];
455
- anexo.forEach((param) => {
456
- records.push(Object.assign({ __record__id__: core.StringUtils.generateUUID(), CAMINHO_ARQUIVO: [{
457
- name: param === null || param === void 0 ? void 0 : param.ARQUIVO,
458
- }] }, param));
459
- });
460
- return Promise.resolve({ records });
446
+ if (!Number.isNaN(Number(request.source))) {
447
+ const criteria = {
448
+ criteria: {
449
+ codata: request.source,
450
+ tipoAnexo: "N"
451
+ }
452
+ };
453
+ const applicationDataFetcher = await this._application.getDataFetcher();
454
+ const { anexos: { anexo = [] } } = await applicationDataFetcher.callServiceBroker(SERVICE_LOAD, JSON.stringify(criteria));
455
+ const records = [];
456
+ anexo.forEach((param) => {
457
+ records.push(Object.assign({ __record__id__: core.StringUtils.generateUUID(), CAMINHO_ARQUIVO: [{
458
+ name: param === null || param === void 0 ? void 0 : param.ARQUIVO,
459
+ }] }, param));
460
+ });
461
+ this._records = records;
462
+ }
463
+ let records = pesquisaFetcher.applyFilter(this._records, dataUnit, request.filters);
464
+ records = pesquisaFetcher.applySorting(records, dataUnit, request.sort);
465
+ return Promise.resolve({ records, paginationInfo: pesquisaFetcher.buildPaginationInfo(records, request.offset, request.limit) });
461
466
  }
462
467
  saveLoader(changes, fetcher) {
463
468
  return new Promise((resolve) => {
@@ -636,7 +641,7 @@ const SnkAttach = class {
636
641
  this.back.emit();
637
642
  });
638
643
  };
639
- this.fetcherType = "AnexoSistema";
644
+ this.fetcherType = undefined;
640
645
  this.fetcher = undefined;
641
646
  this.dataUnit = undefined;
642
647
  this.dataUnitBuilder = undefined;
@@ -648,8 +653,8 @@ const SnkAttach = class {
648
653
  this.crudConfig = undefined;
649
654
  }
650
655
  registerKeyWatcher(newRegisterKey, oldRegisterKey) {
651
- var _a, _b, _c, _d;
652
- if (this._currentDataUnit == null) {
656
+ var _a, _b, _c, _d, _e, _f;
657
+ if (!this._currentDataUnit) {
653
658
  this.loadAttachmentDataUnit();
654
659
  }
655
660
  if (oldRegisterKey !== newRegisterKey) {
@@ -664,11 +669,7 @@ const SnkAttach = class {
664
669
  if (hasMoreOneItem)
665
670
  return;
666
671
  }
667
- return this._currentDataUnit
668
- .loadMetadata()
669
- .then(() => {
670
- this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
671
- });
672
+ return (_f = (_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadMetadata()) === null || _f === void 0 ? void 0 : _f.then(this._currentDataUnit.loadData.bind(undefined, undefined, true, this.registerKey));
672
673
  }
673
674
  }
674
675
  /**
@@ -734,7 +735,7 @@ const SnkAttach = class {
734
735
  if (!this._currentDataUnit.metadata) {
735
736
  this._currentDataUnit
736
737
  .loadMetadata()
737
- .then(() => this.crudConfig = anexoSistemaCrudConfig);
738
+ .then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
738
739
  }
739
740
  this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
740
741
  this._currentDataUnit.addFilterProvider({
@@ -746,25 +747,29 @@ const SnkAttach = class {
746
747
  this._currentDataUnit.loadData().then(this.disableEditFieldsNotInForm.bind(this));
747
748
  }
748
749
  loadAttach() {
749
- var _a;
750
+ var _a, _b, _c;
750
751
  this._currentFetcher = new AttachFetcher();
751
- this._currentDataUnit = new core.DataUnit();
752
+ this._currentDataUnit = new core.DataUnit(pesquisaFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
752
753
  this._currentDataUnit.addInterceptor({
753
- interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
754
+ interceptAction: (action) => {
755
+ var _a;
756
+ if (action.type === core.Action.METADATA_LOADED) {
757
+ this.crudConfig = Object.assign({}, attachCrudConfig);
758
+ (_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.updateConfig();
759
+ }
760
+ return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
761
+ }
754
762
  });
755
763
  this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
756
764
  (_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
757
- await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
758
765
  this.returnToGridMode();
766
+ await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
759
767
  });
760
768
  if (!this._currentDataUnit.metadata) {
761
- this._currentDataUnit
762
- .loadMetadata()
763
- .then(() => {
764
- this.crudConfig = attachCrudConfig;
765
- this._currentDataUnit
766
- .loadData(undefined, undefined, true, this.registerKey)
767
- .then(this.disableEditFieldsNotInForm.bind(this));
769
+ (_c = (_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata()) === null || _c === void 0 ? void 0 : _c.then(() => {
770
+ var _a, _b;
771
+ this.crudConfig = Object.assign({}, attachCrudConfig);
772
+ (_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData(undefined, undefined, true, this.registerKey)) === null || _b === void 0 ? void 0 : _b.then(this.disableEditFieldsNotInForm.bind(this));
768
773
  });
769
774
  }
770
775
  }
@@ -782,15 +787,30 @@ const SnkAttach = class {
782
787
  this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
783
788
  }
784
789
  componentWillRender() {
790
+ if (!this.fetcherType) {
791
+ this.fetcherType = "AnexoSistema";
792
+ }
785
793
  if (this._currentDataUnit == null) {
786
794
  this.loadAttachmentDataUnit();
787
795
  }
788
796
  }
797
+ async handleOnDataStateChange({ detail }) {
798
+ if (this.fetcherType !== 'Attach')
799
+ return;
800
+ if (!detail.insertionMode) {
801
+ this._currentDataUnit.disableField('DESCRICAO');
802
+ }
803
+ else {
804
+ this._currentDataUnit.enableField('DESCRICAO');
805
+ }
806
+ await this._currentDataUnit.loadMetadata();
807
+ }
808
+ ;
789
809
  render() {
790
810
  var _a, _b;
791
811
  if (!this._currentDataUnit)
792
812
  return null;
793
- return (index.h("main", { class: "snk-attach__main" }, index.h("header", { class: "snk-attach__header" }, index.h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, index.h("div", { slot: "rightSlot" }, index.h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), index.h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, index.h("div", { class: "ez-box__container" }, index.h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder }, index.h("div", { slot: "snkSimpleCrudHeader" }, index.h("div", { class: "ez-flex ez-flex--column" }, index.h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), index.h("span", { class: "ez-text ez-text--medium ez-text--secondary" }, this.getMessage("snkAttach.description")))))))));
813
+ return (index.h("main", { class: "snk-attach__main" }, index.h("header", { class: "snk-attach__header" }, index.h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, index.h("div", { slot: "rightSlot" }, index.h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), index.h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, index.h("div", { class: "ez-box__container" }, index.h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this) }, index.h("div", { slot: "snkSimpleCrudHeader" }, index.h("div", { class: "ez-flex ez-flex--column" }, index.h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), index.h("span", { class: "ez-text ez-text--medium ez-text--secondary" }, this.getMessage("snkAttach.description")))))))));
794
814
  }
795
815
  static get watchers() { return {
796
816
  "registerKey": ["registerKeyWatcher"]
@@ -4,22 +4,21 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const taskbarElements = require('./taskbar-elements-01b85b99.js');
8
- require('./DataFetcher-ba94ed5b.js');
9
- require('./pesquisa-fetcher-e4a7c4c3.js');
7
+ const taskbarElements = require('./taskbar-elements-3ecd1278.js');
8
+ require('./DataFetcher-99f0f6ed.js');
9
+ require('./pesquisa-fetcher-bdbbe9ac.js');
10
10
  const index$1 = require('./index-0922807b.js');
11
11
  require('./ISave-e91b70a7.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
- require('./PreloadManager-84466da6.js');
15
14
  require('./filter-item-type.enum-a7ffdaa6.js');
16
- require('./form-config-fetcher-df043d3d.js');
15
+ require('./form-config-fetcher-d73f4449.js');
17
16
  const constants = require('./constants-35ddd366.js');
18
- const authFetcher = require('./auth-fetcher-c8467c07.js');
17
+ const authFetcher = require('./auth-fetcher-bb8e9ae4.js');
19
18
  require('./index-102ba62d.js');
20
19
  require('./PrintUtils-bcaeb82f.js');
21
- require('./ResourceIDUtils-5ff86aa7.js');
22
20
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
21
+ require('./ResourceIDUtils-5ff86aa7.js');
23
22
 
24
23
  const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
25
24
 
@@ -39,6 +38,7 @@ const SnkCrud = class {
39
38
  this._canEdit = undefined;
40
39
  this._resourceID = undefined;
41
40
  this.configName = undefined;
41
+ this.filterBarTitle = undefined;
42
42
  this.selectionToastConfig = undefined;
43
43
  this.showActionButtons = false;
44
44
  this.actionsList = undefined;
@@ -49,6 +49,10 @@ const SnkCrud = class {
49
49
  this.presentationMode = index$1.PresentationMode.PRIMARY;
50
50
  this.messagesBuilder = undefined;
51
51
  this.useEnterLikeTab = false;
52
+ this.gridLegacyConfigName = undefined;
53
+ this.filterBarLegacyConfigName = undefined;
54
+ this.formLegacyConfigName = undefined;
55
+ this.disablePersonalizedFilter = undefined;
52
56
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
53
57
  }
54
58
  /**
@@ -181,7 +185,8 @@ const SnkCrud = class {
181
185
  window.removeEventListener("keydown", this._keyDownHandler);
182
186
  }
183
187
  async initKeyboardManager() {
184
- const keyboardManager = await this._application.getKeyboardManager();
188
+ var _a;
189
+ const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
185
190
  if (keyboardManager) {
186
191
  const dataUnit = this._dataUnit || await this._snkDataUnit.getDataUnit();
187
192
  async function saveDataUnitHandlingFocus() {
@@ -230,7 +235,8 @@ const SnkCrud = class {
230
235
  }
231
236
  }
232
237
  async removeShortcuts() {
233
- const keyboardManager = await this._application.getKeyboardManager();
238
+ var _a;
239
+ const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
234
240
  if (keyboardManager) {
235
241
  keyboardManager
236
242
  .unbind("F6")
@@ -297,7 +303,7 @@ const SnkCrud = class {
297
303
  return;
298
304
  }
299
305
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === constants.VIEW_MODE.GRID;
300
- return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.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, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.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 }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkFormTaskBar" }))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), index.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 })), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
306
+ return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.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, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.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, formLegacyConfigName: this.formLegacyConfigName }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkFormTaskBar" }))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), index.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 })), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
301
307
  }
302
308
  get _element() { return index.getElement(this); }
303
309
  static get watchers() { return {
@@ -7,11 +7,11 @@ const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const index = require('./index-0922807b.js');
9
9
  const constants = require('./constants-35ddd366.js');
10
- const DataFetcher = require('./DataFetcher-ba94ed5b.js');
11
- const snkDataUnit = require('./snk-data-unit-82c08a8c.js');
10
+ const DataFetcher = require('./DataFetcher-99f0f6ed.js');
11
+ const snkDataUnit = require('./snk-data-unit-41c29713.js');
12
12
  require('./PrintUtils-bcaeb82f.js');
13
13
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
14
- require('./SnkMessageBuilder-e7dcf408.js');
14
+ require('./SnkMessageBuilder-66aa2557.js');
15
15
 
16
16
  class ItemBuilder {
17
17
  constructor(getMessage, selectedNumber) {
@@ -328,7 +328,11 @@ const SnkDataExporter = class {
328
328
  }
329
329
  fetchDataExporter(params)
330
330
  .then((result) => callbackResolver(result))
331
- .catch((exception) => utils.ApplicationUtils.error(this.getMessage("snkDataExporter.message.exportError"), exception ? exception.statusMessage : this.getMessage("snkDataExporter.message.exportError")));
331
+ .catch((exception) => {
332
+ console.error(exception);
333
+ let { title, message, statusMessage } = exception || {};
334
+ utils.ApplicationUtils.error(title || this.getMessage("snkDataExporter.message.exportError"), statusMessage || message || this.getMessage("snkDataExporter.message.unknownFailure"));
335
+ });
332
336
  }
333
337
  getOptionKey(option) {
334
338
  return Object.keys(index.DataExporterOption)
@@ -440,14 +444,14 @@ const SnkDataExporter = class {
440
444
  const pkObject = [];
441
445
  const appId = (option === null || option === void 0 ? void 0 : option.replace(this._customPrefix, "")) || "";
442
446
  (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs().forEach(({ name, type, value }, index) => {
443
- const fields = [];
447
+ const fields = {};
444
448
  fields['fields'] = [];
445
449
  // Se for o primeiro elemento, adiciona essa primeira PK
446
450
  if (index === 0) {
447
451
  pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
448
452
  pkObject['pks'] = [];
449
453
  }
450
- const dataFields = { nome: name, tipo: this.parseDataType(type), valor: value };
454
+ const dataFields = { nome: `PK_${name}`, tipo: this.parseDataType(type), valor: value };
451
455
  fields['fields'].push(dataFields);
452
456
  pkObject['pks'].push(fields);
453
457
  });
@@ -3,7 +3,7 @@
3
3
  const index = require('./index-f9e81701.js');
4
4
  const core = require('@sankhyalabs/core');
5
5
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
6
- const SnkMessageBuilder = require('./SnkMessageBuilder-e7dcf408.js');
6
+ const SnkMessageBuilder = require('./SnkMessageBuilder-66aa2557.js');
7
7
 
8
8
  const SnkDataUnit = class {
9
9
  constructor(hostRef) {
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkDataUnit = require('./snk-data-unit-82c08a8c.js');
5
+ const snkDataUnit = require('./snk-data-unit-41c29713.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
8
  require('@sankhyalabs/ezui/dist/collection/utils');
9
- require('./SnkMessageBuilder-e7dcf408.js');
9
+ require('./SnkMessageBuilder-66aa2557.js');
10
10
 
11
11
 
12
12
 
@@ -4,25 +4,24 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const SnkFormConfigManager = require('./SnkFormConfigManager-71c4768e.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-33995e92.js');
8
8
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
9
- require('./DataFetcher-ba94ed5b.js');
10
- require('./pesquisa-fetcher-e4a7c4c3.js');
9
+ require('./DataFetcher-99f0f6ed.js');
10
+ require('./pesquisa-fetcher-bdbbe9ac.js');
11
11
  const index$1 = require('./index-0922807b.js');
12
12
  require('./ISave-e91b70a7.js');
13
13
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
14
14
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
15
- require('./PreloadManager-84466da6.js');
16
15
  require('./filter-item-type.enum-a7ffdaa6.js');
17
- require('./form-config-fetcher-df043d3d.js');
18
- const taskbarElements = require('./taskbar-elements-01b85b99.js');
16
+ require('./form-config-fetcher-d73f4449.js');
17
+ const taskbarElements = require('./taskbar-elements-3ecd1278.js');
19
18
  const constants = require('./constants-35ddd366.js');
20
- const snkGuidesViewer = require('./snk-guides-viewer-d32c096f.js');
21
- const SnkMessageBuilder = require('./SnkMessageBuilder-e7dcf408.js');
22
- require('./ConfigStorage-302bbbd4.js');
19
+ const snkGuidesViewer = require('./snk-guides-viewer-a8dd24a3.js');
20
+ const SnkMessageBuilder = require('./SnkMessageBuilder-66aa2557.js');
21
+ require('./ConfigStorage-8d4e9d53.js');
23
22
  require('./PrintUtils-bcaeb82f.js');
24
- require('./ResourceIDUtils-5ff86aa7.js');
25
23
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
24
+ require('./ResourceIDUtils-5ff86aa7.js');
26
25
  require('./index-102ba62d.js');
27
26
  require('./field-search-f56aa7d6.js');
28
27
  require('@sankhyalabs/core/dist/dataunit/DataUnit');
@@ -65,16 +65,18 @@ const SnkEntityList = class {
65
65
  this.loadListSource();
66
66
  }
67
67
  optionLoader(searchArgument) {
68
- var _a, _b, _c, _d;
68
+ var _a, _b, _c, _d, _e, _f;
69
69
  const { mode, argument } = searchArgument;
70
70
  if (this._application === undefined) {
71
71
  return;
72
72
  }
73
73
  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;
74
+ const criteria = (_e = (_d = this.config) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.criteria;
74
75
  const options = {
75
- entityDescription: (_d = this.config) === null || _d === void 0 ? void 0 : _d.label,
76
+ entityDescription: (_f = this.config) === null || _f === void 0 ? void 0 : _f.label,
76
77
  entity: this._entityName,
77
- searchOptions: searchOptions
78
+ searchOptions: searchOptions,
79
+ criteria,
78
80
  };
79
81
  return this._application.executePreparedSearch(mode, argument, options);
80
82
  }
@@ -5,15 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index$1 = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
8
- const ConfigStorage = require('./ConfigStorage-302bbbd4.js');
8
+ const ConfigStorage = require('./ConfigStorage-8d4e9d53.js');
9
9
  const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
10
10
  const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
11
11
  const index = require('./index-c5771aba.js');
12
12
  const filterNumberVariation = require('./filterNumberVariation-d65332da.js');
13
13
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
14
14
  const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-0184ffbb.js');
15
- require('./form-config-fetcher-df043d3d.js');
16
- require('./DataFetcher-ba94ed5b.js');
15
+ require('./form-config-fetcher-d73f4449.js');
16
+ require('./DataFetcher-99f0f6ed.js');
17
17
  require('./PrintUtils-bcaeb82f.js');
18
18
  require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
19
19
 
@@ -252,7 +252,7 @@ class SnkFilterModalFactory {
252
252
  }
253
253
  }
254
254
 
255
- const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__scroller.sc-snk-filter-bar{height:calc(100% + var(--space-extra-small, 3px))}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-self:center}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
255
+ const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:8px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{width:0px;height:0px}[data-mode=\"button\"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__scroller.sc-snk-filter-bar{height:calc(100% + var(--space-extra-small, 3px))}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-self:center}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
256
256
 
257
257
  const SnkFilterBar = class {
258
258
  constructor(hostRef) {
@@ -278,17 +278,25 @@ const SnkFilterBar = class {
278
278
  return this._calculateSortIndex(b) - this._calculateSortIndex(a);
279
279
  };
280
280
  this.dataUnit = undefined;
281
+ this.title = undefined;
281
282
  this.configName = undefined;
282
283
  this.resourceID = undefined;
284
+ this.mode = "regular";
283
285
  this.filterConfig = undefined;
284
286
  this.messagesBuilder = undefined;
285
287
  this.disablePersonalizedFilter = undefined;
288
+ this.filterBarLegacyConfigName = undefined;
286
289
  this.allowDefault = undefined;
287
290
  this.scrollerLocked = false;
288
291
  this.showPersonalizedFilter = false;
289
292
  this.personalizedFilterId = undefined;
290
293
  }
291
294
  observeFilterConfig(newValue, oldValue) {
295
+ if (core.ObjectUtils.equals(newValue, oldValue))
296
+ return;
297
+ this.handleFilterConfigsChanged(oldValue, newValue);
298
+ }
299
+ handleFilterConfigsChanged(oldValue, newValue) {
292
300
  if (oldValue != undefined && newValue == undefined) {
293
301
  this._loadingPending = true;
294
302
  this._configUpdated = true;
@@ -491,6 +499,17 @@ const SnkFilterBar = class {
491
499
  filterActiveFilter(item) {
492
500
  return item.visible || item.removalBlocked;
493
501
  }
502
+ filterPersonalizedItems(item) {
503
+ return item.type === filterItemType_enum.FilterItemType.PERSONALIZED;
504
+ }
505
+ getPersonalizedFilterVariableItems() {
506
+ return this.filterConfig
507
+ .filter(this.filterPersonalizedItems)
508
+ .map(item => {
509
+ const itemId = `filter-${item.id}`;
510
+ return (index$1.h("snk-filter-item", { key: item.id, id: itemId, config: Object.assign({}, item), onFocusin: () => this.itemFocused(itemId), onVisibleChanged: (evt) => this.scrollerLocked = evt.detail, onFilterChange: (event) => this.updateFilter(event.detail), getMessage: (key, props) => this.getMessage(key, props), showChips: false }));
511
+ });
512
+ }
494
513
  getFilterItems() {
495
514
  const pinnedItems = [];
496
515
  const unpinnedItems = [];
@@ -550,6 +569,11 @@ const SnkFilterBar = class {
550
569
  loadPermitions() {
551
570
  this._application.isUserSup().then(value => this.allowDefault = value);
552
571
  }
572
+ addFilterBarLegacyConfigName() {
573
+ if (this.filterBarLegacyConfigName && this.configName) {
574
+ ConfigStorage.ConfigStorage.addFilterBarLegacyConfig(this.configName, this.filterBarLegacyConfigName);
575
+ }
576
+ }
553
577
  async loadConfigFromStorage(clearCache) {
554
578
  if (clearCache) {
555
579
  await ConfigStorage.ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
@@ -596,6 +620,9 @@ const SnkFilterBar = class {
596
620
  filterChangeListener(evt) {
597
621
  this.updateFilter(evt.detail);
598
622
  }
623
+ /**
624
+ * Abre o modal de filtros
625
+ */
599
626
  async showFilterModal() {
600
627
  const callbackOnApplyFilter = (filters) => {
601
628
  this.filterConfig = filters.map(this.normalizeItem).sort((a, b) => this._filtersComparator(a, b));
@@ -653,6 +680,7 @@ const SnkFilterBar = class {
653
680
  this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
654
681
  if (this._application) {
655
682
  this.loadPermitions();
683
+ this.addFilterBarLegacyConfigName();
656
684
  this.loadConfigFromStorage();
657
685
  }
658
686
  this.attachDataUnit();
@@ -667,7 +695,10 @@ const SnkFilterBar = class {
667
695
  if (this.showPersonalizedFilter) {
668
696
  return index$1.h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
669
697
  }
670
- return (index$1.h(index$1.Host, null, index$1.h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, index$1.h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), index$1.h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, index$1.h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
698
+ if (this.mode !== "regular") {
699
+ return (index$1.h(index$1.Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (index$1.h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }))));
700
+ }
701
+ return (index$1.h(index$1.Host, null, index$1.h("div", null, index$1.h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), index$1.h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, index$1.h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), index$1.h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, index$1.h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
671
702
  }
672
703
  get _element() { return index$1.getElement(this); }
673
704
  static get watchers() { return {
@@ -16,6 +16,7 @@ const SnkFilterDetail = class {
16
16
  this.filterChange = index.createEvent(this, "filterChange", 7);
17
17
  this.config = undefined;
18
18
  this.getMessage = undefined;
19
+ this.showHardFixed = true;
19
20
  }
20
21
  /**
21
22
  * Exibe o componente snk-filter-detail.
@@ -93,7 +94,9 @@ const SnkFilterDetail = class {
93
94
  return Object.assign(Object.assign({}, item), { visible: false, fixed: false, value: undefined });
94
95
  }
95
96
  getPopUpHeaderButtons() {
96
- return (index.h(index.Fragment, null, !this.config.removalBlocked && this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), !this.config.hardFixed && this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))));
97
+ return (index.h(index.Fragment, null, !this.config.removalBlocked &&
98
+ this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), this.showHardFixed && !this.config.hardFixed &&
99
+ this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))));
97
100
  }
98
101
  buildIcon(title, iconName, action) {
99
102
  return (index.h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", ref: elem => elem && this.buildIdButton(elem, title) }, index.h("ez-icon", Object.assign({ title: title, iconName: iconName }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo(`_${title}`)}` }))));
@@ -22,6 +22,7 @@ const SnkFilterItem = class {
22
22
  this.detailIsVisible = undefined;
23
23
  this.config = undefined;
24
24
  this.getMessage = undefined;
25
+ this.showChips = true;
25
26
  }
26
27
  observeDetailIsVisible(value) {
27
28
  this.visibleChanged.emit(value);
@@ -53,19 +54,22 @@ const SnkFilterItem = class {
53
54
  autoClose: true,
54
55
  innerClickTest: this.innerClickCheck,
55
56
  backClickListener: () => this.onDetailCloseCallback(),
56
- left: this.getScrollOffsetLeft(),
57
- top: this.getScrollOffsetTop(),
57
+ left: this.getOffsetLeft(),
58
+ top: this.getOffsetTop(),
58
59
  useOverlay: true,
59
60
  overlayClassName: 'ez-scrim ez-scrim--light',
60
61
  isFixed: true
61
62
  };
62
63
  }
63
- getScrollOffsetLeft() {
64
+ getOffsetLeft() {
64
65
  const padding = getComputedStyle(this._filterItemElement).getPropertyValue("padding-left");
65
66
  const rect = this._filterItemElement.getBoundingClientRect();
66
- return `calc(${rect.x}px + ${padding})`;
67
+ // Width baseado no conteudo do snk-filter-detail. Nesse momento ele retorna 0px pois ainda não foi criado em tela.
68
+ const filterDetailWidth = 430;
69
+ const adjustRightPosition = filterDetailWidth - (document.body.clientWidth - rect.left);
70
+ return `calc(${rect.x}px + ${padding} - ${adjustRightPosition > 0 ? adjustRightPosition : 0}px)`;
67
71
  }
68
- getScrollOffsetTop() {
72
+ getOffsetTop() {
69
73
  const rect = this._filterItemElement.getBoundingClientRect();
70
74
  return (rect.y + rect.height) + "px";
71
75
  }
@@ -297,7 +301,7 @@ const SnkFilterItem = class {
297
301
  }
298
302
  render() {
299
303
  const leftIcon = this.getLeftIconName();
300
- return (index.h(index.Host, null, index.h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon ? index.h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, index.h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), index.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index.h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail }))));
304
+ return (index.h(index.Host, null, this.showChips && (index.h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon && (index.h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" })), index.h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" }))), index.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index.h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail, showHardFixed: this.showChips }))));
301
305
  }
302
306
  get _filterItemElement() { return index.getElement(this); }
303
307
  static get watchers() { return {