impaktapps-ui-builder 1.0.106 → 1.0.107
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/impaktapps-ui-builder.es.js +22 -32
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +5 -5
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/runtime/services/interface.d.ts +0 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildUiSchema.ts +5 -94
- package/src/impaktapps-ui-builder/runtime/services/events.ts +1 -18
- package/src/impaktapps-ui-builder/runtime/services/interface.ts +0 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +18 -8
|
@@ -10026,9 +10026,7 @@ function executeEventsHandler(params2) {
|
|
|
10026
10026
|
params2.componentName,
|
|
10027
10027
|
params2.config,
|
|
10028
10028
|
params2.store,
|
|
10029
|
-
params2.
|
|
10030
|
-
params2.formDataHolder,
|
|
10031
|
-
params2.pageLoad
|
|
10029
|
+
params2.formDataHolder
|
|
10032
10030
|
);
|
|
10033
10031
|
} else if (params2.config.Handler === "onBackHandler") {
|
|
10034
10032
|
return (_a = params2.store.functionParameters) == null ? void 0 : _a.handleBack();
|
|
@@ -10099,7 +10097,7 @@ function executeCustomHandler(params) {
|
|
|
10099
10097
|
return response;
|
|
10100
10098
|
}
|
|
10101
10099
|
}
|
|
10102
|
-
function mergeFormdata(handlerResponse, componentName, eventConfig, store2,
|
|
10100
|
+
function mergeFormdata(handlerResponse, componentName, eventConfig, store2, formDataHolder) {
|
|
10103
10101
|
var _a, _b, _c;
|
|
10104
10102
|
if (eventConfig.type === "Select" && (handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
10105
10103
|
if (!_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
@@ -10143,35 +10141,15 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
|
|
|
10143
10141
|
...handlerResponse == null ? void 0 : handlerResponse.data
|
|
10144
10142
|
};
|
|
10145
10143
|
formDataHolder = { ...formDataHolder, ...handlerResponse == null ? void 0 : handlerResponse.data };
|
|
10146
|
-
if (!pageLoad) {
|
|
10147
|
-
store2.setFormdata((pre) => {
|
|
10148
|
-
return { ...pre, ...handlerResponse == null ? void 0 : handlerResponse.data };
|
|
10149
|
-
});
|
|
10150
|
-
}
|
|
10151
10144
|
}
|
|
10152
10145
|
} else if (eventConfig.type === "Table" && eventConfig.lazyLoading) {
|
|
10153
10146
|
if (handlerResponse && (handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
10154
10147
|
formDataHolder[componentName] = (_a = handlerResponse.data) == null ? void 0 : _a.data;
|
|
10155
10148
|
formDataHolder[`${componentName}_RowCount`] = (_c = (_b = handlerResponse.data) == null ? void 0 : _b.meta) == null ? void 0 : _c.totalRowCount;
|
|
10156
|
-
if (!pageLoad) {
|
|
10157
|
-
store2.setFormdata((pre) => {
|
|
10158
|
-
var _a2, _b2, _c2;
|
|
10159
|
-
return {
|
|
10160
|
-
...pre,
|
|
10161
|
-
[componentName]: (_a2 = handlerResponse.data) == null ? void 0 : _a2.data,
|
|
10162
|
-
[`${componentName}_RowCount`]: (_c2 = (_b2 = handlerResponse.data) == null ? void 0 : _b2.meta) == null ? void 0 : _c2.totalRowCount
|
|
10163
|
-
};
|
|
10164
|
-
});
|
|
10165
|
-
}
|
|
10166
10149
|
}
|
|
10167
10150
|
} else {
|
|
10168
10151
|
if (handlerResponse) {
|
|
10169
10152
|
formDataHolder[componentName] = handlerResponse.data;
|
|
10170
|
-
if (!pageLoad) {
|
|
10171
|
-
store2.setFormdata((pre) => {
|
|
10172
|
-
return { ...pre, [componentName]: handlerResponse.data };
|
|
10173
|
-
});
|
|
10174
|
-
}
|
|
10175
10153
|
}
|
|
10176
10154
|
}
|
|
10177
10155
|
}
|
|
@@ -10362,8 +10340,7 @@ var service = (funcParams) => {
|
|
|
10362
10340
|
service: funcParams.service,
|
|
10363
10341
|
serviceHolder: this,
|
|
10364
10342
|
eventGroups,
|
|
10365
|
-
formDataHolder
|
|
10366
|
-
pageLoad: true
|
|
10343
|
+
formDataHolder
|
|
10367
10344
|
});
|
|
10368
10345
|
funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
|
|
10369
10346
|
uiSchema.elements.push(notifyUiSchema);
|
|
@@ -10513,13 +10490,23 @@ var service = (funcParams) => {
|
|
|
10513
10490
|
var _a, _b, _c;
|
|
10514
10491
|
const path = ((_a = funcParams.dynamicData) == null ? void 0 : _a.tableButtonPath) || funcParams.dynamicData.path.split(".")[funcParams.dynamicData.path.split(".").length - 1];
|
|
10515
10492
|
if (((_b = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _b[path]) !== void 0) {
|
|
10516
|
-
Promise.all((_c = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _c[path].map((eventConfig) => {
|
|
10493
|
+
await Promise.all((_c = eventGroups == null ? void 0 : eventGroups[eventType]) == null ? void 0 : _c[path].map(async (eventConfig) => {
|
|
10517
10494
|
executeEventsParameters.store.functionParameters = functionParameters;
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10495
|
+
if (eventConfig.Handler === "refresh") {
|
|
10496
|
+
await executeRefreshHandler({
|
|
10497
|
+
...executeEventsParameters,
|
|
10498
|
+
config: eventConfig,
|
|
10499
|
+
componentName: path,
|
|
10500
|
+
formDataHolder
|
|
10501
|
+
});
|
|
10502
|
+
funcParams.store.setFormdata((pre) => ({ ...pre, ...formDataHolder }));
|
|
10503
|
+
} else {
|
|
10504
|
+
executeEvents({
|
|
10505
|
+
...executeEventsParameters,
|
|
10506
|
+
config: eventConfig,
|
|
10507
|
+
componentName: path
|
|
10508
|
+
});
|
|
10509
|
+
}
|
|
10523
10510
|
}));
|
|
10524
10511
|
}
|
|
10525
10512
|
},
|
|
@@ -12366,6 +12353,9 @@ function buildSchemaFromConfig(config2, parentSchema) {
|
|
|
12366
12353
|
if (v.validationType === "required") {
|
|
12367
12354
|
(_a2 = parentSchema.required) != null ? _a2 : parentSchema.required = [];
|
|
12368
12355
|
parentSchema.required.push(config2.name);
|
|
12356
|
+
} else if (v.validationType === "readOnly") {
|
|
12357
|
+
fieldSchema.type = "string";
|
|
12358
|
+
fieldSchema.disabled = true;
|
|
12369
12359
|
} else {
|
|
12370
12360
|
fieldSchema.type = "string";
|
|
12371
12361
|
fieldSchema[v.validationType] = isNaN(v.validationValue) ? v.validationValue : Number(v.validationValue);
|