@sankhyalabs/sankhyablocks 8.15.3 → 8.16.0-dev.10

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 (234) hide show
  1. package/dist/cjs/{ConfigStorage-942ce74b.js → ConfigStorage-a343e418.js} +1 -0
  2. package/dist/cjs/{SnkMultiSelectionListDataSource-3c08d25c.js → IExporterProvider-597949f9.js} +94 -4
  3. package/dist/cjs/RecordIDUtils-3735135c.js +43 -0
  4. package/dist/cjs/{SnkFormConfigManager-f9dc0d28.js → SnkFormConfigManager-166cbd1f.js} +8 -7
  5. package/dist/cjs/{SnkMessageBuilder-66aa2557.js → SnkMessageBuilder-897ffd08.js} +9 -13
  6. package/dist/cjs/{pesquisa-fetcher-562d281f.js → dataunit-fetcher-688d3f05.js} +87 -180
  7. package/dist/cjs/{index-0922807b.js → index-1dfc7a6e.js} +5 -0
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/pesquisa-fetcher-680e198f.js +166 -0
  10. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  11. package/dist/cjs/snk-actions-button_4.cjs.entry.js +5 -3
  12. package/dist/cjs/snk-application.cjs.entry.js +35 -12
  13. package/dist/cjs/snk-attach.cjs.entry.js +71 -46
  14. package/dist/cjs/snk-crud.cjs.entry.js +101 -10
  15. package/dist/cjs/snk-data-exporter.cjs.entry.js +315 -85
  16. package/dist/cjs/snk-data-unit-8fa7917a.js +689 -0
  17. package/dist/cjs/snk-data-unit.cjs.entry.js +12 -2
  18. package/dist/cjs/snk-detail-view.cjs.entry.js +50 -10
  19. package/dist/cjs/snk-filter-bar.cjs.entry.js +6 -2
  20. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
  21. package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
  22. package/dist/cjs/snk-form-view.cjs.entry.js +67 -0
  23. package/dist/cjs/snk-form.cjs.entry.js +52 -7
  24. package/dist/cjs/snk-grid.cjs.entry.js +165 -108
  25. package/dist/cjs/{snk-guides-viewer-bb6087cd.js → snk-guides-viewer-9c682034.js} +43 -10
  26. package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -7
  27. package/dist/cjs/snk-personalized-filter.cjs.entry.js +1 -1
  28. package/dist/cjs/snk-simple-crud.cjs.entry.js +268 -40
  29. package/dist/cjs/snk-taskbar.cjs.entry.js +4 -3
  30. package/dist/cjs/{taskbar-elements-3ecd1278.js → taskbar-elements-9ad1f9c0.js} +3 -3
  31. package/dist/collection/collection-manifest.json +1 -1
  32. package/dist/collection/components/snk-application/snk-application.js +35 -11
  33. package/dist/collection/components/snk-attach/snk-attach.js +67 -44
  34. package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js +1 -0
  35. package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js +1 -0
  36. package/dist/collection/components/snk-crud/snk-crud.js +305 -7
  37. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +136 -2
  38. package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +161 -0
  39. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +134 -7
  40. package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +97 -0
  41. package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +74 -0
  42. package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +54 -1
  43. package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +1 -0
  44. package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +58 -0
  45. package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +55 -0
  46. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +59 -52
  47. package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +62 -0
  48. package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +88 -0
  49. package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +20 -0
  50. package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +38 -0
  51. package/dist/collection/components/snk-data-unit/snk-data-unit.js +538 -218
  52. package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +24 -0
  53. package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js +18 -0
  54. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +22 -1
  55. package/dist/collection/components/snk-form/snk-form.js +102 -5
  56. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +7 -6
  57. package/dist/collection/components/snk-form-config/snk-form-config.js +1 -1
  58. package/dist/collection/components/snk-grid/snk-grid.js +240 -101
  59. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +406 -20
  60. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +2 -2
  61. package/dist/collection/components/snk-taskbar/snk-taskbar.js +2 -1
  62. package/dist/collection/lib/@types/index.js +5 -0
  63. package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +35 -0
  64. package/dist/collection/lib/configs/ConfigStorage.js +1 -0
  65. package/dist/collection/lib/dataUnit/InMemoryLoader.js +7 -3
  66. package/dist/collection/lib/dataUnit/ValueFormatter.js +4 -0
  67. package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js +1 -0
  68. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +3 -0
  69. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +4 -0
  70. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +11 -13
  71. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +1 -0
  72. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js +1 -0
  73. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js +1 -0
  74. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +53 -4
  75. package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js +22 -0
  76. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -4
  77. package/dist/collection/lib/message/SnkMessageBuilder.js +5 -12
  78. package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -0
  79. package/dist/collection/lib/message/resources/snk-data-unit.msg.js +2 -1
  80. package/dist/components/ConfigStorage.js +1 -0
  81. package/dist/components/{field-search.js → IExporterProvider.js} +93 -6
  82. package/dist/components/ISave.js +47 -0
  83. package/dist/components/SnkFormConfigManager.js +7 -6
  84. package/dist/components/SnkMessageBuilder.js +9 -13
  85. package/dist/components/dataunit-fetcher.js +84 -182
  86. package/dist/components/index2.js +198 -33
  87. package/dist/components/pesquisa-fetcher.js +164 -0
  88. package/dist/components/snk-actions-button2.js +4 -11
  89. package/dist/components/snk-application2.js +31 -9
  90. package/dist/components/snk-attach2.js +65 -41
  91. package/dist/components/snk-crud.js +110 -11
  92. package/dist/components/snk-data-exporter2.js +309 -85
  93. package/dist/components/snk-data-unit2.js +485 -216
  94. package/dist/components/snk-detail-view2.js +96 -14
  95. package/dist/components/snk-expression-item2.js +1 -1
  96. package/dist/components/snk-filter-bar2.js +6 -1
  97. package/dist/components/snk-form-config2.js +1 -1
  98. package/dist/components/snk-form-view2.js +72 -1
  99. package/dist/components/snk-form.js +53 -6
  100. package/dist/components/snk-grid2.js +168 -106
  101. package/dist/components/snk-personalized-filter2.js +1 -1
  102. package/dist/components/snk-simple-crud2.js +263 -25
  103. package/dist/components/snk-taskbar2.js +6 -5
  104. package/dist/esm/{ConfigStorage-86187da3.js → ConfigStorage-3806514e.js} +1 -0
  105. package/dist/esm/{SnkMultiSelectionListDataSource-6a879955.js → IExporterProvider-63a188b6.js} +93 -5
  106. package/dist/esm/RecordIDUtils-87d02110.js +41 -0
  107. package/dist/esm/{SnkFormConfigManager-f53f9f87.js → SnkFormConfigManager-31b24066.js} +8 -7
  108. package/dist/esm/{SnkMessageBuilder-0a4becdd.js → SnkMessageBuilder-571462fb.js} +9 -13
  109. package/dist/esm/{pesquisa-fetcher-c7ce8ee7.js → dataunit-fetcher-264191b2.js} +83 -181
  110. package/dist/esm/{index-0ece87a6.js → index-3aa4977a.js} +6 -1
  111. package/dist/esm/loader.js +1 -1
  112. package/dist/esm/pesquisa-fetcher-03c8f919.js +164 -0
  113. package/dist/esm/sankhyablocks.js +1 -1
  114. package/dist/esm/snk-actions-button_4.entry.js +5 -3
  115. package/dist/esm/snk-application.entry.js +34 -11
  116. package/dist/esm/snk-attach.entry.js +66 -41
  117. package/dist/esm/snk-crud.entry.js +101 -10
  118. package/dist/esm/snk-data-exporter.entry.js +316 -86
  119. package/dist/esm/snk-data-unit-f5cbe64b.js +687 -0
  120. package/dist/esm/snk-data-unit.entry.js +12 -2
  121. package/dist/esm/snk-detail-view.entry.js +50 -10
  122. package/dist/esm/snk-filter-bar.entry.js +6 -2
  123. package/dist/esm/snk-filter-modal-item.entry.js +1 -1
  124. package/dist/esm/snk-form-config.entry.js +1 -1
  125. package/dist/esm/snk-form-view.entry.js +67 -0
  126. package/dist/esm/snk-form.entry.js +52 -7
  127. package/dist/esm/snk-grid.entry.js +163 -106
  128. package/dist/esm/{snk-guides-viewer-1d95ebf2.js → snk-guides-viewer-8f6960a2.js} +43 -10
  129. package/dist/esm/snk-guides-viewer.entry.js +9 -7
  130. package/dist/esm/snk-personalized-filter.entry.js +1 -1
  131. package/dist/esm/snk-simple-crud.entry.js +256 -28
  132. package/dist/esm/snk-taskbar.entry.js +4 -3
  133. package/dist/esm/{taskbar-elements-2473c8ac.js → taskbar-elements-d59867f1.js} +3 -3
  134. package/dist/sankhyablocks/p-17def7cd.js +1 -0
  135. package/dist/sankhyablocks/p-1db45d26.entry.js +1 -0
  136. package/dist/sankhyablocks/p-28ee0972.js +1 -0
  137. package/dist/sankhyablocks/p-2a408684.js +1 -0
  138. package/dist/sankhyablocks/{p-eae7a817.entry.js → p-2c68b3ae.entry.js} +1 -1
  139. package/dist/sankhyablocks/p-30cf616e.js +1 -0
  140. package/dist/sankhyablocks/p-3a212712.js +1 -0
  141. package/dist/sankhyablocks/p-450c60e4.entry.js +1 -0
  142. package/dist/sankhyablocks/{p-a1d72395.entry.js → p-47db7e88.entry.js} +1 -1
  143. package/dist/sankhyablocks/p-4e5e1313.entry.js +1 -0
  144. package/dist/sankhyablocks/{p-aff76a53.js → p-52920496.js} +1 -1
  145. package/dist/sankhyablocks/p-62ba211a.entry.js +1 -0
  146. package/dist/sankhyablocks/p-6bb2f3e9.entry.js +1 -0
  147. package/dist/sankhyablocks/p-7505da04.entry.js +1 -0
  148. package/dist/sankhyablocks/p-7619bdb1.entry.js +11 -0
  149. package/dist/sankhyablocks/p-7a85fd49.entry.js +1 -0
  150. package/dist/sankhyablocks/{p-ae4fc9a9.js → p-7e7a7473.js} +1 -1
  151. package/dist/sankhyablocks/p-7ef9c55c.js +1 -0
  152. package/dist/sankhyablocks/p-80042dc6.entry.js +1 -0
  153. package/dist/sankhyablocks/p-8c59edd7.entry.js +1 -0
  154. package/dist/sankhyablocks/p-9606509c.entry.js +1 -0
  155. package/dist/sankhyablocks/p-9863d682.js +1 -0
  156. package/dist/sankhyablocks/p-ae93d46a.entry.js +1 -0
  157. package/dist/sankhyablocks/p-af8efd95.js +6 -0
  158. package/dist/sankhyablocks/p-d6e26ea8.entry.js +1 -0
  159. package/dist/sankhyablocks/p-f2809746.entry.js +1 -0
  160. package/dist/sankhyablocks/p-f4450320.entry.js +1 -0
  161. package/dist/sankhyablocks/p-fe79f83a.js +60 -0
  162. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  163. package/dist/types/components/snk-application/snk-application.d.ts +7 -3
  164. package/dist/types/components/snk-attach/snk-attach.d.ts +11 -9
  165. package/dist/types/components/snk-crud/interfaces/PropsCustomEditor.d.ts +4 -0
  166. package/dist/types/components/snk-crud/interfaces/PropsCustomRender.d.ts +4 -0
  167. package/dist/types/components/snk-crud/snk-crud.d.ts +45 -1
  168. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +23 -0
  169. package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +28 -3
  170. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +24 -0
  171. package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +14 -0
  172. package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +12 -0
  173. package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +24 -4
  174. package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +5 -0
  175. package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +17 -0
  176. package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +17 -0
  177. package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +4 -1
  178. package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +21 -0
  179. package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +77 -0
  180. package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +4 -0
  181. package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +3 -0
  182. package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +66 -2
  183. package/dist/types/components/snk-data-unit/test/resources/metadataMock.d.ts +3 -0
  184. package/dist/types/components/snk-data-unit/test/resources/parentMetadataMock.d.ts +3 -0
  185. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -0
  186. package/dist/types/components/snk-form/snk-form.d.ts +14 -0
  187. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +2 -2
  188. package/dist/types/components/snk-grid/snk-grid.d.ts +46 -6
  189. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +62 -4
  190. package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
  191. package/dist/types/components.d.ts +261 -4
  192. package/dist/types/lib/@types/index.d.ts +5 -0
  193. package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +11 -0
  194. package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +2 -1
  195. package/dist/types/lib/dataUnit/ValueFormatter.d.ts +2 -0
  196. package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +3 -0
  197. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +2 -1
  198. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +1 -0
  199. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -0
  200. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.d.ts +10 -0
  201. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.d.ts +7 -0
  202. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +6 -0
  203. package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.d.ts +20 -0
  204. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +3 -0
  205. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +2 -1
  206. package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
  207. package/package.json +1 -1
  208. package/dist/cjs/snk-data-unit-41c29713.js +0 -462
  209. package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +0 -34
  210. package/dist/components/index3.js +0 -199
  211. package/dist/esm/snk-data-unit-de1d140d.js +0 -460
  212. package/dist/sankhyablocks/p-032fe52e.js +0 -1
  213. package/dist/sankhyablocks/p-03dcc5ff.entry.js +0 -1
  214. package/dist/sankhyablocks/p-0594db5a.entry.js +0 -1
  215. package/dist/sankhyablocks/p-06e13db2.js +0 -1
  216. package/dist/sankhyablocks/p-07a61550.entry.js +0 -1
  217. package/dist/sankhyablocks/p-1403a4b6.entry.js +0 -1
  218. package/dist/sankhyablocks/p-14a08904.entry.js +0 -1
  219. package/dist/sankhyablocks/p-15802c59.entry.js +0 -1
  220. package/dist/sankhyablocks/p-235dc7b1.js +0 -65
  221. package/dist/sankhyablocks/p-32556aa6.js +0 -1
  222. package/dist/sankhyablocks/p-38289a55.js +0 -1
  223. package/dist/sankhyablocks/p-3c632d48.js +0 -1
  224. package/dist/sankhyablocks/p-3f833983.entry.js +0 -1
  225. package/dist/sankhyablocks/p-52c8e589.js +0 -1
  226. package/dist/sankhyablocks/p-5e1502b6.entry.js +0 -11
  227. package/dist/sankhyablocks/p-74d349c3.entry.js +0 -1
  228. package/dist/sankhyablocks/p-93167e28.entry.js +0 -1
  229. package/dist/sankhyablocks/p-add17f6a.entry.js +0 -1
  230. package/dist/sankhyablocks/p-bd47dd16.entry.js +0 -1
  231. package/dist/sankhyablocks/p-c1f88236.entry.js +0 -1
  232. package/dist/sankhyablocks/p-ccdd5332.entry.js +0 -1
  233. package/dist/sankhyablocks/p-ee9536bc.entry.js +0 -1
  234. package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +0 -3
