impaktapps-ui-builder 0.0.59 → 0.0.62
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 +44 -44
- package/dist/impaktapps-ui-builder.es.js.map +1 -1
- package/dist/impaktapps-ui-builder.umd.js +9 -9
- package/dist/impaktapps-ui-builder.umd.js.map +1 -1
- package/dist/src/impaktapps-ui-builder/builder/services/utils.d.ts +4 -4
- package/dist/src/impaktapps-ui-builder/lib/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildSchema.ts +1 -1
- package/src/impaktapps-ui-builder/builder/build/buildTable.ts +5 -5
- package/src/impaktapps-ui-builder/builder/services/component.ts +15 -22
- package/src/impaktapps-ui-builder/builder/services/event.ts +4 -4
- package/src/impaktapps-ui-builder/builder/services/pageMaster.ts +12 -12
- package/src/impaktapps-ui-builder/builder/services/utils.ts +12 -12
- package/src/impaktapps-ui-builder/lib/index.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/events.ts +1 -1
- package/src/impaktapps-ui-builder/runtime/services/service.ts +2 -2
|
@@ -7838,8 +7838,8 @@ const flatObjectValueInArray = (config = []) => {
|
|
|
7838
7838
|
});
|
|
7839
7839
|
return data;
|
|
7840
7840
|
};
|
|
7841
|
-
const
|
|
7842
|
-
|
|
7841
|
+
const clearFromSessionStorage = () => {
|
|
7842
|
+
sessionStorage.removeItem("pageFormdata");
|
|
7843
7843
|
};
|
|
7844
7844
|
const getNavigationHistory = (config, path) => {
|
|
7845
7845
|
if (path) {
|
|
@@ -7865,19 +7865,19 @@ const getNavigationHistory = (config, path) => {
|
|
|
7865
7865
|
}
|
|
7866
7866
|
return void 0;
|
|
7867
7867
|
};
|
|
7868
|
-
const
|
|
7868
|
+
const saveFormdataInSessionStorage = (formData, path) => {
|
|
7869
7869
|
let updatedFormdata;
|
|
7870
7870
|
if (path) {
|
|
7871
|
-
const pageFormdata =
|
|
7871
|
+
const pageFormdata = getFormdataFromSessionStorage();
|
|
7872
7872
|
updatedFormdata = _.set(pageFormdata, path, buildConfig(formData));
|
|
7873
7873
|
} else {
|
|
7874
7874
|
updatedFormdata = buildConfig(formData);
|
|
7875
7875
|
}
|
|
7876
|
-
|
|
7876
|
+
sessionStorage.setItem("pageFormdata", JSON.stringify(updatedFormdata));
|
|
7877
7877
|
return updatedFormdata;
|
|
7878
7878
|
};
|
|
7879
|
-
const
|
|
7880
|
-
const pageFormdata =
|
|
7879
|
+
const getFormdataFromSessionStorage = (path) => {
|
|
7880
|
+
const pageFormdata = sessionStorage.getItem("pageFormdata") ? JSON.parse(sessionStorage.getItem("pageFormdata")) : void 0;
|
|
7881
7881
|
let returnValue;
|
|
7882
7882
|
if (path) {
|
|
7883
7883
|
returnValue = _.get(pageFormdata, path);
|
|
@@ -7892,8 +7892,8 @@ async function saveHandler(store2, service2, submitHandler, pageName) {
|
|
|
7892
7892
|
var _a, _b;
|
|
7893
7893
|
(_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
7894
7894
|
const path = (_b = store2.searchParams) == null ? void 0 : _b.get("path");
|
|
7895
|
-
|
|
7896
|
-
const config = JSON.parse(
|
|
7895
|
+
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
7896
|
+
const config = JSON.parse(sessionStorage.getItem("pageFormdata"));
|
|
7897
7897
|
if (_.isEmpty(store2.ctx.core.errors)) {
|
|
7898
7898
|
try {
|
|
7899
7899
|
const saveReturn = await submitHandler(store2, service2, config);
|
|
@@ -7905,7 +7905,7 @@ async function saveHandler(store2, service2, submitHandler, pageName) {
|
|
|
7905
7905
|
}
|
|
7906
7906
|
const navigateHandler = (store2, isSubmitted, pageName) => {
|
|
7907
7907
|
if (isSubmitted) {
|
|
7908
|
-
|
|
7908
|
+
sessionStorage.removeItem("pageFormdata");
|
|
7909
7909
|
store2.navigate(pageName || -1);
|
|
7910
7910
|
store2.setNotify({
|
|
7911
7911
|
SuccessMessage: "Submit Successfully",
|
|
@@ -7923,7 +7923,7 @@ function okHandler(store2) {
|
|
|
7923
7923
|
var _a;
|
|
7924
7924
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
7925
7925
|
if (_.isEmpty(store2.ctx.core.errors)) {
|
|
7926
|
-
|
|
7926
|
+
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
7927
7927
|
store2.navigate(-1);
|
|
7928
7928
|
store2.setNotify({
|
|
7929
7929
|
SuccessMessage: "Save Successfully",
|
|
@@ -8000,7 +8000,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8000
8000
|
getFormdata: function() {
|
|
8001
8001
|
var _a;
|
|
8002
8002
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8003
|
-
return
|
|
8003
|
+
return getFormdataFromSessionStorage(path);
|
|
8004
8004
|
},
|
|
8005
8005
|
getSchema: function() {
|
|
8006
8006
|
return ComponentSchema;
|
|
@@ -8018,7 +8018,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8018
8018
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8019
8019
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8020
8020
|
const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
|
|
8021
|
-
|
|
8021
|
+
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
8022
8022
|
if (path) {
|
|
8023
8023
|
const path2 = (_c = store2.searchParams) == null ? void 0 : _c.get("path");
|
|
8024
8024
|
const finalPath = `${path2}.elements[${rowId}]`;
|
|
@@ -8032,27 +8032,27 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8032
8032
|
deleteComponents: function(shouldUpdateDialog = true) {
|
|
8033
8033
|
var _a;
|
|
8034
8034
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8035
|
-
const rowId =
|
|
8035
|
+
const rowId = sessionStorage.getItem("rowId");
|
|
8036
8036
|
store2.formData.elements.splice(rowId, 1);
|
|
8037
|
-
const response =
|
|
8037
|
+
const response = saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
8038
8038
|
const data = path ? _.get(response, path) : response;
|
|
8039
8039
|
store2.setFormdata(data);
|
|
8040
8040
|
if (shouldUpdateDialog) {
|
|
8041
8041
|
store2.updateDialog("popUpComponentSection");
|
|
8042
8042
|
}
|
|
8043
|
-
|
|
8043
|
+
sessionStorage.removeItem("rowId");
|
|
8044
8044
|
},
|
|
8045
8045
|
deleteEvent: function(shouldUpdateDialog = true) {
|
|
8046
8046
|
var _a;
|
|
8047
8047
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8048
|
-
const rowId =
|
|
8048
|
+
const rowId = sessionStorage.getItem("rowId");
|
|
8049
8049
|
store2.formData.events.splice(rowId, 1);
|
|
8050
|
-
const response =
|
|
8050
|
+
const response = saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
8051
8051
|
store2.setFormdata(_.get(response, path));
|
|
8052
8052
|
if (shouldUpdateDialog) {
|
|
8053
8053
|
store2.updateDialog("popUpEventSection");
|
|
8054
8054
|
}
|
|
8055
|
-
|
|
8055
|
+
sessionStorage.removeItem("rowId");
|
|
8056
8056
|
},
|
|
8057
8057
|
widgetAddClickHandler: function() {
|
|
8058
8058
|
var _a;
|
|
@@ -8060,7 +8060,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8060
8060
|
store2.formData.elements = [];
|
|
8061
8061
|
}
|
|
8062
8062
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8063
|
-
|
|
8063
|
+
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
8064
8064
|
const finalPath = `${path}.elements[${store2.formData.elements.length}]`;
|
|
8065
8065
|
store2.searchParams.set("path", finalPath);
|
|
8066
8066
|
store2.setSearchParams(store2.searchParams);
|
|
@@ -8071,7 +8071,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8071
8071
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8072
8072
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8073
8073
|
const id = (_b = store2.searchParams) == null ? void 0 : _b.get("id");
|
|
8074
|
-
|
|
8074
|
+
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
8075
8075
|
const finalPath = `${path}.events[${rowId}]`;
|
|
8076
8076
|
store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
|
|
8077
8077
|
},
|
|
@@ -8082,7 +8082,7 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8082
8082
|
if (!Array.isArray(store2.formData.events)) {
|
|
8083
8083
|
store2.formData.events = [];
|
|
8084
8084
|
}
|
|
8085
|
-
|
|
8085
|
+
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
8086
8086
|
const finalPath = `${path}.events[${store2.formData.events.length}]`;
|
|
8087
8087
|
store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
|
|
8088
8088
|
},
|
|
@@ -8091,12 +8091,12 @@ var Component = (store2, dynamicData2, submitHandler, service2) => {
|
|
|
8091
8091
|
},
|
|
8092
8092
|
deletePopUpComponent: function() {
|
|
8093
8093
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8094
|
-
|
|
8094
|
+
sessionStorage.setItem("rowId", rowId);
|
|
8095
8095
|
store2.updateDialog("popUpComponentSection");
|
|
8096
8096
|
},
|
|
8097
8097
|
deletePopUpEvent: function() {
|
|
8098
8098
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8099
|
-
|
|
8099
|
+
sessionStorage.setItem("rowId", rowId);
|
|
8100
8100
|
store2.updateDialog("popUpEventSection");
|
|
8101
8101
|
}
|
|
8102
8102
|
};
|
|
@@ -8116,11 +8116,11 @@ var pageMaster = (funcParams) => {
|
|
|
8116
8116
|
var _a;
|
|
8117
8117
|
const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
8118
8118
|
const config = await funcParams.pageConfigProvider(id);
|
|
8119
|
-
const formData =
|
|
8119
|
+
const formData = getFormdataFromSessionStorage();
|
|
8120
8120
|
if (formData) {
|
|
8121
8121
|
return formData;
|
|
8122
8122
|
}
|
|
8123
|
-
|
|
8123
|
+
saveFormdataInSessionStorage(config);
|
|
8124
8124
|
return config;
|
|
8125
8125
|
},
|
|
8126
8126
|
getUiSchema: function() {
|
|
@@ -8130,7 +8130,7 @@ var pageMaster = (funcParams) => {
|
|
|
8130
8130
|
return PageMasterSchema;
|
|
8131
8131
|
},
|
|
8132
8132
|
backHandler: () => {
|
|
8133
|
-
|
|
8133
|
+
sessionStorage.removeItem("pageFormdata");
|
|
8134
8134
|
store2.navigate("/PageMasterRecords");
|
|
8135
8135
|
},
|
|
8136
8136
|
onAddClickHandler: function() {
|
|
@@ -8139,7 +8139,7 @@ var pageMaster = (funcParams) => {
|
|
|
8139
8139
|
if (!Array.isArray(store2.formData.elements)) {
|
|
8140
8140
|
store2.formData.elements = [];
|
|
8141
8141
|
}
|
|
8142
|
-
const response =
|
|
8142
|
+
const response = saveFormdataInSessionStorage(store2.ctx.core.data);
|
|
8143
8143
|
if (id) {
|
|
8144
8144
|
store2.navigate(
|
|
8145
8145
|
`/Component?path=${`elements[${response == null ? void 0 : response.elements.length}]`}&id=${id}`
|
|
@@ -8162,7 +8162,7 @@ var pageMaster = (funcParams) => {
|
|
|
8162
8162
|
if (!Array.isArray(store2.formData.events)) {
|
|
8163
8163
|
store2.formData.events = [];
|
|
8164
8164
|
}
|
|
8165
|
-
|
|
8165
|
+
saveFormdataInSessionStorage(store2.ctx.core.data);
|
|
8166
8166
|
const finalPath = `events[${store2.formData.events.length}]`;
|
|
8167
8167
|
store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
|
|
8168
8168
|
},
|
|
@@ -8170,26 +8170,26 @@ var pageMaster = (funcParams) => {
|
|
|
8170
8170
|
var _a;
|
|
8171
8171
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8172
8172
|
const id = (_a = store2.searchParams) == null ? void 0 : _a.get("id");
|
|
8173
|
-
|
|
8173
|
+
saveFormdataInSessionStorage(store2.ctx.core.data);
|
|
8174
8174
|
const finalPath = `events[${rowId}]`;
|
|
8175
8175
|
store2.navigate(`/ComponentEvents?path=${finalPath}&id=${id}`);
|
|
8176
8176
|
},
|
|
8177
8177
|
deleteEvent: function() {
|
|
8178
|
-
const rowId =
|
|
8178
|
+
const rowId = sessionStorage.getItem("rowId");
|
|
8179
8179
|
store2.formData.events.splice(rowId, 1);
|
|
8180
|
-
const response =
|
|
8180
|
+
const response = saveFormdataInSessionStorage(store2.ctx.core.data);
|
|
8181
8181
|
store2.setFormdata(response);
|
|
8182
8182
|
store2.updateDialog("popUpPageMasterEvent");
|
|
8183
|
-
|
|
8183
|
+
sessionStorage.removeItem("rowId");
|
|
8184
8184
|
},
|
|
8185
8185
|
deletePopUpComponent: function() {
|
|
8186
8186
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8187
|
-
|
|
8187
|
+
sessionStorage.setItem("rowId", rowId);
|
|
8188
8188
|
store2.updateDialog("popUpPageMasterComponent");
|
|
8189
8189
|
},
|
|
8190
8190
|
deletePopUpEvent: function() {
|
|
8191
8191
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8192
|
-
|
|
8192
|
+
sessionStorage.setItem("rowId", rowId);
|
|
8193
8193
|
store2.updateDialog("popUpPageMasterEvent");
|
|
8194
8194
|
}
|
|
8195
8195
|
};
|
|
@@ -8980,7 +8980,7 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
8980
8980
|
if (!Array.isArray(store2.formData.events)) {
|
|
8981
8981
|
store2.formData.events = [];
|
|
8982
8982
|
}
|
|
8983
|
-
|
|
8983
|
+
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
8984
8984
|
const finalPath = `${path}.events[${(_c = (_b = store2.formData) == null ? void 0 : _b.events) == null ? void 0 : _c.length}]`;
|
|
8985
8985
|
store2.searchParams.set("path", finalPath);
|
|
8986
8986
|
store2.setSearchParams(store2.searchParams);
|
|
@@ -8990,7 +8990,7 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
8990
8990
|
var _a;
|
|
8991
8991
|
const rowId = dynamicData2.path.split(".")[1];
|
|
8992
8992
|
const path = (_a = store2.searchParams) == null ? void 0 : _a.get("path");
|
|
8993
|
-
|
|
8993
|
+
saveFormdataInSessionStorage(store2.ctx.core.data, path);
|
|
8994
8994
|
const finalPath = `${path}.events[${rowId}]`;
|
|
8995
8995
|
store2.searchParams.set("path", finalPath);
|
|
8996
8996
|
store2.setSearchParams(store2.searchParams);
|
|
@@ -9005,7 +9005,7 @@ var event = (store2, dynamicData2, submitHandler, service2, functionsName) => {
|
|
|
9005
9005
|
},
|
|
9006
9006
|
deletePopUpEvent: function() {
|
|
9007
9007
|
const rowId = dynamicData2.path.split(".")[1];
|
|
9008
|
-
|
|
9008
|
+
sessionStorage.setItem("rowId", rowId);
|
|
9009
9009
|
store2.updateDialog("popUpEvent");
|
|
9010
9010
|
}
|
|
9011
9011
|
};
|
|
@@ -9244,7 +9244,7 @@ const buildBodyFormat = (body2, formData, userValue2, store2) => {
|
|
|
9244
9244
|
finalBody[elem.key] = value;
|
|
9245
9245
|
} else if ((_d = elem == null ? void 0 : elem.value) == null ? void 0 : _d.startsWith("$local")) {
|
|
9246
9246
|
const finalpath = elem.value.substring(7);
|
|
9247
|
-
const value = JSON.parse(
|
|
9247
|
+
const value = JSON.parse(sessionStorage.getItem(finalpath) || '""');
|
|
9248
9248
|
finalBody[elem.key] = value;
|
|
9249
9249
|
} else if ((_e = elem == null ? void 0 : elem.value) == null ? void 0 : _e.startsWith("$")) {
|
|
9250
9250
|
const finalpath = elem.value.substring(1);
|
|
@@ -9378,12 +9378,12 @@ var service = (funcParams) => {
|
|
|
9378
9378
|
var _a, _b, _c, _d;
|
|
9379
9379
|
funcParams.store.setFormdata({});
|
|
9380
9380
|
funcParams.store.newData = {};
|
|
9381
|
-
const pageBasicDetailString =
|
|
9381
|
+
const pageBasicDetailString = sessionStorage.getItem("pagemasterMetaData");
|
|
9382
9382
|
if (pageBasicDetailString) {
|
|
9383
9383
|
pageData = JSON.parse(pageBasicDetailString);
|
|
9384
9384
|
} else {
|
|
9385
9385
|
pageData = await funcParams.pageDataProvider();
|
|
9386
|
-
|
|
9386
|
+
sessionStorage.setItem("pagemasterMetaData", JSON.stringify({
|
|
9387
9387
|
schema: pageData == null ? void 0 : pageData.schema,
|
|
9388
9388
|
uiSchema: pageData == null ? void 0 : pageData.uiSchema,
|
|
9389
9389
|
config: pageData == null ? void 0 : pageData.config
|
|
@@ -10614,8 +10614,8 @@ const buildTable = (config, componentScope) => {
|
|
|
10614
10614
|
if (config.enableExpanding) {
|
|
10615
10615
|
table.config.main.enableExpanding = config.enableExpanding === "YES" ? true : false;
|
|
10616
10616
|
}
|
|
10617
|
-
if (config.
|
|
10618
|
-
table.config.main.
|
|
10617
|
+
if (config.enableExpandAll) {
|
|
10618
|
+
table.config.main.enableExpandAll = config.enableExpandAll === "YES" ? true : false;
|
|
10619
10619
|
}
|
|
10620
10620
|
if (config.treeStructure) {
|
|
10621
10621
|
table.config.main.treeStructure = config.treeStructure === "YES" ? "flatTreeMap" : false;
|
|
@@ -11862,5 +11862,5 @@ const buildUiSchema = (config) => {
|
|
|
11862
11862
|
}
|
|
11863
11863
|
return elements;
|
|
11864
11864
|
};
|
|
11865
|
-
export { buildConfig, buildSchema, buildUiSchema,
|
|
11865
|
+
export { buildConfig, buildSchema, buildUiSchema, clearFromSessionStorage, pageMaster, Component as pageMasterComponents, event as pageMasterEvents, service as pageService, schema };
|
|
11866
11866
|
//# sourceMappingURL=impaktapps-ui-builder.es.js.map
|