@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
@@ -1,25 +1,23 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { UserInterface, StringUtils, ApplicationContext, ObjectUtils, DataType, JSUtils, FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
2
+ import { StringUtils, ApplicationContext, ObjectUtils, DataType, UserInterface, JSUtils, FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { CSSVarsUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
4
  import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants.js';
5
5
  import { T as TaskbarElement, d as defineCustomElement$2 } from './snk-taskbar2.js';
6
6
  import './DataFetcher.js';
7
- import './pesquisa-fetcher.js';
8
- import { C as CommonsExporter, S as SnkMultiSelectionListDataSource, T as TaskbarProcessor, R as RmPrecisionCustomValueFormatter, b as buildFieldSearch, o as openFieldSearch, a as CrudUtils } from './IExporterProvider.js';
9
- import { D as DataExporterOption, P as PresentationMode } from './ISave.js';
7
+ import { I as InMemoryLoader } from './dataunit-fetcher.js';
8
+ import { S as SnkMultiSelectionListDataSource, T as TaskbarProcessor, b as buildFieldSearch, o as openFieldSearch, C as CrudUtils } from './field-search.js';
9
+ import { P as PresentationMode } from './index2.js';
10
+ import { d as defineCustomElement$d } from './snk-actions-button2.js';
10
11
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
11
12
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
12
- import { I as InMemoryLoader } from './dataunit-fetcher.js';
13
13
  import './filter-item-type.enum.js';
14
14
  import { F as FormConfigFetcher } from './form-config-fetcher.js';
15
15
  import { C as ConfigStorage } from './ConfigStorage.js';
16
16
  import { S as SnkFormConfigManager } from './SnkFormConfigManager.js';
17
- import { g as getSelectedIDs, d as defineCustomElement$9 } from './snk-data-unit2.js';
18
- import { s as store } from './index2.js';
19
- import { d as defineCustomElement$d } from './snk-actions-button2.js';
20
17
  import { d as defineCustomElement$c } from './snk-config-options2.js';
21
18
  import { d as defineCustomElement$b } from './snk-configurator2.js';
22
19
  import { d as defineCustomElement$a } from './snk-data-exporter2.js';
20
+ import { d as defineCustomElement$9 } from './snk-data-unit2.js';
23
21
  import { d as defineCustomElement$8 } from './snk-exporter-email-sender2.js';
24
22
  import { d as defineCustomElement$7 } from './snk-field-config2.js';
25
23
  import { d as defineCustomElement$6 } from './snk-form-config2.js';
@@ -31,61 +29,6 @@ import { d as defineCustomElement$1 } from './taskbar-actions-button2.js';
31
29
  const REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
32
30
  const REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
33
31
 
34
- class ClientSideExporterProvider extends CommonsExporter {
35
- getSelectedNumber() {
36
- return this.dataUnit.getSelectionInfo().length;
37
- }
38
- getTotalRecords() {
39
- var _a, _b, _c;
40
- const { total } = ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo()) || {};
41
- 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;
42
- }
43
- getSelectedIDs() {
44
- return getSelectedIDs(this.dataUnit);
45
- }
46
- getRecordID() {
47
- var _a, _b, _c;
48
- 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__;
49
- }
50
- async getRecords() {
51
- if (this.dataUnit.records.length === 0) {
52
- return Promise.resolve([]);
53
- }
54
- const selectionInfo = this.dataUnit.getSelectionInfo();
55
- const records = selectionInfo.isEmpty() || selectionInfo.isAllRecords() ? await selectionInfo.getAllRecords() : selectionInfo.records;
56
- return Promise.resolve(records == undefined ? [] : records);
57
- }
58
- getHiddenOptions() {
59
- return [
60
- DataExporterOption.EXPORT_BY_EMAIL,
61
- DataExporterOption.EXPORT_PDF_TO_EMAIL,
62
- DataExporterOption.EXPORT_XLS_TO_EMAIL,
63
- DataExporterOption.EXPORT_PAGE_TO_PDF,
64
- DataExporterOption.EXPORT_PAGE_TO_XLS
65
- ];
66
- }
67
- formatValue(record, column) {
68
- const { id, descriptionFrom } = column;
69
- const value = record[descriptionFrom || id];
70
- if (value == undefined) {
71
- return "";
72
- }
73
- if (descriptionFrom != undefined) {
74
- return value.label;
75
- }
76
- const fieldDescriptor = this.dataUnit.getField(id);
77
- if (fieldDescriptor.userInterface === UserInterface.SEARCH) {
78
- return value.value;
79
- }
80
- if (column.customFormatter) {
81
- const ezGridColumn = this.getColumnsState().find(columnState => column.id === columnState.name);
82
- const formattedValue = column.customFormatter.format(value, ezGridColumn, record.__record__id__);
83
- return formattedValue;
84
- }
85
- return this.dataUnit.getFormattedValue(id, value);
86
- }
87
- }
88
-
89
32
  const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%;--snk-simple-crud-grid--min-height:300px}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:auto 1fr;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}.simple-crud__form--hidden.sc-snk-simple-crud{display:none}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;--ez-grid--min-height:var(--snk-simple-crud-grid--min-height)}ez-form.sc-snk-simple-crud{min-height:300px}";