@@ -1,13 +1,24 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
2
- import { ApplicationContext, ObjectUtils, DataType, ElementIDUtils } from '@sankhyalabs/core';
2
+ import { ApplicationContext, ObjectUtils, UserInterface, DataType, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
4
- import { D as DataExporterOption, a as DataExporterFormat, b as DataExporterType } from './index-0ece87a6.js';
4
+ import { D as DataExporterOption, a as DataExporterType, b as DataExporterFormat } from './index-3aa4977a.js';
5
5
  import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants-8457af36.js';
6
6
  import { D as DataFetcher } from './DataFetcher-c1baf61d.js';
7
- import { S as SnkDataUnit } from './snk-data-unit-de1d140d.js';
8
- import './PrintUtils-3e4ff0f5.js';
7
+ import { S as SnkDataUnit } from './snk-data-unit-f5cbe64b.js';
8
+ import './pesquisa-fetcher-03c8f919.js';
9
+ import './ISave-d8c8bc59.js';
10
+ import '@sankhyalabs/ezui/dist/collection/utils/constants';
9
11
  import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
10
- import './SnkMessageBuilder-0a4becdd.js';
12
+ import './dataunit-fetcher-264191b2.js';
13
+ import './filter-item-type.enum-d45e026f.js';
14
+ import './form-config-fetcher-30fb808f.js';
15
+ import './PrintUtils-3e4ff0f5.js';
16
+ import './SnkMessageBuilder-571462fb.js';
17
+ import './RecordIDUtils-87d02110.js';
18
+ import '@sankhyalabs/core/dist/dataunit/metadata/DataType';
19
+ import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
20
+ import '@sankhyalabs/core/dist/utils/SortingUtils';
21
+ import './ResourceIDUtils-a114189a.js';
11
22
 
12
23
  class ItemBuilder {
13
24
  constructor(getMessage, selectedNumber) {
@@ -29,6 +40,9 @@ class ItemBuilder {
29
40
  items.push(this.getExportToXLS(groupName));
30
41
  }
31
42
  this.setExportCurrentPage(option, items);
43
+ if (this._selectedNumber > 0) {
44
+ this.setExportAllRecords(option, items);
45
+ }
32
46
  this.setExportByEmail(option, items);
33
47
  }
34
48
  /**
@@ -59,6 +73,34 @@ class ItemBuilder {
59
73
  }
60
74
  }
61
75
  }
76
+ /**
77
+ * Método responsável por inserir os itens de exportação para todos os registros.
78
+ * @param option - Nome da opção que será inserida no array.
79
+ * @param items - Array que será alimentado com as opções permitidas.
80
+ */
81
+ setExportAllRecords(option, items) {
82
+ var _a;
83
+ const pageOptions = [DataExporterOption.EXPORT_ALL_RECORDS_TO_PDF, DataExporterOption.EXPORT_ALL_RECORDS_TO_XLS];
84
+ if (option === DataExporterOption.EXPORT_ALL_RECORDS) {
85
+ items.push(this.getAllRecords());
86
+ }
87
+ if (pageOptions.includes(option)) {
88
+ let item = items.find((item) => item.id === DataExporterOption.EXPORT_ALL_RECORDS);
89
+ if (item == undefined) {
90
+ items.push(this.getAllRecords());
91
+ item = items.find((item) => item.id === DataExporterOption.EXPORT_ALL_RECORDS);
92
+ }
93
+ if (!((_a = item.children) === null || _a === void 0 ? void 0 : _a.length)) {
94
+ item.children = [];
95
+ }
96
+ if (option === DataExporterOption.EXPORT_ALL_RECORDS_TO_PDF) {
97
+ item.children.push(this.getExportAllRecordsToPDF());
98
+ }
99
+ if (option === DataExporterOption.EXPORT_ALL_RECORDS_TO_XLS) {
100
+ item.children.push(this.getExportAllRecordsToXLS());
101
+ }
102
+ }
103
+ }
62
104
  /**
63
105
  * Método responsável por inserir os itens de exportação por e-mail.
64
106
  * @param option - Nome da opção que será inserida no array.
@@ -104,6 +146,17 @@ class ItemBuilder {
104
146
  group: this._getMessage("snkDataExporter.group.custom")
105
147
  };
106
148
  }
149
+ /**
150
+ * Método responsável por capturar o objeto com todos os dados de exportação.
151
+ * @returns Retorna o objeto com todos os dados de exportação.
152
+ */
153
+ getAllRecords() {
154
+ return {
155
+ id: DataExporterOption.EXPORT_ALL_RECORDS,
156
+ label: this._getMessage("snkDataExporter.label.allRecords"),
157
+ group: this._getMessage("snkDataExporter.group.custom")
158
+ };
159
+ }
107
160
  /**
108
161
  * Método responsável por capturar o objeto com os dados de exportação personalizada em PDF.
109
162
  * @returns Retorna o objeto com os dados de exportação personalizada em PDF.
@@ -124,6 +177,26 @@ class ItemBuilder {
124
177
  label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`
125
178
  };
126
179
  }
180
+ /**
181
+ * Método responsável por capturar o objeto com todos os dados de exportação em PDF.
182
+ * @returns Retorna o objeto com todos os dados de exportação em PDF.
183
+ */
184
+ getExportAllRecordsToPDF() {
185
+ return {
186
+ id: DataExporterOption.EXPORT_ALL_RECORDS_TO_PDF,
187
+ label: "PDF (.pdf)"
188
+ };
189
+ }
190
+ /**
191
+ * Método responsável por capturar o objeto com todos os dados de exportação em XLS.
192
+ * @returns Retorna o objeto com todos os dados de exportação em XLS.
193
+ */
194
+ getExportAllRecordsToXLS() {
195
+ return {
196
+ id: DataExporterOption.EXPORT_ALL_RECORDS_TO_XLS,
197
+ label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`
198
+ };
199
+ }
127
200
  /**
128
201
  * Método responsável por capturar o objeto com os dados de exportação por e-mail.
129
202
  * @returns Retorna o objeto com os dados de exportação por e-mail.
@@ -149,38 +222,6 @@ class ItemBuilder {
149
222
  }
150
223
  }
151
224
 
152
- var __rest = (undefined && undefined.__rest) || function (s, e) {
153
- var t = {};
154
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
155
- t[p] = s[p];
156
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
157
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
158
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
159
- t[p[i]] = s[p[i]];
160
- }
161
- return t;
162
- };
163
- function fetchDataExporter(_a) {
164
- var { methodName } = _a, requestBody = __rest(_a, ["methodName"]);
165
- const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
166
- const serviceName = `${application.getModuleName()}@DataExporterSPBean.${methodName}`;
167
- const payload = { serviceName, requestBody };
168
- return new Promise((resolve, reject) => {
169
- DataFetcher.get()
170
- .callServiceBroker(serviceName, ObjectUtils.objectToString(payload))
171
- .then(result => resolve(getFormatResponse$1(result)))
172
- .catch(error => reject(error));
173
- });
174
- }
175
- function getFormatResponse$1(result) {
176
- var _a;
177
- const response = (_a = result === null || result === void 0 ? void 0 : result.json) === null || _a === void 0 ? void 0 : _a.$;
178
- if (response == undefined) {
179
- return;
180
- }
181
- return ObjectUtils.stringToObject(response);
182
- }
183
-
184
225
  function getMessage(application, key, params) {
185
226
  var _a;
186
227
  return (_a = application === null || application === void 0 ? void 0 : application.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
@@ -209,16 +250,195 @@ function getFormatResponse(result) {
209
250
  return ObjectUtils.stringToObject(response);
210
251
  }
211
252
 
253
+ const DOC_MAX_WIDTH = 800;
254
+ function getVisibleColumns(columns) {
255
+ const visibleColumns = [];
256
+ let totalWidth = 0;
257
+ for (const column of columns) {
258
+ totalWidth += column.width;
259
+ if (totalWidth >= DOC_MAX_WIDTH) {
260
+ break;
261
+ }
262
+ visibleColumns.push(column);
263
+ }
264
+ return visibleColumns;
265
+ }
266
+ function getOptionKey(option) {
267
+ return Object.keys(DataExporterOption)
268
+ .find((key) => {
269
+ return DataExporterOption[key] === option;
270
+ });
271
+ }
272
+
273
+ var __rest = (undefined && undefined.__rest) || function (s, e) {
274
+ var t = {};
275
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
276
+ t[p] = s[p];
277
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
278
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
279
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
280
+ t[p[i]] = s[p[i]];
281
+ }
282
+ return t;
283
+ };
284
+ class ServerSideExporterStrategy {
285
+ constructor(provider) {
286
+ this._provider = provider;
287
+ }
288
+ async getParsedColumns() {
289
+ const columns = await this._provider.getColumnsMetadata();
290
+ const visibleColumns = getVisibleColumns(columns);
291
+ return visibleColumns;
292
+ }
293
+ async getParams(resolveProps) {
294
+ var _a, _b, _c, _d, _e, _f;
295
+ const filters = (_b = (_a = this._provider).getFilters) === null || _b === void 0 ? void 0 : _b.call(_a);
296
+ const columns = [DataExporterType.EXPORT_TO_PDF, DataExporterType.EXPORT_PAGE_TO_PDF, DataExporterType.EXPORT_PDF_TO_EMAIL, DataExporterType.EXPORT_ALL_RECORDS_TO_PDF].includes(getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
297
+ const sort = (_d = (_c = this._provider).getOrders) === null || _d === void 0 ? void 0 : _d.call(_c);
298
+ const resourceURI = (_f = (_e = this._provider).getResourceURI) === null || _f === void 0 ? void 0 : _f.call(_e);
299
+ const selectedIDs = this._provider.getSelectedIDs();
300
+ const option = resolveProps.exportOption;
301
+ const currentPageOptions = [
302
+ DataExporterOption.EXPORT_PAGE_TO_PDF,
303
+ DataExporterOption.EXPORT_PAGE_TO_XLS
304
+ ];
305
+ delete resolveProps.exportOption;
306
+ let params = Object.assign({ filters,
307
+ columns,
308
+ sort,
309
+ resourceURI, selectedIDs: selectedIDs.slice(0, this._provider.getExportLimit()) }, resolveProps);
310
+ if (currentPageOptions.includes(option) || resolveProps.type == "page") {
311
+ const offset = this._provider.getOffset();
312
+ const limit = this._provider.getPageSize();
313
+ params = Object.assign(Object.assign({}, params), { offset,
314
+ limit, selectedIDs: [] });
315
+ }
316
+ else if (resolveProps.type == "all") {
317
+ params = Object.assign(Object.assign({}, params), { offset: 0, limit: this._provider.getExportLimit(), selectedIDs: [] });
318
+ }
319
+ return Promise.resolve(params);
320
+ }
321
+ async executeExport(resolveProps) {
322
+ const _a = await this.getParams(resolveProps), { methodName } = _a, requestBody = __rest(_a, ["methodName"]);
323
+ const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
324
+ const serviceName = `${application.getModuleName()}@DataExporterSPBean.${methodName}`;
325
+ const payload = { serviceName, requestBody };
326
+ return new Promise((resolve, reject) => {
327
+ DataFetcher.get()
328
+ .callServiceBroker(serviceName, ObjectUtils.objectToString(payload))
329
+ .then(result => resolve(this.getFormatResponse(result)))
330
+ .catch(error => reject(error));
331
+ });
332
+ }
333
+ getFormatResponse(result) {
334
+ var _a;
335
+ const response = (_a = result === null || result === void 0 ? void 0 : result.json) === null || _a === void 0 ? void 0 : _a.$;
336
+ if (response == undefined) {
337
+ return;
338
+ }
339
+ return ObjectUtils.stringToObject(response);
340
+ }
341
+ }
342
+
343
+ class ClientSideExporterStrategy {
344
+ constructor(provider) {
345
+ this._provider = provider;
346
+ }
347
+ async getParsedColumns() {
348
+ const columns = await this._provider.getColumnsMetadata();
349
+ const visibleColumns = getVisibleColumns(columns);
350
+ return visibleColumns;
351
+ }
352
+ async executeExport(resolveProps) {
353
+ const { methodName, titleGrid } = resolveProps;
354
+ const records = await this._provider.getRecords();
355
+ const columns = [DataExporterType.EXPORT_TO_PDF, DataExporterType.EXPORT_PAGE_TO_PDF, DataExporterType.EXPORT_PDF_TO_EMAIL, DataExporterType.EXPORT_ALL_RECORDS_TO_PDF].includes(getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
356
+ const [serviceName, processor] = this.getExecutor(methodName);
357
+ const payload = {
358
+ serviceName,
359
+ requestBody: {
360
+ grid: {
361
+ titleGrid,
362
+ columns: this.buildColumnsObject(columns),
363
+ rows: this.buildRowsObject(columns, records),
364
+ customOptions: { xlsxExtension: false }
365
+ }
366
+ }
367
+ };
368
+ return new Promise((resolve, reject) => {
369
+ DataFetcher.get()
370
+ .callServiceBroker(serviceName, payload)
371
+ .then(result => resolve(processor(result)))
372
+ .catch(error => reject(error));
373
+ });
374
+ }
375
+ getExecutor(methodName) {
376
+ if (methodName === "exportToPDF") {
377
+ return [
378
+ "GridPDFBuilderSP.buildPDFFromJson",
379
+ responseBody => ({
380
+ fileSessionKey: responseBody.chavePDF.valor,
381
+ canPrint: responseBody.permiteImprimir.valor === "S",
382
+ canExport: responseBody.permiteExportar.valor === "S",
383
+ canSendEmail: responseBody.canSendEmail.valor === "S",
384
+ useAppPrint: true
385
+ })
386
+ ];
387
+ }
388
+ return [
389
+ "GridXLSBuilderSP.buildXLSFromJson",
390
+ responseBody => ({
391
+ fileSessionKey: responseBody.chaveXLS.valor,
392
+ canPrint: false,
393
+ canExport: false,
394
+ useAppPrint: false,
395
+ canSendEmail: false
396
+ })
397
+ ];
398
+ }
399
+ buildColumnsObject(columns) {
400
+ return {
401
+ column: columns.map((column, index) => {
402
+ const { label, id, width, userInterface } = column;
403
+ return Object.assign({ index: index + 1, id,
404
+ label,
405
+ width, presentationType: "P" }, (TYPE_MAP[userInterface] || { type: "S", align: "left" }));
406
+ })
407
+ };
408
+ }
409
+ buildRowsObject(columns, records) {
410
+ return {
411
+ row: records.map(rawRecord => {
412
+ const record = {};
413
+ columns.forEach((column, index) => record["c" + (index + 1)] = { $: this.formatValue(rawRecord, column) });
414
+ return record;
415
+ })
416
+ };
417
+ }
418
+ formatValue(record, column) {
419
+ if (this._provider.formatValue != undefined) {
420
+ return this._provider.formatValue(record, column);
421
+ }
422
+ return record[column.id] || "";
423
+ }
424
+ }
425
+ const TYPE_MAP = {
426
+ [UserInterface.DATE]: { type: "D", align: "center" },
427
+ [UserInterface.DATETIME]: { type: "H", align: "center" },
428
+ [UserInterface.TIME]: { type: "I", align: "right" },
429
+ [UserInterface.ELAPSEDTIME]: { type: "I", align: "right" },
430
+ [UserInterface.DECIMALNUMBER]: { type: "F", align: "right" },
431
+ [UserInterface.INTEGERNUMBER]: { type: "I", align: "right" },
432
+ [UserInterface.SEARCH]: { type: "S", align: "right" }
433
+ };
434
+
212
435
  const snkDataExporterCss = ".sc-snk-data-exporter-h{display:flex;width:fit-content;height:fit-content}.snk-data-exporter.sc-snk-data-exporter{display:flex;width:fit-content;height:fit-content}.snk-data-exporter__dropdown.sc-snk-data-exporter{display:none}.snk-data-exporter__dropdown--show.sc-snk-data-exporter{display:flex;flex-direction:column;position:fixed}.snk-data-exporter__dropdown.sc-snk-data-exporter>ez-dropdown.sc-snk-data-exporter{position:relative}";
213
436
 
214
- const LIMIT_PER_EXPORT = 5000;
215
437
  const SnkDataExporter = class {
216
438
  constructor(hostRef) {
217
439
  registerInstance(this, hostRef);
218
440
  this._selectedNumber = 0;
219
441
  this._customPrefix = "$custom$";
220
- this._items = [];
221
- this._showDropdown = false;
222
442
  this._releasedToExport = [
223
443
  DataExporterOption.EXPORT_TO_PDF,
224
444
  DataExporterOption.EXPORT_TO_XLS,
@@ -226,8 +446,12 @@ const SnkDataExporter = class {
226
446
  DataExporterOption.EXPORT_PDF_TO_EMAIL,
227
447
  DataExporterOption.EXPORT_XLS_TO_EMAIL,
228
448
  DataExporterOption.EXPORT_PAGE_TO_PDF,
229
- DataExporterOption.EXPORT_PAGE_TO_XLS
449
+ DataExporterOption.EXPORT_PAGE_TO_XLS,
450
+ DataExporterOption.EXPORT_ALL_RECORDS_TO_PDF,
451
+ DataExporterOption.EXPORT_ALL_RECORDS_TO_XLS,
230
452
  ];
453
+ this._items = [];
454
+ this._showDropdown = false;
231
455
  this.provider = null;
232
456
  this.messagesBuilder = undefined;
233
457
  }
@@ -298,31 +522,7 @@ const SnkDataExporter = class {
298
522
  if (this.provider == undefined || resolveProps == undefined || callbackResolver == undefined) {
299
523
  return;
300
524
  }
301
- const filters = this.provider.getFilters();
302
- const columns = await this.provider.getColumnsMetadata();
303
- const sort = this.provider.getOrders();
304
- const resourceURI = this.provider.getResourceURI();
305
- const selectedIDs = this.provider.getSelectedIDs();
306
- const option = resolveProps.exportOption;
307
- const currentPageOptions = [
308
- DataExporterOption.EXPORT_PAGE_TO_PDF,
309
- DataExporterOption.EXPORT_PAGE_TO_XLS
310
- ];
311
- delete resolveProps.exportOption;
312
- let params = Object.assign({ filters,
313
- columns,
314
- sort,
315
- resourceURI, selectedIDs: selectedIDs.slice(0, LIMIT_PER_EXPORT) }, resolveProps);
316
- if (currentPageOptions.includes(option) || resolveProps.type == "page") {
317
- const offset = this.provider.getOffset();
318
- const limit = this.provider.getLimit();
319
- params = Object.assign(Object.assign({}, params), { offset,
320
- limit, selectedIDs: [] });
321
- }
322
- else if (resolveProps.type == "all") {
323
- params = Object.assign(Object.assign({}, params), { offset: 0, limit: LIMIT_PER_EXPORT, selectedIDs: [] });
324
- }
325
- fetchDataExporter(params)
525
+ this.getExporterStrategy().executeExport(resolveProps)
326
526
  .then((result) => callbackResolver(result))
327
527
  .catch((exception) => {
328
528
  console.error(exception);
@@ -330,14 +530,26 @@ const SnkDataExporter = class {
330
530
  ApplicationUtils.error(title || this.getMessage("snkDataExporter.message.exportError"), statusMessage || message || this.getMessage("snkDataExporter.message.unknownFailure"));
331
531
  });
332
532
  }
533
+ getExporterStrategy() {
534
+ return this.provider.getRecords == undefined ? new ServerSideExporterStrategy(this.provider) : new ClientSideExporterStrategy(this.provider);
535
+ }
333
536
  getOptionKey(option) {
334
537
  return Object.keys(DataExporterOption)
335
538
  .find((key) => {
336
539
  return DataExporterOption[key] === option;
337
540
  });
338
541
  }
339
- dispatchExporter(option) {
340
- var _a;
542
+ getExportType(option) {
543
+ if (option === DataExporterOption.EXPORT_ALL_RECORDS_TO_PDF || option === DataExporterOption.EXPORT_ALL_RECORDS_TO_XLS) {
544
+ return 'all';
545
+ }
546
+ if (option === DataExporterOption.EXPORT_PAGE_TO_PDF || option === DataExporterOption.EXPORT_PAGE_TO_XLS) {
547
+ return 'page';
548
+ }
549
+ return 'selection';
550
+ }
551
+ async dispatchExporter(option) {
552
+ var _a, _b, _c;
341
553
  const optionKey = this.getOptionKey(option);
342
554
  const fileType = (_a = DataExporterType[optionKey]) !== null && _a !== void 0 ? _a : DataExporterType.EXPORT_TO_PDF;
343
555
  const isDownload = DataExporterType[optionKey] === DataExporterType.EXPORT_TO_XLS;
@@ -346,15 +558,21 @@ const SnkDataExporter = class {
346
558
  fileName: this._appLabel,
347
559
  titleGrid: this._appLabel,
348
560
  exportOption: option,
349
- limit: LIMIT_PER_EXPORT
561
+ limit: (_c = (_b = this.provider) === null || _b === void 0 ? void 0 : _b.getExportLimit) === null || _c === void 0 ? void 0 : _c.call(_b),
562
+ type: this.getExportType(option),
350
563
  };
351
- this.resolveExporter(params, (response) => {
352
- fileViewer(Object.assign(Object.assign({}, response), { fileType,
353
- isDownload }));
564
+ await this.resolveExporter(params, (response) => {
565
+ if (response.canExport || fileType === DataExporterType.EXPORT_TO_PDF) {
566
+ fileViewer(Object.assign(Object.assign({}, response), { fileType,
567
+ isDownload }));
568
+ }
569
+ else {
570
+ ApplicationUtils.error(this.getMessage("snkDataExporter.title.permission"), this.getMessage("snkDataExporter.message.exportPermission"));
571
+ }
354
572
  });
355
573
  }
356
574
  async processExporter(evt) {
357
- var _a, _b, _c, _d;
575
+ var _a, _b, _c, _d, _e, _f, _g;
358
576
  const item = evt === null || evt === void 0 ? void 0 : evt.detail;
359
577
  const exportCurrentPageOptions = [DataExporterOption.EXPORT_PAGE_TO_PDF, DataExporterOption.EXPORT_PAGE_TO_XLS];
360
578
  const isCustomReport = (_a = item === null || item === void 0 ? void 0 : item.id) === null || _a === void 0 ? void 0 : _a.includes(this._customPrefix);
@@ -362,18 +580,19 @@ const SnkDataExporter = class {
362
580
  return;
363
581
  const selectedRecords = (_b = this.provider) === null || _b === void 0 ? void 0 : _b.getSelectedIDs();
364
582
  const totalRecords = (_c = this.provider) === null || _c === void 0 ? void 0 : _c.getTotalRecords();
365
- const totalPerPage = (_d = this.provider) === null || _d === void 0 ? void 0 : _d.getLimit();
583
+ const totalPerPage = (_e = (_d = this.provider) === null || _d === void 0 ? void 0 : _d.getPageSize) === null || _e === void 0 ? void 0 : _e.call(_d);
584
+ const exportLimit = (_g = (_f = this.provider) === null || _f === void 0 ? void 0 : _f.getExportLimit) === null || _g === void 0 ? void 0 : _g.call(_f);
366
585
  let limitExceeded = false;
367
- if ((exportCurrentPageOptions.includes(item === null || item === void 0 ? void 0 : item.id) && totalPerPage <= LIMIT_PER_EXPORT) || isCustomReport) {
586
+ if ((exportCurrentPageOptions.includes(item === null || item === void 0 ? void 0 : item.id) && totalPerPage <= exportLimit) || isCustomReport) {
368
587
  limitExceeded = false;
369
588
  }
370
589
  else if (selectedRecords === null || selectedRecords === void 0 ? void 0 : selectedRecords.length) {
371
- limitExceeded = selectedRecords.length > LIMIT_PER_EXPORT;
590
+ limitExceeded = selectedRecords.length > exportLimit;
372
591
  }
373
- else if (totalRecords > LIMIT_PER_EXPORT)
592
+ else if (totalRecords > exportLimit)
374
593
  limitExceeded = true;
375
594
  if (limitExceeded) {
376
- const formattedLimit = LIMIT_PER_EXPORT.toLocaleString('pt-BR', { minimumFractionDigits: 0 });
595
+ const formattedLimit = exportLimit.toLocaleString('pt-BR', { minimumFractionDigits: 0 });
377
596
  const limitModalMessages = {
378
597
  title: this.getMessage("snkDataExporter.limitExceeded.title"),
379
598
  description: `
@@ -398,7 +617,7 @@ const SnkDataExporter = class {
398
617
  this._showDropdown = false;
399
618
  return;
400
619
  }
401
- if (!this._releasedToExport.includes(item === null || item === void 0 ? void 0 : item.id)) {
620
+ if (!this.getFilteredReleasedToExport().includes(item === null || item === void 0 ? void 0 : item.id)) {
402
621
  return;
403
622
  }
404
623
  if (item.id === DataExporterOption.EXPORT_BY_EMAIL) {
@@ -409,9 +628,20 @@ const SnkDataExporter = class {
409
628
  }
410
629
  this._showDropdown = false;
411
630
  }
631
+ getFilteredReleasedToExport() {
632
+ var _a, _b;
633
+ if (this.provider == undefined) {
634
+ return this._releasedToExport;
635
+ }
636
+ const hiddenOptions = (_b = (_a = this.provider).getHiddenOptions) === null || _b === void 0 ? void 0 : _b.call(_a);
637
+ if (hiddenOptions == undefined) {
638
+ return this._releasedToExport;
639
+ }
640
+ return this._releasedToExport.filter(option => !hiddenOptions.includes(option));
641
+ }
412
642
  loadItems() {
413
643
  const items = [];
414
- this._releasedToExport
644
+ this.getFilteredReleasedToExport()
415
645
  .forEach((option) => {
416
646
  var _a;
417
647
  (_a = this._itemBuilder) === null || _a === void 0 ? void 0 : _a.setExportOption(option, items);
@@ -419,8 +649,8 @@ const SnkDataExporter = class {
419
649
  this.loadPersonalizedItems(items);
420
650
  }
421
651
  async loadPersonalizedItems(items) {
422
- var _a;
423
- const recordID = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getRecordID();
652
+ var _a, _b;
653
+ const recordID = (_b = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getRecordID) === null || _b === void 0 ? void 0 : _b.call(_a);
424
654
  if (recordID == undefined) {
425
655
  this._items = items;
426
656
  return;
@@ -436,10 +666,10 @@ const SnkDataExporter = class {
436
666
  this._items = items;
437
667
  }
438
668
  openPersonalizedReports(option) {
439
- var _a;
669
+ var _a, _b;
440
670
  const pkObject = [];
441
671
  const appId = (option === null || option === void 0 ? void 0 : option.replace(this._customPrefix, "")) || "";
442
- (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs().forEach(({ name, type, value }, index) => {
672
+ (_b = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs) === null || _b === void 0 ? void 0 : _b.call(_a).forEach(({ name, type, value }, index) => {
443
673
  const fields = {};
444
674
  fields['fields'] = [];
445
675
  // Se for o primeiro elemento, adiciona essa primeira PK
@@ -464,8 +694,8 @@ const SnkDataExporter = class {
464
694
  }
465
695
  }
466
696
  loadDropdown() {
467
- var _a, _b;
468
- this._selectedNumber = ((_b = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs()) === null || _b === void 0 ? void 0 : _b.length) || 0;
697
+ var _a;
698
+ this._selectedNumber = ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedNumber()) || 0;
469
699
  this._itemBuilder = new ItemBuilder(this.getMessage.bind(this), this._selectedNumber);
470
700
  this.loadItems();
471
701
  }