@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.
- package/dist/cjs/{ConfigStorage-942ce74b.js → ConfigStorage-0a690675.js} +2 -2
- package/dist/cjs/{DataFetcher-313debd8.js → DataFetcher-77729a93.js} +7 -2
- package/dist/cjs/{SnkFormConfigManager-1b13bacd.js → SnkFormConfigManager-d6d5db6d.js} +5 -8
- package/dist/cjs/{SnkMessageBuilder-722b104e.js → SnkMessageBuilder-96b0f549.js} +13 -9
- package/dist/cjs/{IExporterProvider-597949f9.js → SnkMultiSelectionListDataSource-f79d220c.js} +6 -96
- package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-29bb791c.js} +1 -1
- package/dist/cjs/{form-config-fetcher-2dd00e5b.js → form-config-fetcher-feb08214.js} +1 -1
- package/dist/cjs/{index-1dfc7a6e.js → index-0922807b.js} +0 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{dataunit-fetcher-688d3f05.js → pesquisa-fetcher-cba1b3d0.js} +181 -88
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +5 -7
- package/dist/cjs/snk-application.cjs.entry.js +15 -38
- package/dist/cjs/snk-attach.cjs.entry.js +49 -74
- package/dist/cjs/snk-crud.cjs.entry.js +13 -99
- package/dist/cjs/snk-data-exporter.cjs.entry.js +88 -318
- package/dist/cjs/snk-data-unit-559ac55c.js +462 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -12
- package/dist/cjs/snk-detail-view.cjs.entry.js +10 -51
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar.cjs.entry.js +14 -9
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form-config.cjs.entry.js +2 -2
- package/dist/cjs/snk-form-view.cjs.entry.js +0 -67
- package/dist/cjs/snk-form.cjs.entry.js +9 -54
- package/dist/cjs/snk-grid.cjs.entry.js +112 -169
- package/dist/cjs/{snk-guides-viewer-67605336.js → snk-guides-viewer-bfcad2d6.js} +10 -38
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -11
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-simple-crud.cjs.entry.js +40 -267
- package/dist/cjs/snk-taskbar.cjs.entry.js +3 -4
- package/dist/cjs/{taskbar-elements-9ad1f9c0.js → taskbar-elements-3ecd1278.js} +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/snk-application/snk-application.js +11 -35
- package/dist/collection/components/snk-attach/snk-attach.js +44 -67
- package/dist/collection/components/snk-crud/snk-crud.js +7 -249
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +0 -135
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +0 -161
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +5 -112
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +1 -1
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -54
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +52 -59
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +2 -64
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +214 -507
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +11 -23
- package/dist/collection/components/snk-form/snk-form.js +5 -102
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +3 -6
- package/dist/collection/components/snk-grid/snk-grid.css +0 -2
- package/dist/collection/components/snk-grid/snk-grid.js +102 -241
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +18 -386
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +2 -2
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +1 -2
- package/dist/collection/lib/@types/index.js +0 -5
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +3 -7
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +8 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +0 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +0 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +13 -11
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +0 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +4 -53
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +34 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -4
- package/dist/collection/lib/message/SnkMessageBuilder.js +12 -5
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +0 -2
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +0 -1
- package/dist/collection/lib/message/resources/snk-exporter.msg.js +1 -1
- package/dist/components/DataFetcher.js +8 -3
- package/dist/components/SnkFormConfigManager.js +3 -6
- package/dist/components/SnkMessageBuilder.js +13 -9
- package/dist/components/dataunit-fetcher.js +182 -84
- package/dist/components/{IExporterProvider.js → field-search.js} +6 -93
- package/dist/components/index2.js +33 -198
- package/dist/components/index3.js +199 -0
- package/dist/components/snk-actions-button2.js +11 -4
- package/dist/components/snk-application2.js +9 -31
- package/dist/components/snk-attach2.js +41 -65
- package/dist/components/snk-crud.js +11 -103
- package/dist/components/snk-data-exporter2.js +87 -311
- package/dist/components/snk-data-unit2.js +212 -470
- package/dist/components/snk-detail-view2.js +10 -87
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-expression-item2.js +1 -1
- package/dist/components/snk-filter-bar2.js +11 -7
- package/dist/components/snk-form-view2.js +1 -72
- package/dist/components/snk-form.js +6 -53
- package/dist/components/snk-grid2.js +108 -170
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-simple-crud2.js +23 -259
- package/dist/components/snk-taskbar2.js +5 -6
- package/dist/esm/{ConfigStorage-86187da3.js → ConfigStorage-8c2ddac8.js} +2 -2
- package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-773a3e4b.js} +8 -3
- package/dist/esm/{SnkFormConfigManager-d4554df9.js → SnkFormConfigManager-c01b9d9d.js} +5 -8
- package/dist/esm/{SnkMessageBuilder-89925609.js → SnkMessageBuilder-72423074.js} +13 -9
- package/dist/esm/{IExporterProvider-63a188b6.js → SnkMultiSelectionListDataSource-a4805051.js} +7 -95
- package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-a411f73c.js} +1 -1
- package/dist/esm/{form-config-fetcher-30fb808f.js → form-config-fetcher-e0382e5a.js} +1 -1
- package/dist/esm/{index-3aa4977a.js → index-0ece87a6.js} +1 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-264191b2.js → pesquisa-fetcher-34a8b8be.js} +182 -84
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_4.entry.js +5 -7
- package/dist/esm/snk-application.entry.js +14 -37
- package/dist/esm/snk-attach.entry.js +44 -69
- package/dist/esm/snk-crud.entry.js +13 -99
- package/dist/esm/snk-data-exporter.entry.js +89 -319
- package/dist/esm/snk-data-unit-44215df7.js +460 -0
- package/dist/esm/snk-data-unit.entry.js +2 -12
- package/dist/esm/snk-detail-view.entry.js +10 -51
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-filter-bar.entry.js +14 -9
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form-config.entry.js +2 -2
- package/dist/esm/snk-form-view.entry.js +0 -67
- package/dist/esm/snk-form.entry.js +9 -54
- package/dist/esm/snk-grid.entry.js +110 -167
- package/dist/esm/{snk-guides-viewer-151f6091.js → snk-guides-viewer-edeac29f.js} +10 -38
- package/dist/esm/snk-guides-viewer.entry.js +9 -11
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-simple-crud.entry.js +28 -255
- package/dist/esm/snk-taskbar.entry.js +3 -4
- package/dist/esm/{taskbar-elements-d59867f1.js → taskbar-elements-2473c8ac.js} +3 -3
- package/dist/sankhyablocks/p-03dcc5ff.entry.js +1 -0
- package/dist/sankhyablocks/{p-913a9979.js → p-0cd3c0a9.js} +1 -1
- package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
- package/dist/sankhyablocks/p-176c3491.entry.js +1 -0
- package/dist/sankhyablocks/{p-df5451c7.js → p-181975f1.js} +1 -1
- package/dist/sankhyablocks/p-37e5d563.js +65 -0
- package/dist/sankhyablocks/p-38289a55.js +1 -0
- package/dist/sankhyablocks/{p-a1d72395.entry.js → p-41c2c191.entry.js} +1 -1
- package/dist/sankhyablocks/p-46e55a95.entry.js +1 -0
- package/dist/sankhyablocks/p-4e728357.entry.js +1 -0
- package/dist/sankhyablocks/p-5571bdfe.js +1 -0
- package/dist/sankhyablocks/p-5630574e.js +1 -0
- package/dist/sankhyablocks/p-594bc21d.js +1 -0
- package/dist/sankhyablocks/p-5f8c0426.entry.js +1 -0
- package/dist/sankhyablocks/p-80c64add.entry.js +1 -0
- package/dist/sankhyablocks/p-86af4cc2.js +1 -0
- package/dist/sankhyablocks/p-8b690717.js +1 -0
- package/dist/sankhyablocks/{p-aff76a53.js → p-96621231.js} +1 -1
- package/dist/sankhyablocks/p-a1832166.entry.js +1 -0
- package/dist/sankhyablocks/p-a809d944.entry.js +1 -0
- package/dist/sankhyablocks/p-a97226f6.entry.js +1 -0
- package/dist/sankhyablocks/p-add17f6a.entry.js +1 -0
- package/dist/sankhyablocks/{p-7e7a7473.js → p-ae4fc9a9.js} +1 -1
- package/dist/sankhyablocks/{p-eae7a817.entry.js → p-c2ae0fab.entry.js} +1 -1
- package/dist/sankhyablocks/p-c5a9a5d9.entry.js +1 -0
- package/dist/sankhyablocks/p-c5aa7d70.entry.js +11 -0
- package/dist/sankhyablocks/p-cb0147ab.entry.js +1 -0
- package/dist/sankhyablocks/p-f0145e3b.js +1 -0
- package/dist/sankhyablocks/{p-14a08904.entry.js → p-f03e4199.entry.js} +1 -1
- package/dist/sankhyablocks/p-f607db63.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +3 -7
- package/dist/types/components/snk-attach/snk-attach.d.ts +9 -11
- package/dist/types/components/snk-crud/snk-crud.d.ts +1 -36
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +0 -23
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +3 -28
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +0 -19
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +4 -24
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +1 -4
- package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +0 -21
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +2 -61
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +1 -4
- package/dist/types/components/snk-form/snk-form.d.ts +0 -14
- package/dist/types/components/snk-grid/snk-grid.d.ts +6 -46
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -58
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
- package/dist/types/components.d.ts +4 -220
- package/dist/types/lib/@types/index.d.ts +0 -5
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +1 -2
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +1 -2
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +0 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +0 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +0 -6
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +0 -3
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +1 -2
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +0 -1
- package/package.json +1 -1
- package/dist/cjs/RecordIDUtils-3735135c.js +0 -43
- package/dist/cjs/pesquisa-fetcher-680e198f.js +0 -166
- package/dist/cjs/snk-data-unit-685272e7.js +0 -679
- package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js +0 -1
- package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js +0 -1
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +0 -97
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +0 -74
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +0 -1
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +0 -58
- package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +0 -55
- package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +0 -88
- package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +0 -20
- package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +0 -38
- package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +0 -24
- package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js +0 -18
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +0 -35
- package/dist/collection/lib/dataUnit/ValueFormatter.js +0 -4
- package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js +0 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js +0 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js +0 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js +0 -22
- package/dist/components/ISave.js +0 -47
- package/dist/components/pesquisa-fetcher.js +0 -164
- package/dist/esm/RecordIDUtils-87d02110.js +0 -41
- package/dist/esm/pesquisa-fetcher-03c8f919.js +0 -164
- package/dist/esm/snk-data-unit-63f83504.js +0 -677
- package/dist/sankhyablocks/p-14b9f964.entry.js +0 -1
- package/dist/sankhyablocks/p-19c18d06.entry.js +0 -1
- package/dist/sankhyablocks/p-1db45d26.entry.js +0 -1
- package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
- package/dist/sankhyablocks/p-30cf616e.js +0 -1
- package/dist/sankhyablocks/p-3a212712.js +0 -1
- package/dist/sankhyablocks/p-47b60deb.entry.js +0 -1
- package/dist/sankhyablocks/p-7505da04.entry.js +0 -1
- package/dist/sankhyablocks/p-75f83d1d.entry.js +0 -1
- package/dist/sankhyablocks/p-7a337364.js +0 -1
- package/dist/sankhyablocks/p-829d4045.js +0 -1
- package/dist/sankhyablocks/p-82a0bfb0.entry.js +0 -11
- package/dist/sankhyablocks/p-8fc470e5.entry.js +0 -1
- package/dist/sankhyablocks/p-941bf3ef.entry.js +0 -1
- package/dist/sankhyablocks/p-9863d682.js +0 -1
- package/dist/sankhyablocks/p-af8efd95.js +0 -6
- package/dist/sankhyablocks/p-b4b21558.entry.js +0 -1
- package/dist/sankhyablocks/p-bad55caa.entry.js +0 -1
- package/dist/sankhyablocks/p-c053256c.entry.js +0 -1
- package/dist/sankhyablocks/p-c5268346.entry.js +0 -1
- package/dist/sankhyablocks/p-cefba299.js +0 -1
- package/dist/sankhyablocks/p-dc7c9047.js +0 -1
- package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
- package/dist/sankhyablocks/p-fcac4dfc.js +0 -1
- package/dist/sankhyablocks/p-fe79f83a.js +0 -60
- package/dist/types/components/snk-crud/interfaces/PropsCustomEditor.d.ts +0 -4
- package/dist/types/components/snk-crud/interfaces/PropsCustomRender.d.ts +0 -4
- package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +0 -14
- package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +0 -12
- package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +0 -5
- package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +0 -17
- package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +0 -17
- package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +0 -77
- package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +0 -4
- package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
- package/dist/types/components/snk-data-unit/test/resources/metadataMock.d.ts +0 -3
- package/dist/types/components/snk-data-unit/test/resources/parentMetadataMock.d.ts +0 -3
- package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +0 -11
- package/dist/types/lib/dataUnit/ValueFormatter.d.ts +0 -2
- package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +0 -3
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.d.ts +0 -10
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.d.ts +0 -7
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.d.ts +0 -20
|
@@ -4,15 +4,17 @@ import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/
|
|
|
4
4
|
import { ItemBuilder } from './structure/ItemBuilder';
|
|
5
5
|
import { DataExporterFormat, DataExporterOption, DataExporterType } from '../../lib/@types';
|
|
6
6
|
import { REPORT_LAUNCHER_RESOURCE_ID } from '../../lib/utils/constants';
|
|
7
|
+
import fetchDataExporter from '../../lib/http/data-fetcher/fetchers/fetchDataExporter';
|
|
7
8
|
import fileViewer from '../../lib/utils/fileViewer';
|
|
8
9
|
import getPersonalizedReports from '../../lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher';
|
|
9
10
|
import { SnkDataUnit } from '../snk-data-unit/snk-data-unit';
|
|
10
|
-
|
|
11
|
-
import ClientSideExporterStrategy from './exporter-strategy/ClientSideExporterStrategy';
|
|
11
|
+
const LIMIT_PER_EXPORT = 5000;
|
|
12
12
|
export class SnkDataExporter {
|
|
13
13
|
constructor() {
|
|
14
14
|
this._selectedNumber = 0;
|
|
15
15
|
this._customPrefix = "$custom$";
|
|
16
|
+
this._items = [];
|
|
17
|
+
this._showDropdown = false;
|
|
16
18
|
this._releasedToExport = [
|
|
17
19
|
DataExporterOption.EXPORT_TO_PDF,
|
|
18
20
|
DataExporterOption.EXPORT_TO_XLS,
|
|
@@ -20,12 +22,8 @@ export class SnkDataExporter {
|
|
|
20
22
|
DataExporterOption.EXPORT_PDF_TO_EMAIL,
|
|
21
23
|
DataExporterOption.EXPORT_XLS_TO_EMAIL,
|
|
22
24
|
DataExporterOption.EXPORT_PAGE_TO_PDF,
|
|
23
|
-
DataExporterOption.EXPORT_PAGE_TO_XLS
|
|
24
|
-
DataExporterOption.EXPORT_ALL_RECORDS_TO_PDF,
|
|
25
|
-
DataExporterOption.EXPORT_ALL_RECORDS_TO_XLS,
|
|
25
|
+
DataExporterOption.EXPORT_PAGE_TO_XLS
|
|
26
26
|
];
|
|
27
|
-
this._items = [];
|
|
28
|
-
this._showDropdown = false;
|
|
29
27
|
this.provider = null;
|
|
30
28
|
this.messagesBuilder = undefined;
|
|
31
29
|
}
|
|
@@ -96,7 +94,31 @@ export class SnkDataExporter {
|
|
|
96
94
|
if (this.provider == undefined || resolveProps == undefined || callbackResolver == undefined) {
|
|
97
95
|
return;
|
|
98
96
|
}
|
|
99
|
-
this.
|
|
97
|
+
const filters = this.provider.getFilters();
|
|
98
|
+
const columns = await this.provider.getColumnsMetadata();
|
|
99
|
+
const sort = this.provider.getOrders();
|
|
100
|
+
const resourceURI = this.provider.getResourceURI();
|
|
101
|
+
const selectedIDs = this.provider.getSelectedIDs();
|
|
102
|
+
const option = resolveProps.exportOption;
|
|
103
|
+
const currentPageOptions = [
|
|
104
|
+
DataExporterOption.EXPORT_PAGE_TO_PDF,
|
|
105
|
+
DataExporterOption.EXPORT_PAGE_TO_XLS
|
|
106
|
+
];
|
|
107
|
+
delete resolveProps.exportOption;
|
|
108
|
+
let params = Object.assign({ filters,
|
|
109
|
+
columns,
|
|
110
|
+
sort,
|
|
111
|
+
resourceURI, selectedIDs: selectedIDs.slice(0, LIMIT_PER_EXPORT) }, resolveProps);
|
|
112
|
+
if (currentPageOptions.includes(option) || resolveProps.type == "page") {
|
|
113
|
+
const offset = this.provider.getOffset();
|
|
114
|
+
const limit = this.provider.getLimit();
|
|
115
|
+
params = Object.assign(Object.assign({}, params), { offset,
|
|
116
|
+
limit, selectedIDs: [] });
|
|
117
|
+
}
|
|
118
|
+
else if (resolveProps.type == "all") {
|
|
119
|
+
params = Object.assign(Object.assign({}, params), { offset: 0, limit: LIMIT_PER_EXPORT, selectedIDs: [] });
|
|
120
|
+
}
|
|
121
|
+
fetchDataExporter(params)
|
|
100
122
|
.then((result) => callbackResolver(result))
|
|
101
123
|
.catch((exception) => {
|
|
102
124
|
console.error(exception);
|
|
@@ -104,26 +126,14 @@ export class SnkDataExporter {
|
|
|
104
126
|
ApplicationUtils.error(title || this.getMessage("snkDataExporter.message.exportError"), statusMessage || message || this.getMessage("snkDataExporter.message.unknownFailure"));
|
|
105
127
|
});
|
|
106
128
|
}
|
|
107
|
-
getExporterStrategy() {
|
|
108
|
-
return this.provider.getRecords == undefined ? new ServerSideExporterStrategy(this.provider) : new ClientSideExporterStrategy(this.provider);
|
|
109
|
-
}
|
|
110
129
|
getOptionKey(option) {
|
|
111
130
|
return Object.keys(DataExporterOption)
|
|
112
131
|
.find((key) => {
|
|
113
132
|
return DataExporterOption[key] === option;
|
|
114
133
|
});
|
|
115
134
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return 'all';
|
|
119
|
-
}
|
|
120
|
-
if (option === DataExporterOption.EXPORT_PAGE_TO_PDF || option === DataExporterOption.EXPORT_PAGE_TO_XLS) {
|
|
121
|
-
return 'page';
|
|
122
|
-
}
|
|
123
|
-
return 'selection';
|
|
124
|
-
}
|
|
125
|
-
async dispatchExporter(option) {
|
|
126
|
-
var _a, _b, _c;
|
|
135
|
+
dispatchExporter(option) {
|
|
136
|
+
var _a;
|
|
127
137
|
const optionKey = this.getOptionKey(option);
|
|
128
138
|
const fileType = (_a = DataExporterType[optionKey]) !== null && _a !== void 0 ? _a : DataExporterType.EXPORT_TO_PDF;
|
|
129
139
|
const isDownload = DataExporterType[optionKey] === DataExporterType.EXPORT_TO_XLS;
|
|
@@ -132,21 +142,15 @@ export class SnkDataExporter {
|
|
|
132
142
|
fileName: this._appLabel,
|
|
133
143
|
titleGrid: this._appLabel,
|
|
134
144
|
exportOption: option,
|
|
135
|
-
limit:
|
|
136
|
-
type: this.getExportType(option),
|
|
145
|
+
limit: LIMIT_PER_EXPORT
|
|
137
146
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
isDownload }));
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
ApplicationUtils.error(this.getMessage("snkDataExporter.title.permission"), this.getMessage("snkDataExporter.message.exportPermission"));
|
|
145
|
-
}
|
|
147
|
+
this.resolveExporter(params, (response) => {
|
|
148
|
+
fileViewer(Object.assign(Object.assign({}, response), { fileType,
|
|
149
|
+
isDownload }));
|
|
146
150
|
});
|
|
147
151
|
}
|
|
148
152
|
async processExporter(evt) {
|
|
149
|
-
var _a, _b, _c, _d
|
|
153
|
+
var _a, _b, _c, _d;
|
|
150
154
|
const item = evt === null || evt === void 0 ? void 0 : evt.detail;
|
|
151
155
|
const exportCurrentPageOptions = [DataExporterOption.EXPORT_PAGE_TO_PDF, DataExporterOption.EXPORT_PAGE_TO_XLS];
|
|
152
156
|
const isCustomReport = (_a = item === null || item === void 0 ? void 0 : item.id) === null || _a === void 0 ? void 0 : _a.includes(this._customPrefix);
|
|
@@ -154,19 +158,18 @@ export class SnkDataExporter {
|
|
|
154
158
|
return;
|
|
155
159
|
const selectedRecords = (_b = this.provider) === null || _b === void 0 ? void 0 : _b.getSelectedIDs();
|
|
156
160
|
const totalRecords = (_c = this.provider) === null || _c === void 0 ? void 0 : _c.getTotalRecords();
|
|
157
|
-
const totalPerPage = (
|
|
158
|
-
const exportLimit = (_g = (_f = this.provider) === null || _f === void 0 ? void 0 : _f.getExportLimit) === null || _g === void 0 ? void 0 : _g.call(_f);
|
|
161
|
+
const totalPerPage = (_d = this.provider) === null || _d === void 0 ? void 0 : _d.getLimit();
|
|
159
162
|
let limitExceeded = false;
|
|
160
|
-
if ((exportCurrentPageOptions.includes(item === null || item === void 0 ? void 0 : item.id) && totalPerPage <=
|
|
163
|
+
if ((exportCurrentPageOptions.includes(item === null || item === void 0 ? void 0 : item.id) && totalPerPage <= LIMIT_PER_EXPORT) || isCustomReport) {
|
|
161
164
|
limitExceeded = false;
|
|
162
165
|
}
|
|
163
166
|
else if (selectedRecords === null || selectedRecords === void 0 ? void 0 : selectedRecords.length) {
|
|
164
|
-
limitExceeded = selectedRecords.length >
|
|
167
|
+
limitExceeded = selectedRecords.length > LIMIT_PER_EXPORT;
|
|
165
168
|
}
|
|
166
|
-
else if (totalRecords >
|
|
169
|
+
else if (totalRecords > LIMIT_PER_EXPORT)
|
|
167
170
|
limitExceeded = true;
|
|
168
171
|
if (limitExceeded) {
|
|
169
|
-
const formattedLimit =
|
|
172
|
+
const formattedLimit = LIMIT_PER_EXPORT.toLocaleString('pt-BR', { minimumFractionDigits: 0 });
|
|
170
173
|
const limitModalMessages = {
|
|
171
174
|
title: this.getMessage("snkDataExporter.limitExceeded.title"),
|
|
172
175
|
description: `
|
|
@@ -191,7 +194,7 @@ export class SnkDataExporter {
|
|
|
191
194
|
this._showDropdown = false;
|
|
192
195
|
return;
|
|
193
196
|
}
|
|
194
|
-
if (!this.
|
|
197
|
+
if (!this._releasedToExport.includes(item === null || item === void 0 ? void 0 : item.id)) {
|
|
195
198
|
return;
|
|
196
199
|
}
|
|
197
200
|
if (item.id === DataExporterOption.EXPORT_BY_EMAIL) {
|
|
@@ -202,20 +205,9 @@ export class SnkDataExporter {
|
|
|
202
205
|
}
|
|
203
206
|
this._showDropdown = false;
|
|
204
207
|
}
|
|
205
|
-
getFilteredReleasedToExport() {
|
|
206
|
-
var _a, _b;
|
|
207
|
-
if (this.provider == undefined) {
|
|
208
|
-
return this._releasedToExport;
|
|
209
|
-
}
|
|
210
|
-
const hiddenOptions = (_b = (_a = this.provider).getHiddenOptions) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
211
|
-
if (hiddenOptions == undefined) {
|
|
212
|
-
return this._releasedToExport;
|
|
213
|
-
}
|
|
214
|
-
return this._releasedToExport.filter(option => !hiddenOptions.includes(option));
|
|
215
|
-
}
|
|
216
208
|
loadItems() {
|
|
217
209
|
const items = [];
|
|
218
|
-
this.
|
|
210
|
+
this._releasedToExport
|
|
219
211
|
.forEach((option) => {
|
|
220
212
|
var _a;
|
|
221
213
|
(_a = this._itemBuilder) === null || _a === void 0 ? void 0 : _a.setExportOption(option, items);
|
|
@@ -223,8 +215,8 @@ export class SnkDataExporter {
|
|
|
223
215
|
this.loadPersonalizedItems(items);
|
|
224
216
|
}
|
|
225
217
|
async loadPersonalizedItems(items) {
|
|
226
|
-
var _a
|
|
227
|
-
const recordID = (
|
|
218
|
+
var _a;
|
|
219
|
+
const recordID = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getRecordID();
|
|
228
220
|
if (recordID == undefined) {
|
|
229
221
|
this._items = items;
|
|
230
222
|
return;
|
|
@@ -240,10 +232,10 @@ export class SnkDataExporter {
|
|
|
240
232
|
this._items = items;
|
|
241
233
|
}
|
|
242
234
|
openPersonalizedReports(option) {
|
|
243
|
-
var _a
|
|
235
|
+
var _a;
|
|
244
236
|
const pkObject = [];
|
|
245
237
|
const appId = (option === null || option === void 0 ? void 0 : option.replace(this._customPrefix, "")) || "";
|
|
246
|
-
(
|
|
238
|
+
(_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs().forEach(({ name, type, value }, index) => {
|
|
247
239
|
const fields = {};
|
|
248
240
|
fields['fields'] = [];
|
|
249
241
|
// Se for o primeiro elemento, adiciona essa primeira PK
|
|
@@ -268,8 +260,8 @@ export class SnkDataExporter {
|
|
|
268
260
|
}
|
|
269
261
|
}
|
|
270
262
|
loadDropdown() {
|
|
271
|
-
var _a;
|
|
272
|
-
this._selectedNumber = ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.
|
|
263
|
+
var _a, _b;
|
|
264
|
+
this._selectedNumber = ((_b = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs()) === null || _b === void 0 ? void 0 : _b.length) || 0;
|
|
273
265
|
this._itemBuilder = new ItemBuilder(this.getMessage.bind(this), this._selectedNumber);
|
|
274
266
|
this.loadItems();
|
|
275
267
|
}
|
|
@@ -379,7 +371,8 @@ export class SnkDataExporter {
|
|
|
379
371
|
static get states() {
|
|
380
372
|
return {
|
|
381
373
|
"_items": {},
|
|
382
|
-
"_showDropdown": {}
|
|
374
|
+
"_showDropdown": {},
|
|
375
|
+
"_releasedToExport": {}
|
|
383
376
|
};
|
|
384
377
|
}
|
|
385
378
|
static get elementRef() { return "_element"; }
|
|
@@ -19,9 +19,6 @@ export class ItemBuilder {
|
|
|
19
19
|
items.push(this.getExportToXLS(groupName));
|
|
20
20
|
}
|
|
21
21
|
this.setExportCurrentPage(option, items);
|
|
22
|
-
if (this._selectedNumber > 0) {
|
|
23
|
-
this.setExportAllRecords(option, items);
|
|
24
|
-
}
|
|
25
22
|
this.setExportByEmail(option, items);
|
|
26
23
|
}
|
|
27
24
|
/**
|
|
@@ -52,34 +49,6 @@ export class ItemBuilder {
|
|
|
52
49
|
}
|
|
53
50
|
}
|
|
54
51
|
}
|
|
55
|
-
/**
|
|
56
|
-
* Método responsável por inserir os itens de exportação para todos os registros.
|
|
57
|
-
* @param option - Nome da opção que será inserida no array.
|
|
58
|
-
* @param items - Array que será alimentado com as opções permitidas.
|
|
59
|
-
*/
|
|
60
|
-
setExportAllRecords(option, items) {
|
|
61
|
-
var _a;
|
|
62
|
-
const pageOptions = [DataExporterOption.EXPORT_ALL_RECORDS_TO_PDF, DataExporterOption.EXPORT_ALL_RECORDS_TO_XLS];
|
|
63
|
-
if (option === DataExporterOption.EXPORT_ALL_RECORDS) {
|
|
64
|
-
items.push(this.getAllRecords());
|
|
65
|
-
}
|
|
66
|
-
if (pageOptions.includes(option)) {
|
|
67
|
-
let item = items.find((item) => item.id === DataExporterOption.EXPORT_ALL_RECORDS);
|
|
68
|
-
if (item == undefined) {
|
|
69
|
-
items.push(this.getAllRecords());
|
|
70
|
-
item = items.find((item) => item.id === DataExporterOption.EXPORT_ALL_RECORDS);
|
|
71
|
-
}
|
|
72
|
-
if (!((_a = item.children) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
73
|
-
item.children = [];
|
|
74
|
-
}
|
|
75
|
-
if (option === DataExporterOption.EXPORT_ALL_RECORDS_TO_PDF) {
|
|
76
|
-
item.children.push(this.getExportAllRecordsToPDF());
|
|
77
|
-
}
|
|
78
|
-
if (option === DataExporterOption.EXPORT_ALL_RECORDS_TO_XLS) {
|
|
79
|
-
item.children.push(this.getExportAllRecordsToXLS());
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
52
|
/**
|
|
84
53
|
* Método responsável por inserir os itens de exportação por e-mail.
|
|
85
54
|
* @param option - Nome da opção que será inserida no array.
|
|
@@ -110,7 +79,7 @@ export class ItemBuilder {
|
|
|
110
79
|
getExportToXLS(groupName) {
|
|
111
80
|
return {
|
|
112
81
|
id: DataExporterOption.EXPORT_TO_XLS,
|
|
113
|
-
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.
|
|
82
|
+
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`,
|
|
114
83
|
group: groupName
|
|
115
84
|
};
|
|
116
85
|
}
|
|
@@ -125,17 +94,6 @@ export class ItemBuilder {
|
|
|
125
94
|
group: this._getMessage("snkDataExporter.group.custom")
|
|
126
95
|
};
|
|
127
96
|
}
|
|
128
|
-
/**
|
|
129
|
-
* Método responsável por capturar o objeto com todos os dados de exportação.
|
|
130
|
-
* @returns Retorna o objeto com todos os dados de exportação.
|
|
131
|
-
*/
|
|
132
|
-
getAllRecords() {
|
|
133
|
-
return {
|
|
134
|
-
id: DataExporterOption.EXPORT_ALL_RECORDS,
|
|
135
|
-
label: this._getMessage("snkDataExporter.label.allRecords"),
|
|
136
|
-
group: this._getMessage("snkDataExporter.group.custom")
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
97
|
/**
|
|
140
98
|
* Método responsável por capturar o objeto com os dados de exportação personalizada em PDF.
|
|
141
99
|
* @returns Retorna o objeto com os dados de exportação personalizada em PDF.
|
|
@@ -153,27 +111,7 @@ export class ItemBuilder {
|
|
|
153
111
|
getExportPageToXLS() {
|
|
154
112
|
return {
|
|
155
113
|
id: DataExporterOption.EXPORT_PAGE_TO_XLS,
|
|
156
|
-
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Método responsável por capturar o objeto com todos os dados de exportação em PDF.
|
|
161
|
-
* @returns Retorna o objeto com todos os dados de exportação em PDF.
|
|
162
|
-
*/
|
|
163
|
-
getExportAllRecordsToPDF() {
|
|
164
|
-
return {
|
|
165
|
-
id: DataExporterOption.EXPORT_ALL_RECORDS_TO_PDF,
|
|
166
|
-
label: "PDF (.pdf)"
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Método responsável por capturar o objeto com todos os dados de exportação em XLS.
|
|
171
|
-
* @returns Retorna o objeto com todos os dados de exportação em XLS.
|
|
172
|
-
*/
|
|
173
|
-
getExportAllRecordsToXLS() {
|
|
174
|
-
return {
|
|
175
|
-
id: DataExporterOption.EXPORT_ALL_RECORDS_TO_XLS,
|
|
176
|
-
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`
|
|
114
|
+
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`
|
|
177
115
|
};
|
|
178
116
|
}
|
|
179
117
|
/**
|