@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
@@ -11,21 +11,16 @@ import { buildFieldSearch, openFieldSearch } from '../snk-taskbar/subcomponents/
11
11
  import { ConfigStorage } from '../../lib/configs/ConfigStorage';
12
12
  import { SnkFormConfigManager } from '../snk-form-config/SnkFormConfigManager';
13
13
  import { REGULAR_DEFAULT_BTNS, REGULAR_SELECTED_BTNS } from './regular-buttons';
14
- import RmPrecisionCustomValueFormatter from '../../lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter';
15
- import ClientSideExporterProvider from '../snk-data-exporter/providers/ClientSideExporterProvider';
16
- import store from "../../lib/store";
17
14
  export class SnkSimpleCrud {
18
15
  constructor() {
19
16
  this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
20
17
  this._keyDownHandler = (event) => this.keyDownListener(event);
21
18
  this._formConfigFetcher = new FormConfigFetcher();
22
- this._customEditors = new Map();
23
- this._customRenders = new Map();
24
19
  this._taskbarProcessor = new TaskbarProcessor({
25
- "snkSimpleCrudTaskbar.form_regular": this.getButtons(false, [TaskbarElement.GRID_MODE]),
26
- "snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, [TaskbarElement.DATA_EXPORTER, TaskbarElement.FORM_MODE]),
27
- "snkSimpleCrudTaskbar.form_selected": this.getButtons(true, [TaskbarElement.GRID_MODE]),
28
- "snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, [TaskbarElement.DATA_EXPORTER, TaskbarElement.FORM_MODE]),
20
+ "snkSimpleCrudTaskbar.form_regular": this.getButtons(false, TaskbarElement.GRID_MODE),
21
+ "snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, TaskbarElement.FORM_MODE),
22
+ "snkSimpleCrudTaskbar.form_selected": this.getButtons(true, TaskbarElement.GRID_MODE),
23
+ "snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, TaskbarElement.FORM_MODE),
29
24
  "snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
30
25
  });
31
26
  this._showPopUpGridConfig = false;
@@ -36,15 +31,12 @@ export class SnkSimpleCrud {
36
31
  this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
37
32
  this.dataState = undefined;
38
33
  this.dataUnit = undefined;
39
- this.entityName = undefined;
40
34
  this.mode = SIMPLE_CRUD_MODE.SERVER;
41
35
  this.gridConfig = undefined;
42
36
  this.formConfig = undefined;
43
37
  this._formFields = [];
44
- this._fieldsProps = new Map();
45
38
  this.multipleSelection = undefined;
46
39
  this.useCancelConfirm = true;
47
- this.pageSize = 150;
48
40
  this.resourceID = undefined;
49
41
  this.taskbarManager = undefined;
50
42
  this.messagesBuilder = undefined;
@@ -55,33 +47,6 @@ export class SnkSimpleCrud {
55
47
  this.gridLegacyConfigName = undefined;
56
48
  this.formLegacyConfigName = undefined;
57
49
  this.ignoreReadOnlyFormFields = false;
58
- this.autoFocus = true;
59
- this.autoLoad = undefined;
60
- }
61
- /**
62
- * Registra um editor customizado para campos da grade e formulário.
63
- */
64
- async addCustomEditor(fieldName, customEditor) {
65
- if (this._grid && this._form) {
66
- this._grid.addCustomEditor(fieldName, customEditor);
67
- this._form.addCustomEditor(fieldName, customEditor);
68
- return;
69
- }
70
- const newCustomEditors = new Map(this._customEditors);
71
- newCustomEditors.set(fieldName, customEditor);
72
- this._customEditors = newCustomEditors;
73
- }
74
- /**
75
- * Registra um render customizado para colunas da grid.
76
- */
77
- async addGridCustomRender(fieldName, customRender) {
78
- if (this._grid) {
79
- this._grid.addGridCustomRender(fieldName, customRender);
80
- return;
81
- }
82
- const newCustomRenders = new Map(this._customRenders);
83
- newCustomRenders.set(fieldName, customRender);
84
- this._customRenders = newCustomRenders;
85
50
  }
86
51
  handleResourceIDChanged(newValue, oldValue) {
87
52
  if (StringUtils.isEmpty(newValue)) {
@@ -93,30 +58,9 @@ export class SnkSimpleCrud {
93
58
  this.loadFormConfig(true);
94
59
  this.loadGridConfig(true);
95
60
  }
96
- /**
97
- * Registra um formatador de valores para uma coluna da grid.
98
- */
99
- async addCustomValueFormatter(columnName, customFormatter) {
100
- this._grid.addCustomValueFormatter(columnName, customFormatter);
101
- }
102
- /**
103
- * Remove o formatador de valores de uma coluna da grid.
104
- */
105
- async removeCustomValueFormatter(columnName) {
106
- this._grid.removeCustomValueFormatter(columnName);
107
- }
108
- /**
109
- * Altera/adiciona uma propriedade nos metadados do campo.
110
- */
111
- async setFieldProp(fieldName, propName, value) {
112
- const newCustomFieldProps = new Map(this._fieldsProps);
113
- const currentProps = this._fieldsProps.get(fieldName);
114
- newCustomFieldProps.set(fieldName, Object.assign(Object.assign({}, currentProps), { [propName]: value }));
115
- this._fieldsProps = newCustomFieldProps;
116
- }
117
- getButtons(selected, extraButtons) {
61
+ getButtons(selected, changeModeBtn) {
118
62
  return this.addConfigButton(this.resolveInMemoryBtns(selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS)
119
- .concat(extraButtons));
63
+ .concat(changeModeBtn));
120
64
  }
121
65
  addConfigButton(buttons) {
122
66
  if (this.configName === undefined) {
@@ -156,19 +100,15 @@ export class SnkSimpleCrud {
156
100
  }
157
101
  evt.stopPropagation();
158
102
  }
159
- async onChangeEntityName(newValue) {
160
- if (this.dataUnit)
161
- return;
162
- const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
163
- this.dataUnit = await application.getDataUnit(newValue, null, null, this.configName);
164
- }
165
103
  onModeChange() {
166
104
  if (this.mode == SIMPLE_CRUD_MODE.IN_MEMORY) {
167
105
  this.initInMemoryDataUnit();
168
106
  }
169
107
  }
170
108
  observeDataState(newValue, oldValue) {
171
- this.handleDataStateChange(newValue, oldValue);
109
+ if (ObjectUtils.objectToString(oldValue) != ObjectUtils.objectToString(newValue)) {
110
+ this.dataStateChange.emit(newValue);
111
+ }
172
112
  }
173
113
  async observeFormLegacy(newValue, oldValue) {
174
114
  await this.handleUpdateFormLegacyConfig(newValue, oldValue);
@@ -176,29 +116,6 @@ export class SnkSimpleCrud {
176
116
  async observeGridLegacy(newValue, oldValue) {
177
117
  await this.handleUpdateGridLegacyConfig(newValue, oldValue);
178
118
  }
179
- async handleDataStateChange(newValue, oldValue) {
180
- if (ObjectUtils.objectToString(oldValue) != ObjectUtils.objectToString(newValue)) {
181
- this.dataStateChange.emit(newValue);
182
- }
183
- await this.processRmPrecision();
184
- }
185
- async processRmPrecision() {
186
- var _a, _b;
187
- const fieldsWithRmPrecision = await this._snkDataUnit.getFieldsWithRmPrecision();
188
- for (const field of fieldsWithRmPrecision || []) {
189
- if (!field) {
190
- continue;
191
- }
192
- const rmPrecision = (_b = (_a = this.dataState) === null || _a === void 0 ? void 0 : _a.rowMetadata) === null || _b === void 0 ? void 0 : _b.getProp('rm_precision', field);
193
- if (!rmPrecision && rmPrecision !== 0) {
194
- continue;
195
- }
196
- await this.setFieldProp(field, 'precision', rmPrecision);
197
- await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
198
- }
199
- ;
200
- this._rmPrecisionCustomValueFormatter.setDataState(this.dataState);
201
- }
202
119
  async handleUpdateGridLegacyConfig(newValue, oldValue) {
203
120
  if (newValue == undefined || newValue == oldValue) {
204
121
  return;
@@ -295,7 +212,6 @@ export class SnkSimpleCrud {
295
212
  }
296
213
  async componentWillRender() {
297
214
  this._resourceID = await this.application.getResourceID();
298
- this.dataExporterProviderStore();
299
215
  this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
300
216
  if (this.configName === undefined) {
301
217
  return;
@@ -307,70 +223,32 @@ export class SnkSimpleCrud {
307
223
  this.loadGridConfig();
308
224
  this.loadFormConfig();
309
225
  }
310
- componentDidRender() {
311
- this._rmPrecisionCustomValueFormatter.setGrid(this._grid);
312
- this.addGridCustomValueFormattters();
313
- this.setFieldsProps();
314
- this.setCustomRenders();
315
- this.setCustomEditors();
316
- }
317
226
  componentWillLoad() {
318
227
  this.processMetadata();
319
228
  this.onModeChange();
320
229
  this.configDatasource();
321
- this._rmPrecisionCustomValueFormatter = new RmPrecisionCustomValueFormatter();
322
230
  }
323
231
  componentDidLoad() {
324
232
  CSSVarsUtils.applyVarsGrid(this._element, this._grid);
325
233
  }
326
- setCustomRenders() {
327
- if (!this._grid) {
328
- return;
329
- }
330
- for (const [fieldName, customRender] of this._customRenders) {
331
- this._grid.addGridCustomRender(fieldName, customRender);
332
- this._customRenders.delete(fieldName);
333
- }
334
- }
335
- setCustomEditors() {
336
- if (!this._grid || !this._form) {
337
- return;
338
- }
339
- for (const [fieldName, customEditor] of this._customEditors) {
340
- this._grid.addCustomEditor(fieldName, customEditor);
341
- this._form.addCustomEditor(fieldName, customEditor);
342
- this._customEditors.delete(fieldName);
343
- }
344
- }
345
234
  configDatasource() {
346
235
  this._multiSelectionListDataSource.setApplication(this.application);
347
236
  this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
348
237
  }
349
- setFieldsProps() {
350
- if (!this._form) {
351
- return;
352
- }
353
- for (const [fieldName, props] of this._fieldsProps) {
354
- for (const prop in props) {
355
- this._form.setFieldProp(fieldName, prop, props[prop]);
356
- }
357
- this._fieldsProps.delete(fieldName);
358
- }
359
- }
360
238
  getTaskBarId() {
361
- var _a, _b;
239
+ var _a, _b, _c;
362
240
  if ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
363
241
  return "snkSimpleCrudTaskbar.finish_edition";
364
242
  }
365
243
  if (((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.selectionInfo) &&
366
244
  !this.dataState.selectionInfo.isAllRecords() &&
367
- this.dataState.selectionInfo.length > 0) {
245
+ ((_c = this.dataState.selectionInfo.records) === null || _c === void 0 ? void 0 : _c.length) > 0) {
368
246
  return this._currentViewMode === VIEW_MODE.GRID ? "snkSimpleCrudTaskbar.grid_selected" : "snkSimpleCrudTaskbar.form_selected";
369
247
  }
370
248
  return this._currentViewMode === VIEW_MODE.GRID ? "snkSimpleCrudTaskbar.grid_regular" : "snkSimpleCrudTaskbar.form_regular";
371
249
  }
372
250
  initInMemoryDataUnit() {
373
- this._inMemoryLoader = new InMemoryLoader(this._metadata, undefined, { autoLoad: this.autoLoad });
251
+ this._inMemoryLoader = new InMemoryLoader(this._metadata);
374
252
  this.dataUnit = this._inMemoryLoader.dataUnit;
375
253
  this.dataUnitReady.emit(this.dataUnit);
376
254
  }
@@ -409,11 +287,12 @@ export class SnkSimpleCrud {
409
287
  var _a;
410
288
  (_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close();
411
289
  }
412
- async updateConfig() {
290
+ updateConfig() {
413
291
  if (this._formConfigManager == undefined) {
414
292
  this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
415
293
  }
416
294
  this._formConfigManager.setConfig(this.formConfig);
295
+ return;
417
296
  }
418
297
  processMetadata() {
419
298
  const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
@@ -445,28 +324,11 @@ export class SnkSimpleCrud {
445
324
  };
446
325
  }
447
326
  }
448
- addGridCustomValueFormattters() {
449
- var _a, _b, _c;
450
- const metadataFields = ((_a = this._metadata) === null || _a === void 0 ? void 0 : _a.fields) || ((_c = (_b = this.dataUnit) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.fields);
451
- if (!metadataFields) {
452
- return;
453
- }
454
- const fieldsWithRmPrecision = [];
455
- metadataFields.forEach((field) => {
456
- var _a;
457
- if (((_a = field.properties) === null || _a === void 0 ? void 0 : _a.rm_precision) && !fieldsWithRmPrecision.includes(field.name)) {
458
- fieldsWithRmPrecision.push(field.name);
459
- }
460
- });
461
- fieldsWithRmPrecision.forEach(field => {
462
- this.addCustomValueFormatter(field, this._rmPrecisionCustomValueFormatter);
463
- });
464
- }
465
327
  onDataStateChange(evt) {
466
328
  this.dataState = Object.assign({}, evt.detail);
467
329
  }
468
330
  getTaskBarDisabledButtons() {
469
- var _a, _b, _c, _d, _e, _f;
331
+ var _a, _b, _c, _d;
470
332
  const disabledButtons = [];
471
333
  if (!((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.hasNext)) {
472
334
  disabledButtons.push(TaskbarElement.NEXT);
@@ -477,9 +339,6 @@ export class SnkSimpleCrud {
477
339
  if ((_d = (_c = this.dataState) === null || _c === void 0 ? void 0 : _c.selectionInfo) === null || _d === void 0 ? void 0 : _d.isEmpty()) {
478
340
  disabledButtons.push(TaskbarElement.FORM_MODE);
479
341
  }
480
- if (((_f = (_e = this.dataState) === null || _e === void 0 ? void 0 : _e.selectionInfo) === null || _f === void 0 ? void 0 : _f.length) > 1) {
481
- disabledButtons.push(TaskbarElement.CLONE);
482
- }
483
342
  return disabledButtons;
484
343
  }
485
344
  handleCancelEdit() {
@@ -623,23 +482,9 @@ export class SnkSimpleCrud {
623
482
  .then(() => {
624
483
  this.setGridConfig(config);
625
484
  this.closeGridConfig();
626
- this.dataExporterProviderStore();
627
485
  });
628
486
  evt.stopPropagation();
629
487
  }
630
- async dataExporterProviderStore() {
631
- if (this.dataUnit == undefined) {
632
- return;
633
- }
634
- if (this._grid == undefined) {
635
- return;
636
- }
637
- const dataExporterProvider = new ClientSideExporterProvider(this.dataUnit, this._grid);
638
- store.set("exporterProviders", Object.assign(Object.assign({}, store.get("exporterProviders")), { [this.getDataExporterStoreKey()]: dataExporterProvider }));
639
- }
640
- getDataExporterStoreKey() {
641
- return `SnkSimpleCrudDataExporter:${this.configName == undefined ? this.dataUnit.name : this.configName}`;
642
- }
643
488
  setGridConfig(config) {
644
489
  this.gridConfig = config;
645
490
  CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
@@ -655,15 +500,6 @@ export class SnkSimpleCrud {
655
500
  closeFormConfig() {
656
501
  this._showFormConfig = false;
657
502
  }
658
- getPageSize() {
659
- if (this.mode === SIMPLE_CRUD_MODE.IN_MEMORY) {
660
- return 0;
661
- }
662
- if (this.pageSize == undefined) {
663
- return 150;
664
- }
665
- return this.pageSize;
666
- }
667
503
  //No momento não daremos suporte para configuração de formulário quando houver formLegacyConfigName
668
504
  handleShowFormConfig() {
669
505
  return this._showFormConfig && !this.formLegacyConfigName;
@@ -679,23 +515,15 @@ export class SnkSimpleCrud {
679
515
  }
680
516
  return configFromManager;
681
517
  }
682
- updateFormConfig() {
683
- const newConfig = Object.assign(Object.assign({}, this.formConfig), { fields: this.dataUnit.metadata.fields });
684
- this.setFormConfig(newConfig, true);
685
- if (this._formConfigManager == undefined) {
686
- this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
687
- }
688
- this._formConfigManager.setConfig(this.formConfig);
689
- }
690
518
  /* istanbul ignore next */
691
519
  render() {
692
520
  var _a;
693
521
  if (this.dataUnit == undefined) {
694
522
  return;
695
523
  }
696
- return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this) }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
524
+ return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
697
525
  ? undefined
698
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, 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.resolveResourceID() }))));
526
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, 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.resolveResourceID() }))));
699
527
  }
700
528
  static get is() { return "snk-simple-crud"; }
701
529
  static get encapsulation() { return "scoped"; }
@@ -751,23 +579,6 @@ export class SnkSimpleCrud {
751
579
  "text": ""
752
580
  }
753
581
  },
754
- "entityName": {
755
- "type": "string",
756
- "mutable": false,
757
- "complexType": {
758
- "original": "string",
759
- "resolved": "string",
760
- "references": {}
761
- },
762
- "required": false,
763
- "optional": false,
764
- "docs": {
765
- "tags": [],
766
- "text": "Define o nome da entidade que o componente vai utilizar para fazer as opera\u00E7\u00F5es de CRUD"
767
- },
768
- "attribute": "entity-name",
769
- "reflect": false
770
- },
771
582
  "mode": {
772
583
  "type": "number",
773
584
  "mutable": false,
@@ -866,24 +677,6 @@ export class SnkSimpleCrud {
866
677
  "reflect": false,
867
678
  "defaultValue": "true"
868
679
  },
869
- "pageSize": {
870
- "type": "number",
871
- "mutable": false,
872
- "complexType": {
873
- "original": "number",
874
- "resolved": "number",
875
- "references": {}
876
- },
877
- "required": false,
878
- "optional": false,
879
- "docs": {
880
- "tags": [],
881
- "text": "Determina quantas linhas s\u00E3o retornadas por p\u00E1gina."
882
- },
883
- "attribute": "page-size",
884
- "reflect": false,
885
- "defaultValue": "150"
886
- },
887
680
  "resourceID": {
888
681
  "type": "string",
889
682
  "mutable": false,
@@ -1067,41 +860,6 @@ export class SnkSimpleCrud {
1067
860
  "attribute": "ignore-read-only-form-fields",
1068
861
  "reflect": false,
1069
862
  "defaultValue": "false"
1070
- },
1071
- "autoFocus": {
1072
- "type": "boolean",
1073
- "mutable": false,
1074
- "complexType": {
1075
- "original": "boolean",
1076
- "resolved": "boolean",
1077
- "references": {}
1078
- },
1079
- "required": false,
1080
- "optional": true,
1081
- "docs": {
1082
- "tags": [],
1083
- "text": "Define se a grid ser\u00E1 focada ao ser carregada."
1084
- },
1085
- "attribute": "auto-focus",
1086
- "reflect": false,
1087
- "defaultValue": "true"
1088
- },
1089
- "autoLoad": {
1090
- "type": "boolean",
1091
- "mutable": false,
1092
- "complexType": {
1093
- "original": "boolean",
1094
- "resolved": "boolean",
1095
- "references": {}
1096
- },
1097
- "required": false,
1098
- "optional": true,
1099
- "docs": {
1100
- "tags": [],
1101
- "text": "Define se a carga dos dados ser\u00E1 feita assim que o componente for carregado."
1102
- },
1103
- "attribute": "auto-load",
1104
- "reflect": false
1105
863
  }
1106
864
  };
1107
865
  }
@@ -1113,8 +871,7 @@ export class SnkSimpleCrud {
1113
871
  "_config": {},
1114
872
  "_fieldToGetFocus": {},
1115
873
  "_customContainerId": {},
1116
- "_formFields": {},
1117
- "_fieldsProps": {}
874
+ "_formFields": {}
1118
875
  };
1119
876
  }
1120
877
  static get events() {
@@ -1229,128 +986,6 @@ export class SnkSimpleCrud {
1229
986
  }
1230
987
  static get methods() {
1231
988
  return {
1232
- "addCustomEditor": {
1233
- "complexType": {
1234
- "signature": "(fieldName: string, customEditor: ICustomEditor) => Promise<void>",
1235
- "parameters": [{
1236
- "tags": [],
1237
- "text": ""
1238
- }, {
1239
- "tags": [],
1240
- "text": ""
1241
- }],
1242
- "references": {
1243
- "Promise": {
1244
- "location": "global"
1245
- },
1246
- "ICustomEditor": {
1247
- "location": "import",
1248
- "path": "@sankhyalabs/ezui/dist/types/utils"
1249
- }
1250
- },
1251
- "return": "Promise<void>"
1252
- },
1253
- "docs": {
1254
- "text": "Registra um editor customizado para campos da grade e formul\u00E1rio.",
1255
- "tags": []
1256
- }
1257
- },
1258
- "addGridCustomRender": {
1259
- "complexType": {
1260
- "signature": "(fieldName: string, customRender: ICustomRender) => Promise<void>",
1261
- "parameters": [{
1262
- "tags": [],
1263
- "text": ""
1264
- }, {
1265
- "tags": [],
1266
- "text": ""
1267
- }],
1268
- "references": {
1269
- "Promise": {
1270
- "location": "global"
1271
- },
1272
- "ICustomRender": {
1273
- "location": "import",
1274
- "path": "@sankhyalabs/ezui/dist/types/utils"
1275
- }
1276
- },
1277
- "return": "Promise<void>"
1278
- },
1279
- "docs": {
1280
- "text": "Registra um render customizado para colunas da grid.",
1281
- "tags": []
1282
- }
1283
- },
1284
- "addCustomValueFormatter": {
1285
- "complexType": {
1286
- "signature": "(columnName: string, customFormatter: ICustomFormatter) => Promise<void>",
1287
- "parameters": [{
1288
- "tags": [],
1289
- "text": ""
1290
- }, {
1291
- "tags": [],
1292
- "text": ""
1293
- }],
1294
- "references": {
1295
- "Promise": {
1296
- "location": "global"
1297
- },
1298
- "ICustomFormatter": {
1299
- "location": "import",
1300
- "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/interfaces"
1301
- }
1302
- },
1303
- "return": "Promise<void>"
1304
- },
1305
- "docs": {
1306
- "text": "Registra um formatador de valores para uma coluna da grid.",
1307
- "tags": []
1308
- }
1309
- },
1310
- "removeCustomValueFormatter": {
1311
- "complexType": {
1312
- "signature": "(columnName: string) => Promise<void>",
1313
- "parameters": [{
1314
- "tags": [],
1315
- "text": ""
1316
- }],
1317
- "references": {
1318
- "Promise": {
1319
- "location": "global"
1320
- }
1321
- },
1322
- "return": "Promise<void>"
1323
- },
1324
- "docs": {
1325
- "text": "Remove o formatador de valores de uma coluna da grid.",
1326
- "tags": []
1327
- }
1328
- },
1329
- "setFieldProp": {
1330
- "complexType": {
1331
- "signature": "(fieldName: string, propName: string, value: any) => Promise<void>",
1332
- "parameters": [{
1333
- "tags": [],
1334
- "text": ""
1335
- }, {
1336
- "tags": [],
1337
- "text": ""
1338
- }, {
1339
- "tags": [],
1340
- "text": ""
1341
- }],
1342
- "references": {
1343
- "Promise": {
1344
- "location": "global"
1345
- }
1346
- },
1347
- "return": "Promise<void>"
1348
- },
1349
- "docs": {
1350
- "text": "Altera/adiciona uma propriedade nos metadados do campo.",
1351
- "tags": []
1352
- }
1353
- },
1354
989
  "goToView": {
1355
990
  "complexType": {
1356
991
  "signature": "(view: VIEW_MODE) => Promise<void>",
@@ -1501,9 +1136,6 @@ export class SnkSimpleCrud {
1501
1136
  return [{
1502
1137
  "propName": "resourceID",
1503
1138
  "methodName": "handleResourceIDChanged"
1504
- }, {
1505
- "propName": "entityName",
1506
- "methodName": "onChangeEntityName"
1507
1139
  }, {
1508
1140
  "propName": "mode",
1509
1141
  "methodName": "onModeChange"
@@ -47,7 +47,7 @@ export const buildCustomButton = (def, className, dataElementId, action, isEnabl
47
47
  return textButton(def.name, className, dataElementId, text, hint, action, isEnabled);
48
48
  }
49
49
  };
50
- export const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions, dataExporterStoreKey, presentationMode) => {
50
+ export const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions, configName, presentationMode) => {
51
51
  var _a;
52
52
  const title = getTitle(element);
53
53
  switch (element) {
@@ -90,7 +90,7 @@ export const buildElem = (element, className, dataElementId, getTitle, action, i
90
90
  case TaskbarElement.DIVIDER:
91
91
  return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin--none ez-margin-left--medium", "data-taskbar-divider": true });
92
92
  case TaskbarElement.DATA_EXPORTER:
93
- const provider = (_a = store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[dataExporterStoreKey];
93
+ const provider = (_a = store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
94
94
  return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element });
95
95
  case TaskbarElement.ATTACH:
96
96
  return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
@@ -184,9 +184,8 @@ export class SnkTaskbar {
184
184
  className += "ez-padding-left--medium";
185
185
  }
186
186
  const taskbarElement = TaskbarElement[def.toString()];
187
- const dataExporterStoreKey = this._element.dataset.exporterStoreKey || this.configName;
188
187
  if (taskbarElement) {
189
- return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.buildDynamicActionsList(), dataExporterStoreKey, this.presentationMode);
188
+ return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.buildDynamicActionsList(), this.configName, this.presentationMode);
190
189
  }
191
190
  else {
192
191
  return buildCustomButton(def, className, this.getIdElemBtnCustom(def), elem => this.elementClick(elem), elem => this.isEnabled(elem));
@@ -9,11 +9,8 @@ export var DataExporterOption;
9
9
  DataExporterOption["EXPORT_TO_PDF"] = "exportToPDF";
10
10
  DataExporterOption["EXPORT_TO_XLS"] = "exportToXLS";
11
11
  DataExporterOption["EXPORT_CURRENT_PAGE"] = "exportCurrentPage";
12
- DataExporterOption["EXPORT_ALL_RECORDS"] = "exportAllRecords";
13
12
  DataExporterOption["EXPORT_PAGE_TO_PDF"] = "exportPageToPDF";
14
13
  DataExporterOption["EXPORT_PAGE_TO_XLS"] = "exportPageToXLS";
15
- DataExporterOption["EXPORT_ALL_RECORDS_TO_PDF"] = "exportAllRecordsToPDF";
16
- DataExporterOption["EXPORT_ALL_RECORDS_TO_XLS"] = "exportAllRecordsToXLS";
17
14
  DataExporterOption["EXPORT_BY_EMAIL"] = "exportToEmail";
18
15
  DataExporterOption["EXPORT_PDF_TO_EMAIL"] = "exportPDFToEmail";
19
16
  DataExporterOption["EXPORT_XLS_TO_EMAIL"] = "exportXLSToEmail";
@@ -30,8 +27,6 @@ export var DataExporterType;
30
27
  DataExporterType["EXPORT_TO_XLS"] = "XLS";
31
28
  DataExporterType["EXPORT_PAGE_TO_PDF"] = "PDF";
32
29
  DataExporterType["EXPORT_PAGE_TO_XLS"] = "XLS";
33
- DataExporterType["EXPORT_ALL_RECORDS_TO_PDF"] = "PDF";
34
- DataExporterType["EXPORT_ALL_RECORDS_TO_XLS"] = "XLS";
35
30
  DataExporterType["EXPORT_PDF_TO_EMAIL"] = "PDF";
36
31
  DataExporterType["EXPORT_XLS_TO_EMAIL"] = "XLS";
37
32
  })(DataExporterType || (DataExporterType = {}));