@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-38445.1 → 0.0.0-bugfix-dev-kb-67792.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/dist/cjs/{ConfigStorage-942ce74b.js → ConfigStorage-0a690675.js} +2 -2
  2. package/dist/cjs/{DataFetcher-313debd8.js → DataFetcher-77729a93.js} +7 -2
  3. package/dist/cjs/{SnkFormConfigManager-1b13bacd.js → SnkFormConfigManager-d6d5db6d.js} +5 -8
  4. package/dist/cjs/{SnkMessageBuilder-722b104e.js → SnkMessageBuilder-96b0f549.js} +13 -9
  5. package/dist/cjs/{IExporterProvider-597949f9.js → SnkMultiSelectionListDataSource-f79d220c.js} +6 -96
  6. package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-29bb791c.js} +1 -1
  7. package/dist/cjs/{form-config-fetcher-2dd00e5b.js → form-config-fetcher-feb08214.js} +1 -1
  8. package/dist/cjs/{index-1dfc7a6e.js → index-0922807b.js} +0 -5
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/{dataunit-fetcher-688d3f05.js → pesquisa-fetcher-cba1b3d0.js} +181 -88
  11. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  12. package/dist/cjs/snk-actions-button_4.cjs.entry.js +5 -7
  13. package/dist/cjs/snk-application.cjs.entry.js +15 -38
  14. package/dist/cjs/snk-attach.cjs.entry.js +49 -74
  15. package/dist/cjs/snk-crud.cjs.entry.js +13 -99
  16. package/dist/cjs/snk-data-exporter.cjs.entry.js +88 -318
  17. package/dist/cjs/snk-data-unit-559ac55c.js +462 -0
  18. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -12
  19. package/dist/cjs/snk-detail-view.cjs.entry.js +10 -51
  20. package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
  21. package/dist/cjs/snk-filter-bar.cjs.entry.js +14 -9
  22. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
  23. package/dist/cjs/snk-form-config.cjs.entry.js +2 -2
  24. package/dist/cjs/snk-form-view.cjs.entry.js +0 -67
  25. package/dist/cjs/snk-form.cjs.entry.js +9 -54
  26. package/dist/cjs/snk-grid.cjs.entry.js +112 -169
  27. package/dist/cjs/{snk-guides-viewer-67605336.js → snk-guides-viewer-bfcad2d6.js} +10 -38
  28. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -11
  29. package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
  30. package/dist/cjs/snk-simple-crud.cjs.entry.js +40 -267
  31. package/dist/cjs/snk-taskbar.cjs.entry.js +3 -4
  32. package/dist/cjs/{taskbar-elements-9ad1f9c0.js → taskbar-elements-3ecd1278.js} +3 -3
  33. package/dist/collection/collection-manifest.json +1 -1
  34. package/dist/collection/components/snk-application/snk-application.js +11 -35
  35. package/dist/collection/components/snk-attach/snk-attach.js +44 -67
  36. package/dist/collection/components/snk-crud/snk-crud.js +7 -249
  37. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +0 -135
  38. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +0 -161
  39. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +5 -112
  40. package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +1 -1
  41. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -54
  42. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +52 -59
  43. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +2 -64
  44. package/dist/collection/components/snk-data-unit/snk-data-unit.js +214 -507
  45. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +11 -23
  46. package/dist/collection/components/snk-form/snk-form.js +5 -102
  47. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +3 -6
  48. package/dist/collection/components/snk-grid/snk-grid.css +0 -2
  49. package/dist/collection/components/snk-grid/snk-grid.js +102 -241
  50. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +18 -386
  51. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +2 -2
  52. package/dist/collection/components/snk-taskbar/snk-taskbar.js +1 -2
  53. package/dist/collection/lib/@types/index.js +0 -5
  54. package/dist/collection/lib/dataUnit/InMemoryLoader.js +3 -7
  55. package/dist/collection/lib/http/data-fetcher/DataFetcher.js +8 -3
  56. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +0 -3
  57. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +0 -4
  58. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +13 -11
  59. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +0 -1
  60. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +4 -53
  61. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +34 -0
  62. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -4
  63. package/dist/collection/lib/message/SnkMessageBuilder.js +12 -5
  64. package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +0 -2
  65. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +0 -1
  66. package/dist/collection/lib/message/resources/snk-exporter.msg.js +1 -1
  67. package/dist/components/DataFetcher.js +8 -3
  68. package/dist/components/SnkFormConfigManager.js +3 -6
  69. package/dist/components/SnkMessageBuilder.js +13 -9
  70. package/dist/components/dataunit-fetcher.js +182 -84
  71. package/dist/components/{IExporterProvider.js → field-search.js} +6 -93
  72. package/dist/components/index2.js +33 -198
  73. package/dist/components/index3.js +199 -0
  74. package/dist/components/snk-actions-button2.js +11 -4
  75. package/dist/components/snk-application2.js +9 -31
  76. package/dist/components/snk-attach2.js +41 -65
  77. package/dist/components/snk-crud.js +11 -103
  78. package/dist/components/snk-data-exporter2.js +87 -311
  79. package/dist/components/snk-data-unit2.js +212 -470
  80. package/dist/components/snk-detail-view2.js +10 -87
  81. package/dist/components/snk-exporter-email-sender2.js +1 -1
  82. package/dist/components/snk-expression-item2.js +1 -1
  83. package/dist/components/snk-filter-bar2.js +11 -7
  84. package/dist/components/snk-form-view2.js +1 -72
  85. package/dist/components/snk-form.js +6 -53
  86. package/dist/components/snk-grid2.js +108 -170
  87. package/dist/components/snk-personalized-filter2.js +1 -1
  88. package/dist/components/snk-simple-crud2.js +23 -259
  89. package/dist/components/snk-taskbar2.js +5 -6
  90. package/dist/esm/{ConfigStorage-86187da3.js → ConfigStorage-8c2ddac8.js} +2 -2
  91. package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-773a3e4b.js} +8 -3
  92. package/dist/esm/{SnkFormConfigManager-d4554df9.js → SnkFormConfigManager-c01b9d9d.js} +5 -8
  93. package/dist/esm/{SnkMessageBuilder-89925609.js → SnkMessageBuilder-72423074.js} +13 -9
  94. package/dist/esm/{IExporterProvider-63a188b6.js → SnkMultiSelectionListDataSource-a4805051.js} +7 -95
  95. package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-a411f73c.js} +1 -1
  96. package/dist/esm/{form-config-fetcher-30fb808f.js → form-config-fetcher-e0382e5a.js} +1 -1
  97. package/dist/esm/{index-3aa4977a.js → index-0ece87a6.js} +1 -6
  98. package/dist/esm/loader.js +1 -1
  99. package/dist/esm/{dataunit-fetcher-264191b2.js → pesquisa-fetcher-34a8b8be.js} +182 -84
  100. package/dist/esm/sankhyablocks.js +1 -1
  101. package/dist/esm/snk-actions-button_4.entry.js +5 -7
  102. package/dist/esm/snk-application.entry.js +14 -37
  103. package/dist/esm/snk-attach.entry.js +44 -69
  104. package/dist/esm/snk-crud.entry.js +13 -99
  105. package/dist/esm/snk-data-exporter.entry.js +89 -319
  106. package/dist/esm/snk-data-unit-44215df7.js +460 -0
  107. package/dist/esm/snk-data-unit.entry.js +2 -12
  108. package/dist/esm/snk-detail-view.entry.js +10 -51
  109. package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
  110. package/dist/esm/snk-filter-bar.entry.js +14 -9
  111. package/dist/esm/snk-filter-modal-item.entry.js +3 -3
  112. package/dist/esm/snk-form-config.entry.js +2 -2
  113. package/dist/esm/snk-form-view.entry.js +0 -67
  114. package/dist/esm/snk-form.entry.js +9 -54
  115. package/dist/esm/snk-grid.entry.js +110 -167
  116. package/dist/esm/{snk-guides-viewer-151f6091.js → snk-guides-viewer-edeac29f.js} +10 -38
  117. package/dist/esm/snk-guides-viewer.entry.js +9 -11
  118. package/dist/esm/snk-personalized-filter.entry.js +3 -3
  119. package/dist/esm/snk-simple-crud.entry.js +28 -255
  120. package/dist/esm/snk-taskbar.entry.js +3 -4
  121. package/dist/esm/{taskbar-elements-d59867f1.js → taskbar-elements-2473c8ac.js} +3 -3
  122. package/dist/sankhyablocks/p-03dcc5ff.entry.js +1 -0
  123. package/dist/sankhyablocks/{p-913a9979.js → p-0cd3c0a9.js} +1 -1
  124. package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
  125. package/dist/sankhyablocks/p-176c3491.entry.js +1 -0
  126. package/dist/sankhyablocks/{p-df5451c7.js → p-181975f1.js} +1 -1
  127. package/dist/sankhyablocks/p-37e5d563.js +65 -0
  128. package/dist/sankhyablocks/p-38289a55.js +1 -0
  129. package/dist/sankhyablocks/{p-a1d72395.entry.js → p-41c2c191.entry.js} +1 -1
  130. package/dist/sankhyablocks/p-46e55a95.entry.js +1 -0
  131. package/dist/sankhyablocks/p-4e728357.entry.js +1 -0
  132. package/dist/sankhyablocks/p-5571bdfe.js +1 -0
  133. package/dist/sankhyablocks/p-5630574e.js +1 -0
  134. package/dist/sankhyablocks/p-594bc21d.js +1 -0
  135. package/dist/sankhyablocks/p-5f8c0426.entry.js +1 -0
  136. package/dist/sankhyablocks/p-80c64add.entry.js +1 -0
  137. package/dist/sankhyablocks/p-86af4cc2.js +1 -0
  138. package/dist/sankhyablocks/p-8b690717.js +1 -0
  139. package/dist/sankhyablocks/{p-aff76a53.js → p-96621231.js} +1 -1
  140. package/dist/sankhyablocks/p-a1832166.entry.js +1 -0
  141. package/dist/sankhyablocks/p-a809d944.entry.js +1 -0
  142. package/dist/sankhyablocks/p-a97226f6.entry.js +1 -0
  143. package/dist/sankhyablocks/p-add17f6a.entry.js +1 -0
  144. package/dist/sankhyablocks/{p-7e7a7473.js → p-ae4fc9a9.js} +1 -1
  145. package/dist/sankhyablocks/{p-eae7a817.entry.js → p-c2ae0fab.entry.js} +1 -1
  146. package/dist/sankhyablocks/p-c5a9a5d9.entry.js +1 -0
  147. package/dist/sankhyablocks/p-c5aa7d70.entry.js +11 -0
  148. package/dist/sankhyablocks/p-cb0147ab.entry.js +1 -0
  149. package/dist/sankhyablocks/p-f0145e3b.js +1 -0
  150. package/dist/sankhyablocks/{p-14a08904.entry.js → p-f03e4199.entry.js} +1 -1
  151. package/dist/sankhyablocks/p-f607db63.entry.js +1 -0
  152. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  153. package/dist/types/components/snk-application/snk-application.d.ts +3 -7
  154. package/dist/types/components/snk-attach/snk-attach.d.ts +9 -11
  155. package/dist/types/components/snk-crud/snk-crud.d.ts +1 -36
  156. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +0 -23
  157. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +3 -28
  158. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +0 -19
  159. package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +4 -24
  160. package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +1 -4
  161. package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +0 -21
  162. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +2 -61
  163. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +1 -4
  164. package/dist/types/components/snk-form/snk-form.d.ts +0 -14
  165. package/dist/types/components/snk-grid/snk-grid.d.ts +6 -46
  166. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -58
  167. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
  168. package/dist/types/components.d.ts +4 -220
  169. package/dist/types/lib/@types/index.d.ts +0 -5
  170. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +1 -2
  171. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +1 -2
  172. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +0 -1
  173. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +0 -1
  174. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +0 -6
  175. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +3 -0
  176. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +0 -3
  177. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +1 -2
  178. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +0 -1
  179. package/package.json +1 -1
  180. package/dist/cjs/RecordIDUtils-3735135c.js +0 -43
  181. package/dist/cjs/pesquisa-fetcher-680e198f.js +0 -166
  182. package/dist/cjs/snk-data-unit-685272e7.js +0 -679
  183. package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js +0 -1
  184. package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js +0 -1
  185. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +0 -97
  186. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +0 -74
  187. package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +0 -1
  188. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +0 -58
  189. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +0 -55
  190. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +0 -88
  191. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +0 -20
  192. package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +0 -38
  193. package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +0 -24
  194. package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js +0 -18
  195. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +0 -35
  196. package/dist/collection/lib/dataUnit/ValueFormatter.js +0 -4
  197. package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js +0 -1
  198. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js +0 -1
  199. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js +0 -1
  200. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js +0 -22
  201. package/dist/components/ISave.js +0 -47
  202. package/dist/components/pesquisa-fetcher.js +0 -164
  203. package/dist/esm/RecordIDUtils-87d02110.js +0 -41
  204. package/dist/esm/pesquisa-fetcher-03c8f919.js +0 -164
  205. package/dist/esm/snk-data-unit-63f83504.js +0 -677
  206. package/dist/sankhyablocks/p-14b9f964.entry.js +0 -1
  207. package/dist/sankhyablocks/p-19c18d06.entry.js +0 -1
  208. package/dist/sankhyablocks/p-1db45d26.entry.js +0 -1
  209. package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
  210. package/dist/sankhyablocks/p-30cf616e.js +0 -1
  211. package/dist/sankhyablocks/p-3a212712.js +0 -1
  212. package/dist/sankhyablocks/p-47b60deb.entry.js +0 -1
  213. package/dist/sankhyablocks/p-7505da04.entry.js +0 -1
  214. package/dist/sankhyablocks/p-75f83d1d.entry.js +0 -1
  215. package/dist/sankhyablocks/p-7a337364.js +0 -1
  216. package/dist/sankhyablocks/p-829d4045.js +0 -1
  217. package/dist/sankhyablocks/p-82a0bfb0.entry.js +0 -11
  218. package/dist/sankhyablocks/p-8fc470e5.entry.js +0 -1
  219. package/dist/sankhyablocks/p-941bf3ef.entry.js +0 -1
  220. package/dist/sankhyablocks/p-9863d682.js +0 -1
  221. package/dist/sankhyablocks/p-af8efd95.js +0 -6
  222. package/dist/sankhyablocks/p-b4b21558.entry.js +0 -1
  223. package/dist/sankhyablocks/p-bad55caa.entry.js +0 -1
  224. package/dist/sankhyablocks/p-c053256c.entry.js +0 -1
  225. package/dist/sankhyablocks/p-c5268346.entry.js +0 -1
  226. package/dist/sankhyablocks/p-cefba299.js +0 -1
  227. package/dist/sankhyablocks/p-dc7c9047.js +0 -1
  228. package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
  229. package/dist/sankhyablocks/p-fcac4dfc.js +0 -1
  230. package/dist/sankhyablocks/p-fe79f83a.js +0 -60
  231. package/dist/types/components/snk-crud/interfaces/PropsCustomEditor.d.ts +0 -4
  232. package/dist/types/components/snk-crud/interfaces/PropsCustomRender.d.ts +0 -4
  233. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +0 -14
  234. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +0 -12
  235. package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +0 -5
  236. package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +0 -17
  237. package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +0 -17
  238. package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +0 -77
  239. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +0 -4
  240. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
  241. package/dist/types/components/snk-data-unit/test/resources/metadataMock.d.ts +0 -3
  242. package/dist/types/components/snk-data-unit/test/resources/parentMetadataMock.d.ts +0 -3
  243. package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +0 -11
  244. package/dist/types/lib/dataUnit/ValueFormatter.d.ts +0 -2
  245. package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +0 -3
  246. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.d.ts +0 -10
  247. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.d.ts +0 -7
  248. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.d.ts +0 -20
