@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-65214.0 → 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 (235) hide show
  1. package/dist/cjs/{ConfigStorage-e49214c6.js → ConfigStorage-0a690675.js} +0 -1
  2. package/dist/cjs/{SnkFormConfigManager-beebf47a.js → SnkFormConfigManager-d6d5db6d.js} +7 -8
  3. package/dist/cjs/{SnkMessageBuilder-cceebbae.js → SnkMessageBuilder-96b0f549.js} +13 -9
  4. package/dist/cjs/{IExporterProvider-10b7fed5.js → SnkMultiSelectionListDataSource-f79d220c.js} +4 -94
  5. package/dist/cjs/{index-1dfc7a6e.js → index-0922807b.js} +0 -5
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{dataunit-fetcher-d4873076.js → pesquisa-fetcher-cba1b3d0.js} +180 -87
  8. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  9. package/dist/cjs/snk-actions-button_4.cjs.entry.js +3 -5
  10. package/dist/cjs/snk-application.cjs.entry.js +12 -35
  11. package/dist/cjs/snk-attach.cjs.entry.js +46 -71
  12. package/dist/cjs/snk-crud.cjs.entry.js +10 -101
  13. package/dist/cjs/snk-data-exporter.cjs.entry.js +85 -315
  14. package/dist/cjs/snk-data-unit-559ac55c.js +462 -0
  15. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -12
  16. package/dist/cjs/snk-detail-view.cjs.entry.js +10 -50
  17. package/dist/cjs/snk-filter-bar.cjs.entry.js +12 -7
  18. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
  19. package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
  20. package/dist/cjs/snk-form-view.cjs.entry.js +0 -67
  21. package/dist/cjs/snk-form.cjs.entry.js +7 -52
  22. package/dist/cjs/snk-grid.cjs.entry.js +110 -167
  23. package/dist/cjs/{snk-guides-viewer-aafc3073.js → snk-guides-viewer-bfcad2d6.js} +10 -43
  24. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -9
  25. package/dist/cjs/snk-personalized-filter.cjs.entry.js +1 -1
  26. package/dist/cjs/snk-simple-crud.cjs.entry.js +40 -268
  27. package/dist/cjs/snk-taskbar.cjs.entry.js +3 -4
  28. package/dist/cjs/{taskbar-elements-9ad1f9c0.js → taskbar-elements-3ecd1278.js} +3 -3
  29. package/dist/collection/collection-manifest.json +1 -1
  30. package/dist/collection/components/snk-application/snk-application.js +11 -35
  31. package/dist/collection/components/snk-attach/snk-attach.js +44 -67
  32. package/dist/collection/components/snk-crud/snk-crud.js +7 -305
  33. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -136
  34. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +0 -161
  35. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +7 -134
  36. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -54
  37. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +52 -59
  38. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +0 -62
  39. package/dist/collection/components/snk-data-unit/snk-data-unit.js +219 -540
  40. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +11 -23
  41. package/dist/collection/components/snk-form/snk-form.js +5 -102
  42. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -7
  43. package/dist/collection/components/snk-form-config/snk-form-config.js +1 -1
  44. package/dist/collection/components/snk-grid/snk-grid.css +0 -2
  45. package/dist/collection/components/snk-grid/snk-grid.js +102 -241
  46. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +20 -406
  47. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +2 -2
  48. package/dist/collection/components/snk-taskbar/snk-taskbar.js +1 -2
  49. package/dist/collection/lib/@types/index.js +0 -5
  50. package/dist/collection/lib/configs/ConfigStorage.js +0 -1
  51. package/dist/collection/lib/dataUnit/InMemoryLoader.js +3 -7
  52. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +0 -3
  53. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +0 -4
  54. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +13 -11
  55. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +0 -1
  56. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +4 -53
  57. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +34 -0
  58. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -4
  59. package/dist/collection/lib/message/SnkMessageBuilder.js +12 -5
  60. package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +0 -2
  61. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -2
  62. package/dist/components/ConfigStorage.js +0 -1
  63. package/dist/components/SnkFormConfigManager.js +6 -7
  64. package/dist/components/SnkMessageBuilder.js +13 -9
  65. package/dist/components/dataunit-fetcher.js +182 -84
  66. package/dist/components/{IExporterProvider.js → field-search.js} +6 -93
  67. package/dist/components/index2.js +33 -198
  68. package/dist/components/index3.js +199 -0
  69. package/dist/components/snk-actions-button2.js +11 -4
  70. package/dist/components/snk-application2.js +9 -31
  71. package/dist/components/snk-attach2.js +41 -65
  72. package/dist/components/snk-crud.js +11 -110
  73. package/dist/components/snk-data-exporter2.js +85 -309
  74. package/dist/components/snk-data-unit2.js +217 -487
  75. package/dist/components/snk-detail-view2.js +14 -96
  76. package/dist/components/snk-expression-item2.js +1 -1
  77. package/dist/components/snk-filter-bar2.js +11 -7
  78. package/dist/components/snk-form-config2.js +1 -1
  79. package/dist/components/snk-form-view2.js +1 -72
  80. package/dist/components/snk-form.js +6 -53
  81. package/dist/components/snk-grid2.js +108 -170
  82. package/dist/components/snk-personalized-filter2.js +1 -1
  83. package/dist/components/snk-simple-crud2.js +25 -263
  84. package/dist/components/snk-taskbar2.js +5 -6
  85. package/dist/esm/{ConfigStorage-e476378d.js → ConfigStorage-8c2ddac8.js} +0 -1
  86. package/dist/esm/{SnkFormConfigManager-298cd647.js → SnkFormConfigManager-c01b9d9d.js} +7 -8
  87. package/dist/esm/{SnkMessageBuilder-ae87b754.js → SnkMessageBuilder-72423074.js} +13 -9
  88. package/dist/esm/{IExporterProvider-d597f27d.js → SnkMultiSelectionListDataSource-a4805051.js} +5 -93
  89. package/dist/esm/{index-3aa4977a.js → index-0ece87a6.js} +1 -6
  90. package/dist/esm/loader.js +1 -1
  91. package/dist/esm/{dataunit-fetcher-3d2ec959.js → pesquisa-fetcher-34a8b8be.js} +181 -83
  92. package/dist/esm/sankhyablocks.js +1 -1
  93. package/dist/esm/snk-actions-button_4.entry.js +3 -5
  94. package/dist/esm/snk-application.entry.js +11 -34
  95. package/dist/esm/snk-attach.entry.js +41 -66
  96. package/dist/esm/snk-crud.entry.js +10 -101
  97. package/dist/esm/snk-data-exporter.entry.js +86 -316
  98. package/dist/esm/snk-data-unit-44215df7.js +460 -0
  99. package/dist/esm/snk-data-unit.entry.js +2 -12
  100. package/dist/esm/snk-detail-view.entry.js +10 -50
  101. package/dist/esm/snk-filter-bar.entry.js +12 -7
  102. package/dist/esm/snk-filter-modal-item.entry.js +1 -1
  103. package/dist/esm/snk-form-config.entry.js +1 -1
  104. package/dist/esm/snk-form-view.entry.js +0 -67
  105. package/dist/esm/snk-form.entry.js +7 -52
  106. package/dist/esm/snk-grid.entry.js +108 -165
  107. package/dist/esm/{snk-guides-viewer-62124f3d.js → snk-guides-viewer-edeac29f.js} +10 -43
  108. package/dist/esm/snk-guides-viewer.entry.js +7 -9
  109. package/dist/esm/snk-personalized-filter.entry.js +1 -1
  110. package/dist/esm/snk-simple-crud.entry.js +28 -256
  111. package/dist/esm/snk-taskbar.entry.js +3 -4
  112. package/dist/esm/{taskbar-elements-d59867f1.js → taskbar-elements-2473c8ac.js} +3 -3
  113. package/dist/sankhyablocks/p-03dcc5ff.entry.js +1 -0
  114. package/dist/sankhyablocks/p-176c3491.entry.js +1 -0
  115. package/dist/sankhyablocks/p-37e5d563.js +65 -0
  116. package/dist/sankhyablocks/p-38289a55.js +1 -0
  117. package/dist/sankhyablocks/{p-9dfda04a.entry.js → p-41c2c191.entry.js} +1 -1
  118. package/dist/sankhyablocks/p-46e55a95.entry.js +1 -0
  119. package/dist/sankhyablocks/p-4e728357.entry.js +1 -0
  120. package/dist/sankhyablocks/p-5571bdfe.js +1 -0
  121. package/dist/sankhyablocks/p-5630574e.js +1 -0
  122. package/dist/sankhyablocks/p-5f8c0426.entry.js +1 -0
  123. package/dist/sankhyablocks/p-80c64add.entry.js +1 -0
  124. package/dist/sankhyablocks/p-86af4cc2.js +1 -0
  125. package/dist/sankhyablocks/p-8b690717.js +1 -0
  126. package/dist/sankhyablocks/{p-3287a6cc.js → p-96621231.js} +1 -1
  127. package/dist/sankhyablocks/p-a1832166.entry.js +1 -0
  128. package/dist/sankhyablocks/p-a809d944.entry.js +1 -0
  129. package/dist/sankhyablocks/p-a97226f6.entry.js +1 -0
  130. package/dist/sankhyablocks/p-add17f6a.entry.js +1 -0
  131. package/dist/sankhyablocks/{p-7e7a7473.js → p-ae4fc9a9.js} +1 -1
  132. package/dist/sankhyablocks/{p-bd008859.entry.js → p-c2ae0fab.entry.js} +1 -1
  133. package/dist/sankhyablocks/p-c5a9a5d9.entry.js +1 -0
  134. package/dist/sankhyablocks/p-c5aa7d70.entry.js +11 -0
  135. package/dist/sankhyablocks/p-cb0147ab.entry.js +1 -0
  136. package/dist/sankhyablocks/p-f0145e3b.js +1 -0
  137. package/dist/sankhyablocks/p-f03e4199.entry.js +1 -0
  138. package/dist/sankhyablocks/p-f607db63.entry.js +1 -0
  139. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  140. package/dist/types/components/snk-application/snk-application.d.ts +3 -7
  141. package/dist/types/components/snk-attach/snk-attach.d.ts +9 -11
  142. package/dist/types/components/snk-crud/snk-crud.d.ts +1 -45
  143. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +0 -23
  144. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +3 -28
  145. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +0 -24
  146. package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +4 -24
  147. package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +1 -4
  148. package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +0 -21
  149. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +3 -67
  150. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +1 -4
  151. package/dist/types/components/snk-form/snk-form.d.ts +0 -14
  152. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +2 -2
  153. package/dist/types/components/snk-grid/snk-grid.d.ts +6 -46
  154. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -62
  155. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
  156. package/dist/types/components.d.ts +4 -261
  157. package/dist/types/lib/@types/index.d.ts +0 -5
  158. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +1 -2
  159. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +1 -2
  160. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +0 -1
  161. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +0 -1
  162. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +0 -6
  163. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +3 -0
  164. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +0 -3
  165. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +1 -2
  166. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +0 -1
  167. package/package.json +1 -1
  168. package/dist/cjs/RecordIDUtils-3735135c.js +0 -43
  169. package/dist/cjs/pesquisa-fetcher-a1d0353f.js +0 -166
  170. package/dist/cjs/snk-data-unit-f0221097.js +0 -690
  171. package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js +0 -1
  172. package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js +0 -1
  173. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +0 -97
  174. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +0 -74
  175. package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +0 -1
  176. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +0 -58
  177. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +0 -55
  178. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +0 -88
  179. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +0 -20
  180. package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +0 -38
  181. package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +0 -24
  182. package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js +0 -18
  183. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +0 -35
  184. package/dist/collection/lib/dataUnit/ValueFormatter.js +0 -4
  185. package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js +0 -1
  186. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js +0 -1
  187. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js +0 -1
  188. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js +0 -22
  189. package/dist/components/ISave.js +0 -47
  190. package/dist/components/pesquisa-fetcher.js +0 -164
  191. package/dist/esm/RecordIDUtils-87d02110.js +0 -41
  192. package/dist/esm/pesquisa-fetcher-a87445a0.js +0 -164
  193. package/dist/esm/snk-data-unit-1ef94aef.js +0 -688
  194. package/dist/sankhyablocks/p-091ce761.js +0 -60
  195. package/dist/sankhyablocks/p-0c68f40f.entry.js +0 -1
  196. package/dist/sankhyablocks/p-162b9a59.entry.js +0 -11
  197. package/dist/sankhyablocks/p-1db45d26.entry.js +0 -1
  198. package/dist/sankhyablocks/p-25f1fc39.js +0 -6
  199. package/dist/sankhyablocks/p-2e9c764c.entry.js +0 -1
  200. package/dist/sankhyablocks/p-30cf616e.js +0 -1
  201. package/dist/sankhyablocks/p-421bec84.entry.js +0 -1
  202. package/dist/sankhyablocks/p-42f7b05d.entry.js +0 -1
  203. package/dist/sankhyablocks/p-51999ab5.entry.js +0 -1
  204. package/dist/sankhyablocks/p-52a6a293.entry.js +0 -1
  205. package/dist/sankhyablocks/p-5f016aed.js +0 -1
  206. package/dist/sankhyablocks/p-62f34e6f.entry.js +0 -1
  207. package/dist/sankhyablocks/p-684a2590.entry.js +0 -1
  208. package/dist/sankhyablocks/p-70001ac1.js +0 -1
  209. package/dist/sankhyablocks/p-74c665d5.entry.js +0 -1
  210. package/dist/sankhyablocks/p-76a65660.js +0 -1
  211. package/dist/sankhyablocks/p-7c4aabe2.js +0 -1
  212. package/dist/sankhyablocks/p-8c1ff936.entry.js +0 -1
  213. package/dist/sankhyablocks/p-939e15d3.entry.js +0 -1
  214. package/dist/sankhyablocks/p-9863d682.js +0 -1
  215. package/dist/sankhyablocks/p-c273d6ee.js +0 -1
  216. package/dist/sankhyablocks/p-d65d98ed.entry.js +0 -1
  217. package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
  218. package/dist/types/components/snk-crud/interfaces/PropsCustomEditor.d.ts +0 -4
  219. package/dist/types/components/snk-crud/interfaces/PropsCustomRender.d.ts +0 -4
  220. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +0 -14
  221. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +0 -12
  222. package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +0 -5
  223. package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +0 -17
  224. package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +0 -17
  225. package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +0 -77
  226. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +0 -4
  227. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
  228. package/dist/types/components/snk-data-unit/test/resources/metadataMock.d.ts +0 -3
  229. package/dist/types/components/snk-data-unit/test/resources/parentMetadataMock.d.ts +0 -3
  230. package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +0 -11
  231. package/dist/types/lib/dataUnit/ValueFormatter.d.ts +0 -2
  232. package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +0 -3
  233. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.d.ts +0 -10
  234. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.d.ts +0 -7
  235. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.d.ts +0 -20
