@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-kb-67792.0 → 0.0.0-bugfix-dev-kb-67792.2

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 (235) hide show
  1. package/dist/cjs/{ConfigStorage-0a690675.js → ConfigStorage-e49214c6.js} +1 -0
  2. package/dist/cjs/{SnkMultiSelectionListDataSource-f79d220c.js → IExporterProvider-10b7fed5.js} +94 -4
  3. package/dist/cjs/RecordIDUtils-3735135c.js +43 -0
  4. package/dist/cjs/{SnkFormConfigManager-d6d5db6d.js → SnkFormConfigManager-beebf47a.js} +8 -7
  5. package/dist/cjs/{SnkMessageBuilder-96b0f549.js → SnkMessageBuilder-cceebbae.js} +9 -13
  6. package/dist/cjs/{pesquisa-fetcher-cba1b3d0.js → dataunit-fetcher-d4873076.js} +87 -180
  7. package/dist/cjs/{index-0922807b.js → index-1dfc7a6e.js} +5 -0
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/pesquisa-fetcher-a1d0353f.js +166 -0
  10. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  11. package/dist/cjs/snk-actions-button_4.cjs.entry.js +5 -3
  12. package/dist/cjs/snk-application.cjs.entry.js +35 -12
  13. package/dist/cjs/snk-attach.cjs.entry.js +71 -46
  14. package/dist/cjs/snk-crud.cjs.entry.js +101 -10
  15. package/dist/cjs/snk-data-exporter.cjs.entry.js +315 -85
  16. package/dist/cjs/snk-data-unit-f0221097.js +690 -0
  17. package/dist/cjs/snk-data-unit.cjs.entry.js +12 -2
  18. package/dist/cjs/snk-detail-view.cjs.entry.js +50 -10
  19. package/dist/cjs/snk-filter-bar.cjs.entry.js +6 -2
  20. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
  21. package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
  22. package/dist/cjs/snk-form-view.cjs.entry.js +67 -0
  23. package/dist/cjs/snk-form.cjs.entry.js +52 -7
  24. package/dist/cjs/snk-grid.cjs.entry.js +168 -111
  25. package/dist/cjs/{snk-guides-viewer-bfcad2d6.js → snk-guides-viewer-aafc3073.js} +43 -10
  26. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -7
  27. package/dist/cjs/snk-personalized-filter.cjs.entry.js +1 -1
  28. package/dist/cjs/snk-simple-crud.cjs.entry.js +269 -40
  29. package/dist/cjs/snk-taskbar.cjs.entry.js +4 -3
  30. package/dist/cjs/{taskbar-elements-3ecd1278.js → taskbar-elements-9ad1f9c0.js} +3 -3
  31. package/dist/collection/collection-manifest.json +1 -1
  32. package/dist/collection/components/snk-application/snk-application.js +35 -11
  33. package/dist/collection/components/snk-attach/snk-attach.js +67 -44
  34. package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js +1 -0
  35. package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js +1 -0
  36. package/dist/collection/components/snk-crud/snk-crud.js +305 -7
  37. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +136 -2
  38. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +161 -0
  39. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +134 -7
  40. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +97 -0
  41. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +74 -0
  42. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +54 -1
  43. package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +1 -0
  44. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +58 -0
  45. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +55 -0
  46. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +59 -52
  47. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +62 -0
  48. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +88 -0
  49. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +20 -0
  50. package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +38 -0
  51. package/dist/collection/components/snk-data-unit/snk-data-unit.js +540 -219
  52. package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +24 -0
  53. package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js +18 -0
  54. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +22 -1
  55. package/dist/collection/components/snk-form/snk-form.js +102 -5
  56. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +7 -6
  57. package/dist/collection/components/snk-form-config/snk-form-config.js +1 -1
  58. package/dist/collection/components/snk-grid/snk-grid.css +2 -0
  59. package/dist/collection/components/snk-grid/snk-grid.js +242 -103
  60. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +407 -20
  61. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +2 -2
  62. package/dist/collection/components/snk-taskbar/snk-taskbar.js +2 -1
  63. package/dist/collection/lib/@types/index.js +5 -0
  64. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +35 -0
  65. package/dist/collection/lib/configs/ConfigStorage.js +1 -0
  66. package/dist/collection/lib/dataUnit/InMemoryLoader.js +7 -3
  67. package/dist/collection/lib/dataUnit/ValueFormatter.js +4 -0
  68. package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js +1 -0
  69. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +3 -0
  70. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +4 -0
  71. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +11 -13
  72. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +1 -0
  73. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js +1 -0
  74. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js +1 -0
  75. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +53 -4
  76. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js +22 -0
  77. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -4
  78. package/dist/collection/lib/message/SnkMessageBuilder.js +5 -12
  79. package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -0
  80. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +2 -1
  81. package/dist/components/ConfigStorage.js +1 -0
  82. package/dist/components/{field-search.js → IExporterProvider.js} +93 -6
  83. package/dist/components/ISave.js +47 -0
  84. package/dist/components/SnkFormConfigManager.js +7 -6
  85. package/dist/components/SnkMessageBuilder.js +9 -13
  86. package/dist/components/dataunit-fetcher.js +84 -182
  87. package/dist/components/index2.js +198 -33
  88. package/dist/components/pesquisa-fetcher.js +164 -0
  89. package/dist/components/snk-actions-button2.js +4 -11
  90. package/dist/components/snk-application2.js +31 -9
  91. package/dist/components/snk-attach2.js +65 -41
  92. package/dist/components/snk-crud.js +110 -11
  93. package/dist/components/snk-data-exporter2.js +309 -85
  94. package/dist/components/snk-data-unit2.js +487 -217
  95. package/dist/components/snk-detail-view2.js +96 -14
  96. package/dist/components/snk-expression-item2.js +1 -1
  97. package/dist/components/snk-filter-bar2.js +6 -1
  98. package/dist/components/snk-form-config2.js +1 -1
  99. package/dist/components/snk-form-view2.js +72 -1
  100. package/dist/components/snk-form.js +53 -6
  101. package/dist/components/snk-grid2.js +171 -109
  102. package/dist/components/snk-personalized-filter2.js +1 -1
  103. package/dist/components/snk-simple-crud2.js +264 -25
  104. package/dist/components/snk-taskbar2.js +6 -5
  105. package/dist/esm/{ConfigStorage-8c2ddac8.js → ConfigStorage-e476378d.js} +1 -0
  106. package/dist/esm/{SnkMultiSelectionListDataSource-a4805051.js → IExporterProvider-d597f27d.js} +93 -5
  107. package/dist/esm/RecordIDUtils-87d02110.js +41 -0
  108. package/dist/esm/{SnkFormConfigManager-c01b9d9d.js → SnkFormConfigManager-298cd647.js} +8 -7
  109. package/dist/esm/{SnkMessageBuilder-72423074.js → SnkMessageBuilder-ae87b754.js} +9 -13
  110. package/dist/esm/{pesquisa-fetcher-34a8b8be.js → dataunit-fetcher-3d2ec959.js} +83 -181
  111. package/dist/esm/{index-0ece87a6.js → index-3aa4977a.js} +6 -1
  112. package/dist/esm/loader.js +1 -1
  113. package/dist/esm/pesquisa-fetcher-a87445a0.js +164 -0
  114. package/dist/esm/sankhyablocks.js +1 -1
  115. package/dist/esm/snk-actions-button_4.entry.js +5 -3
  116. package/dist/esm/snk-application.entry.js +34 -11
  117. package/dist/esm/snk-attach.entry.js +66 -41
  118. package/dist/esm/snk-crud.entry.js +101 -10
  119. package/dist/esm/snk-data-exporter.entry.js +316 -86
  120. package/dist/esm/snk-data-unit-1ef94aef.js +688 -0
  121. package/dist/esm/snk-data-unit.entry.js +12 -2
  122. package/dist/esm/snk-detail-view.entry.js +50 -10
  123. package/dist/esm/snk-filter-bar.entry.js +6 -2
  124. package/dist/esm/snk-filter-modal-item.entry.js +1 -1
  125. package/dist/esm/snk-form-config.entry.js +1 -1
  126. package/dist/esm/snk-form-view.entry.js +67 -0
  127. package/dist/esm/snk-form.entry.js +52 -7
  128. package/dist/esm/snk-grid.entry.js +166 -109
  129. package/dist/esm/{snk-guides-viewer-edeac29f.js → snk-guides-viewer-62124f3d.js} +43 -10
  130. package/dist/esm/snk-guides-viewer.entry.js +9 -7
  131. package/dist/esm/snk-personalized-filter.entry.js +1 -1
  132. package/dist/esm/snk-simple-crud.entry.js +257 -28
  133. package/dist/esm/snk-taskbar.entry.js +4 -3
  134. package/dist/esm/{taskbar-elements-2473c8ac.js → taskbar-elements-d59867f1.js} +3 -3
  135. package/dist/sankhyablocks/p-08c28ddd.entry.js +1 -0
  136. package/dist/sankhyablocks/p-091ce761.js +60 -0
  137. package/dist/sankhyablocks/p-094eebf6.entry.js +1 -0
  138. package/dist/sankhyablocks/p-0c68f40f.entry.js +1 -0
  139. package/dist/sankhyablocks/p-162b9a59.entry.js +11 -0
  140. package/dist/sankhyablocks/p-1db45d26.entry.js +1 -0
  141. package/dist/sankhyablocks/p-25f1fc39.js +6 -0
  142. package/dist/sankhyablocks/p-2e9c764c.entry.js +1 -0
  143. package/dist/sankhyablocks/p-30cf616e.js +1 -0
  144. package/dist/sankhyablocks/{p-96621231.js → p-3287a6cc.js} +1 -1
  145. package/dist/sankhyablocks/p-421bec84.entry.js +1 -0
  146. package/dist/sankhyablocks/p-42f7b05d.entry.js +1 -0
  147. package/dist/sankhyablocks/p-51999ab5.entry.js +1 -0
  148. package/dist/sankhyablocks/p-5f016aed.js +1 -0
  149. package/dist/sankhyablocks/p-6c364d25.entry.js +1 -0
  150. package/dist/sankhyablocks/p-70001ac1.js +1 -0
  151. package/dist/sankhyablocks/p-74c665d5.entry.js +1 -0
  152. package/dist/sankhyablocks/p-76a65660.js +1 -0
  153. package/dist/sankhyablocks/p-7c4aabe2.js +1 -0
  154. package/dist/sankhyablocks/{p-ae4fc9a9.js → p-7e7a7473.js} +1 -1
  155. package/dist/sankhyablocks/p-8c1ff936.entry.js +1 -0
  156. package/dist/sankhyablocks/p-939e15d3.entry.js +1 -0
  157. package/dist/sankhyablocks/p-9863d682.js +1 -0
  158. package/dist/sankhyablocks/{p-41c2c191.entry.js → p-9dfda04a.entry.js} +1 -1
  159. package/dist/sankhyablocks/{p-c2ae0fab.entry.js → p-bd008859.entry.js} +1 -1
  160. package/dist/sankhyablocks/p-c273d6ee.js +1 -0
  161. package/dist/sankhyablocks/p-d65d98ed.entry.js +1 -0
  162. package/dist/sankhyablocks/p-f2809746.entry.js +1 -0
  163. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  164. package/dist/types/components/snk-application/snk-application.d.ts +7 -3
  165. package/dist/types/components/snk-attach/snk-attach.d.ts +11 -9
  166. package/dist/types/components/snk-crud/interfaces/PropsCustomEditor.d.ts +4 -0
  167. package/dist/types/components/snk-crud/interfaces/PropsCustomRender.d.ts +4 -0
  168. package/dist/types/components/snk-crud/snk-crud.d.ts +45 -1
  169. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +23 -0
  170. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +28 -3
  171. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +24 -0
  172. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +14 -0
  173. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +12 -0
  174. package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +24 -4
  175. package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +5 -0
  176. package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +17 -0
  177. package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +17 -0
  178. package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +4 -1
  179. package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +21 -0
  180. package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +77 -0
  181. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +4 -0
  182. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +3 -0
  183. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +67 -3
  184. package/dist/types/components/snk-data-unit/test/resources/metadataMock.d.ts +3 -0
  185. package/dist/types/components/snk-data-unit/test/resources/parentMetadataMock.d.ts +3 -0
  186. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -0
  187. package/dist/types/components/snk-form/snk-form.d.ts +14 -0
  188. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +2 -2
  189. package/dist/types/components/snk-grid/snk-grid.d.ts +46 -6
  190. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +62 -4
  191. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
  192. package/dist/types/components.d.ts +261 -4
  193. package/dist/types/lib/@types/index.d.ts +5 -0
  194. package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +11 -0
  195. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +2 -1
  196. package/dist/types/lib/dataUnit/ValueFormatter.d.ts +2 -0
  197. package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +3 -0
  198. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +2 -1
  199. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +1 -0
  200. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -0
  201. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.d.ts +10 -0
  202. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.d.ts +7 -0
  203. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +6 -0
  204. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.d.ts +20 -0
  205. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +3 -0
  206. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +2 -1
  207. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
  208. package/package.json +1 -1
  209. package/dist/cjs/snk-data-unit-559ac55c.js +0 -462
  210. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +0 -34
  211. package/dist/components/index3.js +0 -199
  212. package/dist/esm/snk-data-unit-44215df7.js +0 -460
  213. package/dist/sankhyablocks/p-03dcc5ff.entry.js +0 -1
  214. package/dist/sankhyablocks/p-176c3491.entry.js +0 -1
  215. package/dist/sankhyablocks/p-37e5d563.js +0 -65
  216. package/dist/sankhyablocks/p-38289a55.js +0 -1
  217. package/dist/sankhyablocks/p-46e55a95.entry.js +0 -1
  218. package/dist/sankhyablocks/p-4e728357.entry.js +0 -1
  219. package/dist/sankhyablocks/p-5571bdfe.js +0 -1
  220. package/dist/sankhyablocks/p-5630574e.js +0 -1
  221. package/dist/sankhyablocks/p-5f8c0426.entry.js +0 -1
  222. package/dist/sankhyablocks/p-80c64add.entry.js +0 -1
  223. package/dist/sankhyablocks/p-86af4cc2.js +0 -1
  224. package/dist/sankhyablocks/p-8b690717.js +0 -1
  225. package/dist/sankhyablocks/p-a1832166.entry.js +0 -1
  226. package/dist/sankhyablocks/p-a809d944.entry.js +0 -1
  227. package/dist/sankhyablocks/p-a97226f6.entry.js +0 -1
  228. package/dist/sankhyablocks/p-add17f6a.entry.js +0 -1
  229. package/dist/sankhyablocks/p-c5a9a5d9.entry.js +0 -1
  230. package/dist/sankhyablocks/p-c5aa7d70.entry.js +0 -11
  231. package/dist/sankhyablocks/p-cb0147ab.entry.js +0 -1
  232. package/dist/sankhyablocks/p-f0145e3b.js +0 -1
  233. package/dist/sankhyablocks/p-f03e4199.entry.js +0 -1
  234. package/dist/sankhyablocks/p-f607db63.entry.js +0 -1
  235. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +0 -3