@@ -3,9 +3,9 @@ import { S as Sortable } from './Sortable-83960219.js';
3
3
  import { ObjectUtils, ElementIDUtils, ArrayUtils, ApplicationContext } from '@sankhyalabs/core';
4
4
  import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
5
5
  import { C as CONFIG_EVENTS, a as CONFIG_SORTABLE_EVENTS, T as TAB_NAMES, A as ACTION_CONFIG, D as DEFAULT_TYPE } from './constants-8457af36.js';
6
- import { U as UserConfigType } from './form-config-fetcher-30fb808f.js';
6
+ import { U as UserConfigType } from './form-config-fetcher-e0382e5a.js';
7
7
  import { buildFormConfigFromDataUnit } from '@sankhyalabs/ezui/dist/collection/utils/form';
8
- import './DataFetcher-c1baf61d.js';
8
+ import './DataFetcher-773a3e4b.js';
9
9
  import './PrintUtils-3e4ff0f5.js';
10
10
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
11
11
 
@@ -10,8 +10,6 @@ const SnkFormView = class {
10
10
  this.snkContentCardChanged = createEvent(this, "snkContentCardChanged", 7);
11
11
  this.snkRequestClearFieldToFocus = createEvent(this, "snkRequestClearFieldToFocus", 7);
12
12
  this.formItemsReady = createEvent(this, "formItemsReady", 7);
13
- this._customEditors = new Map();
14
- this._fieldProps = new Map();
15
13
  this.levelPath = undefined;
16
14
  this.label = undefined;
17
15
  this.name = undefined;
@@ -25,47 +23,12 @@ const SnkFormView = class {
25
23
  this.canFix = true;
26
24
  this.recordsValidator = undefined;
27
25
  this.fieldToFocus = undefined;
28
- this.customEditors = undefined;
29
- this.fieldsProps = undefined;
30
26
  }
31
27
  async showUp() {
32
28
  if (this._formView) {
33
29
  this._formView.showUp();
34
30
  }
35
31
  }
36
- /**
37
- * Registra um editor customizado para campos da grade e formulário
38
- */
39
- async addCustomEditor(fieldName, customEditor, detailContext) {
40
- if (this._formView) {
41
- this._formView.addCustomEditor(fieldName, customEditor, detailContext);
42
- return;
43
- }
44
- const newCustomEditors = new Map(this._customEditors);
45
- newCustomEditors.set(fieldName, { customEditor, detailContext });
46
- this._customEditors = newCustomEditors;
47
- }
48
- observePropsCustomEditor(newValue) {
49
- for (const fieldName in newValue) {
50
- this.addCustomEditor(fieldName, newValue[fieldName]);
51
- }
52
- }
53
- /**
54
- * Altera/adiciona uma propriedade nos metadados do campo.
55
- */
56
- async setFieldProp(fieldName, propName, value) {
57
- const props = this._fieldProps.get(fieldName) || [];
58
- this._fieldProps.set(fieldName, [...props, { propName, value }]);
59
- }
60
- async observeFieldsProps(newValue) {
61
- for (const field in newValue) {
62
- const fieldProps = newValue[field];
63
- const propNames = Object.keys(fieldProps);
64
- for (const propName of propNames) {
65
- await this.setFieldProp(field, propName, fieldProps[propName]);
66
- }
67
- }
68
- }
69
32
  changeFix() {
70
33
  this.fixed = !this.fixed;
71
34
  this.emitEvent("fixed");
@@ -124,13 +87,7 @@ const SnkFormView = class {
124
87
  this._dataBinder.onDisconnectedCallback();
125
88
  }
126
89
  }
127
- componentDidLoad() {
128
- this.observePropsCustomEditor(this.customEditors);
129
- this.observeFieldsProps(this.fieldsProps);
130
- }
131
90
  componentDidRender() {
132
- this.setCustomEditors();
133
- this.setFieldProps();
134
91
  if (this.fieldToFocus == undefined) {
135
92
  return;
136
93
  }
@@ -142,26 +99,6 @@ const SnkFormView = class {
142
99
  this.snkRequestClearFieldToFocus.emit();
143
100
  });
144
101
  }
