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