@sankhyalabs/sankhyablocks 8.16.0-dev.4 → 8.16.0-dev.40
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/{ConfigStorage-942ce74b.js → ConfigStorage-ecc0ed20.js} +3 -2
- package/dist/cjs/{IExporterProvider-597949f9.js → ContinuousInsertUtils-c7e35e3b.js} +39 -6
- package/dist/cjs/{DataFetcher-313debd8.js → DataFetcher-cadeef8e.js} +21 -15
- package/dist/cjs/{RecordIDUtils-3735135c.js → GetSelectedRecordsIDsInfo-bd50caf1.js} +10 -10
- package/dist/cjs/{SnkFormConfigManager-1b13bacd.js → SnkFormConfigManager-f1c92f79.js} +74 -20
- package/dist/cjs/{SnkMessageBuilder-722b104e.js → SnkMessageBuilder-bae64d0d.js} +7 -3
- package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-d68841bc.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-688d3f05.js → dataunit-fetcher-a36ae041.js} +48 -20
- package/dist/cjs/{field-search-f56aa7d6.js → field-search-68e34bf4.js} +5 -1
- package/dist/cjs/{form-config-fetcher-2dd00e5b.js → form-config-fetcher-ed497282.js} +5 -2
- package/dist/cjs/index-f9e81701.js +8 -28
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-680e198f.js → pesquisa-fetcher-490a86c3.js} +7 -2
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +17 -14
- package/dist/cjs/snk-application.cjs.entry.js +7 -7
- package/dist/cjs/snk-attach.cjs.entry.js +38 -29
- package/dist/cjs/{snk-form-config.cjs.entry.js → snk-config-options_3.cjs.entry.js} +381 -7
- package/dist/cjs/snk-crud.cjs.entry.js +16 -7
- package/dist/cjs/snk-data-exporter.cjs.entry.js +19 -18
- package/dist/cjs/{snk-data-unit-685272e7.js → snk-data-unit-b460f1da.js} +42 -22
- package/dist/cjs/snk-data-unit.cjs.entry.js +5 -5
- package/dist/cjs/snk-detail-view.cjs.entry.js +12 -13
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +1411 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-grid.cjs.entry.js +58 -21
- package/dist/cjs/{snk-guides-viewer-67605336.js → snk-guides-viewer-de0a5c57.js} +27 -14
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +66 -27
- package/dist/cjs/snk-taskbar.cjs.entry.js +24 -1
- package/dist/collection/collection-manifest.json +11 -31
- package/dist/collection/components/snk-actions-button/actions/index.js +12 -9
- package/dist/collection/components/snk-attach/snk-attach.js +25 -16
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +2 -4
- package/dist/collection/components/snk-crud/snk-crud.js +97 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +3 -4
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +6 -6
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +70 -7
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +1 -1
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +4 -4
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +5 -5
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +1 -1
- package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +2 -2
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +2 -2
- package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +4 -4
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +57 -20
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +1 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +59 -21
- package/dist/collection/components/snk-form/snk-form.js +2 -2
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +72 -18
- package/dist/collection/components/snk-form-config/snk-form-config.css +8 -3
- package/dist/collection/components/snk-form-config/snk-form-config.js +32 -3
- package/dist/collection/components/snk-grid/snk-grid.css +2 -0
- package/dist/collection/components/snk-grid/snk-grid.js +74 -8
- package/dist/collection/components/snk-print-selector/snk-print-selector.js +1 -1
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +1 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +0 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +91 -16
- package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +5 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +65 -0
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +3 -3
- package/dist/collection/lib/configs/ConfigStorage.js +1 -0
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +2 -4
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +34 -9
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +22 -16
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js +7 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +2 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +9 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +4 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +6 -1
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -1
- package/dist/collection/lib/message/resources/snk-exporter.msg.js +1 -1
- package/dist/collection/lib/message/resources/snk-grid.msg.js +5 -1
- package/dist/collection/lib/utils/ContinuousInsertUtils.js +31 -0
- package/dist/collection/{components/snk-data-exporter/utils/RecordIDUtils.js → lib/utils/GetSelectedRecordsIDsInfo.js} +9 -9
- package/dist/collection/sw.js +46 -0
- package/dist/components/ConfigStorage.js +1 -0
- package/dist/components/{IExporterProvider.js → ContinuousInsertUtils.js} +40 -5
- package/dist/components/DataFetcher.js +22 -16
- package/dist/{esm/RecordIDUtils-87d02110.js → components/GetSelectedRecordsIDsInfo.js} +10 -10
- package/dist/components/SnkFormConfigManager.js +72 -18
- package/dist/components/SnkMessageBuilder.js +7 -3
- package/dist/components/dataunit-fetcher.js +47 -17
- package/dist/components/form-config-fetcher.js +4 -1
- package/dist/components/pesquisa-fetcher.js +6 -1
- package/dist/components/snk-actions-button2.js +12 -9
- package/dist/components/snk-attach2.js +34 -25
- package/dist/components/snk-crud.js +15 -2
- package/dist/components/snk-data-exporter2.js +12 -11
- package/dist/components/snk-data-unit2.js +44 -60
- package/dist/components/snk-detail-view2.js +28 -13
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-filter-bar2.js +35 -22
- package/dist/components/snk-filter-binary-select.js +1 -1
- package/dist/components/snk-filter-checkbox-list.js +1 -1
- package/dist/components/snk-form-config2.js +17 -4
- package/dist/components/snk-form.js +2 -2
- package/dist/components/snk-grid2.js +51 -12
- package/dist/components/snk-personalized-filter-editor.js +1 -1
- package/dist/components/snk-print-selector.js +1 -1
- package/dist/components/snk-simple-bar2.js +1 -1
- package/dist/components/snk-simple-crud2.js +59 -16
- package/dist/components/snk-taskbar2.js +25 -2
- package/dist/esm/{ConfigStorage-86187da3.js → ConfigStorage-7b36d041.js} +3 -2
- package/dist/esm/{IExporterProvider-63a188b6.js → ContinuousInsertUtils-3e520a07.js} +40 -8
- package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-a9c598f2.js} +22 -16
- package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js +41 -0
- package/dist/esm/{SnkFormConfigManager-d4554df9.js → SnkFormConfigManager-f1a0fc92.js} +74 -20
- package/dist/esm/{SnkMessageBuilder-89925609.js → SnkMessageBuilder-6fff4a4c.js} +7 -3
- package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-749d880f.js} +1 -1
- package/dist/esm/{constants-8457af36.js → constants-7302ee87.js} +1 -1
- package/dist/esm/{dataunit-fetcher-264191b2.js → dataunit-fetcher-fd58c640.js} +48 -18
- package/dist/esm/{field-search-efbe307f.js → field-search-f8b1d91e.js} +5 -1
- package/dist/esm/{form-config-fetcher-30fb808f.js → form-config-fetcher-adbe5d34.js} +5 -2
- package/dist/esm/index-a7d3d3f1.js +8 -28
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-03c8f919.js → pesquisa-fetcher-50fc7e6b.js} +7 -2
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_4.entry.js +18 -15
- package/dist/esm/snk-application.entry.js +7 -7
- package/dist/esm/snk-attach.entry.js +39 -30
- package/dist/esm/{snk-form-config.entry.js → snk-config-options_3.entry.js} +382 -10
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +17 -8
- package/dist/esm/snk-data-exporter.entry.js +20 -19
- package/dist/esm/{snk-data-unit-63f83504.js → snk-data-unit-590225b5.js} +42 -22
- package/dist/esm/snk-data-unit.entry.js +5 -5
- package/dist/esm/snk-detail-view.entry.js +13 -14
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-field-config.entry.js +1 -1
- package/dist/esm/snk-filter-bar_4.entry.js +1404 -0
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-grid.entry.js +53 -16
- package/dist/esm/{snk-guides-viewer-151f6091.js → snk-guides-viewer-2f4dcdc5.js} +28 -15
- package/dist/esm/snk-guides-viewer.entry.js +9 -9
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-bar.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +63 -24
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +24 -1
- package/dist/sankhyablocks/p-052213ba.entry.js +1 -0
- package/dist/sankhyablocks/{p-df5451c7.js → p-06421fdb.js} +2 -2
- package/dist/sankhyablocks/p-0b6cd238.entry.js +1 -0
- package/dist/sankhyablocks/p-0e320bd2.entry.js +1 -0
- package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
- package/dist/sankhyablocks/p-17425c72.js +1 -0
- package/dist/sankhyablocks/{p-a1d72395.entry.js → p-212213d9.entry.js} +1 -1
- package/dist/sankhyablocks/p-23736d75.js +1 -0
- package/dist/sankhyablocks/p-275de842.entry.js +1 -0
- package/dist/sankhyablocks/p-2aae03a1.entry.js +1 -0
- package/dist/sankhyablocks/{p-8eb67fa4.entry.js → p-2d3f9482.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7663f597.entry.js → p-41793e17.entry.js} +1 -1
- package/dist/sankhyablocks/{p-72fc257b.entry.js → p-434817f0.entry.js} +1 -1
- package/dist/sankhyablocks/p-47bce500.js +60 -0
- package/dist/sankhyablocks/{p-aff76a53.js → p-4d9549cf.js} +2 -2
- package/dist/sankhyablocks/p-583517ba.entry.js +1 -0
- package/dist/sankhyablocks/p-5b51491f.entry.js +1 -0
- package/dist/sankhyablocks/p-5e51e833.entry.js +1 -0
- package/dist/sankhyablocks/{p-aaa3ee68.entry.js → p-5f157b09.entry.js} +1 -1
- package/dist/sankhyablocks/p-656f0e51.entry.js +1 -0
- package/dist/sankhyablocks/p-72c10005.entry.js +1 -0
- package/dist/sankhyablocks/p-7bd9683d.js +1 -0
- package/dist/sankhyablocks/p-7dd49d15.js +1 -0
- package/dist/sankhyablocks/{p-af8efd95.js → p-8a9638ae.js} +2 -2
- package/dist/sankhyablocks/{p-95df461f.entry.js → p-8b4fc28f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-41f8bfa3.entry.js → p-8c235d4c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b0ef4383.js → p-95ce311a.js} +1 -1
- package/dist/sankhyablocks/p-9f9b99d9.js +1 -0
- package/dist/sankhyablocks/p-ab1645fb.entry.js +1 -0
- package/dist/sankhyablocks/p-c2e468c9.entry.js +1 -0
- package/dist/sankhyablocks/{p-913a9979.js → p-ca5ec380.js} +1 -1
- package/dist/sankhyablocks/p-cefb0ee1.entry.js +1 -0
- package/dist/sankhyablocks/{p-82a0bfb0.entry.js → p-dbe6174a.entry.js} +2 -2
- package/dist/sankhyablocks/p-f3434fc4.js +1 -0
- package/dist/sankhyablocks/p-fa6c5826.entry.js +1 -0
- package/dist/sankhyablocks/p-fadc8339.js +1 -0
- package/dist/sankhyablocks/{p-eae7a817.entry.js → p-fb34e0cf.entry.js} +1 -1
- package/dist/sankhyablocks/p-fd13b4d2.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/actions/index.d.ts +1 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +17 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +15 -0
- package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +3 -3
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +7 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +5 -0
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +9 -4
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +4 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +11 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +13 -0
- package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +1 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -0
- package/dist/types/components.d.ts +113 -0
- package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +12 -2
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.d.ts +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +1 -1
- package/dist/types/lib/utils/ContinuousInsertUtils.d.ts +10 -0
- package/dist/types/lib/utils/GetSelectedRecordsIDsInfo.d.ts +3 -0
- package/package.json +4 -3
- package/dist/cjs/snk-config-options.cjs.entry.js +0 -239
- package/dist/cjs/snk-filter-bar.cjs.entry.js +0 -714
- package/dist/cjs/snk-filter-item.cjs.entry.js +0 -312
- package/dist/cjs/snk-filter-list.cjs.entry.js +0 -152
- package/dist/cjs/snk-filter-modal.cjs.entry.js +0 -249
- package/dist/cjs/snk-form.cjs.entry.js +0 -143
- package/dist/esm/snk-config-options.entry.js +0 -235
- package/dist/esm/snk-filter-bar.entry.js +0 -710
- package/dist/esm/snk-filter-item.entry.js +0 -308
- package/dist/esm/snk-filter-list.entry.js +0 -148
- package/dist/esm/snk-filter-modal.entry.js +0 -245
- package/dist/esm/snk-form.entry.js +0 -139
- package/dist/sankhyablocks/p-14a08904.entry.js +0 -1
- package/dist/sankhyablocks/p-14b9f964.entry.js +0 -1
- package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
- package/dist/sankhyablocks/p-3a212712.js +0 -1
- package/dist/sankhyablocks/p-3a216b81.entry.js +0 -1
- package/dist/sankhyablocks/p-3b60db06.entry.js +0 -1
- package/dist/sankhyablocks/p-47b60deb.entry.js +0 -1
- package/dist/sankhyablocks/p-70a4af56.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-88aa931b.entry.js +0 -1
- 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-b11aa1e0.entry.js +0 -1
- 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-c2495304.js +0 -1
- package/dist/sankhyablocks/p-c5268346.entry.js +0 -1
- package/dist/sankhyablocks/p-cefba299.js +0 -1
- package/dist/sankhyablocks/p-d3f53df2.entry.js +0 -1
- package/dist/sankhyablocks/p-dc7c9047.js +0 -1
- package/dist/sankhyablocks/p-e8763234.entry.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-data-exporter/utils/RecordIDUtils.d.ts +0 -3
@@ -3,17 +3,377 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
|
-
const Sortable = require('./Sortable-fb1c4cbb.js');
|
7
6
|
const core = require('@sankhyalabs/core');
|
7
|
+
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
10
|
-
const
|
10
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-f1c92f79.js');
|
11
|
+
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
12
|
+
const Sortable = require('./Sortable-fb1c4cbb.js');
|
13
|
+
const formConfigFetcher = require('./form-config-fetcher-ed497282.js');
|
11
14
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
12
|
-
require('./
|
15
|
+
require('./ConfigStorage-ecc0ed20.js');
|
16
|
+
require('./filter-item-type.enum-a7ffdaa6.js');
|
17
|
+
require('./DataFetcher-cadeef8e.js');
|
13
18
|
require('./PrintUtils-bcaeb82f.js');
|
14
19
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
15
20
|
|
16
|
-
const
|
21
|
+
const snkConfigOptionsCss = ".sc-snk-config-options-h{--snk-config-options--border:2px solid var(--color--secondary-200, #D2D3DA);width:100%;border-radius:15px;border:var(--snk-config-options--border)}.config-options__switch-row.sc-snk-config-options{margin-top:-30px}";
|
22
|
+
|
23
|
+
const SnkConfigOptions = class {
|
24
|
+
constructor(hostRef) {
|
25
|
+
index.registerInstance(this, hostRef);
|
26
|
+
this.configOptionsChanged = index.createEvent(this, "configOptionsChanged", 7);
|
27
|
+
this._defaultType = undefined;
|
28
|
+
this.fieldConfig = {};
|
29
|
+
this.idConfig = undefined;
|
30
|
+
this.dataUnit = undefined;
|
31
|
+
this.messagesBuilder = undefined;
|
32
|
+
}
|
33
|
+
onConfigDefault(optionSelected) {
|
34
|
+
if (optionSelected != undefined) {
|
35
|
+
this._defaultType = optionSelected;
|
36
|
+
this.fieldConfig.defaultValue = {
|
37
|
+
type: this._defaultType
|
38
|
+
};
|
39
|
+
this.configOptionsChanged.emit(this.fieldConfig);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
buildOptions() {
|
43
|
+
var _a, _b, _c;
|
44
|
+
let interfaceField = (_c = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField((_b = this.fieldConfig) === null || _b === void 0 ? void 0 : _b.name)) === null || _c === void 0 ? void 0 : _c.userInterface;
|
45
|
+
if (interfaceField === core.UserInterface.SEARCH) {
|
46
|
+
interfaceField = core.UserInterface.INTEGERNUMBER;
|
47
|
+
}
|
48
|
+
return constants.VARS_BY_TYPE.UserInterface[interfaceField];
|
49
|
+
}
|
50
|
+
enabledValueDefault() {
|
51
|
+
var _a, _b, _c;
|
52
|
+
const field = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField((_b = this.fieldConfig) === null || _b === void 0 ? void 0 : _b.name);
|
53
|
+
const allowDefault = (_c = field === null || field === void 0 ? void 0 : field.properties) === null || _c === void 0 ? void 0 : _c.allowDefault;
|
54
|
+
const hasVariableVar = constants.VARS_BY_TYPE.UserInterface.hasOwnProperty(field === null || field === void 0 ? void 0 : field.userInterface)
|
55
|
+
|| (field === null || field === void 0 ? void 0 : field.userInterface) === core.UserInterface.SEARCH;
|
56
|
+
if ((allowDefault == undefined || allowDefault === "true") && hasVariableVar) {
|
57
|
+
return true;
|
58
|
+
}
|
59
|
+
return false;
|
60
|
+
}
|
61
|
+
isAllowDefault() {
|
62
|
+
var _a, _b;
|
63
|
+
const allowDefault = (_b = (_a = this._fieldProperties) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.allowDefault;
|
64
|
+
if (allowDefault == undefined) {
|
65
|
+
return true;
|
66
|
+
}
|
67
|
+
return allowDefault === "true";
|
68
|
+
}
|
69
|
+
loadDefaultValue() {
|
70
|
+
var _a;
|
71
|
+
if (this.fieldConfig == undefined) {
|
72
|
+
this._defaultType = constants.DEFAULT_TYPE.fixed;
|
73
|
+
this.fieldConfig = {
|
74
|
+
defaultValue: {
|
75
|
+
type: this._defaultType
|
76
|
+
}
|
77
|
+
};
|
78
|
+
}
|
79
|
+
else if (((_a = this.fieldConfig.defaultValue) === null || _a === void 0 ? void 0 : _a.type) == undefined) {
|
80
|
+
this._defaultType = constants.DEFAULT_TYPE.fixed;
|
81
|
+
this.fieldConfig.defaultValue = {
|
82
|
+
type: this._defaultType
|
83
|
+
};
|
84
|
+
}
|
85
|
+
else {
|
86
|
+
this._defaultType = this.fieldConfig.defaultValue.type;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
getFieldProperties(field) {
|
90
|
+
var _a;
|
91
|
+
if (field != undefined) {
|
92
|
+
return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(field);
|
93
|
+
}
|
94
|
+
}
|
95
|
+
getMessage(key, params) {
|
96
|
+
return this.messagesBuilder.getMessage(key, params);
|
97
|
+
}
|
98
|
+
getDefaultType() {
|
99
|
+
var _a;
|
100
|
+
return (_a = this.fieldConfig.defaultValue.type) !== null && _a !== void 0 ? _a : constants.DEFAULT_TYPE.fixed;
|
101
|
+
}
|
102
|
+
getEnabledByProperty(attribName, propertyName) {
|
103
|
+
const fieldDescriptor = this._fieldProperties;
|
104
|
+
if (fieldDescriptor == undefined) {
|
105
|
+
return true;
|
106
|
+
}
|
107
|
+
const fieldProperties = fieldDescriptor.properties || {};
|
108
|
+
return fieldProperties.hasOwnProperty(propertyName) ? fieldProperties[propertyName] !== "S" : fieldDescriptor[attribName] !== true;
|
109
|
+
}
|
110
|
+
getValueByProperty(property) {
|
111
|
+
const properties = this._fieldProperties;
|
112
|
+
if (properties != undefined && properties[property] === true) {
|
113
|
+
return true;
|
114
|
+
}
|
115
|
+
return this.fieldConfig[property];
|
116
|
+
}
|
117
|
+
getValidatedValue(fieldValue) {
|
118
|
+
var _a, _b;
|
119
|
+
if (fieldValue == undefined) {
|
120
|
+
return;
|
121
|
+
}
|
122
|
+
const field = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField((_b = this.fieldConfig) === null || _b === void 0 ? void 0 : _b.name);
|
123
|
+
const dataType = field === null || field === void 0 ? void 0 : field.dataType;
|
124
|
+
if (dataType == undefined) {
|
125
|
+
return;
|
126
|
+
}
|
127
|
+
const value = (fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.waitmessage) != undefined ? undefined :
|
128
|
+
dataType !== DataType.DataType.OBJECT && dataType !== DataType.DataType.DATE
|
129
|
+
&& typeof fieldValue === "object"
|
130
|
+
? fieldValue.value
|
131
|
+
: fieldValue;
|
132
|
+
return dataType === DataType.DataType.OBJECT ? JSON.stringify(value) : value;
|
133
|
+
}
|
134
|
+
buildInputDefault({ value, enabled, label, name, required, userInterface }, properties = undefined, mode = undefined) {
|
135
|
+
let options;
|
136
|
+
let precision = 0;
|
137
|
+
let prettyPrecision = 0;
|
138
|
+
const TagName = userInterface == undefined || constants.TAGS_BY_TYPE[userInterface] == undefined
|
139
|
+
? constants.TAGS_BY_TYPE.DEFAULT
|
140
|
+
: constants.TAGS_BY_TYPE[userInterface];
|
141
|
+
if (userInterface === core.UserInterface.OPTIONSELECTOR) {
|
142
|
+
const prop = properties === null || properties === void 0 ? void 0 : properties.options;
|
143
|
+
if (typeof prop === "string") {
|
144
|
+
const parsed = core.ObjectUtils.stringToObject(prop);
|
145
|
+
options = Object.keys(parsed).map(key => { return { value: key, label: parsed[key] }; });
|
146
|
+
}
|
147
|
+
else {
|
148
|
+
options = prop;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
else if (userInterface === core.UserInterface.DECIMALNUMBER) {
|
152
|
+
precision = Number((properties === null || properties === void 0 ? void 0 : properties.precision) || 2);
|
153
|
+
prettyPrecision = Number((properties === null || properties === void 0 ? void 0 : properties.prettyPrecision) || precision);
|
154
|
+
}
|
155
|
+
return index.h(TagName, Object.assign({ value: value, enabled: enabled, label: label, "data-field-name": name, key: name, onEzChange: (evt) => this.onChange(evt === null || evt === void 0 ? void 0 : evt.detail) }, (this.getConditionalAttributes(userInterface, required, options, precision, prettyPrecision, mode))));
|
156
|
+
}
|
157
|
+
getConditionalAttributes(userInterface, required, options, precision, prettyPrecision, mode) {
|
158
|
+
switch (userInterface) {
|
159
|
+
case core.UserInterface.SEARCH:
|
160
|
+
return {
|
161
|
+
suppressEmptyOption: required,
|
162
|
+
optionLoader: (searchArgument) => this.onSearch(searchArgument)
|
163
|
+
};
|
164
|
+
case core.UserInterface.OPTIONSELECTOR:
|
165
|
+
return {
|
166
|
+
suppressEmptyOption: required,
|
167
|
+
options
|
168
|
+
};
|
169
|
+
case core.UserInterface.CHECKBOX:
|
170
|
+
case core.UserInterface.SWITCH:
|
171
|
+
return {
|
172
|
+
mode
|
173
|
+
};
|
174
|
+
case core.UserInterface.INTEGERNUMBER:
|
175
|
+
case core.UserInterface.DECIMALNUMBER:
|
176
|
+
return {
|
177
|
+
precision,
|
178
|
+
prettyPrecision,
|
179
|
+
onEzStartChange: (evt) => this.onChange(evt === null || evt === void 0 ? void 0 : evt.detail)
|
180
|
+
};
|
181
|
+
case core.UserInterface.DATE:
|
182
|
+
case core.UserInterface.DATETIME:
|
183
|
+
case core.UserInterface.TIME:
|
184
|
+
return {
|
185
|
+
onEzStartChange: (evt) => this.onChange(evt === null || evt === void 0 ? void 0 : evt.detail)
|
186
|
+
};
|
187
|
+
default:
|
188
|
+
return {};
|
189
|
+
}
|
190
|
+
}
|
191
|
+
onChange(fieldValue) {
|
192
|
+
this.fieldConfig.defaultValue.value = this.getValidatedValue(fieldValue);
|
193
|
+
this.configOptionsChanged.emit(this.fieldConfig);
|
194
|
+
}
|
195
|
+
onSearch(searchArgument) {
|
196
|
+
if (this._application != undefined && this.fieldConfig != undefined) {
|
197
|
+
return this._application.executeSearch(searchArgument, this.fieldConfig.name, this.dataUnit);
|
198
|
+
}
|
199
|
+
}
|
200
|
+
buildField(descriptor, config) {
|
201
|
+
const { name, label, readOnly, required, defaultValue } = config;
|
202
|
+
const { userInterface, properties } = descriptor;
|
203
|
+
const allowDefault = properties === null || properties === void 0 ? void 0 : properties.allowDefault;
|
204
|
+
let value;
|
205
|
+
let enabled = core.StringUtils.getBooleanValue(allowDefault, !readOnly);
|
206
|
+
if (userInterface === core.UserInterface.FILE) {
|
207
|
+
enabled = false;
|
208
|
+
}
|
209
|
+
if (enabled) {
|
210
|
+
value = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.value;
|
211
|
+
if (value != undefined) {
|
212
|
+
value = DataType.getConvertedValue(descriptor === null || descriptor === void 0 ? void 0 : descriptor.dataType, value);
|
213
|
+
}
|
214
|
+
}
|
215
|
+
const configField = { value, enabled, label, name, required, userInterface };
|
216
|
+
switch (userInterface) {
|
217
|
+
case core.UserInterface.SWITCH:
|
218
|
+
return this.buildInputDefault(configField, undefined, utils.CheckMode.SWITCH);
|
219
|
+
case core.UserInterface.CHECKBOX:
|
220
|
+
return this.buildInputDefault(configField, undefined, utils.CheckMode.REGULAR);
|
221
|
+
case core.UserInterface.OPTIONSELECTOR:
|
222
|
+
case core.UserInterface.DECIMALNUMBER:
|
223
|
+
return this.buildInputDefault(configField, properties);
|
224
|
+
default:
|
225
|
+
return this.buildInputDefault(configField);
|
226
|
+
}
|
227
|
+
}
|
228
|
+
componentWillLoad() {
|
229
|
+
var _a;
|
230
|
+
this.loadDefaultValue();
|
231
|
+
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
232
|
+
this._fieldProperties = this.getFieldProperties((_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.name);
|
233
|
+
}
|
234
|
+
componentDidLoad() {
|
235
|
+
core.ElementIDUtils.addIDInfo(this._element, this.fieldConfig.name);
|
236
|
+
}
|
237
|
+
render() {
|
238
|
+
var _a, _b;
|
239
|
+
return (index.h(index.Host, null, index.h("div", { id: this.idConfig }, index.h("div", { class: "ez-row ez-padding--medium" }, index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, index.h("ez-text-input", { label: this.getMessage("snkConfigOptions.label.nameField"), value: (_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.label, onEzChange: (evt) => { this.fieldConfig.label = evt.detail; this.configOptionsChanged.emit(this.fieldConfig); } })), index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, index.h("ez-combo-box", { label: this.getMessage("snkConfigOptions.label.typeValueDefault"), suppressEmptyOption: true, enabled: this.enabledValueDefault(), onEzChange: (evt) => { var _a; return this.onConfigDefault((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); }, value: this.getDefaultType() }, index.h("option", { value: constants.DEFAULT_TYPE.fixed }, this.getMessage("snkConfigOptions.options.valueFixed")), index.h("option", { value: constants.DEFAULT_TYPE.variable }, this.getMessage("snkConfigOptions.options.variable")))), index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, this._defaultType === constants.DEFAULT_TYPE.variable ?
|
240
|
+
index.h("ez-combo-box", { label: this.getMessage("snkConfigOptions.label.valueDefault"), enabled: this.isAllowDefault(), onEzChange: (evt) => { var _a; this.fieldConfig.defaultValue.value = (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value; this.configOptionsChanged.emit(this.fieldConfig); }, value: this.fieldConfig.defaultValue.value, options: this.buildOptions() })
|
241
|
+
:
|
242
|
+
((_b = this._fieldProperties) === null || _b === void 0 ? void 0 : _b.userInterface) &&
|
243
|
+
this.buildField(this._fieldProperties, this.fieldConfig))), index.h("div", { class: "ez-row ez-padding--medium config-options__switch-row" }, index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, index.h("ez-check", { mode: utils.CheckMode.SWITCH, label: this.getMessage("snkConfigOptions.label.clearDuplicate"), value: this.fieldConfig.cleanOnCopy, onEzChange: (evt) => { this.fieldConfig.cleanOnCopy = evt.detail; this.configOptionsChanged.emit(this.fieldConfig); } })), index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, index.h("ez-check", { mode: utils.CheckMode.SWITCH, label: this.getMessage("snkConfigOptions.label.requiredField"), enabled: this.getEnabledByProperty("required", "systemRequired"), value: this.getValueByProperty("required"), onEzChange: (evt) => { this.fieldConfig.required = evt.detail; this.configOptionsChanged.emit(this.fieldConfig); } })), index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, index.h("ez-check", { mode: utils.CheckMode.SWITCH, label: this.getMessage("snkConfigOptions.label.protectedField"), enabled: this.getEnabledByProperty("readOnly", "systemReadOnly"), value: this.getValueByProperty("readOnly"), onEzChange: (evt) => { this.fieldConfig.readOnly = evt.detail; this.configOptionsChanged.emit(this.fieldConfig); } }))))));
|
244
|
+
}
|
245
|
+
get _element() { return index.getElement(this); }
|
246
|
+
};
|
247
|
+
SnkConfigOptions.style = snkConfigOptionsCss;
|
248
|
+
|
249
|
+
const snkFormCss = ".sc-snk-form-h{--snk-form__header--min-height:94px;display:block}.snk-form__form--hidden.sc-snk-form{display:none}";
|
250
|
+
|
251
|
+
const SnkForm = class {
|
252
|
+
constructor(hostRef) {
|
253
|
+
index.registerInstance(this, hostRef);
|
254
|
+
this.exit = index.createEvent(this, "exit", 7);
|
255
|
+
this.actionClick = index.createEvent(this, "actionClick", 7);
|
256
|
+
this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
|
257
|
+
this._customEditors = new Map();
|
258
|
+
this._dataUnit = undefined;
|
259
|
+
this._dataState = undefined;
|
260
|
+
this._showFormConfig = false;
|
261
|
+
this._configManager = undefined;
|
262
|
+
this.configName = undefined;
|
263
|
+
this.recordsValidator = undefined;
|
264
|
+
this.messagesBuilder = undefined;
|
265
|
+
this.formLegacyConfigName = undefined;
|
266
|
+
this.resourceID = undefined;
|
267
|
+
}
|
268
|
+
/**
|
269
|
+
* Exibe a janela de configurações do formulário.
|
270
|
+
*/
|
271
|
+
async showConfig() {
|
272
|
+
this._showFormConfig = true;
|
273
|
+
}
|
274
|
+
/**
|
275
|
+
* Fecha a janela de configurações do formulário.
|
276
|
+
*/
|
277
|
+
async hideConfig() {
|
278
|
+
this._showFormConfig = false;
|
279
|
+
}
|
280
|
+
/**
|
281
|
+
* Registra um editor customizado para campos da grade e formulário.
|
282
|
+
*/
|
283
|
+
async addCustomEditor(fieldName, customEditor) {
|
284
|
+
if (this._form) {
|
285
|
+
this._form.addCustomEditor(fieldName, customEditor);
|
286
|
+
return;
|
287
|
+
}
|
288
|
+
const newCustomEditors = new Map(this._customEditors);
|
289
|
+
newCustomEditors.set(fieldName, customEditor);
|
290
|
+
this._customEditors = newCustomEditors;
|
291
|
+
}
|
292
|
+
/**
|
293
|
+
* Altera/adiciona uma propriedade nos metadados do campo.
|
294
|
+
*/
|
295
|
+
async setFieldProp(fieldName, propName, value) {
|
296
|
+
await this._form.setFieldProp(fieldName, propName, value);
|
297
|
+
}
|
298
|
+
closeConfig() {
|
299
|
+
this.hideConfig();
|
300
|
+
}
|
301
|
+
dataunitReady() {
|
302
|
+
const dataInfo = { dataUnit: this._dataUnit };
|
303
|
+
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
304
|
+
}
|
305
|
+
setCustomEditors() {
|
306
|
+
if (!this._form) {
|
307
|
+
return;
|
308
|
+
}
|
309
|
+
for (const [fieldName, customEditor] of this._customEditors) {
|
310
|
+
this._form.addCustomEditor(fieldName, customEditor);
|
311
|
+
this._customEditors.delete(fieldName);
|
312
|
+
}
|
313
|
+
}
|
314
|
+
async componentDidRender() {
|
315
|
+
this.setCustomEditors();
|
316
|
+
}
|
317
|
+
async componentWillLoad() {
|
318
|
+
let parent = this._element.parentElement;
|
319
|
+
while (parent) {
|
320
|
+
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
321
|
+
this._snkDataUnit = parent;
|
322
|
+
this._dataUnit = this._snkDataUnit.dataUnit;
|
323
|
+
this._dataState = this._snkDataUnit.dataState;
|
324
|
+
if (this._dataUnit) {
|
325
|
+
this.dataunitReady();
|
326
|
+
}
|
327
|
+
else {
|
328
|
+
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
329
|
+
this._dataUnit = evt.detail;
|
330
|
+
});
|
331
|
+
}
|
332
|
+
this._snkDataUnit.addEventListener("dataStateChange", this.handleDataStateChange.bind(this));
|
333
|
+
break;
|
334
|
+
}
|
335
|
+
parent = parent.parentElement;
|
336
|
+
}
|
337
|
+
if (this.resourceID == undefined) {
|
338
|
+
this.resourceID = await ResourceIDUtils.ResourceIDUtils.getResourceID();
|
339
|
+
}
|
340
|
+
this._configManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resourceID, undefined, this._dataUnit);
|
341
|
+
this.addFormLegacyConfig();
|
342
|
+
await this._configManager.loadConfig();
|
343
|
+
}
|
344
|
+
async handleDataStateChange(evt) {
|
345
|
+
var _a;
|
346
|
+
this._dataState = evt.detail;
|
347
|
+
const fieldsWithRmPrecision = await this._snkDataUnit.getFieldsWithRmPrecision();
|
348
|
+
for (const field of fieldsWithRmPrecision || []) {
|
349
|
+
if (!field) {
|
350
|
+
continue;
|
351
|
+
}
|
352
|
+
const rmPrecision = (_a = this._dataState.rowMetadata) === null || _a === void 0 ? void 0 : _a.getProp('rm_precision', field);
|
353
|
+
if (!rmPrecision && rmPrecision !== 0) {
|
354
|
+
continue;
|
355
|
+
}
|
356
|
+
await this.setFieldProp(field, 'precision', rmPrecision);
|
357
|
+
await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
|
358
|
+
}
|
359
|
+
}
|
360
|
+
addFormLegacyConfig() {
|
361
|
+
if (this.formLegacyConfigName) {
|
362
|
+
this._configManager.addFormLegacyConfig(this.formLegacyConfigName);
|
363
|
+
}
|
364
|
+
}
|
365
|
+
render() {
|
366
|
+
if (!this._dataUnit || !this._dataState) {
|
367
|
+
return undefined;
|
368
|
+
}
|
369
|
+
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", { ref: (ref) => this._form = ref, key: "ezForm" + this._snkDataUnit.entityName, "data-element-id": "embedded", dataUnit: this._dataUnit, config: this._configManager.getConfig(this._dataUnit), recordsValidator: this.recordsValidator, class: this._showFormConfig ? 'snk-form__form--hidden' : '' }), this._showFormConfig &&
|
370
|
+
index.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this._dataUnit, configManager: this._configManager, onConfigClose: () => this.closeConfig() })))));
|
371
|
+
}
|
372
|
+
get _element() { return index.getElement(this); }
|
373
|
+
};
|
374
|
+
SnkForm.style = snkFormCss;
|
375
|
+
|
376
|
+
const snkFormConfigCss = ".sc-snk-form-config-h{--snk-form-config--z-index:var(--more-visible, 2);--snk-form-config--background-color:var(--background--xlight, #fff);--snk-form-config__icon--color:var(--text--disable, #AFB6C0);--snk-form-config__label-counter--font-weight:var(--text-weight--extra-small, 200);--snk-form-config__add-group-container--border-radius:var(--border--radius-medium, 12px);--snk-form-config__add-group-container--background-color:var(--background--medium, #d2dce9);--snk-form-config__add-group-container--padding:var(--space--small, 6px);--snk-form-config__add-group-content--border:2px dashed var(--color-strokes, #DCE0E8);--snk-form-config__add-group-content--border-radius:var(--border--radius-small, 6px);--snk-form-config__add-group-label--padding:var(--space--large, 24px);--snk-form-config__btn-add-group--padding:var(--space--large, 24px) var(--space--medium, 12px) 0;--snk-form-config__btn-add-group-container--padding:var(--space--medium, 12px);--snk-form-config__btn-add-group-container--border-radius:var(--border--radius-medium, 12px);--snk-form-config__btn-add-group-container--border:2px solid var(--color-strokes, #DCE0E8);--snk-form-config__btn-add-group-container--background-color:var(--background--body, #fafcff);display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--snk-form-config--z-index);background-color:var(--snk-form-config--background-color)}div.sc-snk-form-config:focus-visible,div.sc-snk-form-config:focus{outline:none}.form-config__header-container.sc-snk-form-config{display:flex}.form-config__field-container.sc-snk-form-config{width:32%;padding:6px}.form-config__hide-content.sc-snk-form-config{display:none}ez-icon.sc-snk-form-config .left-icon.sc-snk-form-config{--ez-icon--color:var(--snk-form-config__icon--color)}.ez-box__label-counter.sc-snk-form-config{margin-top:-7px;font-weight:var(--snk-form-config__label-counter--font-weight)}.form-config__btn-options.sc-snk-form-config{--ez-button--min-width:300px;--ez-button--background-color:var(--snk-form-config--background-color)}[data-draggable-parent].sc-snk-form-config{position:relative}.form-config__field-config--selected.sc-snk-form-config{position:static}.form-config__field-config--dragged.sc-snk-form-config .draggable-mirror.sc-snk-form-config{z-index:var(--snk-form-config--z-index)}.form-config__config-options.sc-snk-form-config{position:relative;margin-top:-3px;min-width:100%;z-index:1}.form-config__tab-container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config{position:relative;height:100%;max-height:calc(100vh - 92px)}.form-config__tab-container.sc-snk-form-config .ez-box__container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config .ez-box__container.sc-snk-form-config{align-content:flex-start;height:100%}.form-config__fields-available.sc-snk-form-config [data-draggable-parent].sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:100%;max-height:calc(100% - 122px)}.form-config__tab-content.sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:auto;max-height:calc(100% - 128px)}[data-draggable-element].sc-snk-form-config{cursor:grab}.form-config__actions-button.sc-snk-form-config{--ez-actions-button__btn-action--min-width:235px}.form-config__add-group.sc-snk-form-config{position:relative;min-height:120px;margin-bottom:10px}.form-config__add-group-container.sc-snk-form-config{position:absolute;display:flex;flex-wrap:wrap;width:100%;box-sizing:border-box;border-radius:var(--snk-form-config__add-group-container--border-radius);background-color:var(--snk-form-config__add-group-container--background-color);padding:var(--snk-form-config__add-group-container--padding)}.form-config__add-group-content.sc-snk-form-config{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;box-sizing:border-box;border:var(--snk-form-config__add-group-content--border);border-radius:var(--snk-form-config__add-group-content--border-radius)}.form-config__add-group-label.sc-snk-form-config{display:flex;justify-content:center;box-sizing:border-box;padding:var(--snk-form-config__add-group-label--padding)}.form-config__btn-add-group.sc-snk-form-config{position:relative;padding:var(--snk-form-config__btn-add-group--padding)}.form-config__btn-add-group-container.sc-snk-form-config{padding:var(--snk-form-config__btn-add-group-container--padding);border-radius:var(--snk-form-config__btn-add-group-container--border-radius);border:var(--snk-form-config__btn-add-group-container--border);background-color:var(--snk-form-config__btn-add-group-container--background-color)}ez-collapsible-box.draggable-mirror.sc-snk-form-config{display:table;background-color:var(--snk-form-config--background-color)}ez-collapsible-box.sc-snk-form-config{margin-bottom:10px}@media screen and (min-width: 480px){.form-config__field-config--selected.sc-snk-form-config .ez-flex.form-config__config-options.sc-snk-form-config{min-width:calc(300% + 12px)}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+2) .ez-flex.form-config__config-options.sc-snk-form-config{left:calc(100% / 1 * -1)}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+3) .ez-flex.form-config__config-options.sc-snk-form-config{left:calc(100% / 1 * -2)}}";
|
17
377
|
|
18
378
|
const CONTAINER_ID = {
|
19
379
|
collapsibleBox: "EZ-COLLAPSIBLE-BOX",
|
@@ -51,6 +411,7 @@ const SnkFormConfig = class {
|
|
51
411
|
this.dataUnit = undefined;
|
52
412
|
this.configManager = undefined;
|
53
413
|
this.messagesBuilder = undefined;
|
414
|
+
this.ignoreReadOnlyFormFields = undefined;
|
54
415
|
}
|
55
416
|
observeConfigManager() {
|
56
417
|
this.loadConfig(this._sortableTimer);
|
@@ -80,7 +441,7 @@ const SnkFormConfig = class {
|
|
80
441
|
}
|
81
442
|
}
|
82
443
|
getConfig() {
|
83
|
-
let config = this.configManager.getConfig(
|
444
|
+
let config = this.configManager.getConfig(this.dataUnit, this.ignoreReadOnlyFormFields);
|
84
445
|
if (config.fields && config.fields.length === 0) {
|
85
446
|
config = undefined;
|
86
447
|
}
|
@@ -205,7 +566,12 @@ const SnkFormConfig = class {
|
|
205
566
|
this._optionFormConfigChanged = false;
|
206
567
|
this.configManager.saveConfig(this.buildConfigToSave())
|
207
568
|
.then(savedConfig => {
|
569
|
+
var _a;
|
208
570
|
utils.ApplicationUtils.info(this.getMessage("snkFormConfig.info.successfullyConfigSaved"), { iconName: "check" });
|
571
|
+
const userOption = (_a = this._formConfigOptions) === null || _a === void 0 ? void 0 : _a.find((config) => {
|
572
|
+
return config.origin === formConfigFetcher.UserConfigType.USER;
|
573
|
+
});
|
574
|
+
this.setFormConfig(userOption);
|
209
575
|
this.configChange.emit(savedConfig);
|
210
576
|
});
|
211
577
|
}
|
@@ -539,9 +905,12 @@ const SnkFormConfig = class {
|
|
539
905
|
switch (this._optionFormConfigSelected.origin) {
|
540
906
|
case formConfigFetcher.UserConfigType.DEFAULT:
|
541
907
|
config = await this.configManager.fetchDefaultConfig();
|
908
|
+
if (!config) {
|
909
|
+
config = this.configManager.getEmptyConfig();
|
910
|
+
}
|
542
911
|
break;
|
543
|
-
|
544
|
-
config =
|
912
|
+
default:
|
913
|
+
config = this.getConfig();
|
545
914
|
break;
|
546
915
|
}
|
547
916
|
if (config != undefined) {
|
@@ -744,6 +1113,9 @@ const SnkFormConfig = class {
|
|
744
1113
|
if (layoutFormConfig == undefined) {
|
745
1114
|
layoutFormConfig = [];
|
746
1115
|
}
|
1116
|
+
if (this._formConfig.defaultConfiguration) {
|
1117
|
+
return layoutFormConfig;
|
1118
|
+
}
|
747
1119
|
return this._formConfig.tabs.map((tab) => {
|
748
1120
|
return layoutFormConfig.find(config => { var _a, _b; return ((_a = tab.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = config.tab) === null || _b === void 0 ? void 0 : _b.toLowerCase()); })
|
749
1121
|
|| { tab: tab.label, groups: [], visible: tab.visible };
|
@@ -999,4 +1371,6 @@ const SnkFormConfig = class {
|
|
999
1371
|
};
|
1000
1372
|
SnkFormConfig.style = snkFormConfigCss;
|
1001
1373
|
|
1374
|
+
exports.snk_config_options = SnkConfigOptions;
|
1375
|
+
exports.snk_form = SnkForm;
|
1002
1376
|
exports.snk_form_config = SnkFormConfig;
|
@@ -5,17 +5,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
8
|
-
require('./DataFetcher-
|
9
|
-
require('./pesquisa-fetcher-
|
8
|
+
require('./DataFetcher-cadeef8e.js');
|
9
|
+
require('./pesquisa-fetcher-490a86c3.js');
|
10
10
|
const index$1 = require('./index-1dfc7a6e.js');
|
11
11
|
require('./ISave-e91b70a7.js');
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
14
|
-
require('./dataunit-fetcher-
|
14
|
+
require('./dataunit-fetcher-a36ae041.js');
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
16
|
-
require('./form-config-fetcher-
|
16
|
+
require('./form-config-fetcher-ed497282.js');
|
17
17
|
const constants = require('./constants-35ddd366.js');
|
18
|
-
const authFetcher = require('./auth-fetcher-
|
18
|
+
const authFetcher = require('./auth-fetcher-d68841bc.js');
|
19
19
|
require('./index-102ba62d.js');
|
20
20
|
require('./PrintUtils-bcaeb82f.js');
|
21
21
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
@@ -31,6 +31,7 @@ const SnkCrud = class {
|
|
31
31
|
this.configuratorSave = index.createEvent(this, "configuratorSave", 7);
|
32
32
|
this.configuratorCancel = index.createEvent(this, "configuratorCancel", 7);
|
33
33
|
this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
|
34
|
+
this.viewModeChanged = index.createEvent(this, "viewModeChanged", 7);
|
34
35
|
this._keyDownHandler = async (event) => this.keyDownListener(event);
|
35
36
|
this._viewHistory = [];
|
36
37
|
this._customEditors = new Map();
|
@@ -59,6 +60,10 @@ const SnkCrud = class {
|
|
59
60
|
this.disablePersonalizedFilter = undefined;
|
60
61
|
this.autoLoad = undefined;
|
61
62
|
this.autoFocus = true;
|
63
|
+
this.enableGridInsert = false;
|
64
|
+
this.domainMessagesBuilder = undefined;
|
65
|
+
this.ignoreReadOnlyFormFields = undefined;
|
66
|
+
this.setCustomFormTitle = undefined;
|
62
67
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
|
63
68
|
}
|
64
69
|
/**
|
@@ -167,6 +172,7 @@ const SnkCrud = class {
|
|
167
172
|
else if (viewMode === constants.VIEW_MODE.FORM) {
|
168
173
|
this._guidesViewer.setFocus();
|
169
174
|
}
|
175
|
+
this.viewModeChanged.emit(viewMode);
|
170
176
|
}
|
171
177
|
openConfig(viewMode) {
|
172
178
|
this._snkConfigurator.close();
|
@@ -182,6 +188,8 @@ const SnkCrud = class {
|
|
182
188
|
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
183
189
|
}
|
184
190
|
insertionModeHandler() {
|
191
|
+
if (this.enableGridInsert)
|
192
|
+
return;
|
185
193
|
this.gridToForm();
|
186
194
|
}
|
187
195
|
cancelHandler() {
|
@@ -230,6 +238,7 @@ const SnkCrud = class {
|
|
230
238
|
this._snkDataUnit = parent;
|
231
239
|
this._snkDataUnit.addEventListener("insertionMode", () => this.insertionModeHandler());
|
232
240
|
this._snkDataUnit.addEventListener("cancelEdition", () => this.cancelHandler());
|
241
|
+
this._snkDataUnit.domainMessagesBuilder = this.domainMessagesBuilder;
|
233
242
|
this._dataUnit = this._snkDataUnit.dataUnit;
|
234
243
|
this._dataState = this._snkDataUnit.dataState;
|
235
244
|
if (!this._dataUnit) {
|
@@ -394,8 +403,8 @@ const SnkCrud = class {
|
|
394
403
|
if (this._resourceID == undefined) {
|
395
404
|
return;
|
396
405
|
}
|
397
|
-
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === constants.VIEW_MODE.GRID;
|
398
|
-
return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.h("snk-grid", { ref: (ref) => this._snkGrid = ref, filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkFormTaskBar" }))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
406
|
+
this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === constants.VIEW_MODE.GRID && !this.enableGridInsert);
|
407
|
+
return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.h("snk-grid", { ref: (ref) => this._snkGrid = ref, filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkFormTaskBar" }))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
399
408
|
}
|
400
409
|
get _element() { return index.getElement(this); }
|
401
410
|
static get watchers() { return {
|
@@ -7,19 +7,19 @@ const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
8
8
|
const index = require('./index-1dfc7a6e.js');
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
10
|
-
const DataFetcher = require('./DataFetcher-
|
11
|
-
const snkDataUnit = require('./snk-data-unit-
|
12
|
-
require('./pesquisa-fetcher-
|
10
|
+
const DataFetcher = require('./DataFetcher-cadeef8e.js');
|
11
|
+
const snkDataUnit = require('./snk-data-unit-b460f1da.js');
|
12
|
+
require('./pesquisa-fetcher-490a86c3.js');
|
13
13
|
require('./ISave-e91b70a7.js');
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
16
|
-
require('./dataunit-fetcher-
|
16
|
+
require('./dataunit-fetcher-a36ae041.js');
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
18
|
-
require('./form-config-fetcher-
|
18
|
+
require('./form-config-fetcher-ed497282.js');
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
20
|
-
require('./SnkMessageBuilder-
|
21
|
-
require('./RecordIDUtils-3735135c.js');
|
20
|
+
require('./SnkMessageBuilder-bae64d0d.js');
|
22
21
|
require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
22
|
+
require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
24
24
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
25
25
|
require('./ResourceIDUtils-5ff86aa7.js');
|
@@ -135,7 +135,7 @@ class ItemBuilder {
|
|
135
135
|
getExportToXLS(groupName) {
|
136
136
|
return {
|
137
137
|
id: index.DataExporterOption.EXPORT_TO_XLS,
|
138
|
-
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.
|
138
|
+
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`,
|
139
139
|
group: groupName
|
140
140
|
};
|
141
141
|
}
|
@@ -178,7 +178,7 @@ class ItemBuilder {
|
|
178
178
|
getExportPageToXLS() {
|
179
179
|
return {
|
180
180
|
id: index.DataExporterOption.EXPORT_PAGE_TO_XLS,
|
181
|
-
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.
|
181
|
+
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`
|
182
182
|
};
|
183
183
|
}
|
184
184
|
/**
|
@@ -295,11 +295,11 @@ class ServerSideExporterStrategy {
|
|
295
295
|
return visibleColumns;
|
296
296
|
}
|
297
297
|
async getParams(resolveProps) {
|
298
|
-
var _a, _b, _c, _d, _e, _f;
|
298
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
299
299
|
const filters = (_b = (_a = this._provider).getFilters) === null || _b === void 0 ? void 0 : _b.call(_a);
|
300
|
-
const columns =
|
301
|
-
const sort = (
|
302
|
-
const resourceURI = (
|
300
|
+
const columns = ((_c = getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) === null || _c === void 0 ? void 0 : _c.includes("PDF")) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
|
301
|
+
const sort = (_e = (_d = this._provider).getOrders) === null || _e === void 0 ? void 0 : _e.call(_d);
|
302
|
+
const resourceURI = (_g = (_f = this._provider).getResourceURI) === null || _g === void 0 ? void 0 : _g.call(_f);
|
303
303
|
const selectedIDs = this._provider.getSelectedIDs();
|
304
304
|
const option = resolveProps.exportOption;
|
305
305
|
const currentPageOptions = [
|
@@ -354,15 +354,16 @@ class ClientSideExporterStrategy {
|
|
354
354
|
return visibleColumns;
|
355
355
|
}
|
356
356
|
async executeExport(resolveProps) {
|
357
|
-
|
357
|
+
var _a;
|
358
|
+
const { methodName, gridTitle } = resolveProps;
|
358
359
|
const records = await this._provider.getRecords();
|
359
|
-
const columns =
|
360
|
+
const columns = ((_a = getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) === null || _a === void 0 ? void 0 : _a.includes("PDF")) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
|
360
361
|
const [serviceName, processor] = this.getExecutor(methodName);
|
361
362
|
const payload = {
|
362
363
|
serviceName,
|
363
364
|
requestBody: {
|
364
365
|
grid: {
|
365
|
-
|
366
|
+
gridTitle,
|
366
367
|
columns: this.buildColumnsObject(columns),
|
367
368
|
rows: this.buildRowsObject(columns, records),
|
368
369
|
customOptions: { xlsxExtension: false }
|
@@ -472,7 +473,7 @@ const SnkDataExporter = class {
|
|
472
473
|
resolver: ({ type, format, email: { to, subject, message } }) => {
|
473
474
|
var _a;
|
474
475
|
const methodName = (_a = index.DataExporterFormat[format === null || format === void 0 ? void 0 : format.toUpperCase()]) !== null && _a !== void 0 ? _a : index.DataExporterFormat.PDF;
|
475
|
-
this.resolveExporter({ type, methodName, to, subject, message, fileName: this._appLabel,
|
476
|
+
this.resolveExporter({ type, methodName, to, subject, message, fileName: this._appLabel, gridTitle: this._appLabel }, () => {
|
476
477
|
this._snkEmailSender.close();
|
477
478
|
utils.ApplicationUtils.info(this.getMessage("snkDataExporter.message.emailSuccess"), { iconName: "check" });
|
478
479
|
});
|
@@ -560,7 +561,7 @@ const SnkDataExporter = class {
|
|
560
561
|
const params = {
|
561
562
|
methodName: index.DataExporterOption[`EXPORT_TO_${fileType}`],
|
562
563
|
fileName: this._appLabel,
|
563
|
-
|
564
|
+
gridTitle: this._appLabel,
|
564
565
|
exportOption: option,
|
565
566
|
limit: (_c = (_b = this.provider) === null || _b === void 0 ? void 0 : _b.getExportLimit) === null || _c === void 0 ? void 0 : _c.call(_b),
|
566
567
|
type: this.getExportType(option),
|