90
33
 
91
34
  const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
@@ -101,13 +44,11 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
101
44
  this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
102
45
  this._keyDownHandler = (event) => this.keyDownListener(event);
103
46
  this._formConfigFetcher = new FormConfigFetcher();
104
- this._customEditors = new Map();
105
- this._customRenders = new Map();
106
47
  this._taskbarProcessor = new TaskbarProcessor({
107
- "snkSimpleCrudTaskbar.form_regular": this.getButtons(false, [TaskbarElement.GRID_MODE]),
108
- "snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, [TaskbarElement.DATA_EXPORTER, TaskbarElement.FORM_MODE]),
109
- "snkSimpleCrudTaskbar.form_selected": this.getButtons(true, [TaskbarElement.GRID_MODE]),
110
- "snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, [TaskbarElement.DATA_EXPORTER, TaskbarElement.FORM_MODE]),
48
+ "snkSimpleCrudTaskbar.form_regular": this.getButtons(false, TaskbarElement.GRID_MODE),
49
+ "snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, TaskbarElement.FORM_MODE),
50
+ "snkSimpleCrudTaskbar.form_selected": this.getButtons(true, TaskbarElement.GRID_MODE),
51
+ "snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, TaskbarElement.FORM_MODE),
111
52
  "snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
112
53
  });
113
54
  this._showPopUpGridConfig = false;
@@ -118,15 +59,12 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
118
59
  this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
119
60
  this.dataState = undefined;
120
61
  this.dataUnit = undefined;
121
- this.entityName = undefined;
122
62
  this.mode = SIMPLE_CRUD_MODE.SERVER;
123
63
  this.gridConfig = undefined;
124
64
  this.formConfig = undefined;
125
65
  this._formFields = [];
126
- this._fieldsProps = new Map();
127
66
  this.multipleSelection = undefined;
128
67
  this.useCancelConfirm = true;
129
- this.pageSize = 150;
130
68
  this.resourceID = undefined;
131
69
  this.taskbarManager = undefined;
132
70
  this.messagesBuilder = undefined;
@@ -137,33 +75,6 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
137
75
  this.gridLegacyConfigName = undefined;
138
76
  this.formLegacyConfigName = undefined;
139
77
  this.ignoreReadOnlyFormFields = false;