@@ -1,22 +1,24 @@
1
1
  import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host } from './index-a7d3d3f1.js';
2
2
  import { Action } from '@sankhyalabs/core';
3
- import { S as SnkFormConfigManager } from './SnkFormConfigManager-c01b9d9d.js';
3
+ import { S as SnkFormConfigManager } from './SnkFormConfigManager-298cd647.js';
4
4
  import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
5
5
  import './DataFetcher-773a3e4b.js';
6
- import './pesquisa-fetcher-34a8b8be.js';
7
- import { P as PresentationMode } from './index-0ece87a6.js';
6
+ import './pesquisa-fetcher-a87445a0.js';
7
+ import { P as PresentationMode } from './index-3aa4977a.js';
8
8
  import './ISave-d8c8bc59.js';
9
9
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
10
10
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
11
+ import './dataunit-fetcher-3d2ec959.js';
11
12
  import './filter-item-type.enum-d45e026f.js';
12
13
  import './form-config-fetcher-e0382e5a.js';
13
- import { T as TaskbarElement } from './taskbar-elements-2473c8ac.js';
14
+ import { T as TaskbarElement } from './taskbar-elements-d59867f1.js';
14
15
  import { d as VIEW_MODE } from './constants-8457af36.js';
15
- import { S as SnkGuidesViewer } from './snk-guides-viewer-edeac29f.js';
16
- import { S as SnkMessageBuilder } from './SnkMessageBuilder-72423074.js';
17
- import './ConfigStorage-8c2ddac8.js';
16
+ import { S as SnkGuidesViewer } from './snk-guides-viewer-62124f3d.js';
17
+ import { S as SnkMessageBuilder } from './SnkMessageBuilder-ae87b754.js';
18
+ import './ConfigStorage-e476378d.js';
18
19
  import './PrintUtils-3e4ff0f5.js';