@@ -1,199 +1,34 @@
1
- import { getRenderingRef, forceUpdate } from '@stencil/core/internal/client';
1
+ var PresentationMode;
2
+ (function (PresentationMode) {
3
+ PresentationMode["PRIMARY"] = "primary";
4
+ PresentationMode["SECONDARY"] = "secondary";
5
+ PresentationMode["SINGLE_TASKBAR"] = "singleTaskbar";
6
+ })(PresentationMode || (PresentationMode = {}));
7
+ var DataExporterOption;
8
+ (function (DataExporterOption) {
9
+ DataExporterOption["EXPORT_TO_PDF"] = "exportToPDF";
10
+ DataExporterOption["EXPORT_TO_XLS"] = "exportToXLS";
11
+ DataExporterOption["EXPORT_CURRENT_PAGE"] = "exportCurrentPage";
12
+ DataExporterOption["EXPORT_PAGE_TO_PDF"] = "exportPageToPDF";
13
+ DataExporterOption["EXPORT_PAGE_TO_XLS"] = "exportPageToXLS";
14
+ DataExporterOption["EXPORT_BY_EMAIL"] = "exportToEmail";
15
+ DataExporterOption["EXPORT_PDF_TO_EMAIL"] = "exportPDFToEmail";
16
+ DataExporterOption["EXPORT_XLS_TO_EMAIL"] = "exportXLSToEmail";
17
+ })(DataExporterOption || (DataExporterOption = {}));
18
+ var DataExporterFormat;
19
+ (function (DataExporterFormat) {
20
+ DataExporterFormat["PDF"] = "exportPDFToEmail";
21
+ DataExporterFormat["XLS"] = "exportXLSToEmail";
22
+ DataExporterFormat["XLSX"] = "exportXLSToEmail";
23
+ })(DataExporterFormat || (DataExporterFormat = {}));
24
+ var DataExporterType;
25
+ (function (DataExporterType) {
26
+ DataExporterType["EXPORT_TO_PDF"] = "PDF";
27
+ DataExporterType["EXPORT_TO_XLS"] = "XLS";
28
+ DataExporterType["EXPORT_PAGE_TO_PDF"] = "PDF";
29
+ DataExporterType["EXPORT_PAGE_TO_XLS"] = "XLS";
30
+ DataExporterType["EXPORT_PDF_TO_EMAIL"] = "PDF";
31
+ DataExporterType["EXPORT_XLS_TO_EMAIL"] = "XLS";
32
+ })(DataExporterType || (DataExporterType = {}));
2
33
 