140
- this.autoFocus = true;
141
- this.autoLoad = undefined;
142
- }
143
- /**
144
- * Registra um editor customizado para campos da grade e formulário.
145
- */
146
- async addCustomEditor(fieldName, customEditor) {
147
- if (this._grid && this._form) {
148
- this._grid.addCustomEditor(fieldName, customEditor);
149
- this._form.addCustomEditor(fieldName, customEditor);
150
- return;
151
- }
152
- const newCustomEditors = new Map(this._customEditors);
153
- newCustomEditors.set(fieldName, customEditor);
154
- this._customEditors = newCustomEditors;
155
- }
156
- /**
157
- * Registra um render customizado para colunas da grid.
158
- */
159
- async addGridCustomRender(fieldName, customRender) {
160
- if (this._grid) {
161
- this._grid.addGridCustomRender(fieldName, customRender);
162
- return;
163
- }
164
- const newCustomRenders = new Map(this._customRenders);
165
- newCustomRenders.set(fieldName, customRender);
166
- this._customRenders = newCustomRenders;
167
78
  }
168
79
  handleResourceIDChanged(newValue, oldValue) {
169
80
  if (StringUtils.isEmpty(newValue)) {
@@ -175,30 +86,9 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
175
86
  this.loadFormConfig(true);
176
87
  this.loadGridConfig(true);
177
88
  }
178
- /**
179
- * Registra um formatador de valores para uma coluna da grid.
180
- */
181
- async addCustomValueFormatter(columnName, customFormatter) {
182
- this._grid.addCustomValueFormatter(columnName, customFormatter);
183
- }
184
- /**
185
- * Remove o formatador de valores de uma coluna da grid.
186
- */
187
- async removeCustomValueFormatter(columnName) {
188
- this._grid.removeCustomValueFormatter(columnName);
189
- }
190
- /**
191
- * Altera/adiciona uma propriedade nos metadados do campo.
192
- */
193
- async setFieldProp(fieldName, propName, value) {
194
- const newCustomFieldProps = new Map(this._fieldsProps);
195
- const currentProps = this._fieldsProps.get(fieldName);
196
- newCustomFieldProps.set(fieldName, Object.assign(Object.assign({}, currentProps), { [propName]: value }));
197
- this._fieldsProps = newCustomFieldProps;
198
- }
199
- getButtons(selected, extraButtons) {
89
+ getButtons(selected, changeModeBtn) {
200
90
  return this.addConfigButton(this.resolveInMemoryBtns(selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS)
201
- .concat(extraButtons));
91
+ .concat(changeModeBtn));
202
92
  }
203
93
  addConfigButton(buttons) {
204
94
  if (this.configName === undefined) {
@@ -238,19 +128,15 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
238
128
  }
239
129
  evt.stopPropagation();
240
130
  }
241
- async onChangeEntityName(newValue) {
242
- if (this.dataUnit)
243
- return;
244
- const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
245
- this.dataUnit = await application.getDataUnit(newValue, null, null, this.configName);
246
- }
247
131
  onModeChange() {
248
132
  if (this.mode == SIMPLE_CRUD_MODE.IN_MEMORY) {
249
133
  this.initInMemoryDataUnit();
250
134
  }
251
135
  }
252
136
  observeDataState(newValue, oldValue) {
253
- this.handleDataStateChange(newValue, oldValue);
137
+ if (ObjectUtils.objectToString(oldValue) != ObjectUtils.objectToString(newValue)) {
138
+ this.dataStateChange.emit(newValue);
139
+ }
254
140
  }
255
141
  async observeFormLegacy(newValue, oldValue) {
256
142
  await this.handleUpdateFormLegacyConfig(newValue, oldValue);
@@ -258,28 +144,6 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
258
144
  async observeGridLegacy(newValue, oldValue) {
259
145
  await this.handleUpdateGridLegacyConfig(newValue, oldValue);
260
146
  }
261
- async handleDataStateChange(newValue, oldValue) {
262
- if (ObjectUtils.objectToString(oldValue) != ObjectUtils.objectToString(newValue)) {
263
- this.dataStateChange.emit(newValue);
264
- }
265
- await this.processRmPrecision();
266
- }
267
- async processRmPrecision() {
268
- var _a, _b;
269
- const fieldsWithRmPrecision = await this._snkDataUnit.getFieldsWithRmPrecision();
270
- for (const field of fieldsWithRmPrecision || []) {
271
- if (!field) {
272
- continue;
273
- }
274
- 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);
275
- if (!rmPrecision && rmPrecision !== 0) {
276
- continue;
277
- }
278
- await this.setFieldProp(field, 'precision', rmPrecision);
279
- await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
280
- }
281
- this._rmPrecisionCustomValueFormatter.setDataState(this.dataState);
282
- }
283
147
  async handleUpdateGridLegacyConfig(newValue, oldValue) {
284
148
  if (newValue == undefined || newValue == oldValue) {
285
149
  return;
@@ -376,7 +240,6 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
376
240
  }
377
241
  async componentWillRender() {
378
242
  this._resourceID = await this.application.getResourceID();
379
- this.dataExporterProviderStore();
380
243
  this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
381
244
  if (this.configName === undefined) {
382
245
  return;
@@ -388,70 +251,32 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
388
251
  this.loadGridConfig();
389
252
  this.loadFormConfig();
390
253
  }
391
- componentDidRender() {
392
- this._rmPrecisionCustomValueFormatter.setGrid(this._grid);
393
- this.addGridCustomValueFormattters();
394
- this.setFieldsProps();
395
- this.setCustomRenders();
396
- this.setCustomEditors();
397
- }
398
254
  componentWillLoad() {
399
255
  this.processMetadata();
400
256
  this.onModeChange();
401
257
  this.configDatasource();
402
- this._rmPrecisionCustomValueFormatter = new RmPrecisionCustomValueFormatter();
403
258
  }
404
259
  componentDidLoad() {
405
260
  CSSVarsUtils.applyVarsGrid(this._element, this._grid);
406
261
  }
407
- setCustomRenders() {
408
- if (!this._grid) {
409
- return;
410
- }
411
- for (const [fieldName, customRender] of this._customRenders) {
412
- this._grid.addGridCustomRender(fieldName, customRender);
413
- this._customRenders.delete(fieldName);
414
- }
415
- }
416
- setCustomEditors() {
417
- if (!this._grid || !this._form) {
418
- return;
419
- }
420
- for (const [fieldName, customEditor] of this._customEditors) {
421
- this._grid.addCustomEditor(fieldName, customEditor);
422
- this._form.addCustomEditor(fieldName, customEditor);
423
- this._customEditors.delete(fieldName);
424
- }
425
- }
426
262
  configDatasource() {
427
263
  this._multiSelectionListDataSource.setApplication(this.application);
428
264
  this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
429
265
  }
430
- setFieldsProps() {
431
- if (!this._form) {
432
- return;
433
- }
434
- for (const [fieldName, props] of this._fieldsProps) {
435
- for (const prop in props) {
436
- this._form.setFieldProp(fieldName, prop, props[prop]);
437
- }
438
- this._fieldsProps.delete(fieldName);
439
- }
440
- }
441
266
  getTaskBarId() {
442
- var _a, _b;
267
+ var _a, _b, _c;
443
268
  if ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
444
269
  return "snkSimpleCrudTaskbar.finish_edition";
445
270
  }
446
271
  if (((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.selectionInfo) &&
447
272
  !this.dataState.selectionInfo.isAllRecords() &&
448
- this.dataState.selectionInfo.length > 0) {
273
+ ((_c = this.dataState.selectionInfo.records) === null || _c === void 0 ? void 0 : _c.length) > 0) {
449
274
  return this._currentViewMode === VIEW_MODE.GRID ? "snkSimpleCrudTaskbar.grid_selected" : "snkSimpleCrudTaskbar.form_selected";
450
275
  }
451
276
  return this._currentViewMode === VIEW_MODE.GRID ? "snkSimpleCrudTaskbar.grid_regular" : "snkSimpleCrudTaskbar.form_regular";
452
277
  }
453
278
  initInMemoryDataUnit() {
454
- this._inMemoryLoader = new InMemoryLoader(this._metadata, undefined, { autoLoad: this.autoLoad });
279
+ this._inMemoryLoader = new InMemoryLoader(this._metadata);
455
280
  this.dataUnit = this._inMemoryLoader.dataUnit;
456
281
  this.dataUnitReady.emit(this.dataUnit);
457
282
  }
@@ -490,11 +315,12 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
490
315
  var _a;
491
316
  (_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close();
492
317
  }
493
- async updateConfig() {
318
+ updateConfig() {
494
319
  if (this._formConfigManager == undefined) {
495
320
  this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
496
321
  }
497
322
  this._formConfigManager.setConfig(this.formConfig);
323
+ return;
498
324
  }
499
325
  processMetadata() {
500
326
  const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
@@ -526,28 +352,11 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
526
352
  };
527
353
  }
528
354
  }
529
- addGridCustomValueFormattters() {
530
- var _a, _b, _c;
531
- 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);
532
- if (!metadataFields) {
533
- return;
534
- }
535
- const fieldsWithRmPrecision = [];
536
- metadataFields.forEach((field) => {
537
- var _a;
538
- if (((_a = field.properties) === null || _a === void 0 ? void 0 : _a.rm_precision) && !fieldsWithRmPrecision.includes(field.name)) {
539
- fieldsWithRmPrecision.push(field.name);
540
- }
541
- });
542
- fieldsWithRmPrecision.forEach(field => {
543
- this.addCustomValueFormatter(field, this._rmPrecisionCustomValueFormatter);
544
- });
545
- }
546
355
  onDataStateChange(evt) {
547
356
  this.dataState = Object.assign({}, evt.detail);
548
357
  }
549
358
  getTaskBarDisabledButtons() {
550
- var _a, _b, _c, _d, _e, _f;
359
+ var _a, _b, _c, _d;
551
360
  const disabledButtons = [];
552
361
  if (!((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.hasNext)) {
553
362
  disabledButtons.push(TaskbarElement.NEXT);
@@ -558,9 +367,6 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
558
367
  if ((_d = (_c = this.dataState) === null || _c === void 0 ? void 0 : _c.selectionInfo) === null || _d === void 0 ? void 0 : _d.isEmpty()) {
559
368
  disabledButtons.push(TaskbarElement.FORM_MODE);
560
369
  }
561
- if (((_f = (_e = this.dataState) === null || _e === void 0 ? void 0 : _e.selectionInfo) === null || _f === void 0 ? void 0 : _f.length) > 1) {
562
- disabledButtons.push(TaskbarElement.CLONE);
563
- }
564
370
  return disabledButtons;
565
371
  }
566
372
  handleCancelEdit() {
@@ -704,23 +510,9 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
704
510
  .then(() => {
705
511
  this.setGridConfig(config);
706
512
  this.closeGridConfig();
707
- this.dataExporterProviderStore();
708
513
  });
709
514
  evt.stopPropagation();
710
515
  }
711
- async dataExporterProviderStore() {
712
- if (this.dataUnit == undefined) {
713
- return;
714
- }
715
- if (this._grid == undefined) {
716
- return;
717
- }
718
- const dataExporterProvider = new ClientSideExporterProvider(this.dataUnit, this._grid);
719
- store.set("exporterProviders", Object.assign(Object.assign({}, store.get("exporterProviders")), { [this.getDataExporterStoreKey()]: dataExporterProvider }));
720
- }
721
- getDataExporterStoreKey() {
722
- return `SnkSimpleCrudDataExporter:${this.configName == undefined ? this.dataUnit.name : this.configName}`;
723
- }
724
516
  setGridConfig(config) {
725
517
  this.gridConfig = config;
726
518
  CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
@@ -736,15 +528,6 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
736
528
  closeFormConfig() {
737
529
  this._showFormConfig = false;
738
530
  }
739
- getPageSize() {
740
- if (this.mode === SIMPLE_CRUD_MODE.IN_MEMORY) {
741
- return 0;
742
- }
743
- if (this.pageSize == undefined) {
744
- return 150;
745
- }
746
- return this.pageSize;
747
- }
748
531
  //No momento não daremos suporte para configuração de formulário quando houver formLegacyConfigName
749
532
  handleShowFormConfig() {
750
533
  return this._showFormConfig && !this.formLegacyConfigName;
@@ -760,28 +543,19 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
760
543
  }
761
544
  return configFromManager;
762
545
  }
763
- updateFormConfig() {
764
- const newConfig = Object.assign(Object.assign({}, this.formConfig), { fields: this.dataUnit.metadata.fields });
765
- this.setFormConfig(newConfig, true);
766
- if (this._formConfigManager == undefined) {
767
- this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
768
- }
769
- this._formConfigManager.setConfig(this.formConfig);
770
- }
771
546
  /* istanbul ignore next */
772
547
  render() {
773
548
  var _a;
774
549
  if (this.dataUnit == undefined) {
775
550
  return;
776
551
  }
777
- 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)
552
+ 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)
778
553
  ? undefined
779
- : 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() }))));
554
+ : 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() }))));
780
555
  }
