@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
|
@@ -2,111 +2,51 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index
|
|
5
|
+
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const constants = require('./constants-35ddd366.js');
|
|
9
|
-
const taskbarElements = require('./taskbar-elements-
|
|
10
|
-
require('./DataFetcher-
|
|
11
|
-
require('./pesquisa-fetcher-
|
|
12
|
-
const
|
|
13
|
-
const index = require('./index-
|
|
9
|
+
const taskbarElements = require('./taskbar-elements-3ecd1278.js');
|
|
10
|
+
require('./DataFetcher-77729a93.js');
|
|
11
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-cba1b3d0.js');
|
|
12
|
+
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-f79d220c.js');
|
|
13
|
+
const index$1 = require('./index-0922807b.js');
|
|
14
14
|
require('./ISave-e91b70a7.js');
|
|
15
15
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
17
|
-
const dataunitFetcher = require('./dataunit-fetcher-688d3f05.js');
|
|
18
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
19
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
18
|
+
const formConfigFetcher = require('./form-config-fetcher-feb08214.js');
|
|
20
19
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
|
21
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
22
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
23
|
-
|
|
24
|
-
const index$2 = require('./index-102ba62d.js');
|
|
20
|
+
const ConfigStorage = require('./ConfigStorage-0a690675.js');
|
|
21
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-d6d5db6d.js');
|
|
22
|
+
require('./index-102ba62d.js');
|
|
25
23
|
require('./PrintUtils-bcaeb82f.js');
|
|
26
|
-
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
27
24
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
28
|
-
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
29
25
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
26
|
+
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
30
27
|
|
|
31
28
|
const REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
|
|
32
29
|
const REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
|
|
33
30
|
|
|
34
|
-
class ClientSideExporterProvider extends IExporterProvider.CommonsExporter {
|
|
35
|
-
getSelectedNumber() {
|
|
36
|
-
return this.dataUnit.getSelectionInfo().length;
|
|
37
|
-
}
|
|
38
|
-
getTotalRecords() {
|
|
39
|
-
var _a, _b, _c;
|
|
40
|
-
const { total } = ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo()) || {};
|
|
41
|
-
return total !== null && total !== void 0 ? total : (_c = (_b = this.dataUnit) === null || _b === void 0 ? void 0 : _b.records) === null || _c === void 0 ? void 0 : _c.length;
|
|
42
|
-
}
|
|
43
|
-
getSelectedIDs() {
|
|
44
|
-
return RecordIDUtils.getSelectedIDs(this.dataUnit);
|
|
45
|
-
}
|
|
46
|
-
getRecordID() {
|
|
47
|
-
var _a, _b, _c;
|
|
48
|
-
return (_c = (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.__record__id__;
|
|
49
|
-
}
|
|
50
|
-
async getRecords() {
|
|
51
|
-
if (this.dataUnit.records.length === 0) {
|
|
52
|
-
return Promise.resolve([]);
|
|
53
|
-
}
|
|
54
|
-
const selectionInfo = this.dataUnit.getSelectionInfo();
|
|
55
|
-
const records = selectionInfo.isEmpty() || selectionInfo.isAllRecords() ? await selectionInfo.getAllRecords() : selectionInfo.records;
|
|
56
|
-
return Promise.resolve(records == undefined ? [] : records);
|
|
57
|
-
}
|
|
58
|
-
getHiddenOptions() {
|
|
59
|
-
return [
|
|
60
|
-
index.DataExporterOption.EXPORT_BY_EMAIL,
|
|
61
|
-
index.DataExporterOption.EXPORT_PDF_TO_EMAIL,
|
|
62
|
-
index.DataExporterOption.EXPORT_XLS_TO_EMAIL,
|
|
63
|
-
index.DataExporterOption.EXPORT_PAGE_TO_PDF,
|
|
64
|
-
index.DataExporterOption.EXPORT_PAGE_TO_XLS
|
|
65
|
-
];
|
|
66
|
-
}
|
|
67
|
-
formatValue(record, column) {
|
|
68
|
-
const { id, descriptionFrom } = column;
|
|
69
|
-
const value = record[descriptionFrom || id];
|
|
70
|
-
if (value == undefined) {
|
|
71
|
-
return "";
|
|
72
|
-
}
|
|
73
|
-
if (descriptionFrom != undefined) {
|
|
74
|
-
return value.label;
|
|
75
|
-
}
|
|
76
|
-
const fieldDescriptor = this.dataUnit.getField(id);
|
|
77
|
-
if (fieldDescriptor.userInterface === core.UserInterface.SEARCH) {
|
|
78
|
-
return value.value;
|
|
79
|
-
}
|
|
80
|
-
if (column.customFormatter) {
|
|
81
|
-
const ezGridColumn = this.getColumnsState().find(columnState => column.id === columnState.name);
|
|
82
|
-
const formattedValue = column.customFormatter.format(value, ezGridColumn, record.__record__id__);
|
|
83
|
-
return formattedValue;
|
|
84
|
-
}
|
|
85
|
-
return this.dataUnit.getFormattedValue(id, value);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
31
|
const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%;--snk-simple-crud-grid--min-height:300px}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:auto 1fr;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}.simple-crud__form--hidden.sc-snk-simple-crud{display:none}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;--ez-grid--min-height:var(--snk-simple-crud-grid--min-height)}ez-form.sc-snk-simple-crud{min-height:300px}";
|
|
90
32
|
|
|
91
33
|
const SnkSimpleCrud = class {
|
|
92
34
|
constructor(hostRef) {
|
|
93
|
-
index
|
|
94
|
-
this.dataStateChange = index
|
|
95
|
-
this.dataUnitReady = index
|
|
96
|
-
this.actionClick = index
|
|
97
|
-
this.formItemsReady = index
|
|
98
|
-
this.configuratorSave = index
|
|
99
|
-
this.configuratorCancel = index
|
|
100
|
-
this._multiSelectionListDataSource = new
|
|
35
|
+
index.registerInstance(this, hostRef);
|
|
36
|
+
this.dataStateChange = index.createEvent(this, "dataStateChange", 3);
|
|
37
|
+
this.dataUnitReady = index.createEvent(this, "dataUnitReady", 3);
|
|
38
|
+
this.actionClick = index.createEvent(this, "actionClick", 7);
|
|
39
|
+
this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
|
|
40
|
+
this.configuratorSave = index.createEvent(this, "configuratorSave", 7);
|
|
41
|
+
this.configuratorCancel = index.createEvent(this, "configuratorCancel", 7);
|
|
42
|
+
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource.SnkMultiSelectionListDataSource();
|
|
101
43
|
this._keyDownHandler = (event) => this.keyDownListener(event);
|
|
102
44
|
this._formConfigFetcher = new formConfigFetcher.FormConfigFetcher();
|
|
103
|
-
this._customEditors = new Map();
|
|
104
|
-
this._customRenders = new Map();
|
|
105
45
|
this._taskbarProcessor = new fieldSearch.TaskbarProcessor({
|
|
106
|
-
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false,
|
|
107
|
-
"snkSimpleCrudTaskbar.grid_regular": this.getButtons(false,
|
|
108
|
-
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true,
|
|
109
|
-
"snkSimpleCrudTaskbar.grid_selected": this.getButtons(true,
|
|
46
|
+
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, taskbarElements.TaskbarElement.GRID_MODE),
|
|
47
|
+
"snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, taskbarElements.TaskbarElement.FORM_MODE),
|
|
48
|
+
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, taskbarElements.TaskbarElement.GRID_MODE),
|
|
49
|
+
"snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, taskbarElements.TaskbarElement.FORM_MODE),
|
|
110
50
|
"snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
|
111
51
|
});
|
|
112
52
|
this._showPopUpGridConfig = false;
|
|
@@ -117,15 +57,12 @@ const SnkSimpleCrud = class {
|
|
|
117
57
|
this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
|
|
118
58
|
this.dataState = undefined;
|
|
119
59
|
this.dataUnit = undefined;
|
|
120
|
-
this.entityName = undefined;
|
|
121
60
|
this.mode = constants.SIMPLE_CRUD_MODE.SERVER;
|
|
122
61
|
this.gridConfig = undefined;
|
|
123
62
|
this.formConfig = undefined;
|
|
124
63
|
this._formFields = [];
|
|
125
|
-
this._fieldsProps = new Map();
|
|
126
64
|
this.multipleSelection = undefined;
|
|
127
65
|
this.useCancelConfirm = true;
|
|
128
|
-
this.pageSize = 150;
|
|
129
66
|
this.resourceID = undefined;
|
|
130
67
|
this.taskbarManager = undefined;
|
|
131
68
|
this.messagesBuilder = undefined;
|
|
@@ -136,33 +73,6 @@ const SnkSimpleCrud = class {
|
|
|
136
73
|
this.gridLegacyConfigName = undefined;
|
|
137
74
|
this.formLegacyConfigName = undefined;
|
|
138
75
|
this.ignoreReadOnlyFormFields = false;
|
|
139
|
-
this.autoFocus = true;
|
|
140
|
-
this.autoLoad = undefined;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Registra um editor customizado para campos da grade e formulário.
|
|
144
|
-
*/
|
|
145
|
-
async addCustomEditor(fieldName, customEditor) {
|
|
146
|
-
if (this._grid && this._form) {
|
|
147
|
-
this._grid.addCustomEditor(fieldName, customEditor);
|
|
148
|
-
this._form.addCustomEditor(fieldName, customEditor);
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
const newCustomEditors = new Map(this._customEditors);
|
|
152
|
-
newCustomEditors.set(fieldName, customEditor);
|
|
153
|
-
this._customEditors = newCustomEditors;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Registra um render customizado para colunas da grid.
|
|
157
|
-
*/
|
|
158
|
-
async addGridCustomRender(fieldName, customRender) {
|
|
159
|
-
if (this._grid) {
|
|
160
|
-
this._grid.addGridCustomRender(fieldName, customRender);
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
const newCustomRenders = new Map(this._customRenders);
|
|
164
|
-
newCustomRenders.set(fieldName, customRender);
|
|
165
|
-
this._customRenders = newCustomRenders;
|
|
166
76
|
}
|
|
167
77
|
handleResourceIDChanged(newValue, oldValue) {
|
|
168
78
|
if (core.StringUtils.isEmpty(newValue)) {
|
|
@@ -174,30 +84,9 @@ const SnkSimpleCrud = class {
|
|
|
174
84
|
this.loadFormConfig(true);
|
|
175
85
|
this.loadGridConfig(true);
|
|
176
86
|
}
|
|
177
|
-
|
|
178
|
-
* Registra um formatador de valores para uma coluna da grid.
|
|
179
|
-
*/
|
|
180
|
-
async addCustomValueFormatter(columnName, customFormatter) {
|
|
181
|
-
this._grid.addCustomValueFormatter(columnName, customFormatter);
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Remove o formatador de valores de uma coluna da grid.
|
|
185
|
-
*/
|
|
186
|
-
async removeCustomValueFormatter(columnName) {
|
|
187
|
-
this._grid.removeCustomValueFormatter(columnName);
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Altera/adiciona uma propriedade nos metadados do campo.
|
|
191
|
-
*/
|
|
192
|
-
async setFieldProp(fieldName, propName, value) {
|
|
193
|
-
const newCustomFieldProps = new Map(this._fieldsProps);
|
|
194
|
-
const currentProps = this._fieldsProps.get(fieldName);
|
|
195
|
-
newCustomFieldProps.set(fieldName, Object.assign(Object.assign({}, currentProps), { [propName]: value }));
|
|
196
|
-
this._fieldsProps = newCustomFieldProps;
|
|
197
|
-
}
|
|
198
|
-
getButtons(selected, extraButtons) {
|
|
87
|
+
getButtons(selected, changeModeBtn) {
|
|
199
88
|
return this.addConfigButton(this.resolveInMemoryBtns(selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS)
|
|
200
|
-
.concat(
|
|
89
|
+
.concat(changeModeBtn));
|
|
201
90
|
}
|
|
202
91
|
addConfigButton(buttons) {
|
|
203
92
|
if (this.configName === undefined) {
|
|
@@ -237,19 +126,15 @@ const SnkSimpleCrud = class {
|
|
|
237
126
|
}
|
|
238
127
|
evt.stopPropagation();
|
|
239
128
|
}
|
|
240
|
-
async onChangeEntityName(newValue) {
|
|
241
|
-
if (this.dataUnit)
|
|
242
|
-
return;
|
|
243
|
-
const application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
244
|
-
this.dataUnit = await application.getDataUnit(newValue, null, null, this.configName);
|
|
245
|
-
}
|
|
246
129
|
onModeChange() {
|
|
247
130
|
if (this.mode == constants.SIMPLE_CRUD_MODE.IN_MEMORY) {
|
|
248
131
|
this.initInMemoryDataUnit();
|
|
249
132
|
}
|
|
250
133
|
}
|
|
251
134
|
observeDataState(newValue, oldValue) {
|
|
252
|
-
|
|
135
|
+
if (core.ObjectUtils.objectToString(oldValue) != core.ObjectUtils.objectToString(newValue)) {
|
|
136
|
+
this.dataStateChange.emit(newValue);
|
|
137
|
+
}
|
|
253
138
|
}
|
|
254
139
|
async observeFormLegacy(newValue, oldValue) {
|
|
255
140
|
await this.handleUpdateFormLegacyConfig(newValue, oldValue);
|
|
@@ -257,28 +142,6 @@ const SnkSimpleCrud = class {
|
|
|
257
142
|
async observeGridLegacy(newValue, oldValue) {
|
|
258
143
|
await this.handleUpdateGridLegacyConfig(newValue, oldValue);
|
|
259
144
|
}
|
|
260
|
-
async handleDataStateChange(newValue, oldValue) {
|
|
261
|
-
if (core.ObjectUtils.objectToString(oldValue) != core.ObjectUtils.objectToString(newValue)) {
|
|
262
|
-
this.dataStateChange.emit(newValue);
|
|
263
|
-
}
|
|
264
|
-
await this.processRmPrecision();
|
|
265
|
-
}
|
|
266
|
-
async processRmPrecision() {
|
|
267
|
-
var _a, _b;
|
|
268
|
-
const fieldsWithRmPrecision = await this._snkDataUnit.getFieldsWithRmPrecision();
|
|
269
|
-
for (const field of fieldsWithRmPrecision || []) {
|
|
270
|
-
if (!field) {
|
|
271
|
-
continue;
|
|
272
|
-
}
|
|
273
|
-
const rmPrecision = (_b = (_a = this.dataState) === null || _a === void 0 ? void 0 : _a.rowMetadata) === null || _b === void 0 ? void 0 : _b.getProp('rm_precision', field);
|
|
274
|
-
if (!rmPrecision && rmPrecision !== 0) {
|
|
275
|
-
continue;
|
|
276
|
-
}
|
|
277
|
-
await this.setFieldProp(field, 'precision', rmPrecision);
|
|
278
|
-
await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
|
|
279
|
-
}
|
|
280
|
-
this._rmPrecisionCustomValueFormatter.setDataState(this.dataState);
|
|
281
|
-
}
|
|
282
145
|
async handleUpdateGridLegacyConfig(newValue, oldValue) {
|
|
283
146
|
if (newValue == undefined || newValue == oldValue) {
|
|
284
147
|
return;
|
|
@@ -375,7 +238,6 @@ const SnkSimpleCrud = class {
|
|
|
375
238
|
}
|
|
376
239
|
async componentWillRender() {
|
|
377
240
|
this._resourceID = await this.application.getResourceID();
|
|
378
|
-
this.dataExporterProviderStore();
|
|
379
241
|
this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
|
|
380
242
|
if (this.configName === undefined) {
|
|
381
243
|
return;
|
|
@@ -387,70 +249,32 @@ const SnkSimpleCrud = class {
|
|
|
387
249
|
this.loadGridConfig();
|
|
388
250
|
this.loadFormConfig();
|
|
389
251
|
}
|
|
390
|
-
componentDidRender() {
|
|
391
|
-
this._rmPrecisionCustomValueFormatter.setGrid(this._grid);
|
|
392
|
-
this.addGridCustomValueFormattters();
|
|
393
|
-
this.setFieldsProps();
|
|
394
|
-
this.setCustomRenders();
|
|
395
|
-
this.setCustomEditors();
|
|
396
|
-
}
|
|
397
252
|
componentWillLoad() {
|
|
398
253
|
this.processMetadata();
|
|
399
254
|
this.onModeChange();
|
|
400
255
|
this.configDatasource();
|
|
401
|
-
this._rmPrecisionCustomValueFormatter = new IExporterProvider.RmPrecisionCustomValueFormatter();
|
|
402
256
|
}
|
|
403
257
|
componentDidLoad() {
|
|
404
258
|
utils.CSSVarsUtils.applyVarsGrid(this._element, this._grid);
|
|
405
259
|
}
|
|
406
|
-
setCustomRenders() {
|
|
407
|
-
if (!this._grid) {
|
|
408
|
-
return;
|
|
409
|
-
}
|
|
410
|
-
for (const [fieldName, customRender] of this._customRenders) {
|
|
411
|
-
this._grid.addGridCustomRender(fieldName, customRender);
|
|
412
|
-
this._customRenders.delete(fieldName);
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
setCustomEditors() {
|
|
416
|
-
if (!this._grid || !this._form) {
|
|
417
|
-
return;
|
|
418
|
-
}
|
|
419
|
-
for (const [fieldName, customEditor] of this._customEditors) {
|
|
420
|
-
this._grid.addCustomEditor(fieldName, customEditor);
|
|
421
|
-
this._form.addCustomEditor(fieldName, customEditor);
|
|
422
|
-
this._customEditors.delete(fieldName);
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
260
|
configDatasource() {
|
|
426
261
|
this._multiSelectionListDataSource.setApplication(this.application);
|
|
427
262
|
this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
|
|
428
263
|
}
|
|
429
|
-
setFieldsProps() {
|
|
430
|
-
if (!this._form) {
|
|
431
|
-
return;
|
|
432
|
-
}
|
|
433
|
-
for (const [fieldName, props] of this._fieldsProps) {
|
|
434
|
-
for (const prop in props) {
|
|
435
|
-
this._form.setFieldProp(fieldName, prop, props[prop]);
|
|
436
|
-
}
|
|
437
|
-
this._fieldsProps.delete(fieldName);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
264
|
getTaskBarId() {
|
|
441
|
-
var _a, _b;
|
|
265
|
+
var _a, _b, _c;
|
|
442
266
|
if ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
|
|
443
267
|
return "snkSimpleCrudTaskbar.finish_edition";
|
|
444
268
|
}
|
|
445
269
|
if (((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.selectionInfo) &&
|
|
446
270
|
!this.dataState.selectionInfo.isAllRecords() &&
|
|
447
|
-
this.dataState.selectionInfo.length > 0) {
|
|
271
|
+
((_c = this.dataState.selectionInfo.records) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
448
272
|
return this._currentViewMode === constants.VIEW_MODE.GRID ? "snkSimpleCrudTaskbar.grid_selected" : "snkSimpleCrudTaskbar.form_selected";
|
|
449
273
|
}
|
|
450
274
|
return this._currentViewMode === constants.VIEW_MODE.GRID ? "snkSimpleCrudTaskbar.grid_regular" : "snkSimpleCrudTaskbar.form_regular";
|
|
451
275
|
}
|
|
452
276
|
initInMemoryDataUnit() {
|
|
453
|
-
this._inMemoryLoader = new
|
|
277
|
+
this._inMemoryLoader = new pesquisaFetcher.InMemoryLoader(this._metadata);
|
|
454
278
|
this.dataUnit = this._inMemoryLoader.dataUnit;
|
|
455
279
|
this.dataUnitReady.emit(this.dataUnit);
|
|
456
280
|
}
|
|
@@ -489,11 +313,12 @@ const SnkSimpleCrud = class {
|
|
|
489
313
|
var _a;
|
|
490
314
|
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close();
|
|
491
315
|
}
|
|
492
|
-
|
|
316
|
+
updateConfig() {
|
|
493
317
|
if (this._formConfigManager == undefined) {
|
|
494
318
|
this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resolveResourceID());
|
|
495
319
|
}
|
|
496
320
|
this._formConfigManager.setConfig(this.formConfig);
|
|
321
|
+
return;
|
|
497
322
|
}
|
|
498
323
|
processMetadata() {
|
|
499
324
|
const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
|
|
@@ -525,28 +350,11 @@ const SnkSimpleCrud = class {
|
|
|
525
350
|
};
|
|
526
351
|
}
|
|
527
352
|
}
|
|
528
|
-
addGridCustomValueFormattters() {
|
|
529
|
-
var _a, _b, _c;
|
|
530
|
-
const metadataFields = ((_a = this._metadata) === null || _a === void 0 ? void 0 : _a.fields) || ((_c = (_b = this.dataUnit) === null || _b === void 0 ? void 0 : _b.metadata) === null || _c === void 0 ? void 0 : _c.fields);
|
|
531
|
-
if (!metadataFields) {
|
|
532
|
-
return;
|
|
533
|
-
}
|
|
534
|
-
const fieldsWithRmPrecision = [];
|
|
535
|
-
metadataFields.forEach((field) => {
|
|
536
|
-
var _a;
|
|
537
|
-
if (((_a = field.properties) === null || _a === void 0 ? void 0 : _a.rm_precision) && !fieldsWithRmPrecision.includes(field.name)) {
|
|
538
|
-
fieldsWithRmPrecision.push(field.name);
|
|
539
|
-
}
|
|
540
|
-
});
|
|
541
|
-
fieldsWithRmPrecision.forEach(field => {
|
|
542
|
-
this.addCustomValueFormatter(field, this._rmPrecisionCustomValueFormatter);
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
353
|
onDataStateChange(evt) {
|
|
546
354
|
this.dataState = Object.assign({}, evt.detail);
|
|
547
355
|
}
|
|
548
356
|
getTaskBarDisabledButtons() {
|
|
549
|
-
var _a, _b, _c, _d
|
|
357
|
+
var _a, _b, _c, _d;
|
|
550
358
|
const disabledButtons = [];
|
|
551
359
|
if (!((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.hasNext)) {
|
|
552
360
|
disabledButtons.push(taskbarElements.TaskbarElement.NEXT);
|
|
@@ -557,9 +365,6 @@ const SnkSimpleCrud = class {
|
|
|
557
365
|
if ((_d = (_c = this.dataState) === null || _c === void 0 ? void 0 : _c.selectionInfo) === null || _d === void 0 ? void 0 : _d.isEmpty()) {
|
|
558
366
|
disabledButtons.push(taskbarElements.TaskbarElement.FORM_MODE);
|
|
559
367
|
}
|
|
560
|
-
if (((_f = (_e = this.dataState) === null || _e === void 0 ? void 0 : _e.selectionInfo) === null || _f === void 0 ? void 0 : _f.length) > 1) {
|
|
561
|
-
disabledButtons.push(taskbarElements.TaskbarElement.CLONE);
|
|
562
|
-
}
|
|
563
368
|
return disabledButtons;
|
|
564
369
|
}
|
|
565
370
|
handleCancelEdit() {
|
|
@@ -652,8 +457,8 @@ const SnkSimpleCrud = class {
|
|
|
652
457
|
}
|
|
653
458
|
getTopTaskBarId() {
|
|
654
459
|
var _a;
|
|
655
|
-
return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? `snkGridTopTaskbar.finish_edition${index.PresentationMode.PRIMARY}` :
|
|
656
|
-
`snkGridTopTaskbar.regular${index.PresentationMode.PRIMARY}`;
|
|
460
|
+
return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? `snkGridTopTaskbar.finish_edition${index$1.PresentationMode.PRIMARY}` :
|
|
461
|
+
`snkGridTopTaskbar.regular${index$1.PresentationMode.PRIMARY}`;
|
|
657
462
|
}
|
|
658
463
|
async keyDownListener(event) {
|
|
659
464
|
if (!event.ctrlKey || event.key == undefined || event.key.toUpperCase() !== "F") {
|
|
@@ -703,26 +508,12 @@ const SnkSimpleCrud = class {
|
|
|
703
508
|
.then(() => {
|
|
704
509
|
this.setGridConfig(config);
|
|
705
510
|
this.closeGridConfig();
|
|
706
|
-
this.dataExporterProviderStore();
|
|
707
511
|
});
|
|
708
512
|
evt.stopPropagation();
|
|
709
513
|
}
|
|
710
|
-
async dataExporterProviderStore() {
|
|
711
|
-
if (this.dataUnit == undefined) {
|
|
712
|
-
return;
|
|
713
|
-
}
|
|
714
|
-
if (this._grid == undefined) {
|
|
715
|
-
return;
|
|
716
|
-
}
|
|
717
|
-
const dataExporterProvider = new ClientSideExporterProvider(this.dataUnit, this._grid);
|
|
718
|
-
index$2.store.set("exporterProviders", Object.assign(Object.assign({}, index$2.store.get("exporterProviders")), { [this.getDataExporterStoreKey()]: dataExporterProvider }));
|
|
719
|
-
}
|
|
720
|
-
getDataExporterStoreKey() {
|
|
721
|
-
return `SnkSimpleCrudDataExporter:${this.configName == undefined ? this.dataUnit.name : this.configName}`;
|
|
722
|
-
}
|
|
723
514
|
setGridConfig(config) {
|
|
724
515
|
this.gridConfig = config;
|
|
725
|
-
|
|
516
|
+
SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
|
|
726
517
|
}
|
|
727
518
|
setFormConfig(config, forceUpdate) {
|
|
728
519
|
if (this.formConfig && !forceUpdate)
|
|
@@ -735,15 +526,6 @@ const SnkSimpleCrud = class {
|
|
|
735
526
|
closeFormConfig() {
|
|
736
527
|
this._showFormConfig = false;
|
|
737
528
|
}
|
|
738
|
-
getPageSize() {
|
|
739
|
-
if (this.mode === constants.SIMPLE_CRUD_MODE.IN_MEMORY) {
|
|
740
|
-
return 0;
|
|
741
|
-
}
|
|
742
|
-
if (this.pageSize == undefined) {
|
|
743
|
-
return 150;
|
|
744
|
-
}
|
|
745
|
-
return this.pageSize;
|
|
746
|
-
}
|
|
747
529
|
//No momento não daremos suporte para configuração de formulário quando houver formLegacyConfigName
|
|
748
530
|
handleShowFormConfig() {
|
|
749
531
|
return this._showFormConfig && !this.formLegacyConfigName;
|
|
@@ -759,28 +541,19 @@ const SnkSimpleCrud = class {
|
|
|
759
541
|
}
|
|
760
542
|
return configFromManager;
|
|
761
543
|
}
|
|
762
|
-
updateFormConfig() {
|
|
763
|
-
const newConfig = Object.assign(Object.assign({}, this.formConfig), { fields: this.dataUnit.metadata.fields });
|
|
764
|
-
this.setFormConfig(newConfig, true);
|
|
765
|
-
if (this._formConfigManager == undefined) {
|
|
766
|
-
this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resolveResourceID());
|
|
767
|
-
}
|
|
768
|
-
this._formConfigManager.setConfig(this.formConfig);
|
|
769
|
-
}
|
|
770
544
|
/* istanbul ignore next */
|
|
771
545
|
render() {
|
|
772
546
|
var _a;
|
|
773
547
|
if (this.dataUnit == undefined) {
|
|
774
548
|
return;
|
|
775
549
|
}
|
|
776
|
-
return (index
|
|
550
|
+
return (index.h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(constants.VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, index.h("header", null, index.h("slot", { name: "snkSimpleCrudHeader" })), index.h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, index.h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: index$1.PresentationMode.SECONDARY }, index.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index.h("stack-item", null, index.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(pesquisaFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
|
777
551
|
? undefined
|
|
778
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab
|
|
552
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, index.h("ez-form", { class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && index.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), index.h("div", { id: `${this._customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }))), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
|
779
553
|
}
|
|
780
|
-
get _element() { return index
|
|
554
|
+
get _element() { return index.getElement(this); }
|
|
781
555
|
static get watchers() { return {
|
|
782
556
|
"resourceID": ["handleResourceIDChanged"],
|
|
783
|
-
"entityName": ["onChangeEntityName"],
|
|
784
557
|
"mode": ["onModeChange"],
|
|
785
558
|
"dataState": ["observeDataState"],
|
|
786
559
|
"formLegacyConfigName": ["observeFormLegacy"],
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
|
8
|
-
const taskbarElements = require('./taskbar-elements-
|
|
9
|
-
const index$1 = require('./index-
|
|
8
|
+
const taskbarElements = require('./taskbar-elements-3ecd1278.js');
|
|
9
|
+
const index$1 = require('./index-0922807b.js');
|
|
10
10
|
require('./index-102ba62d.js');
|
|
11
11
|
|
|
12
12
|
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex;flex-wrap:wrap}.no-wrap.sc-snk-taskbar-h{flex-wrap:nowrap}.full-width.sc-snk-taskbar-h{width:100%}.align-right.sc-snk-taskbar-h{justify-content:flex-end}.overflowed.sc-snk-taskbar{display:none}";
|
|
@@ -193,9 +193,8 @@ const SnkTaskbar = class {
|
|
|
193
193
|
className += "ez-padding-left--medium";
|
|
194
194
|
}
|
|
195
195
|
const taskbarElement = taskbarElements.TaskbarElement[def.toString()];
|
|
196
|
-
const dataExporterStoreKey = this._element.dataset.exporterStoreKey || this.configName;
|
|
197
196
|
if (taskbarElement) {
|
|
198
|
-
return taskbarElements.buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.buildDynamicActionsList(),
|
|
197
|
+
return taskbarElements.buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.buildDynamicActionsList(), this.configName, this.presentationMode);
|
|
199
198
|
}
|
|
200
199
|
else {
|
|
201
200
|
return taskbarElements.buildCustomButton(def, className, this.getIdElemBtnCustom(def), elem => this.elementClick(elem), elem => this.isEnabled(elem));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-f9e81701.js');
|
|
4
|
-
const index$2 = require('./index-
|
|
4
|
+
const index$2 = require('./index-0922807b.js');
|
|
5
5
|
const index$1 = require('./index-102ba62d.js');
|
|
6
6
|
|
|
7
7
|
exports.TaskbarElement = void 0;
|
|
@@ -50,7 +50,7 @@ const buildCustomButton = (def, className, dataElementId, action, isEnabled) =>
|
|
|
50
50
|
return textButton(def.name, className, dataElementId, text, hint, action, isEnabled);
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions,
|
|
53
|
+
const buildElem = (element, className, dataElementId, getTitle, action, isEnabled, actions, configName, presentationMode) => {
|
|
54
54
|
var _a;
|
|
55
55
|
const title = getTitle(element);
|
|
56
56
|
switch (element) {
|
|
@@ -93,7 +93,7 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
|
93
93
|
case exports.TaskbarElement.DIVIDER:
|
|
94
94
|
return index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin--none ez-margin-left--medium", "data-taskbar-divider": true });
|
|
95
95
|
case exports.TaskbarElement.DATA_EXPORTER:
|
|
96
|
-
const provider = (_a = index$1.store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[
|
|
96
|
+
const provider = (_a = index$1.store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
|
|
97
97
|
return index.h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element });
|
|
98
98
|
case exports.TaskbarElement.ATTACH:
|
|
99
99
|
return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
3
|
"./components/snk-filter-bar/filter-item/snk-filter-item.js",
|
|
4
|
-
"./components/snk-data-unit/snk-data-unit.js",
|
|
5
4
|
"./components/snk-application/snk-application.js",
|
|
5
|
+
"./components/snk-data-unit/snk-data-unit.js",
|
|
6
6
|
"./components/snk-taskbar/snk-taskbar.js",
|
|
7
7
|
"./components/snk-filter-bar/filter-list/snk-filter-list.js",
|
|
8
8
|
"./components/snk-print-selector/snk-print-selector.js",
|
|
@@ -30,7 +30,6 @@ export class SnkApplication {
|
|
|
30
30
|
this._duPromises = new Map();
|
|
31
31
|
this._requestListener = new RequestListenerLoadingBar();
|
|
32
32
|
this._pendingActions = new Map;
|
|
33
|
-
this._loadPkParameter = null;
|
|
34
33
|
this._isLoadedByPk = false;
|
|
35
34
|
this.messagesBuilder = undefined;
|
|
36
35
|
this.configName = undefined;
|
|
@@ -88,12 +87,6 @@ export class SnkApplication {
|
|
|
88
87
|
});
|
|
89
88
|
}
|
|
90
89
|
}
|
|
91
|
-
watchPropHandler(newValue, _) {
|
|
92
|
-
if (newValue && this._loadPkParameter) {
|
|
93
|
-
this.loadByPK(this._loadPkParameter.pk, this._loadPkParameter.redirect);
|
|
94
|
-
this._loadPkParameter = null;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
90
|
/**
|
|
98
91
|
* Obtém o controlador de teclado.
|
|
99
92
|
*
|
|
@@ -368,7 +361,12 @@ export class SnkApplication {
|
|
|
368
361
|
if (!waitingDu) {
|
|
369
362
|
const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, resourceID, parentDataUnit, configName);
|
|
370
363
|
dataUnit.loadMetadata().then(() => {
|
|
371
|
-
|
|
364
|
+
if (dataUnitName) {
|
|
365
|
+
this.updateDataunitCache(undefined, dataUnitName, dataUnit);
|
|
366
|
+
}
|
|
367
|
+
while (duPromisses.length > 0) {
|
|
368
|
+
duPromisses.pop().resolve(dataUnit);
|
|
369
|
+
}
|
|
372
370
|
}).catch(reason => {
|
|
373
371
|
while (duPromisses.length > 0) {
|
|
374
372
|
duPromisses.pop().reject(reason);
|
|
@@ -377,14 +375,6 @@ export class SnkApplication {
|
|
|
377
375
|
}
|
|
378
376
|
});
|
|
379
377
|
}
|
|
380
|
-
processResolveDataUnit(dataUnit, dataUnitName, duPromisses) {
|
|
381
|
-
if (dataUnitName) {
|
|
382
|
-
this.updateDataunitCache(undefined, dataUnitName, dataUnit);
|
|
383
|
-
}
|
|
384
|
-
while (duPromisses.length > 0) {
|
|
385
|
-
duPromisses.pop().resolve(dataUnit);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
378
|
/**
|
|
389
379
|
* Atualiza o cache de dataunits da aplicação.
|
|
390
380
|
* @param oldName - Nome do dataunit que está em cache.
|
|
@@ -800,23 +790,15 @@ export class SnkApplication {
|
|
|
800
790
|
return;
|
|
801
791
|
const resourceIDfromUrl = this.getResourceIdFromToken();
|
|
802
792
|
const pkObject = UrlUtils.getPkObjectFromUrlToken(top.window.location.hash);
|
|
803
|
-
|
|
804
|
-
if (pkObject === undefined) {
|
|
793
|
+
if (pkObject == undefined || resourceIDfromUrl !== this.applicationResourceID)
|
|
805
794
|
return;
|
|
806
|
-
}
|
|
807
|
-
if (!redirectFrom || redirectFrom.split("_")[0].indexOf(resourceIDfromUrl.split("_")[0]) === -1) {
|
|
808
|
-
if (resourceIDfromUrl !== this.applicationResourceID) {
|
|
809
|
-
return;
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
795
|
const pkParam = { pk: pkObject };
|
|
813
796
|
this._isLoadedByPk = true;
|
|
814
797
|
if (this.loadByPK) {
|
|
815
|
-
this.loadByPK(pkParam
|
|
798
|
+
this.loadByPK(pkParam);
|
|
816
799
|
this._currentPkParameter = pkHash;
|
|
817
800
|
return;
|
|
818
801
|
}
|
|
819
|
-
this._loadPkParameter = { pk: pkParam, redirect: redirectFrom };
|
|
820
802
|
this.defaultLoadByPK(pkParam, pkHash);
|
|
821
803
|
}
|
|
822
804
|
getResourceIdFromToken() {
|
|
@@ -1095,10 +1077,10 @@ export class SnkApplication {
|
|
|
1095
1077
|
"type": "unknown",
|
|
1096
1078
|
"mutable": false,
|
|
1097
1079
|
"complexType": {
|
|
1098
|
-
"original": "
|
|
1099
|
-
"resolved": "(objPK: { pk: Record<string, any>; }
|
|
1080
|
+
"original": "(objPK :{pk: Record<string, any>}) => void",
|
|
1081
|
+
"resolved": "(objPK: { pk: Record<string, any>; }) => void",
|
|
1100
1082
|
"references": {
|
|
1101
|
-
"
|
|
1083
|
+
"Record": {
|
|
1102
1084
|
"location": "global"
|
|
1103
1085
|
}
|
|
1104
1086
|
}
|
|
@@ -2506,12 +2488,6 @@ export class SnkApplication {
|
|
|
2506
2488
|
};
|
|
2507
2489
|
}
|
|
2508
2490
|
static get elementRef() { return "_element"; }
|
|
2509
|
-
static get watchers() {
|
|
2510
|
-
return [{
|
|
2511
|
-
"propName": "loadByPK",
|
|
2512
|
-
"methodName": "watchPropHandler"
|
|
2513
|
-
}];
|
|
2514
|
-
}
|
|
2515
2491
|
}
|
|
2516
2492
|
class RequestListenerLoadingBar {
|
|
2517
2493
|
constructor() {
|