3
- const appendToMap = (map, propName, value) => {
4
- const items = map.get(propName);
5
- if (!items) {
6
- map.set(propName, [value]);
7
- }
8
- else if (!items.includes(value)) {
9
- items.push(value);
10
- }
11
- };
12
- const debounce = (fn, ms) => {
13
- let timeoutId;
14
- return (...args) => {
15
- if (timeoutId) {
16
- clearTimeout(timeoutId);
17
- }
18
- timeoutId = setTimeout(() => {
19
- timeoutId = 0;
20
- fn(...args);
21
- }, ms);
22
- };
23
- };
24
-
25
- /**
26
- * Check if a possible element isConnected.
27
- * The property might not be there, so we check for it.
28
- *
29
- * We want it to return true if isConnected is not a property,
30
- * otherwise we would remove these elements and would not update.
31
- *
32
- * Better leak in Edge than to be useless.
33
- */
34
- const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
35
- const cleanupElements = debounce((map) => {
36
- for (let key of map.keys()) {
37
- map.set(key, map.get(key).filter(isConnected));
38
- }
39
- }, 2000);
40
- const stencilSubscription = () => {
41
- if (typeof getRenderingRef !== 'function') {
42
- // If we are not in a stencil project, we do nothing.
43
- // This function is not really exported by @stencil/core.
44
- return {};
45
- }
46
- const elmsToUpdate = new Map();
47
- return {
48
- dispose: () => elmsToUpdate.clear(),
49
- get: (propName) => {
50
- const elm = getRenderingRef();
51
- if (elm) {
52
- appendToMap(elmsToUpdate, propName, elm);
53
- }
54
- },
55
- set: (propName) => {
56
- const elements = elmsToUpdate.get(propName);
57
- if (elements) {
58
- elmsToUpdate.set(propName, elements.filter(forceUpdate));
59
- }
60
- cleanupElements(elmsToUpdate);
61
- },
62
- reset: () => {
63
- elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
64
- cleanupElements(elmsToUpdate);
65
- },
66
- };
67
- };
68
-
69
- const unwrap = (val) => (typeof val === 'function' ? val() : val);
70
- const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
71
- const unwrappedState = unwrap(defaultState);
72
- let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
73
- const handlers = {
74
- dispose: [],
75
- get: [],
76
- set: [],
77
- reset: [],
78
- };
79
- const reset = () => {
80
- var _a;
81
- // When resetting the state, the default state may be a function - unwrap it to invoke it.
82
- // otherwise, the state won't be properly reset
83
- states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
84
- handlers.reset.forEach((cb) => cb());
85
- };
86
- const dispose = () => {
87
- // Call first dispose as resetting the state would
88
- // cause less updates ;)
89
- handlers.dispose.forEach((cb) => cb());
90
- reset();
91
- };
92
- const get = (propName) => {
93
- handlers.get.forEach((cb) => cb(propName));
94
- return states.get(propName);
95
- };
96
- const set = (propName, value) => {
97
- const oldValue = states.get(propName);
98
- if (shouldUpdate(value, oldValue, propName)) {
99
- states.set(propName, value);
100
- handlers.set.forEach((cb) => cb(propName, value, oldValue));
101
- }
102
- };
103
- const state = (typeof Proxy === 'undefined'
104
- ? {}
105
- : new Proxy(unwrappedState, {
106
- get(_, propName) {
107
- return get(propName);
108
- },
109
- ownKeys(_) {
110
- return Array.from(states.keys());
111
- },
112
- getOwnPropertyDescriptor() {
113
- return {
114
- enumerable: true,
115
- configurable: true,
116
- };
117
- },
118
- has(_, propName) {
119
- return states.has(propName);
120
- },
121
- set(_, propName, value) {
122
- set(propName, value);
123
- return true;
124
- },
125
- }));
126
- const on = (eventName, callback) => {
127
- handlers[eventName].push(callback);
128
- return () => {
129
- removeFromArray(handlers[eventName], callback);
130
- };
131
- };
132
- const onChange = (propName, cb) => {
133
- const unSet = on('set', (key, newValue) => {
134
- if (key === propName) {
135
- cb(newValue);
136
- }
137
- });
138
- // We need to unwrap the defaultState because it might be a function.
139
- // Otherwise we might not be sending the right reset value.
140
- const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
141
- return () => {
142
- unSet();
143
- unReset();
144
- };
145
- };
146
- const use = (...subscriptions) => {
147
- const unsubs = subscriptions.reduce((unsubs, subscription) => {
148
- if (subscription.set) {
149
- unsubs.push(on('set', subscription.set));
150
- }
151
- if (subscription.get) {
152
- unsubs.push(on('get', subscription.get));
153
- }
154
- if (subscription.reset) {
155
- unsubs.push(on('reset', subscription.reset));
156
- }
157
- if (subscription.dispose) {
158
- unsubs.push(on('dispose', subscription.dispose));
159
- }
160
- return unsubs;
161
- }, []);
162
- return () => unsubs.forEach((unsub) => unsub());
163
- };
164
- const forceUpdate = (key) => {
165
- const oldValue = states.get(key);
166
- handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
167
- };
168
- return {
169
- state,
170
- get,
171
- set,
172
- on,
173
- onChange,
174
- use,
175
- dispose,
176
- reset,
177
- forceUpdate,
178
- };
179
- };
180
- const removeFromArray = (array, item) => {
181
- const index = array.indexOf(item);
182
- if (index >= 0) {
183
- array[index] = array[array.length - 1];
184
- array.length--;
185
- }
186
- };
187
-
188
- const createStore = (defaultState, shouldUpdate) => {
189
- const map = createObservableMap(defaultState, shouldUpdate);
190
- map.use(stencilSubscription());
191
- return map;
192
- };
193
-
194
- const store = createStore({
195
- exporterProviders: {},
196
- filterFieldsDataSource: undefined
197
- });
198
-
199
- export { store as s };
34
+ export { DataExporterOption as D, PresentationMode as P, DataExporterFormat as a, DataExporterType as b };
@@ -0,0 +1,199 @@
1
+ import { getRenderingRef, forceUpdate } from '@stencil/core/internal/client';
2
+
3
+ const appendToMap = (map, propName, value) => {
4
+ const items = map.get(propName);
5
+ if (!items) {
6
+ map.set(propName, [value]);
7
+ }
8
+ else if (!items.includes(value)) {
9
+ items.push(value);
10
+ }
11
+ };
12
+ const debounce = (fn, ms) => {
13
+ let timeoutId;
14
+ return (...args) => {
15
+ if (timeoutId) {
16
+ clearTimeout(timeoutId);
17
+ }
18
+ timeoutId = setTimeout(() => {
19
+ timeoutId = 0;
20
+ fn(...args);
21
+ }, ms);
22
+ };
23
+ };
24
+
25
+ /**
26
+ * Check if a possible element isConnected.
27
+ * The property might not be there, so we check for it.
28
+ *
29
+ * We want it to return true if isConnected is not a property,
30
+ * otherwise we would remove these elements and would not update.
31
+ *
32
+ * Better leak in Edge than to be useless.
33
+ */
34
+ const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
35
+ const cleanupElements = debounce((map) => {
36
+ for (let key of map.keys()) {
37
+ map.set(key, map.get(key).filter(isConnected));
38
+ }
39
+ }, 2000);
40
+ const stencilSubscription = () => {
41
+ if (typeof getRenderingRef !== 'function') {
42
+ // If we are not in a stencil project, we do nothing.
43
+ // This function is not really exported by @stencil/core.
44
+ return {};
45
+ }
46
+ const elmsToUpdate = new Map();
47
+ return {
48
+ dispose: () => elmsToUpdate.clear(),
49
+ get: (propName) => {
50
+ const elm = getRenderingRef();
51
+ if (elm) {
52
+ appendToMap(elmsToUpdate, propName, elm);
53
+ }
54
+ },
55
+ set: (propName) => {
56
+ const elements = elmsToUpdate.get(propName);
57
+ if (elements) {
58
+ elmsToUpdate.set(propName, elements.filter(forceUpdate));
59
+ }
60
+ cleanupElements(elmsToUpdate);
61
+ },
62
+ reset: () => {
63
+ elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
64
+ cleanupElements(elmsToUpdate);
65
+ },
66
+ };
67
+ };
68
+
69
+ const unwrap = (val) => (typeof val === 'function' ? val() : val);
70
+ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
71
+ const unwrappedState = unwrap(defaultState);
72
+ let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
73
+ const handlers = {
74
+ dispose: [],
75
+ get: [],
76
+ set: [],
77
+ reset: [],
78
+ };
79
+ const reset = () => {
80
+ var _a;
81
+ // When resetting the state, the default state may be a function - unwrap it to invoke it.
82
+ // otherwise, the state won't be properly reset
83
+ states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
84
+ handlers.reset.forEach((cb) => cb());
85
+ };
86
+ const dispose = () => {
87
+ // Call first dispose as resetting the state would
88
+ // cause less updates ;)
89
+ handlers.dispose.forEach((cb) => cb());
90
+ reset();
91
+ };
92
+ const get = (propName) => {
93
+ handlers.get.forEach((cb) => cb(propName));
94
+ return states.get(propName);
95
+ };
96
+ const set = (propName, value) => {
97
+ const oldValue = states.get(propName);
98
+ if (shouldUpdate(value, oldValue, propName)) {
99
+ states.set(propName, value);
100
+ handlers.set.forEach((cb) => cb(propName, value, oldValue));
101
+ }
102
+ };
103
+ const state = (typeof Proxy === 'undefined'
104
+ ? {}
105
+ : new Proxy(unwrappedState, {
106
+ get(_, propName) {
107
+ return get(propName);
108
+ },
109
+ ownKeys(_) {
110
+ return Array.from(states.keys());
111
+ },
112
+ getOwnPropertyDescriptor() {
113
+ return {
114
+ enumerable: true,
115
+ configurable: true,
116
+ };
117
+ },
118
+ has(_, propName) {
119
+ return states.has(propName);
120
+ },
121
+ set(_, propName, value) {
122
+ set(propName, value);
123
+ return true;
124
+ },
125
+ }));
126
+ const on = (eventName, callback) => {
127
+ handlers[eventName].push(callback);
128
+ return () => {
129
+ removeFromArray(handlers[eventName], callback);
130
+ };
131
+ };
132
+ const onChange = (propName, cb) => {
133
+ const unSet = on('set', (key, newValue) => {
134
+ if (key === propName) {
135
+ cb(newValue);
136
+ }
137
+ });
138
+ // We need to unwrap the defaultState because it might be a function.
139
+ // Otherwise we might not be sending the right reset value.
140
+ const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
141
+ return () => {
142
+ unSet();
143
+ unReset();
144
+ };
145
+ };
146
+ const use = (...subscriptions) => {
147
+ const unsubs = subscriptions.reduce((unsubs, subscription) => {
148
+ if (subscription.set) {
149
+ unsubs.push(on('set', subscription.set));
150
+ }
151
+ if (subscription.get) {
152
+ unsubs.push(on('get', subscription.get));
153
+ }
154
+ if (subscription.reset) {
155
+ unsubs.push(on('reset', subscription.reset));
156
+ }
157
+ if (subscription.dispose) {
158
+ unsubs.push(on('dispose', subscription.dispose));
159
+ }
160
+ return unsubs;
161
+ }, []);
162
+ return () => unsubs.forEach((unsub) => unsub());
163
+ };
164
+ const forceUpdate = (key) => {
165
+ const oldValue = states.get(key);
166
+ handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
167
+ };
168
+ return {
169
+ state,
170
+ get,
171
+ set,
172
+ on,
173
+ onChange,
174
+ use,
175
+ dispose,
176
+ reset,
177
+ forceUpdate,
178
+ };
179
+ };
180
+ const removeFromArray = (array, item) => {
181
+ const index = array.indexOf(item);
182
+ if (index >= 0) {
183
+ array[index] = array[array.length - 1];
184
+ array.length--;
185
+ }
186
+ };
187
+
188
+ const createStore = (defaultState, shouldUpdate) => {
189
+ const map = createObservableMap(defaultState, shouldUpdate);
190
+ map.use(stencilSubscription());
191
+ return map;
192
+ };
193
+
194
+ const store = createStore({
195
+ exporterProviders: {},
196
+ filterFieldsDataSource: undefined
197
+ });
198
+
199
+ export { store as s };
@@ -2,11 +2,10 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
2
2
  import { ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, DateUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { D as DataFetcher } from './DataFetcher.js';
4
4
  import { P as ParamType } from './ParamType.js';
5
- import './pesquisa-fetcher.js';
6
- import './ISave.js';
5
+ import './dataunit-fetcher.js';
6
+ import './index2.js';
7
7
  import '@sankhyalabs/ezui/dist/collection/utils/constants';
8
8
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
9
- import './dataunit-fetcher.js';
10
9
  import './filter-item-type.enum.js';
11
10
  import './form-config-fetcher.js';
12
11
  import { R as ResourceIDUtils } from './ResourceIDUtils.js';
@@ -159,6 +158,14 @@ var RefreshType;
159
158
  RefreshType["ALL"] = "ALL";
160
159
  })(RefreshType || (RefreshType = {}));
