@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
|
@@ -6,10 +6,10 @@ const index = require('./index-f9e81701.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
8
8
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
|
9
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
9
|
+
const ConfigStorage = require('./ConfigStorage-0a690675.js');
|
|
10
10
|
const filterType_enum = require('./filter-type.enum-b14ce507.js');
|
|
11
|
-
require('./form-config-fetcher-
|
|
12
|
-
require('./DataFetcher-
|
|
11
|
+
require('./form-config-fetcher-feb08214.js');
|
|
12
|
+
require('./DataFetcher-77729a93.js');
|
|
13
13
|
require('./PrintUtils-bcaeb82f.js');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
15
|
|
|
@@ -7,9 +7,9 @@ const Sortable = require('./Sortable-fb1c4cbb.js');
|
|
|
7
7
|
const core = require('@sankhyalabs/core');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
|
10
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
10
|
+
const formConfigFetcher = require('./form-config-fetcher-feb08214.js');
|
|
11
11
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
12
|
-
require('./DataFetcher-
|
|
12
|
+
require('./DataFetcher-77729a93.js');
|
|
13
13
|
require('./PrintUtils-bcaeb82f.js');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
15
|
|
|
@@ -14,8 +14,6 @@ const SnkFormView = class {
|
|
|
14
14
|
this.snkContentCardChanged = index.createEvent(this, "snkContentCardChanged", 7);
|
|
15
15
|
this.snkRequestClearFieldToFocus = index.createEvent(this, "snkRequestClearFieldToFocus", 7);
|
|
16
16
|
this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
|
|
17
|
-
this._customEditors = new Map();
|
|
18
|
-
this._fieldProps = new Map();
|
|
19
17
|
this.levelPath = undefined;
|
|
20
18
|
this.label = undefined;
|
|
21
19
|
this.name = undefined;
|
|
@@ -29,47 +27,12 @@ const SnkFormView = class {
|
|
|
29
27
|
this.canFix = true;
|
|
30
28
|
this.recordsValidator = undefined;
|
|
31
29
|
this.fieldToFocus = undefined;
|
|
32
|
-
this.customEditors = undefined;
|
|
33
|
-
this.fieldsProps = undefined;
|
|
34
30
|
}
|
|
35
31
|
async showUp() {
|
|
36
32
|
if (this._formView) {
|
|
37
33
|
this._formView.showUp();
|
|
38
34
|
}
|
|
39
35
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Registra um editor customizado para campos da grade e formulário
|
|
42
|
-
*/
|
|
43
|
-
async addCustomEditor(fieldName, customEditor, detailContext) {
|
|
44
|
-
if (this._formView) {
|
|
45
|
-
this._formView.addCustomEditor(fieldName, customEditor, detailContext);
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const newCustomEditors = new Map(this._customEditors);
|
|
49
|
-
newCustomEditors.set(fieldName, { customEditor, detailContext });
|
|
50
|
-
this._customEditors = newCustomEditors;
|
|
51
|
-
}
|
|
52
|
-
observePropsCustomEditor(newValue) {
|
|
53
|
-
for (const fieldName in newValue) {
|
|
54
|
-
this.addCustomEditor(fieldName, newValue[fieldName]);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Altera/adiciona uma propriedade nos metadados do campo.
|
|
59
|
-
*/
|
|
60
|
-
async setFieldProp(fieldName, propName, value) {
|
|
61
|
-
const props = this._fieldProps.get(fieldName) || [];
|
|
62
|
-
this._fieldProps.set(fieldName, [...props, { propName, value }]);
|
|
63
|
-
}
|
|
64
|
-
async observeFieldsProps(newValue) {
|
|
65
|
-
for (const field in newValue) {
|
|
66
|
-
const fieldProps = newValue[field];
|
|
67
|
-
const propNames = Object.keys(fieldProps);
|
|
68
|
-
for (const propName of propNames) {
|
|
69
|
-
await this.setFieldProp(field, propName, fieldProps[propName]);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
36
|
changeFix() {
|
|
74
37
|
this.fixed = !this.fixed;
|
|
75
38
|
this.emitEvent("fixed");
|
|
@@ -128,13 +91,7 @@ const SnkFormView = class {
|
|
|
128
91
|
this._dataBinder.onDisconnectedCallback();
|
|
129
92
|
}
|
|
130
93
|
}
|
|
131
|
-
componentDidLoad() {
|
|
132
|
-
this.observePropsCustomEditor(this.customEditors);
|
|
133
|
-
this.observeFieldsProps(this.fieldsProps);
|
|
134
|
-
}
|
|
135
94
|
componentDidRender() {
|
|
136
|
-
this.setCustomEditors();
|
|
137
|
-
this.setFieldProps();
|
|
138
95
|
if (this.fieldToFocus == undefined) {
|
|
139
96
|
return;
|
|
140
97
|
}
|
|
@@ -146,26 +103,6 @@ const SnkFormView = class {
|
|
|
146
103
|
this.snkRequestClearFieldToFocus.emit();
|
|
147
104
|
});
|
|
148
105
|
}
|
|
149
|
-
setCustomEditors() {
|
|
150
|
-
if (!this._formView) {
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
for (const [fieldName, customEditorProps] of this._customEditors) {
|
|
154
|
-
this._formView.addCustomEditor(fieldName, customEditorProps.customEditor, customEditorProps.detailContext);
|
|
155
|
-
this._customEditors.delete(fieldName);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
setFieldProps() {
|
|
159
|
-
if (!this._formView) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
for (const [fieldName, propsToChange] of this._fieldProps) {
|
|
163
|
-
propsToChange.forEach(prop => {
|
|
164
|
-
this._formView.setFieldProp(fieldName, prop.propName, prop.value);
|
|
165
|
-
this._fieldProps.delete(fieldName);
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
106
|
render() {
|
|
170
107
|
return (index.h(index.Host, { class: "ez-box__container" }, index.h("div", { class: "summary-header ez-flex ez-size-width--full" }, index.h("div", { class: "ez-flex ez-text ez-title--primary ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9" }, this.levelPath ? index.h("span", { class: "level-path" }, this.levelPath + " /") : undefined, this.label), index.h("div", { class: "ez-flex ez-flex--justify-end ez-col--sd-3" }, this.canFix &&
|
|
171
108
|
index.h("ez-button", { class: "ez-padding-left--medium", mode: "icon", size: "small", iconName: this.fixed ? "un-pin" : "push-pin", "data-element-id": core.ElementIDUtils.getInternalIDInfo("toggleFixed_ezFormCard"), onClick: () => this.changeFix(), title: this.fixed ? "Desafixar" : "Fixar" }), this.canExpand &&
|
|
@@ -175,10 +112,6 @@ const SnkFormView = class {
|
|
|
175
112
|
:
|
|
176
113
|
index.h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event) })));
|
|
177
114
|
}
|
|
178
|
-
static get watchers() { return {
|
|
179
|
-
"customEditors": ["observePropsCustomEditor"],
|
|
180
|
-
"fieldsProps": ["observeFieldsProps"]
|
|
181
|
-
}; }
|
|
182
115
|
};
|
|
183
116
|
SnkFormView.style = snkFormViewCss;
|
|
184
117
|
|
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-d6d5db6d.js');
|
|
8
8
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
|
9
|
-
require('./ConfigStorage-
|
|
10
|
-
require('./form-config-fetcher-
|
|
11
|
-
require('./DataFetcher-
|
|
9
|
+
require('./ConfigStorage-0a690675.js');
|
|
10
|
+
require('./form-config-fetcher-feb08214.js');
|
|
11
|
+
require('./DataFetcher-77729a93.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
@@ -21,7 +21,6 @@ const SnkForm = class {
|
|
|
21
21
|
this.exit = index.createEvent(this, "exit", 7);
|
|
22
22
|
this.actionClick = index.createEvent(this, "actionClick", 7);
|
|
23
23
|
this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
|
|
24
|
-
this._customEditors = new Map();
|
|
25
24
|
this._dataUnit = undefined;
|
|
26
25
|
this._dataState = undefined;
|
|
27
26
|
this._showFormConfig = false;
|
|
@@ -44,24 +43,6 @@ const SnkForm = class {
|
|
|
44
43
|
async hideConfig() {
|
|
45
44
|
this._showFormConfig = false;
|
|
46
45
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Registra um editor customizado para campos da grade e formulário.
|
|
49
|
-
*/
|
|
50
|
-
async addCustomEditor(fieldName, customEditor) {
|
|
51
|
-
if (this._form) {
|
|
52
|
-
this._form.addCustomEditor(fieldName, customEditor);
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const newCustomEditors = new Map(this._customEditors);
|
|
56
|
-
newCustomEditors.set(fieldName, customEditor);
|
|
57
|
-
this._customEditors = newCustomEditors;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Altera/adiciona uma propriedade nos metadados do campo.
|
|
61
|
-
*/
|
|
62
|
-
async setFieldProp(fieldName, propName, value) {
|
|
63
|
-
await this._form.setFieldProp(fieldName, propName, value);
|
|
64
|
-
}
|
|
65
46
|
closeConfig() {
|
|
66
47
|
this.hideConfig();
|
|
67
48
|
}
|
|
@@ -69,18 +50,6 @@ const SnkForm = class {
|
|
|
69
50
|
const dataInfo = { dataUnit: this._dataUnit };
|
|
70
51
|
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
71
52
|
}
|
|
72
|
-
setCustomEditors() {
|
|
73
|
-
if (!this._form) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
for (const [fieldName, customEditor] of this._customEditors) {
|
|
77
|
-
this._form.addCustomEditor(fieldName, customEditor);
|
|
78
|
-
this._customEditors.delete(fieldName);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
async componentDidRender() {
|
|
82
|
-
this.setCustomEditors();
|
|
83
|
-
}
|
|
84
53
|
async componentWillLoad() {
|
|
85
54
|
let parent = this._element.parentElement;
|
|
86
55
|
while (parent) {
|
|
@@ -96,7 +65,9 @@ const SnkForm = class {
|
|
|
96
65
|
this._dataUnit = evt.detail;
|
|
97
66
|
});
|
|
98
67
|
}
|
|
99
|
-
this._snkDataUnit.addEventListener("dataStateChange",
|
|
68
|
+
this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
|
|
69
|
+
this._dataState = evt.detail;
|
|
70
|
+
});
|
|
100
71
|
break;
|
|
101
72
|
}
|
|
102
73
|
parent = parent.parentElement;
|
|
@@ -106,23 +77,7 @@ const SnkForm = class {
|
|
|
106
77
|
}
|
|
107
78
|
this._configManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resourceID);
|
|
108
79
|
this.addFormLegacyConfig();
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
async handleDataStateChange(evt) {
|
|
112
|
-
var _a;
|
|
113
|
-
this._dataState = evt.detail;
|
|
114
|
-
const fieldsWithRmPrecision = await this._snkDataUnit.getFieldsWithRmPrecision();
|
|
115
|
-
for (const field of fieldsWithRmPrecision || []) {
|
|
116
|
-
if (!field) {
|
|
117
|
-
continue;
|
|
118
|
-
}
|
|
119
|
-
const rmPrecision = (_a = this._dataState.rowMetadata) === null || _a === void 0 ? void 0 : _a.getProp('rm_precision', field);
|
|
120
|
-
if (!rmPrecision && rmPrecision !== 0) {
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
await this.setFieldProp(field, 'precision', rmPrecision);
|
|
124
|
-
await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
|
|
125
|
-
}
|
|
80
|
+
this._configManager.loadConfig();
|
|
126
81
|
}
|
|
127
82
|
addFormLegacyConfig() {
|
|
128
83
|
if (this.formLegacyConfigName) {
|
|
@@ -133,7 +88,7 @@ const SnkForm = class {
|
|
|
133
88
|
if (!this._dataUnit || !this._dataState) {
|
|
134
89
|
return undefined;
|
|
135
90
|
}
|
|
136
|
-
return (index.h("section", null, index.h("div", { class: "ez-row" }, index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("ez-form", {
|
|
91
|
+
return (index.h("section", null, index.h("div", { class: "ez-row" }, index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("ez-form", { key: "ezForm" + this._snkDataUnit.entityName, "data-element-id": "embedded", dataUnit: this._dataUnit, config: this._configManager.getConfig(this._dataState.insertionMode, this._dataUnit), recordsValidator: this.recordsValidator, class: this._showFormConfig ? 'snk-form__form--hidden' : '' }), this._showFormConfig &&
|
|
137
92
|
index.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this._dataUnit, configManager: this._configManager, onConfigClose: () => this.closeConfig() })))));
|
|
138
93
|
}
|
|
139
94
|
get _element() { return index.getElement(this); }
|
|
@@ -4,91 +4,32 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
7
|
+
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
8
|
+
const taskbarElements = require('./taskbar-elements-3ecd1278.js');
|
|
9
|
+
const ConfigStorage = require('./ConfigStorage-0a690675.js');
|
|
10
|
+
const index$1 = require('./index-0922807b.js');
|
|
10
11
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
|
11
12
|
const index$2 = require('./index-102ba62d.js');
|
|
12
|
-
const
|
|
13
|
+
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-f79d220c.js');
|
|
13
14
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
14
|
-
require('./DataFetcher-
|
|
15
|
-
require('./pesquisa-fetcher-
|
|
15
|
+
require('./DataFetcher-77729a93.js');
|
|
16
|
+
require('./pesquisa-fetcher-cba1b3d0.js');
|
|
16
17
|
require('./ISave-e91b70a7.js');
|
|
17
18
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
18
|
-
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
19
|
-
require('./dataunit-fetcher-688d3f05.js');
|
|
20
19
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
21
|
-
require('./form-config-fetcher-
|
|
22
|
-
const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
|
|
20
|
+
require('./form-config-fetcher-feb08214.js');
|
|
23
21
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
24
22
|
require('./PrintUtils-bcaeb82f.js');
|
|
25
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
26
|
-
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
27
24
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
getFilters() {
|
|
31
|
-
var _a;
|
|
32
|
-
return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getAppliedFilters();
|
|
33
|
-
}
|
|
34
|
-
getOrders() {
|
|
35
|
-
var _a;
|
|
36
|
-
return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSort();
|
|
37
|
-
}
|
|
38
|
-
getResourceURI() {
|
|
39
|
-
var _a;
|
|
40
|
-
return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.name;
|
|
41
|
-
}
|
|
42
|
-
getSelectedNumber() {
|
|
43
|
-
return this.dataUnit.getSelectionInfo().length;
|
|
44
|
-
}
|
|
45
|
-
getTotalRecords() {
|
|
46
|
-
var _a, _b, _c;
|
|
47
|
-
const { total } = ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo()) || {};
|
|
48
|
-
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;
|
|
49
|
-
}
|
|
50
|
-
getSelectedIDs() {
|
|
51
|
-
return RecordIDUtils.getSelectedIDs(this.dataUnit);
|
|
52
|
-
}
|
|
53
|
-
getOffset() {
|
|
54
|
-
return this.getExporterOffset(this.getPaginationInfo());
|
|
55
|
-
}
|
|
56
|
-
getPageSize() {
|
|
57
|
-
var _a;
|
|
58
|
-
return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.pageSize;
|
|
59
|
-
}
|
|
60
|
-
getExportLimit() {
|
|
61
|
-
return 5000;
|
|
62
|
-
}
|
|
63
|
-
getRecordID() {
|
|
64
|
-
var _a, _b, _c;
|
|
65
|
-
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__;
|
|
66
|
-
}
|
|
67
|
-
getPaginationInfo() {
|
|
68
|
-
var _a;
|
|
69
|
-
return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo();
|
|
70
|
-
}
|
|
71
|
-
getExporterOffset(paginationInfo) {
|
|
72
|
-
if (paginationInfo == undefined) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
const offset = paginationInfo.firstRecord;
|
|
76
|
-
if (offset > 0) {
|
|
77
|
-
return (offset - 1);
|
|
78
|
-
}
|
|
79
|
-
return offset;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--lg)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding)}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";
|
|
26
|
+
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";
|
|
84
27
|
|
|
85
28
|
const SnkGrid = class {
|
|
86
29
|
constructor(hostRef) {
|
|
87
30
|
index.registerInstance(this, hostRef);
|
|
88
31
|
this.actionClick = index.createEvent(this, "actionClick", 7);
|
|
89
32
|
this.gridDoubleClick = index.createEvent(this, "gridDoubleClick", 7);
|
|
90
|
-
this._customEditors = new Map();
|
|
91
|
-
this._customRenders = new Map();
|
|
92
33
|
this._topTaskbarProcessor = new fieldSearch.TaskbarProcessor({
|
|
93
34
|
"snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
|
94
35
|
"snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
|
@@ -108,20 +49,12 @@ const SnkGrid = class {
|
|
|
108
49
|
"snkGridHeaderTaskbar.singleTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "FORM_MODE", "CONFIGURATOR", "REFRESH"],
|
|
109
50
|
"snkGridHeaderTaskbar.singleTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
|
110
51
|
});
|
|
111
|
-
this.dataUnitInterceptor = {
|
|
112
|
-
interceptAction: async (action) => {
|
|
113
|
-
if (action.type === core.Action.METADATA_LOADED) {
|
|
114
|
-
return await this.interceptMetadataLoaded(action);
|
|
115
|
-
}
|
|
116
|
-
return action;
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
52
|
this._dataUnit = undefined;
|
|
120
53
|
this._dataState = undefined;
|
|
121
54
|
this._gridConfig = undefined;
|
|
122
55
|
this._popUpGridConfig = false;
|
|
123
56
|
this._showSnkFilterBar = true;
|
|
124
|
-
this.columnFilterDataSource = new
|
|
57
|
+
this.columnFilterDataSource = new SnkMultiSelectionListDataSource.SnkMultiSelectionListDataSource();
|
|
125
58
|
this.configName = undefined;
|
|
126
59
|
this.filterBarTitle = undefined;
|
|
127
60
|
this.resourceID = undefined;
|
|
@@ -142,8 +75,6 @@ const SnkGrid = class {
|
|
|
142
75
|
this.disablePersonalizedFilter = undefined;
|
|
143
76
|
this.gridLegacyConfigName = undefined;
|
|
144
77
|
this.filterBarLegacyConfigName = undefined;
|
|
145
|
-
this.autoLoad = undefined;
|
|
146
|
-
this.autoFocus = true;
|
|
147
78
|
}
|
|
148
79
|
/**
|
|
149
80
|
* Exibe a janela de configurações da grade.
|
|
@@ -188,42 +119,6 @@ const SnkGrid = class {
|
|
|
188
119
|
async findColumn() {
|
|
189
120
|
await fieldSearch.openFieldSearch(this._moreOptions, this._columnSearch);
|
|
190
121
|
}
|
|
191
|
-
/**
|
|
192
|
-
* Registra um editor customizado para campos da grade e formulário
|
|
193
|
-
*/
|
|
194
|
-
async addCustomEditor(fieldName, customEditor, detailContext) {
|
|
195
|
-
if (this._grid) {
|
|
196
|
-
this._grid.addCustomEditor(fieldName, customEditor, detailContext);
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
const newCustomEditors = new Map(this._customEditors);
|
|
200
|
-
newCustomEditors.set(fieldName, { customEditor, detailContext });
|
|
201
|
-
this._customEditors = newCustomEditors;
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Registra um render customizado para colunas da grid.
|
|
205
|
-
*/
|
|
206
|
-
async addGridCustomRender(fieldName, customRender, detailContext) {
|
|
207
|
-
if (this._grid) {
|
|
208
|
-
this._grid.addGridCustomRender(fieldName, customRender, detailContext);
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
const newCustomRenders = new Map(this._customRenders);
|
|
212
|
-
newCustomRenders.set(fieldName, { customRender, detailContext });
|
|
213
|
-
this._customRenders = newCustomRenders;
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Registra um formatador de valores para uma coluna da grid.
|
|
217
|
-
*/
|
|
218
|
-
async addCustomValueFormatter(columnName, customFormatter) {
|
|
219
|
-
this._grid.addCustomValueFormatter(columnName, customFormatter);
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* Remove o formatador de valores de uma coluna da grid.
|
|
223
|
-
*/
|
|
224
|
-
async removeCustomValueFormatter(columnName) {
|
|
225
|
-
this._grid.removeCustomValueFormatter(columnName);
|
|
226
|
-
}
|
|
227
122
|
/**
|
|
228
123
|
* Atribui o foco para a grade.
|
|
229
124
|
*/
|
|
@@ -253,7 +148,7 @@ const SnkGrid = class {
|
|
|
253
148
|
}
|
|
254
149
|
setGridConfig(config) {
|
|
255
150
|
this._gridConfig = config;
|
|
256
|
-
|
|
151
|
+
SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
|
|
257
152
|
}
|
|
258
153
|
loadConfig() {
|
|
259
154
|
ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this.resourceID)
|
|
@@ -284,56 +179,113 @@ const SnkGrid = class {
|
|
|
284
179
|
});
|
|
285
180
|
evt.stopPropagation();
|
|
286
181
|
}
|
|
287
|
-
|
|
288
|
-
const
|
|
289
|
-
|
|
182
|
+
buildColumnsMetadata(gridColumns) {
|
|
183
|
+
const columnsMetadata = [];
|
|
184
|
+
gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach((column) => {
|
|
185
|
+
var _a, _b;
|
|
186
|
+
/**
|
|
187
|
+
* TODO: Analisar e criar uma melhor forma de tratar essa validação do "RECDESP".
|
|
188
|
+
*/
|
|
189
|
+
if (column.hidden && column.name !== "RECDESP") {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
const fieldData = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(column.name);
|
|
193
|
+
const columnData = {
|
|
194
|
+
label: column.label,
|
|
195
|
+
id: column.name,
|
|
196
|
+
width: column.width,
|
|
197
|
+
type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
|
|
198
|
+
userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface
|
|
199
|
+
};
|
|
200
|
+
columnsMetadata.push(columnData);
|
|
201
|
+
if (((_b = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONFIELD) != undefined) {
|
|
202
|
+
const mergedFrom = fieldData.properties.mergedFrom;
|
|
203
|
+
const descriptionField = `${fieldData.properties.ENTITYNAME}.${fieldData.properties.DESCRIPTIONFIELD}`;
|
|
204
|
+
const descriptionColumn = {
|
|
205
|
+
label: fieldData.properties.DESCRIPTIONENTITY,
|
|
206
|
+
id: `${mergedFrom ? (mergedFrom + ".") : ""}${descriptionField}`,
|
|
207
|
+
width: 200,
|
|
208
|
+
type: core.DataType.TEXT,
|
|
209
|
+
userInterface: UnitMetadata.UserInterface.LONGTEXT
|
|
210
|
+
};
|
|
211
|
+
columnsMetadata.push(descriptionColumn);
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
return columnsMetadata || [];
|
|
290
215
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
216
|
+
getPaginationInfo() {
|
|
217
|
+
var _a;
|
|
218
|
+
return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo();
|
|
294
219
|
}
|
|
295
|
-
|
|
296
|
-
if (
|
|
220
|
+
getExporterOffset(paginationInfo) {
|
|
221
|
+
if (paginationInfo == undefined) {
|
|
297
222
|
return;
|
|
298
223
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
224
|
+
const offset = paginationInfo.firstRecord;
|
|
225
|
+
if (offset > 0) {
|
|
226
|
+
return (offset - 1);
|
|
227
|
+
}
|
|
228
|
+
return offset;
|
|
229
|
+
}
|
|
230
|
+
async dataExporterProviderStore() {
|
|
231
|
+
var _a;
|
|
232
|
+
const selectedIDs = await ((_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.getSelectedRecordsIDsInfo());
|
|
233
|
+
const dataExporterProvider = {
|
|
234
|
+
getFilters: () => {
|
|
235
|
+
var _a;
|
|
236
|
+
return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getAppliedFilters();
|
|
237
|
+
},
|
|
238
|
+
getColumnsMetadata: async () => {
|
|
239
|
+
var _a;
|
|
240
|
+
const columnsState = await ((_a = this._grid) === null || _a === void 0 ? void 0 : _a.getColumnsState());
|
|
241
|
+
return this.buildColumnsMetadata(columnsState);
|
|
242
|
+
},
|
|
243
|
+
getOrders: () => {
|
|
244
|
+
var _a;
|
|
245
|
+
return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getSort();
|
|
246
|
+
},
|
|
247
|
+
getResourceURI: () => {
|
|
248
|
+
var _a;
|
|
249
|
+
return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.name;
|
|
250
|
+
},
|
|
251
|
+
getSelectedNumber: () => {
|
|
252
|
+
var _a, _b;
|
|
253
|
+
return (_b = (_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectionInfo) === null || _b === void 0 ? void 0 : _b.length;
|
|
254
|
+
},
|
|
255
|
+
getTotalRecords: () => {
|
|
256
|
+
var _a, _b, _c;
|
|
257
|
+
const { total } = ((_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getPaginationInfo()) || {};
|
|
258
|
+
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;
|
|
259
|
+
},
|
|
260
|
+
getSelectedIDs: () => {
|
|
261
|
+
return selectedIDs || [];
|
|
262
|
+
},
|
|
263
|
+
getOffset: () => {
|
|
264
|
+
return this.getExporterOffset(this.getPaginationInfo());
|
|
265
|
+
},
|
|
266
|
+
getLimit: () => {
|
|
267
|
+
var _a;
|
|
268
|
+
return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.pageSize;
|
|
269
|
+
},
|
|
270
|
+
getRecordID: () => {
|
|
271
|
+
var _a, _b, _c;
|
|
272
|
+
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__;
|
|
303
273
|
}
|
|
304
|
-
}
|
|
274
|
+
};
|
|
275
|
+
index$2.store.set("exporterProviders", Object.assign(Object.assign({}, index$2.store.get("exporterProviders")), { [this.configName]: dataExporterProvider }));
|
|
305
276
|
}
|
|
306
|
-
|
|
307
|
-
this.
|
|
308
|
-
|
|
277
|
+
addElementID() {
|
|
278
|
+
const dataInfo = { dataUnit: this._dataUnit };
|
|
279
|
+
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
309
280
|
}
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
IExporterProvider.CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
|
|
281
|
+
finshLoading() {
|
|
282
|
+
SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
|
|
313
283
|
this.addElementID();
|
|
314
284
|
if (this.columnFilterDataSource != undefined) {
|
|
315
285
|
this.columnFilterDataSource.setApplication(this._application);
|
|
316
286
|
this.columnFilterDataSource.setDataUnit(this._dataUnit);
|
|
317
287
|
}
|
|
318
288
|
}
|
|
319
|
-
setCustomRenders() {
|
|
320
|
-
if (!this._grid) {
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
323
|
-
for (const [fieldName, customRenderProps] of this._customRenders) {
|
|
324
|
-
this._grid.addGridCustomRender(fieldName, customRenderProps.customRender, customRenderProps.detailContext);
|
|
325
|
-
this._customRenders.delete(fieldName);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
setCustomEditors() {
|
|
329
|
-
if (!this._grid) {
|
|
330
|
-
return;
|
|
331
|
-
}
|
|
332
|
-
for (const [fieldName, customEditorProps] of this._customEditors) {
|
|
333
|
-
this._grid.addCustomEditor(fieldName, customEditorProps.customEditor, customEditorProps.detailContext);
|
|
334
|
-
this._customEditors.delete(fieldName);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
289
|
componentWillLoad() {
|
|
338
290
|
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
339
291
|
//TODO: substituir pelo metodo nativo closest
|
|
@@ -345,15 +297,17 @@ const SnkGrid = class {
|
|
|
345
297
|
if (!this._dataUnit) {
|
|
346
298
|
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
|
347
299
|
this._dataUnit = evt.detail;
|
|
348
|
-
this.
|
|
300
|
+
this.finshLoading();
|
|
349
301
|
});
|
|
350
302
|
}
|
|
351
303
|
else {
|
|
352
|
-
this.
|
|
304
|
+
this.finshLoading();
|
|
353
305
|
}
|
|
354
306
|
if (!this.messagesBuilder)
|
|
355
307
|
this.messagesBuilder = this._snkDataUnit.messagesBuilder;
|
|
356
|
-
this._snkDataUnit.addEventListener("dataStateChange",
|
|
308
|
+
this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
|
|
309
|
+
this._dataState = evt.detail;
|
|
310
|
+
});
|
|
357
311
|
this._snkDataUnit.addEventListener("cancelEdition", () => {
|
|
358
312
|
var _a;
|
|
359
313
|
if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.recordsIsEmpty) {
|
|
@@ -364,20 +318,9 @@ const SnkGrid = class {
|
|
|
364
318
|
}
|
|
365
319
|
parent = parent.parentElement;
|
|
366
320
|
}
|
|
367
|
-
this._rmPrecisionCustomValueFormatter = new IExporterProvider.RmPrecisionCustomValueFormatter();
|
|
368
321
|
this.addGridLegacyConfigName();
|
|
369
322
|
this.loadConfig();
|
|
370
323
|
}
|
|
371
|
-
componentDidRender() {
|
|
372
|
-
this._rmPrecisionCustomValueFormatter.setGrid(this._grid);
|
|
373
|
-
this.loadGridCustomFormatters(this._dataUnit.metadata.fields);
|
|
374
|
-
this.setCustomRenders();
|
|
375
|
-
this.setCustomEditors();
|
|
376
|
-
}
|
|
377
|
-
async handleDataStateChange(evt) {
|
|
378
|
-
this._dataState = evt.detail;
|
|
379
|
-
this._rmPrecisionCustomValueFormatter.setDataState(this._dataState);
|
|
380
|
-
}
|
|
381
324
|
getHeaderDisabledButtons() {
|
|
382
325
|
var _a;
|
|
383
326
|
const disabledButtons = [];
|
|
@@ -489,8 +432,8 @@ const SnkGrid = class {
|
|
|
489
432
|
if (!this._dataUnit) {
|
|
490
433
|
return undefined;
|
|
491
434
|
}
|
|
492
|
-
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
|
|
493
|
-
index.h(index.Fragment, null, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName
|
|
435
|
+
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
|
|
436
|
+
index.h(index.Fragment, null, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, index.h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, 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.resourceID }))));
|
|
494
437
|
}
|
|
495
438
|
get _element() { return index.getElement(this); }
|
|
496
439
|
static get watchers() { return {
|