781
556
  get _element() { return this; }
782
557
  static get watchers() { return {
783
558
  "resourceID": ["handleResourceIDChanged"],
784
- "entityName": ["onChangeEntityName"],
785
559
  "mode": ["onModeChange"],
786
560
  "dataState": ["observeDataState"],
787
561
  "formLegacyConfigName": ["observeFormLegacy"],
@@ -791,13 +565,11 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
791
565
  }, [6, "snk-simple-crud", {
792
566
  "dataState": [16],
793
567
  "dataUnit": [16],
794
- "entityName": [1, "entity-name"],
795
568
  "mode": [2],
796
569
  "gridConfig": [1040],
797
570
  "formConfig": [1040],
798
571
  "multipleSelection": [4, "multiple-selection"],
799
572
  "useCancelConfirm": [4, "use-cancel-confirm"],
800
- "pageSize": [2, "page-size"],
801
573
  "resourceID": [1, "resource-i-d"],
802
574
  "taskbarManager": [16],
803
575
  "messagesBuilder": [1040],
@@ -808,8 +580,6 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
808
580
  "gridLegacyConfigName": [1, "grid-legacy-config-name"],
809
581
  "formLegacyConfigName": [1, "form-legacy-config-name"],
810
582
  "ignoreReadOnlyFormFields": [4, "ignore-read-only-form-fields"],
811
- "autoFocus": [4, "auto-focus"],
812
- "autoLoad": [4, "auto-load"],
813
583
  "_showPopUpGridConfig": [32],
814
584
  "_showFormConfig": [32],
815
585
  "_currentViewMode": [32],
@@ -817,12 +587,6 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
817
587
  "_fieldToGetFocus": [32],
818
588
  "_customContainerId": [32],
819
589
  "_formFields": [32],
820
- "_fieldsProps": [32],
821
- "addCustomEditor": [64],
822
- "addGridCustomRender": [64],
823
- "addCustomValueFormatter": [64],
824
- "removeCustomValueFormatter": [64],
825
- "setFieldProp": [64],
826
590
  "goToView": [64],
827
591
  "setMetadata": [64],
828
592
  "setRecords": [64],
@@ -1,8 +1,8 @@
1
1
  import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
2
2
  import { Action, StringUtils, ApplicationContext, OVERFLOWED_CLASS_NAME, OverflowWatcher, OverflowDirection, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { A as AuthorizationConfig } from './AuthorizationConfig.js';
4
- import { P as PresentationMode } from './ISave.js';
5
- import { s as store } from './index2.js';
4
+ import { P as PresentationMode } from './index2.js';
5
+ import { s as store } from './index3.js';
6
6
  import { d as defineCustomElement$4 } from './snk-actions-button2.js';
7
7
  import { d as defineCustomElement$3 } from './snk-data-exporter2.js';
8
8
  import { d as defineCustomElement$2 } from './snk-exporter-email-sender2.js';
@@ -54,7 +54,7 @@ const buildCustomButton = (def, className, dataElementId, action, isEnabled) =>
54
54
  return textButton(def.name, className, dataElementId, text, hint, action, isEnabled);
55
55
  }
56
56
  };
57
- const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions, dataExporterStoreKey, presentationMode) => {
57
+ const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions, configName, presentationMode) => {
58
58
  var _a;
59
59
  const title = getTitle(element);
60
60
  switch (element) {
@@ -97,7 +97,7 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
97
97
  case TaskbarElement.DIVIDER:
98
98
  return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin--none ez-margin-left--medium", "data-taskbar-divider": true });
99
99
  case TaskbarElement.DATA_EXPORTER:
100
- const provider = (_a = store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[dataExporterStoreKey];
100
+ const provider = (_a = store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
101
101
  return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element });
102
102
  case TaskbarElement.ATTACH:
103
103
  return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
@@ -306,9 +306,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
306
306
  className += "ez-padding-left--medium";
307
307
  }
308
308
  const taskbarElement = TaskbarElement[def.toString()];
309
- const dataExporterStoreKey = this._element.dataset.exporterStoreKey || this.configName;
310
309
  if (taskbarElement) {
311
- return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.buildDynamicActionsList(), dataExporterStoreKey, this.presentationMode);
310
+ 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);
312
311
  }
