@zonos/elements 1.3.100 → 1.3.102
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-ba56e884.js → cart-213f42f0.js} +2 -1
- package/dist/cjs/{createCustomEvent-56d8ca50.js → createCustomEvent-f2792ab7.js} +1 -1
- package/dist/cjs/index.cjs.js +9 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-184805ac.js → paypal-d881282c.js} +1 -1
- package/dist/cjs/zonos-address_7.cjs.entry.js +5 -5
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +2 -2
- package/dist/cjs/{zonos-cart-items_12.cjs.entry.js → zonos-cart-items_13.cjs.entry.js} +128 -38
- package/dist/cjs/zonos-checkout.cjs.entry.js +20 -6
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +7 -7
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-toggle.cjs.entry.js +32 -0
- package/dist/cjs/zonos-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.css +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +6 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +20 -14
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/globe.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/zonosIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-currency-toggle/zonos-currency-toggle.js +41 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +19 -6
- package/dist/collection/components/common/zonos-banner/zonos-banner.js +1 -1
- package/dist/collection/components/common/zonos-button/zonos-button.css +2 -2
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +1 -1
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +3 -3
- package/dist/collection/components/common/zonos-text/zonos-text.js +2 -2
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.css +79 -0
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +92 -0
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.css +1 -1
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/globe.svg +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/zonosIcon.svg +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +2 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/api/isStoreDiscountEnabled.js +11 -0
- package/dist/collection/components/utils/checkout/getDisplayCurrency.js +9 -0
- package/dist/collection/components/utils/checkout/renderCheckoutCurrency.js +31 -0
- package/dist/collection/scripts/_zonosBase.js +2 -0
- package/dist/collection/types/checkout/api/StoreDiscountEnabled.js +1 -0
- package/dist/collection/types/common-ui/Toggle.js +1 -0
- package/dist/collection/types/generated/graphql.internal.types.js +8 -4
- package/dist/collection/types/index.js +1 -0
- package/dist/collection/types/styles/Color.js +2 -1
- package/dist/esm/{cart-b7bbf95b.js → cart-9a4c155b.js} +2 -1
- package/dist/esm/{createCustomEvent-4bfd1290.js → createCustomEvent-65611cd0.js} +1 -1
- package/dist/esm/index.js +9 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-5eaa95d4.js → paypal-63e83a4a.js} +1 -1
- package/dist/esm/zonos-address_7.entry.js +5 -5
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +2 -2
- package/dist/esm/{zonos-cart-items_12.entry.js → zonos-cart-items_13.entry.js} +128 -39
- package/dist/esm/zonos-checkout.entry.js +20 -6
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +7 -7
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-notification_3.entry.js +4 -4
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-toggle.entry.js +28 -0
- package/dist/esm/zonos-tooltip.entry.js +3 -3
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/{cart-b7bbf95b.js → cart-9a4c155b.js} +1 -1
- package/dist/esm-es5/{createCustomEvent-4bfd1290.js → createCustomEvent-65611cd0.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-5eaa95d4.js → paypal-63e83a4a.js} +1 -1
- package/dist/esm-es5/zonos-address_7.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -0
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.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-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -0
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/scripts/index.d.ts +78 -4
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-currency-toggle/zonos-currency-toggle.d.ts +5 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +2 -0
- package/dist/types/components/common/zonos-icon/zonos-icon.d.ts +1 -1
- package/dist/types/components/common/zonos-toggle/zonos-toggle.d.ts +17 -0
- package/dist/types/components/store/checkout/cart.d.ts +8 -0
- package/dist/types/components/utils/api/isStoreDiscountEnabled.d.ts +6 -0
- package/dist/types/components/utils/checkout/getDisplayCurrency.d.ts +1 -0
- package/dist/types/components/utils/checkout/renderCheckoutCurrency.d.ts +10 -0
- package/dist/types/components.d.ts +65 -2
- package/dist/types/scripts/_zonosBase.d.ts +7 -0
- package/dist/types/types/checkout/api/StoreDiscountEnabled.d.ts +3 -0
- package/dist/types/types/common-ui/Toggle.d.ts +5 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +14 -5
- package/dist/types/types/generated/graphql.internal.types.ts +24 -8
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/styles/Color.d.ts +2 -2
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-93e2a2ed.system.entry.js → p-06b63d33.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c60675df.entry.js → p-076413a3.entry.js} +1 -1
- package/dist/zonos-elements/{p-5400d785.entry.js → p-0af4e659.entry.js} +1 -1
- package/dist/zonos-elements/{p-01cb4d70.system.entry.js → p-0ba0151f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-afad2fae.entry.js → p-1a9a51bf.entry.js} +1 -1
- package/dist/zonos-elements/p-1b1f2e33.system.entry.js +1 -0
- package/dist/zonos-elements/{p-2b62fe10.system.entry.js → p-1c9972d5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7aa41ee0.system.entry.js → p-203d901c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e3e9983b.entry.js → p-2aa5575f.entry.js} +1 -1
- package/dist/zonos-elements/p-2d77afbc.entry.js +1 -0
- package/dist/zonos-elements/{p-22e81fee.system.entry.js → p-32c29205.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-10392331.entry.js → p-36eaad7e.entry.js} +1 -1
- package/dist/zonos-elements/{p-6df9bd63.system.js → p-38b8a13d.system.js} +2 -2
- package/dist/zonos-elements/p-3deca7bd.system.js +1 -0
- package/dist/zonos-elements/{p-c1494500.system.js → p-419c27c5.system.js} +1 -1
- package/dist/zonos-elements/{p-c5bd3dd0.system.js → p-4814d204.system.js} +1 -1
- package/dist/zonos-elements/{p-3e29a09d.system.entry.js → p-481a5dde.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4c06d4d9.system.entry.js → p-489029d9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ea68ee1f.entry.js → p-4eb3e354.entry.js} +1 -1
- package/dist/zonos-elements/{p-8615f779.system.entry.js → p-4f97ab5c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3b1e79e6.system.entry.js → p-514b42a4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ff3bd453.entry.js → p-5900a867.entry.js} +1 -1
- package/dist/zonos-elements/{p-b3c1a516.entry.js → p-6b1aee83.entry.js} +1 -1
- package/dist/zonos-elements/p-71fe8da9.entry.js +1 -0
- package/dist/zonos-elements/p-762a00e2.system.entry.js +1 -0
- package/dist/zonos-elements/{p-50d86fbe.system.entry.js → p-7cb4523f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-86afd38a.entry.js +1 -0
- package/dist/zonos-elements/{p-2156c4b3.entry.js → p-8a384947.entry.js} +1 -1
- package/dist/zonos-elements/p-92b0a91c.entry.js +1 -0
- package/dist/zonos-elements/{p-74014018.system.entry.js → p-939d363c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d249a632.entry.js → p-ad733913.entry.js} +1 -1
- package/dist/zonos-elements/{p-5657fa8b.entry.js → p-ad7d949c.entry.js} +1 -1
- package/dist/zonos-elements/{p-f6dad0d3.entry.js → p-b8850092.entry.js} +1 -1
- package/dist/zonos-elements/{p-7ac03155.js → p-bce83a4e.js} +1 -1
- package/dist/zonos-elements/{p-38886017.system.entry.js → p-bfd73737.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c64a74bc.js +1 -0
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-32bc9718.entry.js → p-ca02bd48.entry.js} +1 -1
- package/dist/zonos-elements/{p-0450d72d.js → p-d17fc7b5.js} +1 -1
- package/dist/zonos-elements/{p-fe6d226f.system.entry.js → p-d2da5f75.system.entry.js} +1 -1
- package/dist/zonos-elements/p-daec1676.system.entry.js +1 -0
- package/dist/zonos-elements/{p-10b7320c.system.entry.js → p-ee48a87e.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.css +22 -22
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +0 -1
- package/dist/zonos-elements/p-38c109e5.system.entry.js +0 -1
- package/dist/zonos-elements/p-89ba9d89.entry.js +0 -1
- package/dist/zonos-elements/p-9bf95d37.system.entry.js +0 -1
- package/dist/zonos-elements/p-bcbf4821.entry.js +0 -1
- package/dist/zonos-elements/p-d3dfda31.system.js +0 -1
- package/dist/zonos-elements/p-d8cbd4ea.js +0 -1
- package/dist/zonos-elements/p-ecb8676d.entry.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { d as cartStore,
|
|
2
|
+
import { d as cartStore, E as currencyFormat, t as translate, F as cartStoreHasOneEligibleItem, G as stripeStoreApplyPromoCode, H as stripeStoreRemovePromoCode, w as stripeStoreReset, j as stripeStore, I as stripeStoreRetrievePayment, J as stripeStoreMessageBasedOnStatus, K as stripeStoreResetPromoCode, l as localizationStore, L as stripeStoreTranslateAddressToLatin, M as cartStoreUpdateSelectedShippingOption, N as cartStoreGetShippingTransitInfo, O as sortServiceLevelOptionsByAmount } from './cart-9a4c155b.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { s as submitGtag, a as paypalStore, b as paypalStoreReset, i as isContrastColor } from './paypal-
|
|
4
|
+
import { s as submitGtag, a as paypalStore, b as paypalStoreReset, i as isContrastColor } from './paypal-63e83a4a.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-7798ac16.js';
|
|
6
|
-
import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-
|
|
6
|
+
import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-65611cd0.js';
|
|
7
7
|
import { g as getBorderRadius } from './getBorderRadius-e55a9df1.js';
|
|
8
8
|
import { h as handleFetch, s as sendErrorLog } from './handleFetch-ce924688.js';
|
|
9
9
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
@@ -12,6 +12,44 @@ import { i as isDarkColor, t as tinycolor } from './isDarkColor-4261bc3c.js';
|
|
|
12
12
|
import { i as isColorVariable } from './isColorVariable-82457bef.js';
|
|
13
13
|
import { c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
14
14
|
|
|
15
|
+
const getDisplayCurrency = () => {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
const shouldDisplayBaseCurrency = cartStore.displayBaseCurrency;
|
|
18
|
+
const displayCurrency = shouldDisplayBaseCurrency && ((_a = cartStore.exchangeRate) === null || _a === void 0 ? void 0 : _a.sourceCurrencyCode)
|
|
19
|
+
? (_b = cartStore.exchangeRate) === null || _b === void 0 ? void 0 : _b.sourceCurrencyCode
|
|
20
|
+
: cartStore.currency;
|
|
21
|
+
return displayCurrency;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Unified currency rendering for checkout amounts.
|
|
26
|
+
* @note This is only to display, not for calculations.
|
|
27
|
+
*/
|
|
28
|
+
const renderCheckoutCurrency = ({ amount, isForeign }) => {
|
|
29
|
+
var _a;
|
|
30
|
+
const targetRate = ((_a = cartStore.exchangeRate) === null || _a === void 0 ? void 0 : _a.rate) || 1;
|
|
31
|
+
const shouldDisplayBaseCurrency = cartStore.displayBaseCurrency;
|
|
32
|
+
const displayCurrency = getDisplayCurrency();
|
|
33
|
+
if (isForeign) {
|
|
34
|
+
// Amount is in foreign currency, divide by the rate to convert it to the base currency if displaying in base currency
|
|
35
|
+
const displayAmount = shouldDisplayBaseCurrency
|
|
36
|
+
? amount / targetRate
|
|
37
|
+
: amount;
|
|
38
|
+
return currencyFormat({
|
|
39
|
+
amount: displayAmount,
|
|
40
|
+
currency: displayCurrency,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
// Amount is already in base currency, need to multiply rate to convert to foreign currency if display in foreign currency
|
|
44
|
+
const displayAmount = shouldDisplayBaseCurrency
|
|
45
|
+
? amount
|
|
46
|
+
: amount * targetRate;
|
|
47
|
+
return currencyFormat({
|
|
48
|
+
amount: displayAmount,
|
|
49
|
+
currency: displayCurrency,
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
15
53
|
function extend (destination) {
|
|
16
54
|
for (var i = 1; i < arguments.length; i++) {
|
|
17
55
|
var source = arguments[i];
|
|
@@ -1017,20 +1055,19 @@ const ZonosCartItems = class {
|
|
|
1017
1055
|
this.errorImages = [];
|
|
1018
1056
|
}
|
|
1019
1057
|
render() {
|
|
1020
|
-
var _a;
|
|
1021
1058
|
const emptyItemImg = getAssetPath('./assets/empty-item.jpeg');
|
|
1022
|
-
const rate = ((_a = cartStore.exchangeRate) === null || _a === void 0 ? void 0 : _a.rate) || 1;
|
|
1023
1059
|
const nonRestrictedItems = cartStore.items.filter(item => !item.isRestricted);
|
|
1024
|
-
return (h(Host, { key: '
|
|
1060
|
+
return (h(Host, { key: '52911cfab4b2da9d65c840cd692e638c9dc732c5', class: "zonos--cart-items zonos--elements" }, h("table", { key: '428a62423a7fcf0721f420c9fdceac4bd928a6eb', class: "zonos--cart-table" }, h("tbody", { key: '41a438eeb79635ba00a241fa9771b9c33c7fe7ff' }, nonRestrictedItems.map(item => {
|
|
1025
1061
|
const itemImg = item.imageUrl;
|
|
1026
1062
|
const cleanedItemNames = cleanHtmlMarkdown(item.name);
|
|
1063
|
+
const amount = item.amount * item.quantity;
|
|
1027
1064
|
return (h("tr", { class: "zonos--cart-item" }, h("td", { class: "zonos--column zonos--cart-item-image" }, itemImg && !this.errorImages.includes(itemImg) ? (h("img", { alt: item.name, onError: () => {
|
|
1028
1065
|
this.errorImages = [...this.errorImages, itemImg];
|
|
1029
1066
|
}, src: item.imageUrl, style: {
|
|
1030
1067
|
'min-width': '40px',
|
|
1031
|
-
}, width: 40 })) : (h("img", { alt: item.name, src: emptyItemImg, width: 40 }))), h("td", { class: "zonos--column zonos--cart-item-name" }, h("div", null, cleanedItemNames.map(name => (h("zonos-text", { type: "label" }, name)))), h("zonos-text", { textColor: "gray-600", type: "caption" }, translate('Quantity'), ": ", item.quantity)), h("td", { class: "zonos--column zonos--cart-item-price" }, h("zonos-text", { type: "semiBoldLabel", weight: 600 },
|
|
1032
|
-
amount
|
|
1033
|
-
|
|
1068
|
+
}, width: 40 })) : (h("img", { alt: item.name, src: emptyItemImg, width: 40 }))), h("td", { class: "zonos--column zonos--cart-item-name" }, h("div", null, cleanedItemNames.map(name => (h("zonos-text", { type: "label" }, name)))), h("zonos-text", { textColor: "gray-600", type: "caption" }, translate('Quantity'), ": ", item.quantity)), h("td", { class: "zonos--column zonos--cart-item-price" }, h("zonos-text", { type: "semiBoldLabel", weight: 600 }, renderCheckoutCurrency({
|
|
1069
|
+
amount,
|
|
1070
|
+
isForeign: false,
|
|
1034
1071
|
})))));
|
|
1035
1072
|
})))));
|
|
1036
1073
|
}
|
|
@@ -1112,9 +1149,9 @@ const ZonosCartRestrictedItems = class {
|
|
|
1112
1149
|
this.errorImages = [...this.errorImages, itemImg];
|
|
1113
1150
|
}, src: itemImg, style: {
|
|
1114
1151
|
'min-width': '40px',
|
|
1115
|
-
}, width: 40 })) : (h("img", { alt: item.name || `Restricted item ${index + 1}`, src: emptyItemImg, width: 40 }))), h("td", { class: "zonos--column zonos--cart-item-name" }, h("zonos-text", { type: "label" }, ((_b = item.matchedItem) === null || _b === void 0 ? void 0 : _b.name) || item.name), h("zonos-text", { type: "caption" }, item.restriction.reason)), h("td", { class: "zonos--column zonos--cart-item-price" }, h("zonos-text", { type: "semiBoldLabel" },
|
|
1152
|
+
}, width: 40 })) : (h("img", { alt: item.name || `Restricted item ${index + 1}`, src: emptyItemImg, width: 40 }))), h("td", { class: "zonos--column zonos--cart-item-name" }, h("zonos-text", { type: "label" }, ((_b = item.matchedItem) === null || _b === void 0 ? void 0 : _b.name) || item.name), h("zonos-text", { type: "caption" }, item.restriction.reason)), h("td", { class: "zonos--column zonos--cart-item-price" }, h("zonos-text", { type: "semiBoldLabel" }, renderCheckoutCurrency({
|
|
1116
1153
|
amount: item.amount * item.quantity * rate,
|
|
1117
|
-
|
|
1154
|
+
isForeign: false,
|
|
1118
1155
|
})))));
|
|
1119
1156
|
}))))));
|
|
1120
1157
|
}
|
|
@@ -1137,7 +1174,13 @@ const ZonosCartSubtotal = class {
|
|
|
1137
1174
|
const showDutyTaxesInfo = cartStore.step === 'payment' || cartStore.step === 'shipping';
|
|
1138
1175
|
// Show 0 for subtotal and total when all items are restricted
|
|
1139
1176
|
const total = cartStoreHasOneEligibleItem() ? cartStore.total : 0;
|
|
1177
|
+
// Total is in target currency, devide by target rate to get base currency
|
|
1140
1178
|
const subtotal = cartStoreHasOneEligibleItem() ? cartStore.subtotal : 0;
|
|
1179
|
+
const shouldRenderPromoInput =
|
|
1180
|
+
// Store with no discount rules added in the dashboard, checkout would not display have promo code input
|
|
1181
|
+
!cartStore.shouldHideDiscountInput &&
|
|
1182
|
+
// Only show promo stuff if they are past customer info session in order to get landed cost with promo adjustment
|
|
1183
|
+
cartStore.step !== 'customer-info';
|
|
1141
1184
|
const appliedPromoCode = (_e = (_d = (_c = (_b = (_a = cartStore.landedCostData) === null || _a === void 0 ? void 0 : _a.find(Boolean)) === null || _b === void 0 ? void 0 : _b.landedCost.appliedAdjustments) === null || _c === void 0 ? void 0 : _c.find(x => { var _a; return ((_a = x.adjustment) === null || _a === void 0 ? void 0 : _a.source) === 'PROMO_CODE'; })) === null || _d === void 0 ? void 0 : _d.adjustment) === null || _e === void 0 ? void 0 : _e.name;
|
|
1142
1185
|
const applyPromoCode = async () => {
|
|
1143
1186
|
// Promo code apply button is clicked
|
|
@@ -1164,37 +1207,37 @@ const ZonosCartSubtotal = class {
|
|
|
1164
1207
|
const renderLandedCost = () => {
|
|
1165
1208
|
if (cartStore.landedCostMethod === 'DAP') {
|
|
1166
1209
|
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), cartStore.dutiesTaxesFeesEstimate !== null
|
|
1167
|
-
? `${translate('Estimated')} ${
|
|
1210
|
+
? `${translate('Estimated')} ${renderCheckoutCurrency({
|
|
1168
1211
|
amount: cartStore.dutiesTaxesFeesEstimate,
|
|
1169
|
-
|
|
1212
|
+
isForeign: true,
|
|
1170
1213
|
})}`
|
|
1171
1214
|
: '-'), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, translate('Due at delivery')))));
|
|
1172
1215
|
}
|
|
1173
1216
|
return (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Duties, taxes, and fees')), h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('Nothing due at the door'))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("div", { class: "zonos--cart-duty-tax-price" }, cartStore.dutiesTaxesFees !== null
|
|
1174
|
-
?
|
|
1217
|
+
? renderCheckoutCurrency({
|
|
1175
1218
|
amount: cartStore.dutiesTaxesFees,
|
|
1176
|
-
|
|
1219
|
+
isForeign: true,
|
|
1177
1220
|
})
|
|
1178
1221
|
: '-'))));
|
|
1179
1222
|
};
|
|
1180
|
-
return (h(Host, { class: "zonos--cart-subtotal zonos--elements" }, h("table", { class: "zonos--cart-table" }, h("tr", { class: "zonos--row zonos--cart-subtotal" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { type: "semiBoldLabel" }, translate('Cart subtotal'))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("zonos-text", { type: "semiBoldLabel" },
|
|
1223
|
+
return (h(Host, { class: "zonos--cart-subtotal zonos--elements" }, h("table", { class: "zonos--cart-table" }, h("tr", { class: "zonos--row zonos--cart-subtotal" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("zonos-text", { type: "semiBoldLabel" }, translate('Cart subtotal'))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("zonos-text", { type: "semiBoldLabel" }, renderCheckoutCurrency({
|
|
1181
1224
|
amount: subtotal,
|
|
1182
|
-
|
|
1225
|
+
isForeign: true,
|
|
1183
1226
|
})))), h("tr", { class: "zonos--row zonos--cart-shipping" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, renderShippingInfo()), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, cartStore.shipping
|
|
1184
|
-
?
|
|
1227
|
+
? renderCheckoutCurrency({
|
|
1185
1228
|
amount: cartStore.shipping,
|
|
1186
|
-
|
|
1229
|
+
isForeign: true,
|
|
1187
1230
|
})
|
|
1188
|
-
: '-')), showDutyTaxesInfo && (h("tr", { class: "zonos--row zonos--cart-duties" }, h("td", { class: "zonos--column" }), renderLandedCost())),
|
|
1231
|
+
: '-')), showDutyTaxesInfo && (h("tr", { class: "zonos--row zonos--cart-duties" }, h("td", { class: "zonos--column" }), renderLandedCost())), shouldRenderPromoInput && (h("tr", { class: "zonos--row zonos--cart-promo-code" }, h("td", { class: "zonos--column" }), !!appliedPromoCode ? (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-promo-code-col" }, this.loading ? (h("zonos-spinner", { size: 16 })) : (h("zonos-badge", { dismissHandler: () => removePromoCode() }, cartStore.promoCode))), h("td", { class: "zonos--column zonos--cart-promo-code-col" }))) : (h("td", { class: "zonos--column zonos--cart-promo-code-col", colSpan: 2 }, h("div", { class: "zonos--cart-promo-code-input-wrapper" }, h("zonos-input", { class: "zonos--cart-promo-code-input", inputLabel: translate('Add promotional code'), inputValue: cartStore.promoCode, isError: cartStore.promoCodeError, onInputChange: e => (cartStore.promoCode = e.detail.trim()), onKeyDown: e => {
|
|
1189
1232
|
if (e.key === 'Enter') {
|
|
1190
1233
|
void applyPromoCode();
|
|
1191
1234
|
}
|
|
1192
|
-
} }), h("zonos-button", { loading: this.loading, onClick: () => applyPromoCode(), variant: "primary" }, translate('Apply'))))))), !!cartStore.adjustmentTotal && (h("tr", { class: "zonos--row zonos--cart-discount" }, 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('Discounts')))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("zonos-text", { type: "semiBoldLabel" },
|
|
1235
|
+
} }), h("zonos-button", { loading: this.loading, onClick: () => applyPromoCode(), variant: "primary" }, translate('Apply'))))))), !!cartStore.adjustmentTotal && (h("tr", { class: "zonos--row zonos--cart-discount" }, 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('Discounts')))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("zonos-text", { type: "semiBoldLabel" }, renderCheckoutCurrency({
|
|
1193
1236
|
amount: cartStore.adjustmentTotal,
|
|
1194
|
-
|
|
1195
|
-
}))))), 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 zonos--cart-total-price" }, h("zonos-text", { type: "semiBoldLabel" },
|
|
1237
|
+
isForeign: true,
|
|
1238
|
+
}))))), 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 zonos--cart-total-price" }, h("zonos-text", { type: "semiBoldLabel" }, renderCheckoutCurrency({
|
|
1196
1239
|
amount: total,
|
|
1197
|
-
|
|
1240
|
+
isForeign: true,
|
|
1198
1241
|
})))))));
|
|
1199
1242
|
}
|
|
1200
1243
|
static get assetsDirs() { return ["assets"]; }
|
|
@@ -1465,18 +1508,18 @@ const ZonosCheckoutFinish = class {
|
|
|
1465
1508
|
'--border-radius': getBorderRadius({
|
|
1466
1509
|
overrideBorderStyle: this.borderRadius,
|
|
1467
1510
|
}),
|
|
1468
|
-
} }, this.isLoading && (h("div", { key: 'e05786eb66ae570afc1c88dc4205c629e0dbcd2f', class: "loading-wrapper" }, h("zonos-spinner", { key: '9fe20969025c8c327629f9e8f1dac89fb372470e' }))), !this.isLoading && (h("div", { key: '950ac9037ae2ecf7a865be3bb6177aed9ed7d45d', class: "zonos--finish-details" }, h("div", { key: '48e9f3764e1cfdee5b163ad9503f1e43bb2000cc', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: 'd0e1812004b9bf001a97128b7413fce6c97c3813', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), orderId && (h("div", { key: 'fc8ffd74fcbee39481c49d082a25eeab2ead9f92', class: "zonos--order-number" }, "Order #", orderId)), h("zonos-text", { key: 'b2fb81b4341f74fb78c2c48b037f8834ac70f296', textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { key: 'df12d3dc5b98e8dd0ead987b30acd5806d93b7ec', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText)), isTestMode && cartStore.step === 'finish' && (h("div", { key: 'b16aa575056c6c388e04eb162727d3caed12cd41', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: 'caf4423148cd072bf2c916d71d84fba6d4c0b5ea', backgroundColor: "gray-0", buttonColor: "gray-
|
|
1511
|
+
} }, this.isLoading && (h("div", { key: 'e05786eb66ae570afc1c88dc4205c629e0dbcd2f', class: "loading-wrapper" }, h("zonos-spinner", { key: '9fe20969025c8c327629f9e8f1dac89fb372470e' }))), !this.isLoading && (h("div", { key: '950ac9037ae2ecf7a865be3bb6177aed9ed7d45d', class: "zonos--finish-details" }, h("div", { key: '48e9f3764e1cfdee5b163ad9503f1e43bb2000cc', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: 'd0e1812004b9bf001a97128b7413fce6c97c3813', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), orderId && (h("div", { key: 'fc8ffd74fcbee39481c49d082a25eeab2ead9f92', class: "zonos--order-number" }, "Order #", orderId)), h("zonos-text", { key: 'b2fb81b4341f74fb78c2c48b037f8834ac70f296', textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { key: 'df12d3dc5b98e8dd0ead987b30acd5806d93b7ec', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText)), isTestMode && cartStore.step === 'finish' && (h("div", { key: 'b16aa575056c6c388e04eb162727d3caed12cd41', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: 'caf4423148cd072bf2c916d71d84fba6d4c0b5ea', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: '168f2c10cec8f4002b9c114b5d858314559f6efb', onClick: () => this.redirectToUrl(`/orders/all`), size: "lg", variant: "primary" }, "View order in Dashboard")))))));
|
|
1469
1512
|
}
|
|
1470
1513
|
static get assetsDirs() { return ["assets"]; }
|
|
1471
1514
|
};
|
|
1472
1515
|
ZonosCheckoutFinish.style = ZonosCheckoutFinishStyle0;
|
|
1473
1516
|
|
|
1474
|
-
const Globe = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-
|
|
1517
|
+
const Globe = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">
|
|
1475
1518
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>
|
|
1476
1519
|
</svg>
|
|
1477
1520
|
`;
|
|
1478
1521
|
|
|
1479
|
-
const ZonosIcon = `<svg width="105" height="29" viewBox="0 0 105 29" fill="none" color="var(--zonos-elements-gray-
|
|
1522
|
+
const ZonosIcon = `<svg width="105" height="29" viewBox="0 0 105 29" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="https://www.w3.org/2000/svg">
|
|
1480
1523
|
<path d="M38.634 18.7135C38.5431 18.7135 38.4691 18.639 38.4691 18.5476V18.2661C38.4691 18.2318 38.4798 18.198 38.4995 18.1701L43.7197 10.7556H38.9257C38.8348 10.7556 38.7609 10.6811 38.7609 10.5894V9.97732C38.7609 9.88564 38.8348 9.81112 38.9257 9.81112H45.0832C45.1741 9.81112 45.248 9.88564 45.248 9.97732V10.2098C45.248 10.2447 45.2371 10.2785 45.217 10.3067L39.9266 17.7325H45.0832C45.1741 17.7325 45.248 17.807 45.248 17.8987V18.5476C45.248 18.639 45.1741 18.7135 45.0832 18.7135H38.634ZM73.9183 18.7135C73.8691 18.7135 73.8221 18.6911 73.7907 18.6525L68.3512 11.9368V18.5476C68.3512 18.639 68.2775 18.7135 68.1867 18.7135H67.5301C67.4393 18.7135 67.3653 18.639 67.3653 18.5476V9.97732C67.3653 9.88564 67.4393 9.81112 67.5301 9.81112H67.8103C67.8598 9.81112 67.9065 9.83381 67.9378 9.87276L73.3658 16.5991V9.97732C73.3658 9.88564 73.4394 9.81112 73.5303 9.81112H74.174C74.2649 9.81112 74.3388 9.88564 74.3388 9.97732V18.5476C74.3388 18.639 74.2649 18.7135 74.174 18.7135H73.9183ZM100.087 18.7141C98.8032 18.7141 97.1746 18.2161 96.4548 16.8193C96.4348 16.781 96.4319 16.7365 96.4454 16.6957C96.4592 16.6553 96.489 16.6215 96.5281 16.6025L97.111 16.3173C97.1348 16.3057 97.1599 16.3002 97.1847 16.3002C97.2448 16.3002 97.3028 16.3327 97.3319 16.3888C97.8139 17.3207 99.0828 17.808 100.087 17.808C100.852 17.808 102.631 17.6525 102.631 16.2122C102.643 15.088 101.285 14.8338 99.9724 14.5875C98.4341 14.2931 96.6917 13.9592 96.6917 12.2895C96.6792 11.682 96.8804 11.165 97.2896 10.7562C97.8757 10.1717 98.9214 9.82247 100.087 9.82247C101.425 9.82247 102.489 10.0755 103.334 11.3085C103.359 11.3453 103.368 11.3907 103.358 11.4339C103.348 11.4772 103.32 11.5146 103.281 11.537L102.748 11.8457C102.721 11.8611 102.693 11.8681 102.664 11.8681C102.609 11.8681 102.555 11.8411 102.524 11.7924C101.947 10.8862 101.011 10.7507 100.085 10.7394C99.8405 10.7394 97.6773 10.782 97.6773 12.2652C97.6773 13.1607 98.6534 13.4051 100.143 13.6755L100.233 13.6927C101.819 13.9908 103.617 14.3287 103.617 16.2232C103.602 18.5344 100.911 18.7141 100.087 18.7141ZM56.3158 10.7271C55.3007 10.7271 54.4408 11.0451 53.8295 11.647C53.183 12.2833 52.8304 13.2122 52.837 14.2625C52.8483 15.9702 53.9413 17.808 56.3158 17.808C58.7149 17.808 59.8074 15.9705 59.8074 14.2637C59.8074 12.5032 58.7278 10.7271 56.3158 10.7271ZM56.3158 18.7264C53.2572 18.7264 51.8637 16.4066 51.8637 14.2511C51.8637 12.0411 53.2406 9.81112 56.3158 9.81112C57.6053 9.81112 58.7055 10.2233 59.4978 11.0022C60.3241 11.8148 60.7751 12.9776 60.7685 14.2769C60.7563 16.4198 59.358 18.7264 56.3158 18.7264ZM85.3883 10.7271C84.3733 10.7271 83.5138 11.0448 82.9024 11.6461C82.2556 12.2824 81.9027 13.2119 81.9087 14.2628C81.9199 15.9702 83.0136 17.808 85.3883 17.808C87.7863 17.808 88.8787 15.9705 88.8787 14.2637C88.8787 12.5032 87.7994 10.7271 85.3883 10.7271ZM85.3883 18.7264C82.3292 18.7264 80.9356 16.4066 80.9356 14.2511C80.9356 12.0411 82.3123 9.81112 85.3883 9.81112C86.6779 9.81112 87.7778 10.2233 88.57 11.0022C89.3961 11.8148 89.847 12.9776 89.8401 14.2769C89.8289 16.4198 88.4312 18.7264 85.3883 18.7264Z" fill="currentColor"/>
|
|
1481
1524
|
<path d="M56.3148 10.8733C55.3402 10.8733 54.517 11.1763 53.9341 11.75C53.3158 12.3587 52.9789 13.2511 52.9852 14.2621C52.9956 15.9002 54.0419 17.6629 56.3148 17.6629C58.6118 17.6629 59.6576 15.9012 59.6576 14.2639C59.6576 12.5761 58.6241 10.8733 56.3148 10.8733ZM56.3148 17.9545C53.8385 17.9545 52.6985 16.0413 52.6872 14.2639C52.6803 13.1747 53.0482 12.2091 53.7229 11.5446C54.3628 10.9147 55.259 10.582 56.3148 10.582C58.8296 10.582 59.9553 12.4314 59.9553 14.2639C59.9553 16.0413 58.8162 17.9545 56.3148 17.9545ZM85.3874 10.8733C84.4128 10.8733 83.5899 11.1763 83.007 11.7494C82.3884 12.3581 82.0509 13.2508 82.0569 14.2624C82.0669 15.9002 83.1139 17.6629 85.3874 17.6629C87.6832 17.6629 88.7289 15.9012 88.7289 14.2639C88.7289 12.5761 87.6957 10.8733 85.3874 10.8733ZM85.3874 17.9545C82.9111 17.9545 81.7705 16.0413 81.7589 14.2643C81.7529 13.1741 82.1211 12.2082 82.7961 11.5443C83.4354 10.9147 84.332 10.582 85.3874 10.582C87.9013 10.582 89.0269 12.4314 89.0269 14.2639C89.0269 16.0413 87.8878 17.9545 85.3874 17.9545ZM38.9248 9.95733C38.9176 9.95733 38.9091 9.96592 38.9091 9.97788V10.5903C38.9091 10.6019 38.9176 10.6105 38.9248 10.6105H44.0021L38.6211 18.2532L38.617 18.5482C38.617 18.5601 38.6255 18.5684 38.633 18.5684H45.0822C45.0898 18.5684 45.0979 18.5601 45.0979 18.5482V17.899C45.0979 17.8873 45.0898 17.8787 45.0822 17.8787H39.6405L45.0938 10.2238L45.0979 9.97788C45.0979 9.96592 45.0898 9.95733 45.0822 9.95733H38.9248ZM45.0822 18.8597H38.633C38.46 18.8597 38.3193 18.7202 38.3193 18.5482V18.267C38.3193 18.2035 38.3388 18.1419 38.3751 18.0891L43.4355 10.9018H38.9248C38.7518 10.9018 38.6114 10.762 38.6114 10.5903V9.97788C38.6114 9.80585 38.7518 9.66602 38.9248 9.66602H45.0822C45.2552 9.66602 45.3959 9.80585 45.3959 9.97788V10.2106C45.3959 10.2756 45.3759 10.3382 45.338 10.3906L40.2109 17.5874H45.0822C45.2552 17.5874 45.3959 17.7273 45.3959 17.899V18.5482C45.3959 18.7202 45.2552 18.8597 45.0822 18.8597ZM68.2014 11.5191L73.9173 18.5684H74.173C74.1805 18.5684 74.189 18.5601 74.189 18.5482V9.97788C74.189 9.96561 74.1809 9.95733 74.173 9.95733H73.5297C73.5218 9.95733 73.5137 9.96592 73.5137 9.97788V17.0192L67.8203 9.96316L67.5289 9.95733C67.5217 9.95733 67.5132 9.96592 67.5132 9.97788V18.5482C67.5132 18.5601 67.5217 18.5684 67.5289 18.5684H68.1854C68.1932 18.5684 68.2014 18.5601 68.2014 18.5482V11.5191ZM74.173 18.8597H73.9173C73.822 18.8597 73.7334 18.8174 73.6735 18.7438L68.4994 12.3557V18.5482C68.4994 18.7202 68.3584 18.8597 68.1854 18.8597H67.5289C67.3559 18.8597 67.2155 18.7202 67.2155 18.5482V9.97788C67.2155 9.80585 67.3559 9.66602 67.5289 9.66602H67.809C67.9046 9.66602 67.9939 9.70833 68.0538 9.78285L73.2157 16.1799V9.97788C73.2157 9.80585 73.3564 9.66602 73.5297 9.66602H74.173C74.346 9.66602 74.4867 9.80585 74.4867 9.97788V18.5482C74.4867 18.7202 74.346 18.8597 74.173 18.8597ZM97.1981 16.455L96.5936 16.7334C97.2762 18.0922 98.8465 18.5687 100.086 18.5687C100.876 18.5687 103.453 18.3997 103.467 16.2228C103.467 14.4498 101.808 14.1379 100.204 13.8365L100.113 13.819C98.8427 13.5881 97.5272 13.3495 97.5272 12.2658C97.5272 10.6433 99.822 10.5942 100.084 10.5939C101.054 10.6062 102.035 10.7506 102.649 11.716L103.204 11.4121C102.401 10.2106 101.376 9.96868 100.086 9.96868C98.9596 9.96868 97.9537 10.3014 97.3949 10.8589C97.0148 11.2388 96.828 11.719 96.8396 12.2873C96.8396 13.8398 98.4463 14.1474 99.9997 14.4452C101.308 14.6902 102.792 14.9683 102.779 16.2142C102.779 17.7846 100.896 17.9545 100.086 17.9545C99.0367 17.9545 97.7074 17.4393 97.1981 16.455ZM100.086 18.8603C98.7578 18.8603 97.0715 18.3415 96.321 16.8852C96.2834 16.8128 96.2768 16.7294 96.3031 16.6512C96.3288 16.5743 96.3862 16.5089 96.4605 16.4728L97.0436 16.1873C97.1981 16.1131 97.389 16.1781 97.4639 16.324C97.9189 17.2026 99.1276 17.6629 100.086 17.6629C100.806 17.6629 102.481 17.5215 102.481 16.2127C102.492 15.2087 101.254 14.9769 99.9436 14.7313C98.4275 14.4409 96.5416 14.0796 96.5416 12.29C96.5285 11.6439 96.7444 11.0929 97.1825 10.655C97.7957 10.0426 98.8813 9.67736 100.086 9.67736C101.472 9.67736 102.575 9.94108 103.457 11.2278C103.504 11.2977 103.521 11.3845 103.503 11.4664C103.483 11.5489 103.43 11.62 103.356 11.6629L102.823 11.9717C102.682 12.0536 102.485 12.007 102.397 11.8702C101.858 11.0233 100.966 10.8963 100.082 10.8853C99.853 10.8856 97.8249 10.9264 97.8249 12.2658C97.8249 12.9858 98.5481 13.2388 100.169 13.5329L100.26 13.5501C101.822 13.8438 103.765 14.2091 103.765 16.2238C103.749 18.6702 100.945 18.8603 100.086 18.8603ZM56.3148 9.95733C53.3425 9.95733 52.0119 12.114 52.0119 14.2514C52.0119 16.3369 53.3584 18.5813 56.3148 18.5813C59.2552 18.5813 60.6068 16.3501 60.6184 14.2768C60.6249 13.0165 60.1894 11.8905 59.3912 11.1057C58.6275 10.3544 57.5639 9.95733 56.3148 9.95733ZM56.3148 18.8726C53.1541 18.8726 51.7142 16.477 51.7142 14.2514C51.7142 11.969 53.1366 9.66602 56.3148 9.66602C57.6448 9.66602 58.782 10.0926 59.6021 10.9003C60.4567 11.7402 60.9236 12.9398 60.9164 14.278C60.9038 16.4912 59.4586 18.8726 56.3148 18.8726ZM85.3874 9.95733C82.4141 9.95733 81.0835 12.114 81.0835 14.2514C81.0835 16.3369 82.4304 18.5813 85.3874 18.5813C88.3284 18.5813 89.6797 16.3501 89.69 14.2768C89.6969 13.0165 89.2613 11.8905 88.4638 11.1057C87.7001 10.3544 86.6362 9.95733 85.3874 9.95733ZM85.3874 18.8726C82.2258 18.8726 80.7858 16.477 80.7858 14.2514C80.7858 11.969 82.2085 9.66602 85.3874 9.66602C86.7174 9.66602 87.8543 10.0926 88.6747 10.9003C89.5289 11.7402 89.9956 12.9398 89.988 14.278C89.9764 16.4912 88.5321 18.8726 85.3874 18.8726Z" fill="currentColor"/>
|
|
1482
1525
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8579 3.27103C8.00856 3.27103 2.45604 8.70444 2.45604 15.4069C2.45604 16.5606 2.62039 17.6759 2.92715 18.732C2.94279 18.7858 2.99993 18.8158 3.05327 18.7985L4.76742 18.2444C4.89605 18.2028 5.03443 18.271 5.07981 18.3984L5.18963 18.7065C6.58371 22.6184 10.3868 25.4238 14.8579 25.4238C16.6778 25.4238 18.3852 24.9596 19.8648 24.146C22.9871 22.4291 25.0944 19.1585 25.0944 15.4069C25.0944 12.66 23.9652 10.1718 22.1346 8.36161C22.0943 8.32178 22.029 8.32401 21.9911 8.36608L20.8033 9.68403C20.7122 9.78506 20.5571 9.79476 20.4541 9.70586L20.1964 9.48329C18.7733 8.25413 16.9053 7.50895 14.8579 7.50895C10.4004 7.50895 6.78686 11.045 6.78686 15.4069C6.78686 18.1793 8.24644 20.6188 10.4568 22.0285C10.5051 22.0593 10.5692 22.0425 10.5968 21.9923L11.4438 20.4518C11.5093 20.3326 11.6581 20.2877 11.7786 20.3506L12.081 20.5086C12.9082 20.9407 13.8529 21.1859 14.8579 21.1859C18.1196 21.1859 20.7636 18.5985 20.7636 15.4069C20.7636 12.4472 18.4898 10.0071 15.5584 9.66814C15.4997 9.66135 15.4485 9.70759 15.4485 9.76664V10.5364C15.4485 10.5871 15.4867 10.6298 15.537 10.6366C17.9337 10.9602 19.7793 12.9727 19.7793 15.4069C19.7793 18.0666 17.5759 20.2227 14.8579 20.2227C12.1399 20.2227 9.93655 18.0666 9.93655 15.4069C9.93655 12.9727 11.7822 10.9602 14.1789 10.6366C14.2291 10.6298 14.2674 10.5871 14.2674 10.5364V8.72212C14.2674 8.58405 14.3793 8.47212 14.5174 8.47212H14.8579C18.7719 8.47212 21.9447 11.5769 21.9447 15.4069C21.9447 19.2369 18.7719 22.3417 14.8579 22.3417C13.8955 22.3417 12.9768 22.1536 12.139 21.8128C12.0915 21.7935 12.037 21.8124 12.0123 21.8573L11.1357 23.4517C11.0701 23.571 10.9212 23.6159 10.8006 23.5528L10.4981 23.3943C7.58772 21.8702 5.60573 18.8655 5.60573 15.4069C5.60573 10.4067 9.74808 6.35316 14.8579 6.35316C16.9583 6.35316 18.8962 7.03862 20.4492 8.19281C20.4909 8.2238 20.5494 8.21831 20.5842 8.17972L21.8036 6.82678C21.8946 6.72575 22.0497 6.71605 22.1527 6.80496L22.4104 7.02752C24.7797 9.07392 26.2756 12.0698 26.2756 15.4069C26.2756 19.3595 24.1778 22.8321 21.0147 24.8176C20.97 24.8457 20.9542 24.9034 20.9789 24.95L21.3405 25.6313C21.3675 25.6821 21.4317 25.6998 21.4806 25.6695C24.9548 23.5181 27.2598 19.7255 27.2598 15.4069C27.2598 8.70444 21.7073 3.27103 14.8579 3.27103ZM19.817 25.4734C19.8656 25.4505 19.9237 25.4695 19.9489 25.517L20.7902 27.1021C20.8554 27.2248 21.0082 27.2709 21.1303 27.2046L21.4393 27.0368C25.6136 24.7702 28.441 20.412 28.441 15.4069C28.441 8.06611 22.3596 2.11523 14.8579 2.11523C7.35623 2.11523 1.2749 8.06611 1.2749 15.4069C1.2749 16.927 1.5359 18.3886 2.01692 19.7505L2.12616 20.0598C2.17127 20.1875 2.3099 20.2561 2.43879 20.2144L4.19214 19.6476C4.24168 19.6316 4.2952 19.6564 4.31562 19.7043C6.03606 23.7411 10.1076 26.5796 14.8579 26.5796C16.6341 26.5796 18.3167 26.1824 19.817 25.4734ZM14.8579 11.7469C12.7923 11.7469 11.1177 13.3855 11.1177 15.4069C11.1177 17.4283 12.7923 19.0669 14.8579 19.0669C16.9236 19.0669 18.5982 17.4283 18.5982 15.4069C18.5982 13.3855 16.9236 11.7469 14.8579 11.7469Z" fill="currentColor"/>
|
|
@@ -1512,7 +1555,7 @@ const ZonosCheckoutFooter = class {
|
|
|
1512
1555
|
var _a;
|
|
1513
1556
|
const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
|
|
1514
1557
|
// reverse color when on desktop. With the coversheet backdrop, the color should be white
|
|
1515
|
-
const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-
|
|
1558
|
+
const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-1000';
|
|
1516
1559
|
return (h(Host, { key: '23b8596ab642089e7109ef9f33e5c8f2f864fc04', class: classes(['zonos--elements', this.isMobile && 'mobile']) }, h("div", { key: '38a8d22389df15c429101560758e4aedabf67bfd', class: "zonos--checkout-footer" }, h("div", { key: '9767bbecf5daad5163372382504c4846a6f547c0', class: "zonos--checkout-locale-wrapper" }, h("zonos-button", { key: '1d66d656e6f305fbef4b2a5a360fdb7ac458f989', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, languageLabel), h("div", { key: 'daa1cdff45356cb0b6f78b2ae37f009ef313d174', class: classes([
|
|
1517
1560
|
'zonos--checkout-footer-dialog',
|
|
1518
1561
|
this.showLanguageDialog && 'zonos--checkout-footer-dialog-open',
|
|
@@ -1583,9 +1626,9 @@ const ZonosCheckoutPayment = class {
|
|
|
1583
1626
|
}, size: "lg",
|
|
1584
1627
|
// use primary type when on mobile mode
|
|
1585
1628
|
variant: this.submitBtnType }, translate('Pay [orderTotal]', {
|
|
1586
|
-
orderTotal:
|
|
1629
|
+
orderTotal: renderCheckoutCurrency({
|
|
1587
1630
|
amount: cartStore.total,
|
|
1588
|
-
|
|
1631
|
+
isForeign: true,
|
|
1589
1632
|
}),
|
|
1590
1633
|
}))), h("zonos-paypal-payment", { onPaypalSessionDone: ({ detail: { orderId } }) => {
|
|
1591
1634
|
this.paypalSessionDone.emit(orderId);
|
|
@@ -1694,7 +1737,7 @@ const ZonosCheckoutProgressTabs = class {
|
|
|
1694
1737
|
'zonos--tab-item',
|
|
1695
1738
|
tab.value === selectedStep && 'selected',
|
|
1696
1739
|
tab.isDone && 'done',
|
|
1697
|
-
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cartStore.step = tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-
|
|
1740
|
+
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cartStore.step = tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1000' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, translate(tab.label))));
|
|
1698
1741
|
})), h("div", { key: '3d2a5c5289a694bf6ec8e93ba15ee4f79123d149', class: "zonos--tab-progress" }, h("div", { key: '7d6ea3e0c81cdb354ccf31748bf88d1937037c52', class: "zonos--progress-bar-fill" }))));
|
|
1699
1742
|
}
|
|
1700
1743
|
static get assetsDirs() { return ["assets"]; }
|
|
@@ -1808,6 +1851,40 @@ const ZonosConfirmDialog = class {
|
|
|
1808
1851
|
};
|
|
1809
1852
|
ZonosConfirmDialog.style = ZonosConfirmDialogStyle0;
|
|
1810
1853
|
|
|
1854
|
+
const ZonosCurrencyToggle = class {
|
|
1855
|
+
constructor(hostRef) {
|
|
1856
|
+
registerInstance(this, hostRef);
|
|
1857
|
+
this.errorImages = [];
|
|
1858
|
+
}
|
|
1859
|
+
async handleToggleChanged(changedValue) {
|
|
1860
|
+
var _a;
|
|
1861
|
+
const targetCurrency = (_a = cartStore.exchangeRate) === null || _a === void 0 ? void 0 : _a.targetCurrencyCode;
|
|
1862
|
+
cartStore.displayBaseCurrency = targetCurrency !== changedValue;
|
|
1863
|
+
}
|
|
1864
|
+
render() {
|
|
1865
|
+
const { exchangeRate } = cartStore;
|
|
1866
|
+
const options = exchangeRate &&
|
|
1867
|
+
exchangeRate.sourceCurrencyCode !== exchangeRate.targetCurrencyCode
|
|
1868
|
+
? ([
|
|
1869
|
+
{
|
|
1870
|
+
label: exchangeRate.sourceCurrencyCode,
|
|
1871
|
+
value: exchangeRate.sourceCurrencyCode,
|
|
1872
|
+
},
|
|
1873
|
+
{
|
|
1874
|
+
label: exchangeRate.targetCurrencyCode,
|
|
1875
|
+
value: exchangeRate.targetCurrencyCode,
|
|
1876
|
+
},
|
|
1877
|
+
])
|
|
1878
|
+
: [];
|
|
1879
|
+
// If there is only one currency, don't show the toggle
|
|
1880
|
+
if (!options.length) {
|
|
1881
|
+
return null;
|
|
1882
|
+
}
|
|
1883
|
+
return (h(Host, { class: "zonos--currency-toggle zonos--elements" }, h("zonos-toggle", { onToggleChanged: e => this.handleToggleChanged(e.detail), options: options, value: cartStore.displayBaseCurrency ? options[0].value : options[1].value })));
|
|
1884
|
+
}
|
|
1885
|
+
static get assetsDirs() { return ["assets"]; }
|
|
1886
|
+
};
|
|
1887
|
+
|
|
1811
1888
|
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:8px;margin-top:12px;background:var(--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
|
|
1812
1889
|
const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
|
|
1813
1890
|
|
|
@@ -2057,7 +2134,7 @@ const ZonosReview = class {
|
|
|
2057
2134
|
const totalTextType = this.isMobile
|
|
2058
2135
|
? 'boldSubheader'
|
|
2059
2136
|
: 'secondaryPageHeader';
|
|
2060
|
-
const titleTextColor = this.isMobile ? 'gray-
|
|
2137
|
+
const titleTextColor = this.isMobile ? 'gray-1000' : 'gray-800';
|
|
2061
2138
|
const renderCollapseIcon = () => {
|
|
2062
2139
|
// only display the collapse icon if the component is being rendered with mobile styles
|
|
2063
2140
|
if (!this.isMobile) {
|
|
@@ -2073,9 +2150,9 @@ const ZonosReview = class {
|
|
|
2073
2150
|
this.isMobile && 'mobile',
|
|
2074
2151
|
]) }, h("div", { class: "zonos--title" }, h("zonos-text", { textColor: titleTextColor, type: titleTextType }, translate('Pay [organizationName]', {
|
|
2075
2152
|
organizationName: zonosStore.organizationName,
|
|
2076
|
-
})), renderCollapseIcon()), h("div", { class: "zonos--total-pay" }, h("zonos-text", { type: totalTextType },
|
|
2153
|
+
})), renderCollapseIcon()), h("div", { class: "zonos--total-pay" }, h("zonos-text", { type: totalTextType }, renderCheckoutCurrency({
|
|
2077
2154
|
amount: total,
|
|
2078
|
-
|
|
2155
|
+
isForeign: true,
|
|
2079
2156
|
})))));
|
|
2080
2157
|
}
|
|
2081
2158
|
static get assetsDirs() { return ["assets"]; }
|
|
@@ -2188,9 +2265,9 @@ const ZonosShipping = class {
|
|
|
2188
2265
|
label: `${item.displayName}${this.getLandedCostMethodLabelSuffix(landedCost.landedCost.method)}`,
|
|
2189
2266
|
landedCostId: landedCost.landedCostId,
|
|
2190
2267
|
method: landedCost.landedCost.method,
|
|
2191
|
-
price:
|
|
2268
|
+
price: renderCheckoutCurrency({
|
|
2192
2269
|
amount: shippingAmount,
|
|
2193
|
-
|
|
2270
|
+
isForeign: true,
|
|
2194
2271
|
}),
|
|
2195
2272
|
shipmentRatingId: item.id,
|
|
2196
2273
|
sublabel,
|
|
@@ -2220,6 +2297,13 @@ const ZonosShipping = class {
|
|
|
2220
2297
|
this.collapsedDAPOptions = false;
|
|
2221
2298
|
}
|
|
2222
2299
|
};
|
|
2300
|
+
this.isCurrencyToggled = () => {
|
|
2301
|
+
if (this.displayBaseCurrency !== cartStore.displayBaseCurrency) {
|
|
2302
|
+
this.displayBaseCurrency = cartStore.displayBaseCurrency;
|
|
2303
|
+
return true;
|
|
2304
|
+
}
|
|
2305
|
+
return false;
|
|
2306
|
+
};
|
|
2223
2307
|
this.preselectFirstShippingMethod = () => {
|
|
2224
2308
|
this.initServiceLevels();
|
|
2225
2309
|
const selectedServiceLevel = this.serviceLevelsAll.find(item => { var _a; return item.shipmentRatingId === ((_a = cartStore.selectedShippingOption) === null || _a === void 0 ? void 0 : _a.id); }) || null;
|
|
@@ -2247,6 +2331,7 @@ const ZonosShipping = class {
|
|
|
2247
2331
|
this.serviceLevelsDAP = [];
|
|
2248
2332
|
this.serviceLevelsOther = [];
|
|
2249
2333
|
this.serviceLevelsAll = [];
|
|
2334
|
+
this.displayBaseCurrency = false;
|
|
2250
2335
|
}
|
|
2251
2336
|
componentWillLoad() {
|
|
2252
2337
|
this.preselectFirstShippingMethod();
|
|
@@ -2256,6 +2341,10 @@ const ZonosShipping = class {
|
|
|
2256
2341
|
// re-init service levels if the shipping data is outdated (promo code applied)
|
|
2257
2342
|
this.preselectFirstShippingMethod();
|
|
2258
2343
|
}
|
|
2344
|
+
// re-init service levels if the currency is toggled
|
|
2345
|
+
else if (this.isCurrencyToggled()) {
|
|
2346
|
+
this.initServiceLevels();
|
|
2347
|
+
}
|
|
2259
2348
|
const defaultShownServiceLevels = [
|
|
2260
2349
|
...this.serviceLevelsDDP,
|
|
2261
2350
|
...this.serviceLevelsOther,
|
|
@@ -2264,17 +2353,17 @@ const ZonosShipping = class {
|
|
|
2264
2353
|
if (this.showErrorBanner) {
|
|
2265
2354
|
this.showErrorBanner = !this.handleValidate();
|
|
2266
2355
|
}
|
|
2267
|
-
return (h(Host, { key: '
|
|
2356
|
+
return (h(Host, { key: '186cd73af5a86fdeafd0213f8923907d43167a66', class: "zonos--shipping zonos--elements" }, h("div", { key: '88681a6f08bdde1788a546cb1311ace4f065d408', class: "zonos--group" }, h("zonos-text", { key: '75deb5b42546d7b8d615d5613f687f9b0778377d', class: "zonos--title", type: "semiBoldSubheader" }, translate('Delivery options')), this.showErrorBanner && !!this.serviceLevelsAll.length && (h("zonos-banner", { key: '07669e8782f210132e8d170729a430035c7d6d7c', class: "zonos--error-banner", intent: "error" }, translate('No shipping method selected'))), h("zonos-text", { key: '869c3df8762f6c704bfac40c0b9a7a16e845045e', class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !this.serviceLevelsAll.length ? (h("zonos-banner", { bannerTitle: translate('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'), class: "zonos--shipping-method-error", intent: "error" })) : (h("div", { class: "zonos--shipping-options-wrapper" }, h("zonos-shipping-rich-radio", { items: defaultShownServiceLevels, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }), !!defaultShownServiceLevels.length &&
|
|
2268
2357
|
!!this.serviceLevelsDAP.length && (h("button", { class: classes([
|
|
2269
2358
|
'zonos--shipping-options-collapse-trigger',
|
|
2270
2359
|
this.collapsedDAPOptions && 'collapsed',
|
|
2271
2360
|
]), onClick: () => {
|
|
2272
2361
|
this.collapsedDAPOptions = !this.collapsedDAPOptions;
|
|
2273
|
-
} }, h("div", { class: "zonos--title-wrapper" }, h("zonos-text", { type: "label" }, `${translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), h("zonos-icon", { content: ChevronUpIcon })))), h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, h("div", { class: "zonos--dap-wrapper" }, h("zonos-banner", { bannerTitle: translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, translate('You may incur additional fees from the shipping carrier by not prepaying.')), h("zonos-shipping-rich-radio", { items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }))))), h("div", { key: '
|
|
2362
|
+
} }, h("div", { class: "zonos--title-wrapper" }, h("zonos-text", { type: "label" }, `${translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), h("zonos-icon", { content: ChevronUpIcon })))), h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, h("div", { class: "zonos--dap-wrapper" }, h("zonos-banner", { bannerTitle: translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, translate('You may incur additional fees from the shipping carrier by not prepaying.')), h("zonos-shipping-rich-radio", { items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }))))), h("div", { key: '571b9856c2dc767b082adb154c3f75f49366199d', class: "zonos--group-btn" }, h("zonos-button", { key: '4153a317ffa612867cf55763f586a58abda0473b', backgroundColor: this.submitBtnColor, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
2274
2363
|
// use primary type when on mobile mode
|
|
2275
2364
|
variant: this.submitBtnType }, translate('Go to payment'))))));
|
|
2276
2365
|
}
|
|
2277
2366
|
};
|
|
2278
2367
|
ZonosShipping.style = ZonosShippingStyle0;
|
|
2279
2368
|
|
|
2280
|
-
export { ZonosCartItems as zonos_cart_items, ZonosCartRestrictedItems as zonos_cart_restricted_items, ZonosCartSubtotal as zonos_cart_subtotal, ZonosCheckoutFinish as zonos_checkout_finish, ZonosCheckoutFooter as zonos_checkout_footer, ZonosCheckoutPayment as zonos_checkout_payment, ZonosCheckoutProgressTabs as zonos_checkout_progress_tabs, ZonosConfirmDialog as zonos_confirm_dialog, ZonosCustomerInfo as zonos_customer_info, ZonosRestState as zonos_rest_state, ZonosReview as zonos_review, ZonosShipping as zonos_shipping };
|
|
2369
|
+
export { ZonosCartItems as zonos_cart_items, ZonosCartRestrictedItems as zonos_cart_restricted_items, ZonosCartSubtotal as zonos_cart_subtotal, ZonosCheckoutFinish as zonos_checkout_finish, ZonosCheckoutFooter as zonos_checkout_footer, ZonosCheckoutPayment as zonos_checkout_payment, ZonosCheckoutProgressTabs as zonos_checkout_progress_tabs, ZonosConfirmDialog as zonos_confirm_dialog, ZonosCurrencyToggle as zonos_currency_toggle, ZonosCustomerInfo as zonos_customer_info, ZonosRestState as zonos_rest_state, ZonosReview as zonos_review, ZonosShipping as zonos_shipping };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-86b8247e.js';
|
|
2
|
-
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, n as cartStoreUpdateToErrorState, t as translate, o as getZCountryUrlParam, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreHandleInventoryCheck, v as stripeStoreConfirmPayment, w as stripeStoreReset, x as localizationStoreOnUpdate } from './cart-
|
|
3
|
-
import { s as submitGtag, p as paypalInitScript } from './paypal-
|
|
2
|
+
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, n as cartStoreUpdateToErrorState, t as translate, o as getZCountryUrlParam, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreHandleInventoryCheck, v as stripeStoreConfirmPayment, w as stripeStoreReset, x as localizationStoreOnUpdate } from './cart-9a4c155b.js';
|
|
3
|
+
import { s as submitGtag, p as paypalInitScript } from './paypal-63e83a4a.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-7798ac16.js';
|
|
5
|
-
import {
|
|
5
|
+
import { h as handleFetch, l as log, a as logError, s as sendErrorLog, b as allLogs } from './handleFetch-ce924688.js';
|
|
6
|
+
import { t as trackConversionEvent, c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-65611cd0.js';
|
|
6
7
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
7
|
-
import { l as log, a as logError, s as sendErrorLog, b as allLogs } from './handleFetch-ce924688.js';
|
|
8
8
|
import { c as classes } from './classes-0d95c529.js';
|
|
9
9
|
import { g as getBorderRadius } from './getBorderRadius-e55a9df1.js';
|
|
10
10
|
import { i as isDarkColor } from './isDarkColor-4261bc3c.js';
|
|
@@ -36,6 +36,17 @@ const buildCartItemsByTempCart = (tempCartData) => {
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Check if store discount is enabled
|
|
41
|
+
*/
|
|
42
|
+
const isStoreDiscountEnabled = async () => {
|
|
43
|
+
const { errors, json } = await handleFetch('/api/zonos-elements/get-store-discount-enabled-status');
|
|
44
|
+
if (errors.length || !(json === null || json === void 0 ? void 0 : json.enabled)) {
|
|
45
|
+
return { enabled: false };
|
|
46
|
+
}
|
|
47
|
+
return { enabled: true };
|
|
48
|
+
};
|
|
49
|
+
|
|
39
50
|
const isDisabledCountry = (showLog = true) => {
|
|
40
51
|
if (!localizationStore.localizationLoaded) {
|
|
41
52
|
return true;
|
|
@@ -174,7 +185,7 @@ const MessageIcon = `<svg width="18" height="18" viewBox="0 0 18 18" fill="none"
|
|
|
174
185
|
</svg>
|
|
175
186
|
`;
|
|
176
187
|
|
|
177
|
-
const zonosCheckoutCss = ".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--
|
|
188
|
+
const zonosCheckoutCss = ".sc-zonos-checkout-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout img.sc-zonos-checkout{width:150px;min-width:150px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}";
|
|
178
189
|
const ZonosCheckoutStyle0 = zonosCheckoutCss;
|
|
179
190
|
|
|
180
191
|
// 90 minutes
|
|
@@ -370,6 +381,9 @@ const ZonosCheckout = class {
|
|
|
370
381
|
isPreview: this.preview,
|
|
371
382
|
sessionTimeout: CHECKOUT_SESSION_TIMEOUT,
|
|
372
383
|
});
|
|
384
|
+
const { enabled } = await isStoreDiscountEnabled();
|
|
385
|
+
// Hide discount input if there's no active discount configured for the store
|
|
386
|
+
cartStore.shouldHideDiscountInput = !enabled;
|
|
373
387
|
submitGtag('zonos-checkout-start');
|
|
374
388
|
void trackConversionEvent('checkout_open');
|
|
375
389
|
}
|
|
@@ -755,7 +769,7 @@ const ZonosCheckout = class {
|
|
|
755
769
|
'--primary-color': !this.isMobile ? colorPrimary : '',
|
|
756
770
|
} }, !this.isMobile && renderTopHeader(), cartStore.step === 'customer-info' && (h("zonos-customer-info", { continueLoading: this.submitLoading, defaultAddress: this.defaultAddress, isMobile: this.isMobile, onContinueClicked: () => this.handleCustomerInfoContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'shipping' && (h("zonos-shipping", { continueLoading: this.submitLoading, onContinueClicked: () => this.handleShippingContinue(), submitBtnColor: submitButtonColor })), cartStore.step === 'payment' && (h("zonos-checkout-payment", { continueLoading: this.submitLoading, onContinueClicked: async () => {
|
|
757
771
|
await this.handleStripePaymentContinue();
|
|
758
|
-
}, submitBtnColor: submitButtonColor }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), !this.isLegacyCheckout && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() })), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
772
|
+
}, submitBtnColor: submitButtonColor }))), h("div", { class: "zonos--right", "data-theme": rightSideTheme }, this.isMobile && renderTopHeader(), h("div", { class: "zonos--right-actions" }, window.Zonos.showBaseForeign && (h("zonos-currency-toggle", null)), !this.isLegacyCheckout && (h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() }))), h("div", { class: "flex--wrapper" }, h("div", { class: "zonos--wrapper" }, h("zonos-review", { collapsed: this.collapseReviewMobile, mobile: this.isMobile, onClick: () => {
|
|
759
773
|
// do nothing if it's not mobile
|
|
760
774
|
if (!this.isMobile) {
|
|
761
775
|
return;
|
|
@@ -18,7 +18,7 @@ const ZonosComponent = class {
|
|
|
18
18
|
return format(this.first, this.middle, this.last);
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return h("div", { key: '
|
|
21
|
+
return h("div", { key: '680750af83db9bbfb563fe37d1dc631e6ec60e32' }, "Hello, World! I'm ", this.getText());
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
ZonosComponent.style = ZonosComponentStyle0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { y as isValidSelector, j as stripeStore, z as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-
|
|
2
|
+
import { y as isValidSelector, j as stripeStore, z as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-9a4c155b.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-7798ac16.js';
|
|
4
4
|
import { h as handleFetch, a as logError, l as log } from './handleFetch-ce924688.js';
|
|
5
5
|
import './isDarkColor-4261bc3c.js';
|
|
@@ -328,7 +328,7 @@ const ZonosController = class {
|
|
|
328
328
|
zonosStore.organizationName = organizationName;
|
|
329
329
|
}
|
|
330
330
|
render() {
|
|
331
|
-
return h(Host, { key: '
|
|
331
|
+
return h(Host, { key: '4fbe37aa73ee16150bf40bdcc3bf5d0d0c092482', class: "zonos--elements" });
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
334
|
ZonosController.style = ZonosControllerStyle0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { l as localizationStore } from './cart-
|
|
2
|
+
import { l as localizationStore } from './cart-9a4c155b.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-7798ac16.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './handleFetch-ce924688.js';
|