@zonos/elements 1.3.261 → 1.3.262
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/cjs/index.cjs.js +12 -9
- package/dist/cjs/{paypal-73a542cb.js → paypal-e278f405.js} +140 -6
- package/dist/cjs/submitGtag-4241212b.js +167 -0
- package/dist/cjs/zonos-card_5.cjs.entry.js +2 -2
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +30 -21
- package/dist/cjs/zonos-checkout.cjs.entry.js +7 -7
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +8 -8
- package/dist/cjs/zonos-collect.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +8 -8
- package/dist/cjs/zonos-invoice.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +12 -12
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +7 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +7 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +6 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +7 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +7 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +6 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +6 -6
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +6 -6
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +2 -2
- package/dist/collection/components/main/zonos-controller.js +2 -2
- package/dist/collection/components/store/checkout/paypal.js +4 -4
- package/dist/collection/components/utils/analytics/analyticsRelayState.js +112 -0
- package/dist/collection/components/utils/analytics/mapToFbEvent.js +66 -0
- package/dist/collection/components/utils/submitAnalytics.js +16 -0
- package/dist/collection/components/utils/submitFbq.js +56 -0
- package/dist/collection/components/utils/submitGtag.js +15 -78
- package/dist/collection/scripts/_zonosBase.js +5 -2
- package/dist/collection/types/analyticsRelay.js +2 -2
- package/dist/esm/index.js +12 -9
- package/dist/esm/{paypal-38ca5d21.js → paypal-d8804da5.js} +142 -9
- package/dist/esm/submitGtag-7f5c5bb5.js +162 -0
- package/dist/esm/zonos-card_5.entry.js +2 -2
- package/dist/esm/zonos-cart-items_12.entry.js +30 -21
- package/dist/esm/zonos-checkout.entry.js +7 -7
- package/dist/esm/zonos-collect-finish_6.entry.js +8 -8
- package/dist/esm/zonos-collect.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +3 -3
- package/dist/esm/zonos-invoice-finish_5.entry.js +8 -8
- package/dist/esm/zonos-invoice.entry.js +2 -2
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/paypal-d8804da5.js +17 -0
- package/dist/esm-es5/submitGtag-7f5c5bb5.js +1 -0
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/scripts/analyticsRelayOnInit.js +1 -1
- package/dist/scripts/index.d.ts +11 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/utils/analytics/analyticsRelayState.d.ts +43 -0
- package/dist/types/components/utils/analytics/mapToFbEvent.d.ts +11 -0
- package/dist/types/components/utils/submitAnalytics.d.ts +12 -0
- package/dist/types/components/utils/submitFbq.d.ts +14 -0
- package/dist/types/components/utils/submitGtag.d.ts +4 -9
- package/dist/types/scripts/_zonosBase.d.ts +11 -0
- package/dist/types/types/analyticsRelay.d.ts +19 -3
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-022ddd4a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-6726fee0.entry.js → p-06ef4d79.entry.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-e684e68f.entry.js → p-3deb91cb.entry.js} +1 -1
- package/dist/zonos-elements/{p-eca03303.system.entry.js → p-56c11359.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5dd78b4b.js +1 -0
- package/dist/zonos-elements/{p-d2ef0416.system.entry.js → p-66934a78.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e14f421d.system.entry.js → p-7237f43b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-72a181b5.entry.js +1 -0
- package/dist/zonos-elements/p-75a27c68.entry.js +1 -0
- package/dist/zonos-elements/{p-3c3139d2.system.entry.js → p-7df3e44b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-838e335c.entry.js +1 -0
- package/dist/zonos-elements/p-947f5092.js +17 -0
- package/dist/zonos-elements/{p-1917202e.system.entry.js → p-9de27162.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-be1032ab.system.entry.js → p-a2b3c1ef.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a98b8b68.system.js +18 -0
- package/dist/zonos-elements/p-ca411d97.entry.js +1 -0
- package/dist/zonos-elements/p-cab6bd98.system.js +1 -0
- package/dist/zonos-elements/p-dee6adff.system.js +1 -0
- package/dist/zonos-elements/{p-2c9714e8.system.entry.js → p-e36e724b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8df3c6a0.entry.js → p-e673a4d9.entry.js} +1 -1
- package/dist/zonos-elements/{p-7793d334.entry.js → p-f2909fb8.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/submitGtag-9ac5a42e.js +0 -116
- package/dist/esm/submitGtag-543058f9.js +0 -113
- package/dist/esm-es5/paypal-38ca5d21.js +0 -17
- package/dist/esm-es5/submitGtag-543058f9.js +0 -1
- package/dist/zonos-elements/p-03e53ef5.entry.js +0 -1
- package/dist/zonos-elements/p-17a8a514.system.js +0 -1
- package/dist/zonos-elements/p-24407504.js +0 -17
- package/dist/zonos-elements/p-31bd3851.system.js +0 -1
- package/dist/zonos-elements/p-387f6a4d.js +0 -1
- package/dist/zonos-elements/p-47bde0ba.system.js +0 -18
- package/dist/zonos-elements/p-5dff9d51.system.entry.js +0 -1
- package/dist/zonos-elements/p-9cfd1dc3.entry.js +0 -1
- package/dist/zonos-elements/p-eeff2b04.entry.js +0 -1
- package/dist/zonos-elements/p-f4030586.entry.js +0 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
2
|
+
import { g as getIsTestMode } from './handleFetch-a844cac1.js';
|
|
3
|
+
import { l as log } from './VarianceTest-572cecf5.js';
|
|
4
|
+
|
|
5
|
+
/** Message type for zonos-analytic events sent from iframe to parent. */
|
|
6
|
+
const ZONOS_ANALYTIC_TYPE = 'zonos-analytic';
|
|
7
|
+
/** Ping sent by iframe to configure parent's analytics relay (e.g. GA, FB Pixel) and get ready signal. */
|
|
8
|
+
const RELAY_PING_TYPE = 'zonos-analytics-relay-ping';
|
|
9
|
+
/** Response from parent when an analytics relay (e.g. gtag, fbq) is ready. */
|
|
10
|
+
const RELAY_READY_TYPE = 'zonos-analytics-relay-ready';
|
|
11
|
+
|
|
12
|
+
const providerReady = {
|
|
13
|
+
fbq: false,
|
|
14
|
+
gtag: false,
|
|
15
|
+
};
|
|
16
|
+
const queue = [];
|
|
17
|
+
let listenerAdded = false;
|
|
18
|
+
const isInIframe = () => typeof window !== 'undefined' && window.parent !== window;
|
|
19
|
+
const flushQueue = () => {
|
|
20
|
+
// Walk a copy and rebuild to keep events whose provider isn't ready yet
|
|
21
|
+
const remaining = [];
|
|
22
|
+
while (queue.length > 0) {
|
|
23
|
+
const event = queue.shift();
|
|
24
|
+
if (!providerReady[event.provider]) {
|
|
25
|
+
remaining.push(event);
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
try {
|
|
29
|
+
window.parent.postMessage({
|
|
30
|
+
event: event.event,
|
|
31
|
+
fbqMode: event.fbqMode,
|
|
32
|
+
metadata: event.payload,
|
|
33
|
+
provider: event.provider,
|
|
34
|
+
type: ZONOS_ANALYTIC_TYPE,
|
|
35
|
+
}, '*');
|
|
36
|
+
}
|
|
37
|
+
catch (_a) {
|
|
38
|
+
// Ignore postMessage failures
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
queue.push(...remaining);
|
|
42
|
+
};
|
|
43
|
+
const ensureListener = () => {
|
|
44
|
+
if (listenerAdded)
|
|
45
|
+
return;
|
|
46
|
+
listenerAdded = true;
|
|
47
|
+
window.addEventListener('message', (e) => {
|
|
48
|
+
var _a;
|
|
49
|
+
if (((_a = e.data) === null || _a === void 0 ? void 0 : _a.type) !== RELAY_READY_TYPE)
|
|
50
|
+
return;
|
|
51
|
+
// Older parent scripts may omit `provider`; treat as gtag for backward compatibility.
|
|
52
|
+
const provider = e.data.provider || 'gtag';
|
|
53
|
+
providerReady[provider] = true;
|
|
54
|
+
if (typeof window.Zonos !== 'undefined') {
|
|
55
|
+
if (provider === 'gtag') {
|
|
56
|
+
window.Zonos.googleAnalyticReady = true;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
window.Zonos.facebookPixelReady = true;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
flushQueue();
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Send a ping to the parent so it can inject/configure analytics relays for the providers we care about.
|
|
67
|
+
* Picks up `googleAnalyticId` and `facebookPixelId` from `window.Zonos`, both of which may be set by `customHTML`.
|
|
68
|
+
*/
|
|
69
|
+
const sendRelayPing = () => {
|
|
70
|
+
if (!isInIframe())
|
|
71
|
+
return;
|
|
72
|
+
ensureListener();
|
|
73
|
+
try {
|
|
74
|
+
const z = typeof window.Zonos !== 'undefined' ? window.Zonos : undefined;
|
|
75
|
+
window.parent.postMessage({
|
|
76
|
+
facebookPixelId: z === null || z === void 0 ? void 0 : z.facebookPixelId,
|
|
77
|
+
googleAnalyticId: z === null || z === void 0 ? void 0 : z.googleAnalyticId,
|
|
78
|
+
type: RELAY_PING_TYPE,
|
|
79
|
+
}, '*');
|
|
80
|
+
}
|
|
81
|
+
catch (_a) {
|
|
82
|
+
// Ignore postMessage failures
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Sends ping to parent so it can inject/configure analytics relays and respond with ready.
|
|
87
|
+
* Call after customHTML or custom script sets `window.Zonos.googleAnalyticId` / `window.Zonos.facebookPixelId`.
|
|
88
|
+
*/
|
|
89
|
+
const ensureAnalyticsRelayPing$1 = () => {
|
|
90
|
+
if (!isInIframe())
|
|
91
|
+
return;
|
|
92
|
+
// If both providers are already ready, no need to ping again
|
|
93
|
+
if (providerReady.gtag && providerReady.fbq)
|
|
94
|
+
return;
|
|
95
|
+
sendRelayPing();
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Queue an analytic event for relay to parent. If the provider's relay is already ready,
|
|
99
|
+
* the event is forwarded immediately; otherwise it waits for the ready signal.
|
|
100
|
+
*/
|
|
101
|
+
const enqueueRelayEvent = (event) => {
|
|
102
|
+
ensureListener();
|
|
103
|
+
if (providerReady[event.provider]) {
|
|
104
|
+
try {
|
|
105
|
+
window.parent.postMessage({
|
|
106
|
+
event: event.event,
|
|
107
|
+
fbqMode: event.fbqMode,
|
|
108
|
+
metadata: event.payload,
|
|
109
|
+
provider: event.provider,
|
|
110
|
+
type: ZONOS_ANALYTIC_TYPE,
|
|
111
|
+
}, '*');
|
|
112
|
+
}
|
|
113
|
+
catch (_a) {
|
|
114
|
+
// Ignore postMessage failures
|
|
115
|
+
}
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
queue.push(event);
|
|
119
|
+
// Re-ping in case the parent hasn't received the ID yet (e.g. customHTML set it after init)
|
|
120
|
+
sendRelayPing();
|
|
121
|
+
};
|
|
122
|
+
const isAnalyticsRelayInIframe = isInIframe;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Re-export of the shared relay ping helper. Kept here for backward compatibility with
|
|
126
|
+
* existing import paths (e.g. `zonos-controller`).
|
|
127
|
+
*/
|
|
128
|
+
const ensureAnalyticsRelayPing = ensureAnalyticsRelayPing$1;
|
|
129
|
+
const isGoogleAnalyticsEnabled = () => {
|
|
130
|
+
const provider = zonosStore.checkoutSettings.analyticsProviders.find(item => item.type === 'GOOGLE_ANALYTICS');
|
|
131
|
+
return !!provider && provider.status === 'ENABLED';
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Submit a gtag event if the gtag function is available.
|
|
135
|
+
* When running inside an iframe, only posts to parent after the parent has
|
|
136
|
+
* confirmed (via analyticsRelayOnInit) that gtag is available.
|
|
137
|
+
*/
|
|
138
|
+
const submitGtag = ({ event, metadata }) => {
|
|
139
|
+
if (!isGoogleAnalyticsEnabled()) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
const isTestMode = getIsTestMode();
|
|
143
|
+
const payload = Object.assign(Object.assign({}, metadata), (isTestMode && { isTestMode: true }));
|
|
144
|
+
// filter null key
|
|
145
|
+
const filteredPayload = Object.fromEntries(Object.entries(payload).filter(([_, value]) => value !== null));
|
|
146
|
+
if (isAnalyticsRelayInIframe()) {
|
|
147
|
+
// gtag does not work in iframe; must relay to parent via postMessage
|
|
148
|
+
enqueueRelayEvent({
|
|
149
|
+
event,
|
|
150
|
+
payload: filteredPayload,
|
|
151
|
+
provider: 'gtag',
|
|
152
|
+
});
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
// Not in iframe: call gtag directly
|
|
156
|
+
if (typeof window.gtag === 'function') {
|
|
157
|
+
log('Zonos submits gtag event', 'log', event);
|
|
158
|
+
window.gtag('event', event, filteredPayload);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export { ensureAnalyticsRelayPing as a, enqueueRelayEvent as e, isAnalyticsRelayInIframe as i, submitGtag as s };
|
|
@@ -5,11 +5,11 @@ import { g as getBorderRadius } from './getBorderRadius-66de1b16.js';
|
|
|
5
5
|
import { b as stripeStore, t as trackConversionEvent } from './cart-c490d252.js';
|
|
6
6
|
import { s as storageStore } from './localization-542dbe20.js';
|
|
7
7
|
import { l as logError } from './handleFetch-a844cac1.js';
|
|
8
|
-
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-
|
|
8
|
+
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-d8804da5.js';
|
|
9
9
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
10
10
|
import './isDarkColor-8092a9fb.js';
|
|
11
11
|
import './isContrastColor-f9e65e70.js';
|
|
12
|
-
import './submitGtag-
|
|
12
|
+
import './submitGtag-7f5c5bb5.js';
|
|
13
13
|
|
|
14
14
|
const zonosCardCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .styled-card{border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-6));padding:var(--spacing, 24px);text-align:left;background-color:var(--zonos--background-color);overflow:hidden}:host .styled-card hr{margin-left:calc(var(--spacing, 24px) * -1);margin-right:calc(var(--spacing, 24px) * -1)}:host .styled-card .card-header{margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-bottom:var(--spacing, 24px);border-bottom:var(--zonos-elements-border);height:65px;line-height:65px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host .styled-card .card-header h5{margin-bottom:0;-ms-flex:1;flex:1}:host .styled-card .card-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:calc(var(--spacing, 24px) * -1);padding:var(--spacing, 24px);border-top:var(--zonos-elements-border);background:var(--zonos-elements-surface-color-secondary);margin-top:var(--spacing, 24px);border-bottom-left-radius:var(--zonos-elements-radius-8);border-bottom-right-radius:var(--zonos-elements-radius-8);height:var(--footerHeight)}";
|
|
15
15
|
const ZonosCardStyle0 = zonosCardCss;
|
|
@@ -6,12 +6,11 @@ import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-5f7856f2.js';
|
|
|
6
6
|
import { c as classes } from './classes-0d95c529.js';
|
|
7
7
|
import { z as zonosStore, h as zonosStoreOnChange, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-f1d45eac.js';
|
|
8
8
|
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-7a0ce66a.js';
|
|
9
|
-
import { c as paypalStoreReset, a as paypalStore } from './paypal-
|
|
9
|
+
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore } from './paypal-d8804da5.js';
|
|
10
10
|
import { h as handleFetch, s as sendErrorLog, j as jsonParse, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
|
|
11
11
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
12
12
|
import { g as getBorderRadius } from './getBorderRadius-66de1b16.js';
|
|
13
13
|
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
14
|
-
import { s as submitGtag } from './submitGtag-543058f9.js';
|
|
15
14
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
16
15
|
import { p as placeTestOrder } from './placeTestOrder-d7001709.js';
|
|
17
16
|
import { i as isDarkColor } from './isDarkColor-8092a9fb.js';
|
|
@@ -22,6 +21,7 @@ import { c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js'
|
|
|
22
21
|
import { s as shouldRenderShortAddressCodeInput, a as shouldRenderTaxIdInput } from './shouldRenderTaxIdInput-2572bf77.js';
|
|
23
22
|
import { e as euCountryCodes } from './TaxId-50d72254.js';
|
|
24
23
|
import './isContrastColor-f9e65e70.js';
|
|
24
|
+
import './submitGtag-7f5c5bb5.js';
|
|
25
25
|
import './debounce-8faafc9f.js';
|
|
26
26
|
import './ShortAddressCode-7620e622.js';
|
|
27
27
|
|
|
@@ -683,7 +683,7 @@ const ZonosCheckoutFinish = class {
|
|
|
683
683
|
window.history.replaceState({}, '', url.toString());
|
|
684
684
|
// Payment doesn't go through
|
|
685
685
|
if (error && (messages === null || messages === void 0 ? void 0 : messages.length)) {
|
|
686
|
-
|
|
686
|
+
submitAnalytics({
|
|
687
687
|
event: 'zonos-checkout-payment-fail',
|
|
688
688
|
metadata: {
|
|
689
689
|
checkoutSessionId: storageStore.checkoutSessionId,
|
|
@@ -704,14 +704,14 @@ const ZonosCheckoutFinish = class {
|
|
|
704
704
|
// Save new order info in case the user reloads before we get order info
|
|
705
705
|
this.saveOrderIdForDuplicationIssue();
|
|
706
706
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
707
|
-
|
|
707
|
+
submitAnalytics({
|
|
708
708
|
event: 'zonos-checkout-success',
|
|
709
709
|
metadata: this.buildPurchaseMetadata({
|
|
710
710
|
checkoutSessionId: checkoutSessionId || '',
|
|
711
711
|
currency: currency === null || currency === void 0 ? void 0 : currency.toUpperCase(),
|
|
712
712
|
}),
|
|
713
713
|
});
|
|
714
|
-
|
|
714
|
+
submitAnalytics({
|
|
715
715
|
event: 'purchase',
|
|
716
716
|
metadata: this.buildPurchaseMetadata({
|
|
717
717
|
checkoutSessionId: checkoutSessionId || '',
|
|
@@ -763,13 +763,13 @@ const ZonosCheckoutFinish = class {
|
|
|
763
763
|
// show success message right away when order id is already created
|
|
764
764
|
this.isLoading = false;
|
|
765
765
|
if (paypalStore.orderIdCreated) {
|
|
766
|
-
|
|
766
|
+
submitAnalytics({
|
|
767
767
|
event: 'zonos-checkout-success',
|
|
768
768
|
metadata: this.buildPurchaseMetadata({
|
|
769
769
|
checkoutSessionId: storageStore.checkoutSessionId || '',
|
|
770
770
|
}),
|
|
771
771
|
});
|
|
772
|
-
|
|
772
|
+
submitAnalytics({
|
|
773
773
|
event: 'purchase',
|
|
774
774
|
metadata: this.buildPurchaseMetadata({
|
|
775
775
|
checkoutSessionId: storageStore.checkoutSessionId || '',
|
|
@@ -800,13 +800,13 @@ const ZonosCheckoutFinish = class {
|
|
|
800
800
|
this.isLoading = false;
|
|
801
801
|
if (storeCreditStore.orderIdCreated) {
|
|
802
802
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
803
|
-
|
|
803
|
+
submitAnalytics({
|
|
804
804
|
event: 'zonos-checkout-success',
|
|
805
805
|
metadata: this.buildPurchaseMetadata({
|
|
806
806
|
checkoutSessionId: checkoutSessionId || '',
|
|
807
807
|
}),
|
|
808
808
|
});
|
|
809
|
-
|
|
809
|
+
submitAnalytics({
|
|
810
810
|
event: 'purchase',
|
|
811
811
|
metadata: this.buildPurchaseMetadata({
|
|
812
812
|
checkoutSessionId: checkoutSessionId || '',
|
|
@@ -880,11 +880,11 @@ const ZonosCheckoutFinish = class {
|
|
|
880
880
|
}
|
|
881
881
|
render() {
|
|
882
882
|
const isTestMode = getIsTestMode();
|
|
883
|
-
return (h(Host, { key: '
|
|
883
|
+
return (h(Host, { key: '97291e81aef62884ec0519d93dcc7ff184b2913d', class: "zonos--checkout-finish zonos--elements", style: {
|
|
884
884
|
'--zonos--border-radius': getBorderRadius({
|
|
885
885
|
overrideBorderStyle: this.borderRadius,
|
|
886
886
|
}),
|
|
887
|
-
} }, this.isImmediateRedirecting && (h("div", { key: '
|
|
887
|
+
} }, this.isImmediateRedirecting && (h("div", { key: '40569271fb67acb22a4a0fa3c0fc8e1c0c641061', class: "loading-wrapper" }, h("zonos-spinner", { key: '8b431c7751e5e32fe97f4244151ece7de3c6d9bc', size: 48 }))), !this.isLoading && !this.isImmediateRedirecting && (h("div", { key: '0f5c89c285acf8c4f79e058c69cde9011df7e1a2', class: "zonos--finish-details" }, h("div", { key: '7491b15a90941476338ec6b1738312ffd4ebd2c0', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: '87e0d022014596b02d813ee510917b7ec9b55e09', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: '456bd678d5ba6f5b74da34f906bbe9f4bed870ac', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (h("zonos-button", { key: 'ebde02a73e71ad88d7d68629f2cd8a34d961aa63',
|
|
888
888
|
// Only show loading spinner if it's not an error notification
|
|
889
889
|
loading: this.isWaitingToRedirect &&
|
|
890
890
|
this.notificationType !== 'error', onClick: () => {
|
|
@@ -896,9 +896,9 @@ const ZonosCheckoutFinish = class {
|
|
|
896
896
|
}
|
|
897
897
|
this.closeClickHandler();
|
|
898
898
|
}, size: "md", variant: "primary" }, translate('Close'))), !window.Zonos.isLegacyCheckout &&
|
|
899
|
-
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '
|
|
899
|
+
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '2b86a3d9fb705ad080af532e645fd26aa844a14a', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
|
|
900
900
|
cartStore.step === 'finish' &&
|
|
901
|
-
this.notificationType === 'success' && (h("div", { key: '
|
|
901
|
+
this.notificationType === 'success' && (h("div", { key: '83a9dc9fb81baaf9e223dfa9fe0fc0fc4c106635', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: 'edf8057b0430e3e4bb8fd675554659781e1724ae', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: '3c40eee58d8a2ad5951dfdfc7c8d485052b6ba73', onClick: () => {
|
|
902
902
|
const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
903
903
|
this.redirectToUrl(isZonosDashboard
|
|
904
904
|
? '/orders/all'
|
|
@@ -974,7 +974,7 @@ const CheckmarkLineIcon = `<svg color="var(--zonos-elements-gray-1000)" xmlns="h
|
|
|
974
974
|
|
|
975
975
|
const RemoveLineIcon = `<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>`;
|
|
976
976
|
|
|
977
|
-
const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:24px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:8px}.sc-zonos-checkout-payment-h .zonos--error-banner.sc-zonos-checkout-payment{margin-bottom:16px}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-checkout-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-checkout-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-text.sc-zonos-checkout-payment{text-align:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}.sc-zonos-checkout-payment-h .zonos--test-cards.sc-zonos-checkout-payment{margin-top:auto;padding-top:16px}";
|
|
977
|
+
const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:24px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:8px}.sc-zonos-checkout-payment-h .zonos--error-banner.sc-zonos-checkout-payment{margin-bottom:16px}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-checkout-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-checkout-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-text.sc-zonos-checkout-payment{text-align:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}.sc-zonos-checkout-payment-h .zonos--test-cards.sc-zonos-checkout-payment{margin-top:auto;padding-top:16px}.mobile.mobile.sc-zonos-checkout-payment-h{-ms-scroll-chaining:chained;overscroll-behavior:auto}.mobile.mobile.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{-ms-scroll-chaining:chained;overscroll-behavior:auto}";
|
|
978
978
|
const ZonosCheckoutPaymentStyle0 = zonosCheckoutPaymentCss;
|
|
979
979
|
|
|
980
980
|
const ZonosCheckoutPayment = class {
|
|
@@ -1032,7 +1032,7 @@ const ZonosCheckoutPayment = class {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
stripeStore.checkoutSettlementCurrency = currencyCode;
|
|
1034
1034
|
// submit google tag when the form is complete
|
|
1035
|
-
|
|
1035
|
+
submitAnalytics({
|
|
1036
1036
|
event: 'zonos-checkout-payment-info',
|
|
1037
1037
|
metadata: {
|
|
1038
1038
|
checkoutSessionId: storageStore.checkoutSessionId,
|
|
@@ -1160,7 +1160,10 @@ const ZonosCheckoutPayment = class {
|
|
|
1160
1160
|
display: isPaypalTabSelected ? 'block' : 'none',
|
|
1161
1161
|
} }))), isTestMode && (h("zonos-card", { backgroundColor: "gray-100", borderRadius: 12, class: "zonos--test-cards" }, h("zonos-v-stack", { spacing: 16 }, h("div", null, h("zonos-text", { type: "semiBoldLabel" }, translate('Test cards')), h("zonos-text", { textColor: "gray-700" }, translate('Click to copy the card number. Use any future expiration date and three number CVC.'))), h("zonos-button", { icon: h("zonos-icon", { content: CheckmarkLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4242424242424242') }, translate('Success'), " (****4242)"), h("zonos-button", { icon: h("zonos-icon", { content: RemoveLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4000000000000002') }, translate('Failure'), " (****0002)")), h("zonos-notification", null)))));
|
|
1162
1162
|
};
|
|
1163
|
-
return (h(Host, { class:
|
|
1163
|
+
return (h(Host, { class: classes([
|
|
1164
|
+
'zonos--checkout-payment zonos--elements',
|
|
1165
|
+
this.isMobile && 'mobile',
|
|
1166
|
+
]) }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), renderPayment())));
|
|
1164
1167
|
}
|
|
1165
1168
|
get ele() { return getElement(this); }
|
|
1166
1169
|
static get watchers() { return {
|
|
@@ -1443,7 +1446,7 @@ const taxIdValidationResult = ({ companyName, shippingCountry, taxId, }) => {
|
|
|
1443
1446
|
};
|
|
1444
1447
|
};
|
|
1445
1448
|
|
|
1446
|
-
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--tax-id-input.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;height:100%;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info ul.sc-zonos-customer-info{list-style:disc;padding-left:8px}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-4px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0));z-index:2}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
|
|
1449
|
+
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--tax-id-input.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;height:100%;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info ul.sc-zonos-customer-info{list-style:disc;padding-left:8px}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-4px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0));z-index:2}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}.mobile.mobile.sc-zonos-customer-info-h{-ms-scroll-chaining:chained;overscroll-behavior:auto}.mobile.mobile.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{-ms-scroll-chaining:chained;overscroll-behavior:auto}";
|
|
1447
1450
|
const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
|
|
1448
1451
|
|
|
1449
1452
|
/**
|
|
@@ -1940,7 +1943,10 @@ const ZonosCustomerInfo = class {
|
|
|
1940
1943
|
const defaultEmail = ((_b = this.defaultAddress.find(Boolean)) === null || _b === void 0 ? void 0 : _b.email) ||
|
|
1941
1944
|
((_e = (_d = (_c = stripeStore.customerProfile) === null || _c === void 0 ? void 0 : _c.locations) === null || _d === void 0 ? void 0 : _d.find(Boolean)) === null || _e === void 0 ? void 0 : _e.email) ||
|
|
1942
1945
|
((_f = stripeStore.customerProfile) === null || _f === void 0 ? void 0 : _f.email);
|
|
1943
|
-
return (h(Host, { class:
|
|
1946
|
+
return (h(Host, { class: classes([
|
|
1947
|
+
'zonos--customer-info zonos--elements',
|
|
1948
|
+
this.isMobile && 'mobile',
|
|
1949
|
+
]) }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), h("zonos-link-authentication", { defaultEmail: defaultEmail, isEmailError: this.isEmailError, onLinkAuthenticationChange: this.handleEmailValidation, titleText: translate('Contact') }), this.renderAddressComponent('shipping'), h("zonos-checkbox", { class: "zonos--shipping-same-as-billing-cbx", isChecked: stripeStore.stripeShippingSameAsBilling, label: translate('Shipping address same as billing'), onCheckboxSelected: e => {
|
|
1944
1950
|
stripeStore.stripeShippingSameAsBilling = e.detail;
|
|
1945
1951
|
} }), h("zonos-collapse", { collapsed: !showBilling }, this.renderAddressComponent('billing')), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, bold: true, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
1946
1952
|
// use primary type when on mobile mode
|
|
@@ -2083,7 +2089,7 @@ const ChevronUpIcon = `<svg width="25" height="24" viewBox="0 0 25 24" fill="non
|
|
|
2083
2089
|
</svg>
|
|
2084
2090
|
`;
|
|
2085
2091
|
|
|
2086
|
-
const zonosShippingCss = ".sc-zonos-shipping-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:-16px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--error-banner.sc-zonos-shipping{margin-bottom:16px}.sc-zonos-shipping-h .zonos--shipping-method-error.sc-zonos-shipping{margin-top:24px}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;z-index:1;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h .zonos--shipping-options-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:transparent;width:100%;border:none;cursor:pointer;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping{margin-bottom:0}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::before,.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::after{content:\"\";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping .zonos--title-wrapper.sc-zonos-shipping{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}.sc-zonos-shipping-h .zonos--dap-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}";
|
|
2092
|
+
const zonosShippingCss = ".sc-zonos-shipping-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:-16px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--error-banner.sc-zonos-shipping{margin-bottom:16px}.sc-zonos-shipping-h .zonos--shipping-method-error.sc-zonos-shipping{margin-top:24px}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;z-index:1;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h .zonos--shipping-options-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:24px;-ms-flex-align:center;align-items:center;background:transparent;width:100%;border:none;cursor:pointer;position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-transition:0.5s all ease;transition:0.5s all ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transition:-webkit-transform 0.3s ease;transition:-webkit-transform 0.3s ease;transition:transform 0.3s ease;transition:transform 0.3s ease, -webkit-transform 0.3s ease}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping{margin-bottom:0}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.collapsed.sc-zonos-shipping zonos-icon.sc-zonos-shipping{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::before,.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping::after{content:\"\";display:block;width:80%;height:1px;background-color:var(--zonos-elements-border-color);-ms-flex-negative:1;flex-shrink:1}.sc-zonos-shipping-h .zonos--shipping-options-collapse-trigger.sc-zonos-shipping .zonos--title-wrapper.sc-zonos-shipping{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:row;flex-direction:row;gap:8px;-ms-flex-align:center;align-items:center}.sc-zonos-shipping-h .zonos--dap-wrapper.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:24px}.mobile.mobile.sc-zonos-shipping-h{-ms-scroll-chaining:chained;overscroll-behavior:auto}.mobile.mobile.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{-ms-scroll-chaining:chained;overscroll-behavior:auto}";
|
|
2087
2093
|
const ZonosShippingStyle0 = zonosShippingCss;
|
|
2088
2094
|
|
|
2089
2095
|
const ZonosShipping = class {
|
|
@@ -2158,7 +2164,7 @@ const ZonosShipping = class {
|
|
|
2158
2164
|
return;
|
|
2159
2165
|
}
|
|
2160
2166
|
// submit google tag when the form is complete
|
|
2161
|
-
|
|
2167
|
+
submitAnalytics({
|
|
2162
2168
|
event: 'zonos-checkout-shipping-info',
|
|
2163
2169
|
metadata: {
|
|
2164
2170
|
checkoutSessionId: storageStore.checkoutSessionId,
|
|
@@ -2314,7 +2320,10 @@ const ZonosShipping = class {
|
|
|
2314
2320
|
this.collapsedDAPOptions = !this.collapsedDAPOptions;
|
|
2315
2321
|
} }, h("div", { class: "zonos--title-wrapper" }, h("zonos-text", { type: "label" }, `${translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), h("zonos-icon", { content: ChevronUpIcon })))), h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, h("div", { class: "zonos--dap-wrapper" }, h("zonos-banner", { bannerTitle: translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, translate('You may incur additional fees from the shipping carrier by not prepaying.')), h("zonos-shipping-rich-radio", { isMobile: this.isMobile, items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod })))));
|
|
2316
2322
|
};
|
|
2317
|
-
return (h(Host, { class:
|
|
2323
|
+
return (h(Host, { class: classes([
|
|
2324
|
+
'zonos--shipping zonos--elements',
|
|
2325
|
+
this.isMobile && 'mobile',
|
|
2326
|
+
]) }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Delivery options')), this.showErrorBanner && !!this.serviceLevelsAll.length && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('No shipping method selected'))), h("zonos-text", { class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !this.serviceLevelsAll.length ? (h("zonos-banner", { bannerTitle: cartStore.customQuotingError
|
|
2318
2327
|
? cartStore.customQuotingError
|
|
2319
2328
|
: translate('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'), class: "zonos--shipping-method-error", intent: "error" })) : (h("div", { class: "zonos--shipping-options-wrapper" }, renderServiceLevels())), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, bold: true, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
2320
2329
|
// use primary type when on mobile mode
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, F as Fragment, a as Host } from './index-cfd394c8.js';
|
|
2
2
|
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, l as cartStoreStartCheckoutInterval, t as trackConversionEvent, m as getCheckoutSessionBody, n as cartStoreUpdateToErrorState, o as stripeStoreCleanupDomesticShippingSession, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as storeCreditStoreApplyCredit, x as storeCreditStoreCoversFullAmount, y as validateCheckoutSession, z as storeCreditStoreCreateOrder, A as stripeStoreConfirmPayment, B as stripeStoreHandleInventoryRefund, C as stripeStoreReset, D as cartStoreOnChange, E as stripeStoreOnChange, F as storeCreditStoreGetEffectiveAmount } from './cart-c490d252.js';
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitAnalytics, a as paypalStore, b as paypalInitScript } from './paypal-d8804da5.js';
|
|
4
4
|
import { f as filterValidTests, l as localizationStore, a as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, b as storageStoreSetEnabledVariantTestKeys, t as translate, c as localizationStoreOnChange, d as currencyFormat } from './localization-542dbe20.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-f1d45eac.js';
|
|
6
6
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
|
|
@@ -13,9 +13,9 @@ import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
|
13
13
|
import { g as getBorderRadius } from './getBorderRadius-66de1b16.js';
|
|
14
14
|
import { i as isDarkColor } from './isDarkColor-8092a9fb.js';
|
|
15
15
|
import { s as styles } from './styles-6fc2fad9.js';
|
|
16
|
-
import { s as submitGtag } from './submitGtag-543058f9.js';
|
|
17
16
|
import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
|
|
18
17
|
import './isContrastColor-f9e65e70.js';
|
|
18
|
+
import './submitGtag-7f5c5bb5.js';
|
|
19
19
|
import './debounce-8faafc9f.js';
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -1627,7 +1627,7 @@ const ZonosCheckout = class {
|
|
|
1627
1627
|
}
|
|
1628
1628
|
// Close the confirm dialog
|
|
1629
1629
|
this.confirmDialogOpen = false;
|
|
1630
|
-
|
|
1630
|
+
submitAnalytics({
|
|
1631
1631
|
event: 'zonos-checkout-close',
|
|
1632
1632
|
metadata: {
|
|
1633
1633
|
checkoutSessionId: storageStore.checkoutSessionId,
|
|
@@ -1954,7 +1954,7 @@ const ZonosCheckout = class {
|
|
|
1954
1954
|
isPreview: this.preview,
|
|
1955
1955
|
sessionTimeout: CHECKOUT_SESSION_TIMEOUT,
|
|
1956
1956
|
});
|
|
1957
|
-
|
|
1957
|
+
submitAnalytics({
|
|
1958
1958
|
event: 'zonos-checkout-start',
|
|
1959
1959
|
metadata: {
|
|
1960
1960
|
checkoutSessionId: storageStore.checkoutSessionId,
|
|
@@ -2353,7 +2353,7 @@ const ZonosCheckout = class {
|
|
|
2353
2353
|
async handleCustomerInfoContinue() {
|
|
2354
2354
|
var _a, _b, _c, _d;
|
|
2355
2355
|
// submit google tag when the form is complete
|
|
2356
|
-
|
|
2356
|
+
submitAnalytics({
|
|
2357
2357
|
event: 'zonos-checkout-customer-info',
|
|
2358
2358
|
metadata: {
|
|
2359
2359
|
checkoutSessionId: storageStore.checkoutSessionId,
|
|
@@ -2527,7 +2527,7 @@ const ZonosCheckout = class {
|
|
|
2527
2527
|
}
|
|
2528
2528
|
catch (err) {
|
|
2529
2529
|
logError(err);
|
|
2530
|
-
|
|
2530
|
+
submitAnalytics({
|
|
2531
2531
|
event: 'zonos-checkout-payment-fail',
|
|
2532
2532
|
metadata: {
|
|
2533
2533
|
checkoutSessionId: storageStore.checkoutSessionId,
|
|
@@ -2546,7 +2546,7 @@ const ZonosCheckout = class {
|
|
|
2546
2546
|
}
|
|
2547
2547
|
catch (err) {
|
|
2548
2548
|
logError(err);
|
|
2549
|
-
|
|
2549
|
+
submitAnalytics({
|
|
2550
2550
|
event: 'zonos-checkout-payment-fail',
|
|
2551
2551
|
metadata: {
|
|
2552
2552
|
checkoutSessionId: storageStore.checkoutSessionId,
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
2
|
import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, L as stripeStoreResetPromoCode, C as stripeStoreReset, M as stripeStoreMessageBasedOnStatus, d as cartStore, r as cartStoreNextStep, D as cartStoreOnChange } from './cart-c490d252.js';
|
|
3
|
-
import { c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
3
|
+
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-d8804da5.js';
|
|
4
4
|
import { t as translate, s as storageStore, l as localizationStore, p as translationStoreOnChange } from './localization-542dbe20.js';
|
|
5
5
|
import { z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
6
6
|
import { h as handleFetch, s as sendErrorLog, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
|
|
7
7
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
8
8
|
import { g as getBorderRadius } from './getBorderRadius-66de1b16.js';
|
|
9
9
|
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
10
|
-
import { s as submitGtag } from './submitGtag-543058f9.js';
|
|
11
10
|
import { i as isCollectMobile, a as isCollectTablet, e as collectStore } from './isCollectMobileTablet-0dcbd45a.js';
|
|
12
11
|
import { c as classes } from './classes-0d95c529.js';
|
|
13
12
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
@@ -16,6 +15,7 @@ import { p as placeTestOrder } from './placeTestOrder-d7001709.js';
|
|
|
16
15
|
import { r as renderFallback } from './renderFallback-b250f4e9.js';
|
|
17
16
|
import './isDarkColor-8092a9fb.js';
|
|
18
17
|
import './isContrastColor-f9e65e70.js';
|
|
18
|
+
import './submitGtag-7f5c5bb5.js';
|
|
19
19
|
|
|
20
20
|
const RemoveIcon = `<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
21
21
|
|
|
@@ -154,7 +154,7 @@ const ZonosCollectFinish = class {
|
|
|
154
154
|
window.history.replaceState({}, '', url.toString());
|
|
155
155
|
// Payment doesn't go through
|
|
156
156
|
if (error && (messages === null || messages === void 0 ? void 0 : messages.length)) {
|
|
157
|
-
|
|
157
|
+
submitAnalytics({ event: 'zonos-checkout-payment-fail' });
|
|
158
158
|
void sendErrorLog({
|
|
159
159
|
endpoint: 'Stripe payment failed',
|
|
160
160
|
errors: [
|
|
@@ -167,7 +167,7 @@ const ZonosCollectFinish = class {
|
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
else {
|
|
170
|
-
|
|
170
|
+
submitAnalytics({ event: 'zonos-checkout-success' });
|
|
171
171
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
172
172
|
void trackConversionEvent({
|
|
173
173
|
checkoutSessionId,
|
|
@@ -212,7 +212,7 @@ const ZonosCollectFinish = class {
|
|
|
212
212
|
// show success message right away when order id is already created
|
|
213
213
|
this.isLoading = false;
|
|
214
214
|
if (paypalStore.orderIdCreated) {
|
|
215
|
-
|
|
215
|
+
submitAnalytics({ event: 'zonos-checkout-success' });
|
|
216
216
|
const checkoutSessionId = storageStore.checkoutSessionId;
|
|
217
217
|
void trackConversionEvent({
|
|
218
218
|
checkoutSessionId,
|
|
@@ -268,11 +268,11 @@ const ZonosCollectFinish = class {
|
|
|
268
268
|
}
|
|
269
269
|
render() {
|
|
270
270
|
const cartId = window.Zonos.cartId;
|
|
271
|
-
return (h(Host, { key: '
|
|
271
|
+
return (h(Host, { key: '89331d23e3b6b57ce708f091fb4c9cdaae84f838', class: "zonos--checkout-finish zonos--elements", style: {
|
|
272
272
|
'--zonos--border-radius': getBorderRadius({
|
|
273
273
|
overrideBorderStyle: this.borderRadius,
|
|
274
274
|
}),
|
|
275
|
-
} }, !this.isLoading && (h("div", { key: '
|
|
275
|
+
} }, !this.isLoading && (h("div", { key: '7539e73d3e88c6a486ded338d35ec55398a1f3f4', class: "zonos--finish-details" }, h("div", { key: '4a61f515eff3cf0ce77fc88526424c1e63e5d66a', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: '6a44ceadf42398e95b3bef73888583cca2d4d076', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), this.confirmationId && (h("zonos-badge", { key: 'aa83de37eaaa4e8a349d6752f11d933584d56c81', badgeColor: "gray" }, this.confirmationId)), h("zonos-text", { key: '26ff76617b31f1726bdc3b7d024a29841692f7b9', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.order && cartId && (h("div", { key: '721ce7b4561f9d82c2a251ac3f595e36567aaac7', class: "zonos--button-container" }, h("zonos-button", { key: '77db63afae505f5472f089e4e5ed9e9c52e48157', onClick: () => {
|
|
276
276
|
window.open(this.getReceiptUrl({ cartId }), '_blank');
|
|
277
277
|
}, size: "lg", variant: "primary" }, translate('View receipt')))))))));
|
|
278
278
|
}
|
|
@@ -494,7 +494,7 @@ const ZonosCollectPayment = class {
|
|
|
494
494
|
}
|
|
495
495
|
stripeStore.checkoutSettlementCurrency = currencyCode;
|
|
496
496
|
// submit google tag when the form is complete
|
|
497
|
-
|
|
497
|
+
submitAnalytics({ event: 'zonos-checkout-payment-info' });
|
|
498
498
|
this.continueClicked.emit();
|
|
499
499
|
};
|
|
500
500
|
this.copyCardToClipboard = async (cardNumber) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, F as Fragment } from './index-cfd394c8.js';
|
|
2
2
|
import { b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, n as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, u as stripeStoreUpdateCheckoutSessionBaseCurrency, A as stripeStoreConfirmPayment, E as stripeStoreOnChange, C as stripeStoreReset, f as cartStoreReset } from './cart-c490d252.js';
|
|
3
3
|
import { i as isCollectMobile, a as isCollectTablet, c as collectStoreUpdateSelectedShippingOption, b as collectStoreInitShippingInfo, d as collectStoreAsyncAddressUpdate, e as collectStore } from './isCollectMobileTablet-0dcbd45a.js';
|
|
4
|
-
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-
|
|
4
|
+
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-d8804da5.js';
|
|
5
5
|
import { s as storageStore, t as translate, c as localizationStoreOnChange, d as currencyFormat, l as localizationStore } from './localization-542dbe20.js';
|
|
6
6
|
import { z as zonosStore } from './zonosStore-f1d45eac.js';
|
|
7
7
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
|
|
@@ -13,7 +13,7 @@ import { l as languages } from './ILanguage-cd6acb72.js';
|
|
|
13
13
|
import './isDarkColor-8092a9fb.js';
|
|
14
14
|
import './getBorderRadius-66de1b16.js';
|
|
15
15
|
import './isContrastColor-f9e65e70.js';
|
|
16
|
-
import './submitGtag-
|
|
16
|
+
import './submitGtag-7f5c5bb5.js';
|
|
17
17
|
|
|
18
18
|
const ChevronDownIcon = `<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
19
19
|
|
|
@@ -5,7 +5,7 @@ import { z as zonosStore, e as zonosStoreInitSetting, f as zonosStoreFontFamily
|
|
|
5
5
|
import { g as getGenericSettingsOverride, i as iframeServices, a as injectPrivateIframe } from './getGenericSettingsOverride-0bc3e118.js';
|
|
6
6
|
import { h as handleFetch, l as logError } from './handleFetch-a844cac1.js';
|
|
7
7
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
8
|
-
import {
|
|
8
|
+
import { a as ensureAnalyticsRelayPing } from './submitGtag-7f5c5bb5.js';
|
|
9
9
|
import './isDarkColor-8092a9fb.js';
|
|
10
10
|
import './getBorderRadius-66de1b16.js';
|
|
11
11
|
|
|
@@ -538,7 +538,7 @@ const ZonosController = class {
|
|
|
538
538
|
}
|
|
539
539
|
document.body.appendChild(scriptToInject);
|
|
540
540
|
});
|
|
541
|
-
// Custom HTML may set window.Zonos.googleAnalyticId; trigger relay ping so parent configures GA
|
|
541
|
+
// Custom HTML may set window.Zonos.googleAnalyticId / window.Zonos.facebookPixelId; trigger relay ping so parent configures GA / FB Pixel
|
|
542
542
|
ensureAnalyticsRelayPing();
|
|
543
543
|
}
|
|
544
544
|
async initGooglePlacesService(settings) {
|
|
@@ -726,7 +726,7 @@ const ZonosController = class {
|
|
|
726
726
|
zonosStore.organizationName = organizationName;
|
|
727
727
|
}
|
|
728
728
|
render() {
|
|
729
|
-
return h(Host, { key: '
|
|
729
|
+
return h(Host, { key: 'd500743a0ed7dc7615e696aaf958216374e7c33b', class: "zonos--elements" });
|
|
730
730
|
}
|
|
731
731
|
};
|
|
732
732
|
ZonosController.style = ZonosControllerStyle0;
|