313
312
  else {
314
313
  return buildCustomButton(def, className, this.getIdElemBtnCustom(def), elem => this.elementClick(elem), elem => this.isEnabled(elem));
@@ -1,7 +1,7 @@
1
- import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-30fb808f.js';
1
+ import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-e0382e5a.js';
2
2
  import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
3
3
  import { ObjectUtils } from '@sankhyalabs/core';
4
- import { d as dist, D as DataFetcher } from './DataFetcher-c1baf61d.js';
4
+ import { d as dist, D as DataFetcher } from './DataFetcher-773a3e4b.js';
5
5
 
6
6
  class GridConfigFetcher extends ResourceFetcher {
7
7
  constructor() {
@@ -1,4 +1,4 @@
1
- import { DataType, ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils } from '@sankhyalabs/core';
1
+ import { DataType, ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, ServiceCanceledException } from '@sankhyalabs/core';
2
2
  import { P as PrintUtils } from './PrintUtils-3e4ff0f5.js';
3
3
  import { DataUnitTransient } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
4
4
 
@@ -6883,9 +6883,14 @@ class DataFetcher {
6883
6883
  resolve(false);
6884
6884
  })
6885
6885
  ]).then((data) => {
6886
- var _a;
6886
+ var _a, _b;
6887
6887
  if (!hasClientEvent || data === false) {
6888
- (((_a = watingRequestsById.get(val.request.variables[val.index].queryID)) === null || _a === void 0 ? void 0 : _a.reject) || Promise.reject)(new ErrorException("Falha detectada", val.message));
6888
+ if (Object.keys(errorResponse[0].extensions).includes("SERVICE_CANCELED") || Object.keys(extensions).includes("isServiceCancelled")) {
6889
+ (((_a = watingRequestsById.get(val.request.variables[val.index].queryID)) === null || _a === void 0 ? void 0 : _a.reject) || Promise.reject)(new ServiceCanceledException("Service canceled", val.message));
6890
+ }
6891
+ else {
6892
+ (((_b = watingRequestsById.get(val.request.variables[val.index].queryID)) === null || _b === void 0 ? void 0 : _b.reject) || Promise.reject)(new ErrorException("Falha detectada", val.message));
6893
+ }
6889
6894
  }
6890
6895
  });