145
- setCustomEditors() {
146
- if (!this._formView) {
147
- return;
148
- }
149
- for (const [fieldName, customEditorProps] of this._customEditors) {
150
- this._formView.addCustomEditor(fieldName, customEditorProps.customEditor, customEditorProps.detailContext);
151
- this._customEditors.delete(fieldName);
152
- }
153
- }
154
- setFieldProps() {
155
- if (!this._formView) {
156
- return;
157
- }
158
- for (const [fieldName, propsToChange] of this._fieldProps) {
159
- propsToChange.forEach(prop => {
160
- this._formView.setFieldProp(fieldName, prop.propName, prop.value);
161
- this._fieldProps.delete(fieldName);
162
- });
163
- }
164
- }
165
102
  render() {
166
103
  return (h(Host, { class: "ez-box__container" }, h("div", { class: "summary-header ez-flex ez-size-width--full" }, h("div", { class: "ez-flex ez-text ez-title--primary ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9" }, this.levelPath ? h("span", { class: "level-path" }, this.levelPath + " /") : undefined, this.label), h("div", { class: "ez-flex ez-flex--justify-end ez-col--sd-3" }, this.canFix &&
167
104
  h("ez-button", { class: "ez-padding-left--medium", mode: "icon", size: "small", iconName: this.fixed ? "un-pin" : "push-pin", "data-element-id": ElementIDUtils.getInternalIDInfo("toggleFixed_ezFormCard"), onClick: () => this.changeFix(), title: this.fixed ? "Desafixar" : "Fixar" }), this.canExpand &&
@@ -171,10 +108,6 @@ const SnkFormView = class {
171
108
  :
172
109
  h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event) })));
173
110
  }
