@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
package/dist/esm/{IExporterProvider-63a188b6.js → SnkMultiSelectionListDataSource-a4805051.js}
RENAMED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { D as DataFetcher } from './DataFetcher-
|
|
2
|
-
import './pesquisa-fetcher-
|
|
3
|
-
import { SortMode, ApplicationContext, UserInterface, DateUtils
|
|
4
|
-
import './index-
|
|
1
|
+
import { D as DataFetcher } from './DataFetcher-773a3e4b.js';
|
|
2
|
+
import { a as PreloadManager } from './pesquisa-fetcher-34a8b8be.js';
|
|
3
|
+
import { SortMode, ApplicationContext, UserInterface, DateUtils } from '@sankhyalabs/core';
|
|
4
|
+
import './index-0ece87a6.js';
|
|
5
5
|
import './ISave-d8c8bc59.js';
|
|
6
6
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
7
|
-
import
|
|
8
|
-
import { P as PreloadManager } from './dataunit-fetcher-264191b2.js';
|
|
7
|
+
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
9
8
|
import './filter-item-type.enum-d45e026f.js';
|
|
10
|
-
import './form-config-fetcher-
|
|
9
|
+
import './form-config-fetcher-e0382e5a.js';
|
|
11
10
|
import InMemoryFilterColumnDataSource from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
|
|
12
11
|
|
|
13
12
|
class CrudUtils {
|
|
@@ -131,91 +130,4 @@ class SnkMultiSelectionListDataSource {
|
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
|
|
134
|
-
|
|
135
|
-
setGrid(grid) {
|
|
136
|
-
if (this._grid) {
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
this._grid = grid;
|
|
140
|
-
this.refreshSelectedRows();
|
|
141
|
-
}
|
|
142
|
-
setDataState(dataState) {
|
|
143
|
-
if (ObjectUtils.objectToString(dataState) === ObjectUtils.objectToString(this._dataState)) {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
this._dataState = dataState;
|
|
147
|
-
this.refreshSelectedRows();
|
|
148
|
-
}
|
|
149
|
-
format(currentValue, column, recordId) {
|
|
150
|
-
var _a;
|
|
151
|
-
if (!currentValue) {
|
|
152
|
-
return currentValue;
|
|
153
|
-
}
|
|
154
|
-
const rowMetadata = (_a = this._dataState) === null || _a === void 0 ? void 0 : _a.metadataByRow.get(recordId);
|
|
155
|
-
const rmPrecision = rowMetadata === null || rowMetadata === void 0 ? void 0 : rowMetadata.getProp('rm_precision', column.name);
|
|
156
|
-
if (rmPrecision || rmPrecision === 0) {
|
|
157
|
-
return NumberUtils.format(currentValue, rmPrecision, rmPrecision);
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
return currentValue;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
refreshSelectedRows() {
|
|
164
|
-
var _a;
|
|
165
|
-
(_a = this._grid) === null || _a === void 0 ? void 0 : _a.refreshSelectedRows();
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
class CommonsExporter {
|
|
170
|
-
constructor(dataUnit, grid) {
|
|
171
|
-
this.dataUnit = dataUnit;
|
|
172
|
-
this.grid = grid;
|
|
173
|
-
}
|
|
174
|
-
async getColumnsMetadata() {
|
|
175
|
-
var _a;
|
|
176
|
-
this.columnsState = await ((_a = this.grid) === null || _a === void 0 ? void 0 : _a.getColumnsState()) || [];
|
|
177
|
-
return await this.buildColumnsMetadata(this.columnsState);
|
|
178
|
-
}
|
|
179
|
-
getColumnsState() {
|
|
180
|
-
return this.columnsState;
|
|
181
|
-
}
|
|
182
|
-
async buildColumnsMetadata(gridColumns) {
|
|
183
|
-
var _a, _b;
|
|
184
|
-
const columnsMetadata = [];
|
|
185
|
-
for (const column of gridColumns) {
|
|
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
|
-
continue;
|
|
191
|
-
}
|
|
192
|
-
const fieldData = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(column.name);
|
|
193
|
-
const customFormatter = await this.grid.getCustomValueFormatter(column.name);
|
|
194
|
-
const columnData = {
|
|
195
|
-
label: column.label,
|
|
196
|
-
id: column.name,
|
|
197
|
-
width: column.width,
|
|
198
|
-
type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
|
|
199
|
-
userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface,
|
|
200
|
-
customFormatter
|
|
201
|
-
};
|
|
202
|
-
columnsMetadata.push(columnData);
|
|
203
|
-
if (((_b = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONFIELD) != undefined) {
|
|
204
|
-
const mergedFrom = fieldData.properties.mergedFrom;
|
|
205
|
-
const descriptionField = `${fieldData.properties.ENTITYNAME}.${fieldData.properties.DESCRIPTIONFIELD}`;
|
|
206
|
-
const descriptionColumn = {
|
|
207
|
-
label: fieldData.properties.DESCRIPTIONENTITY,
|
|
208
|
-
id: `${mergedFrom ? (mergedFrom + ".") : ""}${descriptionField}`,
|
|
209
|
-
width: column.width,
|
|
210
|
-
type: DataType.TEXT,
|
|
211
|
-
userInterface: UserInterface$1.LONGTEXT,
|
|
212
|
-
descriptionFrom: fieldData.name
|
|
213
|
-
};
|
|
214
|
-
columnsMetadata.push(descriptionColumn);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
return columnsMetadata || [];
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export { CommonsExporter as C, RmPrecisionCustomValueFormatter as R, SnkMultiSelectionListDataSource as S, CrudUtils as a };
|
|
133
|
+
export { CrudUtils as C, SnkMultiSelectionListDataSource as S };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ObjectUtils } from '@sankhyalabs/core';
|
|
2
|
-
import { R as ResourceFetcher } from './form-config-fetcher-
|
|
2
|
+
import { R as ResourceFetcher } from './form-config-fetcher-e0382e5a.js';
|
|
3
3
|
|
|
4
4
|
class AuthFetcher extends ResourceFetcher {
|
|
5
5
|
getData(resourceID) {
|
|
@@ -9,11 +9,8 @@ var DataExporterOption;
|
|
|
9
9
|
DataExporterOption["EXPORT_TO_PDF"] = "exportToPDF";
|
|
10
10
|
DataExporterOption["EXPORT_TO_XLS"] = "exportToXLS";
|
|
11
11
|
DataExporterOption["EXPORT_CURRENT_PAGE"] = "exportCurrentPage";
|
|
12
|
-
DataExporterOption["EXPORT_ALL_RECORDS"] = "exportAllRecords";
|
|
13
12
|
DataExporterOption["EXPORT_PAGE_TO_PDF"] = "exportPageToPDF";
|
|
14
13
|
DataExporterOption["EXPORT_PAGE_TO_XLS"] = "exportPageToXLS";
|
|
15
|
-
DataExporterOption["EXPORT_ALL_RECORDS_TO_PDF"] = "exportAllRecordsToPDF";
|
|
16
|
-
DataExporterOption["EXPORT_ALL_RECORDS_TO_XLS"] = "exportAllRecordsToXLS";
|
|
17
14
|
DataExporterOption["EXPORT_BY_EMAIL"] = "exportToEmail";
|
|
18
15
|
DataExporterOption["EXPORT_PDF_TO_EMAIL"] = "exportPDFToEmail";
|
|
19
16
|
DataExporterOption["EXPORT_XLS_TO_EMAIL"] = "exportXLSToEmail";
|
|
@@ -30,10 +27,8 @@ var DataExporterType;
|
|
|
30
27
|
DataExporterType["EXPORT_TO_XLS"] = "XLS";
|
|
31
28
|
DataExporterType["EXPORT_PAGE_TO_PDF"] = "PDF";
|
|
32
29
|
DataExporterType["EXPORT_PAGE_TO_XLS"] = "XLS";
|
|
33
|
-
DataExporterType["EXPORT_ALL_RECORDS_TO_PDF"] = "PDF";
|
|
34
|
-
DataExporterType["EXPORT_ALL_RECORDS_TO_XLS"] = "XLS";
|
|
35
30
|
DataExporterType["EXPORT_PDF_TO_EMAIL"] = "PDF";
|
|
36
31
|
DataExporterType["EXPORT_XLS_TO_EMAIL"] = "XLS";
|
|
37
32
|
})(DataExporterType || (DataExporterType = {}));
|
|
38
33
|
|
|
39
|
-
export { DataExporterOption as D, PresentationMode as P,
|
|
34
|
+
export { DataExporterOption as D, PresentationMode as P, DataExporterFormat as a, DataExporterType as b };
|
package/dist/esm/loader.js
CHANGED
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy(JSON.parse("[[\"teste-pesquisa\",[[1,\"teste-pesquisa\"]]],[\"snk-filter-modal\",[[0,\"snk-filter-modal\",{\"getMessage\":[16],\"configName\":[1025,\"config-name\"],\"filters\":[1040],\"applyFilters\":[16],\"closeModal\":[16],\"addPersonalizedFilter\":[16],\"editPersonalizedFilter\":[16],\"deletePersonalizedFilter\":[16],\"filtersToDelete\":[16],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"]},[[0,\"deleteFilter\",\"deletePersonalizedFilterListener\"]]]]],[\"snk-actions-form\",[[2,\"snk-actions-form\",{\"action\":[16],\"applyParameters\":[16],\"dataUnit\":[32],\"openPopup\":[64]}]]],[\"snk-client-confirm\",[[2,\"snk-client-confirm\",{\"titleMessage\":[1,\"title-message\"],\"message\":[1],\"accept\":[16],\"cancel\":[16],\"openPopup\":[64]}]]],[\"snk-custom-slot-elements\",[[6,\"snk-custom-slot-elements\",{\"slotName\":[1,\"slot-name\"]}]]],[\"snk-entity-list\",[[2,\"snk-entity-list\",{\"config\":[1040],\"rightListSlotBuilder\":[1040],\"maxHeightList\":[1,\"max-height-list\"],\"_searchValue\":[32],\"_ezListSource\":[32],\"reloadList\":[64]}]]],[\"snk-filter-binary-select\",[[0,\"snk-filter-binary-select\",{\"value\":[1544],\"config\":[16],\"presentationMode\":[2,\"presentation-mode\"],\"resetValues\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-checkbox-list\",[[0,\"snk-filter-checkbox-list\",{\"config\":[1040],\"optionsList\":[32]}]]],[\"snk-filter-list\",[[4,\"snk-filter-list\",{\"label\":[1],\"iconName\":[1,\"icon-name\"],\"items\":[16],\"getMessage\":[16],\"emptyText\":[1,\"empty-text\"],\"findFilterText\":[1,\"find-filter-text\"],\"buttonClass\":[1,\"button-class\"],\"_filterArgument\":[32],\"_showAll\":[32],\"hideDetail\":[64]},[[2,\"keydown\",\"keyDownHandler\"]]]]],[\"snk-filter-multi-select\",[[0,\"snk-filter-multi-select\",{\"value\":[1544],\"config\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-number\",[[0,\"snk-filter-number\",{\"config\":[16],\"getMessage\":[16],\"value\":[2],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-period\",[[0,\"snk-filter-period\",{\"config\":[16],\"getMessage\":[16],\"value\":[8],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-search\",[[0,\"snk-filter-search\",{\"config\":[16],\"value\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-text\",[[0,\"snk-filter-text\",{\"config\":[16],\"value\":[1]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-personalized-filter-editor\",[[2,\"snk-personalized-filter-editor\",{\"messagesBuilder\":[1040],\"presentationMode\":[2,\"presentation-mode\"],\"config\":[16],\"value\":[1040],\"items\":[32],\"show\":[64]}]]],[\"snk-print-selector\",[[2,\"snk-print-selector\",{\"_printServerActive\":[32],\"_selectedPrinter\":[32],\"_remotePrintersDataSource\":[32],\"_localPrintersDataSource\":[32],\"_printJobData\":[32],\"openPrintSelector\":[64]}]]],[\"snk-filter-modal-item\",[[0,\"snk-filter-modal-item\",{\"filterItem\":[1040],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}]]],[\"snk-pesquisa\",[[2,\"snk-pesquisa\",{\"searchLoader\":[16],\"selectItem\":[16],\"argument\":[1025],\"_itemList\":[32],\"_startLoading\":[32]}]]],[\"snk-simple-crud\",[[6,\"snk-simple-crud\",{\"dataState\":[16],\"dataUnit\":[16],\"entityName\":[1,\"entity-name\"],\"mode\":[2],\"gridConfig\":[1040],\"formConfig\":[1040],\"multipleSelection\":[4,\"multiple-selection\"],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"pageSize\":[2,\"page-size\"],\"resourceID\":[1,\"resource-i-d\"],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"actionsList\":[16],\"configName\":[1025,\"config-name\"],\"showConfiguratorButtons\":[4,\"show-configurator-buttons\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"ignoreReadOnlyFormFields\":[4,\"ignore-read-only-form-fields\"],\"autoFocus\":[4,\"auto-focus\"],\"autoLoad\":[4,\"auto-load\"],\"_showPopUpGridConfig\":[32],\"_showFormConfig\":[32],\"_currentViewMode\":[32],\"_config\":[32],\"_fieldToGetFocus\":[32],\"_customContainerId\":[32],\"_formFields\":[32],\"_fieldsProps\":[32],\"addCustomEditor\":[64],\"addGridCustomRender\":[64],\"addCustomValueFormatter\":[64],\"removeCustomValueFormatter\":[64],\"setFieldProp\":[64],\"goToView\":[64],\"setMetadata\":[64],\"setRecords\":[64],\"getRecords\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"updateConfig\":[64]},[[0,\"actionClick\",\"actionClickListener\"]]]]],[\"snk-attach\",[[2,\"snk-attach\",{\"fetcherType\":[1,\"fetcher-type\"],\"fetcher\":[16],\"dataUnit\":[16],\"dataUnitBuilder\":[16],\"registerKey\":[1,\"register-key\"],\"entityName\":[1,\"entity-name\"],\"messagesBuilder\":[1040],\"_currentFetcher\":[32],\"_currentDataUnit\":[32],\"crudConfig\":[32]}]]],[\"snk-form-summary\",[[2,\"snk-form-summary\",{\"fixed\":[1540],\"contracted\":[1540],\"summary\":[16]}]]],[\"snk-form-view\",[[6,\"snk-form-view\",{\"levelPath\":[1,\"level-path\"],\"label\":[1],\"name\":[1],\"fields\":[16],\"formMetadata\":[8,\"form-metadata\"],\"dataUnit\":[16],\"contracted\":[4],\"fixed\":[1540],\"summaryFields\":[16],\"canExpand\":[4,\"can-expand\"],\"canFix\":[4,\"can-fix\"],\"recordsValidator\":[16],\"fieldToFocus\":[1,\"field-to-focus\"],\"customEditors\":[16],\"fieldsProps\":[16],\"showUp\":[64],\"addCustomEditor\":[64],\"setFieldProp\":[64]}]]],[\"snk-filter-field-search_2\",[[2,\"snk-filter-field-search\",{\"searchable\":[4],\"fieldsDataSource\":[16],\"breadcrumbItems\":[32],\"linkItems\":[32],\"fieldItems\":[32],\"searchEmpty\":[32],\"groupEmpty\":[32],\"show\":[64],\"applyFilter\":[64]}],[0,\"snk-filter-param-config\",{\"messagesBuilder\":[1040],\"_opened\":[32],\"_configType\":[32],\"_expressionItem\":[32],\"_informedInstance\":[32],\"_canSave\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-expression-group_2\",[[2,\"snk-expression-group\",{\"parentTop\":[1026,\"parent-top\"],\"group\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityURI\":[1025,\"entity-u-r-i\"],\"_conditionOperator\":[32],\"_group\":[32],\"_selfTop\":[32],\"canAddExpression\":[32],\"_showDashes\":[32],\"getExpressionGroup\":[64]},[[8,\"ezExpressionLayoutChanged\",\"todoCompletedHandler\"]]],[2,\"snk-expression-item\",{\"expression\":[16],\"canRemove\":[516,\"can-remove\"],\"messagesBuilder\":[1040],\"entityURI\":[1025,\"entity-u-r-i\"],\"_showValueVariable\":[32],\"_fieldSelected\":[32],\"_optionNotNull\":[32]}]]],[\"snk-personalized-filter\",[[2,\"snk-personalized-filter\",{\"messagesBuilder\":[1040],\"entityUri\":[1025,\"entity-uri\"],\"filterId\":[1025,\"filter-id\"],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_filterAssistentMode\":[32],\"_filterAssistent\":[32],\"createPersonalizedFilter\":[64]}]]],[\"snk-filter-item\",[[0,\"snk-filter-item\",{\"config\":[1040],\"getMessage\":[16],\"showChips\":[4,\"show-chips\"],\"detailIsVisible\":[32],\"showUp\":[64],\"hideDetail\":[64]},[[2,\"click\",\"clickListener\"],[2,\"mousedown\",\"mouseDownListener\"],[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-filter-bar\",[[2,\"snk-filter-bar\",{\"dataUnit\":[1040],\"title\":[1],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"mode\":[1],\"filterConfig\":[1040],\"messagesBuilder\":[1040],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"autoLoad\":[4,\"auto-load\"],\"allowDefault\":[32],\"scrollerLocked\":[32],\"showPersonalizedFilter\":[32],\"personalizedFilterId\":[32],\"reload\":[64],\"getFilterItem\":[64],\"updateFilterItem\":[64],\"addFilterItem\":[64],\"removeFilterItem\":[64],\"showFilterModal\":[64]},[[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-grid\",[[6,\"snk-grid\",{\"columnFilterDataSource\":[1040],\"configName\":[1,\"config-name\"],\"filterBarTitle\":[1,\"filter-bar-title\"],\"resourceID\":[1,\"resource-i-d\"],\"selectionToastConfig\":[16],\"actionsList\":[16],\"isDetail\":[4,\"is-detail\"],\"taskbarManager\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"recordsValidator\":[16],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"gridHeaderCustomSlotId\":[1,\"grid-header-custom-slot-id\"],\"topTaskbarCustomSlotId\":[1,\"top-taskbar-custom-slot-id\"],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"autoLoad\":[4,\"auto-load\"],\"autoFocus\":[4,\"auto-focus\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_gridConfig\":[32],\"_popUpGridConfig\":[32],\"_showSnkFilterBar\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"setConfig\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64],\"findColumn\":[64],\"addCustomEditor\":[64],\"addGridCustomRender\":[64],\"addCustomValueFormatter\":[64],\"removeCustomValueFormatter\":[64],\"setFocus\":[64]}]]],[\"snk-configurator\",[[2,\"snk-configurator\",{\"showActionButtons\":[4,\"show-action-buttons\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"viewMode\":[2,\"view-mode\"],\"customContainerId\":[1,\"custom-container-id\"],\"messagesBuilder\":[1040],\"_opened\":[32],\"_permissions\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-data-unit\",[[2,\"snk-data-unit\",{\"dataState\":[1040],\"messagesBuilder\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"entityName\":[1,\"entity-name\"],\"pageSize\":[2,\"page-size\"],\"dataUnit\":[1040],\"beforeSave\":[16],\"afterSave\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"ignoreSaveMessage\":[4,\"ignore-save-message\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"fieldsToLink\":[32],\"getDataUnit\":[64],\"getSelectedRecordsIDsInfo\":[64],\"getFieldsWithRmp\":[64],\"getFieldsWithRmPrecision\":[64],\"getRowMetadata\":[64]}]]],[\"snk-taskbar\",[[6,\"snk-taskbar\",{\"alignRigth\":[4,\"align-rigth\"],\"customSlotId\":[1,\"custom-slot-id\"],\"customContainerId\":[1,\"custom-container-id\"],\"overflowStrategy\":[1,\"overflow-strategy\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"buttons\":[1],\"customButtons\":[16],\"actionsList\":[16],\"primaryButton\":[1,\"primary-button\"],\"disabledButtons\":[16],\"dataUnit\":[16],\"presentationMode\":[1537,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_permissions\":[32],\"_overFlowedElements\":[32],\"_customElements\":[32],\"_customElementsId\":[32],\"_slotContainer\":[32],\"_hiddenActionsList\":[32],\"_lastWidth\":[32],\"_hasToUpdateOverFlow\":[32],\"_isWaitingForSave\":[32]},[[8,\"snkCustomSlotElementsLoaded\",\"handleCustomSlotElementsLoaded\"]]]]],[\"snk-filter-detail\",[[0,\"snk-filter-detail\",{\"config\":[1040],\"getMessage\":[16],\"showHardFixed\":[4,\"show-hard-fixed\"],\"show\":[64]}]]],[\"snk-config-options\",[[2,\"snk-config-options\",{\"fieldConfig\":[16],\"idConfig\":[513,\"id-config\"],\"dataUnit\":[16],\"messagesBuilder\":[1040],\"_defaultType\":[32]}]]],[\"snk-field-config\",[[2,\"snk-field-config\",{\"isConfigActive\":[16],\"fieldConfig\":[16],\"modeInsertion\":[516,\"mode-insertion\"],\"dataUnit\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-simple-bar\",[[6,\"snk-simple-bar\",{\"label\":[1],\"breadcrumbItens\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-tab-config\",[[6,\"snk-tab-config\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"tabItems\":[16],\"messagesBuilder\":[1040],\"_processedTabs\":[32],\"_activeEditText\":[32],\"_activeEditTextIndex\":[32],\"_actionsHide\":[32],\"_actionsShow\":[32]}]]],[\"snk-form-config\",[[2,\"snk-form-config\",{\"dataUnit\":[16],\"configManager\":[16],\"messagesBuilder\":[1040],\"_formConfigOptions\":[32],\"_fieldConfigSelected\":[32],\"_layoutFormConfig\":[32],\"_fieldsAvailable\":[32],\"_formConfig\":[32],\"_formConfigChanged\":[32],\"_optionFormConfigSelected\":[32],\"_optionFormConfigChanged\":[32],\"_tempGroups\":[32]}]]],[\"snk-exporter-email-sender\",[[0,\"snk-exporter-email-sender\",{\"getMessage\":[16],\"_config\":[32],\"_opened\":[32],\"_currentStep\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-crud\",[[6,\"snk-crud\",{\"configName\":[1025,\"config-name\"],\"filterBarTitle\":[1,\"filter-bar-title\"],\"selectionToastConfig\":[16],\"showActionButtons\":[4,\"show-action-buttons\"],\"actionsList\":[16],\"taskbarManager\":[16],\"recordsValidator\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"autoLoad\":[4,\"auto-load\"],\"autoFocus\":[4,\"auto-focus\"],\"_dataUnit\":[32],\"_dataState\":[32],\"attachmentRegisterKey\":[32],\"_currentViewMode\":[32],\"_canEdit\":[32],\"_resourceID\":[32],\"customContainerId\":[32],\"goToView\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64],\"addCustomEditor\":[64],\"addGridCustomRender\":[64],\"addCustomValueFormatter\":[64],\"removeCustomValueFormatter\":[64],\"setFieldProp\":[64]}]]],[\"snk-form\",[[2,\"snk-form\",{\"configName\":[1,\"config-name\"],\"recordsValidator\":[16],\"messagesBuilder\":[1040],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_showFormConfig\":[32],\"_configManager\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"addCustomEditor\":[64],\"setFieldProp\":[64]}]]],[\"snk-data-exporter\",[[2,\"snk-data-exporter\",{\"provider\":[16],\"messagesBuilder\":[1040],\"_items\":[32],\"_showDropdown\":[32]}]]],[\"snk-guides-viewer\",[[6,\"snk-guides-viewer\",{\"dataUnit\":[16],\"dataState\":[16],\"configName\":[1,\"config-name\"],\"entityPath\":[1,\"entity-path\"],\"actionsList\":[16],\"recordsValidator\":[16],\"masterFormConfig\":[1040],\"selectedGuide\":[16],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"canEdit\":[4,\"can-edit\"],\"presentationMode\":[1,\"presentation-mode\"],\"resourceID\":[1,\"resource-i-d\"],\"detailTaskbarCustomContainerId\":[1,\"detail-taskbar-custom-container-id\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"_hasToCreateFieldSearch\":[32],\"_breadcrumbItems\":[32],\"_guides\":[32],\"_formEditorConfigManager\":[32],\"_formEditorDataUnit\":[32],\"_fieldToGetFocus\":[32],\"_customEditors\":[32],\"_customRenders\":[32],\"_fieldsProps\":[32],\"showFormConfig\":[64],\"findField\":[64],\"addCustomEditor\":[64],\"addGridCustomRender\":[64],\"setFieldProp\":[64],\"setFocus\":[64]},[[2,\"actionClick\",\"onActionClick\"],[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-application\",[[2,\"snk-application\",{\"messagesBuilder\":[1040],\"configName\":[1,\"config-name\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"loadByPK\":[16],\"getKeyboardManager\":[64],\"isUserSup\":[64],\"addPendingAction\":[64],\"callServiceBroker\":[64],\"initOnboarding\":[64],\"hasAccess\":[64],\"getAllAccess\":[64],\"getStringParam\":[64],\"getIntParam\":[64],\"getFloatParam\":[64],\"getBooleanParam\":[64],\"getDateParam\":[64],\"showPopUp\":[64],\"showModal\":[64],\"showAlerts\":[64],\"closeModal\":[64],\"closePopUp\":[64],\"temOpcional\":[64],\"getConfig\":[64],\"saveConfig\":[64],\"getAttributeFromHTMLWrapper\":[64],\"openApp\":[64],\"webConnection\":[64],\"createDataunit\":[64],\"updateDataunitCache\":[64],\"getDataUnit\":[64],\"addClientEvent\":[64],\"removeClientEvent\":[64],\"hasClientEvent\":[64],\"getResourceID\":[64],\"getUserID\":[64],\"alert\":[64],\"error\":[64],\"success\":[64],\"message\":[64],\"confirm\":[64],\"info\":[64],\"loadTotals\":[64],\"isLoadedByPk\":[64],\"executeSearch\":[64],\"executePreparedSearch\":[64],\"isDebugMode\":[64],\"getAppLabel\":[64],\"addSearchListener\":[64],\"importScript\":[64],\"getApplicationPath\":[64],\"executeSelectDistinct\":[64],\"getDataFetcher\":[64],\"whenApplicationReady\":[64],\"setSearchFilterContext\":[64]}]]],[\"snk-filter-advanced-mode_2\",[[2,\"snk-filter-assistent-mode\",{\"filterAssistent\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityUri\":[1025,\"entity-uri\"],\"application\":[1040]}],[2,\"snk-filter-advanced-mode\",{\"filterAssistent\":[1040],\"application\":[1040]}]]],[\"snk-actions-button_4\",[[2,\"snk-grid-config\",{\"selectedIndex\":[1026,\"selected-index\"],\"columns\":[1040],\"config\":[1040],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}],[2,\"snk-actions-button\",{\"_items\":[32],\"_showDropdown\":[32],\"_actions\":[32],\"_isOrderActions\":[32]}],[1,\"snk-select-box\",{\"selectedOption\":[1,\"selected-option\"]}],[2,\"taskbar-actions-button\",{\"title\":[1],\"enabled\":[4],\"actions\":[16],\"_showDropdown\":[32],\"showActions\":[64],\"hideActions\":[64],\"isOpened\":[64]},[[8,\"keydown\",\"handleKeyDown\"],[8,\"ezOpenModal\",\"handleClose\"]]]]],[\"snk-detail-view\",[[6,\"snk-detail-view\",{\"formConfigManager\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"resourceID\":[1,\"resource-i-d\"],\"guideItemPath\":[16],\"entityName\":[1,\"entity-name\"],\"label\":[1],\"dataUnit\":[1040],\"selectedForm\":[1025,\"selected-form\"],\"dataState\":[1040],\"messagesBuilder\":[1040],\"branchGuide\":[1040],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"customEditors\":[16],\"customRenders\":[16],\"_disabledButtons\":[32],\"_currentView\":[32],\"attachmentRegisterKey\":[32],\"changeViewMode\":[64],\"configGrid\":[64],\"showUp\":[64],\"addCustomEditor\":[64],\"addGridCustomRender\":[64]},[[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]]]"), options);
|
|
14
|
+
return bootstrapLazy(JSON.parse("[[\"teste-pesquisa\",[[1,\"teste-pesquisa\"]]],[\"snk-filter-modal\",[[0,\"snk-filter-modal\",{\"getMessage\":[16],\"configName\":[1025,\"config-name\"],\"filters\":[1040],\"applyFilters\":[16],\"closeModal\":[16],\"addPersonalizedFilter\":[16],\"editPersonalizedFilter\":[16],\"deletePersonalizedFilter\":[16],\"filtersToDelete\":[16],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"]},[[0,\"deleteFilter\",\"deletePersonalizedFilterListener\"]]]]],[\"snk-actions-form\",[[2,\"snk-actions-form\",{\"action\":[16],\"applyParameters\":[16],\"dataUnit\":[32],\"openPopup\":[64]}]]],[\"snk-client-confirm\",[[2,\"snk-client-confirm\",{\"titleMessage\":[1,\"title-message\"],\"message\":[1],\"accept\":[16],\"cancel\":[16],\"openPopup\":[64]}]]],[\"snk-custom-slot-elements\",[[6,\"snk-custom-slot-elements\",{\"slotName\":[1,\"slot-name\"]}]]],[\"snk-entity-list\",[[2,\"snk-entity-list\",{\"config\":[1040],\"rightListSlotBuilder\":[1040],\"maxHeightList\":[1,\"max-height-list\"],\"_searchValue\":[32],\"_ezListSource\":[32],\"reloadList\":[64]}]]],[\"snk-filter-binary-select\",[[0,\"snk-filter-binary-select\",{\"value\":[1544],\"config\":[16],\"presentationMode\":[2,\"presentation-mode\"],\"resetValues\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-checkbox-list\",[[0,\"snk-filter-checkbox-list\",{\"config\":[1040],\"optionsList\":[32]}]]],[\"snk-filter-list\",[[4,\"snk-filter-list\",{\"label\":[1],\"iconName\":[1,\"icon-name\"],\"items\":[16],\"getMessage\":[16],\"emptyText\":[1,\"empty-text\"],\"findFilterText\":[1,\"find-filter-text\"],\"buttonClass\":[1,\"button-class\"],\"_filterArgument\":[32],\"_showAll\":[32],\"hideDetail\":[64]},[[2,\"keydown\",\"keyDownHandler\"]]]]],[\"snk-filter-multi-select\",[[0,\"snk-filter-multi-select\",{\"value\":[1544],\"config\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-number\",[[0,\"snk-filter-number\",{\"config\":[16],\"getMessage\":[16],\"value\":[2],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-period\",[[0,\"snk-filter-period\",{\"config\":[16],\"getMessage\":[16],\"value\":[8],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-search\",[[0,\"snk-filter-search\",{\"config\":[16],\"value\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-text\",[[0,\"snk-filter-text\",{\"config\":[16],\"value\":[1]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-personalized-filter-editor\",[[2,\"snk-personalized-filter-editor\",{\"messagesBuilder\":[1040],\"presentationMode\":[2,\"presentation-mode\"],\"config\":[16],\"value\":[1040],\"items\":[32],\"show\":[64]}]]],[\"snk-print-selector\",[[2,\"snk-print-selector\",{\"_printServerActive\":[32],\"_selectedPrinter\":[32],\"_remotePrintersDataSource\":[32],\"_localPrintersDataSource\":[32],\"_printJobData\":[32],\"openPrintSelector\":[64]}]]],[\"snk-filter-modal-item\",[[0,\"snk-filter-modal-item\",{\"filterItem\":[1040],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}]]],[\"snk-pesquisa\",[[2,\"snk-pesquisa\",{\"searchLoader\":[16],\"selectItem\":[16],\"argument\":[1025],\"_itemList\":[32],\"_startLoading\":[32]}]]],[\"snk-simple-crud\",[[6,\"snk-simple-crud\",{\"dataState\":[16],\"dataUnit\":[16],\"mode\":[2],\"gridConfig\":[1040],\"formConfig\":[1040],\"multipleSelection\":[4,\"multiple-selection\"],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"resourceID\":[1,\"resource-i-d\"],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"actionsList\":[16],\"configName\":[1025,\"config-name\"],\"showConfiguratorButtons\":[4,\"show-configurator-buttons\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"ignoreReadOnlyFormFields\":[4,\"ignore-read-only-form-fields\"],\"_showPopUpGridConfig\":[32],\"_showFormConfig\":[32],\"_currentViewMode\":[32],\"_config\":[32],\"_fieldToGetFocus\":[32],\"_customContainerId\":[32],\"_formFields\":[32],\"goToView\":[64],\"setMetadata\":[64],\"setRecords\":[64],\"getRecords\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"updateConfig\":[64]},[[0,\"actionClick\",\"actionClickListener\"]]]]],[\"snk-attach\",[[2,\"snk-attach\",{\"fetcherType\":[1,\"fetcher-type\"],\"fetcher\":[16],\"dataUnit\":[16],\"dataUnitBuilder\":[16],\"registerKey\":[1,\"register-key\"],\"entityName\":[1,\"entity-name\"],\"messagesBuilder\":[1040],\"_currentFetcher\":[32],\"_currentDataUnit\":[32],\"crudConfig\":[32]}]]],[\"snk-form-summary\",[[2,\"snk-form-summary\",{\"fixed\":[1540],\"contracted\":[1540],\"summary\":[16]}]]],[\"snk-form-view\",[[6,\"snk-form-view\",{\"levelPath\":[1,\"level-path\"],\"label\":[1],\"name\":[1],\"fields\":[16],\"formMetadata\":[8,\"form-metadata\"],\"dataUnit\":[16],\"contracted\":[4],\"fixed\":[1540],\"summaryFields\":[16],\"canExpand\":[4,\"can-expand\"],\"canFix\":[4,\"can-fix\"],\"recordsValidator\":[16],\"fieldToFocus\":[1,\"field-to-focus\"],\"showUp\":[64]}]]],[\"snk-filter-field-search_2\",[[2,\"snk-filter-field-search\",{\"searchable\":[4],\"fieldsDataSource\":[16],\"breadcrumbItems\":[32],\"linkItems\":[32],\"fieldItems\":[32],\"searchEmpty\":[32],\"groupEmpty\":[32],\"show\":[64],\"applyFilter\":[64]}],[0,\"snk-filter-param-config\",{\"messagesBuilder\":[1040],\"_opened\":[32],\"_configType\":[32],\"_expressionItem\":[32],\"_informedInstance\":[32],\"_canSave\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-expression-group_2\",[[2,\"snk-expression-group\",{\"parentTop\":[1026,\"parent-top\"],\"group\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityURI\":[1025,\"entity-u-r-i\"],\"_conditionOperator\":[32],\"_group\":[32],\"_selfTop\":[32],\"canAddExpression\":[32],\"_showDashes\":[32],\"getExpressionGroup\":[64]},[[8,\"ezExpressionLayoutChanged\",\"todoCompletedHandler\"]]],[2,\"snk-expression-item\",{\"expression\":[16],\"canRemove\":[516,\"can-remove\"],\"messagesBuilder\":[1040],\"entityURI\":[1025,\"entity-u-r-i\"],\"_showValueVariable\":[32],\"_fieldSelected\":[32],\"_optionNotNull\":[32]}]]],[\"snk-personalized-filter\",[[2,\"snk-personalized-filter\",{\"messagesBuilder\":[1040],\"entityUri\":[1025,\"entity-uri\"],\"filterId\":[1025,\"filter-id\"],\"configName\":[1025,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_filterAssistentMode\":[32],\"_filterAssistent\":[32],\"createPersonalizedFilter\":[64]}]]],[\"snk-filter-item\",[[0,\"snk-filter-item\",{\"config\":[1040],\"getMessage\":[16],\"showChips\":[4,\"show-chips\"],\"detailIsVisible\":[32],\"showUp\":[64],\"hideDetail\":[64]},[[2,\"click\",\"clickListener\"],[2,\"mousedown\",\"mouseDownListener\"],[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-filter-bar\",[[2,\"snk-filter-bar\",{\"dataUnit\":[1040],\"title\":[1],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"mode\":[1],\"filterConfig\":[1040],\"messagesBuilder\":[1040],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"allowDefault\":[32],\"scrollerLocked\":[32],\"showPersonalizedFilter\":[32],\"personalizedFilterId\":[32],\"reload\":[64],\"getFilterItem\":[64],\"updateFilterItem\":[64],\"addFilterItem\":[64],\"removeFilterItem\":[64],\"showFilterModal\":[64]},[[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-grid\",[[6,\"snk-grid\",{\"columnFilterDataSource\":[1040],\"configName\":[1,\"config-name\"],\"filterBarTitle\":[1,\"filter-bar-title\"],\"resourceID\":[1,\"resource-i-d\"],\"selectionToastConfig\":[16],\"actionsList\":[16],\"isDetail\":[4,\"is-detail\"],\"taskbarManager\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"recordsValidator\":[16],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"gridHeaderCustomSlotId\":[1,\"grid-header-custom-slot-id\"],\"topTaskbarCustomSlotId\":[1,\"top-taskbar-custom-slot-id\"],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_gridConfig\":[32],\"_popUpGridConfig\":[32],\"_showSnkFilterBar\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"setConfig\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64],\"findColumn\":[64],\"setFocus\":[64]}]]],[\"snk-configurator\",[[2,\"snk-configurator\",{\"showActionButtons\":[4,\"show-action-buttons\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"viewMode\":[2,\"view-mode\"],\"customContainerId\":[1,\"custom-container-id\"],\"messagesBuilder\":[1040],\"_opened\":[32],\"_permissions\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-data-unit\",[[2,\"snk-data-unit\",{\"dataState\":[1040],\"messagesBuilder\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"entityName\":[1,\"entity-name\"],\"pageSize\":[2,\"page-size\"],\"dataUnit\":[1040],\"beforeSave\":[16],\"afterSave\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"ignoreSaveMessage\":[4,\"ignore-save-message\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"getDataUnit\":[64],\"getSelectedRecordsIDsInfo\":[64]}]]],[\"snk-taskbar\",[[6,\"snk-taskbar\",{\"alignRigth\":[4,\"align-rigth\"],\"customSlotId\":[1,\"custom-slot-id\"],\"customContainerId\":[1,\"custom-container-id\"],\"overflowStrategy\":[1,\"overflow-strategy\"],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"buttons\":[1],\"customButtons\":[16],\"actionsList\":[16],\"primaryButton\":[1,\"primary-button\"],\"disabledButtons\":[16],\"dataUnit\":[16],\"presentationMode\":[1537,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_permissions\":[32],\"_overFlowedElements\":[32],\"_customElements\":[32],\"_customElementsId\":[32],\"_slotContainer\":[32],\"_hiddenActionsList\":[32],\"_lastWidth\":[32],\"_hasToUpdateOverFlow\":[32],\"_isWaitingForSave\":[32]},[[8,\"snkCustomSlotElementsLoaded\",\"handleCustomSlotElementsLoaded\"]]]]],[\"snk-filter-detail\",[[0,\"snk-filter-detail\",{\"config\":[1040],\"getMessage\":[16],\"showHardFixed\":[4,\"show-hard-fixed\"],\"show\":[64]}]]],[\"snk-config-options\",[[2,\"snk-config-options\",{\"fieldConfig\":[16],\"idConfig\":[513,\"id-config\"],\"dataUnit\":[16],\"messagesBuilder\":[1040],\"_defaultType\":[32]}]]],[\"snk-field-config\",[[2,\"snk-field-config\",{\"isConfigActive\":[16],\"fieldConfig\":[16],\"modeInsertion\":[516,\"mode-insertion\"],\"dataUnit\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-simple-bar\",[[6,\"snk-simple-bar\",{\"label\":[1],\"breadcrumbItens\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-tab-config\",[[6,\"snk-tab-config\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"tabItems\":[16],\"messagesBuilder\":[1040],\"_processedTabs\":[32],\"_activeEditText\":[32],\"_activeEditTextIndex\":[32],\"_actionsHide\":[32],\"_actionsShow\":[32]}]]],[\"snk-form-config\",[[2,\"snk-form-config\",{\"dataUnit\":[16],\"configManager\":[16],\"messagesBuilder\":[1040],\"_formConfigOptions\":[32],\"_fieldConfigSelected\":[32],\"_layoutFormConfig\":[32],\"_fieldsAvailable\":[32],\"_formConfig\":[32],\"_formConfigChanged\":[32],\"_optionFormConfigSelected\":[32],\"_optionFormConfigChanged\":[32],\"_tempGroups\":[32]}]]],[\"snk-exporter-email-sender\",[[0,\"snk-exporter-email-sender\",{\"getMessage\":[16],\"_config\":[32],\"_opened\":[32],\"_currentStep\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-crud\",[[6,\"snk-crud\",{\"configName\":[1025,\"config-name\"],\"filterBarTitle\":[1,\"filter-bar-title\"],\"selectionToastConfig\":[16],\"showActionButtons\":[4,\"show-action-buttons\"],\"actionsList\":[16],\"taskbarManager\":[16],\"recordsValidator\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"filterBarLegacyConfigName\":[1,\"filter-bar-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"disablePersonalizedFilter\":[4,\"disable-personalized-filter\"],\"_dataUnit\":[32],\"_dataState\":[32],\"attachmentRegisterKey\":[32],\"_currentViewMode\":[32],\"_canEdit\":[32],\"_resourceID\":[32],\"customContainerId\":[32],\"goToView\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"reloadFilterBar\":[64],\"getFilterBar\":[64]}]]],[\"snk-form\",[[2,\"snk-form\",{\"configName\":[1,\"config-name\"],\"recordsValidator\":[16],\"messagesBuilder\":[1040],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"resourceID\":[1,\"resource-i-d\"],\"_dataUnit\":[32],\"_dataState\":[32],\"_showFormConfig\":[32],\"_configManager\":[32],\"showConfig\":[64],\"hideConfig\":[64]}]]],[\"snk-data-exporter\",[[2,\"snk-data-exporter\",{\"provider\":[16],\"messagesBuilder\":[1040],\"_items\":[32],\"_showDropdown\":[32],\"_releasedToExport\":[32]}]]],[\"snk-guides-viewer\",[[6,\"snk-guides-viewer\",{\"dataUnit\":[16],\"dataState\":[16],\"configName\":[1,\"config-name\"],\"entityPath\":[1,\"entity-path\"],\"actionsList\":[16],\"recordsValidator\":[16],\"masterFormConfig\":[1040],\"selectedGuide\":[16],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"canEdit\":[4,\"can-edit\"],\"presentationMode\":[1,\"presentation-mode\"],\"resourceID\":[1,\"resource-i-d\"],\"detailTaskbarCustomContainerId\":[1,\"detail-taskbar-custom-container-id\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"_hasToCreateFieldSearch\":[32],\"_breadcrumbItems\":[32],\"_guides\":[32],\"_formEditorConfigManager\":[32],\"_formEditorDataUnit\":[32],\"_fieldToGetFocus\":[32],\"showFormConfig\":[64],\"findField\":[64],\"setFocus\":[64]},[[2,\"actionClick\",\"onActionClick\"],[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-application\",[[2,\"snk-application\",{\"messagesBuilder\":[1040],\"configName\":[1,\"config-name\"],\"gridLegacyConfigName\":[1,\"grid-legacy-config-name\"],\"formLegacyConfigName\":[1,\"form-legacy-config-name\"],\"loadByPK\":[16],\"getKeyboardManager\":[64],\"isUserSup\":[64],\"addPendingAction\":[64],\"callServiceBroker\":[64],\"initOnboarding\":[64],\"hasAccess\":[64],\"getAllAccess\":[64],\"getStringParam\":[64],\"getIntParam\":[64],\"getFloatParam\":[64],\"getBooleanParam\":[64],\"getDateParam\":[64],\"showPopUp\":[64],\"showModal\":[64],\"showAlerts\":[64],\"closeModal\":[64],\"closePopUp\":[64],\"temOpcional\":[64],\"getConfig\":[64],\"saveConfig\":[64],\"getAttributeFromHTMLWrapper\":[64],\"openApp\":[64],\"webConnection\":[64],\"createDataunit\":[64],\"updateDataunitCache\":[64],\"getDataUnit\":[64],\"addClientEvent\":[64],\"removeClientEvent\":[64],\"hasClientEvent\":[64],\"getResourceID\":[64],\"getUserID\":[64],\"alert\":[64],\"error\":[64],\"success\":[64],\"message\":[64],\"confirm\":[64],\"info\":[64],\"loadTotals\":[64],\"isLoadedByPk\":[64],\"executeSearch\":[64],\"executePreparedSearch\":[64],\"isDebugMode\":[64],\"getAppLabel\":[64],\"addSearchListener\":[64],\"importScript\":[64],\"getApplicationPath\":[64],\"executeSelectDistinct\":[64],\"getDataFetcher\":[64],\"whenApplicationReady\":[64],\"setSearchFilterContext\":[64]}]]],[\"snk-filter-advanced-mode_2\",[[2,\"snk-filter-assistent-mode\",{\"filterAssistent\":[1040],\"messagesBuilder\":[1040],\"filterId\":[1025,\"filter-id\"],\"entityUri\":[1025,\"entity-uri\"],\"application\":[1040]}],[2,\"snk-filter-advanced-mode\",{\"filterAssistent\":[1040],\"application\":[1040]}]]],[\"snk-actions-button_4\",[[2,\"snk-grid-config\",{\"selectedIndex\":[1026,\"selected-index\"],\"columns\":[1040],\"config\":[1040],\"configName\":[1,\"config-name\"],\"resourceID\":[1,\"resource-i-d\"]}],[2,\"snk-actions-button\",{\"_items\":[32],\"_showDropdown\":[32],\"_actions\":[32],\"_isOrderActions\":[32]}],[1,\"snk-select-box\",{\"selectedOption\":[1,\"selected-option\"]}],[2,\"taskbar-actions-button\",{\"title\":[1],\"enabled\":[4],\"actions\":[16],\"_showDropdown\":[32],\"showActions\":[64],\"hideActions\":[64],\"isOpened\":[64]},[[8,\"keydown\",\"handleKeyDown\"],[8,\"ezOpenModal\",\"handleClose\"]]]]],[\"snk-detail-view\",[[6,\"snk-detail-view\",{\"formConfigManager\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"resourceID\":[1,\"resource-i-d\"],\"guideItemPath\":[16],\"entityName\":[1,\"entity-name\"],\"label\":[1],\"dataUnit\":[1040],\"selectedForm\":[1025,\"selected-form\"],\"dataState\":[1040],\"messagesBuilder\":[1040],\"branchGuide\":[1040],\"canEdit\":[4,\"can-edit\"],\"taskbarCustomContainerId\":[1,\"taskbar-custom-container-id\"],\"_disabledButtons\":[32],\"_currentView\":[32],\"attachmentRegisterKey\":[32],\"changeViewMode\":[64],\"configGrid\":[64],\"showUp\":[64]},[[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]]]"), options);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as DataFetcher, d as dist } from './DataFetcher-
|
|
1
|
+
import { FieldComparator, SortMode, DataUnit, DataType, DateUtils, StringUtils, ChangeOperation, ApplicationContext, UserInterface, DataUnitStorage } from '@sankhyalabs/core';
|
|
2
|
+
import { D as DataFetcher, d as dist } from './DataFetcher-773a3e4b.js';
|
|
3
3
|
import { DISTINCT_FILTER_NAME_PREFIX } from '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
4
4
|
import { DataUnitTransient } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
5
5
|
import { ColumnFilterManager } from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
6
|
-
import SortingUtils from '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
7
6
|
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
|
8
7
|
|
|
9
8
|
class ArrayRepository {
|
|
@@ -85,9 +84,6 @@ class ArrayRepository {
|
|
|
85
84
|
async count() {
|
|
86
85
|
return Promise.resolve(this._list.length);
|
|
87
86
|
}
|
|
88
|
-
getFromCache() {
|
|
89
|
-
return ObjectUtils.copy(this._list);
|
|
90
|
-
}
|
|
91
87
|
}
|
|
92
88
|
|
|
93
89
|
class PreloadManager {
|
|
@@ -109,7 +105,17 @@ class PreloadManager {
|
|
|
109
105
|
}
|
|
110
106
|
}
|
|
111
107
|
static getSortingFunction(dataUnit, sorting) {
|
|
112
|
-
|
|
108
|
+
if (sorting == undefined || sorting.length == 0) {
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
return (recordA, recordB) => {
|
|
112
|
+
for (const sort of sorting) {
|
|
113
|
+
const result = FieldComparator.compare(dataUnit.getField(sort.field), recordA, recordB, sort.mode === SortMode.ASC);
|
|
114
|
+
if (result != 0) {
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
113
119
|
}
|
|
114
120
|
static async getDistinct(dataUnit, fieldName) {
|
|
115
121
|
if (!PreloadManager.isCacheEnabled(dataUnit)) {
|
|
@@ -146,11 +152,7 @@ class PreloadManager {
|
|
|
146
152
|
static async loadData(dataUnit, request, loadFromServer) {
|
|
147
153
|
try {
|
|
148
154
|
if (PreloadManager.isCacheEnabled(dataUnit)) {
|
|
149
|
-
|
|
150
|
-
"EZ_GRID_LOADING_SOURCE",
|
|
151
|
-
DataUnit.CHANGING_PAGE_LOADING_SOURCE,
|
|
152
|
-
DataUnit.ALL_RECORDS_SELECTION_SOURCE
|
|
153
|
-
].includes(request.source);
|
|
155
|
+
let useCache = request.source === "EZ_GRID_LOADING_SOURCE" || request.source === DataUnit.CHANGING_PAGE_LOADING_SOURCE;
|
|
154
156
|
if (useCache) {
|
|
155
157
|
const isCacheEmpty = await PreloadManager.getRepository(dataUnit).isEmpty();
|
|
156
158
|
if (!isCacheEmpty) {
|
|
@@ -217,9 +219,6 @@ class PreloadManager {
|
|
|
217
219
|
.catch(reason => reject(reason));
|
|
218
220
|
});
|
|
219
221
|
}
|
|
220
|
-
static getCachedRecords(dataUnit) {
|
|
221
|
-
return PreloadManager.getRepository(dataUnit).getFromCache();
|
|
222
|
-
}
|
|
223
222
|
}
|
|
224
223
|
PreloadManager._repositories = new Map();
|
|
225
224
|
PreloadManager._loadingStatus = new Map();
|
|
@@ -261,7 +260,7 @@ function buildPaginationInfo(records, offset = 0, limit = 0) {
|
|
|
261
260
|
}
|
|
262
261
|
|
|
263
262
|
class InMemoryLoader {
|
|
264
|
-
constructor(metadata, records
|
|
263
|
+
constructor(metadata, records) {
|
|
265
264
|
this.metadata = metadata;
|
|
266
265
|
this.records = records;
|
|
267
266
|
this._dataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
|
@@ -270,11 +269,7 @@ class InMemoryLoader {
|
|
|
270
269
|
this._dataUnit.dataLoader = (dataUnit, request) => this.inMemoryLoader(dataUnit, request, this.getRecordsToLoad());
|
|
271
270
|
this._dataUnit.saveLoader = (_dataUnit, changes) => this.saveLoader(_dataUnit, changes);
|
|
272
271
|
this._dataUnit.removeLoader = (_dataUnit, recordIds) => this.removeLoader(_dataUnit, recordIds);
|
|
273
|
-
this.dataUnit.loadMetadata().then(() =>
|
|
274
|
-
if ((config === null || config === void 0 ? void 0 : config.autoLoad) !== false) {
|
|
275
|
-
this.dataUnit.loadData();
|
|
276
|
-
}
|
|
277
|
-
});
|
|
272
|
+
this.dataUnit.loadMetadata().then(() => this.dataUnit.loadData());
|
|
278
273
|
}
|
|
279
274
|
getRecordsToLoad() {
|
|
280
275
|
if (this._initialRecords == undefined && this.dataUnit.records.length > 0) {
|
|
@@ -326,7 +321,7 @@ class InMemoryLoader {
|
|
|
326
321
|
this._initialRecords = newRecords;
|
|
327
322
|
if (this._dataUnit) {
|
|
328
323
|
//Isso força o refresh internamente no datunit
|
|
329
|
-
this._dataUnit.
|
|
324
|
+
this._dataUnit.gotoPage(0);
|
|
330
325
|
}
|
|
331
326
|
}
|
|
332
327
|
get metadata() {
|
|
@@ -378,17 +373,11 @@ class InMemoryLoader {
|
|
|
378
373
|
}
|
|
379
374
|
InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME = "InMemoryDataUnit";
|
|
380
375
|
|
|
381
|
-
function getRecordValue(record, fieldName) {
|
|
382
|
-
var _a, _b;
|
|
383
|
-
return ((_a = record[fieldName]) === null || _a === void 0 ? void 0 : _a.value) !== undefined ? (_b = record[fieldName]) === null || _b === void 0 ? void 0 : _b.value : record[fieldName];
|
|
384
|
-
}
|
|
385
|
-
|
|
386
376
|
class DatasetStrategy {
|
|
387
377
|
canSlice() {
|
|
388
378
|
return false;
|
|
389
379
|
}
|
|
390
380
|
processSortingSide(request, dataUnit, serverSideFilters) {
|
|
391
|
-
var _a;
|
|
392
381
|
const localSorting = [];
|
|
393
382
|
const serverSorting = [];
|
|
394
383
|
if (request.sort != undefined) {
|
|
@@ -397,7 +386,9 @@ class DatasetStrategy {
|
|
|
397
386
|
}
|
|
398
387
|
for (const sort of request.sort) {
|
|
399
388
|
const descriptor = dataUnit.getField(sort.field);
|
|
400
|
-
const local =
|
|
389
|
+
const local = descriptor != undefined
|
|
390
|
+
&& descriptor.properties != undefined
|
|
391
|
+
&& descriptor.properties.calculated === "true";
|
|
401
392
|
if (local) {
|
|
402
393
|
localSorting.push(sort);
|
|
403
394
|
}
|
|
@@ -437,53 +428,6 @@ class DatasetStrategy {
|
|
|
437
428
|
return Promise.reject(error);
|
|
438
429
|
}
|
|
439
430
|
}
|
|
440
|
-
async loadRowMetadata(snkDataUnit, fieldName, metadataName, updatedFields = {}) {
|
|
441
|
-
try {
|
|
442
|
-
const serviceName = "DatasetSP.loadRowMetadata";
|
|
443
|
-
const parsedRequestBody = await this.buildRequestBodyLoadRowMetadata({ snkDataUnit, fieldName, metadataName, serviceName, updatedFields });
|
|
444
|
-
const response = await DataFetcher.get().callServiceBroker(serviceName, parsedRequestBody);
|
|
445
|
-
return response;
|
|
446
|
-
}
|
|
447
|
-
catch (error) {
|
|
448
|
-
console.error(error);
|
|
449
|
-
return Promise.reject(error);
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
async buildRequestBodyLoadRowMetadata({ snkDataUnit, serviceName, fieldName, metadataName, updatedFields, }) {
|
|
453
|
-
const dataUnit = snkDataUnit.dataUnit;
|
|
454
|
-
const entityName = DataUnitFetcher.parseDataUnitName(dataUnit.name).entityName;
|
|
455
|
-
const recordIdInfo = await snkDataUnit.getSelectedRecordsIDsInfo();
|
|
456
|
-
const pk = recordIdInfo.reduce((accumulator, currentValue) => {
|
|
457
|
-
accumulator[currentValue.name] = currentValue.value;
|
|
458
|
-
return accumulator;
|
|
459
|
-
}, {});
|
|
460
|
-
const record = dataUnit.getSelectedRecord();
|
|
461
|
-
const fields = dataUnit.metadata.fields.filter(({ standAlone, name }) => !standAlone && !name.includes(".")).map(({ name }) => name);
|
|
462
|
-
const values = fields.reduce((accumulator, currentValue, currentIndex) => {
|
|
463
|
-
const recordValue = getRecordValue(record, currentValue);
|
|
464
|
-
const updatedFieldValue = getRecordValue(updatedFields, currentValue);
|
|
465
|
-
accumulator[currentIndex] = updatedFieldValue !== undefined ? updatedFieldValue : recordValue;
|
|
466
|
-
return accumulator;
|
|
467
|
-
}, {});
|
|
468
|
-
const requestBody = {
|
|
469
|
-
serviceName,
|
|
470
|
-
requestBody: {
|
|
471
|
-
dataSetID: dataUnit.dataUnitId,
|
|
472
|
-
entityName,
|
|
473
|
-
standAlone: false,
|
|
474
|
-
metadataName,
|
|
475
|
-
fieldName,
|
|
476
|
-
fields,
|
|
477
|
-
record: {
|
|
478
|
-
pk,
|
|
479
|
-
oldPk: pk,
|
|
480
|
-
values,
|
|
481
|
-
},
|
|
482
|
-
}
|
|
483
|
-
};
|
|
484
|
-
const parsedRequestBody = JSON.stringify(requestBody);
|
|
485
|
-
return parsedRequestBody;
|
|
486
|
-
}
|
|
487
431
|
getFieldsList(dataUnit) {
|
|
488
432
|
let fields = ["__record__id__", "__record__label__"];
|
|
489
433
|
dataUnit.metadata.fields.forEach((descriptor) => {
|
|
@@ -563,11 +507,9 @@ class DatasetStrategy {
|
|
|
563
507
|
}
|
|
564
508
|
processRecords(dataUnit, fields, responseRecords) {
|
|
565
509
|
return responseRecords.map((dataFrame) => {
|
|
566
|
-
const lastElement = dataFrame[dataFrame.length - 1];
|
|
567
510
|
const duRecord = {
|
|
568
511
|
__record__id__: dataFrame[0],
|
|
569
|
-
__record__label__: dataFrame[1]
|
|
570
|
-
__record__metadata__: lastElement['_rmd'],
|
|
512
|
+
__record__label__: dataFrame[1]
|
|
571
513
|
};
|
|
572
514
|
dataUnit.metadata.fields.forEach(fieldDescriptor => {
|
|
573
515
|
duRecord[fieldDescriptor.name] = this.buildFieldValue(fieldDescriptor, fields, dataFrame);
|
|
@@ -630,9 +572,6 @@ class DataUnitDataLoader {
|
|
|
630
572
|
});
|
|
631
573
|
});
|
|
632
574
|
}
|
|
633
|
-
static getCachedRecords(dataUnit) {
|
|
634
|
-
return PreloadManager.getCachedRecords(dataUnit);
|
|
635
|
-
}
|
|
636
575
|
static async loadFromServer(dataUnit, request, loadingInfo) {
|
|
637
576
|
try {
|
|
638
577
|
//Registramos a request com as informações de carga para determinarmos a última.
|
|
@@ -833,7 +772,6 @@ class DataUnitFetcher {
|
|
|
833
772
|
dataUnit.saveLoader = (_dataUnit, changes) => this.saveData(dataUnit, changes);
|
|
834
773
|
dataUnit.removeLoader = (dataUnit, recordIds) => this.removeRecords(dataUnit, recordIds);
|
|
835
774
|
dataUnit.recordLoader = (dataUnit, recordIds) => this.loadRecord(dataUnit, recordIds);
|
|
836
|
-
dataUnit.allRecordsLoader = (dataUnit) => DataUnitDataLoader.getCachedRecords(dataUnit);
|
|
837
775
|
return dataUnit;
|
|
838
776
|
}
|
|
839
777
|
loadMetadata(dataUnit) {
|
|
@@ -1052,4 +990,164 @@ class DataUnitFetcher {
|
|
|
1052
990
|
}
|
|
1053
991
|
}
|
|
1054
992
|
|
|
1055
|
-
|
|
993
|
+
class PesquisaFetcher {
|
|
994
|
+
constructor() {
|
|
995
|
+
this._defaultPageSize = 100;
|
|
996
|
+
this._templateByQuery = new Map();
|
|
997
|
+
this._searchListenersByDataUnit = new Map();
|
|
998
|
+
this.buldTemplates();
|
|
999
|
+
}
|
|
1000
|
+
buldTemplates() {
|
|
1001
|
+
this._templateByQuery.set("search", dist.gql `query($entityName: String! $argument: String $criteria: InputSearchCriteria $options: InputSearchOptions) {
|
|
1002
|
+
$queryAlias$: search(entityName: $entityName argument: $argument criteria: $criteria options: $options){
|
|
1003
|
+
value
|
|
1004
|
+
label
|
|
1005
|
+
}
|
|
1006
|
+
}`);
|
|
1007
|
+
}
|
|
1008
|
+
loadSearchOptions(entityName, argument, criteria, options) {
|
|
1009
|
+
var _a;
|
|
1010
|
+
const cleanText = (argument === null || argument === void 0 ? void 0 : argument.toString().trim()) || undefined;
|
|
1011
|
+
argument = isNaN(Number(cleanText)) && cleanText ? `%${cleanText}` : cleanText;
|
|
1012
|
+
criteria === null || criteria === void 0 ? void 0 : criteria.params.forEach(param => {
|
|
1013
|
+
if (param.dataType === DataType.OBJECT) {
|
|
1014
|
+
param.value = JSON.stringify(param.value);
|
|
1015
|
+
}
|
|
1016
|
+
});
|
|
1017
|
+
const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, options);
|
|
1018
|
+
const values = {
|
|
1019
|
+
argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
|
|
1020
|
+
entityName,
|
|
1021
|
+
criteria: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.criteria) || criteria,
|
|
1022
|
+
options: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions) || options,
|
|
1023
|
+
};
|
|
1024
|
+
if (values.options) {
|
|
1025
|
+
(_a = values.options) === null || _a === void 0 ? true : delete _a.dataUnitId;
|
|
1026
|
+
}
|
|
1027
|
+
return new Promise((resolve, reject) => {
|
|
1028
|
+
DataFetcher.get()
|
|
1029
|
+
.callGraphQL({
|
|
1030
|
+
values,
|
|
1031
|
+
query: this._templateByQuery.get("search"),
|
|
1032
|
+
})
|
|
1033
|
+
.then((result) => {
|
|
1034
|
+
resolve(result);
|
|
1035
|
+
})
|
|
1036
|
+
.catch((error) => {
|
|
1037
|
+
reject(error);
|
|
1038
|
+
});
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
loadAdvancedSearch(entityName, argument, criteria, searchOptions) {
|
|
1042
|
+
var _a, _b, _c, _d;
|
|
1043
|
+
const listenerResult = this.applySearchListener(SearchListenerType.beforeSearch, entityName, argument, criteria, searchOptions);
|
|
1044
|
+
const values = {
|
|
1045
|
+
argument: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.argument) || argument,
|
|
1046
|
+
criteria: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.criteria) || criteria,
|
|
1047
|
+
searchOptions: (listenerResult === null || listenerResult === void 0 ? void 0 : listenerResult.searchOptions) || searchOptions,
|
|
1048
|
+
};
|
|
1049
|
+
const serviceName = "PesquisaSP.getSuggestion";
|
|
1050
|
+
const externalCriteria = {
|
|
1051
|
+
query: {
|
|
1052
|
+
$: (_a = values.criteria) === null || _a === void 0 ? void 0 : _a.expression
|
|
1053
|
+
}
|
|
1054
|
+
};
|
|
1055
|
+
if (((_c = (_b = values.criteria) === null || _b === void 0 ? void 0 : _b.params) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
1056
|
+
externalCriteria.params = {
|
|
1057
|
+
param: values.criteria.params.map(param => {
|
|
1058
|
+
let value = param.value;
|
|
1059
|
+
if (typeof value === "string") {
|
|
1060
|
+
const match = /CTX\{([^}]+)\}/.exec(value);
|
|
1061
|
+
if (match) {
|
|
1062
|
+
value = ApplicationContext.getContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${match[1]})__`);
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
let type = param.dataType;
|
|
1066
|
+
if (type === DataType.OBJECT) {
|
|
1067
|
+
value = value.value;
|
|
1068
|
+
type = "S";
|
|
1069
|
+
}
|
|
1070
|
+
else {
|
|
1071
|
+
type = convertParamType(param.dataType);
|
|
1072
|
+
}
|
|
1073
|
+
return { $: value, type };
|
|
1074
|
+
})
|
|
1075
|
+
};
|
|
1076
|
+
}
|
|
1077
|
+
const options = searchOptions != undefined
|
|
1078
|
+
? Object.assign(Object.assign({}, searchOptions), { "pkFieldName": searchOptions.codeFieldName, "label": searchOptions.descriptionFieldName, "fieldName": searchOptions.codeFieldName, "useDescriptionOptions": false, "enableRowsCounter": true }) : undefined;
|
|
1079
|
+
const reqBody = {
|
|
1080
|
+
"serviceName": serviceName,
|
|
1081
|
+
"requestBody": {
|
|
1082
|
+
"criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": false, "limit": this._defaultPageSize, "query": { "$": values.argument }, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_d = values.searchOptions) === null || _d === void 0 ? void 0 : _d.rootEntity }, { options }),
|
|
1083
|
+
"clientEventList": {
|
|
1084
|
+
"clientEvent": []
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
};
|
|
1088
|
+
return new Promise((resolve, reject) => {
|
|
1089
|
+
DataFetcher.get()
|
|
1090
|
+
.callServiceBroker("PesquisaSP.getSuggestion", JSON.stringify(reqBody))
|
|
1091
|
+
.then(result => resolve(result))
|
|
1092
|
+
.catch(error => reject(error));
|
|
1093
|
+
});
|
|
1094
|
+
}
|
|
1095
|
+
addSearchListener(entityName, dataUnitID, listener) {
|
|
1096
|
+
var _a;
|
|
1097
|
+
const dataUnitSearchListeners = this._searchListenersByDataUnit.get(dataUnitID) || [];
|
|
1098
|
+
const entityListener = dataUnitSearchListeners.find(currentListener => currentListener.entity === entityName);
|
|
1099
|
+
if (!entityListener) {
|
|
1100
|
+
this._searchListenersByDataUnit.set(dataUnitID, [...dataUnitSearchListeners, { entity: entityName, listener }]);
|
|
1101
|
+
}
|
|
1102
|
+
else {
|
|
1103
|
+
for (const type of Object.keys(listener)) {
|
|
1104
|
+
if (type in entityListener.listener) {
|
|
1105
|
+
const listenerFunctionIsEquals = ((_a = entityListener.listener[type]) === null || _a === void 0 ? void 0 : _a.toString()) === listener[type].toString();
|
|
1106
|
+
if (listenerFunctionIsEquals)
|
|
1107
|
+
continue;
|
|
1108
|
+
entityListener.listener[type] = listener[type];
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
return () => {
|
|
1113
|
+
const newListeners = dataUnitSearchListeners.filter(currentListener => currentListener.entity !== entityName);
|
|
1114
|
+
if (!newListeners.length) {
|
|
1115
|
+
this._searchListenersByDataUnit.delete(dataUnitID);
|
|
1116
|
+
return;
|
|
1117
|
+
}
|
|
1118
|
+
this._searchListenersByDataUnit.set(dataUnitID, newListeners);
|
|
1119
|
+
};
|
|
1120
|
+
}
|
|
1121
|
+
applySearchListener(listenerType, entityName, argument, criteria, searchOptions) {
|
|
1122
|
+
var _a;
|
|
1123
|
+
const dataUnitId = searchOptions === null || searchOptions === void 0 ? void 0 : searchOptions.dataUnitId;
|
|
1124
|
+
if (!dataUnitId)
|
|
1125
|
+
return;
|
|
1126
|
+
const entityListener = (_a = this._searchListenersByDataUnit.get(dataUnitId)) === null || _a === void 0 ? void 0 : _a.find(({ entity }) => entity === entityName);
|
|
1127
|
+
if (!entityListener)
|
|
1128
|
+
return;
|
|
1129
|
+
const { listener } = entityListener;
|
|
1130
|
+
if (!(listenerType in listener))
|
|
1131
|
+
return;
|
|
1132
|
+
return listener[listenerType]({ argument, criteria, searchOptions });
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
function convertParamType(dataType) {
|
|
1136
|
+
//Alerta: Cuidado pra não contaminar o DataType com a implementação
|
|
1137
|
+
//atual da pesquisa... em geral, somente inteiros,
|
|
1138
|
+
//data (com ou sem hora) e string são realmente relevantes
|
|
1139
|
+
switch (dataType) {
|
|
1140
|
+
case DataType.NUMBER:
|
|
1141
|
+
return "I";
|
|
1142
|
+
case DataType.DATE:
|
|
1143
|
+
return "D";
|
|
1144
|
+
default:
|
|
1145
|
+
return "S";
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
var SearchListenerType;
|
|
1149
|
+
(function (SearchListenerType) {
|
|
1150
|
+
SearchListenerType["beforeSearch"] = "beforeSearch";
|
|
1151
|
+
})(SearchListenerType || (SearchListenerType = {}));
|
|
1152
|
+
|
|
1153
|
+
export { DataUnitFetcher as D, InMemoryLoader as I, PesquisaFetcher as P, PreloadManager as a, applyFilter as b, applySorting as c, buildPaginationInfo as d };
|