impaktapps-ui-builder 0.0.412-mtreemap.20 → 0.0.412-mtreemap.22
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.
|
@@ -8757,7 +8757,6 @@ function getRefreshElements(eventConfig, eventGropus) {
|
|
|
8757
8757
|
result.push(result[0]);
|
|
8758
8758
|
}
|
|
8759
8759
|
}
|
|
8760
|
-
console.log(result);
|
|
8761
8760
|
return result;
|
|
8762
8761
|
}
|
|
8763
8762
|
async function executeRefreshHandler(params2) {
|
|
@@ -8859,17 +8858,25 @@ function mergeFormdata(handlerResponse, componentName, eventConfig, store2, serv
|
|
|
8859
8858
|
}
|
|
8860
8859
|
}
|
|
8861
8860
|
}
|
|
8862
|
-
const buildBodyFormat = (body2, formData, userValue2) => {
|
|
8861
|
+
const buildBodyFormat = (body2, formData, userValue2, store2) => {
|
|
8863
8862
|
let finalBody = { ...userValue2 == null ? void 0 : userValue2.payload };
|
|
8864
8863
|
body2.map((elem) => {
|
|
8865
|
-
var _a, _b;
|
|
8864
|
+
var _a, _b, _c, _d, _e;
|
|
8866
8865
|
if (typeof (elem == null ? void 0 : elem.value) !== "string") {
|
|
8867
8866
|
finalBody[elem.key] = elem.value;
|
|
8868
8867
|
} else {
|
|
8869
8868
|
if ((_a = elem == null ? void 0 : elem.value) == null ? void 0 : _a.startsWith("$userValue")) {
|
|
8870
8869
|
const finalpath = elem.value.substring(11);
|
|
8871
8870
|
finalBody[elem.key] = _.get(userValue2, finalpath);
|
|
8872
|
-
} else if ((_b = elem == null ? void 0 : elem.value) == null ? void 0 : _b.startsWith("$")) {
|
|
8871
|
+
} else if ((_b = elem == null ? void 0 : elem.value) == null ? void 0 : _b.startsWith("$urlParams")) {
|
|
8872
|
+
const finalpath = elem.value.substring(11);
|
|
8873
|
+
const value = (_c = store2 == null ? void 0 : store2.searchParams) == null ? void 0 : _c.get(finalpath);
|
|
8874
|
+
finalBody[elem.key] = value;
|
|
8875
|
+
} else if ((_d = elem == null ? void 0 : elem.value) == null ? void 0 : _d.startsWith("$local")) {
|
|
8876
|
+
const finalpath = elem.value.substring(7);
|
|
8877
|
+
const value = JSON.parse(localStorage.getItem(finalpath) || '""');
|
|
8878
|
+
finalBody[elem.key] = value;
|
|
8879
|
+
} else if ((_e = elem == null ? void 0 : elem.value) == null ? void 0 : _e.startsWith("$")) {
|
|
8873
8880
|
const finalpath = elem.value.substring(1);
|
|
8874
8881
|
finalBody[elem.key] = _.get(formData, finalpath);
|
|
8875
8882
|
} else if ((elem == null ? void 0 : elem.value) === "*" && (elem == null ? void 0 : elem.key) === "*") {
|
|
@@ -8917,7 +8924,7 @@ function buildApiPayload(compConfig, body, headers, store, dynamicData, userValu
|
|
|
8917
8924
|
headers = buildHeadersFormat(compConfig.headers);
|
|
8918
8925
|
}
|
|
8919
8926
|
if (compConfig.body) {
|
|
8920
|
-
body = { ...buildBodyFormat(compConfig.body, store.newData || ((_b = (_a = store == null ? void 0 : store.ctx) == null ? void 0 : _a.core) == null ? void 0 : _b.data) || store.formData, userValue) };
|
|
8927
|
+
body = { ...buildBodyFormat(compConfig.body, store.newData || ((_b = (_a = store == null ? void 0 : store.ctx) == null ? void 0 : _a.core) == null ? void 0 : _b.data) || store.formData, userValue, store) };
|
|
8921
8928
|
}
|
|
8922
8929
|
const promiseChain = { body, headers };
|
|
8923
8930
|
if (compConfig.apiBody) {
|