@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
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const zonosStore = require('./zonosStore-
|
|
4
|
-
const localization = require('./localization-
|
|
5
|
-
const isDarkColor = require('./isDarkColor-
|
|
6
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
3
|
+
const zonosStore = require('./zonosStore-a430ec5b.js');
|
|
4
|
+
const localization = require('./localization-387a8a65.js');
|
|
5
|
+
const isDarkColor = require('./isDarkColor-f3446afd.js');
|
|
6
|
+
const getBorderRadius = require('./getBorderRadius-fdd605c6.js');
|
|
7
7
|
|
|
8
8
|
const prepCalculateLandedCost = () => {
|
|
9
9
|
// maybe we don't need email now for prefetch the landed cost
|
|
@@ -22,17 +22,7 @@ const prepCalculateLandedCost = () => {
|
|
|
22
22
|
lastName: stripeAddressData.value.lastName || '',
|
|
23
23
|
phone: stripeAddressData.value.phone || '',
|
|
24
24
|
},
|
|
25
|
-
items: cartStore.items.map(item =>
|
|
26
|
-
amount: item.amount,
|
|
27
|
-
countryOfOrigin: item.countryOfOrigin,
|
|
28
|
-
currencyCode: item.currencyCode,
|
|
29
|
-
imageUrl: item.imageUrl,
|
|
30
|
-
measurements: item.measurements,
|
|
31
|
-
metadata: item.metadata,
|
|
32
|
-
name: item.name,
|
|
33
|
-
productId: item.productId,
|
|
34
|
-
quantity: item.quantity,
|
|
35
|
-
})),
|
|
25
|
+
items: cartStore.items.map(item => item),
|
|
36
26
|
shippingAddress: {
|
|
37
27
|
addressLine1: stripeAddressData.value.address.line1,
|
|
38
28
|
addressLine2: stripeAddressData.value.address.line2 || '',
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const cart = require('./cart-
|
|
6
|
-
require('./zonosStore-
|
|
5
|
+
const cart = require('./cart-7b70853c.js');
|
|
6
|
+
require('./zonosStore-a430ec5b.js');
|
|
7
7
|
require('./index-9542d2e7.js');
|
|
8
|
-
require('./localization-
|
|
9
|
-
require('./isDarkColor-
|
|
10
|
-
require('./getBorderRadius-
|
|
8
|
+
require('./localization-387a8a65.js');
|
|
9
|
+
require('./isDarkColor-f3446afd.js');
|
|
10
|
+
require('./getBorderRadius-fdd605c6.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const zonosStore = require('./zonosStore-
|
|
3
|
+
const zonosStore = require('./zonosStore-a430ec5b.js');
|
|
4
4
|
|
|
5
5
|
var tinycolor = zonosStore.createCommonjsModule(function (module, exports) {
|
|
6
6
|
// This file is autogenerated. It's used to publish CJS to npm.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const zonosStore = require('./zonosStore-
|
|
4
|
-
const localization = require('./localization-
|
|
3
|
+
const zonosStore = require('./zonosStore-a430ec5b.js');
|
|
4
|
+
const localization = require('./localization-387a8a65.js');
|
|
5
5
|
|
|
6
6
|
const checkoutBreakpoint = 890;
|
|
7
7
|
const isCheckoutMobile = (isMobile) => {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9542d2e7.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const localization = require('./localization-
|
|
8
|
-
require('./zonosStore-
|
|
9
|
-
require('./isDarkColor-
|
|
10
|
-
require('./getBorderRadius-
|
|
6
|
+
const cart = require('./cart-7b70853c.js');
|
|
7
|
+
const localization = require('./localization-387a8a65.js');
|
|
8
|
+
require('./zonosStore-a430ec5b.js');
|
|
9
|
+
require('./isDarkColor-f3446afd.js');
|
|
10
|
+
require('./getBorderRadius-fdd605c6.js');
|
|
11
11
|
|
|
12
12
|
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)}";
|
|
13
13
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9542d2e7.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-a430ec5b.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-fdd605c6.js');
|
|
9
9
|
const isColorVariable = require('./isColorVariable-c1ed7303.js');
|
|
10
|
-
const isDarkColor = require('./isDarkColor-
|
|
10
|
+
const isDarkColor = require('./isDarkColor-f3446afd.js');
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Get theme for button text based on background color
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9542d2e7.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const localization = require('./localization-
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
9
|
-
const submitGtag = require('./submitGtag-
|
|
6
|
+
const cart = require('./cart-7b70853c.js');
|
|
7
|
+
const localization = require('./localization-387a8a65.js');
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-fdd605c6.js');
|
|
9
|
+
const submitGtag = require('./submitGtag-bf6e7c5e.js');
|
|
10
10
|
const classes = require('./classes-b7918f56.js');
|
|
11
|
-
const zonosStore = require('./zonosStore-
|
|
12
|
-
require('./isDarkColor-
|
|
11
|
+
const zonosStore = require('./zonosStore-a430ec5b.js');
|
|
12
|
+
require('./isDarkColor-f3446afd.js');
|
|
13
13
|
|
|
14
14
|
const formatCurrency = ({ amount, currency, showCurrencyText, }) => showCurrencyText
|
|
15
15
|
? `${new Intl.NumberFormat('en-US', {
|
|
@@ -54,7 +54,7 @@ const InfoIcon = `<svg viewBox="0 0 17 16" fill="none" xmlns="https://www.w3.org
|
|
|
54
54
|
</svg>
|
|
55
55
|
`;
|
|
56
56
|
|
|
57
|
-
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}";
|
|
57
|
+
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}";
|
|
58
58
|
|
|
59
59
|
const ZonosCartSubtotal = class {
|
|
60
60
|
constructor(hostRef) {
|
|
@@ -62,6 +62,7 @@ const ZonosCartSubtotal = class {
|
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
64
|
const totalWithoutTaxes = cart.cartStore.total - cart.cartStore.dutiesTaxFees;
|
|
65
|
+
const showDutyTaxesInfo = cart.cartStore.step === 'payment' || cart.cartStore.step === 'shipping';
|
|
65
66
|
const renderShippingInfo = () => {
|
|
66
67
|
if (!cart.cartStore.selectedShippingOption) {
|
|
67
68
|
return (index.h(index.Fragment, null, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, localization.translate('Shipping')), index.h("zonos-text", { class: "zonos--caption", type: "caption" }, localization.translate('No shipping method selected'))));
|
|
@@ -76,12 +77,12 @@ const ZonosCartSubtotal = class {
|
|
|
76
77
|
amount: cart.cartStore.shipping,
|
|
77
78
|
currency: cart.cartStore.currency,
|
|
78
79
|
})
|
|
79
|
-
: '-')),
|
|
80
|
+
: '-')), showDutyTaxesInfo && (index.h("tr", { class: "zonos--row zonos--cart-duties" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column zonos--cart-subtotal-title" }, index.h("div", { class: "zonos--title-with-icon" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, localization.translate('Duties, taxes, and fees')), index.h("zonos-icon", { content: InfoIcon, size: 16 })), !!cart.cartStore.isSelectedShippingAboveDeminimis && (index.h("zonos-text", { color: "gray-800", type: "body" }, localization.translate('Order is over the de minimis threshold for both duty and tax')))), index.h("td", { class: "zonos--column zonos--cart-subtotal-price" }, index.h("div", { class: "zonos--cart-duty-tax-price" }, cart.cartStore.dutiesTaxFees
|
|
80
81
|
? formatCurrency({
|
|
81
82
|
amount: cart.cartStore.dutiesTaxFees,
|
|
82
83
|
currency: cart.cartStore.currency,
|
|
83
84
|
})
|
|
84
|
-
: '-', cart.cartStore.isSelectedShippingGuarantee && (index.h("zonos-badge", null, localization.translate('Guaranteed')))))), index.h("tr", { class: "zonos--row zonos--cart-pay-total" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, localization.translate('Order total'))), index.h("td", { class: "zonos--column" }, index.h("zonos-text", { type: "semiBoldLabel" }, formatCurrency({
|
|
85
|
+
: '-', cart.cartStore.isSelectedShippingGuarantee && (index.h("zonos-badge", null, localization.translate('Guaranteed'))))))), index.h("tr", { class: "zonos--row zonos--cart-pay-total" }, index.h("td", { class: "zonos--column" }), index.h("td", { class: "zonos--column" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, localization.translate('Order total'))), index.h("td", { class: "zonos--column" }, index.h("zonos-text", { type: "semiBoldLabel" }, formatCurrency({
|
|
85
86
|
amount:
|
|
86
87
|
// show total without taxes when step is shipping, show total with taxes when step is payment
|
|
87
88
|
cart.cartStore.step === 'shipping'
|
|
@@ -164,7 +165,7 @@ const ZonosCheckoutFinish = class {
|
|
|
164
165
|
};
|
|
165
166
|
ZonosCheckoutFinish.style = zonosCheckoutFinishCss;
|
|
166
167
|
|
|
167
|
-
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:
|
|
168
|
+
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)}";
|
|
168
169
|
|
|
169
170
|
const ZonosCheckoutPayment = class {
|
|
170
171
|
constructor(hostRef) {
|
|
@@ -194,12 +195,12 @@ const ZonosCheckoutPayment = class {
|
|
|
194
195
|
return null;
|
|
195
196
|
}
|
|
196
197
|
this.disabled = !((_a = cart.stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
197
|
-
return (index.h(index.Host, { class: "zonos--checkout-payment zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, localization.translate('Payment method')), this.paymentError && (index.h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, localization.translate("We couldn't complete your payment. Please verify the payment details and try again."))), index.h("zonos-payment", null)), index.h("zonos-button", { backgroundColor: this.submitBtnColor, "is-disabled": this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
198
|
+
return (index.h(index.Host, { class: "zonos--checkout-payment zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, localization.translate('Payment method')), this.paymentError && (index.h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, localization.translate("We couldn't complete your payment. Please verify the payment details and try again."))), index.h("zonos-payment", null)), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, "is-disabled": this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
198
199
|
// use primary type when on mobile mode
|
|
199
200
|
variant: this.submitBtnType }, "Pay", ' ', formatCurrency({
|
|
200
201
|
amount: cart.cartStore.total,
|
|
201
202
|
currency: cart.cartStore.currency,
|
|
202
|
-
}))));
|
|
203
|
+
})))));
|
|
203
204
|
}
|
|
204
205
|
static get watchers() { return {
|
|
205
206
|
"disabled": ["watchFormComplete"]
|
|
@@ -240,7 +241,7 @@ const ZonosCollapse = class {
|
|
|
240
241
|
};
|
|
241
242
|
ZonosCollapse.style = zonosCollapseCss;
|
|
242
243
|
|
|
243
|
-
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%}";
|
|
244
|
+
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)}";
|
|
244
245
|
|
|
245
246
|
const ZonosCustomerInfo = class {
|
|
246
247
|
constructor(hostRef) {
|
|
@@ -273,9 +274,9 @@ const ZonosCustomerInfo = class {
|
|
|
273
274
|
this.disabled =
|
|
274
275
|
!((_a = cart.stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.complete) ||
|
|
275
276
|
!((_b = cart.stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.complete);
|
|
276
|
-
return (index.h(index.Host, { class: "zonos--customer-info zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, localization.translate('Customer information')), index.h("zonos-link-authentication", { titleText: localization.translate('Contact') }), index.h("zonos-address", { defaultAddress: this.defaultAddress, titleText: localization.translate('Address'), type: "shipping" })), index.h("zonos-button", { backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
277
|
+
return (index.h(index.Host, { class: "zonos--customer-info zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, localization.translate('Customer information')), index.h("zonos-link-authentication", { titleText: localization.translate('Contact') }), index.h("zonos-address", { defaultAddress: this.defaultAddress, titleText: localization.translate('Address'), type: "shipping" })), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, isDisabled: this.disabled, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
277
278
|
// use primary type when on mobile mode
|
|
278
|
-
variant: this.submitBtnType }, localization.translate('Continue to shipping'))));
|
|
279
|
+
variant: this.submitBtnType }, localization.translate('Continue to shipping')))));
|
|
279
280
|
}
|
|
280
281
|
static get watchers() { return {
|
|
281
282
|
"disabled": ["watchFormComplete"]
|
|
@@ -425,7 +426,7 @@ const ZonosReview = class {
|
|
|
425
426
|
};
|
|
426
427
|
ZonosReview.style = zonosReviewCss;
|
|
427
428
|
|
|
428
|
-
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
|
|
429
|
+
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)}";
|
|
429
430
|
|
|
430
431
|
const ZonosShipping = class {
|
|
431
432
|
constructor(hostRef) {
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9542d2e7.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const localization = require('./localization-
|
|
8
|
-
const zonosStore = require('./zonosStore-
|
|
9
|
-
const submitGtag = require('./submitGtag-
|
|
6
|
+
const cart = require('./cart-7b70853c.js');
|
|
7
|
+
const localization = require('./localization-387a8a65.js');
|
|
8
|
+
const zonosStore = require('./zonosStore-a430ec5b.js');
|
|
9
|
+
const submitGtag = require('./submitGtag-bf6e7c5e.js');
|
|
10
10
|
const classes = require('./classes-b7918f56.js');
|
|
11
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
12
|
-
const isDarkColor = require('./isDarkColor-
|
|
11
|
+
const getBorderRadius = require('./getBorderRadius-fdd605c6.js');
|
|
12
|
+
const isDarkColor = require('./isDarkColor-f3446afd.js');
|
|
13
13
|
|
|
14
14
|
const LeftArrow = `<svg color="var(--amino-gray-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.707 16.707a1 1 0 0 1-1.414 0l-3.647-3.646a1.5 1.5 0 0 1 0-2.122l3.647-3.646a1 1 0 0 1 1.414 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l2.293 2.293a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
15
15
|
|
|
@@ -42,7 +42,7 @@ const ZonosCheckout = class {
|
|
|
42
42
|
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
43
43
|
if (!localization.localizationStore.isShippableCountry) {
|
|
44
44
|
if (showLog) {
|
|
45
|
-
localization.log(`not shippable country`);
|
|
45
|
+
localization.log(`Checkout: not shippable country`);
|
|
46
46
|
}
|
|
47
47
|
return false;
|
|
48
48
|
}
|
|
@@ -183,7 +183,8 @@ const ZonosCheckout = class {
|
|
|
183
183
|
// show the selector when it's domestic
|
|
184
184
|
selector === null || selector === void 0 ? void 0 : selector.forEach(el => {
|
|
185
185
|
const element = el;
|
|
186
|
-
const display = element.getAttribute('data-zonos-checkout-original-display')
|
|
186
|
+
const display = element.getAttribute('data-zonos-checkout-original-display') ||
|
|
187
|
+
getComputedStyle(element).display;
|
|
187
188
|
// fallback to initial (browser value) if "display" is not found
|
|
188
189
|
element.style.display = display || 'initial';
|
|
189
190
|
});
|
|
@@ -357,7 +358,13 @@ const ZonosCheckout = class {
|
|
|
357
358
|
'--border-radius': getBorderRadius.getBorderRadius(style),
|
|
358
359
|
} }, cart.cartStore.step !== 'finish' && cart.cartStore.step !== 'error' && (index.h(index.Fragment, null, index.h("div", { class: "zonos--left", "data-theme": leftSideTheme, style: {
|
|
359
360
|
'--primary-color': !this.isMobile ? colorPrimary : '',
|
|
360
|
-
} }, !this.isMobile && renderTopHeader(), cart.cartStore.step === 'customer-info' && (index.h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor, submitBtnType: submitBtnType })), cart.cartStore.step === 'shipping' && (index.h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor, submitBtnType: submitBtnType })), cart.cartStore.step === 'payment' && (index.h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleCheckoutPaymentContinue(), paymentError: this.paymentError, submitBtnColor: submitButtonColor, submitBtnType: submitBtnType }))), index.h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), !this.isMobile && (index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() })), index.h("div", { class: "flex--wrapper" }, index.h("div", { class: "zonos--wrapper" }, index.h("zonos-collapse", { collapseSize: reviewElementSize,
|
|
361
|
+
} }, !this.isMobile && renderTopHeader(), cart.cartStore.step === 'customer-info' && (index.h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor, submitBtnType: submitBtnType })), cart.cartStore.step === 'shipping' && (index.h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor, submitBtnType: submitBtnType })), cart.cartStore.step === 'payment' && (index.h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleCheckoutPaymentContinue(), paymentError: this.paymentError, submitBtnColor: submitButtonColor, submitBtnType: submitBtnType }))), index.h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), !this.isMobile && (index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() })), index.h("div", { class: "flex--wrapper" }, index.h("div", { class: "zonos--wrapper" }, index.h("zonos-collapse", { collapseSize: reviewElementSize,
|
|
362
|
+
// only collapse on mobile
|
|
363
|
+
collapsed: this.collapseReviewMobile && this.isMobile }, index.h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
364
|
+
// do nothing if it's not mobile
|
|
365
|
+
if (!this.isMobile) {
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
361
368
|
this.collapseReviewMobile =
|
|
362
369
|
!this.collapseReviewMobile;
|
|
363
370
|
}, ref: el => (this.zonosReviewRef = el) }), index.h("zonos-cart-items", null))), index.h("zonos-v-stack", { spacing: 16 }, index.h("zonos-cart-subtotal", null), index.h("zonos-custom-message", { class: "zonos--checkout-default-message", icon: MessageIcon, message: defaultMessage }))), !this.isMobile && renderFooter()), this.isMobile && renderFooter())), (cart.cartStore.step === 'finish' || cart.cartStore.step === 'error') && (index.h("div", { class: "zonos--done", "data-theme": rightSideTheme }, index.h("div", { class: "zonos--header" }, renderLogo(), index.h("zonos-button", { class: "zonos--close-button", icon: index.h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => this.handleFinishClick(), theme: rightSideTheme })), index.h("zonos-checkout-finish", { borderRadius: style, onCloseClick: () => this.handleFinishClick(), overrideNotification: cart.cartStore.step === 'error' && !!cart.cartStore.error
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9542d2e7.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const localization = require('./localization-
|
|
8
|
-
const zonosStore = require('./zonosStore-
|
|
9
|
-
require('./isDarkColor-
|
|
10
|
-
require('./getBorderRadius-
|
|
6
|
+
const cart = require('./cart-7b70853c.js');
|
|
7
|
+
const localization = require('./localization-387a8a65.js');
|
|
8
|
+
const zonosStore = require('./zonosStore-a430ec5b.js');
|
|
9
|
+
require('./isDarkColor-f3446afd.js');
|
|
10
|
+
require('./getBorderRadius-fdd605c6.js');
|
|
11
11
|
|
|
12
12
|
const getZonosSetting = async () => {
|
|
13
13
|
const url = `${"https://v1.route.js.zonos.com"}/api/zonos-setting`;
|
|
@@ -121,11 +121,20 @@ const ZonosController = class {
|
|
|
121
121
|
localization.log('Checkout failed to load -- missing publishable key', 'warn');
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
|
+
if (zonosStore.zonosStore.checkoutSettings.subscriptionStatus === 'INACTIVE') {
|
|
125
|
+
localization.log('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===', 'warn');
|
|
126
|
+
localization.log('zonos controller loaded');
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (zonosStore.zonosStore.checkoutSettings.visibilityStatus === 'DISABLED') {
|
|
130
|
+
localization.log('=== Checkout is disabled by store owner ===', 'warn');
|
|
131
|
+
localization.log('zonos controller loaded');
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
124
134
|
// send publishable key out to load stripe
|
|
125
135
|
this.stripeInitEvent.emit({
|
|
126
136
|
publishableKey: publishableKey.token,
|
|
127
137
|
});
|
|
128
|
-
// eslint-disable-next-line no-console
|
|
129
138
|
localization.log('zonos controller loaded');
|
|
130
139
|
})();
|
|
131
140
|
}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9542d2e7.js');
|
|
6
|
-
const localization = require('./localization-
|
|
6
|
+
const localization = require('./localization-387a8a65.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const isDarkColor = require('./isDarkColor-
|
|
9
|
-
require('./zonosStore-
|
|
8
|
+
const isDarkColor = require('./isDarkColor-f3446afd.js');
|
|
9
|
+
require('./zonosStore-a430ec5b.js');
|
|
10
10
|
|
|
11
11
|
const zonosCountryFlagCss = ":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-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";
|
|
12
12
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9542d2e7.js');
|
|
6
|
-
const localization = require('./localization-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const localization = require('./localization-387a8a65.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-a430ec5b.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-2855491b.js');
|
|
10
10
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9542d2e7.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
7
|
-
const localization = require('./localization-
|
|
6
|
+
const zonosStore = require('./zonosStore-a430ec5b.js');
|
|
7
|
+
const localization = require('./localization-387a8a65.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-2855491b.js');
|
|
10
10
|
|
|
@@ -601,6 +601,19 @@ const ZonosHello = class {
|
|
|
601
601
|
return hasMoreSpaceOnRight;
|
|
602
602
|
}
|
|
603
603
|
};
|
|
604
|
+
this.isShippableCountry = (showLog = true) => {
|
|
605
|
+
if (!localization.localizationStore.localizationLoaded) {
|
|
606
|
+
return false;
|
|
607
|
+
}
|
|
608
|
+
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
609
|
+
if (!localization.localizationStore.isShippableCountry) {
|
|
610
|
+
if (showLog) {
|
|
611
|
+
localization.log(`Hello: not shippable country`);
|
|
612
|
+
}
|
|
613
|
+
return false;
|
|
614
|
+
}
|
|
615
|
+
return true;
|
|
616
|
+
};
|
|
604
617
|
this.mobileLocationOverride = undefined;
|
|
605
618
|
this.animateFromLeftOverride = undefined;
|
|
606
619
|
this.appearanceSettingsOverride = undefined;
|
|
@@ -679,7 +692,8 @@ const ZonosHello = class {
|
|
|
679
692
|
const appearanceSettings = zonosStore.mergeConfig(zonosStore.zonosStore.appearance, this.appearanceSettingsOverride);
|
|
680
693
|
const { theme } = appearanceSettings;
|
|
681
694
|
const restrictedItemsOnPage = (_b = this.allRestrictedItems) === null || _b === void 0 ? void 0 : _b.filter(product => this.productsOnPage.some(restriction => restriction.description === product.itemDescription));
|
|
682
|
-
|
|
695
|
+
const showHello = this.isShippableCountry() && !!selectedCountryCode;
|
|
696
|
+
return (index.h(index.Host, { class: "zonos--hello zonos--elements", "data-theme": theme }, showHello && (index.h("div", { class: "zonos--hello-wrapper" }, index.h("button", { class: classes.classes([
|
|
683
697
|
'zonos--hello-widget',
|
|
684
698
|
this.showPeekMessage && 'zonos--hello-show-peek-message',
|
|
685
699
|
this.mobileLocationOverride && 'zonos--hello-mobile-override',
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9542d2e7.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
require('./zonosStore-
|
|
8
|
-
require('./localization-
|
|
9
|
-
require('./isDarkColor-
|
|
10
|
-
require('./getBorderRadius-
|
|
6
|
+
const cart = require('./cart-7b70853c.js');
|
|
7
|
+
require('./zonosStore-a430ec5b.js');
|
|
8
|
+
require('./localization-387a8a65.js');
|
|
9
|
+
require('./isDarkColor-f3446afd.js');
|
|
10
|
+
require('./getBorderRadius-fdd605c6.js');
|
|
11
11
|
|
|
12
12
|
const zonosPaymentCss = ".sc-zonos-payment-h{font-family:Inter;display:block}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:var(--amino-space-16)}";
|
|
13
13
|
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9542d2e7.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-a430ec5b.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-fdd605c6.js');
|
|
9
9
|
const isColorVariable = require('./isColorVariable-c1ed7303.js');
|
|
10
10
|
|
|
11
|
-
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-
|
|
11
|
+
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}";
|
|
12
12
|
|
|
13
13
|
const ZonosShippingRichRadio = class {
|
|
14
14
|
constructor(hostRef) {
|
|
@@ -2555,6 +2555,8 @@ const { reset, state: zonosStore } = createStore(() => ({
|
|
|
2555
2555
|
},
|
|
2556
2556
|
organization: '',
|
|
2557
2557
|
placeOrderButtonSelector: null,
|
|
2558
|
+
// default inactive for subscription
|
|
2559
|
+
subscriptionStatus: 'INACTIVE',
|
|
2558
2560
|
successBehavior: 'REDIRECT_TO_SUCCESS_PAGE',
|
|
2559
2561
|
successRedirectUrl: '',
|
|
2560
2562
|
visibilityStatus: 'ENABLED',
|
|
@@ -53,6 +53,12 @@
|
|
|
53
53
|
:host .zonos--cart-subtotal-price {
|
|
54
54
|
border-bottom: 1px solid var(--amino-gray-200);
|
|
55
55
|
}
|
|
56
|
+
:host .zonos--cart-duty-tax-price {
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
align-items: flex-end;
|
|
60
|
+
gap: 5px;
|
|
61
|
+
}
|
|
56
62
|
:host .zonos--cart-subtotal-price {
|
|
57
63
|
text-align: right;
|
|
58
64
|
}
|
|
@@ -8,6 +8,7 @@ import InfoIcon from "./assets/InfoIcon.svg";
|
|
|
8
8
|
export class ZonosCartSubtotal {
|
|
9
9
|
render() {
|
|
10
10
|
const totalWithoutTaxes = cartStore.total - cartStore.dutiesTaxFees;
|
|
11
|
+
const showDutyTaxesInfo = cartStore.step === 'payment' || cartStore.step === 'shipping';
|
|
11
12
|
const renderShippingInfo = () => {
|
|
12
13
|
if (!cartStore.selectedShippingOption) {
|
|
13
14
|
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'))));
|
|
@@ -22,12 +23,12 @@ export class ZonosCartSubtotal {
|
|
|
22
23
|
amount: cartStore.shipping,
|
|
23
24
|
currency: cartStore.currency,
|
|
24
25
|
})
|
|
25
|
-
: '-')),
|
|
26
|
+
: '-')), 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
|
|
26
27
|
? formatCurrency({
|
|
27
28
|
amount: cartStore.dutiesTaxFees,
|
|
28
29
|
currency: cartStore.currency,
|
|
29
30
|
})
|
|
30
|
-
: '-', 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({
|
|
31
|
+
: '-', 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({
|
|
31
32
|
amount:
|
|
32
33
|
// show total without taxes when step is shipping, show total with taxes when step is payment
|
|
33
34
|
cartStore.step === 'shipping'
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
:host .zonos--group {
|
|
39
39
|
margin-bottom: var(--amino-space-20);
|
|
40
40
|
overflow: auto;
|
|
41
|
-
padding:
|
|
41
|
+
padding: 5px;
|
|
42
42
|
}
|
|
43
43
|
:host .zonos--group::-webkit-scrollbar {
|
|
44
44
|
width: 10px;
|
|
@@ -58,6 +58,10 @@
|
|
|
58
58
|
:host .zonos--payment-error-banner {
|
|
59
59
|
margin-bottom: var(--amino-space-8);
|
|
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
|
}
|
|
@@ -30,12 +30,12 @@ export class ZonosCheckoutPayment {
|
|
|
30
30
|
return null;
|
|
31
31
|
}
|
|
32
32
|
this.disabled = !((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
33
|
-
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",
|
|
33
|
+
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",
|
|
34
34
|
// use primary type when on mobile mode
|
|
35
35
|
variant: this.submitBtnType }, "Pay", ' ', formatCurrency({
|
|
36
36
|
amount: cartStore.total,
|
|
37
37
|
currency: cartStore.currency,
|
|
38
|
-
}))));
|
|
38
|
+
})))));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "zonos-checkout-payment"; }
|
|
41
41
|
static get encapsulation() { return "scoped"; }
|
|
@@ -37,7 +37,7 @@ export class ZonosCheckout {
|
|
|
37
37
|
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
38
38
|
if (!localizationStore.isShippableCountry) {
|
|
39
39
|
if (showLog) {
|
|
40
|
-
log(`not shippable country`);
|
|
40
|
+
log(`Checkout: not shippable country`);
|
|
41
41
|
}
|
|
42
42
|
return false;
|
|
43
43
|
}
|
|
@@ -178,7 +178,8 @@ export class ZonosCheckout {
|
|
|
178
178
|
// show the selector when it's domestic
|
|
179
179
|
selector === null || selector === void 0 ? void 0 : selector.forEach(el => {
|
|
180
180
|
const element = el;
|
|
181
|
-
const display = element.getAttribute('data-zonos-checkout-original-display')
|
|
181
|
+
const display = element.getAttribute('data-zonos-checkout-original-display') ||
|
|
182
|
+
getComputedStyle(element).display;
|
|
182
183
|
// fallback to initial (browser value) if "display" is not found
|
|
183
184
|
element.style.display = display || 'initial';
|
|
184
185
|
});
|
|
@@ -352,7 +353,13 @@ export class ZonosCheckout {
|
|
|
352
353
|
'--border-radius': getBorderRadius(style),
|
|
353
354
|
} }, cartStore.step !== 'finish' && cartStore.step !== 'error' && (h(Fragment, null, h("div", { class: "zonos--left", "data-theme": leftSideTheme, style: {
|
|
354
355
|
'--primary-color': !this.isMobile ? colorPrimary : '',
|
|
355
|
-
} }, !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,
|
|
356
|
+
} }, !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,
|
|
357
|
+
// only collapse on mobile
|
|
358
|
+
collapsed: this.collapseReviewMobile && this.isMobile }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
359
|
+
// do nothing if it's not mobile
|
|
360
|
+
if (!this.isMobile) {
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
356
363
|
this.collapseReviewMobile =
|
|
357
364
|
!this.collapseReviewMobile;
|
|
358
365
|
}, 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
|