@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-65214.0 → 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-e49214c6.js → ConfigStorage-0a690675.js} +0 -1
- package/dist/cjs/{SnkFormConfigManager-beebf47a.js → SnkFormConfigManager-d6d5db6d.js} +7 -8
- package/dist/cjs/{SnkMessageBuilder-cceebbae.js → SnkMessageBuilder-96b0f549.js} +13 -9
- package/dist/cjs/{IExporterProvider-10b7fed5.js → SnkMultiSelectionListDataSource-f79d220c.js} +4 -94
- package/dist/cjs/{index-1dfc7a6e.js → index-0922807b.js} +0 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{dataunit-fetcher-d4873076.js → pesquisa-fetcher-cba1b3d0.js} +180 -87
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +3 -5
- package/dist/cjs/snk-application.cjs.entry.js +12 -35
- package/dist/cjs/snk-attach.cjs.entry.js +46 -71
- package/dist/cjs/snk-crud.cjs.entry.js +10 -101
- package/dist/cjs/snk-data-exporter.cjs.entry.js +85 -315
- 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 -50
- package/dist/cjs/snk-filter-bar.cjs.entry.js +12 -7
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +0 -67
- package/dist/cjs/snk-form.cjs.entry.js +7 -52
- package/dist/cjs/snk-grid.cjs.entry.js +110 -167
- package/dist/cjs/{snk-guides-viewer-aafc3073.js → snk-guides-viewer-bfcad2d6.js} +10 -43
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -9
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +40 -268
- 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 -305
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -136
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +0 -161
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +7 -134
- 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 +0 -62
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +219 -540
- 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 +6 -7
- package/dist/collection/components/snk-form-config/snk-form-config.js +1 -1
- 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 +20 -406
- 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/configs/ConfigStorage.js +0 -1
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +3 -7
- 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 +1 -2
- package/dist/components/ConfigStorage.js +0 -1
- package/dist/components/SnkFormConfigManager.js +6 -7
- 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 -110
- package/dist/components/snk-data-exporter2.js +85 -309
- package/dist/components/snk-data-unit2.js +217 -487
- package/dist/components/snk-detail-view2.js +14 -96
- package/dist/components/snk-expression-item2.js +1 -1
- package/dist/components/snk-filter-bar2.js +11 -7
- package/dist/components/snk-form-config2.js +1 -1
- 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 +25 -263
- package/dist/components/snk-taskbar2.js +5 -6
- package/dist/esm/{ConfigStorage-e476378d.js → ConfigStorage-8c2ddac8.js} +0 -1
- package/dist/esm/{SnkFormConfigManager-298cd647.js → SnkFormConfigManager-c01b9d9d.js} +7 -8
- package/dist/esm/{SnkMessageBuilder-ae87b754.js → SnkMessageBuilder-72423074.js} +13 -9
- package/dist/esm/{IExporterProvider-d597f27d.js → SnkMultiSelectionListDataSource-a4805051.js} +5 -93
- package/dist/esm/{index-3aa4977a.js → index-0ece87a6.js} +1 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-3d2ec959.js → pesquisa-fetcher-34a8b8be.js} +181 -83
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_4.entry.js +3 -5
- package/dist/esm/snk-application.entry.js +11 -34
- package/dist/esm/snk-attach.entry.js +41 -66
- package/dist/esm/snk-crud.entry.js +10 -101
- package/dist/esm/snk-data-exporter.entry.js +86 -316
- 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 -50
- package/dist/esm/snk-filter-bar.entry.js +12 -7
- package/dist/esm/snk-filter-modal-item.entry.js +1 -1
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +0 -67
- package/dist/esm/snk-form.entry.js +7 -52
- package/dist/esm/snk-grid.entry.js +108 -165
- package/dist/esm/{snk-guides-viewer-62124f3d.js → snk-guides-viewer-edeac29f.js} +10 -43
- package/dist/esm/snk-guides-viewer.entry.js +7 -9
- package/dist/esm/snk-personalized-filter.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +28 -256
- 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-176c3491.entry.js +1 -0
- package/dist/sankhyablocks/p-37e5d563.js +65 -0
- package/dist/sankhyablocks/p-38289a55.js +1 -0
- package/dist/sankhyablocks/{p-9dfda04a.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-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-3287a6cc.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-bd008859.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-f03e4199.entry.js +1 -0
- 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 -45
- 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 -24
- 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 +3 -67
- 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-form-config/SnkFormConfigManager.d.ts +2 -2
- 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 -62
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
- package/dist/types/components.d.ts +4 -261
- 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-a1d0353f.js +0 -166
- package/dist/cjs/snk-data-unit-f0221097.js +0 -690
- 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-a87445a0.js +0 -164
- package/dist/esm/snk-data-unit-1ef94aef.js +0 -688
- package/dist/sankhyablocks/p-091ce761.js +0 -60
- package/dist/sankhyablocks/p-0c68f40f.entry.js +0 -1
- package/dist/sankhyablocks/p-162b9a59.entry.js +0 -11
- package/dist/sankhyablocks/p-1db45d26.entry.js +0 -1
- package/dist/sankhyablocks/p-25f1fc39.js +0 -6
- package/dist/sankhyablocks/p-2e9c764c.entry.js +0 -1
- package/dist/sankhyablocks/p-30cf616e.js +0 -1
- package/dist/sankhyablocks/p-421bec84.entry.js +0 -1
- package/dist/sankhyablocks/p-42f7b05d.entry.js +0 -1
- package/dist/sankhyablocks/p-51999ab5.entry.js +0 -1
- package/dist/sankhyablocks/p-52a6a293.entry.js +0 -1
- package/dist/sankhyablocks/p-5f016aed.js +0 -1
- package/dist/sankhyablocks/p-62f34e6f.entry.js +0 -1
- package/dist/sankhyablocks/p-684a2590.entry.js +0 -1
- package/dist/sankhyablocks/p-70001ac1.js +0 -1
- package/dist/sankhyablocks/p-74c665d5.entry.js +0 -1
- package/dist/sankhyablocks/p-76a65660.js +0 -1
- package/dist/sankhyablocks/p-7c4aabe2.js +0 -1
- package/dist/sankhyablocks/p-8c1ff936.entry.js +0 -1
- package/dist/sankhyablocks/p-939e15d3.entry.js +0 -1
- package/dist/sankhyablocks/p-9863d682.js +0 -1
- package/dist/sankhyablocks/p-c273d6ee.js +0 -1
- package/dist/sankhyablocks/p-d65d98ed.entry.js +0 -1
- package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
- 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) {
|
|
@@ -158,13 +128,14 @@ export class SnkDetailView {
|
|
|
158
128
|
return guideId.replace(SnkDetailView.REGEX_FORM_ID, "");
|
|
159
129
|
}
|
|
160
130
|
loadMetadata() {
|
|
131
|
+
var _a;
|
|
161
132
|
if (!this.dataUnit) {
|
|
162
133
|
return;
|
|
163
134
|
}
|
|
164
135
|
if (!this.formConfigManager.isLoaded) {
|
|
165
136
|
return;
|
|
166
137
|
}
|
|
167
|
-
const formConfig = this.formConfigManager.getConfig(this.dataUnit);
|
|
138
|
+
const formConfig = this.formConfigManager.getConfig((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode, this.dataUnit);
|
|
168
139
|
//this._cardsState = formConfig?.cardsState;
|
|
169
140
|
this._formMetadata = buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
|
|
170
141
|
}
|
|
@@ -228,10 +199,6 @@ export class SnkDetailView {
|
|
|
228
199
|
this.messagesBuilder = new SnkMessageBuilder(this.entityName);
|
|
229
200
|
}
|
|
230
201
|
}
|
|
231
|
-
async componentDidLoad() {
|
|
232
|
-
await this.observerPropsCustomEditor(this.customEditors);
|
|
233
|
-
await this.observeCustomRenders(this.customRenders);
|
|
234
|
-
}
|
|
235
202
|
async dataUnitActionHandler(action) {
|
|
236
203
|
if (action.type === Action.FIELD_INVALIDATED) {
|
|
237
204
|
this.addErrorBadgeToBranchGuide();
|
|
@@ -241,9 +208,6 @@ export class SnkDetailView {
|
|
|
241
208
|
this.branchGuide = Object.assign(Object.assign({}, this.branchGuide), { badge: 'error' });
|
|
242
209
|
this.snkDetailGuidesChange.emit(new GuideBuilder(this.branchGuide, this._formMetadata, this.dataUnit));
|
|
243
210
|
}
|
|
244
|
-
normalizeBranchGuideId(id) {
|
|
245
|
-
return id === null || id === void 0 ? void 0 : id.replace(/child\[(.*?)\]/g, '$1').replace(/::/g, '>');
|
|
246
|
-
}
|
|
247
211
|
render() {
|
|
248
212
|
this.updateLabel();
|
|
249
213
|
//const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
|
|
@@ -505,46 +469,6 @@ export class SnkDetailView {
|
|
|
505
469
|
},
|
|
506
470
|
"attribute": "taskbar-custom-container-id",
|
|
507
471
|
"reflect": false
|
|
508
|
-
},
|
|
509
|
-
"customEditors": {
|
|
510
|
-
"type": "unknown",
|
|
511
|
-
"mutable": false,
|
|
512
|
-
"complexType": {
|
|
513
|
-
"original": "PropsCustomEditor",
|
|
514
|
-
"resolved": "PropsCustomEditor",
|
|
515
|
-
"references": {
|
|
516
|
-
"PropsCustomEditor": {
|
|
517
|
-
"location": "import",
|
|
518
|
-
"path": "../../interfaces/PropsCustomEditor"
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
},
|
|
522
|
-
"required": false,
|
|
523
|
-
"optional": false,
|
|
524
|
-
"docs": {
|
|
525
|
-
"tags": [],
|
|
526
|
-
"text": "Registra um editor customizado para campos da grade e formul\u00E1rio."
|
|
527
|
-
}
|
|
528
|
-
},
|
|
529
|
-
"customRenders": {
|
|
530
|
-
"type": "unknown",
|
|
531
|
-
"mutable": false,
|
|
532
|
-
"complexType": {
|
|
533
|
-
"original": "PropsCustomRender",
|
|
534
|
-
"resolved": "PropsCustomRender",
|
|
535
|
-
"references": {
|
|
536
|
-
"PropsCustomRender": {
|
|
537
|
-
"location": "import",
|
|
538
|
-
"path": "../../interfaces/PropsCustomRender"
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
},
|
|
542
|
-
"required": false,
|
|
543
|
-
"optional": false,
|
|
544
|
-
"docs": {
|
|
545
|
-
"tags": [],
|
|
546
|
-
"text": "Render customizados da grade."
|
|
547
|
-
}
|
|
548
472
|
}
|
|
549
473
|
};
|
|
550
474
|
}
|
|
@@ -677,58 +601,6 @@ export class SnkDetailView {
|
|
|
677
601
|
"text": "",
|
|
678
602
|
"tags": []
|
|
679
603
|
}
|
|
680
|
-
},
|
|
681
|
-
"addCustomEditor": {
|
|
682
|
-
"complexType": {
|
|
683
|
-
"signature": "(fieldName: string, customEditor: ICustomEditor) => Promise<void>",
|
|
684
|
-
"parameters": [{
|
|
685
|
-
"tags": [],
|
|
686
|
-
"text": ""
|
|
687
|
-
}, {
|
|
688
|
-
"tags": [],
|
|
689
|
-
"text": ""
|
|
690
|
-
}],
|
|
691
|
-
"references": {
|
|
692
|
-
"Promise": {
|
|
693
|
-
"location": "global"
|
|
694
|
-
},
|
|
695
|
-
"ICustomEditor": {
|
|
696
|
-
"location": "import",
|
|
697
|
-
"path": "@sankhyalabs/ezui/dist/types/utils"
|
|
698
|
-
}
|
|
699
|
-
},
|
|
700
|
-
"return": "Promise<void>"
|
|
701
|
-
},
|
|
702
|
-
"docs": {
|
|
703
|
-
"text": "Registra um editor customizado para campos da grade e formul\u00E1rio.",
|
|
704
|
-
"tags": []
|
|
705
|
-
}
|
|
706
|
-
},
|
|
707
|
-
"addGridCustomRender": {
|
|
708
|
-
"complexType": {
|
|
709
|
-
"signature": "(fieldName: string, customRender: ICustomRender) => Promise<void>",
|
|
710
|
-
"parameters": [{
|
|
711
|
-
"tags": [],
|
|
712
|
-
"text": ""
|
|
713
|
-
}, {
|
|
714
|
-
"tags": [],
|
|
715
|
-
"text": ""
|
|
716
|
-
}],
|
|
717
|
-
"references": {
|
|
718
|
-
"Promise": {
|
|
719
|
-
"location": "global"
|
|
720
|
-
},
|
|
721
|
-
"ICustomRender": {
|
|
722
|
-
"location": "import",
|
|
723
|
-
"path": "@sankhyalabs/ezui/dist/types/utils"
|
|
724
|
-
}
|
|
725
|
-
},
|
|
726
|
-
"return": "Promise<void>"
|
|
727
|
-
},
|
|
728
|
-
"docs": {
|
|
729
|
-
"text": "Registra um render customizado para colunas da grid.",
|
|
730
|
-
"tags": []
|
|
731
|
-
}
|
|
732
604
|
}
|
|
733
605
|
};
|
|
734
606
|
}
|
|
@@ -739,12 +611,6 @@ export class SnkDetailView {
|
|
|
739
611
|
}, {
|
|
740
612
|
"propName": "dataState",
|
|
741
613
|
"methodName": "observerDataState"
|
|
742
|
-
}, {
|
|
743
|
-
"propName": "customEditors",
|
|
744
|
-
"methodName": "observerPropsCustomEditor"
|
|
745
|
-
}, {
|
|
746
|
-
"propName": "customRenders",
|
|
747
|
-
"methodName": "observeCustomRenders"
|
|
748
614
|
}];
|
|
749
615
|
}
|
|
750
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
|
}
|
|
@@ -27,16 +27,12 @@ export class SnkGuidesViewer {
|
|
|
27
27
|
this.resourceID = undefined;
|
|
28
28
|
this.detailTaskbarCustomContainerId = undefined;
|
|
29
29
|
this.formLegacyConfigName = undefined;
|
|
30
|
-
this.getCustomTitle = undefined;
|
|
31
30
|
this._hasToCreateFieldSearch = true;
|
|
32
31
|
this._breadcrumbItems = [];
|
|
33
32
|
this._guides = undefined;
|
|
34
33
|
this._formEditorConfigManager = undefined;
|
|
35
34
|
this._formEditorDataUnit = undefined;
|
|
36
35
|
this._fieldToGetFocus = undefined;
|
|
37
|
-
this._customEditors = undefined;
|
|
38
|
-
this._customRenders = undefined;
|
|
39
|
-
this._fieldsProps = {};
|
|
40
36
|
}
|
|
41
37
|
observeDataUnit() {
|
|
42
38
|
this.loadGuides(true);
|
|
@@ -67,28 +63,6 @@ export class SnkGuidesViewer {
|
|
|
67
63
|
async findField() {
|
|
68
64
|
await openFieldSearch(this._moreOptions, this._fieldSearch);
|
|
69
65
|
}
|
|
70
|
-
/**
|
|
71
|
-
* Registra um editor customizado para campos da grade e formulário
|
|
72
|
-
*/
|
|
73
|
-
async addCustomEditor(fieldName, customEditor) {
|
|
74
|
-
this._customEditors = Object.assign(Object.assign({}, this._customEditors), { [fieldName]: customEditor });
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Registra um render customizado para colunas da grid.
|
|
78
|
-
*/
|
|
79
|
-
async addGridCustomRender(fieldName, customRender) {
|
|
80
|
-
this._customRenders = Object.assign(Object.assign({}, this._customRenders), { [fieldName]: customRender });
|
|
81
|
-
}
|
|
82
|
-
;
|
|
83
|
-
/**
|
|
84
|
-
* Altera/adiciona uma propriedade nos metadados do campo.
|
|
85
|
-
*/
|
|
86
|
-
async setFieldProp(fieldName, propName, value) {
|
|
87
|
-
const newFieldsProps = {
|
|
88
|
-
[fieldName]: Object.assign(Object.assign({}, this._fieldsProps[fieldName]), { [propName]: value })
|
|
89
|
-
};
|
|
90
|
-
this._fieldsProps = Object.assign(Object.assign({}, this._fieldsProps), newFieldsProps);
|
|
91
|
-
}
|
|
92
66
|
/**
|
|
93
67
|
* Atribui o foco para o componente.
|
|
94
68
|
*/
|
|
@@ -114,7 +88,7 @@ export class SnkGuidesViewer {
|
|
|
114
88
|
}
|
|
115
89
|
onContentCardChanged(evt) {
|
|
116
90
|
SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this._configManager)
|
|
117
|
-
.then(() => this.masterFormConfig = this._configManager.getConfig(this.dataUnit));
|
|
91
|
+
.then(() => this.masterFormConfig = this._configManager.getConfig(this.dataState.insertionMode, this.dataUnit));
|
|
118
92
|
}
|
|
119
93
|
/**
|
|
120
94
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
@@ -237,7 +211,7 @@ export class SnkGuidesViewer {
|
|
|
237
211
|
if (sheet == undefined) {
|
|
238
212
|
return;
|
|
239
213
|
}
|
|
240
|
-
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); } });
|
|
241
215
|
})));
|
|
242
216
|
}
|
|
243
217
|
wrapDetail(levels, content) {
|
|
@@ -279,14 +253,14 @@ export class SnkGuidesViewer {
|
|
|
279
253
|
else {
|
|
280
254
|
detailBranch = this.selectedGuide;
|
|
281
255
|
}
|
|
282
|
-
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 }));
|
|
283
257
|
}
|
|
284
258
|
else {
|
|
285
259
|
const cardId = this.selectedGuide.id;
|
|
286
260
|
const sheet = this._masterFormMetadata.getSheet(cardId);
|
|
287
261
|
if (sheet) {
|
|
288
262
|
const cardConfig = (_c = (_b = this.masterFormConfig) === null || _b === void 0 ? void 0 : _b.cardsState) === null || _c === void 0 ? void 0 : _c.get(cardId);
|
|
289
|
-
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());
|
|
290
264
|
}
|
|
291
265
|
}
|
|
292
266
|
return content;
|
|
@@ -465,10 +439,6 @@ export class SnkGuidesViewer {
|
|
|
465
439
|
}
|
|
466
440
|
return "";
|
|
467
441
|
}
|
|
468
|
-
getTitle() {
|
|
469
|
-
var _a, _b;
|
|
470
|
-
return (_b = (_a = this.getCustomTitle) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : this.getMessage("snkCrud.title");
|
|
471
|
-
}
|
|
472
442
|
componentDidLoad() {
|
|
473
443
|
this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
|
474
444
|
}
|
|
@@ -482,7 +452,7 @@ export class SnkGuidesViewer {
|
|
|
482
452
|
}
|
|
483
453
|
this.loadTaskbarProcessor();
|
|
484
454
|
const showGuides = this._guides && (this._guides.length > 1);
|
|
485
|
-
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.
|
|
455
|
+
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.getMessage("snkCrud.title")), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
|
|
486
456
|
h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
|
487
457
|
h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
|
|
488
458
|
:
|
|
@@ -493,9 +463,7 @@ export class SnkGuidesViewer {
|
|
|
493
463
|
dataUnit: this.dataUnit,
|
|
494
464
|
recordsValidator: this.recordsValidator,
|
|
495
465
|
fieldToFocus: this._fieldToGetFocus,
|
|
496
|
-
onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this)
|
|
497
|
-
propsCustomEditor: this._customEditors,
|
|
498
|
-
fieldsProps: this._fieldsProps
|
|
466
|
+
onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this)
|
|
499
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 })));
|
|
500
468
|
}
|
|
501
469
|
static get is() { return "snk-guides-viewer"; }
|
|
@@ -799,21 +767,6 @@ export class SnkGuidesViewer {
|
|
|
799
767
|
},
|
|
800
768
|
"attribute": "form-legacy-config-name",
|
|
801
769
|
"reflect": false
|
|
802
|
-
},
|
|
803
|
-
"getCustomTitle": {
|
|
804
|
-
"type": "unknown",
|
|
805
|
-
"mutable": false,
|
|
806
|
-
"complexType": {
|
|
807
|
-
"original": "() => string",
|
|
808
|
-
"resolved": "() => string",
|
|
809
|
-
"references": {}
|
|
810
|
-
},
|
|
811
|
-
"required": false,
|
|
812
|
-
"optional": false,
|
|
813
|
-
"docs": {
|
|
814
|
-
"tags": [],
|
|
815
|
-
"text": "Fornece uma fun\u00E7\u00E3o para obter um t\u00EDtulo customizado do formul\u00E1rio."
|
|
816
|
-
}
|
|
817
770
|
}
|
|
818
771
|
};
|
|
819
772
|
}
|
|
@@ -824,10 +777,7 @@ export class SnkGuidesViewer {
|
|
|
824
777
|
"_guides": {},
|
|
825
778
|
"_formEditorConfigManager": {},
|
|
826
779
|
"_formEditorDataUnit": {},
|
|
827
|
-
"_fieldToGetFocus": {}
|
|
828
|
-
"_customEditors": {},
|
|
829
|
-
"_customRenders": {},
|
|
830
|
-
"_fieldsProps": {}
|
|
780
|
+
"_fieldToGetFocus": {}
|
|
831
781
|
};
|
|
832
782
|
}
|
|
833
783
|
static get events() {
|
|
@@ -928,83 +878,6 @@ export class SnkGuidesViewer {
|
|
|
928
878
|
"tags": []
|
|
929
879
|
}
|
|
930
880
|
},
|
|
931
|
-
"addCustomEditor": {
|
|
932
|
-
"complexType": {
|
|
933
|
-
"signature": "(fieldName: string, customEditor: ICustomEditor) => Promise<void>",
|
|
934
|
-
"parameters": [{
|
|
935
|
-
"tags": [],
|
|
936
|
-
"text": ""
|
|
937
|
-
}, {
|
|
938
|
-
"tags": [],
|
|
939
|
-
"text": ""
|
|
940
|
-
}],
|
|
941
|
-
"references": {
|
|
942
|
-
"Promise": {
|
|
943
|
-
"location": "global"
|
|
944
|
-
},
|
|
945
|
-
"ICustomEditor": {
|
|
946
|
-
"location": "import",
|
|
947
|
-
"path": "@sankhyalabs/ezui/dist/types/utils"
|
|
948
|
-
}
|
|
949
|
-
},
|
|
950
|
-
"return": "Promise<void>"
|
|
951
|
-
},
|
|
952
|
-
"docs": {
|
|
953
|
-
"text": "Registra um editor customizado para campos da grade e formul\u00E1rio",
|
|
954
|
-
"tags": []
|
|
955
|
-
}
|
|
956
|
-
},
|
|
957
|
-
"addGridCustomRender": {
|
|
958
|
-
"complexType": {
|
|
959
|
-
"signature": "(fieldName: string, customRender: ICustomRender) => Promise<void>",
|
|
960
|
-
"parameters": [{
|
|
961
|
-
"tags": [],
|
|
962
|
-
"text": ""
|
|
963
|
-
}, {
|
|
964
|
-
"tags": [],
|
|
965
|
-
"text": ""
|
|
966
|
-
}],
|
|
967
|
-
"references": {
|
|
968
|
-
"Promise": {
|
|
969
|
-
"location": "global"
|
|
970
|
-
},
|
|
971
|
-
"ICustomRender": {
|
|
972
|
-
"location": "import",
|
|
973
|
-
"path": "@sankhyalabs/ezui/dist/types/utils"
|
|
974
|
-
}
|
|
975
|
-
},
|
|
976
|
-
"return": "Promise<void>"
|
|
977
|
-
},
|
|
978
|
-
"docs": {
|
|
979
|
-
"text": "Registra um render customizado para colunas da grid.",
|
|
980
|
-
"tags": []
|
|
981
|
-
}
|
|
982
|
-
},
|
|
983
|
-
"setFieldProp": {
|
|
984
|
-
"complexType": {
|
|
985
|
-
"signature": "(fieldName: string, propName: string, value: any) => Promise<void>",
|
|
986
|
-
"parameters": [{
|
|
987
|
-
"tags": [],
|
|
988
|
-
"text": ""
|
|
989
|
-
}, {
|
|
990
|
-
"tags": [],
|
|
991
|
-
"text": ""
|
|
992
|
-
}, {
|
|
993
|
-
"tags": [],
|
|
994
|
-
"text": ""
|
|
995
|
-
}],
|
|
996
|
-
"references": {
|
|
997
|
-
"Promise": {
|
|
998
|
-
"location": "global"
|
|
999
|
-
}
|
|
1000
|
-
},
|
|
1001
|
-
"return": "Promise<void>"
|
|
1002
|
-
},
|
|
1003
|
-
"docs": {
|
|
1004
|
-
"text": "Altera/adiciona uma propriedade nos metadados do campo.",
|
|
1005
|
-
"tags": []
|
|
1006
|
-
}
|
|
1007
|
-
},
|
|
1008
881
|
"setFocus": {
|
|
1009
882
|
"complexType": {
|
|
1010
883
|
"signature": "() => Promise<void>",
|