coral-plus 0.0.14 → 0.0.16
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/coralPlus.js +8 -2
- package/package.json +1 -1
package/dist/coralPlus.js
CHANGED
|
@@ -36042,10 +36042,16 @@ function HO() {
|
|
|
36042
36042
|
function Ok(e) {
|
|
36043
36043
|
const t = HO();
|
|
36044
36044
|
if (!t) return null;
|
|
36045
|
-
const n = (i) => i === "services" ? e?.services?.join(", ") : i === "name" ? insider_object?.user?.name : i === "email" ? insider_object?.user?.email : i === "marketingConsent" ? `${e?.formData?.marketingConsent}` : i === "tripStartDate" ? d$(e?.formData?.tripPeriod[0]) : i === "tripEndDate" ? d$(e?.formData?.tripPeriod[1]) : `${e?.formData?.[i] ?? ""}
|
|
36045
|
+
const n = (i) => i === "services" ? e?.services?.join(", ") : i === "name" ? insider_object?.user?.name : i === "email" ? insider_object?.user?.email : i === "marketingConsent" ? `${e?.formData?.marketingConsent}` : i === "tripStartDate" ? d$(e?.formData?.tripPeriod[0]) : i === "tripEndDate" ? d$(e?.formData?.tripPeriod[1]) : `${e?.formData?.[i] ?? ""}`;
|
|
36046
|
+
if (Object.keys(t).filter((i) => i !== "name").find((i) => {
|
|
36047
|
+
const s = n(i);
|
|
36048
|
+
return !s || s === "undefined" || s === "";
|
|
36049
|
+
}))
|
|
36050
|
+
return console.error("Missing required value"), null;
|
|
36051
|
+
const a = (i) => i === "email" ? "ins-dynamic-email-" : i === "marketingConsent" ? "ins-option-input-" : "ins-dynamic-input-";
|
|
36046
36052
|
return Object.entries(t).reduce((i, [s, u]) => {
|
|
36047
36053
|
const d = document.querySelector(`[id="${a(s)}${u}"]`);
|
|
36048
|
-
return d && (d.value = n(s), i[s] = d.value), i;
|
|
36054
|
+
return d && (d.value = n(s), s === "marketingConsent" && (d.checked = n(s) === "true"), i[s] = d.value), i;
|
|
36049
36055
|
}, {});
|
|
36050
36056
|
}
|
|
36051
36057
|
function _k() {
|