19
20
  import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
21
+ import '@sankhyalabs/core/dist/utils/SortingUtils';
20
22
  import './ResourceIDUtils-a114189a.js';
21
23
  import './index-bdf75557.js';
22
24
  import './field-search-efbe307f.js';
@@ -89,6 +91,8 @@ const SnkDetailView = class {
89
91
  this.branchGuide = undefined;
90
92
  this.canEdit = true;
91
93
  this.taskbarCustomContainerId = undefined;
94
+ this.customEditors = undefined;
95
+ this.customRenders = undefined;
92
96
  }
93
97
  observeDataUnit(newDataUnit, oldDataUnit) {
94
98
  newDataUnit === null || newDataUnit === void 0 ? void 0 : newDataUnit.subscribe(this.dataUnitActionHandler.bind(this));
@@ -156,10 +160,38 @@ const SnkDetailView = class {
156
160
  this._snkGrid.scrollIntoView({ behavior: "smooth", block: "start" });
157
161
  }
158
162
  }
163
+ /**
164
+ * Registra um editor customizado para campos da grade e formulário.
165
+ */
166
+ async addCustomEditor(fieldName, customEditor) {
167
+ var _a;
168
+ const detailContext = this.normalizeBranchGuideId((_a = this.branchGuide) === null || _a === void 0 ? void 0 : _a.id);
169
+ this._snkGrid.addCustomEditor(fieldName, customEditor, detailContext);
170
+ this._snkFormView.addCustomEditor(fieldName, customEditor, detailContext);
171
+ }
172
+ async observerPropsCustomEditor(newValue) {
173
+ for (const fieldName in newValue) {
174
+ await this.addCustomEditor(fieldName, newValue[fieldName]);
175
+ }
176
+ }
177
+ /**
178
+ * Registra um render customizado para colunas da grid.
179
+ */
180
+ async addGridCustomRender(fieldName, customRender) {
181
+ var _a;
182
+ const detailContext = this.normalizeBranchGuideId((_a = this.branchGuide) === null || _a === void 0 ? void 0 : _a.id);
183
+ await this._snkGrid.addGridCustomRender(fieldName, customRender, detailContext);
184
+ }
159
185
  onContentCardChanged(evt) {
160
186
  SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this.formConfigManager).then(() => forceUpdate(this));
