@sankhyalabs/sankhyablocks 0.0.0-feat-dev-KB-38448.4 → 0.0.0-feat-dev-KB-68095.3
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-ecc0ed20.js} +2 -2
- package/dist/cjs/{DataFetcher-77729a93.js → DataFetcher-cadeef8e.js} +21 -20
- package/dist/cjs/{IExporterProvider-10b7fed5.js → IExporterProvider-9ac15aaf.js} +4 -4
- package/dist/cjs/{SnkFormConfigManager-beebf47a.js → SnkFormConfigManager-04a5525b.js} +71 -15
- package/dist/cjs/{auth-fetcher-29bb791c.js → auth-fetcher-d68841bc.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-d4873076.js → dataunit-fetcher-4b12f70c.js} +1 -1
- package/dist/cjs/{form-config-fetcher-feb08214.js → form-config-fetcher-ed497282.js} +5 -2
- package/dist/cjs/{pesquisa-fetcher-a1d0353f.js → pesquisa-fetcher-ca89181c.js} +1 -1
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +5 -5
- package/dist/cjs/snk-application.cjs.entry.js +6 -6
- package/dist/cjs/snk-attach.cjs.entry.js +13 -24
- package/dist/cjs/snk-crud.cjs.entry.js +5 -5
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-f0221097.js → snk-data-unit-256eecd1.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +8 -8
- package/dist/cjs/snk-filter-bar.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form-config.cjs.entry.js +10 -4
- package/dist/cjs/snk-form.cjs.entry.js +7 -6
- package/dist/cjs/snk-grid.cjs.entry.js +6 -6
- package/dist/cjs/{snk-guides-viewer-aafc3073.js → snk-guides-viewer-b21c9217.js} +10 -7
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -8
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-simple-crud.cjs.entry.js +8 -8
- package/dist/collection/components/snk-attach/snk-attach.js +3 -12
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +1 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +5 -2
- package/dist/collection/components/snk-form/snk-form.js +2 -2
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +69 -13
- package/dist/collection/components/snk-form-config/snk-form-config.js +8 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +1 -1
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +21 -20
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js +5 -7
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +4 -1
- package/dist/components/DataFetcher.js +21 -20
- package/dist/components/SnkFormConfigManager.js +69 -13
- package/dist/components/form-config-fetcher.js +4 -1
- package/dist/components/snk-attach2.js +8 -19
- package/dist/components/snk-detail-view2.js +6 -3
- package/dist/components/snk-form-config2.js +8 -2
- package/dist/components/snk-form.js +2 -2
- package/dist/components/snk-simple-crud2.js +1 -1
- package/dist/esm/{ConfigStorage-e476378d.js → ConfigStorage-7b36d041.js} +2 -2
- package/dist/esm/{DataFetcher-773a3e4b.js → DataFetcher-a9c598f2.js} +21 -20
- package/dist/esm/{IExporterProvider-d597f27d.js → IExporterProvider-09df2e3e.js} +4 -4
- package/dist/esm/{SnkFormConfigManager-298cd647.js → SnkFormConfigManager-147f76ab.js} +71 -15
- package/dist/esm/{auth-fetcher-a411f73c.js → auth-fetcher-749d880f.js} +1 -1
- package/dist/esm/{dataunit-fetcher-3d2ec959.js → dataunit-fetcher-3aac1a53.js} +1 -1
- package/dist/esm/{form-config-fetcher-e0382e5a.js → form-config-fetcher-adbe5d34.js} +5 -2
- package/dist/esm/{pesquisa-fetcher-a87445a0.js → pesquisa-fetcher-8edaa8cd.js} +1 -1
- package/dist/esm/snk-actions-button_4.entry.js +5 -5
- package/dist/esm/snk-application.entry.js +6 -6
- package/dist/esm/snk-attach.entry.js +13 -24
- package/dist/esm/snk-crud.entry.js +5 -5
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-1ef94aef.js → snk-data-unit-72418130.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +8 -8
- package/dist/esm/snk-filter-bar.entry.js +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form-config.entry.js +10 -4
- package/dist/esm/snk-form.entry.js +7 -6
- package/dist/esm/snk-grid.entry.js +6 -6
- package/dist/esm/{snk-guides-viewer-62124f3d.js → snk-guides-viewer-6d22250e.js} +10 -7
- package/dist/esm/snk-guides-viewer.entry.js +8 -8
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-simple-crud.entry.js +8 -8
- package/dist/sankhyablocks/{p-181975f1.js → p-06421fdb.js} +2 -2
- package/dist/sankhyablocks/p-1a85bed6.entry.js +1 -0
- package/dist/sankhyablocks/{p-76a65660.js → p-1ab19772.js} +1 -1
- package/dist/sankhyablocks/{p-25f1fc39.js → p-1bf06cd3.js} +2 -2
- package/dist/sankhyablocks/{p-51999ab5.entry.js → p-1f47a0b2.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9dfda04a.entry.js → p-212213d9.entry.js} +1 -1
- package/dist/sankhyablocks/p-34b25e9e.entry.js +1 -0
- package/dist/sankhyablocks/{p-3287a6cc.js → p-4d9549cf.js} +1 -1
- package/dist/sankhyablocks/{p-162b9a59.entry.js → p-640140b3.entry.js} +2 -2
- package/dist/sankhyablocks/{p-74c665d5.entry.js → p-694b9c6a.entry.js} +1 -1
- package/dist/sankhyablocks/p-6ca3a37b.js +1 -0
- package/dist/sankhyablocks/{p-c273d6ee.js → p-9c7861dc.js} +1 -1
- package/dist/sankhyablocks/p-a2306d10.entry.js +1 -0
- package/dist/sankhyablocks/{p-70001ac1.js → p-a7bfafee.js} +1 -1
- package/dist/sankhyablocks/{p-0cd3c0a9.js → p-ca5ec380.js} +1 -1
- package/dist/sankhyablocks/{p-62f34e6f.entry.js → p-cfd18564.entry.js} +1 -1
- package/dist/sankhyablocks/{p-421bec84.entry.js → p-d137ae48.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8c1ff936.entry.js → p-d51feaa3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-52a6a293.entry.js → p-d78dadf9.entry.js} +1 -1
- package/dist/sankhyablocks/p-d96472e7.entry.js +1 -0
- package/dist/sankhyablocks/{p-0c68f40f.entry.js → p-f1a19f14.entry.js} +1 -1
- package/dist/sankhyablocks/{p-594bc21d.js → p-f3434fc4.js} +1 -1
- package/dist/sankhyablocks/p-f56384a7.entry.js +1 -0
- package/dist/sankhyablocks/{p-091ce761.js → p-f8698ad3.js} +1 -1
- package/dist/sankhyablocks/{p-bd008859.entry.js → p-fb34e0cf.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +1 -0
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +7 -2
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.d.ts +2 -3
- package/package.json +1 -1
- package/dist/sankhyablocks/p-2e9c764c.entry.js +0 -1
- package/dist/sankhyablocks/p-5f016aed.js +0 -1
- package/dist/sankhyablocks/p-684a2590.entry.js +0 -1
- package/dist/sankhyablocks/p-939e15d3.entry.js +0 -1
- package/dist/sankhyablocks/p-9fa9ff59.entry.js +0 -1
- package/dist/sankhyablocks/p-d65d98ed.entry.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
3
|
+
const formConfigFetcher = require('./form-config-fetcher-ed497282.js');
|
|
4
4
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
5
5
|
const core = require('@sankhyalabs/core');
|
|
6
|
-
const DataFetcher = require('./DataFetcher-
|
|
6
|
+
const DataFetcher = require('./DataFetcher-cadeef8e.js');
|
|
7
7
|
|
|
8
8
|
class GridConfigFetcher extends formConfigFetcher.ResourceFetcher {
|
|
9
9
|
constructor() {
|
|
@@ -6865,6 +6865,7 @@ class DataFetcher {
|
|
|
6865
6865
|
}
|
|
6866
6866
|
}
|
|
6867
6867
|
async executePendingRequest(watingRequestsById) {
|
|
6868
|
+
var _a, _b;
|
|
6868
6869
|
const requestsBatch = [];
|
|
6869
6870
|
let quietMode = true;
|
|
6870
6871
|
watingRequestsById.forEach((waitingReq) => {
|
|
@@ -6875,36 +6876,36 @@ class DataFetcher {
|
|
|
6875
6876
|
const response = await this.fecthGraphQL(requestsBatch, quietMode);
|
|
6876
6877
|
const { data: dataResponse, errors: errorsResponse, extensions } = response;
|
|
6877
6878
|
//Reject promises with errors from query
|
|
6878
|
-
|
|
6879
|
-
Object.
|
|
6880
|
-
|
|
6879
|
+
for (const errorResponse of errorsResponse) {
|
|
6880
|
+
const values = Object.values(errorResponse);
|
|
6881
|
+
for (const value of values) {
|
|
6882
|
+
const waitingRequest = watingRequestsById.get(value.request.variables[value.index].queryID);
|
|
6881
6883
|
const hasClientEvent = await this.proccesGraphQLClientEvents(extensions, waitingRequest.request, waitingRequest.resolve, waitingRequest.reject);
|
|
6882
|
-
Promise.race([
|
|
6884
|
+
const data = await Promise.race([
|
|
6883
6885
|
waitingRequest.promise,
|
|
6884
6886
|
new Promise((resolve) => {
|
|
6885
6887
|
resolve(false);
|
|
6886
6888
|
})
|
|
6887
|
-
])
|
|
6888
|
-
|
|
6889
|
-
if (
|
|
6890
|
-
|
|
6891
|
-
(((_a = watingRequestsById.get(val.request.variables[val.index].queryID)) === null || _a === void 0 ? void 0 : _a.reject) || Promise.reject)(new core.ServiceCanceledException("Service canceled", val.message));
|
|
6892
|
-
}
|
|
6893
|
-
else {
|
|
6894
|
-
(((_b = watingRequestsById.get(val.request.variables[val.index].queryID)) === null || _b === void 0 ? void 0 : _b.reject) || Promise.reject)(new core.ErrorException("Falha detectada", val.message));
|
|
6895
|
-
}
|
|
6889
|
+
]);
|
|
6890
|
+
if (!hasClientEvent || data === false) {
|
|
6891
|
+
if (Object.keys(errorResponse[0].extensions).includes("SERVICE_CANCELED") || Object.keys(extensions).includes("isServiceCancelled")) {
|
|
6892
|
+
(((_a = watingRequestsById.get(value.request.variables[value.index].queryID)) === null || _a === void 0 ? void 0 : _a.reject) || Promise.reject)(new core.ServiceCanceledException("Service canceled", value.message));
|
|
6896
6893
|
}
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6894
|
+
else {
|
|
6895
|
+
(((_b = watingRequestsById.get(value.request.variables[value.index].queryID)) === null || _b === void 0 ? void 0 : _b.reject) || Promise.reject)(new core.ErrorException("Falha detectada", value.message));
|
|
6896
|
+
}
|
|
6897
|
+
}
|
|
6898
|
+
}
|
|
6899
|
+
}
|
|
6900
6900
|
//Resolve promises with data from query
|
|
6901
|
-
|
|
6902
|
-
Object.entries(data)
|
|
6901
|
+
for (const data of dataResponse) {
|
|
6902
|
+
const entries = Object.entries(data);
|
|
6903
|
+
for (const [key, val] of entries) {
|
|
6903
6904
|
const waitingRequest = watingRequestsById.get(key);
|
|
6904
6905
|
await this.proccesGraphQLClientEvents(extensions, waitingRequest.request, waitingRequest.resolve, waitingRequest.reject);
|
|
6905
6906
|
((waitingRequest === null || waitingRequest === void 0 ? void 0 : waitingRequest.resolve) || Promise.resolve)(val);
|
|
6906
|
-
}
|
|
6907
|
-
}
|
|
6907
|
+
}
|
|
6908
|
+
}
|
|
6908
6909
|
}
|
|
6909
6910
|
buildGraphQlURL(quietMode) {
|
|
6910
6911
|
const urlParams = UrlUtils.getQueryParams(location.search);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const DataFetcher = require('./DataFetcher-
|
|
4
|
-
require('./pesquisa-fetcher-
|
|
3
|
+
const DataFetcher = require('./DataFetcher-cadeef8e.js');
|
|
4
|
+
require('./pesquisa-fetcher-ca89181c.js');
|
|
5
5
|
const core = require('@sankhyalabs/core');
|
|
6
6
|
require('./index-1dfc7a6e.js');
|
|
7
7
|
require('./ISave-e91b70a7.js');
|
|
8
8
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
9
9
|
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
10
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
10
|
+
const dataunitFetcher = require('./dataunit-fetcher-4b12f70c.js');
|
|
11
11
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
12
|
-
require('./form-config-fetcher-
|
|
12
|
+
require('./form-config-fetcher-ed497282.js');
|
|
13
13
|
const InMemoryFilterColumnDataSource = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
14
14
|
|
|
15
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
3
|
+
const ConfigStorage = require('./ConfigStorage-ecc0ed20.js');
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
5
|
+
const formConfigFetcher = require('./form-config-fetcher-ed497282.js');
|
|
6
|
+
const constants = require('./constants-35ddd366.js');
|
|
6
7
|
|
|
7
8
|
class SnkFormConfigManager {
|
|
8
|
-
constructor(configName, resourceID, onConfigChange) {
|
|
9
|
+
constructor(configName, resourceID, onConfigChange, dataUnit) {
|
|
9
10
|
this._resourceID = resourceID;
|
|
10
11
|
this._configName = configName;
|
|
11
12
|
this._onConfigChange = onConfigChange;
|
|
13
|
+
this._dataUnit = dataUnit;
|
|
12
14
|
}
|
|
13
15
|
addFormLegacyConfig(legacyConfigName) {
|
|
14
16
|
if (this._configName) {
|
|
@@ -19,6 +21,7 @@ class SnkFormConfigManager {
|
|
|
19
21
|
return new Promise(resolve => {
|
|
20
22
|
ConfigStorage.ConfigStorage.loadFormConfig(this._configName, this._resourceID)
|
|
21
23
|
.then((config) => {
|
|
24
|
+
config = this.buildFormMetadataUITabs(config);
|
|
22
25
|
this.setConfig(config);
|
|
23
26
|
resolve(config);
|
|
24
27
|
})
|
|
@@ -27,6 +30,10 @@ class SnkFormConfigManager {
|
|
|
27
30
|
});
|
|
28
31
|
});
|
|
29
32
|
}
|
|
33
|
+
getEmptyConfig() {
|
|
34
|
+
const config = this.buildFormMetadataUITabs({ fields: [], emptyConfig: true }, true);
|
|
35
|
+
return config;
|
|
36
|
+
}
|
|
30
37
|
saveConfig(config) {
|
|
31
38
|
const configToSave = core.ObjectUtils.copy(config);
|
|
32
39
|
return new Promise(accept => {
|
|
@@ -70,25 +77,36 @@ class SnkFormConfigManager {
|
|
|
70
77
|
}
|
|
71
78
|
return updatingCardConfig;
|
|
72
79
|
}
|
|
73
|
-
|
|
80
|
+
hasConfig(config) {
|
|
81
|
+
var _a;
|
|
82
|
+
const currentConfig = config !== null && config !== void 0 ? config : this._config;
|
|
83
|
+
if (currentConfig && ((_a = currentConfig.fields) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
getFieldsList(descriptionFilter) {
|
|
74
89
|
var _a;
|
|
75
90
|
const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
|
|
76
|
-
|
|
77
|
-
|
|
91
|
+
const hasConfig = this.hasConfig();
|
|
92
|
+
if (hasConfig) {
|
|
93
|
+
return fields.map(({ label, name, readOnly, visible, required, tab }) => {
|
|
94
|
+
var _a;
|
|
78
95
|
if (label == undefined) {
|
|
79
|
-
const currentField =
|
|
80
|
-
return Object.assign(Object.assign({}, currentField), { name: name !== null && name !== void 0 ? name : currentField.name, readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : currentField.readOnly, visible: visible !== null && visible !== void 0 ? visible : currentField.visible, required: required !== null && required !== void 0 ? required : currentField.required });
|
|
96
|
+
const currentField = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(name);
|
|
97
|
+
return Object.assign(Object.assign({}, currentField), { name: name !== null && name !== void 0 ? name : currentField.name, readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : currentField.readOnly, visible: visible !== null && visible !== void 0 ? visible : currentField.visible, required: required !== null && required !== void 0 ? required : currentField.required, tab: tab });
|
|
81
98
|
}
|
|
82
|
-
return { name, label, readOnly, visible, required };
|
|
99
|
+
return { name, label, readOnly, visible, required, tab };
|
|
83
100
|
})
|
|
84
101
|
.filter(field => this.isFieldVisible(field, descriptionFilter));
|
|
85
102
|
}
|
|
86
|
-
if (
|
|
87
|
-
return
|
|
88
|
-
.filter(field => this.isFieldVisible(field, descriptionFilter))
|
|
89
|
-
.map(({ label, name, readOnly }) => { return { label, name, readOnly }; });
|
|
103
|
+
if (!this._dataUnit) {
|
|
104
|
+
return [];
|
|
90
105
|
}
|
|
91
|
-
|
|
106
|
+
const filteredFields = this._dataUnit.metadata.fields
|
|
107
|
+
.filter(field => this.isFieldVisible(field, descriptionFilter))
|
|
108
|
+
.map(({ label, name, readOnly, visible, required, properties }) => ({ label, name, readOnly, visible, required, tab: properties === null || properties === void 0 ? void 0 : properties.UITabName }));
|
|
109
|
+
return filteredFields;
|
|
92
110
|
}
|
|
93
111
|
isFieldVisible(field, descriptionFilter) {
|
|
94
112
|
if (field.visible === false) {
|
|
@@ -102,7 +120,7 @@ class SnkFormConfigManager {
|
|
|
102
120
|
return normalizedText.includes(normalizedFilter);
|
|
103
121
|
}
|
|
104
122
|
getFormConfig(dataUnit, ignoreReadOnlyFormFields) {
|
|
105
|
-
let fields = this.getFieldsList(
|
|
123
|
+
let fields = this.getFieldsList();
|
|
106
124
|
if (ignoreReadOnlyFormFields) {
|
|
107
125
|
fields = fields.filter(field => {
|
|
108
126
|
if (dataUnit) {
|
|
@@ -155,6 +173,44 @@ class SnkFormConfigManager {
|
|
|
155
173
|
async fetchDefaultConfig() {
|
|
156
174
|
return this.getFormConfigFetcher().fetchDefaultConfig(this._configName, this._resourceID);
|
|
157
175
|
}
|
|
176
|
+
parseObjectList(object) {
|
|
177
|
+
if (!object) {
|
|
178
|
+
return [];
|
|
179
|
+
}
|
|
180
|
+
return Array.isArray(object) ? object : [object];
|
|
181
|
+
}
|
|
182
|
+
buildFormMetadataUITabs(config, forceEmptyConfig = false) {
|
|
183
|
+
var _a;
|
|
184
|
+
const hasConfig = this.hasConfig(config);
|
|
185
|
+
if (!forceEmptyConfig && (!this._dataUnit || hasConfig)) {
|
|
186
|
+
return config;
|
|
187
|
+
}
|
|
188
|
+
config = this.getFormConfig(this._dataUnit, false);
|
|
189
|
+
config.tabs = this.parseObjectList(config.tabs);
|
|
190
|
+
config.emptyConfig = false;
|
|
191
|
+
config.defaultConfiguration = true;
|
|
192
|
+
const fields = this._dataUnit.metadata.fields;
|
|
193
|
+
for (const currentField of fields) {
|
|
194
|
+
const field = config.fields.find(field => field.name === currentField.name);
|
|
195
|
+
const uiTabName = (_a = currentField.properties) === null || _a === void 0 ? void 0 : _a.UITabName;
|
|
196
|
+
if (!uiTabName || uiTabName === constants.TAB_NAMES.main) {
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
const haveTab = config.tabs.some((tab) => tab.label === uiTabName);
|
|
200
|
+
if (!haveTab) {
|
|
201
|
+
config.tabs.push({
|
|
202
|
+
label: uiTabName,
|
|
203
|
+
name: uiTabName,
|
|
204
|
+
order: 0,
|
|
205
|
+
visible: true,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
if (field) {
|
|
209
|
+
field.tab = uiTabName;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return config;
|
|
213
|
+
}
|
|
158
214
|
}
|
|
159
215
|
|
|
160
216
|
exports.SnkFormConfigManager = SnkFormConfigManager;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const core = require('@sankhyalabs/core');
|
|
4
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
4
|
+
const formConfigFetcher = require('./form-config-fetcher-ed497282.js');
|
|
5
5
|
|
|
6
6
|
class AuthFetcher extends formConfigFetcher.ResourceFetcher {
|
|
7
7
|
getData(resourceID) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const core = require('@sankhyalabs/core');
|
|
4
|
-
const DataFetcher = require('./DataFetcher-
|
|
4
|
+
const DataFetcher = require('./DataFetcher-cadeef8e.js');
|
|
5
5
|
const constants = require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
6
6
|
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const DataFetcher = require('./DataFetcher-
|
|
3
|
+
const DataFetcher = require('./DataFetcher-cadeef8e.js');
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
5
|
|
|
6
6
|
class ResourceFetcher {
|
|
@@ -219,7 +219,10 @@ class FormConfigFetcher extends ResourceFetcher {
|
|
|
219
219
|
query: this.queryConfig.get("fetchDefaultConfig"),
|
|
220
220
|
})
|
|
221
221
|
.then((result) => {
|
|
222
|
-
|
|
222
|
+
if (!(result === null || result === void 0 ? void 0 : result.resource)) {
|
|
223
|
+
resolve(null);
|
|
224
|
+
}
|
|
225
|
+
resolve(core.ObjectUtils.stringToObject(result === null || result === void 0 ? void 0 : result.resource));
|
|
223
226
|
})
|
|
224
227
|
.catch((error) => {
|
|
225
228
|
reject(error);
|
|
@@ -4,20 +4,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const DataFetcher = require('./DataFetcher-
|
|
7
|
+
const DataFetcher = require('./DataFetcher-cadeef8e.js');
|
|
8
8
|
const ParamType = require('./ParamType-90b440a0.js');
|
|
9
|
-
require('./pesquisa-fetcher-
|
|
9
|
+
require('./pesquisa-fetcher-ca89181c.js');
|
|
10
10
|
require('./index-1dfc7a6e.js');
|
|
11
11
|
require('./ISave-e91b70a7.js');
|
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
|
-
require('./dataunit-fetcher-
|
|
14
|
+
require('./dataunit-fetcher-4b12f70c.js');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
|
-
require('./form-config-fetcher-
|
|
16
|
+
require('./form-config-fetcher-ed497282.js');
|
|
17
17
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
|
18
18
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
19
19
|
const CheckMode = require('@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode');
|
|
20
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
20
|
+
const ConfigStorage = require('./ConfigStorage-ecc0ed20.js');
|
|
21
21
|
const constants = require('./constants-35ddd366.js');
|
|
22
22
|
require('./PrintUtils-bcaeb82f.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
9
|
-
const DataFetcher = require('./DataFetcher-
|
|
10
|
-
const authFetcher = require('./auth-fetcher-
|
|
11
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
12
|
-
const pesquisaFetcher = require('./pesquisa-fetcher-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-ecc0ed20.js');
|
|
9
|
+
const DataFetcher = require('./DataFetcher-cadeef8e.js');
|
|
10
|
+
const authFetcher = require('./auth-fetcher-d68841bc.js');
|
|
11
|
+
const dataunitFetcher = require('./dataunit-fetcher-4b12f70c.js');
|
|
12
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-ca89181c.js');
|
|
13
13
|
const SnkMessageBuilder = require('./SnkMessageBuilder-cceebbae.js');
|
|
14
|
-
require('./form-config-fetcher-
|
|
14
|
+
require('./form-config-fetcher-ed497282.js');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
16
|
require('./PrintUtils-bcaeb82f.js');
|
|
17
17
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const DataFetcher = require('./DataFetcher-
|
|
8
|
-
require('./pesquisa-fetcher-
|
|
7
|
+
const DataFetcher = require('./DataFetcher-cadeef8e.js');
|
|
8
|
+
require('./pesquisa-fetcher-ca89181c.js');
|
|
9
9
|
require('./index-1dfc7a6e.js');
|
|
10
10
|
const ISave = require('./ISave-e91b70a7.js');
|
|
11
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
11
|
+
const dataunitFetcher = require('./dataunit-fetcher-4b12f70c.js');
|
|
12
12
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
13
|
-
require('./form-config-fetcher-
|
|
13
|
+
require('./form-config-fetcher-ed497282.js');
|
|
14
14
|
const constants = require('./constants-35ddd366.js');
|
|
15
|
-
const authFetcher = require('./auth-fetcher-
|
|
15
|
+
const authFetcher = require('./auth-fetcher-d68841bc.js');
|
|
16
16
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
17
17
|
require('./PrintUtils-bcaeb82f.js');
|
|
18
18
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
@@ -117,23 +117,21 @@ const SERVICE = {
|
|
|
117
117
|
download: "AnexoSistemaSP.baixar",
|
|
118
118
|
};
|
|
119
119
|
class AnexoSistemaFetcher {
|
|
120
|
-
constructor(entityName, dataUnitName) {
|
|
120
|
+
constructor(entityName, registerKey, dataUnitName) {
|
|
121
121
|
var _a;
|
|
122
122
|
this.entityName = entityName;
|
|
123
|
+
this.registerKey = registerKey;
|
|
123
124
|
this.dataUnitName = dataUnitName;
|
|
124
125
|
this.validateFields = (fields) => {
|
|
125
126
|
if (!!fields.LINK && !!fields.NOMEARQUIVO)
|
|
126
127
|
throw new Error(ISave.SaveErrorsEnum.LINK_AND_FILE_AT_THE_SAME_TIME);
|
|
127
128
|
if (!fields.LINK && !fields.NOMEARQUIVO)
|
|
128
129
|
throw new Error(ISave.SaveErrorsEnum.ANY_LINK_OR_FILE_FILLED);
|
|
129
|
-
if (!this.
|
|
130
|
+
if (!this.registerKey)
|
|
130
131
|
throw new Error('Register key can not be null');
|
|
131
132
|
};
|
|
132
133
|
this.resourceID = (window["resourceID"] || ((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID));
|
|
133
134
|
}
|
|
134
|
-
set registerKey(registerKey) {
|
|
135
|
-
this._registerKey = registerKey;
|
|
136
|
-
}
|
|
137
135
|
async save(change) {
|
|
138
136
|
var _a, _b;
|
|
139
137
|
let { updatingFields: fields } = change;
|
|
@@ -152,7 +150,7 @@ class AnexoSistemaFetcher {
|
|
|
152
150
|
nameAttach: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name,
|
|
153
151
|
link: fields.LINK,
|
|
154
152
|
nameEntity: this.entityName,
|
|
155
|
-
pkEntity: this.
|
|
153
|
+
pkEntity: this.registerKey,
|
|
156
154
|
typeAcess: fields.TIPOACESSO,
|
|
157
155
|
typeApres: fields.TIPOAPRES,
|
|
158
156
|
}
|
|
@@ -192,7 +190,7 @@ class AnexoSistemaFetcher {
|
|
|
192
190
|
nameAttach: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name,
|
|
193
191
|
link: fields.LINK,
|
|
194
192
|
nameEntity: this.entityName,
|
|
195
|
-
pkEntity: this.
|
|
193
|
+
pkEntity: this.registerKey,
|
|
196
194
|
typeAcess: fields.TIPOACESSO,
|
|
197
195
|
typeApres: fields.TIPOAPRES,
|
|
198
196
|
}
|
|
@@ -662,9 +660,6 @@ const SnkAttach = class {
|
|
|
662
660
|
this.loadAttachmentDataUnit();
|
|
663
661
|
}
|
|
664
662
|
if (oldRegisterKey !== newRegisterKey) {
|
|
665
|
-
if (this._currentFetcher instanceof AnexoSistemaFetcher) {
|
|
666
|
-
this._currentFetcher.registerKey = newRegisterKey;
|
|
667
|
-
}
|
|
668
663
|
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData());
|
|
669
664
|
}
|
|
670
665
|
}
|
|
@@ -677,9 +672,7 @@ const SnkAttach = class {
|
|
|
677
672
|
}
|
|
678
673
|
this.returnToGridMode();
|
|
679
674
|
if (this.fetcherType === "AnexoSistema") {
|
|
680
|
-
|
|
681
|
-
anexoSistemaFetcher.registerKey = this.registerKey;
|
|
682
|
-
this._currentFetcher = anexoSistemaFetcher;
|
|
675
|
+
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
|
683
676
|
(_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
|
684
677
|
await ((_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData());
|
|
685
678
|
return;
|
|
@@ -751,9 +744,7 @@ const SnkAttach = class {
|
|
|
751
744
|
async loadAnexoSistema() {
|
|
752
745
|
var _a, _b, _c;
|
|
753
746
|
this._currentDataUnit = new dataunitFetcher.DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
|
754
|
-
|
|
755
|
-
anexoSistemaFetcher.registerKey = this.registerKey;
|
|
756
|
-
this._currentFetcher = anexoSistemaFetcher;
|
|
747
|
+
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
|
757
748
|
if (!this._currentDataUnit.metadata) {
|
|
758
749
|
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata());
|
|
759
750
|
this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
|
|
@@ -793,9 +784,7 @@ const SnkAttach = class {
|
|
|
793
784
|
initDataUnitLoaders() {
|
|
794
785
|
var _a, _b, _c;
|
|
795
786
|
if (this.fetcherType === "AnexoSistema") {
|
|
796
|
-
|
|
797
|
-
anexoSistemaFetcher.registerKey = this.registerKey;
|
|
798
|
-
this._currentFetcher = anexoSistemaFetcher;
|
|
787
|
+
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
|
799
788
|
this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
|
|
800
789
|
(_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
|
801
790
|
}
|
|
@@ -5,17 +5,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
8
|
-
require('./DataFetcher-
|
|
9
|
-
require('./pesquisa-fetcher-
|
|
8
|
+
require('./DataFetcher-cadeef8e.js');
|
|
9
|
+
require('./pesquisa-fetcher-ca89181c.js');
|
|
10
10
|
const index$1 = require('./index-1dfc7a6e.js');
|
|
11
11
|
require('./ISave-e91b70a7.js');
|
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
|
-
require('./dataunit-fetcher-
|
|
14
|
+
require('./dataunit-fetcher-4b12f70c.js');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
|
-
require('./form-config-fetcher-
|
|
16
|
+
require('./form-config-fetcher-ed497282.js');
|
|
17
17
|
const constants = require('./constants-35ddd366.js');
|
|
18
|
-
const authFetcher = require('./auth-fetcher-
|
|
18
|
+
const authFetcher = require('./auth-fetcher-d68841bc.js');
|
|
19
19
|
require('./index-102ba62d.js');
|
|
20
20
|
require('./PrintUtils-bcaeb82f.js');
|
|
21
21
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -7,15 +7,15 @@ const core = require('@sankhyalabs/core');
|
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const index = require('./index-1dfc7a6e.js');
|
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
|
10
|
-
const DataFetcher = require('./DataFetcher-
|
|
11
|
-
const snkDataUnit = require('./snk-data-unit-
|
|
12
|
-
require('./pesquisa-fetcher-
|
|
10
|
+
const DataFetcher = require('./DataFetcher-cadeef8e.js');
|
|
11
|
+
const snkDataUnit = require('./snk-data-unit-256eecd1.js');
|
|
12
|
+
require('./pesquisa-fetcher-ca89181c.js');
|
|
13
13
|
require('./ISave-e91b70a7.js');
|
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
16
|
-
require('./dataunit-fetcher-
|
|
16
|
+
require('./dataunit-fetcher-4b12f70c.js');
|
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
|
-
require('./form-config-fetcher-
|
|
18
|
+
require('./form-config-fetcher-ed497282.js');
|
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
|
20
20
|
require('./SnkMessageBuilder-cceebbae.js');
|
|
21
21
|
require('./RecordIDUtils-3735135c.js');
|
|
@@ -4,7 +4,7 @@ const index = require('./index-f9e81701.js');
|
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
5
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
6
6
|
const SnkMessageBuilder = require('./SnkMessageBuilder-cceebbae.js');
|
|
7
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
7
|
+
const dataunitFetcher = require('./dataunit-fetcher-4b12f70c.js');
|
|
8
8
|
const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
|
|
9
9
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
10
10
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const snkDataUnit = require('./snk-data-unit-
|
|
5
|
+
const snkDataUnit = require('./snk-data-unit-256eecd1.js');
|
|
6
6
|
require('./index-f9e81701.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
8
|
require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
9
|
require('./SnkMessageBuilder-cceebbae.js');
|
|
10
|
-
require('./dataunit-fetcher-
|
|
11
|
-
require('./DataFetcher-
|
|
10
|
+
require('./dataunit-fetcher-4b12f70c.js');
|
|
11
|
+
require('./DataFetcher-cadeef8e.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
@@ -4,22 +4,22 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-04a5525b.js');
|
|
8
8
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
9
|
-
require('./DataFetcher-
|
|
10
|
-
require('./pesquisa-fetcher-
|
|
9
|
+
require('./DataFetcher-cadeef8e.js');
|
|
10
|
+
require('./pesquisa-fetcher-ca89181c.js');
|
|
11
11
|
const index$1 = require('./index-1dfc7a6e.js');
|
|
12
12
|
require('./ISave-e91b70a7.js');
|
|
13
13
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
|
-
require('./dataunit-fetcher-
|
|
15
|
+
require('./dataunit-fetcher-4b12f70c.js');
|
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
|
-
require('./form-config-fetcher-
|
|
17
|
+
require('./form-config-fetcher-ed497282.js');
|
|
18
18
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
19
19
|
const constants = require('./constants-35ddd366.js');
|
|
20
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
|
20
|
+
const snkGuidesViewer = require('./snk-guides-viewer-b21c9217.js');
|
|
21
21
|
const SnkMessageBuilder = require('./SnkMessageBuilder-cceebbae.js');
|
|
22
|
-
require('./ConfigStorage-
|
|
22
|
+
require('./ConfigStorage-ecc0ed20.js');
|
|
23
23
|
require('./PrintUtils-bcaeb82f.js');
|
|
24
24
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
25
25
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
@@ -291,7 +291,7 @@ const SnkDetailView = class {
|
|
|
291
291
|
}
|
|
292
292
|
componentWillLoad() {
|
|
293
293
|
this._configName = `dynaform.${this.entityName}`;
|
|
294
|
-
this.formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this._configName, this.resourceID, () => this.loadMetadata());
|
|
294
|
+
this.formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this._configName, this.resourceID, () => this.loadMetadata(), this.dataUnit);
|
|
295
295
|
this.formConfigManager.loadConfig();
|
|
296
296
|
if (this.messagesBuilder == undefined) {
|
|
297
297
|
this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder(this.entityName);
|
|
@@ -5,15 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index$1 = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-ecc0ed20.js');
|
|
9
9
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
10
10
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
11
11
|
const index = require('./index-c5771aba.js');
|
|
12
12
|
const filterNumberVariation = require('./filterNumberVariation-d65332da.js');
|
|
13
13
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
14
14
|
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-0184ffbb.js');
|
|
15
|
-
require('./form-config-fetcher-
|
|
16
|
-
require('./DataFetcher-
|
|
15
|
+
require('./form-config-fetcher-ed497282.js');
|
|
16
|
+
require('./DataFetcher-cadeef8e.js');
|
|
17
17
|
require('./PrintUtils-bcaeb82f.js');
|
|
18
18
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
19
19
|
|
|
@@ -6,10 +6,10 @@ const index = require('./index-f9e81701.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
8
8
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
|
9
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
9
|
+
const ConfigStorage = require('./ConfigStorage-ecc0ed20.js');
|
|
10
10
|
const filterType_enum = require('./filter-type.enum-b14ce507.js');
|
|
11
|
-
require('./form-config-fetcher-
|
|
12
|
-
require('./DataFetcher-
|
|
11
|
+
require('./form-config-fetcher-ed497282.js');
|
|
12
|
+
require('./DataFetcher-cadeef8e.js');
|
|
13
13
|
require('./PrintUtils-bcaeb82f.js');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
15
|
|
|
@@ -7,9 +7,9 @@ const Sortable = require('./Sortable-fb1c4cbb.js');
|
|
|
7
7
|
const core = require('@sankhyalabs/core');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
|
10
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
10
|
+
const formConfigFetcher = require('./form-config-fetcher-ed497282.js');
|
|
11
11
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
12
|
-
require('./DataFetcher-
|
|
12
|
+
require('./DataFetcher-cadeef8e.js');
|
|
13
13
|
require('./PrintUtils-bcaeb82f.js');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
15
|
|
|
@@ -539,9 +539,12 @@ const SnkFormConfig = class {
|
|
|
539
539
|
switch (this._optionFormConfigSelected.origin) {
|
|
540
540
|
case formConfigFetcher.UserConfigType.DEFAULT:
|
|
541
541
|
config = await this.configManager.fetchDefaultConfig();
|
|
542
|
+
if (!config) {
|
|
543
|
+
config = this.configManager.getEmptyConfig();
|
|
544
|
+
}
|
|
542
545
|
break;
|
|
543
|
-
|
|
544
|
-
config =
|
|
546
|
+
default:
|
|
547
|
+
config = this.getConfig();
|
|
545
548
|
break;
|
|
546
549
|
}
|
|
547
550
|
if (config != undefined) {
|
|
@@ -744,6 +747,9 @@ const SnkFormConfig = class {
|
|
|
744
747
|
if (layoutFormConfig == undefined) {
|
|
745
748
|
layoutFormConfig = [];
|
|
746
749
|
}
|
|
750
|
+
if (this._formConfig.defaultConfiguration) {
|
|
751
|
+
return layoutFormConfig;
|
|
752
|
+
}
|
|
747
753
|
return this._formConfig.tabs.map((tab) => {
|
|
748
754
|
return layoutFormConfig.find(config => { var _a, _b; return ((_a = tab.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = config.tab) === null || _b === void 0 ? void 0 : _b.toLowerCase()); })
|
|
749
755
|
|| { tab: tab.label, groups: [], visible: tab.visible };
|