6891
6896
  });
@@ -1,6 +1,6 @@
1
- import { C as ConfigStorage } from './ConfigStorage-86187da3.js';
1
+ import { C as ConfigStorage } from './ConfigStorage-8c2ddac8.js';
2
2
  import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
3
- import { F as FormConfigFetcher } from './form-config-fetcher-30fb808f.js';
3
+ import { F as FormConfigFetcher } from './form-config-fetcher-e0382e5a.js';
4
4
 
5
5
  class SnkFormConfigManager {
6
6
  constructor(configName, resourceID, onConfigChange) {
@@ -72,14 +72,11 @@ class SnkFormConfigManager {
72
72
  var _a;
73
73
  const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
74
74
  if (fields != undefined && fields.length > 0) {
75
- return fields.map(({ label, name, readOnly, visible, required }) => {
75
+ return fields.map(({ label, name, readOnly }) => {
76
76
  if (label == undefined) {
77
- return Object.assign(Object.assign({}, dataUnit.getField(name)), { name,
78
- readOnly,
79
- visible,
80
- required });
77
+ return dataUnit.getField(name);
81
78
  }
82
- return { name, label, readOnly, visible, required };
79
+ return { name, label, readOnly };
83
80
  })
84
81
  .filter(field => this.isFieldVisible(field, descriptionFilter));
85
82
  }
@@ -29,7 +29,6 @@ const snkDataUnitMessages = {
29
29
  forbiddenRemove: "Não é possível remover. Verifique as permissões de acesso.",
30
30
  removeAllConfirmation: "Os <strong>{{size}} registros selecionados</strong> serão excluídos.<br/><br/><strong>Você realmente gostaria de continuar?</strong>",
31
31
  removeAllInfo: "Os {{size}} registros foram removidos com sucesso!",
32
- fieldNameRequired: "É necessário informar o nome da coluna."
33
32
  };
34
33
 
35
34
  const snkFilterBarMessages = {
@@ -122,7 +121,7 @@ const snkExporterMessages = {
122
121
  emailSenderOptStep_subtitle: "Primeiro, escolha o formato do arquivo",
123
122
  emailSenderOptStep_lblFormat: "Formato:",
124
123
  emailSenderOptStep_formatPDF: "PDF (.pdf)",
125
- emailSenderOptStep_formatXLSX: "Planilha (.xlsx)",
124
+ emailSenderOptStep_formatXLS: "Planilha (.xls)",
126
125
  emailSenderOptStep_export: "Exportar:",
127
126
  emailSenderOptStep_allData: "Toda a grade",
128
127
  emailSenderOptStep_currentPage: "Somente a página atual",
@@ -285,7 +284,6 @@ const snkDataExporterMessages = {
285
284
  },
286
285
  label: {
287
286
  currentPage: "Somente a página atual",
288
- allRecords: "Todos os registros",
289
287
  spreadsheet: "Planilha",
290
288
  cube: "Cubo",
291
289
  sendByEmail: "Enviar por email",
@@ -298,7 +296,6 @@ const snkDataExporterMessages = {
298
296
  },
299
297
  title: {
300
298
  error: "Erro",
301
- permission: "Falha detectada",
302
299
  },
303
300
  limitExceeded: {
304
301
  title: "Atenção",
@@ -555,7 +552,7 @@ class SnkMessageBuilder {
555
552
  this.loadAppMessages().then((msgs) => {
556
553
  this._appMessages = msgs;
557
554
  }, error => {
558
- console.info('O arquivo de mensagens personalizadas não foi encontrado no caminho /messages/appmessages', error);
555
+ console.info('O arquivo de mensagens personalizadas não foi encontrado no caminho /messages/appmessages.js', error);
559
556
  });
560
557
  }
561
558
  /**
@@ -647,10 +644,17 @@ class SnkMessageBuilder {
647
644
  return message;
648
645
  }
649
646
  }
650
- async loadAppMessages() {
651
- const messagesUrl = await this._application.getApplicationPath();
652
- const module = await import(/* webpackIgnore: true */ `${messagesUrl}/messages/appmessages.js`);
653
- return module.default;
647
+ loadAppMessages() {
648
+ return new Promise(async (accept, reject) => {
649
+ const messagesUrl = await this._application.getApplicationPath();
650
+ import(/* webpackIgnore: true */ `${messagesUrl}/messages/appmessages.js`)
651
+ .then(module => {
652
+ accept(module.default);
653
+ })
654
+ .catch(reason => {
655
+ reject(reason);
656
+ });
657
+ });
654
658
  }
655
659
  }
656
660
  var OperationMap;