@neowhale/storefront 0.2.60 → 0.2.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/landing.global.js +24 -2
- package/dist/react/index.cjs +24 -2
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +24 -2
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/landing.global.js
CHANGED
|
@@ -1264,6 +1264,7 @@ var WhaleStorefront = (function (exports) {
|
|
|
1264
1264
|
});
|
|
1265
1265
|
}
|
|
1266
1266
|
setStatus("success");
|
|
1267
|
+
onEvent?.("cta_click", { label: buttonText, source: c.source || "landing_page", landing_page_slug: slug || void 0 });
|
|
1267
1268
|
onEvent?.("lead", { email, first_name: firstName || void 0, source: c.source || "landing_page", landing_page_slug: slug || void 0 });
|
|
1268
1269
|
} catch (err) {
|
|
1269
1270
|
setErrorMsg(err instanceof Error ? err.message : "Something went wrong. Please try again.");
|
|
@@ -1412,7 +1413,15 @@ var WhaleStorefront = (function (exports) {
|
|
|
1412
1413
|
"button",
|
|
1413
1414
|
{
|
|
1414
1415
|
onClick: () => {
|
|
1415
|
-
|
|
1416
|
+
const dest = new URL(ctaUrl || "/shop", window.location.origin);
|
|
1417
|
+
const current = new URLSearchParams(window.location.search);
|
|
1418
|
+
for (const key of ["utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term", "fbclid", "gclid"]) {
|
|
1419
|
+
const val = current.get(key);
|
|
1420
|
+
if (val && !dest.searchParams.has(key)) dest.searchParams.set(key, val);
|
|
1421
|
+
}
|
|
1422
|
+
const vid = typeof localStorage !== "undefined" && localStorage.getItem("wt_vid");
|
|
1423
|
+
if (vid) dest.searchParams.set("wt_vid", vid);
|
|
1424
|
+
window.location.href = dest.toString();
|
|
1416
1425
|
},
|
|
1417
1426
|
style: {
|
|
1418
1427
|
marginTop: "1.5rem",
|
|
@@ -1741,7 +1750,20 @@ var WhaleStorefront = (function (exports) {
|
|
|
1741
1750
|
alignItems: "center",
|
|
1742
1751
|
gap: "0.375rem"
|
|
1743
1752
|
}, children: [
|
|
1744
|
-
badge.icon && /* @__PURE__ */ jsx("span", { style: { fontSize: "0.9rem" }, children:
|
|
1753
|
+
badge.icon && /* @__PURE__ */ jsx("span", { style: { fontSize: "0.9rem" }, children: {
|
|
1754
|
+
truck: "\u{1F69A}",
|
|
1755
|
+
flask: "\u{1F9EA}",
|
|
1756
|
+
map: "\u{1F5FA}\uFE0F",
|
|
1757
|
+
shield: "\u{1F6E1}\uFE0F",
|
|
1758
|
+
star: "\u2B50",
|
|
1759
|
+
check: "\u2713",
|
|
1760
|
+
lock: "\u{1F512}",
|
|
1761
|
+
heart: "\u2764\uFE0F",
|
|
1762
|
+
leaf: "\u{1F33F}",
|
|
1763
|
+
clock: "\u23F1\uFE0F",
|
|
1764
|
+
gift: "\u{1F381}",
|
|
1765
|
+
fire: "\u{1F525}"
|
|
1766
|
+
}[badge.icon] || badge.icon }),
|
|
1745
1767
|
/* @__PURE__ */ jsx("span", { style: {
|
|
1746
1768
|
fontSize: "0.7rem",
|
|
1747
1769
|
fontWeight: 500,
|
package/dist/react/index.cjs
CHANGED
|
@@ -2999,6 +2999,7 @@ function LeadCaptureSection({ section, data, theme, onEvent }) {
|
|
|
2999
2999
|
});
|
|
3000
3000
|
}
|
|
3001
3001
|
setStatus("success");
|
|
3002
|
+
onEvent?.("cta_click", { label: buttonText, source: c.source || "landing_page", landing_page_slug: slug || void 0 });
|
|
3002
3003
|
onEvent?.("lead", { email, first_name: firstName || void 0, source: c.source || "landing_page", landing_page_slug: slug || void 0 });
|
|
3003
3004
|
} catch (err) {
|
|
3004
3005
|
setErrorMsg(err instanceof Error ? err.message : "Something went wrong. Please try again.");
|
|
@@ -3147,7 +3148,15 @@ function SuccessState({ theme, heading, message, couponCode, ctaText, ctaUrl })
|
|
|
3147
3148
|
"button",
|
|
3148
3149
|
{
|
|
3149
3150
|
onClick: () => {
|
|
3150
|
-
|
|
3151
|
+
const dest = new URL(ctaUrl || "/shop", window.location.origin);
|
|
3152
|
+
const current = new URLSearchParams(window.location.search);
|
|
3153
|
+
for (const key of ["utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term", "fbclid", "gclid"]) {
|
|
3154
|
+
const val = current.get(key);
|
|
3155
|
+
if (val && !dest.searchParams.has(key)) dest.searchParams.set(key, val);
|
|
3156
|
+
}
|
|
3157
|
+
const vid = typeof localStorage !== "undefined" && localStorage.getItem("wt_vid");
|
|
3158
|
+
if (vid) dest.searchParams.set("wt_vid", vid);
|
|
3159
|
+
window.location.href = dest.toString();
|
|
3151
3160
|
},
|
|
3152
3161
|
style: {
|
|
3153
3162
|
marginTop: "1.5rem",
|
|
@@ -3474,7 +3483,20 @@ function TrustBadgesSection({ section, theme }) {
|
|
|
3474
3483
|
alignItems: "center",
|
|
3475
3484
|
gap: "0.375rem"
|
|
3476
3485
|
}, children: [
|
|
3477
|
-
badge.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.9rem" }, children:
|
|
3486
|
+
badge.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.9rem" }, children: {
|
|
3487
|
+
truck: "\u{1F69A}",
|
|
3488
|
+
flask: "\u{1F9EA}",
|
|
3489
|
+
map: "\u{1F5FA}\uFE0F",
|
|
3490
|
+
shield: "\u{1F6E1}\uFE0F",
|
|
3491
|
+
star: "\u2B50",
|
|
3492
|
+
check: "\u2713",
|
|
3493
|
+
lock: "\u{1F512}",
|
|
3494
|
+
heart: "\u2764\uFE0F",
|
|
3495
|
+
leaf: "\u{1F33F}",
|
|
3496
|
+
clock: "\u23F1\uFE0F",
|
|
3497
|
+
gift: "\u{1F381}",
|
|
3498
|
+
fire: "\u{1F525}"
|
|
3499
|
+
}[badge.icon] || badge.icon }),
|
|
3478
3500
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: {
|
|
3479
3501
|
fontSize: "0.7rem",
|
|
3480
3502
|
fontWeight: 500,
|