coral-plus 0.0.15 → 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 CHANGED
@@ -36042,7 +36042,13 @@ 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] ?? ""}`, a = (i) => i === "email" ? "ins-dynamic-email-" : i === "marketingConsent" ? "ins-option-input-" : "ins-dynamic-input-";
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
36054
  return d && (d.value = n(s), s === "marketingConsent" && (d.checked = n(s) === "true"), i[s] = d.value), i;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "coral-plus",
3
3
  "private": false,
4
- "version": "0.0.15",
4
+ "version": "0.0.16",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",