161
187
  evt.stopPropagation();
162
188
  }
189
+ async observeCustomRenders(newValue) {
190
+ for (const field in newValue) {
191
+ const customRender = newValue[field];
192
+ await this.addGridCustomRender(field, customRender);
193
+ }
194
+ }
163
195
  updateLabel() {
164
196
  const guideItemPathSize = this.guideItemPath ? this.guideItemPath.length : 0;
165
197
  if (guideItemPathSize > 0) {
@@ -191,14 +223,13 @@ const SnkDetailView = class {
191
223
  return guideId.replace(SnkDetailView.REGEX_FORM_ID, "");
192
224
  }
193
225
  loadMetadata() {
194
- var _a;
195
226
  if (!this.dataUnit) {
196
227
  return;
197
228
  }
198
229
  if (!this.formConfigManager.isLoaded) {
199
230
  return;
200
231
  }
201
- const formConfig = this.formConfigManager.getConfig((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode, this.dataUnit);
232
+ const formConfig = this.formConfigManager.getConfig(this.dataUnit);
202
233
  //this._cardsState = formConfig?.cardsState;
203
234
  this._formMetadata = buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
204
235
  }
@@ -262,6 +293,10 @@ const SnkDetailView = class {
262
293
  this.messagesBuilder = new SnkMessageBuilder(this.entityName);
263
294
  }
264
295
  }
296
+ async componentDidLoad() {
297
+ await this.observerPropsCustomEditor(this.customEditors);
298
+ await this.observeCustomRenders(this.customRenders);
299
+ }
265
300
  async dataUnitActionHandler(action) {
266
301
  if (action.type === Action.FIELD_INVALIDATED) {
267
302
  this.addErrorBadgeToBranchGuide();
@@ -271,6 +306,9 @@ const SnkDetailView = class {
271
306
  this.branchGuide = Object.assign(Object.assign({}, this.branchGuide), { badge: 'error' });
272
307
  this.snkDetailGuidesChange.emit(new GuideBuilder(this.branchGuide, this._formMetadata, this.dataUnit));
273
308
  }
309
+ normalizeBranchGuideId(id) {
310
+ return id === null || id === void 0 ? void 0 : id.replace(/child\[(.*?)\]/g, '$1').replace(/::/g, '>');
311
+ }
274
312
  render() {
275
313
  this.updateLabel();
276
314
  //const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
@@ -278,7 +316,9 @@ const SnkDetailView = class {
278
316
  }
279
317
  static get watchers() { return {
280
318
  "dataUnit": ["observeDataUnit"],
281
- "dataState": ["observerDataState"]
319
+ "dataState": ["observerDataState"],
320
+ "customEditors": ["observerPropsCustomEditor"],
321
+ "customRenders": ["observeCustomRenders"]
282
322
  }; }
283
323
  };
284
324
  SnkDetailView.REGEX_FORM_ID = /__FORM:[^:]+/g;
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
2
2
  import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext } from '@sankhyalabs/core';
3
3
  import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
4
- import { C as ConfigStorage } from './ConfigStorage-8c2ddac8.js';
4
+ import { C as ConfigStorage } from './ConfigStorage-e476378d.js';
5
5
  import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
6
6
  import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
7
7
  import { F as FilterOperand } from './index-ae591a44.js';
@@ -282,6 +282,7 @@ const SnkFilterBar = class {
282
282
  this.messagesBuilder = undefined;
283
283
  this.disablePersonalizedFilter = undefined;
284
284
  this.filterBarLegacyConfigName = undefined;
285
+ this.autoLoad = undefined;
285
286
  this.allowDefault = undefined;
286
287
  this.scrollerLocked = false;
287
288
  this.showPersonalizedFilter = false;
@@ -436,7 +437,10 @@ const SnkFilterBar = class {
436
437
  }
437
438
  async doLoadData(forceReload = false) {
438
439
  try {
439
- if (this._firstLoad && !forceReload) {
440
+ if (this._firstLoad && this.autoLoad === false) {
441
+ return;
442
+ }
443
+ if (this._firstLoad && !forceReload && this.autoLoad === undefined) {
440
444
  let autoLoad = await this._application.getBooleanParam("global.carregar.registros.iniciar.tela");
441
445
  if (!autoLoad) {
442
446
  return;
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
2
2
  import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
3
3
  import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
4
4
  import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
5
- import { C as ConfigStorage } from './ConfigStorage-8c2ddac8.js';
5
+ import { C as ConfigStorage } from './ConfigStorage-e476378d.js';
6
6
  import { F as FilterType } from './filter-type.enum-a80c1b6b.js';
7
7
  import './form-config-fetcher-e0382e5a.js';
8
8
  import './DataFetcher-773a3e4b.js';
@@ -76,7 +76,7 @@ const SnkFormConfig = class {
76
76
  }
77
77
  }
78
78
  getConfig() {
79
- let config = this.configManager.getConfig(false, this.dataUnit);
79
+ let config = this.configManager.getConfig(this.dataUnit);
80
80
  if (config.fields && config.fields.length === 0) {
81
81
  config = undefined;
82
82
  }
@@ -10,6 +10,8 @@ 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();
13
15
  this.levelPath = undefined;
14
16
  this.label = undefined;
15
17
  this.name = undefined;
@@ -23,12 +25,47 @@ const SnkFormView = class {
23
25
  this.canFix = true;
24
26
  this.recordsValidator = undefined;
25
27
  this.fieldToFocus = undefined;
28
+ this.customEditors = undefined;
29
+ this.fieldsProps = undefined;
26
30
  }
27
31
  async showUp() {
28
32
  if (this._formView) {
29
33
  this._formView.showUp();
30
34
  }
31
35
  }
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
+ }
32
69
  changeFix() {
33
70
  this.fixed = !this.fixed;
34
71
  this.emitEvent("fixed");
@@ -87,7 +124,13 @@ const SnkFormView = class {
87
124
  this._dataBinder.onDisconnectedCallback();
88
125
  }
89
126
  }
127
+ componentDidLoad() {
128
+ this.observePropsCustomEditor(this.customEditors);
129
+ this.observeFieldsProps(this.fieldsProps);
130
+ }
90
131
  componentDidRender() {
132
+ this.setCustomEditors();
133
+ this.setFieldProps();
91
134
  if (this.fieldToFocus == undefined) {
92
135
  return;
93
136
  }
@@ -99,6 +142,26 @@ const SnkFormView = class {
99
142
  this.snkRequestClearFieldToFocus.emit();
100
143
  });
101
144
  }
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
+ }
102
165
  render() {
103
166
  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 &&
104
167
  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 &&
@@ -108,6 +171,10 @@ const SnkFormView = class {
108
171
  :
109
172
  h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event) })));
110
173
  }
174
+ static get watchers() { return {
175
+ "customEditors": ["observePropsCustomEditor"],
176
+ "fieldsProps": ["observeFieldsProps"]
177
+ }; }
111
178
  };
112
179
  SnkFormView.style = snkFormViewCss;
113
180
 
@@ -1,8 +1,8 @@
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-c01b9d9d.js';
3
+ import { S as SnkFormConfigManager } from './SnkFormConfigManager-298cd647.js';
4
4
  import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
5
- import './ConfigStorage-8c2ddac8.js';
5
+ import './ConfigStorage-e476378d.js';
6
6
  import './form-config-fetcher-e0382e5a.js';
7
7
  import './DataFetcher-773a3e4b.js';
8
8
  import './PrintUtils-3e4ff0f5.js';
@@ -17,6 +17,7 @@ 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();
20
21
  this._dataUnit = undefined;
21
22
  this._dataState = undefined;
22
23
  this._showFormConfig = false;
@@ -39,6 +40,24 @@ const SnkForm = class {
39
40
  async hideConfig() {
40
41
  this._showFormConfig = false;
41
42
  }
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
+ }
42
61
  closeConfig() {
43
62
  this.hideConfig();
44
63
  }
@@ -46,6 +65,18 @@ const SnkForm = class {
46
65
  const dataInfo = { dataUnit: this._dataUnit };
47
66
  ElementIDUtils.addIDInfo(this._element, null, dataInfo);
48
67
  }
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
+ }
49
80
  async componentWillLoad() {
50
81
  let parent = this._element.parentElement;
51
82
  while (parent) {
@@ -61,9 +92,7 @@ const SnkForm = class {
61
92
  this._dataUnit = evt.detail;
62
93
  });
63
94
  }
64
- this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
65
- this._dataState = evt.detail;
66
- });
95
+ this._snkDataUnit.addEventListener("dataStateChange", this.handleDataStateChange.bind(this));
67
96
  break;
68
97
  }
69
98
  parent = parent.parentElement;
@@ -73,7 +102,23 @@ const SnkForm = class {
73
102
  }
74
103
  this._configManager = new SnkFormConfigManager(this.configName, this.resourceID);
75
104
  this.addFormLegacyConfig();
76
- this._configManager.loadConfig();
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
+ }
77
122
  }
78
123
  addFormLegacyConfig() {
79
124
  if (this.formLegacyConfigName) {
@@ -84,7 +129,7 @@ const SnkForm = class {
84
129
  if (!this._dataUnit || !this._dataState) {
85
130
  return undefined;
86
131
  }
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 &&
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 &&
88
133
  h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this._dataUnit, configManager: this._configManager, onConfigClose: () => this.closeConfig() })))));
89
134
  }
90
135
  get _element() { return getElement(this); }