161
160
 
161
+ var SaveErrorsEnum;
162
+ (function (SaveErrorsEnum) {
163
+ SaveErrorsEnum["LINK_AND_FILE_AT_THE_SAME_TIME"] = "LINK_AND_FILE_AT_THE_SAME_TIME";
164
+ SaveErrorsEnum["ANY_LINK_OR_FILE_FILLED"] = "ANY_LINK_OR_FILE_FILLED";
165
+ SaveErrorsEnum["UNKNOWN"] = "UNKNOWN";
166
+ SaveErrorsEnum["DESCRIPTION_CANNOT_BE_CHANGED"] = "DESCRIPTION_CANNOT_BE_CHANGED";
167
+ })(SaveErrorsEnum || (SaveErrorsEnum = {}));
168
+
162
169
  const MASTER_ROW_PROPERTY = "__MASTER_ROW__";
163
170
  const ENTITY_NAME_PROPERTY = '__ENTITY_NAME__';
164
171
  const NUFIN_COLUMN = 'NUFIN';
@@ -728,4 +735,4 @@ function defineCustomElement() {
728
735
  } });
729
736
  }
730
737
 
731
- export { SnkActionsButton as S, defineCustomElement as d };
738
+ export { SnkActionsButton as S, SaveErrorsEnum as a, defineCustomElement as d };
@@ -4,8 +4,7 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
4
4
  import { C as ConfigStorage } from './ConfigStorage.js';
