@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/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js
CHANGED
|
@@ -26,8 +26,6 @@ export class SnkDetailView {
|
|
|
26
26
|
this.branchGuide = undefined;
|
|
27
27
|
this.canEdit = true;
|
|
28
28
|
this.taskbarCustomContainerId = undefined;
|
|
29
|
-
this.customEditors = undefined;
|
|
30
|
-
this.customRenders = undefined;
|
|
31
29
|
}
|
|
32
30
|
observeDataUnit(newDataUnit, oldDataUnit) {
|
|
33
31
|
newDataUnit === null || newDataUnit === void 0 ? void 0 : newDataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
|
@@ -95,38 +93,10 @@ export class SnkDetailView {
|
|
|
95
93
|
this._snkGrid.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
96
94
|
}
|
|
97
95
|
}
|
|
98
|
-
/**
|
|
99
|
-
* Registra um editor customizado para campos da grade e formulário.
|
|
100
|
-
*/
|
|
101
|
-
async addCustomEditor(fieldName, customEditor) {
|
|
102
|
-
var _a;
|
|
103
|
-
const detailContext = this.normalizeBranchGuideId((_a = this.branchGuide) === null || _a === void 0 ? void 0 : _a.id);
|
|
104
|
-
this._snkGrid.addCustomEditor(fieldName, customEditor, detailContext);
|
|
105
|
-
this._snkFormView.addCustomEditor(fieldName, customEditor, detailContext);
|
|
106
|
-
}
|
|
107
|
-
async observerPropsCustomEditor(newValue) {
|
|
108
|
-
for (const fieldName in newValue) {
|
|
109
|
-
await this.addCustomEditor(fieldName, newValue[fieldName]);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Registra um render customizado para colunas da grid.
|
|
114
|
-
*/
|
|
115
|
-
async addGridCustomRender(fieldName, customRender) {
|
|
116
|
-
var _a;
|
|
117
|
-
const detailContext = this.normalizeBranchGuideId((_a = this.branchGuide) === null || _a === void 0 ? void 0 : _a.id);
|
|
118
|
-
await this._snkGrid.addGridCustomRender(fieldName, customRender, detailContext);
|
|
119
|
-
}
|
|
120
96
|
onContentCardChanged(evt) {
|
|
121
97
|
SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this.formConfigManager).then(() => forceUpdate(this));
|
|
122
98
|
evt.stopPropagation();
|
|
123
99
|
}
|
|
124
|
-
async observeCustomRenders(newValue) {
|
|
125
|
-
for (const field in newValue) {
|
|
126
|
-
const customRender = newValue[field];
|
|
127
|
-
await this.addGridCustomRender(field, customRender);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
100
|
updateLabel() {
|
|
131
101
|
const guideItemPathSize = this.guideItemPath ? this.guideItemPath.length : 0;
|
|
132
102
|
if (guideItemPathSize > 0) {
|
|
@@ -229,10 +199,6 @@ export class SnkDetailView {
|
|
|
229
199
|
this.messagesBuilder = new SnkMessageBuilder(this.entityName);
|
|
230
200
|
}
|
|
231
201
|
}
|
|
232
|
-
async componentDidLoad() {
|
|
233
|
-
await this.observerPropsCustomEditor(this.customEditors);
|
|
234
|
-
await this.observeCustomRenders(this.customRenders);
|
|
235
|
-
}
|
|
236
202
|
async dataUnitActionHandler(action) {
|
|
237
203
|
if (action.type === Action.FIELD_INVALIDATED) {
|
|
238
204
|
this.addErrorBadgeToBranchGuide();
|
|
@@ -242,9 +208,6 @@ export class SnkDetailView {
|
|
|
242
208
|
this.branchGuide = Object.assign(Object.assign({}, this.branchGuide), { badge: 'error' });
|
|
243
209
|
this.snkDetailGuidesChange.emit(new GuideBuilder(this.branchGuide, this._formMetadata, this.dataUnit));
|
|
244
210
|
}
|
|
245
|
-
normalizeBranchGuideId(id) {
|
|
246
|
-
return id === null || id === void 0 ? void 0 : id.replace(/child\[(.*?)\]/g, '$1').replace(/::/g, '>');
|
|
247
|
-
}
|
|
248
211
|
render() {
|
|
249
212
|
this.updateLabel();
|
|
250
213
|
//const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
|
|
@@ -506,46 +469,6 @@ export class SnkDetailView {
|
|
|
506
469
|
},
|
|
507
470
|
"attribute": "taskbar-custom-container-id",
|
|
508
471
|
"reflect": false
|
|
509
|
-
},
|
|
510
|
-
"customEditors": {
|
|
511
|
-
"type": "unknown",
|
|
512
|
-
"mutable": false,
|
|
513
|
-
"complexType": {
|
|
514
|
-
"original": "PropsCustomEditor",
|
|
515
|
-
"resolved": "PropsCustomEditor",
|
|
516
|
-
"references": {
|
|
517
|
-
"PropsCustomEditor": {
|
|
518
|
-
"location": "import",
|
|
519
|
-
"path": "../../interfaces/PropsCustomEditor"
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
},
|
|
523
|
-
"required": false,
|
|
524
|
-
"optional": false,
|
|
525
|
-
"docs": {
|
|
526
|
-
"tags": [],
|
|
527
|
-
"text": "Registra um editor customizado para campos da grade e formul\u00E1rio."
|
|
528
|
-
}
|
|
529
|
-
},
|
|
530
|
-
"customRenders": {
|
|
531
|
-
"type": "unknown",
|
|
532
|
-
"mutable": false,
|
|
533
|
-
"complexType": {
|
|
534
|
-
"original": "PropsCustomRender",
|
|
535
|
-
"resolved": "PropsCustomRender",
|
|
536
|
-
"references": {
|
|
537
|
-
"PropsCustomRender": {
|
|
538
|
-
"location": "import",
|
|
539
|
-
"path": "../../interfaces/PropsCustomRender"
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
},
|
|
543
|
-
"required": false,
|
|
544
|
-
"optional": false,
|
|
545
|
-
"docs": {
|
|
546
|
-
"tags": [],
|
|
547
|
-
"text": "Render customizados da grade."
|
|
548
|
-
}
|
|
549
472
|
}
|
|
550
473
|
};
|
|
551
474
|
}
|
|
@@ -678,58 +601,6 @@ export class SnkDetailView {
|
|
|
678
601
|
"text": "",
|
|
679
602
|
"tags": []
|
|
680
603
|
}
|
|
681
|
-
},
|
|
682
|
-
"addCustomEditor": {
|
|
683
|
-
"complexType": {
|
|
684
|
-
"signature": "(fieldName: string, customEditor: ICustomEditor) => Promise<void>",
|
|
685
|
-
"parameters": [{
|
|
686
|
-
"tags": [],
|
|
687
|
-
"text": ""
|
|
688
|
-
}, {
|
|
689
|
-
"tags": [],
|
|
690
|
-
"text": ""
|
|
691
|
-
}],
|
|
692
|
-
"references": {
|
|
693
|
-
"Promise": {
|
|
694
|
-
"location": "global"
|
|
695
|
-
},
|
|
696
|
-
"ICustomEditor": {
|
|
697
|
-
"location": "import",
|
|
698
|
-
"path": "@sankhyalabs/ezui/dist/types/utils"
|
|
699
|
-
}
|
|
700
|
-
},
|
|
701
|
-
"return": "Promise<void>"
|
|
702
|
-
},
|
|
703
|
-
"docs": {
|
|
704
|
-
"text": "Registra um editor customizado para campos da grade e formul\u00E1rio.",
|
|
705
|
-
"tags": []
|
|
706
|
-
}
|
|
707
|
-
},
|
|
708
|
-
"addGridCustomRender": {
|
|
709
|
-
"complexType": {
|
|
710
|
-
"signature": "(fieldName: string, customRender: ICustomRender) => Promise<void>",
|
|
711
|
-
"parameters": [{
|
|
712
|
-
"tags": [],
|
|
713
|
-
"text": ""
|
|
714
|
-
}, {
|
|
715
|
-
"tags": [],
|
|
716
|
-
"text": ""
|
|
717
|
-
}],
|
|
718
|
-
"references": {
|
|
719
|
-
"Promise": {
|
|
720
|
-
"location": "global"
|
|
721
|
-
},
|
|
722
|
-
"ICustomRender": {
|
|
723
|
-
"location": "import",
|
|
724
|
-
"path": "@sankhyalabs/ezui/dist/types/utils"
|
|
725
|
-
}
|
|
726
|
-
},
|
|
727
|
-
"return": "Promise<void>"
|
|
728
|
-
},
|
|
729
|
-
"docs": {
|
|
730
|
-
"text": "Registra um render customizado para colunas da grid.",
|
|
731
|
-
"tags": []
|
|
732
|
-
}
|
|
733
604
|
}
|
|
734
605
|
};
|
|
735
606
|
}
|
|
@@ -740,12 +611,6 @@ export class SnkDetailView {
|
|
|
740
611
|
}, {
|
|
741
612
|
"propName": "dataState",
|
|
742
613
|
"methodName": "observerDataState"
|
|
743
|
-
}, {
|
|
744
|
-
"propName": "customEditors",
|
|
745
|
-
"methodName": "observerPropsCustomEditor"
|
|
746
|
-
}, {
|
|
747
|
-
"propName": "customRenders",
|
|
748
|
-
"methodName": "observeCustomRenders"
|
|
749
614
|
}];
|
|
750
615
|
}
|
|
751
616
|
static get listeners() {
|
|
@@ -3,8 +3,6 @@ import { Host, h } from "@stencil/core";
|
|
|
3
3
|
import { DataBinder } from "@sankhyalabs/ezui/dist/collection/utils/form";
|
|
4
4
|
export class SnkFormView {
|
|
5
5
|
constructor() {
|
|
6
|
-
this._customEditors = new Map();
|
|
7
|
-
this._fieldProps = new Map();
|
|
8
6
|
this.levelPath = undefined;
|
|
9
7
|
this.label = undefined;
|
|
10
8
|
this.name = undefined;
|
|
@@ -18,47 +16,12 @@ export class SnkFormView {
|
|
|
18
16
|
this.canFix = true;
|
|
19
17
|
this.recordsValidator = undefined;
|
|
20
18
|
this.fieldToFocus = undefined;
|
|
21
|
-
this.customEditors = undefined;
|
|
22
|
-
this.fieldsProps = undefined;
|
|
23
19
|
}
|
|
24
20
|
async showUp() {
|
|
25
21
|
if (this._formView) {
|
|
26
22
|
this._formView.showUp();
|
|
27
23
|
}
|
|
28
24
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Registra um editor customizado para campos da grade e formulário
|
|
31
|
-
*/
|
|
32
|
-
async addCustomEditor(fieldName, customEditor, detailContext) {
|
|
33
|
-
if (this._formView) {
|
|
34
|
-
this._formView.addCustomEditor(fieldName, customEditor, detailContext);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const newCustomEditors = new Map(this._customEditors);
|
|
38
|
-
newCustomEditors.set(fieldName, { customEditor, detailContext });
|
|
39
|
-
this._customEditors = newCustomEditors;
|
|
40
|
-
}
|
|
41
|
-
observePropsCustomEditor(newValue) {
|
|
42
|
-
for (const fieldName in newValue) {
|
|
43
|
-
this.addCustomEditor(fieldName, newValue[fieldName]);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Altera/adiciona uma propriedade nos metadados do campo.
|
|
48
|
-
*/
|
|
49
|
-
async setFieldProp(fieldName, propName, value) {
|
|
50
|
-
const props = this._fieldProps.get(fieldName) || [];
|
|
51
|
-
this._fieldProps.set(fieldName, [...props, { propName, value }]);
|
|
52
|
-
}
|
|
53
|
-
async observeFieldsProps(newValue) {
|
|
54
|
-
for (const field in newValue) {
|
|
55
|
-
const fieldProps = newValue[field];
|
|
56
|
-
const propNames = Object.keys(fieldProps);
|
|
57
|
-
for (const propName of propNames) {
|
|
58
|
-
await this.setFieldProp(field, propName, fieldProps[propName]);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
25
|
changeFix() {
|
|
63
26
|
this.fixed = !this.fixed;
|
|
64
27
|
this.emitEvent("fixed");
|
|
@@ -117,13 +80,7 @@ export class SnkFormView {
|
|
|
117
80
|
this._dataBinder.onDisconnectedCallback();
|
|
118
81
|
}
|
|
119
82
|
}
|
|
120
|
-
componentDidLoad() {
|
|
121
|
-
this.observePropsCustomEditor(this.customEditors);
|
|
122
|
-
this.observeFieldsProps(this.fieldsProps);
|
|
123
|
-
}
|
|
124
83
|
componentDidRender() {
|
|
125
|
-
this.setCustomEditors();
|
|
126
|
-
this.setFieldProps();
|
|
127
84
|
if (this.fieldToFocus == undefined) {
|
|
128
85
|
return;
|
|
129
86
|
}
|
|
@@ -135,26 +92,6 @@ export class SnkFormView {
|
|
|
135
92
|
this.snkRequestClearFieldToFocus.emit();
|
|
136
93
|
});
|
|
137
94
|
}
|
|
138
|
-
setCustomEditors() {
|
|
139
|
-
if (!this._formView) {
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
for (const [fieldName, customEditorProps] of this._customEditors) {
|
|
143
|
-
this._formView.addCustomEditor(fieldName, customEditorProps.customEditor, customEditorProps.detailContext);
|
|
144
|
-
this._customEditors.delete(fieldName);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
setFieldProps() {
|
|
148
|
-
if (!this._formView) {
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
for (const [fieldName, propsToChange] of this._fieldProps) {
|
|
152
|
-
propsToChange.forEach(prop => {
|
|
153
|
-
this._formView.setFieldProp(fieldName, prop.propName, prop.value);
|
|
154
|
-
this._fieldProps.delete(fieldName);
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
95
|
render() {
|
|
159
96
|
return (h(Host, { class: "ez-box__container" }, h("div", { class: "summary-header ez-flex ez-size-width--full" }, h("div", { class: "ez-flex ez-text ez-title--primary ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9" }, this.levelPath ? h("span", { class: "level-path" }, this.levelPath + " /") : undefined, this.label), h("div", { class: "ez-flex ez-flex--justify-end ez-col--sd-3" }, this.canFix &&
|
|
160
97
|
h("ez-button", { class: "ez-padding-left--medium", mode: "icon", size: "small", iconName: this.fixed ? "un-pin" : "push-pin", "data-element-id": ElementIDUtils.getInternalIDInfo("toggleFixed_ezFormCard"), onClick: () => this.changeFix(), title: this.fixed ? "Desafixar" : "Fixar" }), this.canExpand &&
|
|
@@ -424,41 +361,6 @@ export class SnkFormView {
|
|
|
424
361
|
},
|
|
425
362
|
"attribute": "field-to-focus",
|
|
426
363
|
"reflect": false
|
|
427
|
-
},
|
|
428
|
-
"customEditors": {
|
|
429
|
-
"type": "unknown",
|
|
430
|
-
"mutable": false,
|
|
431
|
-
"complexType": {
|
|
432
|
-
"original": "PropsCustomEditor",
|
|
433
|
-
"resolved": "PropsCustomEditor",
|
|
434
|
-
"references": {
|
|
435
|
-
"PropsCustomEditor": {
|
|
436
|
-
"location": "import",
|
|
437
|
-
"path": "../interfaces/PropsCustomEditor"
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
},
|
|
441
|
-
"required": false,
|
|
442
|
-
"optional": false,
|
|
443
|
-
"docs": {
|
|
444
|
-
"tags": [],
|
|
445
|
-
"text": "Registra um editor customizado para campos da grade e formul\u00E1rio."
|
|
446
|
-
}
|
|
447
|
-
},
|
|
448
|
-
"fieldsProps": {
|
|
449
|
-
"type": "unknown",
|
|
450
|
-
"mutable": false,
|
|
451
|
-
"complexType": {
|
|
452
|
-
"original": "object",
|
|
453
|
-
"resolved": "object",
|
|
454
|
-
"references": {}
|
|
455
|
-
},
|
|
456
|
-
"required": false,
|
|
457
|
-
"optional": false,
|
|
458
|
-
"docs": {
|
|
459
|
-
"tags": [],
|
|
460
|
-
"text": "Lista de propriedades que ser\u00E3o alteradas/adicionadas por coluna."
|
|
461
|
-
}
|
|
462
364
|
}
|
|
463
365
|
};
|
|
464
366
|
}
|
|
@@ -539,70 +441,7 @@ export class SnkFormView {
|
|
|
539
441
|
"text": "",
|
|
540
442
|
"tags": []
|
|
541
443
|
}
|
|
542
|
-
},
|
|
543
|
-
"addCustomEditor": {
|
|
544
|
-
"complexType": {
|
|
545
|
-
"signature": "(fieldName: string, customEditor: ICustomEditor, detailContext?: string) => Promise<void>",
|
|
546
|
-
"parameters": [{
|
|
547
|
-
"tags": [],
|
|
548
|
-
"text": ""
|
|
549
|
-
}, {
|
|
550
|
-
"tags": [],
|
|
551
|
-
"text": ""
|
|
552
|
-
}, {
|
|
553
|
-
"tags": [],
|
|
554
|
-
"text": ""
|
|
555
|
-
}],
|
|
556
|
-
"references": {
|
|
557
|
-
"Promise": {
|
|
558
|
-
"location": "global"
|
|
559
|
-
},
|
|
560
|
-
"ICustomEditor": {
|
|
561
|
-
"location": "import",
|
|
562
|
-
"path": "@sankhyalabs/ezui/dist/types/utils/customEditor/interfaces/ICustomEditor"
|
|
563
|
-
}
|
|
564
|
-
},
|
|
565
|
-
"return": "Promise<void>"
|
|
566
|
-
},
|
|
567
|
-
"docs": {
|
|
568
|
-
"text": "Registra um editor customizado para campos da grade e formul\u00E1rio",
|
|
569
|
-
"tags": []
|
|
570
|
-
}
|
|
571
|
-
},
|
|
572
|
-
"setFieldProp": {
|
|
573
|
-
"complexType": {
|
|
574
|
-
"signature": "(fieldName: string, propName: string, value: any) => Promise<void>",
|
|
575
|
-
"parameters": [{
|
|
576
|
-
"tags": [],
|
|
577
|
-
"text": ""
|
|
578
|
-
}, {
|
|
579
|
-
"tags": [],
|
|
580
|
-
"text": ""
|
|
581
|
-
}, {
|
|
582
|
-
"tags": [],
|
|
583
|
-
"text": ""
|
|
584
|
-
}],
|
|
585
|
-
"references": {
|
|
586
|
-
"Promise": {
|
|
587
|
-
"location": "global"
|
|
588
|
-
}
|
|
589
|
-
},
|
|
590
|
-
"return": "Promise<void>"
|
|
591
|
-
},
|
|
592
|
-
"docs": {
|
|
593
|
-
"text": "Altera/adiciona uma propriedade nos metadados do campo.",
|
|
594
|
-
"tags": []
|
|
595
|
-
}
|
|
596
444
|
}
|
|
597
445
|
};
|
|
598
446
|
}
|
|
599
|
-
static get watchers() {
|
|
600
|
-
return [{
|
|
601
|
-
"propName": "customEditors",
|
|
602
|
-
"methodName": "observePropsCustomEditor"
|
|
603
|
-
}, {
|
|
604
|
-
"propName": "fieldsProps",
|
|
605
|
-
"methodName": "observeFieldsProps"
|
|
606
|
-
}];
|
|
607
|
-
}
|
|
608
447
|
}
|
|
@@ -33,9 +33,6 @@ export class SnkGuidesViewer {
|
|
|
33
33
|
this._formEditorConfigManager = undefined;
|
|
34
34
|
this._formEditorDataUnit = undefined;
|
|
35
35
|
this._fieldToGetFocus = undefined;
|
|
36
|
-
this._customEditors = undefined;
|
|
37
|
-
this._customRenders = undefined;
|
|
38
|
-
this._fieldsProps = {};
|
|
39
36
|
}
|
|
40
37
|
observeDataUnit() {
|
|
41
38
|
this.loadGuides(true);
|
|
@@ -66,28 +63,6 @@ export class SnkGuidesViewer {
|
|
|
66
63
|
async findField() {
|
|
67
64
|
await openFieldSearch(this._moreOptions, this._fieldSearch);
|
|
68
65
|
}
|
|
69
|
-
/**
|
|
70
|
-
* Registra um editor customizado para campos da grade e formulário
|
|
71
|
-
*/
|
|
72
|
-
async addCustomEditor(fieldName, customEditor) {
|
|
73
|
-
this._customEditors = Object.assign(Object.assign({}, this._customEditors), { [fieldName]: customEditor });
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Registra um render customizado para colunas da grid.
|
|
77
|
-
*/
|
|
78
|
-
async addGridCustomRender(fieldName, customRender) {
|
|
79
|
-
this._customRenders = Object.assign(Object.assign({}, this._customRenders), { [fieldName]: customRender });
|
|
80
|
-
}
|
|
81
|
-
;
|
|
82
|
-
/**
|
|
83
|
-
* Altera/adiciona uma propriedade nos metadados do campo.
|
|
84
|
-
*/
|
|
85
|
-
async setFieldProp(fieldName, propName, value) {
|
|
86
|
-
const newFieldsProps = {
|
|
87
|
-
[fieldName]: Object.assign(Object.assign({}, this._fieldsProps[fieldName]), { [propName]: value })
|
|
88
|
-
};
|
|
89
|
-
this._fieldsProps = Object.assign(Object.assign({}, this._fieldsProps), newFieldsProps);
|
|
90
|
-
}
|
|
91
66
|
/**
|
|
92
67
|
* Atribui o foco para o componente.
|
|
93
68
|
*/
|
|
@@ -236,7 +211,7 @@ export class SnkGuidesViewer {
|
|
|
236
211
|
if (sheet == undefined) {
|
|
237
212
|
return;
|
|
238
213
|
}
|
|
239
|
-
return h("snk-form-view", { levelPath: params.levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_b = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.summary) === null || _b === void 0 ? void 0 : _b.get(formName), fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); }
|
|
214
|
+
return h("snk-form-view", { levelPath: params.levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_b = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.summary) === null || _b === void 0 ? void 0 : _b.get(formName), fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); } });
|
|
240
215
|
})));
|
|
241
216
|
}
|
|
242
217
|
wrapDetail(levels, content) {
|
|
@@ -278,14 +253,14 @@ export class SnkGuidesViewer {
|
|
|
278
253
|
else {
|
|
279
254
|
detailBranch = this.selectedGuide;
|
|
280
255
|
}
|
|
281
|
-
content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId
|
|
256
|
+
content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId }));
|
|
282
257
|
}
|
|
283
258
|
else {
|
|
284
259
|
const cardId = this.selectedGuide.id;
|
|
285
260
|
const sheet = this._masterFormMetadata.getSheet(cardId);
|
|
286
261
|
if (sheet) {
|
|
287
262
|
const cardConfig = (_c = (_b = this.masterFormConfig) === null || _b === void 0 ? void 0 : _b.cardsState) === null || _c === void 0 ? void 0 : _c.get(cardId);
|
|
288
|
-
content = h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: guideId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler()
|
|
263
|
+
content = h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: guideId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler() }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar());
|
|
289
264
|
}
|
|
290
265
|
}
|
|
291
266
|
return content;
|
|
@@ -488,9 +463,7 @@ export class SnkGuidesViewer {
|
|
|
488
463
|
dataUnit: this.dataUnit,
|
|
489
464
|
recordsValidator: this.recordsValidator,
|
|
490
465
|
fieldToFocus: this._fieldToGetFocus,
|
|
491
|
-
onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this)
|
|
492
|
-
propsCustomEditor: this._customEditors,
|
|
493
|
-
fieldsProps: this._fieldsProps
|
|
466
|
+
onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this)
|
|
494
467
|
}), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
|
|
495
468
|
}
|
|
496
469
|
static get is() { return "snk-guides-viewer"; }
|
|
@@ -804,10 +777,7 @@ export class SnkGuidesViewer {
|
|
|
804
777
|
"_guides": {},
|
|
805
778
|
"_formEditorConfigManager": {},
|
|
806
779
|
"_formEditorDataUnit": {},
|
|
807
|
-
"_fieldToGetFocus": {}
|
|
808
|
-
"_customEditors": {},
|
|
809
|
-
"_customRenders": {},
|
|
810
|
-
"_fieldsProps": {}
|
|
780
|
+
"_fieldToGetFocus": {}
|
|
811
781
|
};
|
|
812
782
|
}
|
|
813
783
|
static get events() {
|
|
@@ -908,83 +878,6 @@ export class SnkGuidesViewer {
|
|
|
908
878
|
"tags": []
|
|
909
879
|
}
|
|
910
880
|
},
|
|
911
|
-
"addCustomEditor": {
|
|
912
|
-
"complexType": {
|
|
913
|
-
"signature": "(fieldName: string, customEditor: ICustomEditor) => Promise<void>",
|
|
914
|
-
"parameters": [{
|
|
915
|
-
"tags": [],
|
|
916
|
-
"text": ""
|
|
917
|
-
}, {
|
|
918
|
-
"tags": [],
|
|
919
|
-
"text": ""
|
|
920
|
-
}],
|
|
921
|
-
"references": {
|
|
922
|
-
"Promise": {
|
|
923
|
-
"location": "global"
|
|
924
|
-
},
|
|
925
|
-
"ICustomEditor": {
|
|
926
|
-
"location": "import",
|
|
927
|
-
"path": "@sankhyalabs/ezui/dist/types/utils"
|
|
928
|
-
}
|
|
929
|
-
},
|
|
930
|
-
"return": "Promise<void>"
|
|
931
|
-
},
|
|
932
|
-
"docs": {
|
|
933
|
-
"text": "Registra um editor customizado para campos da grade e formul\u00E1rio",
|
|
934
|
-
"tags": []
|
|
935
|
-
}
|
|
936
|
-
},
|
|
937
|
-
"addGridCustomRender": {
|
|
938
|
-
"complexType": {
|
|
939
|
-
"signature": "(fieldName: string, customRender: ICustomRender) => Promise<void>",
|
|
940
|
-
"parameters": [{
|
|
941
|
-
"tags": [],
|
|
942
|
-
"text": ""
|
|
943
|
-
}, {
|
|
944
|
-
"tags": [],
|
|
945
|
-
"text": ""
|
|
946
|
-
}],
|
|
947
|
-
"references": {
|
|
948
|
-
"Promise": {
|
|
949
|
-
"location": "global"
|
|
950
|
-
},
|
|
951
|
-
"ICustomRender": {
|
|
952
|
-
"location": "import",
|
|
953
|
-
"path": "@sankhyalabs/ezui/dist/types/utils"
|
|
954
|
-
}
|
|
955
|
-
},
|
|
956
|
-
"return": "Promise<void>"
|
|
957
|
-
},
|
|
958
|
-
"docs": {
|
|
959
|
-
"text": "Registra um render customizado para colunas da grid.",
|
|
960
|
-
"tags": []
|
|
961
|
-
}
|
|
962
|
-
},
|
|
963
|
-
"setFieldProp": {
|
|
964
|
-
"complexType": {
|
|
965
|
-
"signature": "(fieldName: string, propName: string, value: any) => Promise<void>",
|
|
966
|
-
"parameters": [{
|
|
967
|
-
"tags": [],
|
|
968
|
-
"text": ""
|
|
969
|
-
}, {
|
|
970
|
-
"tags": [],
|
|
971
|
-
"text": ""
|
|
972
|
-
}, {
|
|
973
|
-
"tags": [],
|
|
974
|
-
"text": ""
|
|
975
|
-
}],
|
|
976
|
-
"references": {
|
|
977
|
-
"Promise": {
|
|
978
|
-
"location": "global"
|
|
979
|
-
}
|
|
980
|
-
},
|
|
981
|
-
"return": "Promise<void>"
|
|
982
|
-
},
|
|
983
|
-
"docs": {
|
|
984
|
-
"text": "Altera/adiciona uma propriedade nos metadados do campo.",
|
|
985
|
-
"tags": []
|
|
986
|
-
}
|
|
987
|
-
},
|
|
988
881
|
"setFocus": {
|
|
989
882
|
"complexType": {
|
|
990
883
|
"signature": "() => Promise<void>",
|
|
@@ -4,7 +4,7 @@ export const OptionsStep = ({ getMessage, changeInfo, data }) => {
|
|
|
4
4
|
const selectionCount = (data === null || data === void 0 ? void 0 : data.selectedRows) || 0;
|
|
5
5
|
const formatOptions = [
|
|
6
6
|
{ label: getMessage("snkExporter.emailSenderOptStep_formatPDF"), value: "pdf" },
|
|
7
|
-
{ label: getMessage("snkExporter.
|
|
7
|
+
{ label: getMessage("snkExporter.emailSenderOptStep_formatXLS"), value: "xls" }
|
|
8
8
|
];
|
|
9
9
|
const typeOptions = [
|
|
10
10
|
{ label: getMessage("snkExporter.emailSenderOptStep_allData"), value: "all" },
|
|
@@ -1,54 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { DataType } from '@sankhyalabs/core';
|
|
3
|
-
export class CommonsExporter {
|
|
4
|
-
constructor(dataUnit, grid) {
|
|
5
|
-
this.dataUnit = dataUnit;
|
|
6
|
-
this.grid = grid;
|
|
7
|
-
}
|
|
8
|
-
async getColumnsMetadata() {
|
|
9
|
-
var _a;
|
|
10
|
-
this.columnsState = await ((_a = this.grid) === null || _a === void 0 ? void 0 : _a.getColumnsState()) || [];
|
|
11
|
-
return await this.buildColumnsMetadata(this.columnsState);
|
|
12
|
-
}
|
|
13
|
-
getColumnsState() {
|
|
14
|
-
return this.columnsState;
|
|
15
|
-
}
|
|
16
|
-
async buildColumnsMetadata(gridColumns) {
|
|
17
|
-
var _a, _b;
|
|
18
|
-
const columnsMetadata = [];
|
|
19
|
-
for (const column of gridColumns) {
|
|
20
|
-
/**
|
|
21
|
-
* TODO: Analisar e criar uma melhor forma de tratar essa validação do "RECDESP".
|
|
22
|
-
*/
|
|
23
|
-
if (column.hidden && column.name !== "RECDESP") {
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
const fieldData = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(column.name);
|
|
27
|
-
const customFormatter = await this.grid.getCustomValueFormatter(column.name);
|
|
28
|
-
const columnData = {
|
|
29
|
-
label: column.label,
|
|
30
|
-
id: column.name,
|
|
31
|
-
width: column.width,
|
|
32
|
-
type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
|
|
33
|
-
userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface,
|
|
34
|
-
customFormatter
|
|
35
|
-
};
|
|
36
|
-
columnsMetadata.push(columnData);
|
|
37
|
-
if (((_b = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONFIELD) != undefined) {
|
|
38
|
-
const mergedFrom = fieldData.properties.mergedFrom;
|
|
39
|
-
const descriptionField = `${fieldData.properties.ENTITYNAME}.${fieldData.properties.DESCRIPTIONFIELD}`;
|
|
40
|
-
const descriptionColumn = {
|
|
41
|
-
label: fieldData.properties.DESCRIPTIONENTITY,
|
|
42
|
-
id: `${mergedFrom ? (mergedFrom + ".") : ""}${descriptionField}`,
|
|
43
|
-
width: column.width,
|
|
44
|
-
type: DataType.TEXT,
|
|
45
|
-
userInterface: UserInterface.LONGTEXT,
|
|
46
|
-
descriptionFrom: fieldData.name
|
|
47
|
-
};
|
|
48
|
-
columnsMetadata.push(descriptionColumn);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
;
|
|
52
|
-
return columnsMetadata || [];
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
export {};
|