@sankhyalabs/sankhyablocks 8.15.0-dev.7 → 8.15.0-dev.70

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 (382) hide show
  1. package/dist/cjs/{ConfigStorage-8009ecb2.js → ConfigStorage-9a53a42c.js} +94 -21
  2. package/dist/cjs/{DataFetcher-ba94ed5b.js → DataFetcher-515bda03.js} +7 -4
  3. package/dist/cjs/IExporterProvider-90690372.js +230 -0
  4. package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
  5. package/dist/cjs/RecordIDUtils-3735135c.js +43 -0
  6. package/dist/cjs/{SnkFormConfigManager-7d850fbc.js → SnkFormConfigManager-7b222c78.js} +23 -15
  7. package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-4a95fe86.js} +25 -13
  8. package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-5acb0335.js} +1 -1
  9. package/dist/cjs/{dataunit-fetcher-14108bec.js → dataunit-fetcher-7a08e4dd.js} +409 -77
  10. package/dist/cjs/{form-config-fetcher-df043d3d.js → form-config-fetcher-3f430aee.js} +13 -1
  11. package/dist/cjs/index-f9e81701.js +2 -10
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/{pesquisa-fetcher-ef050a47.js → pesquisa-fetcher-916a935c.js} +12 -13
  14. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  15. package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +526 -8
  16. package/dist/cjs/snk-application.cjs.entry.js +68 -24
  17. package/dist/cjs/snk-attach.cjs.entry.js +430 -71
  18. package/dist/cjs/snk-crud.cjs.entry.js +124 -28
  19. package/dist/cjs/snk-data-exporter.cjs.entry.js +207 -83
  20. package/dist/cjs/snk-data-unit-3718477f.js +670 -0
  21. package/dist/cjs/snk-data-unit.cjs.entry.js +11 -2
  22. package/dist/cjs/snk-detail-view.cjs.entry.js +52 -13
  23. package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
  24. package/dist/cjs/snk-filter-bar.cjs.entry.js +70 -10
  25. package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
  26. package/dist/cjs/snk-filter-item.cjs.entry.js +13 -6
  27. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  28. package/dist/cjs/snk-filter-modal.cjs.entry.js +2 -1
  29. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
  30. package/dist/cjs/snk-form-config.cjs.entry.js +47 -27
  31. package/dist/cjs/snk-form-view.cjs.entry.js +67 -0
  32. package/dist/cjs/snk-form.cjs.entry.js +60 -8
  33. package/dist/cjs/snk-grid.cjs.entry.js +199 -122
  34. package/dist/cjs/{snk-guides-viewer-e7f76399.js → snk-guides-viewer-7fb9e5a1.js} +56 -20
  35. package/dist/cjs/snk-guides-viewer.cjs.entry.js +10 -10
  36. package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +3 -1
  37. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  38. package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
  39. package/dist/cjs/snk-simple-crud.cjs.entry.js +507 -39
  40. package/dist/cjs/snk-taskbar.cjs.entry.js +124 -15
  41. package/dist/cjs/{taskbar-elements-01b85b99.js → taskbar-elements-d9392685.js} +11 -11
  42. package/dist/collection/collection-manifest.json +8 -8
  43. package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
  44. package/dist/collection/components/snk-application/snk-application.js +122 -19
  45. package/dist/collection/components/snk-attach/snk-attach.js +220 -53
  46. package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
  47. package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
  48. package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
  49. package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
  50. package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
  51. package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +118 -0
  52. package/dist/collection/components/snk-attach/structure/index.js +6 -3
  53. package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js +1 -0
  54. package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js +1 -0
  55. package/dist/collection/components/snk-crud/snk-crud.js +340 -19
  56. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +137 -2
  57. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +161 -0
  58. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
  59. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +163 -13
  60. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +90 -0
  61. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +68 -0
  62. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +54 -1
  63. package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +1 -0
  64. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +58 -0
  65. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +55 -0
  66. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +44 -50
  67. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +88 -0
  68. package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +38 -0
  69. package/dist/collection/components/snk-data-unit/snk-data-unit.js +500 -216
  70. package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +24 -0
  71. package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -3
  72. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
  73. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -1
  74. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +22 -1
  75. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +31 -6
  76. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +19 -1
  77. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +24 -1
  78. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +180 -5
  79. package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
  80. package/dist/collection/components/snk-form/snk-form.js +126 -5
  81. package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +22 -14
  82. package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +50 -30
  83. package/dist/collection/components/snk-grid/snk-grid.js +341 -115
  84. package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
  85. package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
  86. package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
  87. package/dist/collection/components/snk-simple-crud/regular-buttons.js +3 -0
  88. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +10 -2
  89. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +824 -22
  90. package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +4 -2
  91. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +11 -11
  92. package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
  93. package/dist/collection/components/snk-taskbar/snk-taskbar.js +167 -14
  94. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +35 -0
  95. package/dist/collection/lib/configs/ConfigStorage.js +86 -16
  96. package/dist/collection/lib/dataUnit/InMemoryLoader.js +15 -42
  97. package/dist/collection/lib/dataUnit/ValueFormatter.js +4 -0
  98. package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +33 -0
  99. package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js +1 -0
  100. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +7 -4
  101. package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
  102. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
  103. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
  104. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
  105. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
  106. package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
  107. package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
  108. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +3 -0
  109. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +4 -0
  110. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +11 -13
  111. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +30 -2
  112. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js +1 -0
  113. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js +1 -0
  114. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +87 -24
  115. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js +22 -0
  116. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +12 -0
  117. package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
  118. package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +6 -3
  119. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +12 -13
  120. package/dist/collection/lib/index.js +1 -1
  121. package/dist/collection/lib/message/SnkMessageBuilder.js +25 -32
  122. package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
  123. package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -1
  124. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -0
  125. package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +4 -0
  126. package/dist/collection/lib/utils/CrudUtils.js +13 -1
  127. package/dist/components/ConfigStorage.js +92 -19
  128. package/dist/components/DataFetcher.js +7 -4
  129. package/dist/components/IExporterProvider.js +298 -0
  130. package/dist/components/ISave.js +42 -0
  131. package/dist/components/SnkFormConfigManager.js +21 -13
  132. package/dist/components/SnkMessageBuilder.js +25 -13
  133. package/dist/components/dataunit-fetcher.js +185 -241
  134. package/dist/components/form-config-fetcher.js +12 -0
  135. package/dist/components/index.d.ts +6 -6
  136. package/dist/components/index2.js +198 -33
  137. package/dist/{esm/pesquisa-fetcher-dd3ca0a5.js → components/pesquisa-fetcher.js} +13 -14
  138. package/dist/components/snk-actions-button2.js +4 -10
  139. package/dist/components/snk-application2.js +66 -18
  140. package/dist/components/snk-attach2.js +485 -78
  141. package/dist/components/snk-crud.js +131 -23
  142. package/dist/components/snk-data-exporter2.js +202 -83
  143. package/dist/components/snk-data-unit2.js +463 -214
  144. package/dist/components/snk-detail-view2.js +137 -23
  145. package/dist/components/snk-entity-list.js +5 -3
  146. package/dist/components/snk-expression-item2.js +1 -1
  147. package/dist/components/snk-filter-bar2.js +74 -8
  148. package/dist/components/snk-filter-detail2.js +5 -1
  149. package/dist/components/snk-filter-item2.js +14 -6
  150. package/dist/components/snk-filter-modal.js +4 -2
  151. package/dist/components/snk-filter-multi-select.js +2 -1
  152. package/dist/components/snk-form-config2.js +46 -26
  153. package/dist/components/snk-form-view2.js +72 -1
  154. package/dist/components/snk-form.js +60 -5
  155. package/dist/components/snk-grid-config2.js +128 -102
  156. package/dist/components/snk-grid2.js +207 -119
  157. package/dist/components/snk-personalized-filter-editor.js +3 -1
  158. package/dist/components/snk-personalized-filter2.js +1 -1
  159. package/dist/components/snk-pesquisa2.js +1 -1
  160. package/dist/components/snk-simple-crud2.js +568 -35
  161. package/dist/components/snk-taskbar2.js +144 -29
  162. package/dist/components/taskbar-actions-button2.js +4 -2
  163. package/dist/esm/{ConfigStorage-1244b8b0.js → ConfigStorage-174101b9.js} +94 -21
  164. package/dist/esm/{DataFetcher-aa159c5a.js → DataFetcher-4b4b7beb.js} +7 -4
  165. package/dist/esm/IExporterProvider-ce2ca127.js +221 -0
  166. package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
  167. package/dist/esm/RecordIDUtils-87d02110.js +41 -0
  168. package/dist/esm/{SnkFormConfigManager-9be0e7d4.js → SnkFormConfigManager-3bdb3e1f.js} +23 -15
  169. package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-3a767111.js} +25 -13
  170. package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-9f86c346.js} +1 -1
  171. package/dist/esm/{dataunit-fetcher-cbec1594.js → dataunit-fetcher-f3fa35b9.js} +392 -70
  172. package/dist/esm/{form-config-fetcher-36219cd3.js → form-config-fetcher-5d72aaf1.js} +13 -1
  173. package/dist/esm/index-a7d3d3f1.js +2 -10
  174. package/dist/esm/loader.js +1 -1
  175. package/dist/esm/pesquisa-fetcher-9cfab836.js +164 -0
  176. package/dist/esm/sankhyablocks.js +1 -1
  177. package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +525 -9
  178. package/dist/esm/snk-application.entry.js +68 -24
  179. package/dist/esm/snk-attach.entry.js +430 -71
  180. package/dist/esm/snk-crud.entry.js +124 -28
  181. package/dist/esm/snk-data-exporter.entry.js +208 -84
  182. package/dist/esm/snk-data-unit-8d6afa43.js +668 -0
  183. package/dist/esm/snk-data-unit.entry.js +11 -2
  184. package/dist/esm/snk-detail-view.entry.js +52 -13
  185. package/dist/esm/snk-entity-list.entry.js +5 -3
  186. package/dist/esm/snk-filter-bar.entry.js +70 -10
  187. package/dist/esm/snk-filter-detail.entry.js +4 -1
  188. package/dist/esm/snk-filter-item.entry.js +13 -6
  189. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  190. package/dist/esm/snk-filter-modal.entry.js +2 -1
  191. package/dist/esm/snk-filter-multi-select.entry.js +2 -1
  192. package/dist/esm/snk-form-config.entry.js +48 -28
  193. package/dist/esm/snk-form-view.entry.js +67 -0
  194. package/dist/esm/snk-form.entry.js +60 -8
  195. package/dist/esm/snk-grid.entry.js +199 -122
  196. package/dist/esm/{snk-guides-viewer-c7aaf02a.js → snk-guides-viewer-dabd574c.js} +56 -20
  197. package/dist/esm/snk-guides-viewer.entry.js +10 -10
  198. package/dist/esm/snk-personalized-filter-editor.entry.js +3 -1
  199. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  200. package/dist/esm/snk-pesquisa.entry.js +1 -1
  201. package/dist/esm/snk-simple-crud.entry.js +500 -32
  202. package/dist/esm/snk-taskbar.entry.js +125 -16
  203. package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-ad766858.js} +11 -11
  204. package/dist/sankhyablocks/{p-9695f78b.js → p-010d475f.js} +1 -1
  205. package/dist/sankhyablocks/p-109e0551.js +1 -0
  206. package/dist/sankhyablocks/p-1918789e.js +1 -0
  207. package/dist/sankhyablocks/p-19ba2e08.entry.js +1 -0
  208. package/dist/sankhyablocks/p-1c628fb2.entry.js +1 -0
  209. package/dist/sankhyablocks/p-1db45d26.entry.js +1 -0
  210. package/dist/sankhyablocks/p-1e9c3f95.entry.js +1 -0
  211. package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
  212. package/dist/sankhyablocks/p-2a84e45b.entry.js +1 -0
  213. package/dist/sankhyablocks/p-2acc8816.entry.js +1 -0
  214. package/dist/sankhyablocks/p-2c9ea7b6.entry.js +1 -0
  215. package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
  216. package/dist/sankhyablocks/p-3e4c2cfe.entry.js +11 -0
  217. package/dist/sankhyablocks/p-4a8a149d.entry.js +1 -0
  218. package/dist/sankhyablocks/p-4ce73e88.js +1 -0
  219. package/dist/sankhyablocks/p-52df8935.entry.js +1 -0
  220. package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
  221. package/dist/sankhyablocks/p-566f5f50.js +56 -0
  222. package/dist/sankhyablocks/{p-3520c088.entry.js → p-59dccb7a.entry.js} +1 -1
  223. package/dist/sankhyablocks/p-5bd78e4c.entry.js +1 -0
  224. package/dist/sankhyablocks/p-61dd89eb.js +1 -0
  225. package/dist/sankhyablocks/p-6b2be902.js +6 -0
  226. package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
  227. package/dist/sankhyablocks/p-9863d682.js +1 -0
  228. package/dist/sankhyablocks/{p-e6380c60.js → p-a6dfa396.js} +1 -1
  229. package/dist/sankhyablocks/{p-f514913b.entry.js → p-aa854fa8.entry.js} +1 -1
  230. package/dist/sankhyablocks/p-aa9c4099.entry.js +1 -0
  231. package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
  232. package/dist/sankhyablocks/p-b27114c4.js +1 -0
  233. package/dist/sankhyablocks/p-b643f746.entry.js +1 -0
  234. package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
  235. package/dist/sankhyablocks/p-cfb98f51.entry.js +1 -0
  236. package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
  237. package/dist/sankhyablocks/p-e0c27486.js +26 -0
  238. package/dist/sankhyablocks/p-e238279a.entry.js +1 -0
  239. package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
  240. package/dist/sankhyablocks/p-eae66367.js +1 -0
  241. package/dist/sankhyablocks/p-fde91811.js +60 -0
  242. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  243. package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
  244. package/dist/types/components/snk-application/snk-application.d.ts +21 -2
  245. package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
  246. package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
  247. package/dist/types/components/snk-attach/snk-attach.d.ts +33 -10
  248. package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
  249. package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +40 -0
  250. package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
  251. package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
  252. package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
  253. package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +16 -0
  254. package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
  255. package/dist/types/components/snk-crud/interfaces/PropsCustomEditor.d.ts +4 -0
  256. package/dist/types/components/snk-crud/interfaces/PropsCustomRender.d.ts +4 -0
  257. package/dist/types/components/snk-crud/snk-crud.d.ts +53 -1
  258. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +24 -1
  259. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +28 -3
  260. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +30 -1
  261. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +13 -0
  262. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +11 -0
  263. package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +24 -4
  264. package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +5 -0
  265. package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +17 -0
  266. package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +17 -0
  267. package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +3 -1
  268. package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +77 -0
  269. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +3 -0
  270. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +61 -2
  271. package/dist/types/components/snk-data-unit/test/resources/metadataMock.d.ts +3 -0
  272. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
  273. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +7 -3
  274. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +5 -0
  275. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +31 -1
  276. package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -1
  277. package/dist/types/components/snk-form/snk-form.d.ts +20 -1
  278. package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +2 -1
  279. package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +5 -3
  280. package/dist/types/components/snk-grid/snk-grid.d.ts +65 -7
  281. package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
  282. package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
  283. package/dist/types/components/snk-simple-crud/regular-buttons.d.ts +3 -0
  284. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +138 -6
  285. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
  286. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +34 -1
  287. package/dist/types/components.d.ts +502 -16
  288. package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +11 -0
  289. package/dist/types/lib/configs/ConfigStorage.d.ts +25 -1
  290. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +2 -3
  291. package/dist/types/lib/dataUnit/ValueFormatter.d.ts +2 -0
  292. package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +4 -0
  293. package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +3 -0
  294. package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
  295. package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
  296. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
  297. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
  298. package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
  299. package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
  300. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +2 -1
  301. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +1 -0
  302. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -0
  303. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -0
  304. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.d.ts +10 -0
  305. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.d.ts +7 -0
  306. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +7 -0
  307. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.d.ts +20 -0
  308. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +3 -0
  309. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +2 -0
  310. package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
  311. package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +2 -1
  312. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
  313. package/dist/types/lib/index.d.ts +1 -1
  314. package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
  315. package/package.json +15 -6
  316. package/dist/cjs/PreloadManager-84466da6.js +0 -224
  317. package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
  318. package/dist/cjs/snk-data-unit-1bc69073.js +0 -462
  319. package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
  320. package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
  321. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +0 -34
  322. package/dist/components/field-search.js +0 -121
  323. package/dist/components/index3.js +0 -199
  324. package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
  325. package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
  326. package/dist/esm/snk-data-unit-6208ebf0.js +0 -460
  327. package/dist/esm/snk-grid-config.entry.js +0 -479
  328. package/dist/esm/snk-select-box.entry.js +0 -21
  329. package/dist/sankhyablocks/p-03dcc5ff.entry.js +0 -1
  330. package/dist/sankhyablocks/p-0874adb5.entry.js +0 -1
  331. package/dist/sankhyablocks/p-094c30cb.js +0 -1
  332. package/dist/sankhyablocks/p-0d7863ed.js +0 -26
  333. package/dist/sankhyablocks/p-11081798.entry.js +0 -1
  334. package/dist/sankhyablocks/p-20726710.entry.js +0 -1
  335. package/dist/sankhyablocks/p-25927311.entry.js +0 -1
  336. package/dist/sankhyablocks/p-32f0935f.js +0 -1
  337. package/dist/sankhyablocks/p-374d03f6.js +0 -1
  338. package/dist/sankhyablocks/p-3891ae6f.js +0 -60
  339. package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
  340. package/dist/sankhyablocks/p-585294ee.js +0 -56
  341. package/dist/sankhyablocks/p-6977a26c.entry.js +0 -1
  342. package/dist/sankhyablocks/p-69efa80d.entry.js +0 -1
  343. package/dist/sankhyablocks/p-776ee8e3.js +0 -1
  344. package/dist/sankhyablocks/p-809f367d.entry.js +0 -1
  345. package/dist/sankhyablocks/p-8c243e7e.entry.js +0 -11
  346. package/dist/sankhyablocks/p-8d16f9ce.js +0 -1
  347. package/dist/sankhyablocks/p-8d70b5d5.entry.js +0 -1
  348. package/dist/sankhyablocks/p-98674137.entry.js +0 -1
  349. package/dist/sankhyablocks/p-a9e5b094.entry.js +0 -1
  350. package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
  351. package/dist/sankhyablocks/p-c4d19840.entry.js +0 -1
  352. package/dist/sankhyablocks/p-c627ba91.entry.js +0 -1
  353. package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
  354. package/dist/sankhyablocks/p-cb7419e0.entry.js +0 -1
  355. package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
  356. package/dist/sankhyablocks/p-d6317851.entry.js +0 -1
  357. package/dist/sankhyablocks/p-d81f20c4.entry.js +0 -1
  358. package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
  359. package/dist/sankhyablocks/p-dc8b6418.entry.js +0 -1
  360. package/dist/sankhyablocks/p-f2056f66.entry.js +0 -1
  361. package/dist/sankhyablocks/p-fd8814b9.entry.js +0 -1
  362. package/dist/sankhyablocks/p-ff6064e7.js +0 -1
  363. package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
  364. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +0 -3
  365. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
  366. /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
  367. /package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
  368. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
  369. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
  370. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
  371. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
  372. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
  373. /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
  374. /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
  375. /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
  376. /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
  377. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
  378. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
  379. /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
  380. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
  381. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
  382. /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -13,6 +13,8 @@ export class SnkCrud {
13
13
  constructor() {
14
14
  this._keyDownHandler = async (event) => this.keyDownListener(event);
15
15
  this._viewHistory = [];
16
+ this._customEditors = new Map();
17
+ this._customRenders = new Map();
16
18
  this._dataUnit = undefined;
17
19
  this._dataState = undefined;
18
20
  this.attachmentRegisterKey = undefined;
@@ -20,6 +22,7 @@ export class SnkCrud {
20
22
  this._canEdit = undefined;
21
23
  this._resourceID = undefined;
22
24
  this.configName = undefined;
25
+ this.filterBarTitle = undefined;
23
26
  this.selectionToastConfig = undefined;
24
27
  this.showActionButtons = false;
25
28
  this.actionsList = undefined;
@@ -30,6 +33,11 @@ export class SnkCrud {
30
33
  this.presentationMode = PresentationMode.PRIMARY;
31
34
  this.messagesBuilder = undefined;
32
35
  this.useEnterLikeTab = false;
36
+ this.gridLegacyConfigName = undefined;
37
+ this.filterBarLegacyConfigName = undefined;
38
+ this.formLegacyConfigName = undefined;
39
+ this.disablePersonalizedFilter = undefined;
40
+ this.autoLoad = undefined;
33
41
  this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
34
42
  }
35
43
  /**
@@ -65,6 +73,49 @@ export class SnkCrud {
65
73
  async getFilterBar() {
66
74
  return await this._snkGrid.getFilterBar();
67
75
  }
76
+ /**
77
+ * Registra um editor customizado para campos da grade e formulário.
78
+ */
79
+ async addCustomEditor(fieldName, customEditor) {
80
+ if (this._guidesViewer && this._snkGrid) {
81
+ this._guidesViewer.addCustomEditor(fieldName, customEditor);
82
+ this._snkGrid.addCustomEditor(fieldName, customEditor);
83
+ return;
84
+ }
85
+ const newCustomEditors = new Map(this._customEditors);
86
+ newCustomEditors.set(fieldName, customEditor);
87
+ this._customEditors = newCustomEditors;
88
+ }
89
+ /**
90
+ * Registra um render customizado para colunas da grid.
91
+ */
92
+ async addGridCustomRender(fieldName, customRender) {
93
+ if (this._snkGrid) {
94
+ this._snkGrid.addGridCustomRender(fieldName, customRender);
95
+ return;
96
+ }
97
+ const newCustomRenders = new Map(this._customRenders);
98
+ newCustomRenders.set(fieldName, customRender);
99
+ this._customRenders = newCustomRenders;
100
+ }
101
+ /**
102
+ * Registra um formatador de valores para uma coluna da grid.
103
+ */
104
+ async addCustomValueFormatter(columnName, customFormatter) {
105
+ this._snkGrid.addCustomValueFormatter(columnName, customFormatter);
106
+ }
107
+ /**
108
+ * Remove o formatador de valores de uma coluna da grid.
109
+ */
110
+ async removeCustomValueFormatter(columnName) {
111
+ this._snkGrid.removeCustomValueFormatter(columnName);
112
+ }
113
+ /**
114
+ * Altera/adiciona uma propriedade nos metadados do campo.
115
+ */
116
+ async setFieldProp(fieldName, propName, value) {
117
+ await this._guidesViewer.setFieldProp(fieldName, propName, value);
118
+ }
68
119
  currentViewModeWatcher(currentView) {
69
120
  this._viewHistory = [...this._viewHistory.slice(-1), currentView];
70
121
  }
@@ -89,6 +140,12 @@ export class SnkCrud {
89
140
  setViewMode(viewMode) {
90
141
  this._viewStack.show(viewMode);
91
142
  this._currentViewMode = viewMode;
143
+ if (viewMode === VIEW_MODE.GRID) {
144
+ this._snkGrid.setFocus();
145
+ }
146
+ else if (viewMode === VIEW_MODE.FORM) {
147
+ this._guidesViewer.setFocus();
148
+ }
92
149
  }
93
150
  openConfig(viewMode) {
94
151
  this._snkConfigurator.close();
@@ -118,6 +175,29 @@ export class SnkCrud {
118
175
  const joinedPrimaryKeys = recordCriteria.map(({ value }) => value).join('_');
119
176
  return joinedPrimaryKeys;
120
177
  }
178
+ setCustomRenders() {
179
+ if (!this._snkGrid) {
180
+ return;
181
+ }
182
+ for (const [fieldName, customRender] of this._customRenders) {
183
+ this._snkGrid.addGridCustomRender(fieldName, customRender);
184
+ this._customRenders.delete(fieldName);
185
+ }
186
+ }
187
+ setCustomEditors() {
188
+ if (!this._snkGrid || !this._guidesViewer) {
189
+ return;
190
+ }
191
+ for (const [fieldName, customEditor] of this._customEditors) {
192
+ this._guidesViewer.addCustomEditor(fieldName, customEditor);
193
+ this._snkGrid.addCustomEditor(fieldName, customEditor);
194
+ this._customEditors.delete(fieldName);
195
+ }
196
+ }
197
+ componentDidRender() {
198
+ this.setCustomRenders();
199
+ this.setCustomEditors();
200
+ }
121
201
  componentWillLoad() {
122
202
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
123
203
  let parent = this._element.parentElement;
@@ -140,12 +220,7 @@ export class SnkCrud {
140
220
  else {
141
221
  this.initDataUnit();
142
222
  }
143
- this._snkDataUnit.addEventListener("dataStateChange", async ({ detail: dataState }) => {
144
- this._dataState = dataState;
145
- if (dataState.selectedRecord !== undefined) {
146
- this.attachmentRegisterKey = await this.getAttachmentRegisterKey();
147
- }
148
- });
223
+ this._snkDataUnit.addEventListener("dataStateChange", this.handleDataStateChange.bind(this));
149
224
  break;
150
225
  }
151
226
  parent = parent.parentElement;
@@ -161,8 +236,29 @@ export class SnkCrud {
161
236
  this.removeShortcuts();
162
237
  window.removeEventListener("keydown", this._keyDownHandler);
163
238
  }
239
+ async handleDataStateChange(evt) {
240
+ var _a;
241
+ this._dataState = evt.detail;
242
+ if (this._dataState.selectedRecord !== undefined) {
243
+ this.attachmentRegisterKey = await this.getAttachmentRegisterKey();
244
+ }
245
+ const fieldsWithRmPrecision = await this._snkDataUnit.getFieldsWithRmPrecision();
246
+ for (const field of fieldsWithRmPrecision || []) {
247
+ if (!field) {
248
+ continue;
249
+ }
250
+ const rmPrecision = (_a = this._dataState.rowMetadata) === null || _a === void 0 ? void 0 : _a.getProp('rm_precision', field);
251
+ if (!rmPrecision) {
252
+ continue;
253
+ }
254
+ await this.setFieldProp(field, 'precision', rmPrecision);
255
+ await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
256
+ }
257
+ ;
258
+ }
164
259
  async initKeyboardManager() {
165
- const keyboardManager = await this._application.getKeyboardManager();
260
+ var _a;
261
+ const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
166
262
  if (keyboardManager) {
167
263
  const dataUnit = this._dataUnit || await this._snkDataUnit.getDataUnit();
168
264
  async function saveDataUnitHandlingFocus() {
@@ -179,39 +275,40 @@ export class SnkCrud {
179
275
  element.focus();
180
276
  }
181
277
  keyboardManager
182
- .bind("F6", this.toggleView.bind(this), { description: "Alterna entre modo formulário e grade." })
183
- .bind("F7", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados." })
184
- .bind("ctrl + \\", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados." })
185
- .bind("F8", dataUnit.addRecord.bind(dataUnit), { description: "Adiciona um novo registro." })
186
- .bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado." })
187
- .bind("ctrl + F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado." })
278
+ .bind("F6", this.toggleView.bind(this), { description: "Alterna entre modo formulário e grade.", element: this._element })
279
+ .bind("F7", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados.", element: this._element })
280
+ .bind("ctrl + \\", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados.", element: this._element })
281
+ .bind("F8", dataUnit.addRecord.bind(dataUnit), { description: "Adiciona um novo registro.", element: this._element })
282
+ .bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
283
+ .bind("ctrl + F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
188
284
  .bind("ctrl + .", () => {
189
285
  if (dataUnit.getSelectionInfo().records.length === 0) {
190
286
  return dataUnit.selectFirst();
191
287
  }
192
288
  return dataUnit.nextRecord();
193
289
  }, {
194
- description: "Avança para o próximo registro."
290
+ description: "Avança para o próximo registro.", element: this._element
195
291
  })
196
- .bind("ctrl + ,", dataUnit.previousRecord.bind(dataUnit), { description: "Retorna ao registro anterior." })
292
+ .bind("ctrl + ,", dataUnit.previousRecord.bind(dataUnit), { description: "Retorna ao registro anterior.", element: this._element })
197
293
  .bind("F5", async () => {
198
294
  const currentView = await this._viewStack.getSelectedIndex();
199
295
  if (VIEW_MODE.GRID === currentView) {
200
296
  dataUnit.loadData();
201
297
  }
202
- }, { description: "Atualiza os dados." })
298
+ }, { description: "Atualiza os dados.", element: this._element })
203
299
  .bind("Escape", () => {
204
300
  if (dataUnit.isDirty()) {
205
301
  dataUnit.cancelEdition();
206
302
  }
207
303
  }, {
208
304
  debounceTime: 1000,
209
- description: "Cancela uma ação."
305
+ description: "Cancela uma ação.", element: this._element
210
306
  });
211
307
  }
212
308
  }
213
309
  async removeShortcuts() {
214
- const keyboardManager = await this._application.getKeyboardManager();
310
+ var _a;
311
+ const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
215
312
  if (keyboardManager) {
216
313
  keyboardManager
217
314
  .unbind("F6")
@@ -278,7 +375,7 @@ export class SnkCrud {
278
375
  return;
279
376
  }
280
377
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
281
- return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
378
+ return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
282
379
  }
283
380
  static get is() { return "snk-crud"; }
284
381
  static get encapsulation() { return "scoped"; }
@@ -311,6 +408,23 @@ export class SnkCrud {
311
408
  "attribute": "config-name",
312
409
  "reflect": false
313
410
  },
411
+ "filterBarTitle": {
412
+ "type": "string",
413
+ "mutable": false,
414
+ "complexType": {
415
+ "original": "string",
416
+ "resolved": "string",
417
+ "references": {}
418
+ },
419
+ "required": false,
420
+ "optional": false,
421
+ "docs": {
422
+ "tags": [],
423
+ "text": "T\u00EDtulo que ser\u00E1 apresentado na barra de filtros"
424
+ },
425
+ "attribute": "filter-bar-title",
426
+ "reflect": false
427
+ },
314
428
  "selectionToastConfig": {
315
429
  "type": "unknown",
316
430
  "mutable": false,
@@ -514,6 +628,91 @@ export class SnkCrud {
514
628
  "attribute": "use-enter-like-tab",
515
629
  "reflect": false,
516
630
  "defaultValue": "false"
631
+ },
632
+ "gridLegacyConfigName": {
633
+ "type": "string",
634
+ "mutable": false,
635
+ "complexType": {
636
+ "original": "string",
637
+ "resolved": "string",
638
+ "references": {}
639
+ },
640
+ "required": false,
641
+ "optional": false,
642
+ "docs": {
643
+ "tags": [],
644
+ "text": "Chave da configura\u00E7\u00E3o legado da grade."
645
+ },
646
+ "attribute": "grid-legacy-config-name",
647
+ "reflect": false
648
+ },
649
+ "filterBarLegacyConfigName": {
650
+ "type": "string",
651
+ "mutable": false,
652
+ "complexType": {
653
+ "original": "string",
654
+ "resolved": "string",
655
+ "references": {}
656
+ },
657
+ "required": false,
658
+ "optional": false,
659
+ "docs": {
660
+ "tags": [],
661
+ "text": "Chave da configura\u00E7\u00E3o legado da barra de filtros."
662
+ },
663
+ "attribute": "filter-bar-legacy-config-name",
664
+ "reflect": false
665
+ },
666
+ "formLegacyConfigName": {
667
+ "type": "string",
668
+ "mutable": false,
669
+ "complexType": {
670
+ "original": "string",
671
+ "resolved": "string",
672
+ "references": {}
673
+ },
674
+ "required": false,
675
+ "optional": false,
676
+ "docs": {
677
+ "tags": [],
678
+ "text": "Chave da configura\u00E7\u00E3o legado do formul\u00E1rio."
679
+ },
680
+ "attribute": "form-legacy-config-name",
681
+ "reflect": false
682
+ },
683
+ "disablePersonalizedFilter": {
684
+ "type": "boolean",
685
+ "mutable": false,
686
+ "complexType": {
687
+ "original": "boolean",
688
+ "resolved": "boolean",
689
+ "references": {}
690
+ },
691
+ "required": false,
692
+ "optional": false,
693
+ "docs": {
694
+ "tags": [],
695
+ "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)."
696
+ },
697
+ "attribute": "disable-personalized-filter",
698
+ "reflect": false
699
+ },
700
+ "autoLoad": {
701
+ "type": "boolean",
702
+ "mutable": false,
703
+ "complexType": {
704
+ "original": "boolean",
705
+ "resolved": "boolean",
706
+ "references": {}
707
+ },
708
+ "required": false,
709
+ "optional": true,
710
+ "docs": {
711
+ "tags": [],
712
+ "text": "Define se a carga dos dados ser\u00E1 feita assim que o componente for carregado."
713
+ },
714
+ "attribute": "auto-load",
715
+ "reflect": false
517
716
  }
518
717
  };
519
718
  }
@@ -685,6 +884,128 @@ export class SnkCrud {
685
884
  "text": "Retorna o elemento da filter-bar da grade.",
686
885
  "tags": []
687
886
  }
887
+ },
888
+ "addCustomEditor": {
889
+ "complexType": {
890
+ "signature": "(fieldName: string, customEditor: ICustomEditor) => Promise<void>",
891
+ "parameters": [{
892
+ "tags": [],
893
+ "text": ""
894
+ }, {
895
+ "tags": [],
896
+ "text": ""
897
+ }],
898
+ "references": {
899
+ "Promise": {
900
+ "location": "global"
901
+ },
902
+ "ICustomEditor": {
903
+ "location": "import",
904
+ "path": "@sankhyalabs/ezui/dist/types/utils"
905
+ }
906
+ },
907
+ "return": "Promise<void>"
908
+ },
909
+ "docs": {
910
+ "text": "Registra um editor customizado para campos da grade e formul\u00E1rio.",
911
+ "tags": []
912
+ }
913
+ },
914
+ "addGridCustomRender": {
915
+ "complexType": {
916
+ "signature": "(fieldName: string, customRender: ICustomRender) => Promise<void>",
917
+ "parameters": [{
918
+ "tags": [],
919
+ "text": ""
920
+ }, {
921
+ "tags": [],
922
+ "text": ""
923
+ }],
924
+ "references": {
925
+ "Promise": {
926
+ "location": "global"
927
+ },
928
+ "ICustomRender": {
929
+ "location": "import",
930
+ "path": "@sankhyalabs/ezui/dist/types/utils"
931
+ }
932
+ },
933
+ "return": "Promise<void>"
934
+ },
935
+ "docs": {
936
+ "text": "Registra um render customizado para colunas da grid.",
937
+ "tags": []
938
+ }
939
+ },
940
+ "addCustomValueFormatter": {
941
+ "complexType": {
942
+ "signature": "(columnName: string, customFormatter: ICustomFormatter) => Promise<void>",
943
+ "parameters": [{
944
+ "tags": [],
945
+ "text": ""
946
+ }, {
947
+ "tags": [],
948
+ "text": ""
949
+ }],
950
+ "references": {
951
+ "Promise": {
952
+ "location": "global"
953
+ },
954
+ "ICustomFormatter": {
955
+ "location": "import",
956
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/interfaces"
957
+ }
958
+ },
959
+ "return": "Promise<void>"
960
+ },
961
+ "docs": {
962
+ "text": "Registra um formatador de valores para uma coluna da grid.",
963
+ "tags": []
964
+ }
965
+ },
966
+ "removeCustomValueFormatter": {
967
+ "complexType": {
968
+ "signature": "(columnName: string) => Promise<void>",
969
+ "parameters": [{
970
+ "tags": [],
971
+ "text": ""
972
+ }],
973
+ "references": {
974
+ "Promise": {
975
+ "location": "global"
976
+ }
977
+ },
978
+ "return": "Promise<void>"
979
+ },
980
+ "docs": {
981
+ "text": "Remove o formatador de valores de uma coluna da grid.",
982
+ "tags": []
983
+ }
984
+ },
985
+ "setFieldProp": {
986
+ "complexType": {
987
+ "signature": "(fieldName: string, propName: string, value: any) => Promise<void>",
988
+ "parameters": [{
989
+ "tags": [],
990
+ "text": ""
991
+ }, {
992
+ "tags": [],
993
+ "text": ""
994
+ }, {
995
+ "tags": [],
996
+ "text": ""
997
+ }],
998
+ "references": {
999
+ "Promise": {
1000
+ "location": "global"
1001
+ }
1002
+ },
1003
+ "return": "Promise<void>"
1004
+ },
1005
+ "docs": {
1006
+ "text": "Altera/adiciona uma propriedade nos metadados do campo.",
1007
+ "tags": []
1008
+ }
688
1009
  }
689
1010
  };
690
1011
  }
@@ -1,6 +1,6 @@
1
1
  import { Action } from '@sankhyalabs/core';
2
2
  import { Host, forceUpdate, h } from '@stencil/core';
3
- import { SnkFormConfigManager } from '../../../snk-form/SnkFormConfigManager';
3
+ import { SnkFormConfigManager } from '../../../snk-form-config/SnkFormConfigManager';
4
4
  import { buildFormMetadata } from "@sankhyalabs/ezui/dist/collection/utils/form";
5
5
  import { PresentationMode } from '../../../../lib';
6
6
  import { TaskbarElement } from '../../../snk-taskbar/elements/taskbar-elements';
@@ -26,6 +26,8 @@ export class SnkDetailView {
26
26
  this.branchGuide = undefined;
27
27
  this.canEdit = true;
28
28
  this.taskbarCustomContainerId = undefined;
29
+ this.customEditors = undefined;
30
+ this.customRenders = undefined;
29
31
  }
30
32
  observeDataUnit(newDataUnit, oldDataUnit) {
31
33
  newDataUnit === null || newDataUnit === void 0 ? void 0 : newDataUnit.subscribe(this.dataUnitActionHandler.bind(this));
@@ -93,10 +95,38 @@ export class SnkDetailView {
93
95
  this._snkGrid.scrollIntoView({ behavior: "smooth", block: "start" });
94
96
  }
95
97
  }
98
+ /**
99
+ * Registra um editor customizado para campos da grade e formulário.
100
+ */
101
+ async addCustomEditor(fieldName, customEditor) {
102
+ var _a;
103
+ const detailContext = this.normalizeBranchGuideId((_a = this.branchGuide) === null || _a === void 0 ? void 0 : _a.id);
104
+ this._snkGrid.addCustomEditor(fieldName, customEditor, detailContext);
105
+ this._snkFormView.addCustomEditor(fieldName, customEditor, detailContext);
106
+ }
107
+ async observerPropsCustomEditor(newValue) {
108
+ for (const fieldName in newValue) {
109
+ await this.addCustomEditor(fieldName, newValue[fieldName]);
110
+ }
111
+ }
112
+ /**
113
+ * Registra um render customizado para colunas da grid.
114
+ */
115
+ async addGridCustomRender(fieldName, customRender) {
116
+ var _a;
117
+ const detailContext = this.normalizeBranchGuideId((_a = this.branchGuide) === null || _a === void 0 ? void 0 : _a.id);
118
+ await this._snkGrid.addGridCustomRender(fieldName, customRender, detailContext);
119
+ }
96
120
  onContentCardChanged(evt) {
97
121
  SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this.formConfigManager).then(() => forceUpdate(this));
98
122
  evt.stopPropagation();
99
123
  }
124
+ async observeCustomRenders(newValue) {
125
+ for (const field in newValue) {
126
+ const customRender = newValue[field];
127
+ await this.addGridCustomRender(field, customRender);
128
+ }
129
+ }
100
130
  updateLabel() {
101
131
  const guideItemPathSize = this.guideItemPath ? this.guideItemPath.length : 0;
102
132
  if (guideItemPathSize > 0) {
@@ -199,6 +229,10 @@ export class SnkDetailView {
199
229
  this.messagesBuilder = new SnkMessageBuilder(this.entityName);
200
230
  }
201
231
  }
232
+ async componentDidLoad() {
233
+ await this.observerPropsCustomEditor(this.customEditors);
234
+ await this.observeCustomRenders(this.customRenders);
235
+ }
202
236
  async dataUnitActionHandler(action) {
203
237
  if (action.type === Action.FIELD_INVALIDATED) {
204
238
  this.addErrorBadgeToBranchGuide();
@@ -208,6 +242,9 @@ export class SnkDetailView {
208
242
  this.branchGuide = Object.assign(Object.assign({}, this.branchGuide), { badge: 'error' });
209
243
  this.snkDetailGuidesChange.emit(new GuideBuilder(this.branchGuide, this._formMetadata, this.dataUnit));
210
244
  }
245
+ normalizeBranchGuideId(id) {
246
+ return id === null || id === void 0 ? void 0 : id.replace(/child\[(.*?)\]/g, '$1').replace(/::/g, '>');
247
+ }
211
248
  render() {
212
249
  this.updateLabel();
213
250
  //const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
@@ -236,7 +273,7 @@ export class SnkDetailView {
236
273
  "references": {
237
274
  "SnkFormConfigManager": {
238
275
  "location": "import",
239
- "path": "../../../snk-form/SnkFormConfigManager"
276
+ "path": "../../../snk-form-config/SnkFormConfigManager"
240
277
  }
241
278
  }
242
279
  },
@@ -469,6 +506,46 @@ export class SnkDetailView {
469
506
  },
470
507
  "attribute": "taskbar-custom-container-id",
471
508
  "reflect": false
509
+ },
510
+ "customEditors": {
511
+ "type": "unknown",
512
+ "mutable": false,
513
+ "complexType": {
514
+ "original": "PropsCustomEditor",
515
+ "resolved": "PropsCustomEditor",
516
+ "references": {
517
+ "PropsCustomEditor": {
518
+ "location": "import",
519
+ "path": "../../interfaces/PropsCustomEditor"
520
+ }
521
+ }
522
+ },
523
+ "required": false,
524
+ "optional": false,
525
+ "docs": {
526
+ "tags": [],
527
+ "text": "Registra um editor customizado para campos da grade e formul\u00E1rio."
528
+ }
529
+ },
530
+ "customRenders": {
531
+ "type": "unknown",
532
+ "mutable": false,
533
+ "complexType": {
534
+ "original": "PropsCustomRender",
535
+ "resolved": "PropsCustomRender",
536
+ "references": {
537
+ "PropsCustomRender": {
538
+ "location": "import",
539
+ "path": "../../interfaces/PropsCustomRender"
540
+ }
541
+ }
542
+ },
543
+ "required": false,
544
+ "optional": false,
545
+ "docs": {
546
+ "tags": [],
547
+ "text": "Render customizados da grade."
548
+ }
472
549
  }
473
550
  };
474
551
  }
@@ -601,6 +678,58 @@ export class SnkDetailView {
601
678
  "text": "",
602
679
  "tags": []
603
680
  }
681
+ },
682
+ "addCustomEditor": {
683
+ "complexType": {
684
+ "signature": "(fieldName: string, customEditor: ICustomEditor) => Promise<void>",
685
+ "parameters": [{
686
+ "tags": [],
687
+ "text": ""
688
+ }, {
689
+ "tags": [],
690
+ "text": ""
691
+ }],
692
+ "references": {
693
+ "Promise": {
694
+ "location": "global"
695
+ },
696
+ "ICustomEditor": {
697
+ "location": "import",
698
+ "path": "@sankhyalabs/ezui/dist/types/utils"
699
+ }
700
+ },
701
+ "return": "Promise<void>"
702
+ },
703
+ "docs": {
704
+ "text": "Registra um editor customizado para campos da grade e formul\u00E1rio.",
705
+ "tags": []
706
+ }
707
+ },
708
+ "addGridCustomRender": {
709
+ "complexType": {
710
+ "signature": "(fieldName: string, customRender: ICustomRender) => Promise<void>",
711
+ "parameters": [{
712
+ "tags": [],
713
+ "text": ""
714
+ }, {
715
+ "tags": [],
716
+ "text": ""
717
+ }],
718
+ "references": {
719
+ "Promise": {
720
+ "location": "global"
721
+ },
722
+ "ICustomRender": {
723
+ "location": "import",
724
+ "path": "@sankhyalabs/ezui/dist/types/utils"
725
+ }
726
+ },
727
+ "return": "Promise<void>"
728
+ },
729
+ "docs": {
730
+ "text": "Registra um render customizado para colunas da grid.",
731
+ "tags": []
732
+ }
604
733
  }
605
734
  };
606
735
  }
@@ -611,6 +740,12 @@ export class SnkDetailView {
611
740
  }, {
612
741
  "propName": "dataState",
613
742
  "methodName": "observerDataState"
743
+ }, {
744
+ "propName": "customEditors",
745
+ "methodName": "observerPropsCustomEditor"
746
+ }, {
747
+ "propName": "customRenders",
748
+ "methodName": "observeCustomRenders"
614
749
  }];
615
750
  }
616
751
  static get listeners() {