174
- static get watchers() { return {
175
- "customEditors": ["observePropsCustomEditor"],
176
- "fieldsProps": ["observeFieldsProps"]
177
- }; }
178
111
  };
179
112
  SnkFormView.style = snkFormViewCss;
180
113
 
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
2
2
  import { ElementIDUtils } from '@sankhyalabs/core';
3
- import { S as SnkFormConfigManager } from './SnkFormConfigManager-d4554df9.js';
3
+ import { S as SnkFormConfigManager } from './SnkFormConfigManager-c01b9d9d.js';
4
4
  import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
5
- import './ConfigStorage-86187da3.js';
6
- import './form-config-fetcher-30fb808f.js';
7
- import './DataFetcher-c1baf61d.js';
5
+ import './ConfigStorage-8c2ddac8.js';
6
+ import './form-config-fetcher-e0382e5a.js';
7
+ import './DataFetcher-773a3e4b.js';
8
8
  import './PrintUtils-3e4ff0f5.js';
9
9
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
10
10
  import './filter-item-type.enum-d45e026f.js';
@@ -17,7 +17,6 @@ const SnkForm = class {
17
17
  this.exit = createEvent(this, "exit", 7);
18
18
  this.actionClick = createEvent(this, "actionClick", 7);
19
19
  this.formItemsReady = createEvent(this, "formItemsReady", 7);
20
- this._customEditors = new Map();
21
20
  this._dataUnit = undefined;
22
21
  this._dataState = undefined;
23
22
  this._showFormConfig = false;
@@ -40,24 +39,6 @@ const SnkForm = class {
40
39
  async hideConfig() {
41
40
  this._showFormConfig = false;
42
41
  }
43
- /**
44
- * Registra um editor customizado para campos da grade e formulário.
45
- */
46
- async addCustomEditor(fieldName, customEditor) {
47
- if (this._form) {
48
- this._form.addCustomEditor(fieldName, customEditor);
49
- return;
50
- }
51
- const newCustomEditors = new Map(this._customEditors);
52
- newCustomEditors.set(fieldName, customEditor);
53
- this._customEditors = newCustomEditors;
54
- }
55
- /**
56
- * Altera/adiciona uma propriedade nos metadados do campo.
57
- */
58
- async setFieldProp(fieldName, propName, value) {
59
- await this._form.setFieldProp(fieldName, propName, value);
60
- }
61
42
  closeConfig() {
62
43
  this.hideConfig();
63
44
  }
@@ -65,18 +46,6 @@ const SnkForm = class {
65
46
  const dataInfo = { dataUnit: this._dataUnit };
66
47
  ElementIDUtils.addIDInfo(this._element, null, dataInfo);
67
48
  }
68
- setCustomEditors() {
69
- if (!this._form) {
70
- return;
71
- }
72
- for (const [fieldName, customEditor] of this._customEditors) {
73
- this._form.addCustomEditor(fieldName, customEditor);
74
- this._customEditors.delete(fieldName);
75
- }
76
- }
77
- async componentDidRender() {
78
- this.setCustomEditors();
79
- }
80
49
  async componentWillLoad() {
81
50
  let parent = this._element.parentElement;
82
51
  while (parent) {
@@ -92,7 +61,9 @@ const SnkForm = class {
92
61
  this._dataUnit = evt.detail;
93
62
  });
94
63
  }
95
- this._snkDataUnit.addEventListener("dataStateChange", this.handleDataStateChange.bind(this));
64
+ this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
65
+ this._dataState = evt.detail;
66
+ });
96
67
  break;
