@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.
- package/dist/cjs/{ConfigStorage-e49214c6.js → ConfigStorage-0a690675.js} +0 -1
- package/dist/cjs/{SnkFormConfigManager-beebf47a.js → SnkFormConfigManager-d6d5db6d.js} +7 -8
- package/dist/cjs/{SnkMessageBuilder-cceebbae.js → SnkMessageBuilder-96b0f549.js} +13 -9
- package/dist/cjs/{IExporterProvider-10b7fed5.js → SnkMultiSelectionListDataSource-f79d220c.js} +4 -94
- package/dist/cjs/{index-1dfc7a6e.js → index-0922807b.js} +0 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{dataunit-fetcher-d4873076.js → pesquisa-fetcher-cba1b3d0.js} +180 -87
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +3 -5
- package/dist/cjs/snk-application.cjs.entry.js +12 -35
- package/dist/cjs/snk-attach.cjs.entry.js +46 -71
- package/dist/cjs/snk-crud.cjs.entry.js +10 -101
- package/dist/cjs/snk-data-exporter.cjs.entry.js +85 -315
- 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 -50
- package/dist/cjs/snk-filter-bar.cjs.entry.js +12 -7
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +0 -67
- package/dist/cjs/snk-form.cjs.entry.js +7 -52
- package/dist/cjs/snk-grid.cjs.entry.js +110 -167
- package/dist/cjs/{snk-guides-viewer-aafc3073.js → snk-guides-viewer-bfcad2d6.js} +10 -43
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -9
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +40 -268
- 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 -305
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -136
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +0 -161
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +7 -134
- 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 +0 -62
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +219 -540
- 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 +6 -7
- package/dist/collection/components/snk-form-config/snk-form-config.js +1 -1
- 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 +20 -406
- 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/configs/ConfigStorage.js +0 -1
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +3 -7
- 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 +1 -2
- package/dist/components/ConfigStorage.js +0 -1
- package/dist/components/SnkFormConfigManager.js +6 -7
- 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 -110
- package/dist/components/snk-data-exporter2.js +85 -309
- package/dist/components/snk-data-unit2.js +217 -487
- package/dist/components/snk-detail-view2.js +14 -96
- package/dist/components/snk-expression-item2.js +1 -1
- package/dist/components/snk-filter-bar2.js +11 -7
- package/dist/components/snk-form-config2.js +1 -1
- 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 +25 -263
- package/dist/components/snk-taskbar2.js +5 -6
- package/dist/esm/{ConfigStorage-e476378d.js → ConfigStorage-8c2ddac8.js} +0 -1
- package/dist/esm/{SnkFormConfigManager-298cd647.js → SnkFormConfigManager-c01b9d9d.js} +7 -8
- package/dist/esm/{SnkMessageBuilder-ae87b754.js → SnkMessageBuilder-72423074.js} +13 -9
- package/dist/esm/{IExporterProvider-d597f27d.js → SnkMultiSelectionListDataSource-a4805051.js} +5 -93
- package/dist/esm/{index-3aa4977a.js → index-0ece87a6.js} +1 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-3d2ec959.js → pesquisa-fetcher-34a8b8be.js} +181 -83
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_4.entry.js +3 -5
- package/dist/esm/snk-application.entry.js +11 -34
- package/dist/esm/snk-attach.entry.js +41 -66
- package/dist/esm/snk-crud.entry.js +10 -101
- package/dist/esm/snk-data-exporter.entry.js +86 -316
- 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 -50
- package/dist/esm/snk-filter-bar.entry.js +12 -7
- package/dist/esm/snk-filter-modal-item.entry.js +1 -1
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +0 -67
- package/dist/esm/snk-form.entry.js +7 -52
- package/dist/esm/snk-grid.entry.js +108 -165
- package/dist/esm/{snk-guides-viewer-62124f3d.js → snk-guides-viewer-edeac29f.js} +10 -43
- package/dist/esm/snk-guides-viewer.entry.js +7 -9
- package/dist/esm/snk-personalized-filter.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +28 -256
- 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-176c3491.entry.js +1 -0
- package/dist/sankhyablocks/p-37e5d563.js +65 -0
- package/dist/sankhyablocks/p-38289a55.js +1 -0
- package/dist/sankhyablocks/{p-9dfda04a.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-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-3287a6cc.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-bd008859.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-f03e4199.entry.js +1 -0
- 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 -45
- 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 -24
- 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 +3 -67
- 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-form-config/SnkFormConfigManager.d.ts +2 -2
- 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 -62
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
- package/dist/types/components.d.ts +4 -261
- 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-a1d0353f.js +0 -166
- package/dist/cjs/snk-data-unit-f0221097.js +0 -690
- 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-a87445a0.js +0 -164
- package/dist/esm/snk-data-unit-1ef94aef.js +0 -688
- package/dist/sankhyablocks/p-091ce761.js +0 -60
- package/dist/sankhyablocks/p-0c68f40f.entry.js +0 -1
- package/dist/sankhyablocks/p-162b9a59.entry.js +0 -11
- package/dist/sankhyablocks/p-1db45d26.entry.js +0 -1
- package/dist/sankhyablocks/p-25f1fc39.js +0 -6
- package/dist/sankhyablocks/p-2e9c764c.entry.js +0 -1
- package/dist/sankhyablocks/p-30cf616e.js +0 -1
- package/dist/sankhyablocks/p-421bec84.entry.js +0 -1
- package/dist/sankhyablocks/p-42f7b05d.entry.js +0 -1
- package/dist/sankhyablocks/p-51999ab5.entry.js +0 -1
- package/dist/sankhyablocks/p-52a6a293.entry.js +0 -1
- package/dist/sankhyablocks/p-5f016aed.js +0 -1
- package/dist/sankhyablocks/p-62f34e6f.entry.js +0 -1
- package/dist/sankhyablocks/p-684a2590.entry.js +0 -1
- package/dist/sankhyablocks/p-70001ac1.js +0 -1
- package/dist/sankhyablocks/p-74c665d5.entry.js +0 -1
- package/dist/sankhyablocks/p-76a65660.js +0 -1
- package/dist/sankhyablocks/p-7c4aabe2.js +0 -1
- package/dist/sankhyablocks/p-8c1ff936.entry.js +0 -1
- package/dist/sankhyablocks/p-939e15d3.entry.js +0 -1
- package/dist/sankhyablocks/p-9863d682.js +0 -1
- package/dist/sankhyablocks/p-c273d6ee.js +0 -1
- package/dist/sankhyablocks/p-d65d98ed.entry.js +0 -1
- package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
- 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
|
@@ -9,11 +9,8 @@ export var DataExporterOption;
|
|
|
9
9
|
DataExporterOption["EXPORT_TO_PDF"] = "exportToPDF";
|
|
10
10
|
DataExporterOption["EXPORT_TO_XLS"] = "exportToXLS";
|
|
11
11
|
DataExporterOption["EXPORT_CURRENT_PAGE"] = "exportCurrentPage";
|
|
12
|
-
DataExporterOption["EXPORT_ALL_RECORDS"] = "exportAllRecords";
|
|
13
12
|
DataExporterOption["EXPORT_PAGE_TO_PDF"] = "exportPageToPDF";
|
|
14
13
|
DataExporterOption["EXPORT_PAGE_TO_XLS"] = "exportPageToXLS";
|
|
15
|
-
DataExporterOption["EXPORT_ALL_RECORDS_TO_PDF"] = "exportAllRecordsToPDF";
|
|
16
|
-
DataExporterOption["EXPORT_ALL_RECORDS_TO_XLS"] = "exportAllRecordsToXLS";
|
|
17
14
|
DataExporterOption["EXPORT_BY_EMAIL"] = "exportToEmail";
|
|
18
15
|
DataExporterOption["EXPORT_PDF_TO_EMAIL"] = "exportPDFToEmail";
|
|
19
16
|
DataExporterOption["EXPORT_XLS_TO_EMAIL"] = "exportXLSToEmail";
|
|
@@ -30,8 +27,6 @@ export var DataExporterType;
|
|
|
30
27
|
DataExporterType["EXPORT_TO_XLS"] = "XLS";
|
|
31
28
|
DataExporterType["EXPORT_PAGE_TO_PDF"] = "PDF";
|
|
32
29
|
DataExporterType["EXPORT_PAGE_TO_XLS"] = "XLS";
|
|
33
|
-
DataExporterType["EXPORT_ALL_RECORDS_TO_PDF"] = "PDF";
|
|
34
|
-
DataExporterType["EXPORT_ALL_RECORDS_TO_XLS"] = "XLS";
|
|
35
30
|
DataExporterType["EXPORT_PDF_TO_EMAIL"] = "PDF";
|
|
36
31
|
DataExporterType["EXPORT_XLS_TO_EMAIL"] = "XLS";
|
|
37
32
|
})(DataExporterType || (DataExporterType = {}));
|
|
@@ -71,7 +71,6 @@ export class ConfigStorage {
|
|
|
71
71
|
if (config == undefined) {
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
|
-
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.grid);
|
|
75
74
|
await this.deleteGridConfigCache(name, resourceID);
|
|
76
75
|
return this.gridConfigFetcher.saveConfig(config, name, resourceID);
|
|
77
76
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChangeOperation, DataType, DataUnit, DateUtils, StringUtils, } from '@sankhyalabs/core';
|
|
2
2
|
import { applyFilter, applySorting, buildPaginationInfo } from './dataUnitInMemoryUtils';
|
|
3
3
|
export default class InMemoryLoader {
|
|
4
|
-
constructor(metadata, records
|
|
4
|
+
constructor(metadata, records) {
|
|
5
5
|
this.metadata = metadata;
|
|
6
6
|
this.records = records;
|
|
7
7
|
this._dataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
|
@@ -10,11 +10,7 @@ export default class InMemoryLoader {
|
|
|
10
10
|
this._dataUnit.dataLoader = (dataUnit, request) => this.inMemoryLoader(dataUnit, request, this.getRecordsToLoad());
|
|
11
11
|
this._dataUnit.saveLoader = (_dataUnit, changes) => this.saveLoader(_dataUnit, changes);
|
|
12
12
|
this._dataUnit.removeLoader = (_dataUnit, recordIds) => this.removeLoader(_dataUnit, recordIds);
|
|
13
|
-
this.dataUnit.loadMetadata().then(() =>
|
|
14
|
-
if ((config === null || config === void 0 ? void 0 : config.autoLoad) !== false) {
|
|
15
|
-
this.dataUnit.loadData();
|
|
16
|
-
}
|
|
17
|
-
});
|
|
13
|
+
this.dataUnit.loadMetadata().then(() => this.dataUnit.loadData());
|
|
18
14
|
}
|
|
19
15
|
getRecordsToLoad() {
|
|
20
16
|
if (this._initialRecords == undefined && this.dataUnit.records.length > 0) {
|
|
@@ -66,7 +62,7 @@ export default class InMemoryLoader {
|
|
|
66
62
|
this._initialRecords = newRecords;
|
|
67
63
|
if (this._dataUnit) {
|
|
68
64
|
//Isso força o refresh internamente no datunit
|
|
69
|
-
this._dataUnit.
|
|
65
|
+
this._dataUnit.gotoPage(0);
|
|
70
66
|
}
|
|
71
67
|
}
|
|
72
68
|
get metadata() {
|
|
@@ -21,9 +21,6 @@ export default class DataUnitDataLoader {
|
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
static getCachedRecords(dataUnit) {
|
|
25
|
-
return PreloadManager.getCachedRecords(dataUnit);
|
|
26
|
-
}
|
|
27
24
|
static async loadFromServer(dataUnit, request, loadingInfo) {
|
|
28
25
|
try {
|
|
29
26
|
//Registramos a request com as informações de carga para determinarmos a última.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ObjectUtils } from "@sankhyalabs/core";
|
|
2
1
|
export class ArrayRepository {
|
|
3
2
|
constructor(equalsFunction) {
|
|
4
3
|
this._list = [];
|
|
@@ -78,7 +77,4 @@ export class ArrayRepository {
|
|
|
78
77
|
async count() {
|
|
79
78
|
return Promise.resolve(this._list.length);
|
|
80
79
|
}
|
|
81
|
-
getFromCache() {
|
|
82
|
-
return ObjectUtils.copy(this._list);
|
|
83
|
-
}
|
|
84
80
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { DataUnit } from "@sankhyalabs/core";
|
|
1
|
+
import { DataUnit, FieldComparator, SortMode } from "@sankhyalabs/core";
|
|
2
2
|
import { ArrayRepository } from "./ArrayRepository";
|
|
3
3
|
import { ColumnFilterManager } from "@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";
|
|
4
|
-
import SortingUtils from "@sankhyalabs/core/dist/utils/SortingUtils";
|
|
5
4
|
export default class PreloadManager {
|
|
6
5
|
static setLoadingStatus(dataUnit, loadingInProgress) {
|
|
7
6
|
this._loadingStatus.set(dataUnit.name, loadingInProgress);
|
|
@@ -21,7 +20,17 @@ export default class PreloadManager {
|
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
static getSortingFunction(dataUnit, sorting) {
|
|
24
|
-
|
|
23
|
+
if (sorting == undefined || sorting.length == 0) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
return (recordA, recordB) => {
|
|
27
|
+
for (const sort of sorting) {
|
|
28
|
+
const result = FieldComparator.compare(dataUnit.getField(sort.field), recordA, recordB, sort.mode === SortMode.ASC);
|
|
29
|
+
if (result != 0) {
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
25
34
|
}
|
|
26
35
|
static async getDistinct(dataUnit, fieldName) {
|
|
27
36
|
if (!PreloadManager.isCacheEnabled(dataUnit)) {
|
|
@@ -58,11 +67,7 @@ export default class PreloadManager {
|
|
|
58
67
|
static async loadData(dataUnit, request, loadFromServer) {
|
|
59
68
|
try {
|
|
60
69
|
if (PreloadManager.isCacheEnabled(dataUnit)) {
|
|
61
|
-
|
|
62
|
-
"EZ_GRID_LOADING_SOURCE",
|
|
63
|
-
DataUnit.CHANGING_PAGE_LOADING_SOURCE,
|
|
64
|
-
DataUnit.ALL_RECORDS_SELECTION_SOURCE
|
|
65
|
-
].includes(request.source);
|
|
70
|
+
let useCache = request.source === "EZ_GRID_LOADING_SOURCE" || request.source === DataUnit.CHANGING_PAGE_LOADING_SOURCE;
|
|
66
71
|
if (useCache) {
|
|
67
72
|
const isCacheEmpty = await PreloadManager.getRepository(dataUnit).isEmpty();
|
|
68
73
|
if (!isCacheEmpty) {
|
|
@@ -129,9 +134,6 @@ export default class PreloadManager {
|
|
|
129
134
|
.catch(reason => reject(reason));
|
|
130
135
|
});
|
|
131
136
|
}
|
|
132
|
-
static getCachedRecords(dataUnit) {
|
|
133
|
-
return PreloadManager.getRepository(dataUnit).getFromCache();
|
|
134
|
-
}
|
|
135
137
|
}
|
|
136
138
|
PreloadManager._repositories = new Map();
|
|
137
139
|
PreloadManager._loadingStatus = new Map();
|
|
@@ -111,7 +111,6 @@ export default class DataUnitFetcher {
|
|
|
111
111
|
dataUnit.saveLoader = (_dataUnit, changes) => this.saveData(dataUnit, changes);
|
|
112
112
|
dataUnit.removeLoader = (dataUnit, recordIds) => this.removeRecords(dataUnit, recordIds);
|
|
113
113
|
dataUnit.recordLoader = (dataUnit, recordIds) => this.loadRecord(dataUnit, recordIds);
|
|
114
|
-
dataUnit.allRecordsLoader = (dataUnit) => DataUnitDataLoader.getCachedRecords(dataUnit);
|
|
115
114
|
return dataUnit;
|
|
116
115
|
}
|
|
117
116
|
loadMetadata(dataUnit) {
|
package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js
CHANGED
|
@@ -2,13 +2,11 @@ import { ApplicationContext, StringUtils, UserInterface, } from '@sankhyalabs/co
|
|
|
2
2
|
import { DataFetcher } from "../../../DataFetcher";
|
|
3
3
|
import DataUnitFetcher from "../dataunit-fetcher";
|
|
4
4
|
import InMemoryLoader from "../../../../../dataUnit/InMemoryLoader";
|
|
5
|
-
import { getRecordValue } from '../../../../../dataUnit/ValueFormatter';
|
|
6
5
|
export class DatasetStrategy {
|
|
7
6
|
canSlice() {
|
|
8
7
|
return false;
|
|
9
8
|
}
|
|
10
9
|
processSortingSide(request, dataUnit, serverSideFilters) {
|
|
11
|
-
var _a;
|
|
12
10
|
const localSorting = [];
|
|
13
11
|
const serverSorting = [];
|
|
14
12
|
if (request.sort != undefined) {
|
|
@@ -17,7 +15,9 @@ export class DatasetStrategy {
|
|
|
17
15
|
}
|
|
18
16
|
for (const sort of request.sort) {
|
|
19
17
|
const descriptor = dataUnit.getField(sort.field);
|
|
20
|
-
const local =
|
|
18
|
+
const local = descriptor != undefined
|
|
19
|
+
&& descriptor.properties != undefined
|
|
20
|
+
&& descriptor.properties.calculated === "true";
|
|
21
21
|
if (local) {
|
|
22
22
|
localSorting.push(sort);
|
|
23
23
|
}
|
|
@@ -57,53 +57,6 @@ export class DatasetStrategy {
|
|
|
57
57
|
return Promise.reject(error);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
async loadRowMetadata(snkDataUnit, fieldName, metadataName, updatedFields = {}) {
|
|
61
|
-
try {
|
|
62
|
-
const serviceName = "DatasetSP.loadRowMetadata";
|
|
63
|
-
const parsedRequestBody = await this.buildRequestBodyLoadRowMetadata({ snkDataUnit, fieldName, metadataName, serviceName, updatedFields });
|
|
64
|
-
const response = await DataFetcher.get().callServiceBroker(serviceName, parsedRequestBody);
|
|
65
|
-
return response;
|
|
66
|
-
}
|
|
67
|
-
catch (error) {
|
|
68
|
-
console.error(error);
|
|
69
|
-
return Promise.reject(error);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
async buildRequestBodyLoadRowMetadata({ snkDataUnit, serviceName, fieldName, metadataName, updatedFields, }) {
|
|
73
|
-
const dataUnit = snkDataUnit.dataUnit;
|
|
74
|
-
const entityName = DataUnitFetcher.parseDataUnitName(dataUnit.name).entityName;
|
|
75
|
-
const recordIdInfo = await snkDataUnit.getSelectedRecordsIDsInfo();
|
|
76
|
-
const pk = recordIdInfo.reduce((accumulator, currentValue) => {
|
|
77
|
-
accumulator[currentValue.name] = currentValue.value;
|
|
78
|
-
return accumulator;
|
|
79
|
-
}, {});
|
|
80
|
-
const record = dataUnit.getSelectedRecord();
|
|
81
|
-
const fields = dataUnit.metadata.fields.filter(({ standAlone, name }) => !standAlone && !name.includes(".")).map(({ name }) => name);
|
|
82
|
-
const values = fields.reduce((accumulator, currentValue, currentIndex) => {
|
|
83
|
-
const recordValue = getRecordValue(record, currentValue);
|
|
84
|
-
const updatedFieldValue = getRecordValue(updatedFields, currentValue);
|
|
85
|
-
accumulator[currentIndex] = updatedFieldValue !== undefined ? updatedFieldValue : recordValue;
|
|
86
|
-
return accumulator;
|
|
87
|
-
}, {});
|
|
88
|
-
const requestBody = {
|
|
89
|
-
serviceName,
|
|
90
|
-
requestBody: {
|
|
91
|
-
dataSetID: dataUnit.dataUnitId,
|
|
92
|
-
entityName,
|
|
93
|
-
standAlone: false,
|
|
94
|
-
metadataName,
|
|
95
|
-
fieldName,
|
|
96
|
-
fields,
|
|
97
|
-
record: {
|
|
98
|
-
pk,
|
|
99
|
-
oldPk: pk,
|
|
100
|
-
values,
|
|
101
|
-
},
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
const parsedRequestBody = JSON.stringify(requestBody);
|
|
105
|
-
return parsedRequestBody;
|
|
106
|
-
}
|
|
107
60
|
getFieldsList(dataUnit) {
|
|
108
61
|
let fields = ["__record__id__", "__record__label__"];
|
|
109
62
|
dataUnit.metadata.fields.forEach((descriptor) => {
|
|
@@ -183,11 +136,9 @@ export class DatasetStrategy {
|
|
|
183
136
|
}
|
|
184
137
|
processRecords(dataUnit, fields, responseRecords) {
|
|
185
138
|
return responseRecords.map((dataFrame) => {
|
|
186
|
-
const lastElement = dataFrame[dataFrame.length - 1];
|
|
187
139
|
const duRecord = {
|
|
188
140
|
__record__id__: dataFrame[0],
|
|
189
|
-
__record__label__: dataFrame[1]
|
|
190
|
-
__record__metadata__: lastElement['_rmd'],
|
|
141
|
+
__record__label__: dataFrame[1]
|
|
191
142
|
};
|
|
192
143
|
dataUnit.metadata.fields.forEach(fieldDescriptor => {
|
|
193
144
|
duRecord[fieldDescriptor.name] = this.buildFieldValue(fieldDescriptor, fields, dataFrame);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s)
|
|
4
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { ApplicationContext, ObjectUtils } from "@sankhyalabs/core";
|
|
14
|
+
import { DataFetcher } from '../../DataFetcher';
|
|
15
|
+
export default function fetchDataExporter(_a) {
|
|
16
|
+
var { methodName } = _a, requestBody = __rest(_a, ["methodName"]);
|
|
17
|
+
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
18
|
+
const serviceName = `${application.getModuleName()}@DataExporterSPBean.${methodName}`;
|
|
19
|
+
const payload = { serviceName, requestBody };
|
|
20
|
+
return new Promise((resolve, reject) => {
|
|
21
|
+
DataFetcher.get()
|
|
22
|
+
.callServiceBroker(serviceName, ObjectUtils.objectToString(payload))
|
|
23
|
+
.then(result => resolve(getFormatResponse(result)))
|
|
24
|
+
.catch(error => reject(error));
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function getFormatResponse(result) {
|
|
28
|
+
var _a;
|
|
29
|
+
const response = (_a = result === null || result === void 0 ? void 0 : result.json) === null || _a === void 0 ? void 0 : _a.$;
|
|
30
|
+
if (response == undefined) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
return ObjectUtils.stringToObject(response);
|
|
34
|
+
}
|
|
@@ -50,12 +50,12 @@ export class PesquisaFetcher {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
loadAdvancedSearch(entityName, argument, criteria, searchOptions) {
|
|
53
|
-
var _a, _b, _c, _d
|
|
53
|
+
var _a, _b, _c, _d;
|
|
54
54
|
const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, searchOptions);
|
|
55
55
|
const values = {
|
|
56
56
|
argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
|
|
57
57
|
criteria: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.criteria) || criteria,
|
|
58
|
-
searchOptions:
|
|
58
|
+
searchOptions: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions) || searchOptions,
|
|
59
59
|
};
|
|
60
60
|
const serviceName = "PesquisaSP.getSuggestion";
|
|
61
61
|
const externalCriteria = {
|
|
@@ -86,11 +86,11 @@ export class PesquisaFetcher {
|
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
const options = searchOptions != undefined
|
|
89
|
-
? Object.assign(Object.assign({},
|
|
89
|
+
? Object.assign(Object.assign({}, searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
|
|
90
90
|
const reqBody = {
|
|
91
91
|
"serviceName": serviceName,
|
|
92
92
|
"requestBody": {
|
|
93
|
-
"criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria":
|
|
93
|
+
"criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": false, "limit": this._defaultPageSize, "query": { "$": values.argument }, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_d = values.searchOptions) === null || _d === void 0 ? void 0 : _d.rootEntity }, { options }),
|
|
94
94
|
"clientEventList": {
|
|
95
95
|
"clientEvent": []
|
|
96
96
|
}
|
|
@@ -55,7 +55,7 @@ export class SnkMessageBuilder {
|
|
|
55
55
|
this.loadAppMessages().then((msgs) => {
|
|
56
56
|
this._appMessages = msgs;
|
|
57
57
|
}, error => {
|
|
58
|
-
console.info('O arquivo de mensagens personalizadas não foi encontrado no caminho /messages/appmessages', error);
|
|
58
|
+
console.info('O arquivo de mensagens personalizadas não foi encontrado no caminho /messages/appmessages.js', error);
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
@@ -147,10 +147,17 @@ export class SnkMessageBuilder {
|
|
|
147
147
|
return message;
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
150
|
+
loadAppMessages() {
|
|
151
|
+
return new Promise(async (accept, reject) => {
|
|
152
|
+
const messagesUrl = await this._application.getApplicationPath();
|
|
153
|
+
import(/* webpackIgnore: true */ `${messagesUrl}/messages/appmessages.js`)
|
|
154
|
+
.then(module => {
|
|
155
|
+
accept(module.default);
|
|
156
|
+
})
|
|
157
|
+
.catch(reason => {
|
|
158
|
+
reject(reason);
|
|
159
|
+
});
|
|
160
|
+
});
|
|
154
161
|
}
|
|
155
162
|
}
|
|
156
163
|
export var OperationMap;
|
|
@@ -10,7 +10,6 @@ export const snkDataExporterMessages = {
|
|
|
10
10
|
},
|
|
11
11
|
label: {
|
|
12
12
|
currentPage: "Somente a página atual",
|
|
13
|
-
allRecords: "Todos os registros",
|
|
14
13
|
spreadsheet: "Planilha",
|
|
15
14
|
cube: "Cubo",
|
|
16
15
|
sendByEmail: "Enviar por email",
|
|
@@ -23,7 +22,6 @@ export const snkDataExporterMessages = {
|
|
|
23
22
|
},
|
|
24
23
|
title: {
|
|
25
24
|
error: "Erro",
|
|
26
|
-
permission: "Falha detectada",
|
|
27
25
|
},
|
|
28
26
|
limitExceeded: {
|
|
29
27
|
title: "Atenção",
|
|
@@ -6,7 +6,7 @@ const snkDataUnitMessages = {
|
|
|
6
6
|
},
|
|
7
7
|
cancelInfo: {
|
|
8
8
|
clone: "Duplicação descartada!",
|
|
9
|
-
insert: "A inclusão
|
|
9
|
+
insert: "A inclusão descartada!",
|
|
10
10
|
update: "A edição foi descartada!"
|
|
11
11
|
},
|
|
12
12
|
confirm: {
|
|
@@ -27,6 +27,5 @@ const snkDataUnitMessages = {
|
|
|
27
27
|
forbiddenRemove: "Não é possível remover. Verifique as permissões de acesso.",
|
|
28
28
|
removeAllConfirmation: "Os <strong>{{size}} registros selecionados</strong> serão excluídos.<br/><br/><strong>Você realmente gostaria de continuar?</strong>",
|
|
29
29
|
removeAllInfo: "Os {{size}} registros foram removidos com sucesso!",
|
|
30
|
-
fieldNameRequired: "É necessário informar o nome da coluna."
|
|
31
30
|
};
|
|
32
31
|
export default snkDataUnitMessages;
|
|
@@ -423,7 +423,6 @@ class ConfigStorage {
|
|
|
423
423
|
if (config == undefined) {
|
|
424
424
|
return;
|
|
425
425
|
}
|
|
426
|
-
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.grid);
|
|
427
426
|
await this.deleteGridConfigCache(name, resourceID);
|
|
428
427
|
return this.gridConfigFetcher.saveConfig(config, name, resourceID);
|
|
429
428
|
}
|
|
@@ -72,12 +72,11 @@ class SnkFormConfigManager {
|
|
|
72
72
|
var _a;
|
|
73
73
|
const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
|
|
74
74
|
if (fields != undefined && fields.length > 0) {
|
|
75
|
-
return fields.map(({ label, name, readOnly
|
|
75
|
+
return fields.map(({ label, name, readOnly }) => {
|
|
76
76
|
if (label == undefined) {
|
|
77
|
-
|
|
78
|
-
return Object.assign(Object.assign({}, currentField), { name: name !== null && name !== void 0 ? name : currentField.name, readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : currentField.readOnly, visible: visible !== null && visible !== void 0 ? visible : currentField.visible, required: required !== null && required !== void 0 ? required : currentField.required });
|
|
77
|
+
return dataUnit.getField(name);
|
|
79
78
|
}
|
|
80
|
-
return { name, label, readOnly
|
|
79
|
+
return { name, label, readOnly };
|
|
81
80
|
})
|
|
82
81
|
.filter(field => this.isFieldVisible(field, descriptionFilter));
|
|
83
82
|
}
|
|
@@ -99,7 +98,7 @@ class SnkFormConfigManager {
|
|
|
99
98
|
const normalizedFilter = StringUtils.replaceAccentuatedCharsLower(descriptionFilter.toLocaleLowerCase());
|
|
100
99
|
return normalizedText.includes(normalizedFilter);
|
|
101
100
|
}
|
|
102
|
-
|
|
101
|
+
getInsertionConfig(dataUnit, ignoreReadOnlyFormFields) {
|
|
103
102
|
let fields = this.getFieldsList(dataUnit);
|
|
104
103
|
if (ignoreReadOnlyFormFields) {
|
|
105
104
|
fields = fields.filter(field => {
|
|
@@ -131,8 +130,8 @@ class SnkFormConfigManager {
|
|
|
131
130
|
this._onConfigChange(Object.assign({}, this._config));
|
|
132
131
|
}
|
|
133
132
|
}
|
|
134
|
-
getConfig(dataUnit, ignoreReadOnlyFormFields) {
|
|
135
|
-
return this.
|
|
133
|
+
getConfig(insertionMode, dataUnit, ignoreReadOnlyFormFields) {
|
|
134
|
+
return insertionMode ? this.getInsertionConfig(dataUnit, ignoreReadOnlyFormFields !== null && ignoreReadOnlyFormFields !== void 0 ? ignoreReadOnlyFormFields : true) : Object.assign({}, this._config);
|
|
136
135
|
}
|
|
137
136
|
getFormConfigFetcher() {
|
|
138
137
|
if (this._formConfigFetcher == undefined) {
|
|
@@ -8,7 +8,7 @@ const snkDataUnitMessages = {
|
|
|
8
8
|
},
|
|
9
9
|
cancelInfo: {
|
|
10
10
|
clone: "Duplicação descartada!",
|
|
11
|
-
insert: "A inclusão
|
|
11
|
+
insert: "A inclusão descartada!",
|
|
12
12
|
update: "A edição foi descartada!"
|
|
13
13
|
},
|
|
14
14
|
confirm: {
|
|
@@ -29,7 +29,6 @@ const snkDataUnitMessages = {
|
|
|
29
29
|
forbiddenRemove: "Não é possível remover. Verifique as permissões de acesso.",
|
|
30
30
|
removeAllConfirmation: "Os <strong>{{size}} registros selecionados</strong> serão excluídos.<br/><br/><strong>Você realmente gostaria de continuar?</strong>",
|
|
31
31
|
removeAllInfo: "Os {{size}} registros foram removidos com sucesso!",
|
|
32
|
-
fieldNameRequired: "É necessário informar o nome da coluna."
|
|
33
32
|
};
|
|
34
33
|
|
|
35
34
|
const snkFilterBarMessages = {
|
|
@@ -285,7 +284,6 @@ const snkDataExporterMessages = {
|
|
|
285
284
|
},
|
|
286
285
|
label: {
|
|
287
286
|
currentPage: "Somente a página atual",
|
|
288
|
-
allRecords: "Todos os registros",
|
|
289
287
|
spreadsheet: "Planilha",
|
|
290
288
|
cube: "Cubo",
|
|
291
289
|
sendByEmail: "Enviar por email",
|
|
@@ -298,7 +296,6 @@ const snkDataExporterMessages = {
|
|
|
298
296
|
},
|
|
299
297
|
title: {
|
|
300
298
|
error: "Erro",
|
|
301
|
-
permission: "Falha detectada",
|
|
302
299
|
},
|
|
303
300
|
limitExceeded: {
|
|
304
301
|
title: "Atenção",
|
|
@@ -555,7 +552,7 @@ class SnkMessageBuilder {
|
|
|
555
552
|
this.loadAppMessages().then((msgs) => {
|
|
556
553
|
this._appMessages = msgs;
|
|
557
554
|
}, error => {
|
|
558
|
-
console.info('O arquivo de mensagens personalizadas não foi encontrado no caminho /messages/appmessages', error);
|
|
555
|
+
console.info('O arquivo de mensagens personalizadas não foi encontrado no caminho /messages/appmessages.js', error);
|
|
559
556
|
});
|
|
560
557
|
}
|
|
561
558
|
/**
|
|
@@ -647,10 +644,17 @@ class SnkMessageBuilder {
|
|
|
647
644
|
return message;
|
|
648
645
|
}
|
|
649
646
|
}
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
647
|
+
loadAppMessages() {
|
|
648
|
+
return new Promise(async (accept, reject) => {
|
|
649
|
+
const messagesUrl = await this._application.getApplicationPath();
|
|
650
|
+
import(/* webpackIgnore: true */ `${messagesUrl}/messages/appmessages.js`)
|
|
651
|
+
.then(module => {
|
|
652
|
+
accept(module.default);
|
|
653
|
+
})
|
|
654
|
+
.catch(reason => {
|
|
655
|
+
reject(reason);
|
|
656
|
+
});
|
|
657
|
+
});
|
|
654
658
|
}
|
|
655
659
|
}
|
|
656
660
|
var OperationMap;
|