@zonos/elements 1.3.20 → 1.3.22
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-921f0a47.js → cart-f963b239.js} +69 -30
- package/dist/cjs/{getBorderRadius-9ad763e1.js → getBorderRadius-332422ab.js} +1 -1
- package/dist/cjs/index.cjs.js +5 -4
- package/dist/cjs/{isDarkColor-3d021ecc.js → isDarkColor-3ddf6511.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-71790233.js → submitGtag-8d562ad4.js} +2 -2
- package/dist/cjs/zonos-address_8.cjs.entry.js +4 -4
- package/dist/cjs/zonos-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +82 -43
- package/dist/cjs/zonos-card_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_11.cjs.entry.js +19 -29
- package/dist/cjs/zonos-checkout.cjs.entry.js +11 -7
- package/dist/cjs/zonos-controller.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +11 -9
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +12 -12
- package/dist/cjs/zonos-hello.cjs.entry.js +10 -6
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +4 -4
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-text.cjs.entry.js +1 -2
- package/dist/cjs/{zonosStore-1063de5e.js → zonosStore-768d6ca0.js} +2 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.css +7 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.css +7 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +5 -5
- 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 +6 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.css +7 -2
- package/dist/collection/components/common/zonos-button/zonos-button.js +74 -39
- package/dist/collection/components/common/zonos-text/zonos-text.js +0 -18
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +6 -3
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +8 -5
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +8 -8
- package/dist/collection/components/main/zonos-controller.js +2 -2
- package/dist/collection/components/store/hello/localization.js +2 -2
- package/dist/collection/components/store/zonosStore.js +3 -2
- package/dist/collection/components/utils/api/getExchangeRate.js +20 -5
- package/dist/collection/components/utils/hello/currencyConversion/currencyConvertAndFormat.js +1 -1
- package/dist/collection/components/utils/hello/currencyConversion/currencyDisplay.js +1 -1
- package/dist/collection/components/utils/hello/currencyConversion/currencyFormat.js +32 -17
- package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +12 -2
- package/dist/collection/components/utils/isElementUsingDarkTheme.js +5 -0
- package/dist/collection/scripts/_zonosBase.js +2 -1
- package/dist/esm/{cart-d3c98a81.js → cart-efecbea6.js} +69 -30
- package/dist/esm/{getBorderRadius-393bf797.js → getBorderRadius-a2e46e26.js} +1 -1
- package/dist/esm/index.js +5 -4
- package/dist/esm/{isDarkColor-454ec221.js → isDarkColor-69ed8e39.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-acdb8bd7.js → submitGtag-a7b8a86e.js} +2 -2
- package/dist/esm/zonos-address_8.entry.js +4 -4
- package/dist/esm/zonos-badge_2.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +82 -43
- package/dist/esm/zonos-card_2.entry.js +4 -4
- package/dist/esm/zonos-cart-items_11.entry.js +19 -29
- package/dist/esm/zonos-checkout.entry.js +11 -7
- package/dist/esm/zonos-controller.entry.js +4 -4
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_3.entry.js +11 -9
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +12 -12
- package/dist/esm/zonos-hello.entry.js +10 -6
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-notification.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +4 -4
- package/dist/esm/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-text.entry.js +1 -2
- package/dist/esm/{zonosStore-0ce57f37.js → zonosStore-93da32b4.js} +2 -1
- package/dist/esm-es5/{cart-d3c98a81.js → cart-efecbea6.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-393bf797.js → getBorderRadius-a2e46e26.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-454ec221.js → isDarkColor-69ed8e39.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{submitGtag-acdb8bd7.js → submitGtag-a7b8a86e.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.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-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_11.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.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.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-input.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-0ce57f37.js → zonosStore-93da32b4.js} +1 -1
- package/dist/scripts/index.d.ts +29 -13
- 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/common/zonos-button/zonos-button.d.ts +1 -0
- package/dist/types/components/common/zonos-text/zonos-text.d.ts +0 -4
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.d.ts +1 -0
- package/dist/types/components/store/hello/localization.d.ts +2 -2
- package/dist/types/components/store/zonosStore.d.ts +6 -2
- package/dist/types/components/utils/api/getExchangeRate.d.ts +9 -10
- package/dist/types/components/utils/api/triggerBuildLandedCost.d.ts +3 -3
- package/dist/types/components/utils/hello/currencyConversion/currencyFormat.d.ts +5 -1
- package/dist/types/components/utils/isElementUsingDarkTheme.d.ts +1 -0
- package/dist/types/components.d.ts +0 -8
- package/dist/types/scripts/_zonosBase.d.ts +21 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +7 -3
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-102c670d.entry.js +1 -0
- package/dist/zonos-elements/{p-3668f365.entry.js → p-13940c52.entry.js} +1 -1
- package/dist/zonos-elements/{p-0e6fe6c8.system.entry.js → p-140bb400.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-15c903ff.js → p-18432252.js} +1 -1
- package/dist/zonos-elements/{p-f03b33ec.system.entry.js → p-1e07c616.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-42a7a726.system.entry.js → p-20ab8daf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fc2f3e2a.system.entry.js → p-2641f474.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c15b36c1.system.entry.js → p-283aa6f9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3c97c44d.entry.js → p-298b5d95.entry.js} +1 -1
- package/dist/zonos-elements/p-2d3940dc.entry.js +1 -0
- package/dist/zonos-elements/{p-d1b8dcd8.system.entry.js → p-33f83b9a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b13e630b.js → p-348adf28.js} +1 -1
- package/dist/zonos-elements/p-36f8a3df.system.js +1 -0
- package/dist/zonos-elements/{p-b9ed8a66.system.entry.js → p-3bee1a04.system.entry.js} +1 -1
- package/dist/zonos-elements/p-49061c5d.entry.js +1 -0
- package/dist/zonos-elements/{p-b202a015.entry.js → p-57d70603.entry.js} +1 -1
- package/dist/zonos-elements/{p-d18990b0.entry.js → p-5b7438ef.entry.js} +1 -1
- package/dist/zonos-elements/p-5ca32f4f.entry.js +1 -0
- package/dist/zonos-elements/p-5edc4f18.system.entry.js +1 -0
- package/dist/zonos-elements/p-678daa20.system.entry.js +1 -0
- package/dist/zonos-elements/{p-14bea5e6.system.entry.js → p-68e3ef26.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9da3b3b3.system.entry.js → p-6e717c40.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2d3e3735.js → p-795a3ed5.js} +1 -1
- package/dist/zonos-elements/{p-67373528.entry.js → p-7d2fc0fd.entry.js} +1 -1
- package/dist/zonos-elements/{p-1406d696.system.entry.js → p-85a49fb8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3115e7a7.system.js → p-884b41a8.system.js} +1 -1
- package/dist/zonos-elements/p-8a65433a.entry.js +1 -0
- package/dist/zonos-elements/{p-d03e101b.system.entry.js → p-8df58197.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d5feef4c.js → p-95ffff25.js} +1 -1
- package/dist/zonos-elements/{p-ebb36e4d.entry.js → p-968df90a.entry.js} +1 -1
- package/dist/zonos-elements/{p-23393abc.system.entry.js → p-9a299a98.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ce4c48f6.entry.js → p-a20f6ba3.entry.js} +1 -1
- package/dist/zonos-elements/{p-f0afca6c.system.js → p-a52afd83.system.js} +1 -1
- package/dist/zonos-elements/{p-0a4f341b.entry.js → p-bbe5d0f0.entry.js} +1 -1
- package/dist/zonos-elements/{p-dd02f2eb.entry.js → p-c0f0edbe.entry.js} +1 -1
- package/dist/zonos-elements/{p-971e73c3.system.entry.js → p-c2328652.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-474cb030.entry.js → p-c53f7199.entry.js} +1 -1
- package/dist/zonos-elements/{p-8f3f1a1b.system.js → p-c7360a6c.system.js} +1 -1
- package/dist/zonos-elements/{p-72191005.system.entry.js → p-c77c056d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-bfe6f84f.system.entry.js → p-d0a2b1ba.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f16b80a3.system.js → p-d0c53fba.system.js} +1 -1
- package/dist/zonos-elements/p-d6f829c2.entry.js +1 -0
- package/dist/zonos-elements/{p-2c57097c.entry.js → p-d8255adf.entry.js} +1 -1
- package/dist/zonos-elements/{p-824e1e83.system.js → p-dafc6260.system.js} +1 -1
- package/dist/zonos-elements/{p-eb6ddb2f.js → p-df267420.js} +1 -1
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
- package/dist/zonos-elements/{p-f4c921f8.entry.js → p-e5f7ff0f.entry.js} +1 -1
- package/dist/zonos-elements/{p-75d52d98.system.entry.js → p-e625f68d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b925e897.system.entry.js → p-ecaed308.system.entry.js} +1 -1
- package/dist/zonos-elements/p-edfb5021.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +4 -1
- package/dist/collection/components/utils/formatCurrency.js +0 -9
- package/dist/types/components/utils/formatCurrency.d.ts +0 -5
- package/dist/zonos-elements/p-14da9ed0.entry.js +0 -1
- package/dist/zonos-elements/p-2d08c612.system.js +0 -1
- package/dist/zonos-elements/p-3edcbb56.entry.js +0 -1
- package/dist/zonos-elements/p-5968c6ad.entry.js +0 -1
- package/dist/zonos-elements/p-59913049.entry.js +0 -1
- package/dist/zonos-elements/p-957301d0.system.entry.js +0 -1
- package/dist/zonos-elements/p-9e4b35d4.system.entry.js +0 -1
- package/dist/zonos-elements/p-d79e83bd.entry.js +0 -1
- package/dist/zonos-elements/p-eb765228.entry.js +0 -1
- package/dist/zonos-elements/p-f3a6de62.entry.js +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-3b46f3c3.js';
|
|
2
|
-
import { B as currencyFormat, t as translate, l as localizationStore } from './cart-
|
|
3
|
-
import { z as zonosStore } from './zonosStore-
|
|
2
|
+
import { B as currencyFormat, t as translate, l as localizationStore } from './cart-efecbea6.js';
|
|
3
|
+
import { z as zonosStore } from './zonosStore-93da32b4.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
6
6
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
|
|
7
7
|
import './logError-c456c092.js';
|
|
8
|
-
import './isDarkColor-
|
|
9
|
-
import './getBorderRadius-
|
|
8
|
+
import './isDarkColor-69ed8e39.js';
|
|
9
|
+
import './getBorderRadius-a2e46e26.js';
|
|
10
10
|
|
|
11
11
|
const getHasMoreSpaceAbove = (ref) => {
|
|
12
12
|
const componentRect = ref.getBoundingClientRect();
|
|
@@ -74,7 +74,7 @@ const ZonosHelloDialog = class {
|
|
|
74
74
|
const { countryLandedCost } = localizationStore;
|
|
75
75
|
// Our Robby API spells deminimis wrong here
|
|
76
76
|
const dutyDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.dutyDeminimus)
|
|
77
|
-
? currencyFormat(countryLandedCost.dutyDeminimus)
|
|
77
|
+
? currencyFormat({ amount: countryLandedCost.dutyDeminimus })
|
|
78
78
|
: null;
|
|
79
79
|
// If deminimis is undefined or null, assume it's $0
|
|
80
80
|
return dutyDeminimis
|
|
@@ -85,7 +85,7 @@ const ZonosHelloDialog = class {
|
|
|
85
85
|
const { countryLandedCost } = localizationStore;
|
|
86
86
|
// Our Robby API spells deminimis wrong here
|
|
87
87
|
const taxDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.vatTaxDeminimus)
|
|
88
|
-
? currencyFormat(countryLandedCost.vatTaxDeminimus)
|
|
88
|
+
? currencyFormat({ amount: countryLandedCost.vatTaxDeminimus })
|
|
89
89
|
: null;
|
|
90
90
|
return taxDeminimis
|
|
91
91
|
? `${translate('Spend')} ${taxDeminimis} ${translate('tax free')}`
|
|
@@ -99,19 +99,19 @@ const ZonosHelloDialog = class {
|
|
|
99
99
|
const dutyDeminimis = landedCost.dutyDeminimus;
|
|
100
100
|
return translate('Orders to ${countryName} must be over ${threshold} to ship.', {
|
|
101
101
|
countryName: 'United Kingdom',
|
|
102
|
-
threshold: currencyFormat(dutyDeminimis),
|
|
102
|
+
threshold: currencyFormat({ amount: dutyDeminimis }),
|
|
103
103
|
});
|
|
104
104
|
};
|
|
105
105
|
this.getAustraliaDutyTaxMessage = (landedCost) => {
|
|
106
106
|
return translate('${percentage} GST due on any order above ${threshold}.', {
|
|
107
107
|
percentage: `${landedCost.vatTaxRate * 100}%`,
|
|
108
|
-
threshold: currencyFormat(landedCost.vatTaxDeminimus),
|
|
108
|
+
threshold: currencyFormat({ amount: landedCost.vatTaxDeminimus }),
|
|
109
109
|
});
|
|
110
110
|
};
|
|
111
111
|
this.getNewZealandDutyTaxMessge = (landedCost) => {
|
|
112
112
|
return translate('${percentage} GST due on any order above ${threshold} along with an import entry transaction fee and MPI levy.', {
|
|
113
113
|
percentage: `${landedCost.vatTaxRate * 100}%`,
|
|
114
|
-
threshold: currencyFormat(landedCost.vatTaxDeminimus),
|
|
114
|
+
threshold: currencyFormat({ amount: landedCost.vatTaxDeminimus }),
|
|
115
115
|
});
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
@@ -175,17 +175,17 @@ const ZonosHelloDialog = class {
|
|
|
175
175
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
176
176
|
const currentPage = this.getCurrentPageEnum();
|
|
177
177
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
178
|
-
return (h(Host, { key: '
|
|
178
|
+
return (h(Host, { key: 'ec64ed364328acba99227ccb40371ff6b7e0c1e2', class: "zonos--elements" }, h("div", { key: '441d4a9ae4274b0fffbd22771b8f1ffe3839230a', "aria-hidden": "true", class: classes([
|
|
179
179
|
'zonos--hello-dialog',
|
|
180
180
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
181
181
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
182
182
|
!!this.mobileLocationOverride &&
|
|
183
183
|
'zonos--hello-dialog-mobile-override',
|
|
184
184
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
185
|
-
]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '
|
|
185
|
+
]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '9d53c5dd06b5f1b1a0800bfdaee9615e851b3338' }, h("div", { key: '43b424d7d115ead896f0ce743d60db1775468ada', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '2dacf61dfd6976de8a37f63697a927b00c70500c', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { key: '75d1b83b6e7bcefe592bd90e1fbcfd97154f0b4c', spacing: 24 }, h("zonos-country-flag", { key: '051019e1d01cc12d38d82c5c1d2765b280cf87e4', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '4dd4f2bb7b8f88fcdb8c27ebaca86bbaa4f8459a', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '33a2430d344b0613fda2597e5e8d52e852398a3c', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '5e0785c9e190be41d5c1b22736a73031de0f0a8b', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '460c1914c7f91ad7d3495e77f2f0de412e0d2f78', spacing: 8 }, this.restrictedItems.map(item => {
|
|
186
186
|
var _a;
|
|
187
187
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
188
|
-
}), h("zonos-card", { key: '
|
|
188
|
+
}), h("zonos-card", { key: '290e82532fc85421c08c0049755f2d03de5f4848', spacing: "12px" }, h("zonos-v-stack", { key: 'de37e3b7c156a952ff4906463f4e57c0e384af18', spacing: 12 }, h("div", { key: '3ce588bffccb7c41d5043d813fb6b9b0043d4fab', class: "zonos--flex-message" }, h("zonos-icon", { key: '3c955c3aa1a27566e503188a4a4f495c2daed5b1', "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", { key: '8b283197b31e82a8c15eff248e1ab55b28eba3d2' }, dutyDeMinimisMessage)), h("div", { key: '720af84433106750661c5d2e847c58ba673ee71c', class: "zonos--flex-message" }, h("zonos-icon", { key: '036e93ccbdafd6c6e911cc978f331c84ee542c73', "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", { key: 'ca33772a3fce849a35536502d95ca81d3e9b29cb' }, taxDeMinimisMessage)), additionalInformation && (h("div", { key: '254ac11735d2e3f5b3804d58c22847414df19753', class: "zonos--flex-message" }, h("zonos-icon", { key: '28d85fa72b8d0754ba5f1633f17bd0caf78abe36', "aria-label": "Low value order shipping restriction", content: BagIcon }), h("zonos-text", { key: '6ff2d5231f7fd942c0ff7b3391589984f5d0e7d2' }, additionalInformation))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '4d6593ce36f883bb538970008aa75ba3338654e5', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '66362e6aac0c8d9b5fe922c3af4d74642ff6fe8a' }, h("zonos-country-select", { key: '53fc96743eb427f76e6c658b1b3541f43afab25a', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: 'e4cc485d4574d11b5759e485be18e3e2cb0af966' }, h("zonos-language-select", { key: '579c3018f84fedf257253b6db0b0c172908662e2', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
189
189
|
}
|
|
190
190
|
static get assetsDirs() { return ["assets"]; }
|
|
191
191
|
static get watchers() { return {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-3b46f3c3.js';
|
|
2
|
-
import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-
|
|
3
|
-
import { r as handleFetch, l as localizationStore, u as isValidSelector, t as translate, w as getZCountryUrlParam, x as setZCountryUrlParam, y as currencyDisplay, z as currencyConvertAndFormat, A as currencyConvert, B as currencyFormat } from './cart-
|
|
2
|
+
import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-93da32b4.js';
|
|
3
|
+
import { r as handleFetch, l as localizationStore, u as isValidSelector, t as translate, w as getZCountryUrlParam, x as setZCountryUrlParam, y as currencyDisplay, z as currencyConvertAndFormat, A as currencyConvert, B as currencyFormat } from './cart-efecbea6.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { a as logError, l as log } from './logError-c456c092.js';
|
|
6
6
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
|
|
7
|
-
import './isDarkColor-
|
|
8
|
-
import './getBorderRadius-
|
|
7
|
+
import './isDarkColor-69ed8e39.js';
|
|
8
|
+
import './getBorderRadius-a2e46e26.js';
|
|
9
9
|
|
|
10
10
|
var root = _root;
|
|
11
11
|
|
|
@@ -669,8 +669,12 @@ const ZonosHello = class {
|
|
|
669
669
|
* @returns void
|
|
670
670
|
*/
|
|
671
671
|
async displayCurrency() {
|
|
672
|
+
if (zonosStore.helloSettings.currencyBehavior === 'DISABLED') {
|
|
673
|
+
// do nothing if currency behavior is disabled
|
|
674
|
+
return;
|
|
675
|
+
}
|
|
672
676
|
if (!localizationStore.exchangeRate) {
|
|
673
|
-
|
|
677
|
+
log('Could not display currency. Exchange rate and format data is not available.', 'warn');
|
|
674
678
|
return;
|
|
675
679
|
}
|
|
676
680
|
currencyDisplay();
|
|
@@ -694,7 +698,7 @@ const ZonosHello = class {
|
|
|
694
698
|
* @returns number
|
|
695
699
|
*/
|
|
696
700
|
async format(value) {
|
|
697
|
-
return currencyFormat(value);
|
|
701
|
+
return currencyFormat({ amount: value });
|
|
698
702
|
}
|
|
699
703
|
/**
|
|
700
704
|
* This method show the hello dialog
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-3b46f3c3.js';
|
|
2
|
-
import { d as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { d as zonosStoreFontFamily } from './zonosStore-93da32b4.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
4
|
+
import { g as getBorderRadius } from './getBorderRadius-a2e46e26.js';
|
|
5
5
|
|
|
6
6
|
const zonosInputCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin:1px;}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:\"\";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--border-radius)}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}";
|
|
7
7
|
const ZonosInputStyle0 = zonosInputCss;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as getAssetPath, H as Host } from './index-3b46f3c3.js';
|
|
2
|
-
import { d as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { d as zonosStoreFontFamily } from './zonosStore-93da32b4.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
|
|
5
5
|
const zonosLogoCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-3b46f3c3.js';
|
|
2
|
-
import { d as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { d as zonosStoreFontFamily } from './zonosStore-93da32b4.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
|
|
5
5
|
const zonosNotificationCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-3b46f3c3.js';
|
|
2
|
-
import { h as stripeStore } from './cart-
|
|
2
|
+
import { h as stripeStore } from './cart-efecbea6.js';
|
|
3
3
|
import { a as logError } from './logError-c456c092.js';
|
|
4
|
-
import './zonosStore-
|
|
5
|
-
import './isDarkColor-
|
|
6
|
-
import './getBorderRadius-
|
|
4
|
+
import './zonosStore-93da32b4.js';
|
|
5
|
+
import './isDarkColor-69ed8e39.js';
|
|
6
|
+
import './getBorderRadius-a2e46e26.js';
|
|
7
7
|
|
|
8
8
|
const zonosPaymentCss = ".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.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:16px}";
|
|
9
9
|
const ZonosPaymentStyle0 = zonosPaymentCss;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-3b46f3c3.js';
|
|
2
|
-
import { d as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { d as zonosStoreFontFamily } from './zonosStore-93da32b4.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
|
|
5
5
|
const RemoveIcon = `<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-3b46f3c3.js';
|
|
2
|
-
import { d as zonosStoreFontFamily, z as zonosStore } from './zonosStore-
|
|
2
|
+
import { d as zonosStoreFontFamily, z as zonosStore } from './zonosStore-93da32b4.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
4
|
+
import { g as getBorderRadius } from './getBorderRadius-a2e46e26.js';
|
|
5
5
|
import { i as isColorVariable } from './isColorVariable-82457bef.js';
|
|
6
6
|
|
|
7
7
|
const zonosShippingRichRadioCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--border-radius, var(--zonos-elements-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(--zonos-elements-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}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-3b46f3c3.js';
|
|
2
|
-
import { d as zonosStoreFontFamily } from './zonosStore-
|
|
2
|
+
import { d as zonosStoreFontFamily } from './zonosStore-93da32b4.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { i as isColorVariable } from './isColorVariable-82457bef.js';
|
|
5
5
|
|
|
@@ -113,7 +113,6 @@ const ZonosText = class {
|
|
|
113
113
|
this.size = undefined;
|
|
114
114
|
this.type = 'body';
|
|
115
115
|
this.weight = undefined;
|
|
116
|
-
this.content = undefined;
|
|
117
116
|
this.ready = false;
|
|
118
117
|
}
|
|
119
118
|
componentDidRender() {
|
|
@@ -2757,7 +2757,7 @@ const mergeConfig = (defaultObj, fetchedObj, ...overrideObj) => {
|
|
|
2757
2757
|
return merge_1.apply(null, overrideArgs);
|
|
2758
2758
|
};
|
|
2759
2759
|
|
|
2760
|
-
const { reset, state: zonosStore } = createStore(() => ({
|
|
2760
|
+
const { dispose: zonosStoreDispose, reset, state: zonosStore, } = createStore(() => ({
|
|
2761
2761
|
appearance: {
|
|
2762
2762
|
colorPrimary: 'white',
|
|
2763
2763
|
fontFamily: 'Inter',
|
|
@@ -2876,6 +2876,7 @@ const zonosStoreInitSetting = ({ overrideSettings, zonosSettings, }) => {
|
|
|
2876
2876
|
zonosStore.storeId = ((_d = (_c = zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.organization) === null || _c === void 0 ? void 0 : _c.references) === null || _d === void 0 ? void 0 : _d.storeId) || null;
|
|
2877
2877
|
zonosStore.currencyConverter = overrideSettings === null || overrideSettings === void 0 ? void 0 : overrideSettings.currencyConverter;
|
|
2878
2878
|
zonosStore.onCountryChange = overrideSettings === null || overrideSettings === void 0 ? void 0 : overrideSettings.onCountryChange;
|
|
2879
|
+
zonosStore.overrideCurrencyFormat = overrideSettings === null || overrideSettings === void 0 ? void 0 : overrideSettings.overrideCurrencyFormat;
|
|
2879
2880
|
};
|
|
2880
2881
|
const zonosStoreFontFamily = () => {
|
|
2881
2882
|
const fontFamily = zonosStore.appearance.fontFamily || 'Inter';
|