97
68
  }
98
69
  parent = parent.parentElement;
@@ -102,23 +73,7 @@ const SnkForm = class {
102
73
  }
103
74
  this._configManager = new SnkFormConfigManager(this.configName, this.resourceID);
104
75
  this.addFormLegacyConfig();
105
- await this._configManager.loadConfig();
106
- }
107
- async handleDataStateChange(evt) {
108
- var _a;
109
- this._dataState = evt.detail;
110
- const fieldsWithRmPrecision = await this._snkDataUnit.getFieldsWithRmPrecision();
111
- for (const field of fieldsWithRmPrecision || []) {
112
- if (!field) {
113
- continue;
114
- }
115
- const rmPrecision = (_a = this._dataState.rowMetadata) === null || _a === void 0 ? void 0 : _a.getProp('rm_precision', field);
116
- if (!rmPrecision && rmPrecision !== 0) {
117
- continue;
118
- }
119
- await this.setFieldProp(field, 'precision', rmPrecision);
120
- await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
121
- }
76
+ this._configManager.loadConfig();
122
77
  }
123
78
  addFormLegacyConfig() {
124
79
  if (this.formLegacyConfigName) {
@@ -129,7 +84,7 @@ const SnkForm = class {
129
84
  if (!this._dataUnit || !this._dataState) {
130
85
  return undefined;
131
86
  }
132
- return (h("section", null, h("div", { class: "ez-row" }, h("div", { class: "ez-col ez-col--sd-12" }, h("ez-form", { ref: (ref) => this._form = ref, key: "ezForm" + this._snkDataUnit.entityName, "data-element-id": "embedded", dataUnit: this._dataUnit, config: this._configManager.getConfig(this._dataState.insertionMode, this._dataUnit), recordsValidator: this.recordsValidator, class: this._showFormConfig ? 'snk-form__form--hidden' : '' }), this._showFormConfig &&
87
+ return (h("section", null, h("div", { class: "ez-row" }, h("div", { class: "ez-col ez-col--sd-12" }, h("ez-form", { key: "ezForm" + this._snkDataUnit.entityName, "data-element-id": "embedded", dataUnit: this._dataUnit, config: this._configManager.getConfig(this._dataState.insertionMode, this._dataUnit), recordsValidator: this.recordsValidator, class: this._showFormConfig ? 'snk-form__form--hidden' : '' }), this._showFormConfig &&
133
88
  h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this._dataUnit, configManager: this._configManager, onConfigClose: () => this.closeConfig() })))));
134
89
  }
135
90
  get _element() { return getElement(this); }
@@ -1,90 +1,31 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-a7d3d3f1.js';
2
- import { Action, ElementIDUtils, ApplicationContext, StringUtils } from '@sankhyalabs/core';
3
- import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
4
- import { C as ConfigStorage } from './ConfigStorage-86187da3.js';
5
- import { P as PresentationMode } from './index-3aa4977a.js';
2
+ import { ElementIDUtils, ApplicationContext, StringUtils, DataType } from '@sankhyalabs/core';
3
+ import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
4
+ import { T as TaskbarElement } from './taskbar-elements-2473c8ac.js';
5
+ import { C as ConfigStorage } from './ConfigStorage-8c2ddac8.js';
6
+ import { P as PresentationMode } from './index-0ece87a6.js';
6
7
  import { T as TaskbarProcessor, o as openFieldSearch, b as buildFieldSearch } from './field-search-efbe307f.js';
7
8
  import { s as store } from './index-bdf75557.js';
8
- import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, a as CrudUtils, R as RmPrecisionCustomValueFormatter } from './IExporterProvider-63a188b6.js';
9
+ import { S as SnkMultiSelectionListDataSource, C as CrudUtils } from './SnkMultiSelectionListDataSource-a4805051.js';
9
10
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
10
- import './DataFetcher-c1baf61d.js';
11
- import './pesquisa-fetcher-03c8f919.js';
11
+ import './DataFetcher-773a3e4b.js';
12
+ import './pesquisa-fetcher-34a8b8be.js';
12
13
  import './ISave-d8c8bc59.js';
13
14
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
14
- import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
15
- import './dataunit-fetcher-264191b2.js';
16
15
  import './filter-item-type.enum-d45e026f.js';
17
- import './form-config-fetcher-30fb808f.js';
18
- import { g as getSelectedIDs } from './RecordIDUtils-87d02110.js';
16
+ import './form-config-fetcher-e0382e5a.js';
19
17
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
20
18
  import './PrintUtils-3e4ff0f5.js';
21
19
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
22
- import '@sankhyalabs/core/dist/utils/SortingUtils';
23
20
  import './ResourceIDUtils-a114189a.js';
24
21
 
25
- class ServerSideExporterProvider extends CommonsExporter {
26
- getFilters() {
27
- var _a;
28
- return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getAppliedFilters();
29
- }
30
- getOrders() {
31
- var _a;
32
- return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSort();
33
- }
34
- getResourceURI() {
35
- var _a;
36
- return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.name;
37
- }
38
- getSelectedNumber() {
39
- return this.dataUnit.getSelectionInfo().length;
40
- }
41
- getTotalRecords() {
42
- var _a, _b, _c;
43
- const { total } = ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo()) || {};
44
- return total !== null && total !== void 0 ? total : (_c = (_b = this.dataUnit) === null || _b === void 0 ? void 0 : _b.records) === null || _c === void 0 ? void 0 : _c.length;
45
- }
46
- getSelectedIDs() {
47
- return getSelectedIDs(this.dataUnit);
48
- }
49
- getOffset() {
50
- return this.getExporterOffset(this.getPaginationInfo());
51
- }
52
- getPageSize() {
53
- var _a;
54
- return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.pageSize;
55
- }
56
- getExportLimit() {
57
- return 5000;
58
- }
59
- getRecordID() {
60
- var _a, _b, _c;
61
- return (_c = (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.__record__id__;
62
- }
63
- getPaginationInfo() {
64
- var _a;
65
- return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo();
66
- }
67
- getExporterOffset(paginationInfo) {
68
- if (paginationInfo == undefined) {
69
- return;
70
- }
71
- const offset = paginationInfo.firstRecord;
72
- if (offset > 0) {
73
- return (offset - 1);
74
- }
75
- return offset;
76
- }
77
- }
78
-
79
- const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--lg)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding)}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";
22
+ const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";
80
23
 
81
24
  const SnkGrid = class {
82
25
  constructor(hostRef) {
83
26
  registerInstance(this, hostRef);
84
27
  this.actionClick = createEvent(this, "actionClick", 7);
85
28
  this.gridDoubleClick = createEvent(this, "gridDoubleClick", 7);
86
- this._customEditors = new Map();
87
- this._customRenders = new Map();
88
29
  this._topTaskbarProcessor = new TaskbarProcessor({
89
30
  "snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
90
31
  "snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
@@ -104,14 +45,6 @@ const SnkGrid = class {
104
45
  "snkGridHeaderTaskbar.singleTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "FORM_MODE", "CONFIGURATOR", "REFRESH"],
105
46
  "snkGridHeaderTaskbar.singleTaskbar.finish_edition": ["CANCEL", "SAVE"]
106
47
  });
107
- this.dataUnitInterceptor = {
108
- interceptAction: async (action) => {
109
- if (action.type === Action.METADATA_LOADED) {
110
- return await this.interceptMetadataLoaded(action);
111
- }
112
- return action;
113
- }
114
- };
115
48
  this._dataUnit = undefined;
116
49
  this._dataState = undefined;
117
50
  this._gridConfig = undefined;
@@ -138,8 +71,6 @@ const SnkGrid = class {
138
71
  this.disablePersonalizedFilter = undefined;
139
72
  this.gridLegacyConfigName = undefined;
140
73
  this.filterBarLegacyConfigName = undefined;
141
- this.autoLoad = undefined;
142
- this.autoFocus = true;
143
74
  }
144
75
  /**
145
76
  * Exibe a janela de configurações da grade.
@@ -184,42 +115,6 @@ const SnkGrid = class {
184
115
  async findColumn() {
185
116
  await openFieldSearch(this._moreOptions, this._columnSearch);
186
117
  }
187
- /**
188
- * Registra um editor customizado para campos da grade e formulário
189
- */
190
- async addCustomEditor(fieldName, customEditor, detailContext) {
191
- if (this._grid) {
192
- this._grid.addCustomEditor(fieldName, customEditor, detailContext);
193
- return;
194
- }
195
- const newCustomEditors = new Map(this._customEditors);
196
- newCustomEditors.set(fieldName, { customEditor, detailContext });
197
- this._customEditors = newCustomEditors;
198
- }
199
- /**
200
- * Registra um render customizado para colunas da grid.
201
- */
202
- async addGridCustomRender(fieldName, customRender, detailContext) {
203
- if (this._grid) {
204
- this._grid.addGridCustomRender(fieldName, customRender, detailContext);
205
- return;
206
- }
207
- const newCustomRenders = new Map(this._customRenders);
208
- newCustomRenders.set(fieldName, { customRender, detailContext });
209
- this._customRenders = newCustomRenders;
210
- }
211
- /**
212
- * Registra um formatador de valores para uma coluna da grid.
213
- */
214
- async addCustomValueFormatter(columnName, customFormatter) {
215
- this._grid.addCustomValueFormatter(columnName, customFormatter);
216
- }
217
- /**
218
- * Remove o formatador de valores de uma coluna da grid.
219
- */
220
- async removeCustomValueFormatter(columnName) {
221
- this._grid.removeCustomValueFormatter(columnName);
222
- }
223
118
  /**
224
119
  * Atribui o foco para a grade.
225
120
  */
@@ -280,31 +175,106 @@ const SnkGrid = class {
280
175
  });
281
176
  evt.stopPropagation();
282
177
  }
283
- async dataExporterProviderStore() {
284
- const dataExporterProvider = new ServerSideExporterProvider(this._dataUnit, this._grid);
285
- store.set("exporterProviders", Object.assign(Object.assign({}, store.get("exporterProviders")), { [this.configName]: dataExporterProvider }));
178
+ buildColumnsMetadata(gridColumns) {
179
+ const columnsMetadata = [];
180
+ gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach((column) => {
181
+ var _a, _b;
182
+ /**
183
+ * TODO: Analisar e criar uma melhor forma de tratar essa validação do "RECDESP".
184
+ */
185
+ if (column.hidden && column.name !== "RECDESP") {
186
+ return;
187
+ }
188
+ const fieldData = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(column.name);
189
+ const columnData = {
190
+ label: column.label,
191
+ id: column.name,
192
+ width: column.width,
193
+ type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
194
+ userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface
195
+ };
196
+ columnsMetadata.push(columnData);
197
+ if (((_b = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONFIELD) != undefined) {
198
+ const mergedFrom = fieldData.properties.mergedFrom;
199
+ const descriptionField = `${fieldData.properties.ENTITYNAME}.${fieldData.properties.DESCRIPTIONFIELD}`;
200
+ const descriptionColumn = {
201
+ label: fieldData.properties.DESCRIPTIONENTITY,
202
+ id: `${mergedFrom ? (mergedFrom + ".") : ""}${descriptionField}`,
203
+ width: 200,
204
+ type: DataType.TEXT,
205
+ userInterface: UserInterface.LONGTEXT
206
+ };
207
+ columnsMetadata.push(descriptionColumn);
208
+ }
209
+ });
210
+ return columnsMetadata || [];
286
211
  }
287
- addElementID() {
288
- const dataInfo = { dataUnit: this._dataUnit };
289
- ElementIDUtils.addIDInfo(this._element, null, dataInfo);
212
+ getPaginationInfo() {
213
+ var _a;
214
+ return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo();
290
215
  }
291
- loadGridCustomFormatters(fields) {
292
- if (!fields || !this._grid) {
216
+ getExporterOffset(paginationInfo) {
217
+ if (paginationInfo == undefined) {
293
218
  return;
294
219
  }
295
- fields.forEach((field) => {
296
- var _a;
297
- if ((_a = field.properties) === null || _a === void 0 ? void 0 : _a.rm_precision) {
298
- this.addCustomValueFormatter(field.name, this._rmPrecisionCustomValueFormatter);
220
+ const offset = paginationInfo.firstRecord;
221
+ if (offset > 0) {
222
+ return (offset - 1);
223
+ }
224
+ return offset;
225
+ }
226
+ async dataExporterProviderStore() {
227
+ var _a;
228
+ const selectedIDs = await ((_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.getSelectedRecordsIDsInfo());
229
+ const dataExporterProvider = {
230
+ getFilters: () => {
231
+ var _a;
232
+ return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getAppliedFilters();
233
+ },
234
+ getColumnsMetadata: async () => {
235
+ var _a;
236
+ const columnsState = await ((_a = this._grid) === null || _a === void 0 ? void 0 : _a.getColumnsState());
237
+ return this.buildColumnsMetadata(columnsState);
238
+ },
239
+ getOrders: () => {
240
+ var _a;
241
+ return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getSort();
242
+ },
243
+ getResourceURI: () => {
244
+ var _a;
245
+ return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.name;
246
+ },
247
+ getSelectedNumber: () => {
248
+ var _a, _b;
249
+ return (_b = (_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectionInfo) === null || _b === void 0 ? void 0 : _b.length;
250
+ },
251
+ getTotalRecords: () => {
252
+ var _a, _b, _c;
253
+ const { total } = ((_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo()) || {};
254
+ return total !== null && total !== void 0 ? total : (_c = (_b = this._dataUnit) === null || _b === void 0 ? void 0 : _b.records) === null || _c === void 0 ? void 0 : _c.length;
255
+ },
256
+ getSelectedIDs: () => {
257
+ return selectedIDs || [];
258
+ },
259
+ getOffset: () => {
260
+ return this.getExporterOffset(this.getPaginationInfo());
261
+ },
262
+ getLimit: () => {
263
+ var _a;
264
+ return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.pageSize;
265
+ },
266
+ getRecordID: () => {
267
+ var _a, _b, _c;
268
+ return (_c = (_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.__record__id__;
299
269
  }
300
- });
270
+ };
271
+ store.set("exporterProviders", Object.assign(Object.assign({}, store.get("exporterProviders")), { [this.configName]: dataExporterProvider }));
301
272
  }
302
- async interceptMetadataLoaded(action) {
303
- this.loadGridCustomFormatters(action.payload.fields);
304
- return action;
273
+ addElementID() {
274
+ const dataInfo = { dataUnit: this._dataUnit };
275
+ ElementIDUtils.addIDInfo(this._element, null, dataInfo);
305
276
  }
306
- finishLoading() {
307
- this._dataUnit.addInterceptor(this.dataUnitInterceptor);
277
+ finshLoading() {
308
278
  CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
309
279
  this.addElementID();
310
280
  if (this.columnFilterDataSource != undefined) {
@@ -312,24 +282,6 @@ const SnkGrid = class {
312
282
  this.columnFilterDataSource.setDataUnit(this._dataUnit);
313
283
  }
314
284
  }
315
- setCustomRenders() {
316
- if (!this._grid) {
317
- return;
318
- }
319
- for (const [fieldName, customRenderProps] of this._customRenders) {
320
- this._grid.addGridCustomRender(fieldName, customRenderProps.customRender, customRenderProps.detailContext);
321
- this._customRenders.delete(fieldName);
322
- }
323
- }
324
- setCustomEditors() {
325
- if (!this._grid) {
326
- return;
327
- }
328
- for (const [fieldName, customEditorProps] of this._customEditors) {
329
- this._grid.addCustomEditor(fieldName, customEditorProps.customEditor, customEditorProps.detailContext);
330
- this._customEditors.delete(fieldName);
331
- }
332
- }
333
285
  componentWillLoad() {
334
286
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
335
287
  //TODO: substituir pelo metodo nativo closest
@@ -341,15 +293,17 @@ const SnkGrid = class {
341
293
  if (!this._dataUnit) {
342
294
  this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
343
295
  this._dataUnit = evt.detail;
344
- this.finishLoading();
296
+ this.finshLoading();
345
297
  });
346
298
  }
347
299
  else {
348
- this.finishLoading();
300
+ this.finshLoading();
349
301
  }
350
302
  if (!this.messagesBuilder)
351
303
  this.messagesBuilder = this._snkDataUnit.messagesBuilder;
352
- this._snkDataUnit.addEventListener("dataStateChange", this.handleDataStateChange.bind(this));
304
+ this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
305
+ this._dataState = evt.detail;
306
+ });
353
307
  this._snkDataUnit.addEventListener("cancelEdition", () => {
354
308
  var _a;
355
309
  if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.recordsIsEmpty) {
@@ -360,20 +314,9 @@ const SnkGrid = class {
360
314
  }
361
315
  parent = parent.parentElement;
362
316
  }
363
- this._rmPrecisionCustomValueFormatter = new RmPrecisionCustomValueFormatter();
364
317
  this.addGridLegacyConfigName();
365
318
  this.loadConfig();
366
319
  }
367
- componentDidRender() {
368
- this._rmPrecisionCustomValueFormatter.setGrid(this._grid);
369
- this.loadGridCustomFormatters(this._dataUnit.metadata.fields);
370
- this.setCustomRenders();
371
- this.setCustomEditors();
372
- }
373
- async handleDataStateChange(evt) {
374
- this._dataState = evt.detail;
375
- this._rmPrecisionCustomValueFormatter.setDataState(this._dataState);
376
- }
377
320
  getHeaderDisabledButtons() {
378
321
  var _a;
379
322
  const disabledButtons = [];
@@ -485,8 +428,8 @@ const SnkGrid = class {
485
428
  if (!this._dataUnit) {
486
429
  return undefined;
487
430
  }
488
- return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
489
- h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
431
+ return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
432
+ h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
490
433
  }
491
434
  get _element() { return getElement(this); }
492
435
  static get watchers() { return {