impaktapps-ui-builder 0.0.103 → 0.0.105
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 +93 -15
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +11 -11
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/elements/UiSchema/Component/uiSchema.ts +571 -565
- package/src/impaktapps-ui-builder/builder/services/component.ts +110 -29
- package/src/impaktapps-ui-builder/runtime/services/events.ts +2 -2
|
@@ -6702,20 +6702,27 @@ const componentBasicUiSchema = (theme) => {
|
|
|
6702
6702
|
},
|
|
6703
6703
|
{
|
|
6704
6704
|
type: "Control",
|
|
6705
|
-
scope: "#/properties/
|
|
6706
|
-
|
|
6707
|
-
|
|
6705
|
+
scope: "#/properties/proc1",
|
|
6706
|
+
config: {
|
|
6707
|
+
layout: { xs: 0, sm: 0, md: 4, lg: 4 }
|
|
6708
6708
|
},
|
|
6709
|
+
options: {
|
|
6710
|
+
widget: "EmptyBox"
|
|
6711
|
+
}
|
|
6712
|
+
},
|
|
6713
|
+
{
|
|
6714
|
+
type: "Control",
|
|
6715
|
+
scope: "#/properties/proc2",
|
|
6709
6716
|
config: {
|
|
6710
|
-
layout: { xs:
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6717
|
+
layout: { xs: 0, sm: 0, md: 4, lg: 4 }
|
|
6718
|
+
},
|
|
6719
|
+
options: {
|
|
6720
|
+
widget: "EmptyBox"
|
|
6714
6721
|
}
|
|
6715
6722
|
},
|
|
6716
6723
|
{
|
|
6717
6724
|
type: "Control",
|
|
6718
|
-
scope: "#/properties/
|
|
6725
|
+
scope: "#/properties/proc3",
|
|
6719
6726
|
config: {
|
|
6720
6727
|
layout: { xs: 0, sm: 0, md: 4, lg: 4 }
|
|
6721
6728
|
},
|
|
@@ -8431,8 +8438,9 @@ const sectionLabels = {
|
|
|
8431
8438
|
Thought: ["Core", "Properties", "Event", "Style", "Validation"]
|
|
8432
8439
|
};
|
|
8433
8440
|
function refreshPage(type, store2) {
|
|
8434
|
-
var _a;
|
|
8441
|
+
var _a, _b;
|
|
8435
8442
|
const UiSchema = _.cloneDeep(componentBasicUiSchema(store2.theme.myTheme));
|
|
8443
|
+
const currentConfig = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
8436
8444
|
if (type) {
|
|
8437
8445
|
const sectionUiSchema = {
|
|
8438
8446
|
Core: CoreSection,
|
|
@@ -8447,6 +8455,75 @@ function refreshPage(type, store2) {
|
|
|
8447
8455
|
UiSchema.elements[1].config.main.tabLabels = sectionLabels[type] || ["Core", "Style", "Event", "Validation"];
|
|
8448
8456
|
UiSchema.elements[1].elements = elements || [CoreSection, StyleSection, EventSection(store2.theme.myTheme), ValidationSection];
|
|
8449
8457
|
}
|
|
8458
|
+
const path = (_b = store2.searchParams) == null ? void 0 : _b.get("path");
|
|
8459
|
+
const lastDotIndex = path.lastIndexOf(".");
|
|
8460
|
+
const parentPath = path.slice(0, lastDotIndex);
|
|
8461
|
+
const parentObj = _.get(currentConfig, parentPath);
|
|
8462
|
+
if ((parentObj == null ? void 0 : parentObj.type) === "Table") {
|
|
8463
|
+
UiSchema.elements[1].elements[0].elements[4] = {
|
|
8464
|
+
type: "Control",
|
|
8465
|
+
scope: "#/properties/columnFormat",
|
|
8466
|
+
options: {
|
|
8467
|
+
widget: "SelectInputField"
|
|
8468
|
+
},
|
|
8469
|
+
config: {
|
|
8470
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
8471
|
+
main: {
|
|
8472
|
+
label: "Column Format"
|
|
8473
|
+
}
|
|
8474
|
+
}
|
|
8475
|
+
};
|
|
8476
|
+
UiSchema.elements[1].elements[0].elements[6] = {
|
|
8477
|
+
type: "Control",
|
|
8478
|
+
scope: "#/properties/filteringOptions",
|
|
8479
|
+
options: {
|
|
8480
|
+
widget: "SelectInputField"
|
|
8481
|
+
},
|
|
8482
|
+
config: {
|
|
8483
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
8484
|
+
main: {
|
|
8485
|
+
label: "Filter Mode",
|
|
8486
|
+
multiple: true
|
|
8487
|
+
}
|
|
8488
|
+
}
|
|
8489
|
+
};
|
|
8490
|
+
UiSchema.elements[1].elements[0].elements[5] = {
|
|
8491
|
+
type: "Control",
|
|
8492
|
+
scope: "#/properties/enableFilter",
|
|
8493
|
+
options: {
|
|
8494
|
+
widget: "RadioInputField"
|
|
8495
|
+
},
|
|
8496
|
+
config: {
|
|
8497
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
8498
|
+
main: {
|
|
8499
|
+
label: "Enable Filter",
|
|
8500
|
+
options: ["Yes", "No"]
|
|
8501
|
+
}
|
|
8502
|
+
}
|
|
8503
|
+
}, UiSchema.elements[0].elements[0].elements[7] = {
|
|
8504
|
+
type: "Control",
|
|
8505
|
+
scope: "#/properties/enableSorting",
|
|
8506
|
+
options: {
|
|
8507
|
+
widget: "RadioInputField"
|
|
8508
|
+
},
|
|
8509
|
+
config: {
|
|
8510
|
+
layout: { xs: 6, sm: 6, md: 4, lg: 3 },
|
|
8511
|
+
main: {
|
|
8512
|
+
label: "Enable Sorting",
|
|
8513
|
+
options: ["Yes", "No"]
|
|
8514
|
+
}
|
|
8515
|
+
}
|
|
8516
|
+
}, UiSchema.elements[0].elements[0].elements[8] = {
|
|
8517
|
+
type: "Control",
|
|
8518
|
+
scope: "#/properties/proc",
|
|
8519
|
+
config: {
|
|
8520
|
+
layout: { xs: 6, sm: 6, md: 8, lg: 3 }
|
|
8521
|
+
},
|
|
8522
|
+
options: {
|
|
8523
|
+
widget: "EmptyBox"
|
|
8524
|
+
}
|
|
8525
|
+
};
|
|
8526
|
+
}
|
|
8450
8527
|
if (sessionStorage.getItem("copiedConfig")) {
|
|
8451
8528
|
this.ElementPathSetter(UiSchema);
|
|
8452
8529
|
}
|
|
@@ -9898,16 +9975,17 @@ function executeCustomHandler(params) {
|
|
|
9898
9975
|
}
|
|
9899
9976
|
}
|
|
9900
9977
|
function mergeFormdata(handlerResponse, componentName, eventConfig, store2, service2, formDataHolder) {
|
|
9978
|
+
var _a, _b, _c;
|
|
9901
9979
|
if (eventConfig.type === "Select" && (handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9902
9980
|
if (!_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9903
9981
|
store2.setSchema((pre) => {
|
|
9904
|
-
var
|
|
9982
|
+
var _a2;
|
|
9905
9983
|
return {
|
|
9906
9984
|
...pre,
|
|
9907
9985
|
properties: {
|
|
9908
9986
|
...pre.properties,
|
|
9909
9987
|
[componentName]: {
|
|
9910
|
-
...(
|
|
9988
|
+
...(_a2 = pre.properties) == null ? void 0 : _a2[componentName],
|
|
9911
9989
|
oneOf: handlerResponse.data
|
|
9912
9990
|
}
|
|
9913
9991
|
}
|
|
@@ -9917,13 +9995,13 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
|
|
|
9917
9995
|
} else if (eventConfig.type === "MultipleSelect" && (handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9918
9996
|
if (!_.isEmpty(handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9919
9997
|
store2.setSchema((pre) => {
|
|
9920
|
-
var
|
|
9998
|
+
var _a2;
|
|
9921
9999
|
return {
|
|
9922
10000
|
...pre,
|
|
9923
10001
|
properties: {
|
|
9924
10002
|
...pre.properties,
|
|
9925
10003
|
[componentName]: {
|
|
9926
|
-
...(
|
|
10004
|
+
...(_a2 = pre.properties) == null ? void 0 : _a2[componentName],
|
|
9927
10005
|
type: "array",
|
|
9928
10006
|
items: {
|
|
9929
10007
|
oneOf: handlerResponse == null ? void 0 : handlerResponse.data
|
|
@@ -9945,8 +10023,8 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
|
|
|
9945
10023
|
}
|
|
9946
10024
|
} else if (eventConfig.type === "Table" && eventConfig.lazyLoading) {
|
|
9947
10025
|
if (handlerResponse && (handlerResponse == null ? void 0 : handlerResponse.data)) {
|
|
9948
|
-
formDataHolder[componentName] = handlerResponse.data;
|
|
9949
|
-
formDataHolder[`${componentName}_RowCount`] = handlerResponse.data;
|
|
10026
|
+
formDataHolder[componentName] = (_a = handlerResponse.data) == null ? void 0 : _a.data;
|
|
10027
|
+
formDataHolder[`${componentName}_RowCount`] = (_c = (_b = handlerResponse.data) == null ? void 0 : _b.meta) == null ? void 0 : _c.totalRowCount;
|
|
9950
10028
|
store2.setFormdata((pre) => {
|
|
9951
10029
|
return { ...pre, ...formDataHolder };
|
|
9952
10030
|
});
|