5
5
  import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher.js';
6
6
  import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher.js';
7
- import { D as DataUnitFetcher } from './dataunit-fetcher.js';
8
- import { P as PesquisaFetcher } from './pesquisa-fetcher.js';
7
+ import { D as DataUnitFetcher, P as PesquisaFetcher } from './dataunit-fetcher.js';
9
8
  import { S as SnkMessageBuilder } from './SnkMessageBuilder.js';
10
9
  import { d as defineCustomElement$1 } from './snk-pesquisa2.js';
11
10
 
@@ -290,7 +289,6 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
290
289
  this._duPromises = new Map();
291
290
  this._requestListener = new RequestListenerLoadingBar();
292
291
  this._pendingActions = new Map;
293
- this._loadPkParameter = null;
294
292
  this._isLoadedByPk = false;
295
293
  this.messagesBuilder = undefined;
296
294
  this.configName = undefined;
@@ -348,12 +346,6 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
348
346
  });
349
347
  }
350
348
  }
351
- watchPropHandler(newValue, _) {
352
- if (newValue && this._loadPkParameter) {
353
- this.loadByPK(this._loadPkParameter.pk, this._loadPkParameter.redirect);
354
- this._loadPkParameter = null;
355
- }
356
- }
357
349
  /**
358
350
  * Obtém o controlador de teclado.
359
351
  *
@@ -628,7 +620,12 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
628
620
  if (!waitingDu) {
629
621
  const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, resourceID, parentDataUnit, configName);
630
622
  dataUnit.loadMetadata().then(() => {
631
- this.processResolveDataUnit(dataUnit, dataUnitName, duPromisses);
623
+ if (dataUnitName) {
624
+ this.updateDataunitCache(undefined, dataUnitName, dataUnit);
625
+ }
626
+ while (duPromisses.length > 0) {
627
+ duPromisses.pop().resolve(dataUnit);
628
+ }
632
629
  }).catch(reason => {
633
630
  while (duPromisses.length > 0) {
634
631
  duPromisses.pop().reject(reason);
@@ -637,14 +634,6 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
637
634
  }
638
635
  });
639
636
  }
640
- processResolveDataUnit(dataUnit, dataUnitName, duPromisses) {
641
- if (dataUnitName) {
642
- this.updateDataunitCache(undefined, dataUnitName, dataUnit);
643
- }
644
- while (duPromisses.length > 0) {
645
- duPromisses.pop().resolve(dataUnit);
646
- }
647
- }
648
637
  /**
649
638
  * Atualiza o cache de dataunits da aplicação.
650
639
  * @param oldName - Nome do dataunit que está em cache.
@@ -1058,23 +1047,15 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1058
1047
  return;
1059
1048
  const resourceIDfromUrl = this.getResourceIdFromToken();
1060
1049
  const pkObject = UrlUtils.getPkObjectFromUrlToken(top.window.location.hash);
1061
- const redirectFrom = window["redirectFrom"];
1062
- if (pkObject === undefined) {
1050
+ if (pkObject == undefined || resourceIDfromUrl !== this.applicationResourceID)
1063
1051
  return;
1064
- }
1065
- if (!redirectFrom || redirectFrom.split("_")[0].indexOf(resourceIDfromUrl.split("_")[0]) === -1) {
1066
- if (resourceIDfromUrl !== this.applicationResourceID) {
1067
- return;
1068
- }
1069
- }
1070
1052
  const pkParam = { pk: pkObject };
1071
1053
  this._isLoadedByPk = true;
1072
1054
  if (this.loadByPK) {
1073
- this.loadByPK(pkParam, redirectFrom);
1055
+ this.loadByPK(pkParam);
1074
1056
  this._currentPkParameter = pkHash;
1075
1057
  return;
1076
1058
  }
1077
- this._loadPkParameter = { pk: pkParam, redirect: redirectFrom };
1078
1059
  this.defaultLoadByPK(pkParam, pkHash);
1079
1060
  }
1080
1061
  getResourceIdFromToken() {
@@ -1265,9 +1246,6 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
1265
1246
  return (h("div", null, h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "small", closeOutsideClick: true, closeEsc: true })));
1266
1247
  }
1267
1248
  get _element() { return this; }
1268
- static get watchers() { return {
1269
- "loadByPK": ["watchPropHandler"]
1270
- }; }
1271
1249
  static get style() { return snkApplicationCss; }
1272
1250
  }, [2, "snk-application", {
1273
1251
  "messagesBuilder": [1040],