@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
@@ -1,6 +1,6 @@
1
1
  import { Action as DUAction, ElementIDUtils } from '@sankhyalabs/core';
2
2
  import { Fragment, h } from '@stencil/core';
3
- import { SnkFormConfigManager } from '../../snk-form/SnkFormConfigManager';
3
+ import { SnkFormConfigManager } from '../../snk-form-config/SnkFormConfigManager';
4
4
  import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
5
5
  import TaskbarProcessor from '../../snk-taskbar/processor/taskbar-processor';
6
6
  import { TaskbarElement } from '../../snk-taskbar/elements/taskbar-elements';
@@ -26,6 +26,7 @@ export class SnkGuidesViewer {
26
26
  this.presentationMode = undefined;
27
27
  this.resourceID = undefined;
28
28
  this.detailTaskbarCustomContainerId = undefined;
29
+ this.formLegacyConfigName = undefined;
29
30
  this._hasToCreateFieldSearch = true;
30
31
  this._breadcrumbItems = [];
31
32
  this._guides = undefined;
@@ -323,11 +324,17 @@ export class SnkGuidesViewer {
323
324
  var _a;
324
325
  return this.selectedGuide === undefined || '__main' === ((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id);
325
326
  }
327
+ addFormLegacyConfigName() {
328
+ if (this.formLegacyConfigName) {
329
+ this._configManager.addFormLegacyConfig(this.formLegacyConfigName);
330
+ }
331
+ }
326
332
  componentWillLoad() {
327
333
  if (this.resourceID == undefined) {
328
334
  throw new Error("Erro interno: resourceID não informado");
329
335
  }
330
336
  this._configManager = new SnkFormConfigManager(this.configName, this.resourceID, config => this.masterFormConfig = config);
337
+ this.addFormLegacyConfigName();
331
338
  this._configManager.loadConfig();
332
339
  }
333
340
  componentDidRender() {
@@ -383,7 +390,7 @@ export class SnkGuidesViewer {
383
390
  }
384
391
  buildTaskBar() {
385
392
  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" })));
393
+ 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
394
  }
388
395
  async dataUnitActionHandler(action) {
389
396
  var _a;
@@ -442,7 +449,7 @@ export class SnkGuidesViewer {
442
449
  }
443
450
  this.loadTaskbarProcessor();
444
451
  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 &&
452
+ 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
453
  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
454
  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
455
  :
@@ -740,6 +747,23 @@ export class SnkGuidesViewer {
740
747
  },
741
748
  "attribute": "detail-taskbar-custom-container-id",
742
749
  "reflect": false
750
+ },
751
+ "formLegacyConfigName": {
752
+ "type": "string",
753
+ "mutable": false,
754
+ "complexType": {
755
+ "original": "string",
756
+ "resolved": "string",
757
+ "references": {}
758
+ },
759
+ "required": false,
760
+ "optional": false,
761
+ "docs": {
762
+ "tags": [],
763
+ "text": "Chave da configura\u00E7\u00E3o legado do formul\u00E1rio."
764
+ },
765
+ "attribute": "form-legacy-config-name",
766
+ "reflect": false
743
767
  }
744
768
  };
745
769
  }
@@ -120,7 +120,11 @@ export class SnkDataExporter {
120
120
  }
121
121
  fetchDataExporter(params)
122
122
  .then((result) => callbackResolver(result))
123
- .catch((exception) => ApplicationUtils.error(this.getMessage("snkDataExporter.message.exportError"), exception ? exception.statusMessage : this.getMessage("snkDataExporter.message.exportError")));
123
+ .catch((exception) => {
124
+ console.error(exception);
125
+ let { title, message, statusMessage } = exception || {};
126
+ ApplicationUtils.error(title || this.getMessage("snkDataExporter.message.exportError"), statusMessage || message || this.getMessage("snkDataExporter.message.unknownFailure"));
127
+ });
124
128
  }
