@zonos/elements 1.2.0 → 1.2.1
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/{cart-ac9a3c40.js → cart-7b70853c.js} +5 -15
- package/dist/cjs/{getBorderRadius-1f9c0fa3.js → getBorderRadius-fdd605c6.js} +1 -1
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/{isDarkColor-0651a165.js → isDarkColor-f3446afd.js} +1 -1
- package/dist/cjs/{localization-3a4b4a43.js → localization-387a8a65.js} +1 -1
- package/dist/cjs/{submitGtag-9e873a0a.js → submitGtag-bf6e7c5e.js} +2 -2
- package/dist/cjs/zonos-address_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-button_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +17 -16
- package/dist/cjs/zonos-checkout.cjs.entry.js +16 -9
- package/dist/cjs/zonos-controller.cjs.entry.js +15 -6
- package/dist/cjs/zonos-country-flag_4.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +17 -3
- package/dist/cjs/zonos-payment.cjs.entry.js +5 -5
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/{zonosStore-270f79cc.js → zonosStore-a430ec5b.js} +2 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.css +6 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +3 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +7 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +10 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +6 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +7 -3
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.css +5 -2
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +15 -1
- package/dist/collection/components/main/zonos-controller.js +10 -1
- package/dist/collection/components/store/zonosStore.js +2 -0
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +1 -11
- package/dist/collection/types/generated/graphql.customer.types.js +4 -1
- package/dist/components/cart.js +1 -11
- package/dist/components/zonos-cart-subtotal2.js +4 -3
- package/dist/components/zonos-checkout-payment2.js +3 -3
- package/dist/components/zonos-checkout.js +10 -3
- package/dist/components/zonos-controller.js +10 -1
- package/dist/components/zonos-customer-info2.js +3 -3
- package/dist/components/zonos-hello.js +16 -2
- package/dist/components/zonos-shipping-rich-radio2.js +1 -1
- package/dist/components/zonos-shipping2.js +1 -1
- package/dist/components/zonosStore.js +2 -0
- package/dist/esm/{cart-cf46a264.js → cart-07091d2a.js} +5 -15
- package/dist/esm/{getBorderRadius-278281bf.js → getBorderRadius-45764ad7.js} +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/{isDarkColor-8fd3a24e.js → isDarkColor-6fbb9b14.js} +1 -1
- package/dist/esm/{localization-add1d9e9.js → localization-b3c2a9a9.js} +1 -1
- package/dist/esm/{submitGtag-aa5fe441.js → submitGtag-c0b655ad.js} +2 -2
- package/dist/esm/zonos-address_2.entry.js +5 -5
- package/dist/esm/zonos-button_2.entry.js +3 -3
- package/dist/esm/zonos-cart-items_10.entry.js +17 -16
- package/dist/esm/zonos-checkout.entry.js +16 -9
- package/dist/esm/zonos-controller.entry.js +15 -6
- package/dist/esm/zonos-country-flag_4.entry.js +3 -3
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +17 -3
- package/dist/esm/zonos-payment.entry.js +5 -5
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/{zonosStore-e5291656.js → zonosStore-05a62104.js} +2 -0
- package/dist/esm-es5/cart-07091d2a.js +1 -0
- package/dist/esm-es5/{getBorderRadius-278281bf.js → getBorderRadius-45764ad7.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-8fd3a24e.js → isDarkColor-6fbb9b14.js} +1 -1
- package/dist/esm-es5/{localization-add1d9e9.js → localization-b3c2a9a9.js} +1 -1
- package/dist/esm-es5/{submitGtag-aa5fe441.js → submitGtag-c0b655ad.js} +1 -1
- package/dist/esm-es5/zonos-address_2.entry.js +1 -1
- package/dist/esm-es5/zonos-button_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-e5291656.js → zonosStore-05a62104.js} +1 -1
- package/dist/scripts/loadZonos.js +3 -3
- package/dist/scripts/zonos.js +3 -3
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +1 -0
- package/dist/types/components/store/checkout/cart.d.ts +1 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +2 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +36 -8
- package/dist/types/types/generated/graphql.customer.types.ts +48 -8
- package/dist/types/types/generated/graphql.frontend.types.d.ts +4 -0
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-01990dcd.js → p-08695f4e.js} +1 -1
- package/dist/zonos-elements/p-0a788f68.entry.js +1 -0
- package/dist/zonos-elements/p-0e0b46a5.js +1 -0
- package/dist/zonos-elements/{p-847a1b9a.system.entry.js → p-0f7233fd.system.entry.js} +1 -1
- package/dist/zonos-elements/p-23b0b4a2.system.entry.js +1 -0
- package/dist/zonos-elements/{p-bb35713f.entry.js → p-2c20c082.entry.js} +1 -1
- package/dist/zonos-elements/p-30fd29fb.js +1 -0
- package/dist/zonos-elements/{p-ebb4de4e.entry.js → p-343071d5.entry.js} +1 -1
- package/dist/zonos-elements/p-37db3842.system.entry.js +1 -0
- package/dist/zonos-elements/{p-f5392f7e.entry.js → p-37fc9f6b.entry.js} +1 -1
- package/dist/zonos-elements/{p-0cd4b073.system.js → p-42ba069d.system.js} +1 -1
- package/dist/zonos-elements/{p-96fbce98.system.entry.js → p-4524a84f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9d06e3a3.system.js → p-6dcd752e.system.js} +1 -1
- package/dist/zonos-elements/{p-1293796f.js → p-6df1eaee.js} +1 -1
- package/dist/zonos-elements/{p-0f64d234.entry.js → p-6e7cd3f7.entry.js} +1 -1
- package/dist/zonos-elements/p-79f9e330.system.js +1 -0
- package/dist/zonos-elements/{p-18d37ad9.system.js → p-85ab35c9.system.js} +1 -1
- package/dist/zonos-elements/p-87f324c5.entry.js +1 -0
- package/dist/zonos-elements/{p-ddc11127.system.entry.js → p-8a75b765.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1b6d064d.system.js → p-8c867835.system.js} +1 -1
- package/dist/zonos-elements/p-914ce305.system.entry.js +1 -0
- package/dist/zonos-elements/{p-466bae3a.entry.js → p-96a3c767.entry.js} +1 -1
- package/dist/zonos-elements/{p-8fa1244b.entry.js → p-98105ede.entry.js} +1 -1
- package/dist/zonos-elements/{p-6bb67f2e.system.entry.js → p-9adf546f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d0ecfe92.system.entry.js → p-9b86e655.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9dc9cbc8.entry.js +1 -0
- package/dist/zonos-elements/{p-a3f394b7.system.entry.js → p-a20b97e9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6cd7a90e.system.js → p-b64bbf38.system.js} +1 -1
- package/dist/zonos-elements/{p-ee671d13.js → p-bb36a9f8.js} +1 -1
- package/dist/zonos-elements/{p-86825d4a.js → p-bf070bf6.js} +1 -1
- package/dist/zonos-elements/{p-083b951d.system.entry.js → p-c28157ec.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d43749bd.entry.js +1 -0
- package/dist/zonos-elements/{p-1781245e.system.js → p-f23749e4.system.js} +1 -1
- package/dist/zonos-elements/p-f8491335.system.js +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-cf46a264.js +0 -1
- package/dist/zonos-elements/p-0a33b542.system.js +0 -1
- package/dist/zonos-elements/p-1835470b.system.entry.js +0 -1
- package/dist/zonos-elements/p-82ab16e2.js +0 -1
- package/dist/zonos-elements/p-a014d540.entry.js +0 -1
- package/dist/zonos-elements/p-aed841bf.entry.js +0 -1
- package/dist/zonos-elements/p-b0a39955.js +0 -1
- package/dist/zonos-elements/p-c4eb37b5.entry.js +0 -1
- package/dist/zonos-elements/p-de86c2e4.system.entry.js +0 -1
- package/dist/zonos-elements/p-e80aae7d.entry.js +0 -1
- package/dist/zonos-elements/p-eb6cc449.system.entry.js +0 -1
|
@@ -58,6 +58,10 @@
|
|
|
58
58
|
:host .zonos--group::-webkit-scrollbar-thumb:hover {
|
|
59
59
|
background: #d6d6d6;
|
|
60
60
|
}
|
|
61
|
-
:host zonos-
|
|
62
|
-
|
|
61
|
+
:host .zonos--group-btn {
|
|
62
|
+
display: flex;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
}
|
|
65
|
+
:host .zonos--group-btn zonos-button {
|
|
66
|
+
width: calc(100% - 10px);
|
|
63
67
|
}
|
|
@@ -31,9 +31,9 @@ export class ZonosCustomerInfo {
|
|
|
31
31
|
this.disabled =
|
|
32
32
|
!((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.complete) ||
|
|
33
33
|
!((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.complete);
|
|
34
|
-
return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), h("zonos-link-authentication", { titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Address'), type: "shipping" })), h("zonos-button", { backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
34
|
+
return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), h("zonos-link-authentication", { titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Address'), type: "shipping" })), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
35
35
|
// use primary type when on mobile mode
|
|
36
|
-
variant: this.submitBtnType }, translate('Continue to shipping'))));
|
|
36
|
+
variant: this.submitBtnType }, translate('Continue to shipping')))));
|
|
37
37
|
}
|
|
38
38
|
static get is() { return "zonos-customer-info"; }
|
|
39
39
|
static get encapsulation() { return "scoped"; }
|
package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
:host .zonos--group {
|
|
45
45
|
margin-bottom: var(--amino-space-20);
|
|
46
46
|
overflow: auto;
|
|
47
|
-
padding
|
|
47
|
+
padding: 5px;
|
|
48
48
|
}
|
|
49
49
|
:host .zonos--group::-webkit-scrollbar {
|
|
50
50
|
width: 10px;
|
|
@@ -61,8 +61,12 @@
|
|
|
61
61
|
:host .zonos--group::-webkit-scrollbar-thumb:hover {
|
|
62
62
|
background: #d6d6d6;
|
|
63
63
|
}
|
|
64
|
-
:host zonos-
|
|
65
|
-
|
|
64
|
+
:host .zonos--group-btn {
|
|
65
|
+
display: flex;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
}
|
|
68
|
+
:host .zonos--group-btn zonos-button {
|
|
69
|
+
width: calc(100% - 10px);
|
|
66
70
|
}
|
|
67
71
|
:host zonos-banner {
|
|
68
72
|
margin-top: var(--amino-space-24);
|
package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.css
CHANGED
|
@@ -49,11 +49,14 @@
|
|
|
49
49
|
border-top-right-radius: var(--border-radius, var(--amino-radius-10));
|
|
50
50
|
}
|
|
51
51
|
:host .zonos--shipping-rich-radio-item:last-child {
|
|
52
|
-
border-bottom-left-radius: var(--border-radius, var(--amino-radius-10));
|
|
53
52
|
border-bottom-right-radius: var(--border-radius, var(--amino-radius-10));
|
|
54
53
|
}
|
|
54
|
+
:host .zonos--shipping-rich-radio-item:not(:last-child) {
|
|
55
|
+
border-bottom: none;
|
|
56
|
+
}
|
|
55
57
|
:host .zonos--shipping-rich-radio-item.selected {
|
|
56
|
-
|
|
58
|
+
outline: 1px solid var(--selected-border-color, var(--amino-blue-600));
|
|
59
|
+
outline-offset: -1px;
|
|
57
60
|
}
|
|
58
61
|
:host .zonos--shipping-info {
|
|
59
62
|
display: flex;
|
|
@@ -161,6 +161,19 @@ export class ZonosHello {
|
|
|
161
161
|
return hasMoreSpaceOnRight;
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
|
+
this.isShippableCountry = (showLog = true) => {
|
|
165
|
+
if (!localizationStore.localizationLoaded) {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
169
|
+
if (!localizationStore.isShippableCountry) {
|
|
170
|
+
if (showLog) {
|
|
171
|
+
log(`Hello: not shippable country`);
|
|
172
|
+
}
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
return true;
|
|
176
|
+
};
|
|
164
177
|
this.mobileLocationOverride = undefined;
|
|
165
178
|
this.animateFromLeftOverride = undefined;
|
|
166
179
|
this.appearanceSettingsOverride = undefined;
|
|
@@ -239,7 +252,8 @@ export class ZonosHello {
|
|
|
239
252
|
const appearanceSettings = mergeConfig(zonosStore.appearance, this.appearanceSettingsOverride);
|
|
240
253
|
const { theme } = appearanceSettings;
|
|
241
254
|
const restrictedItemsOnPage = (_b = this.allRestrictedItems) === null || _b === void 0 ? void 0 : _b.filter(product => this.productsOnPage.some(restriction => restriction.description === product.itemDescription));
|
|
242
|
-
|
|
255
|
+
const showHello = this.isShippableCountry() && !!selectedCountryCode;
|
|
256
|
+
return (h(Host, { class: "zonos--hello zonos--elements", "data-theme": theme }, showHello && (h("div", { class: "zonos--hello-wrapper" }, h("button", { class: classes([
|
|
243
257
|
'zonos--hello-widget',
|
|
244
258
|
this.showPeekMessage && 'zonos--hello-show-peek-message',
|
|
245
259
|
this.mobileLocationOverride && 'zonos--hello-mobile-override',
|
|
@@ -63,11 +63,20 @@ export class ZonosController {
|
|
|
63
63
|
log('Checkout failed to load -- missing publishable key', 'warn');
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
+
if (zonosStore.checkoutSettings.subscriptionStatus === 'INACTIVE') {
|
|
67
|
+
log('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===', 'warn');
|
|
68
|
+
log('zonos controller loaded');
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (zonosStore.checkoutSettings.visibilityStatus === 'DISABLED') {
|
|
72
|
+
log('=== Checkout is disabled by store owner ===', 'warn');
|
|
73
|
+
log('zonos controller loaded');
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
66
76
|
// send publishable key out to load stripe
|
|
67
77
|
this.stripeInitEvent.emit({
|
|
68
78
|
publishableKey: publishableKey.token,
|
|
69
79
|
});
|
|
70
|
-
// eslint-disable-next-line no-console
|
|
71
80
|
log('zonos controller loaded');
|
|
72
81
|
})();
|
|
73
82
|
}
|
|
@@ -36,6 +36,8 @@ const { reset, state: zonosStore } = createStore(() => ({
|
|
|
36
36
|
},
|
|
37
37
|
organization: '',
|
|
38
38
|
placeOrderButtonSelector: null,
|
|
39
|
+
// default inactive for subscription
|
|
40
|
+
subscriptionStatus: 'INACTIVE',
|
|
39
41
|
successBehavior: 'REDIRECT_TO_SUCCESS_PAGE',
|
|
40
42
|
successRedirectUrl: '',
|
|
41
43
|
visibilityStatus: 'ENABLED',
|
|
@@ -17,17 +17,7 @@ export const prepCalculateLandedCost = () => {
|
|
|
17
17
|
lastName: stripeAddressData.value.lastName || '',
|
|
18
18
|
phone: stripeAddressData.value.phone || '',
|
|
19
19
|
},
|
|
20
|
-
items: cartStore.items.map(item =>
|
|
21
|
-
amount: item.amount,
|
|
22
|
-
countryOfOrigin: item.countryOfOrigin,
|
|
23
|
-
currencyCode: item.currencyCode,
|
|
24
|
-
imageUrl: item.imageUrl,
|
|
25
|
-
measurements: item.measurements,
|
|
26
|
-
metadata: item.metadata,
|
|
27
|
-
name: item.name,
|
|
28
|
-
productId: item.productId,
|
|
29
|
-
quantity: item.quantity,
|
|
30
|
-
})),
|
|
20
|
+
items: cartStore.items.map(item => item),
|
|
31
21
|
shippingAddress: {
|
|
32
22
|
addressLine1: stripeAddressData.value.address.line1,
|
|
33
23
|
addressLine2: stripeAddressData.value.address.line2 || '',
|
|
@@ -134,9 +134,9 @@ export const checkoutVisibilityStatus = {
|
|
|
134
134
|
Enabled: 'ENABLED',
|
|
135
135
|
};
|
|
136
136
|
export const classificationBulkJobStatus = {
|
|
137
|
+
Classified: 'CLASSIFIED',
|
|
137
138
|
Completed: 'COMPLETED',
|
|
138
139
|
Error: 'ERROR',
|
|
139
|
-
FileSaved: 'FILE_SAVED',
|
|
140
140
|
Initialized: 'INITIALIZED',
|
|
141
141
|
Processing: 'PROCESSING',
|
|
142
142
|
};
|
|
@@ -1717,6 +1717,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
1717
1717
|
ExchangeRateCreate(variables, requestHeaders) {
|
|
1718
1718
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'ExchangeRateCreate', 'mutation');
|
|
1719
1719
|
},
|
|
1720
|
+
FulfillmentCenter(variables, requestHeaders) {
|
|
1721
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'FulfillmentCenter', 'query');
|
|
1722
|
+
},
|
|
1720
1723
|
OnlineStoreSettings(variables, requestHeaders) {
|
|
1721
1724
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'OnlineStoreSettings', 'query');
|
|
1722
1725
|
},
|
package/dist/components/cart.js
CHANGED
|
@@ -20,17 +20,7 @@ const prepCalculateLandedCost = () => {
|
|
|
20
20
|
lastName: stripeAddressData.value.lastName || '',
|
|
21
21
|
phone: stripeAddressData.value.phone || '',
|
|
22
22
|
},
|
|
23
|
-
items: cartStore.items.map(item =>
|
|
24
|
-
amount: item.amount,
|
|
25
|
-
countryOfOrigin: item.countryOfOrigin,
|
|
26
|
-
currencyCode: item.currencyCode,
|
|
27
|
-
imageUrl: item.imageUrl,
|
|
28
|
-
measurements: item.measurements,
|
|
29
|
-
metadata: item.metadata,
|
|
30
|
-
name: item.name,
|
|
31
|
-
productId: item.productId,
|
|
32
|
-
quantity: item.quantity,
|
|
33
|
-
})),
|
|
23
|
+
items: cartStore.items.map(item => item),
|
|
34
24
|
shippingAddress: {
|
|
35
25
|
addressLine1: stripeAddressData.value.address.line1,
|
|
36
26
|
addressLine2: stripeAddressData.value.address.line2 || '',
|
|
@@ -12,7 +12,7 @@ const InfoIcon = `<svg viewBox="0 0 17 16" fill="none" xmlns="https://www.w3.org
|
|
|
12
12
|
</svg>
|
|
13
13
|
`;
|
|
14
14
|
|
|
15
|
-
const zonosCartSubtotalCss = ":host{font-family:Inter;display:block}: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 .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-20) var(--amino-space-8);vertical-align:top}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8)}:host .zonos--cart-subtotal-title,:host .zonos--cart-subtotal-price{border-bottom:1px solid var(--amino-gray-200)}:host .zonos--cart-subtotal-price{text-align:right}";
|
|
15
|
+
const zonosCartSubtotalCss = ":host{font-family:Inter;display:block}: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 .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--amino-font-size-base)}:host .zonos--cart-table .zonos--column{padding:var(--amino-space-20) var(--amino-space-8);vertical-align:top}:host .zonos--cart-table .zonos--column:last-child{text-align:right}:host .zonos--cart-table .zonos--column:first-child{width:60px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-8)}:host .zonos--cart-subtotal-title,:host .zonos--cart-subtotal-price{border-bottom:1px solid var(--amino-gray-200)}:host .zonos--cart-duty-tax-price{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:end;align-items:flex-end;gap:5px}:host .zonos--cart-subtotal-price{text-align:right}";
|
|
16
16
|
|
|
17
17
|
const ZonosCartSubtotal = /*@__PURE__*/ proxyCustomElement(class ZonosCartSubtotal extends HTMLElement {
|
|
18
18
|
constructor() {
|
|
@@ -22,6 +22,7 @@ const ZonosCartSubtotal = /*@__PURE__*/ proxyCustomElement(class ZonosCartSubtot
|
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
24
|
const totalWithoutTaxes = cartStore.total - cartStore.dutiesTaxFees;
|
|
25
|
+
const showDutyTaxesInfo = cartStore.step === 'payment' || cartStore.step === 'shipping';
|
|
25
26
|
const renderShippingInfo = () => {
|
|
26
27
|
if (!cartStore.selectedShippingOption) {
|
|
27
28
|
return (h(Fragment, null, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Shipping')), h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('No shipping method selected'))));
|
|
@@ -36,12 +37,12 @@ const ZonosCartSubtotal = /*@__PURE__*/ proxyCustomElement(class ZonosCartSubtot
|
|
|
36
37
|
amount: cartStore.shipping,
|
|
37
38
|
currency: cartStore.currency,
|
|
38
39
|
})
|
|
39
|
-
: '-')),
|
|
40
|
+
: '-')), showDutyTaxesInfo && (h("tr", { class: "zonos--row zonos--cart-duties" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("div", { class: "zonos--title-with-icon" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), h("zonos-icon", { content: InfoIcon, size: 16 })), !!cartStore.isSelectedShippingAboveDeminimis && (h("zonos-text", { color: "gray-800", type: "body" }, translate('Order is over the de minimis threshold for both duty and tax')))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxFees
|
|
40
41
|
? formatCurrency({
|
|
41
42
|
amount: cartStore.dutiesTaxFees,
|
|
42
43
|
currency: cartStore.currency,
|
|
43
44
|
})
|
|
44
|
-
: '-', cartStore.isSelectedShippingGuarantee && (h("zonos-badge", null, translate('Guaranteed')))))), h("tr", { class: "zonos--row zonos--cart-pay-total" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Order total'))), h("td", { class: "zonos--column" }, h("zonos-text", { type: "semiBoldLabel" }, formatCurrency({
|
|
45
|
+
: '-', cartStore.isSelectedShippingGuarantee && (h("zonos-badge", null, translate('Guaranteed'))))))), h("tr", { class: "zonos--row zonos--cart-pay-total" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Order total'))), h("td", { class: "zonos--column" }, h("zonos-text", { type: "semiBoldLabel" }, formatCurrency({
|
|
45
46
|
amount:
|
|
46
47
|
// show total without taxes when step is shipping, show total with taxes when step is payment
|
|
47
48
|
cartStore.step === 'shipping'
|
|
@@ -9,7 +9,7 @@ import { d as defineCustomElement$3 } from './zonos-payment2.js';
|
|
|
9
9
|
import { d as defineCustomElement$2 } from './zonos-spinner2.js';
|
|
10
10
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
11
11
|
|
|
12
|
-
const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:Inter;display:block}.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}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:
|
|
12
|
+
const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:Inter;display:block}.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}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.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(--amino-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:var(--amino-space-8)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:calc(100% - 10px)}";
|
|
13
13
|
|
|
14
14
|
const ZonosCheckoutPayment = /*@__PURE__*/ proxyCustomElement(class ZonosCheckoutPayment extends HTMLElement {
|
|
15
15
|
constructor() {
|
|
@@ -40,12 +40,12 @@ const ZonosCheckoutPayment = /*@__PURE__*/ proxyCustomElement(class ZonosCheckou
|
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
42
|
this.disabled = !((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
43
|
-
return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), this.paymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, translate("We couldn't complete your payment. Please verify the payment details and try again."))), h("zonos-payment", null)), h("zonos-button", { backgroundColor: this.submitBtnColor, "is-disabled": this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
43
|
+
return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), this.paymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, translate("We couldn't complete your payment. Please verify the payment details and try again."))), h("zonos-payment", null)), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, "is-disabled": this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
44
44
|
// use primary type when on mobile mode
|
|
45
45
|
variant: this.submitBtnType }, "Pay", ' ', formatCurrency({
|
|
46
46
|
amount: cartStore.total,
|
|
47
47
|
currency: cartStore.currency,
|
|
48
|
-
}))));
|
|
48
|
+
})))));
|
|
49
49
|
}
|
|
50
50
|
static get watchers() { return {
|
|
51
51
|
"disabled": ["watchFormComplete"]
|
|
@@ -62,7 +62,7 @@ const ZonosCheckout$1 = /*@__PURE__*/ proxyCustomElement(class ZonosCheckout ext
|
|
|
62
62
|
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
63
63
|
if (!localizationStore.isShippableCountry) {
|
|
64
64
|
if (showLog) {
|
|
65
|
-
log(`not shippable country`);
|
|
65
|
+
log(`Checkout: not shippable country`);
|
|
66
66
|
}
|
|
67
67
|
return false;
|
|
68
68
|
}
|
|
@@ -203,7 +203,8 @@ const ZonosCheckout$1 = /*@__PURE__*/ proxyCustomElement(class ZonosCheckout ext
|
|
|
203
203
|
// show the selector when it's domestic
|
|
204
204
|
selector === null || selector === void 0 ? void 0 : selector.forEach(el => {
|
|
205
205
|
const element = el;
|
|
206
|
-
const display = element.getAttribute('data-zonos-checkout-original-display')
|
|
206
|
+
const display = element.getAttribute('data-zonos-checkout-original-display') ||
|
|
207
|
+
getComputedStyle(element).display;
|
|
207
208
|
// fallback to initial (browser value) if "display" is not found
|
|
208
209
|
element.style.display = display || 'initial';
|
|
209
210
|
});
|
|
@@ -377,7 +378,13 @@ const ZonosCheckout$1 = /*@__PURE__*/ proxyCustomElement(class ZonosCheckout ext
|
|
|
377
378
|
'--border-radius': getBorderRadius(style),
|
|
378
379
|
} }, cartStore.step !== 'finish' && cartStore.step !== 'error' && (h(Fragment, null, h("div", { class: "zonos--left", "data-theme": leftSideTheme, style: {
|
|
379
380
|
'--primary-color': !this.isMobile ? colorPrimary : '',
|
|
380
|
-
} }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor, submitBtnType: submitBtnType })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor, submitBtnType: submitBtnType })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleCheckoutPaymentContinue(), paymentError: this.paymentError, submitBtnColor: submitButtonColor, submitBtnType: submitBtnType }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), !this.isMobile && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() })), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-collapse", { collapseSize: reviewElementSize,
|
|
381
|
+
} }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor, submitBtnType: submitBtnType })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor, submitBtnType: submitBtnType })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleCheckoutPaymentContinue(), paymentError: this.paymentError, submitBtnColor: submitButtonColor, submitBtnType: submitBtnType }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), !this.isMobile && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() })), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-collapse", { collapseSize: reviewElementSize,
|
|
382
|
+
// only collapse on mobile
|
|
383
|
+
collapsed: this.collapseReviewMobile && this.isMobile }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
384
|
+
// do nothing if it's not mobile
|
|
385
|
+
if (!this.isMobile) {
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
381
388
|
this.collapseReviewMobile =
|
|
382
389
|
!this.collapseReviewMobile;
|
|
383
390
|
}, ref: el => (this.zonosReviewRef = el) }), h("zonos-cart-items", null))), h("zonos-v-stack", { spacing: 16 }, h("zonos-cart-subtotal", null), h("zonos-custom-message", { class: "zonos--checkout-default-message", icon: MessageIcon, message: defaultMessage }))), !this.isMobile && renderFooter()), this.isMobile && renderFooter())), (cartStore.step === 'finish' || cartStore.step === 'error') && (h("div", { class: "zonos--done", "data-theme": rightSideTheme }, h("div", { class: "zonos--header" }, renderLogo(), h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => this.handleFinishClick(), theme: rightSideTheme })), h("zonos-checkout-finish", { borderRadius: style, onCloseClick: () => this.handleFinishClick(), overrideNotification: cartStore.step === 'error' && !!cartStore.error
|
|
@@ -119,11 +119,20 @@ const ZonosController$1 = /*@__PURE__*/ proxyCustomElement(class ZonosController
|
|
|
119
119
|
log('Checkout failed to load -- missing publishable key', 'warn');
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
|
+
if (zonosStore.checkoutSettings.subscriptionStatus === 'INACTIVE') {
|
|
123
|
+
log('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===', 'warn');
|
|
124
|
+
log('zonos controller loaded');
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (zonosStore.checkoutSettings.visibilityStatus === 'DISABLED') {
|
|
128
|
+
log('=== Checkout is disabled by store owner ===', 'warn');
|
|
129
|
+
log('zonos controller loaded');
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
122
132
|
// send publishable key out to load stripe
|
|
123
133
|
this.stripeInitEvent.emit({
|
|
124
134
|
publishableKey: publishableKey.token,
|
|
125
135
|
});
|
|
126
|
-
// eslint-disable-next-line no-console
|
|
127
136
|
log('zonos controller loaded');
|
|
128
137
|
})();
|
|
129
138
|
}
|
|
@@ -8,7 +8,7 @@ import { d as defineCustomElement$3 } from './zonos-link-authentication2.js';
|
|
|
8
8
|
import { d as defineCustomElement$2 } from './zonos-spinner2.js';
|
|
9
9
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
10
10
|
|
|
11
|
-
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:Inter;display:block}.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}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.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(--amino-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-button.sc-zonos-customer-info{width:100%}";
|
|
11
|
+
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:Inter;display:block}.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}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.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(--amino-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--group-btn.sc-zonos-customer-info{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:calc(100% - 10px)}";
|
|
12
12
|
|
|
13
13
|
const ZonosCustomerInfo = /*@__PURE__*/ proxyCustomElement(class ZonosCustomerInfo extends HTMLElement {
|
|
14
14
|
constructor() {
|
|
@@ -42,9 +42,9 @@ const ZonosCustomerInfo = /*@__PURE__*/ proxyCustomElement(class ZonosCustomerIn
|
|
|
42
42
|
this.disabled =
|
|
43
43
|
!((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.complete) ||
|
|
44
44
|
!((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.complete);
|
|
45
|
-
return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), h("zonos-link-authentication", { titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Address'), type: "shipping" })), h("zonos-button", { backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
45
|
+
return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), h("zonos-link-authentication", { titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress, titleText: translate('Address'), type: "shipping" })), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
46
46
|
// use primary type when on mobile mode
|
|
47
|
-
variant: this.submitBtnType }, translate('Continue to shipping'))));
|
|
47
|
+
variant: this.submitBtnType }, translate('Continue to shipping')))));
|
|
48
48
|
}
|
|
49
49
|
static get watchers() { return {
|
|
50
50
|
"disabled": ["watchFormComplete"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { _ as _root, i as isObjectLike_1, e as _baseGetTag, f as isObject_1, z as zonosStore, m as mergeConfig } from './zonosStore.js';
|
|
3
|
-
import { h as handleFetch, l as logError, b as localizationStore, i as isValidSelector, t as translate, s as setZonosCountryUrlParam, e as currencyDisplay, f as currencyConvertAndFormat, g as currencyConvert, j as currencyFormat
|
|
3
|
+
import { h as handleFetch, l as logError, b as localizationStore, i as isValidSelector, t as translate, s as setZonosCountryUrlParam, a as log, e as currencyDisplay, f as currencyConvertAndFormat, g as currencyConvert, j as currencyFormat } from './localization.js';
|
|
4
4
|
import { c as classes } from './classes.js';
|
|
5
5
|
import { g as getHasMoreSpaceOnRight, d as defineCustomElement$7 } from './zonos-hello-dialog2.js';
|
|
6
6
|
import { d as defineCustomElement$d } from './zonos-banner2.js';
|
|
@@ -610,6 +610,19 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
610
610
|
return hasMoreSpaceOnRight;
|
|
611
611
|
}
|
|
612
612
|
};
|
|
613
|
+
this.isShippableCountry = (showLog = true) => {
|
|
614
|
+
if (!localizationStore.localizationLoaded) {
|
|
615
|
+
return false;
|
|
616
|
+
}
|
|
617
|
+
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
618
|
+
if (!localizationStore.isShippableCountry) {
|
|
619
|
+
if (showLog) {
|
|
620
|
+
log(`Hello: not shippable country`);
|
|
621
|
+
}
|
|
622
|
+
return false;
|
|
623
|
+
}
|
|
624
|
+
return true;
|
|
625
|
+
};
|
|
613
626
|
this.mobileLocationOverride = undefined;
|
|
614
627
|
this.animateFromLeftOverride = undefined;
|
|
615
628
|
this.appearanceSettingsOverride = undefined;
|
|
@@ -688,7 +701,8 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
688
701
|
const appearanceSettings = mergeConfig(zonosStore.appearance, this.appearanceSettingsOverride);
|
|
689
702
|
const { theme } = appearanceSettings;
|
|
690
703
|
const restrictedItemsOnPage = (_b = this.allRestrictedItems) === null || _b === void 0 ? void 0 : _b.filter(product => this.productsOnPage.some(restriction => restriction.description === product.itemDescription));
|
|
691
|
-
|
|
704
|
+
const showHello = this.isShippableCountry() && !!selectedCountryCode;
|
|
705
|
+
return (h(Host, { class: "zonos--hello zonos--elements", "data-theme": theme }, showHello && (h("div", { class: "zonos--hello-wrapper" }, h("button", { class: classes([
|
|
692
706
|
'zonos--hello-widget',
|
|
693
707
|
this.showPeekMessage && 'zonos--hello-show-peek-message',
|
|
694
708
|
this.mobileLocationOverride && 'zonos--hello-mobile-override',
|
|
@@ -5,7 +5,7 @@ import { g as getBorderRadius } from './getBorderRadius.js';
|
|
|
5
5
|
import { i as isColorVariable } from './isColorVariable.js';
|
|
6
6
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
7
7
|
|
|
8
|
-
const zonosShippingRichRadioCss = ":host{font-family:Inter;display:block}: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{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--amino-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:var(--amino-space-16);-ms-flex-align:center;align-items:center;gap:var(--amino-space-16);cursor:pointer;border:1px solid var(--amino-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--amino-radius-10));border-top-right-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-
|
|
8
|
+
const zonosShippingRichRadioCss = ":host{font-family:Inter;display:block}: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{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--amino-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:var(--amino-space-16);-ms-flex-align:center;align-items:center;gap:var(--amino-space-16);cursor:pointer;border:1px solid var(--amino-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--amino-radius-10));border-top-right-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--amino-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--selected-border-color, var(--amino-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";
|
|
9
9
|
|
|
10
10
|
const ZonosShippingRichRadio = /*@__PURE__*/ proxyCustomElement(class ZonosShippingRichRadio extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
@@ -9,7 +9,7 @@ import { d as defineCustomElement$3 } from './zonos-shipping-rich-radio2.js';
|
|
|
9
9
|
import { d as defineCustomElement$2 } from './zonos-spinner2.js';
|
|
10
10
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
11
11
|
|
|
12
|
-
const zonosShippingCss = ".sc-zonos-shipping-h{font-family:Inter;display:block}.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--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding
|
|
12
|
+
const zonosShippingCss = ".sc-zonos-shipping-h{font-family:Inter;display:block}.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--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.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(--amino-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--group-btn.sc-zonos-shipping{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:calc(100% - 10px)}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";
|
|
13
13
|
|
|
14
14
|
const ZonosShipping = /*@__PURE__*/ proxyCustomElement(class ZonosShipping extends HTMLElement {
|
|
15
15
|
constructor() {
|
|
@@ -2553,6 +2553,8 @@ const { reset, state: zonosStore } = createStore(() => ({
|
|
|
2553
2553
|
},
|
|
2554
2554
|
organization: '',
|
|
2555
2555
|
placeOrderButtonSelector: null,
|
|
2556
|
+
// default inactive for subscription
|
|
2557
|
+
subscriptionStatus: 'INACTIVE',
|
|
2556
2558
|
successBehavior: 'REDIRECT_TO_SUCCESS_PAGE',
|
|
2557
2559
|
successRedirectUrl: '',
|
|
2558
2560
|
visibilityStatus: 'ENABLED',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as createStore, z as zonosStore } from './zonosStore-
|
|
2
|
-
import { h as handleFetch, l as log, a as localizationStore, b as logError, t as translate } from './localization-
|
|
3
|
-
import { i as isDarkColor } from './isDarkColor-
|
|
4
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
1
|
+
import { c as createStore, z as zonosStore } from './zonosStore-05a62104.js';
|
|
2
|
+
import { h as handleFetch, l as log, a as localizationStore, b as logError, t as translate } from './localization-b3c2a9a9.js';
|
|
3
|
+
import { i as isDarkColor } from './isDarkColor-6fbb9b14.js';
|
|
4
|
+
import { g as getBorderRadius } from './getBorderRadius-45764ad7.js';
|
|
5
5
|
|
|
6
6
|
const prepCalculateLandedCost = () => {
|
|
7
7
|
// maybe we don't need email now for prefetch the landed cost
|
|
@@ -20,17 +20,7 @@ const prepCalculateLandedCost = () => {
|
|
|
20
20
|
lastName: stripeAddressData.value.lastName || '',
|
|
21
21
|
phone: stripeAddressData.value.phone || '',
|
|
22
22
|
},
|
|
23
|
-
items: cartStore.items.map(item =>
|
|
24
|
-
amount: item.amount,
|
|
25
|
-
countryOfOrigin: item.countryOfOrigin,
|
|
26
|
-
currencyCode: item.currencyCode,
|
|
27
|
-
imageUrl: item.imageUrl,
|
|
28
|
-
measurements: item.measurements,
|
|
29
|
-
metadata: item.metadata,
|
|
30
|
-
name: item.name,
|
|
31
|
-
productId: item.productId,
|
|
32
|
-
quantity: item.quantity,
|
|
33
|
-
})),
|
|
23
|
+
items: cartStore.items.map(item => item),
|
|
34
24
|
shippingAddress: {
|
|
35
25
|
addressLine1: stripeAddressData.value.address.line1,
|
|
36
26
|
addressLine2: stripeAddressData.value.address.line2 || '',
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { c as cartStore, a as cartStoreApplySubtotals, b as cartStoreGetShippingTransitInfo, d as cartStoreNextStep, e as cartStorePreviousStep, f as cartStoreReCalculateTotal, g as cartStoreReset, h as cartStoreUpdateItems, i as cartStoreUpdateSelectedShippingOption, j as cartStoreUpdateToErrorState } from './cart-
|
|
2
|
-
import './zonosStore-
|
|
1
|
+
export { c as cartStore, a as cartStoreApplySubtotals, b as cartStoreGetShippingTransitInfo, d as cartStoreNextStep, e as cartStorePreviousStep, f as cartStoreReCalculateTotal, g as cartStoreReset, h as cartStoreUpdateItems, i as cartStoreUpdateSelectedShippingOption, j as cartStoreUpdateToErrorState } from './cart-07091d2a.js';
|
|
2
|
+
import './zonosStore-05a62104.js';
|
|
3
3
|
import './index-d1aa9293.js';
|
|
4
|
-
import './localization-
|
|
5
|
-
import './isDarkColor-
|
|
6
|
-
import './getBorderRadius-
|
|
4
|
+
import './localization-b3c2a9a9.js';
|
|
5
|
+
import './isDarkColor-6fbb9b14.js';
|
|
6
|
+
import './getBorderRadius-45764ad7.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createCommonjsModule, b as commonjsGlobal } from './zonosStore-
|
|
1
|
+
import { a as createCommonjsModule, b as commonjsGlobal } from './zonosStore-05a62104.js';
|
|
2
2
|
|
|
3
3
|
var tinycolor = createCommonjsModule(function (module, exports) {
|
|
4
4
|
// This file is autogenerated. It's used to publish CJS to npm.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as zonosStore } from './zonosStore-
|
|
2
|
-
import { l as log } from './localization-
|
|
1
|
+
import { z as zonosStore } from './zonosStore-05a62104.js';
|
|
2
|
+
import { l as log } from './localization-b3c2a9a9.js';
|
|
3
3
|
|
|
4
4
|
const checkoutBreakpoint = 890;
|
|
5
5
|
const isCheckoutMobile = (isMobile) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-d1aa9293.js';
|
|
2
|
-
import { s as stripeStore, m as stripeStorePrefetchLandedCost } from './cart-
|
|
3
|
-
import { b as logError, a as localizationStore } from './localization-
|
|
4
|
-
import './zonosStore-
|
|
5
|
-
import './isDarkColor-
|
|
6
|
-
import './getBorderRadius-
|
|
2
|
+
import { s as stripeStore, m as stripeStorePrefetchLandedCost } from './cart-07091d2a.js';
|
|
3
|
+
import { b as logError, a as localizationStore } from './localization-b3c2a9a9.js';
|
|
4
|
+
import './zonosStore-05a62104.js';
|
|
5
|
+
import './isDarkColor-6fbb9b14.js';
|
|
6
|
+
import './getBorderRadius-45764ad7.js';
|
|
7
7
|
|
|
8
8
|
const zonosAddressCss = ".sc-zonos-address-h{font-family:Inter;display:block}.sc-zonos-address-h img.sc-zonos-address{max-width:100%}.sc-zonos-address-h dl.sc-zonos-address,.sc-zonos-address-h dd.sc-zonos-address,.sc-zonos-address-h h1.sc-zonos-address,.sc-zonos-address-h h2.sc-zonos-address,.sc-zonos-address-h h3.sc-zonos-address,.sc-zonos-address-h h4.sc-zonos-address,.sc-zonos-address-h h5.sc-zonos-address,.sc-zonos-address-h h6.sc-zonos-address,.sc-zonos-address-h hr.sc-zonos-address,.sc-zonos-address-h figure.sc-zonos-address,.sc-zonos-address-h p.sc-zonos-address,.sc-zonos-address-h pre.sc-zonos-address{margin:0}.sc-zonos-address-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-address-h .zonos--title.sc-zonos-address{margin-bottom:var(--amino-space-16)}";
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-d1aa9293.js';
|
|
2
|
-
import { z as zonosStore } from './zonosStore-
|
|
2
|
+
import { z as zonosStore } from './zonosStore-05a62104.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
4
|
+
import { g as getBorderRadius } from './getBorderRadius-45764ad7.js';
|
|
5
5
|
import { i as isColorVariable } from './isColorVariable-4cda28c9.js';
|
|
6
|
-
import { i as isDarkColor } from './isDarkColor-
|
|
6
|
+
import { i as isDarkColor } from './isDarkColor-6fbb9b14.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Get theme for button text based on background color
|