125
129
  getOptionKey(option) {
126
130
  return Object.keys(DataExporterOption)
@@ -232,14 +236,14 @@ export class SnkDataExporter {
232
236
  const pkObject = [];
233
237
  const appId = (option === null || option === void 0 ? void 0 : option.replace(this._customPrefix, "")) || "";
234
238
  (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs().forEach(({ name, type, value }, index) => {
235
- const fields = [];
239
+ const fields = {};
236
240
  fields['fields'] = [];
237
241
  // Se for o primeiro elemento, adiciona essa primeira PK
238
242
  if (index === 0) {
239
243
  pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
240
244
  pkObject['pks'] = [];
241
245
  }
242
- const dataFields = { nome: name, tipo: this.parseDataType(type), valor: value };
246
+ const dataFields = { nome: `PK_${name}`, tipo: this.parseDataType(type), valor: value };
243
247
  fields['fields'].push(dataFields);
244
248
  pkObject['pks'].push(fields);
245
249
  });
@@ -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
  }
@@ -55,8 +55,10 @@ export class SnkFilterPersonalized {
55
55
  return this.presentationMode === EPresentationMode.MODAL;
56
56
  }
57
57
  doSearch(mode, argument, param) {
58
+ const context = Object.assign({}, param.searchContext);
59
+ context.searchOptions = Object.assign(Object.assign({}, context.searchOptions), { showInactives: "true" });
58
60
  return new Promise((resolve, reject) => {
59
- this._application.executePreparedSearch(mode, argument, param.searchContext)
61
+ this._application.executePreparedSearch(mode, argument, context)
60
62
  .then(result => {
61
63
  resolve(result);
62
64
  }).catch(reason => {
@@ -8,6 +8,7 @@ export class SnkFilterDetail {
8
8
  constructor() {
9
9
  this.config = undefined;
10
10
  this.getMessage = undefined;
11
+ this.showHardFixed = true;
11
12
  }
12
13
  /**
13
14
  * Exibe o componente snk-filter-detail.
@@ -85,7 +86,9 @@ export class SnkFilterDetail {
85
86
  return Object.assign(Object.assign({}, item), { visible: false, fixed: false, value: undefined });
86
87
  }
87
88
  getPopUpHeaderButtons() {
88
- return (h(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 })))));
89
+ return (h(Fragment, null, !this.config.removalBlocked &&
90
+ this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), this.showHardFixed && !this.config.hardFixed &&
91
+ 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 })))));
89
92
  }
90
93
  buildIcon(title, iconName, action) {
91
94
  return (h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", ref: elem => elem && this.buildIdButton(elem, title) }, h("ez-icon", Object.assign({ title: title, iconName: iconName }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`_${title}`)}` }))));
@@ -196,6 +199,24 @@ export class SnkFilterDetail {
196
199
  "tags": [],
197
200
  "text": "Usado pra flexibilizar os verbetes e mensagens de acordo com o SnkMessageBuilder."
198
201
  }
202
+ },
203
+ "showHardFixed": {
204
+ "type": "boolean",
205
+ "mutable": false,
206
+ "complexType": {
207
+ "original": "boolean",
208
+ "resolved": "boolean",
209
+ "references": {}
210
+ },
211
+ "required": false,
212
+ "optional": false,
213
+ "docs": {
214
+ "tags": [],
215
+ "text": "Controla a visibilidade do bot\u00E3o de fixar elemento"
216
+ },
217
+ "attribute": "show-hard-fixed",
218
+ "reflect": false,
219
+ "defaultValue": "true"
199
220
  }
200
221
  };
201
222
  }
@@ -14,6 +14,7 @@ export class SnkFilterItem {
14
14
  this.detailIsVisible = undefined;
15
15
  this.config = undefined;
16
16
  this.getMessage = undefined;
17
+ this.showChips = true;
17
18
  }
18
19
  observeDetailIsVisible(value) {
19
20
  this.visibleChanged.emit(value);
@@ -45,19 +46,22 @@ export class SnkFilterItem {
45
46
  autoClose: true,
46
47
  innerClickTest: this.innerClickCheck,
47
48
  backClickListener: () => this.onDetailCloseCallback(),
48
- left: this.getScrollOffsetLeft(),
49
- top: this.getScrollOffsetTop(),
49
+ left: this.getOffsetLeft(),
50
+ top: this.getOffsetTop(),
50
51
  useOverlay: true,
51
52
  overlayClassName: 'ez-scrim ez-scrim--light',
52
53
  isFixed: true
53
54
  };
54
55
  }
55
- getScrollOffsetLeft() {
56
+ getOffsetLeft() {
56
57
  const padding = getComputedStyle(this._filterItemElement).getPropertyValue("padding-left");
57
58
  const rect = this._filterItemElement.getBoundingClientRect();
58
- return `calc(${rect.x}px + ${padding})`;
59
+ // Width baseado no conteudo do snk-filter-detail. Nesse momento ele retorna 0px pois ainda não foi criado em tela.
60
+ const filterDetailWidth = 430;
61
+ const adjustRightPosition = filterDetailWidth - (document.body.clientWidth - rect.left);
62
+ return `calc(${rect.x}px + ${padding} - ${adjustRightPosition > 0 ? adjustRightPosition : 0}px)`;
59
63
  }
60
- getScrollOffsetTop() {
64
+ getOffsetTop() {
61
65
  const rect = this._filterItemElement.getBoundingClientRect();
62
66
  return (rect.y + rect.height) + "px";
63
67
  }
@@ -289,7 +293,7 @@ export class SnkFilterItem {
289
293
  }
290
294
  render() {
291
295
  const leftIcon = this.getLeftIconName();
292
- return (h(Host, null, h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon ? h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, 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 }))));
296
+ return (h(Host, null, this.showChips && (h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon && (h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" })), h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" }))), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, 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 }))));
293
297
  }
294
298
  static get is() { return "snk-filter-item"; }
295
299
  static get properties() {
@@ -327,6 +331,24 @@ export class SnkFilterItem {
327
331
  "tags": [],
328
332
  "text": "Usado pra flexibilizar os verbetes e mensagens de acordo com o SnkMessageBuilder."
329
333
  }
334
+ },
335
+ "showChips": {
336
+ "type": "boolean",
337
+ "mutable": false,
338
+ "complexType": {
339
+ "original": "boolean",
340
+ "resolved": "boolean",
341
+ "references": {}
342
+ },
343
+ "required": false,
344
+ "optional": false,
345
+ "docs": {
346
+ "tags": [],
347
+ "text": "Usado para controlar a visibilidade dos chips de filtros"
348
+ },
349
+ "attribute": "show-chips",
350
+ "reflect": false,
351
+ "defaultValue": "true"
330
352
  }
331
353
  };
332
354
  }
@@ -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,29 @@
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
+ width: 0px;
26
+ height: 0px;
27
+ }
28
+
29
+ :host([data-mode="button"]) {
30
+ grid-template-columns: 1fr;
31
+ width: fit-content;
32
+ }
33
+
11
34
  .snk-filter__popover-container{
12
35
  /*private*/
13
36
  display: flex;
@@ -28,17 +28,25 @@ export class SnkFilterBar {
28
28
  return this._calculateSortIndex(b) - this._calculateSortIndex(a);
29
29
  };
30
30
  this.dataUnit = undefined;
31
+ this.title = undefined;
31
32
  this.configName = undefined;
32
33
  this.resourceID = undefined;
34
+ this.mode = "regular";
33
35
  this.filterConfig = undefined;
34
36
  this.messagesBuilder = undefined;
35
37
  this.disablePersonalizedFilter = undefined;
38
+ this.filterBarLegacyConfigName = undefined;
36
39
  this.allowDefault = undefined;
37
40
  this.scrollerLocked = false;
38
41
  this.showPersonalizedFilter = false;
39
42
  this.personalizedFilterId = undefined;
40
43
  }
41
44
  observeFilterConfig(newValue, oldValue) {
45
+ if (ObjectUtils.equals(newValue, oldValue))
46
+ return;
47
+ this.handleFilterConfigsChanged(oldValue, newValue);
48
+ }
49
+ handleFilterConfigsChanged(oldValue, newValue) {
42
50
  if (oldValue != undefined && newValue == undefined) {
43
51
  this._loadingPending = true;
44
52
  this._configUpdated = true;
@@ -242,6 +250,17 @@ export class SnkFilterBar {
242
250
  filterActiveFilter(item) {
243
251
  return item.visible || item.removalBlocked;
244
252
  }
253
+ filterPersonalizedItems(item) {
254
+ return item.type === FilterItemType.PERSONALIZED;
255
+ }
256
+ getPersonalizedFilterVariableItems() {
257
+ return this.filterConfig
258
+ .filter(this.filterPersonalizedItems)
259
+ .map(item => {
260
+ const itemId = `filter-${item.id}`;
261
+ return (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 }));
262
+ });
263
+ }
245
264
  getFilterItems() {
246
265
  const pinnedItems = [];
247
266
  const unpinnedItems = [];
@@ -301,6 +320,11 @@ export class SnkFilterBar {
301
320
  loadPermitions() {
302
321
  this._application.isUserSup().then(value => this.allowDefault = value);
303
322
  }
323
+ addFilterBarLegacyConfigName() {
324
+ if (this.filterBarLegacyConfigName && this.configName) {
325
+ ConfigStorage.addFilterBarLegacyConfig(this.configName, this.filterBarLegacyConfigName);
326
+ }
327
+ }
304
328
  async loadConfigFromStorage(clearCache) {
305
329
  if (clearCache) {
306
330
  await ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
@@ -347,6 +371,9 @@ export class SnkFilterBar {
347
371
  filterChangeListener(evt) {
348
372
  this.updateFilter(evt.detail);
349
373
  }
374
+ /**
375
+ * Abre o modal de filtros
376
+ */
350
377
  async showFilterModal() {
351
378
  const callbackOnApplyFilter = (filters) => {
352
379
  this.filterConfig = filters.map(this.normalizeItem).sort((a, b) => this._filtersComparator(a, b));
@@ -404,6 +431,7 @@ export class SnkFilterBar {
404
431
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
405
432
  if (this._application) {
406
433
  this.loadPermitions();
434
+ this.addFilterBarLegacyConfigName();
407
435
  this.loadConfigFromStorage();
408
436
  }
409
437
  this.attachDataUnit();
@@ -418,7 +446,10 @@ export class SnkFilterBar {
418
446
  if (this.showPersonalizedFilter) {
419
447
  return 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 });
420
448
  }
421
- return (h(Host, null, h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
449
+ if (this.mode !== "regular") {
450
+ return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }))));
451
+ }
452
+ return (h(Host, null, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
422
453
  }
423
454
  static get is() { return "snk-filter-bar"; }
424
455
  static get encapsulation() { return "scoped"; }
@@ -454,6 +485,23 @@ export class SnkFilterBar {
454
485
  "text": "Recebe o DataUnit do ambiente. Se n\u00E3o for informado, procura pela refer\u00EAncia\ndo SnkDataUnit. Necess\u00E1rio para se registrar como provedor de filtros."
455
486
  }
456
487
  },
488
+ "title": {
489
+ "type": "string",
490
+ "mutable": false,
491
+ "complexType": {
492
+ "original": "string",
493
+ "resolved": "string",
494
+ "references": {}
495
+ },
496
+ "required": false,
497
+ "optional": false,
498
+ "docs": {
499
+ "tags": [],
500
+ "text": "T\u00EDtulo que ser\u00E1 apresentado na barra de filtros"
501
+ },
502
+ "attribute": "title",
503
+ "reflect": false
504
+ },
457
505
  "configName": {
458
506
  "type": "string",
459
507
  "mutable": false,
@@ -488,6 +536,24 @@ export class SnkFilterBar {
488
536
  "attribute": "resource-i-d",
489
537
  "reflect": false
490
538
  },
539
+ "mode": {
540
+ "type": "string",
541
+ "mutable": false,
542
+ "complexType": {
543
+ "original": "\"regular\" | \"button\" | \"hidden\"",
544
+ "resolved": "\"button\" | \"hidden\" | \"regular\"",
545
+ "references": {}
546
+ },
547
+ "required": false,
548
+ "optional": false,
549
+ "docs": {
550
+ "tags": [],
551
+ "text": "Modo de apresenta\u00E7\u00E3o da filterbar."
552
+ },
553
+ "attribute": "mode",
554
+ "reflect": false,
555
+ "defaultValue": "\"regular\""
556
+ },
491
557
  "filterConfig": {
492
558
  "type": "unknown",
493
559
  "mutable": true,
@@ -543,10 +609,27 @@ export class SnkFilterBar {
543
609
  "optional": false,
544
610
  "docs": {
545
611
  "tags": [],
546
- "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)."
612
+ "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)."
547
613
  },
548
614
  "attribute": "disable-personalized-filter",
549
615
  "reflect": false
616
+ },
617
+ "filterBarLegacyConfigName": {
618
+ "type": "string",
619
+ "mutable": false,
620
+ "complexType": {
621
+ "original": "string",
622
+ "resolved": "string",
623
+ "references": {}
624
+ },
625
+ "required": false,
626
+ "optional": false,
627
+ "docs": {
628
+ "tags": [],
629
+ "text": "Chave da configura\u00E7\u00E3o legado da barra de filtros."
630
+ },
631
+ "attribute": "filter-bar-legacy-config-name",
632
+ "reflect": false
550
633
  }
551
634
  };
552
635
  }
@@ -708,6 +791,37 @@ export class SnkFilterBar {
708
791
  "text": "- Retorna o item de filtro removido, ou undefined caso n\u00E3o encontrado."
709
792
  }]
710
793
  }
794
+ },
795
+ "showFilterModal": {
796
+ "complexType": {
797
+ "signature": "() => Promise<void>",
798
+ "parameters": [],
799
+ "references": {
800
+ "Promise": {
801
+ "location": "global"
802
+ },
803
+ "SnkFilterItemConfig": {
804
+ "location": "import",
805
+ "path": "./filter-item/snk-filter-item"
806
+ },
807
+ "Array": {
808
+ "location": "global"
809
+ },
810
+ "SnkFilterModalFactoryParams": {
811
+ "location": "import",
812
+ "path": "./utils/SnkFilterModalFactory"
813
+ },
814
+ "IPersonalizedFilter": {
815
+ "location": "import",
816
+ "path": "../snk-personalized-filter/interfaces/IPersonalizedFilter"
817
+ }
818
+ },
819
+ "return": "Promise<void>"
820
+ },
821
+ "docs": {
822
+ "text": "Abre o modal de filtros",
823
+ "tags": []
824
+ }
711
825
  }
712
826
  };
713
827
  }
@@ -1,6 +1,6 @@
1
1
  import { ElementIDUtils } from '@sankhyalabs/core';
2
2
  import { h } from '@stencil/core';
3
- import { SnkFormConfigManager } from './SnkFormConfigManager';
3
+ import { SnkFormConfigManager } from '../snk-form-config/SnkFormConfigManager';
4
4
  import ResourceIDUtils from '../../lib/resourceid/ResourceIDUtils';
5
5
  export class SnkForm {
6
6
  constructor() {
@@ -11,6 +11,7 @@ export class SnkForm {
11
11
  this.configName = undefined;
12
12
  this.recordsValidator = undefined;
13
13
  this.messagesBuilder = undefined;
14
+ this.formLegacyConfigName = undefined;
14
15
  this.resourceID = undefined;
15
16
  }
16
17
  /**
@@ -58,8 +59,14 @@ export class SnkForm {
58
59
  this.resourceID = await ResourceIDUtils.getResourceID();
59
60
  }
60
61
  this._configManager = new SnkFormConfigManager(this.configName, this.resourceID);
62
+ this.addFormLegacyConfig();
61
63
  this._configManager.loadConfig();
62
64
  }
65
+ addFormLegacyConfig() {
66
+ if (this.formLegacyConfigName) {
67
+ this._configManager.addFormLegacyConfig(this.formLegacyConfigName);
68
+ }
69
+ }
63
70
  render() {
64
71
  if (!this._dataUnit || !this._dataState) {
65
72
  return undefined;
@@ -138,6 +145,23 @@ export class SnkForm {
138
145
  "text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
139
146
  }
140
147
  },
148
+ "formLegacyConfigName": {
149
+ "type": "string",
150
+ "mutable": false,
151
+ "complexType": {
152
+ "original": "string",
153
+ "resolved": "string",
154
+ "references": {}
155
+ },
156
+ "required": false,
157
+ "optional": false,
158
+ "docs": {
159
+ "tags": [],
160
+ "text": "Chave da configura\u00E7\u00E3o legado do formul\u00E1rio."
161
+ },
162
+ "attribute": "form-legacy-config-name",
163
+ "reflect": false
164
+ },
141
165
  "resourceID": {
142
166
  "type": "string",
143
167
  "mutable": false,
@@ -1,4 +1,4 @@
1
- import { ConfigStorage } from "../../lib/configs/ConfigStorage";
1
+ import { ConfigStorage } from '../../lib/configs/ConfigStorage';
2
2
  import { ObjectUtils, StringUtils } from "@sankhyalabs/core";
3
3
  import { FormConfigFetcher } from "../../lib/http/data-fetcher/fetchers/form-config-fetcher";
4
4
  export class SnkFormConfigManager {
@@ -7,6 +7,11 @@ export class SnkFormConfigManager {
7
7
  this._configName = configName;
8
8
  this._onConfigChange = onConfigChange;
9
9
  }
10
+ addFormLegacyConfig(legacyConfigName) {
11
+ if (this._configName) {
12
+ ConfigStorage.addFormLegacyConfig(this._configName, legacyConfigName);
13
+ }
14
+ }
10
15
  async loadConfig() {
11
16
  return new Promise(resolve => {
12
17
  ConfigStorage.loadFormConfig(this._configName, this._resourceID)
@@ -92,16 +97,19 @@ export class SnkFormConfigManager {
92
97
  const normalizedFilter = StringUtils.replaceAccentuatedCharsLower(descriptionFilter.toLocaleLowerCase());
93
98
  return normalizedText.includes(normalizedFilter);
94
99
  }
95
- getInsertionConfig(dataUnit) {
96
- const fields = this.getFieldsList(dataUnit).filter(field => {
97
- if (dataUnit) {
98
- const def = dataUnit.getField(field.name);
99
- if (def && def.readOnly) {
100
- return false;
100
+ getInsertionConfig(dataUnit, ignoreReadOnlyFormFields) {
101
+ let fields = this.getFieldsList(dataUnit);
102
+ if (ignoreReadOnlyFormFields) {
103
+ fields = fields.filter(field => {
104
+ if (dataUnit) {
105
+ const def = dataUnit.getField(field.name);
106
+ if (def && def.readOnly) {
107
+ return false;
108
+ }
101
109
  }
102
- }
103
- return !field.readOnly;
104
- });
110
+ return !field.readOnly;
111
+ });
112
+ }
105
113
  return Object.assign(Object.assign({}, this._config), { fields });
106
114
  }
107
115
  setConfig(config) {
@@ -121,8 +129,8 @@ export class SnkFormConfigManager {
121
129
  this._onConfigChange(Object.assign({}, this._config));
122
130
  }
123
131
  }
124
- getConfig(insertionMode, dataUnit) {
125
- return insertionMode ? this.getInsertionConfig(dataUnit) : Object.assign({}, this._config);
132
+ getConfig(insertionMode, dataUnit, ignoreReadOnlyFormFields) {
133
+ return insertionMode ? this.getInsertionConfig(dataUnit, ignoreReadOnlyFormFields !== null && ignoreReadOnlyFormFields !== void 0 ? ignoreReadOnlyFormFields : true) : Object.assign({}, this._config);
126
134
  }
127
135
  getFormConfigFetcher() {
128
136
  if (this._formConfigFetcher == undefined) {