@zonos/elements 1.3.41 → 1.3.42
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-497bb434.js → cart-99a1ed87.js} +4 -7
- package/dist/cjs/index.cjs.js +21 -7
- package/dist/cjs/{paypal-e65a287a.js → paypal-5509a76f.js} +1 -1
- package/dist/cjs/{sendErrorLog-c3c315a9.js → sendErrorLog-21996939.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +3 -3
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
- 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 +2 -2
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +6 -1
- package/dist/collection/components/utils/handleFetch.js +0 -6
- package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +4 -1
- package/dist/collection/environment.js +6 -0
- package/dist/collection/scripts/_getNextFallbackUrl.js +1 -1
- package/dist/collection/scripts/_getZonosQaUrl.js +12 -1
- package/dist/collection/scripts/_zonosBase.js +4 -1
- package/dist/esm/{cart-f53c9f90.js → cart-bc217300.js} +4 -7
- package/dist/esm/index.js +21 -7
- package/dist/esm/{paypal-72296ae6.js → paypal-fa96e7c3.js} +1 -1
- package/dist/esm/{sendErrorLog-f8d3ec4b.js → sendErrorLog-c40b553a.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +1 -1
- package/dist/esm/zonos-cart-items_12.entry.js +3 -3
- package/dist/esm/zonos-checkout.entry.js +3 -3
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +4 -4
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- 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 +2 -2
- package/dist/esm-es5/{cart-f53c9f90.js → cart-bc217300.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-72296ae6.js → paypal-fa96e7c3.js} +1 -1
- package/dist/esm-es5/{sendErrorLog-f8d3ec4b.js → sendErrorLog-c40b553a.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-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-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/scripts/index.d.ts +62 -52
- 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/hello/zonos-hello/zonos-hello.d.ts +2 -1
- package/dist/types/components.d.ts +3 -1
- package/dist/types/environment.d.ts +4 -0
- package/dist/types/scripts/_getNextFallbackUrl.d.ts +3 -3
- package/dist/types/types/LogLoadScriptRequestBody.d.ts +1 -1
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-05cdd3b4.js → p-1041cbd0.js} +1 -1
- package/dist/zonos-elements/p-16dd23e1.entry.js +1 -0
- package/dist/zonos-elements/{p-fd54fbb9.system.entry.js → p-211e3529.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7833fa53.system.entry.js → p-23748211.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4617501.entry.js → p-23fd4673.entry.js} +1 -1
- package/dist/zonos-elements/{p-fdb4347f.entry.js → p-29ed14b8.entry.js} +1 -1
- package/dist/zonos-elements/{p-f35ee203.entry.js → p-2cc469c3.entry.js} +1 -1
- package/dist/zonos-elements/{p-b689309d.system.entry.js → p-35679ed2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-67f22fbf.system.entry.js → p-3b1ea7c8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-de53d9c3.entry.js → p-5230520c.entry.js} +1 -1
- package/dist/zonos-elements/{p-5922c099.entry.js → p-558486eb.entry.js} +1 -1
- package/dist/zonos-elements/p-668fb530.system.js +1 -0
- package/dist/zonos-elements/{p-0f9804e3.entry.js → p-68bb8de4.entry.js} +1 -1
- package/dist/zonos-elements/{p-ab11cca6.system.entry.js → p-7338ea95.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5fe10991.system.entry.js → p-73c56565.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-52fa9aab.entry.js → p-7a902328.entry.js} +1 -1
- package/dist/zonos-elements/{p-df69fa38.system.entry.js → p-7d67bbb8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1a89c54a.js → p-90f517f5.js} +1 -1
- package/dist/zonos-elements/{p-9525cc44.system.js → p-98a0fda1.system.js} +1 -1
- package/dist/zonos-elements/p-a0581551.system.js +1 -0
- package/dist/zonos-elements/{p-b3e825dc.system.js → p-a8a94872.system.js} +1 -1
- package/dist/zonos-elements/{p-6de1c78a.entry.js → p-a9ae78e3.entry.js} +1 -1
- package/dist/zonos-elements/{p-6fbb4565.system.entry.js → p-c0aec0ca.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-4db5be24.system.entry.js → p-d27489bb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1ee2fa70.system.entry.js → p-f59666e6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-12266c9e.js → p-f97ffbfb.js} +1 -1
- package/dist/zonos-elements/{p-d86c89e3.entry.js → p-fc2676e3.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.css +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-678f1888.entry.js +0 -1
- package/dist/zonos-elements/p-79fd4f3c.system.js +0 -1
- package/dist/zonos-elements/p-c460665d.system.js +0 -1
|
@@ -6866,12 +6866,6 @@ const handleRequest = async (url, options) => {
|
|
|
6866
6866
|
const usingZonosPreview = window.Zonos.zonosQaUrl;
|
|
6867
6867
|
// We only want to alert once if the user is in preview mode and it's also using production environment
|
|
6868
6868
|
if (!window.Zonos.modeAlerted && zonosMode && usingZonosPreview) {
|
|
6869
|
-
if (zonosMode === 'production') {
|
|
6870
|
-
alert(`Please be aware that you are currently operating in the production environment. Any interactions with the customer store, including payments, will be processed as real transactions!`);
|
|
6871
|
-
}
|
|
6872
|
-
if (zonosMode === 'test') {
|
|
6873
|
-
alert(`For testing payments, you can utilize the test payment information provided at this link: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-test-the-integration`);
|
|
6874
|
-
}
|
|
6875
6869
|
window.Zonos.modeAlerted = true;
|
|
6876
6870
|
}
|
|
6877
6871
|
if (response.ok) {
|
|
@@ -7219,7 +7213,10 @@ const convertCurrency = (element) => {
|
|
|
7219
7213
|
});
|
|
7220
7214
|
// default to the currencyConvertAndFormat if the currencyConverter function does not return a value, or invalid value. This is to make sure we don't break the merchant's price.
|
|
7221
7215
|
const observedFormattedValue = customizedCurrencyFormat || currencyConvertAndFormat(amount);
|
|
7222
|
-
element.textContent
|
|
7216
|
+
if (observedFormattedValue !== element.textContent) {
|
|
7217
|
+
// Only set textContent if the value has changed, this is to prevent it redrawing the element if the value is the same
|
|
7218
|
+
element.textContent = observedFormattedValue;
|
|
7219
|
+
}
|
|
7223
7220
|
// save the new rate to the data-zrate attribute
|
|
7224
7221
|
element.setAttribute('data-zrate', rate.toString());
|
|
7225
7222
|
// save the new value to the data-zintl attribute
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -40,7 +40,7 @@ const checkIfLoadVersionDomain = ({ loadScriptSrc }) => {
|
|
|
40
40
|
return { currentLoadScriptUrl, isForceLoadVersionDomain, isWhiteListed };
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
const fallbackList = ['jsdelivr', 'unpkg', 'vercel'];
|
|
43
|
+
const fallbackList = ['jsdelivr', 'cdnjs', 'unpkg', 'vercel'];
|
|
44
44
|
/**
|
|
45
45
|
* Get the next cdn type in the fallback list
|
|
46
46
|
* @param currentCdnType The current cdn type that want to get the next fallback url
|
|
@@ -84,10 +84,21 @@ const extractZonosQaUrl = (url) => {
|
|
|
84
84
|
* Get the Zonos QA URL and return it. Will remove `zonosQaUrl` from the url query if it doesn't exists.
|
|
85
85
|
*/
|
|
86
86
|
const getZonosQaUrl = () => {
|
|
87
|
-
|
|
87
|
+
/**
|
|
88
|
+
* This is flag to force load cdn for testing purpose
|
|
89
|
+
* When developing, if the script load is from `dev.elements.zonos.com`,
|
|
90
|
+
* it would load script from that same domain instead of loading from cdn
|
|
91
|
+
*/
|
|
92
|
+
const shoudForceLoadCdn = window && window.location.href.includes('forceLoadCdn');
|
|
93
|
+
if (typeof window === 'undefined' || shoudForceLoadCdn) {
|
|
88
94
|
return null;
|
|
89
95
|
}
|
|
90
96
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
97
|
+
const cdnUrl = "https://v1.3.42.js.zonos.com";
|
|
98
|
+
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
99
|
+
if (!qaUrl && cdnUrl.includes('test.')) {
|
|
100
|
+
return cdnUrl;
|
|
101
|
+
}
|
|
91
102
|
// when local demo app is running, it needs to use the local dev script unless the qaUrl is set
|
|
92
103
|
if (!qaUrl && window.location.hostname === 'dev.demo.elements.zonos.com') {
|
|
93
104
|
return 'https://dev.elements.zonos.com';
|
|
@@ -253,9 +264,10 @@ const zonosLoadUrl = (() => {
|
|
|
253
264
|
}
|
|
254
265
|
return null;
|
|
255
266
|
})();
|
|
256
|
-
const ZONOS_URL = "https://v1.3.
|
|
257
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
258
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
267
|
+
const ZONOS_URL = "https://v1.3.42.js.zonos.com";
|
|
268
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.42";
|
|
269
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.42";
|
|
270
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.42";
|
|
259
271
|
const MAIN_LOAD_CDN_TYPE = 'jsdelivr';
|
|
260
272
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
261
273
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
@@ -276,7 +288,7 @@ Zonos.isBigCommerce = false;
|
|
|
276
288
|
*/
|
|
277
289
|
Zonos.isNpm = true;
|
|
278
290
|
Zonos.zonosQaUrl = null;
|
|
279
|
-
Zonos.version = `v${"1.3.
|
|
291
|
+
Zonos.version = `v${"1.3.42"}`;
|
|
280
292
|
Zonos.modeAlerted = false;
|
|
281
293
|
Zonos.tempCartData = null;
|
|
282
294
|
Zonos.paypal = null;
|
|
@@ -476,7 +488,9 @@ Zonos.getZonosUrl = (type) => {
|
|
|
476
488
|
return JS_DELIVR_ZONOS_URL;
|
|
477
489
|
case 'unpkg':
|
|
478
490
|
return UNPKG_ZONOS_URL;
|
|
479
|
-
|
|
491
|
+
case 'cdnjs':
|
|
492
|
+
return CDNJS_ZONOS_URL;
|
|
493
|
+
case 'vercel':
|
|
480
494
|
return ZONOS_URL;
|
|
481
495
|
}
|
|
482
496
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
4
|
-
const cart = require('./cart-
|
|
4
|
+
const cart = require('./cart-99a1ed87.js');
|
|
5
5
|
const isDarkColor = require('./isDarkColor-4eb96a1e.js');
|
|
6
6
|
const logError = require('./logError-4e2f2020.js');
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-99a1ed87.js');
|
|
7
7
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
8
8
|
const logError = require('./logError-4e2f2020.js');
|
|
9
9
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-99a1ed87.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const paypal = require('./paypal-
|
|
8
|
+
const paypal = require('./paypal-5509a76f.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
10
|
-
const sendErrorLog = require('./sendErrorLog-
|
|
10
|
+
const sendErrorLog = require('./sendErrorLog-21996939.js');
|
|
11
11
|
const getBorderRadius = require('./getBorderRadius-4413e191.js');
|
|
12
12
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
13
13
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
6
|
+
const cart = require('./cart-99a1ed87.js');
|
|
7
|
+
const paypal = require('./paypal-5509a76f.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
9
|
-
const sendErrorLog = require('./sendErrorLog-
|
|
9
|
+
const sendErrorLog = require('./sendErrorLog-21996939.js');
|
|
10
10
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
11
11
|
const logError = require('./logError-4e2f2020.js');
|
|
12
12
|
const classes = require('./classes-b7918f56.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-99a1ed87.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
8
8
|
const logError = require('./logError-4e2f2020.js');
|
|
9
9
|
require('./isDarkColor-4eb96a1e.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-99a1ed87.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
require('./logError-4e2f2020.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-99a1ed87.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
9
|
const isDarkColor = require('./isDarkColor-4eb96a1e.js');
|
|
@@ -1822,7 +1822,7 @@ const ZonosCountrySelect = class {
|
|
|
1822
1822
|
componentDidRender() {
|
|
1823
1823
|
var _a, _b;
|
|
1824
1824
|
// focus the input on render
|
|
1825
|
-
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-
|
|
1825
|
+
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-input')) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1826
1826
|
}
|
|
1827
1827
|
render() {
|
|
1828
1828
|
const { helloCountryList } = cart.localizationStore;
|
|
@@ -1837,9 +1837,9 @@ const ZonosCountrySelect = class {
|
|
|
1837
1837
|
? fuseObject.map(country => country.item)
|
|
1838
1838
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
1839
1839
|
const isEmpty = !filteredCountries.length;
|
|
1840
|
-
return (index.h(index.Host, { key: '
|
|
1840
|
+
return (index.h(index.Host, { key: 'd6d6a0736660d0c6e76f749f8ea78a8c95825b88', class: "zonos--elements", style: {
|
|
1841
1841
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
1842
|
-
} }, index.h("div", { key: '
|
|
1842
|
+
} }, index.h("div", { key: '0bc3773965c49f0ee4da2056b6acc0ae361e227a', class: "zonos--country-select" }, index.h("zonos-v-stack", { key: '9e00877189dc39b789861c0425702d276cdad410', class: "zonos--country-select-header", spacing: 8 }, index.h("zonos-select-dialog-header", { key: '9c098afdf6db8ef8e18dc855e19ab6d45b7db8be', handleOnClose: () => this.handleOnClose(), label: cart.translate('Select a country') }, index.h("input", { key: '10c59b07a42da02fb348e289dc0211ae33b96638', autocomplete: "off", autofocus: "autofocus", class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: cart.translate('Search countries'), value: this.inputValue }))), index.h("div", { key: 'fec8fb874726377a3c4a03ac5d264fc7d8a94a21', class: "zonos--country-select-content" }, isEmpty && (index.h("zonos-text", { key: '182fb6955798519e63d63121752bc65ac6045770', class: "no-country", textColor: "gray-800" }, cart.translate('No countries found'))), index.h("zonos-virtual-scroll", { key: '3ccda154b37344857595d65ce3131ca6d2610a11', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index$1 => {
|
|
1843
1843
|
const country = filteredCountries[index$1];
|
|
1844
1844
|
if (!country) {
|
|
1845
1845
|
return null;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-99a1ed87.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-99a1ed87.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const logError = require('./logError-4e2f2020.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-99a1ed87.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
9
|
require('./logError-4e2f2020.js');
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-56401fdb.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const cart = require('./cart-
|
|
8
|
+
const cart = require('./cart-99a1ed87.js');
|
|
9
9
|
const logError = require('./logError-4e2f2020.js');
|
|
10
|
-
const paypal = require('./paypal-
|
|
10
|
+
const paypal = require('./paypal-5509a76f.js');
|
|
11
11
|
require('./isDarkColor-4eb96a1e.js');
|
|
12
12
|
require('./getBorderRadius-4413e191.js');
|
|
13
13
|
|
|
@@ -29,7 +29,7 @@ export class ZonosCountrySelect {
|
|
|
29
29
|
componentDidRender() {
|
|
30
30
|
var _a, _b;
|
|
31
31
|
// focus the input on render
|
|
32
|
-
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-
|
|
32
|
+
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-input')) === null || _b === void 0 ? void 0 : _b.focus();
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
35
|
const { helloCountryList } = localizationStore;
|
|
@@ -44,9 +44,9 @@ export class ZonosCountrySelect {
|
|
|
44
44
|
? fuseObject.map(country => country.item)
|
|
45
45
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
46
46
|
const isEmpty = !filteredCountries.length;
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: 'd6d6a0736660d0c6e76f749f8ea78a8c95825b88', class: "zonos--elements", style: {
|
|
48
48
|
'--font-family': zonosStoreFontFamily(),
|
|
49
|
-
} }, h("div", { key: '
|
|
49
|
+
} }, h("div", { key: '0bc3773965c49f0ee4da2056b6acc0ae361e227a', class: "zonos--country-select" }, h("zonos-v-stack", { key: '9e00877189dc39b789861c0425702d276cdad410', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '9c098afdf6db8ef8e18dc855e19ab6d45b7db8be', handleOnClose: () => this.handleOnClose(), label: translate('Select a country') }, h("input", { key: '10c59b07a42da02fb348e289dc0211ae33b96638', autocomplete: "off", autofocus: "autofocus", class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: translate('Search countries'), value: this.inputValue }))), h("div", { key: 'fec8fb874726377a3c4a03ac5d264fc7d8a94a21', class: "zonos--country-select-content" }, isEmpty && (h("zonos-text", { key: '182fb6955798519e63d63121752bc65ac6045770', class: "no-country", textColor: "gray-800" }, translate('No countries found'))), h("zonos-virtual-scroll", { key: '3ccda154b37344857595d65ce3131ca6d2610a11', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index => {
|
|
50
50
|
const country = filteredCountries[index];
|
|
51
51
|
if (!country) {
|
|
52
52
|
return null;
|
|
@@ -447,12 +447,17 @@ export class ZonosHello {
|
|
|
447
447
|
return {
|
|
448
448
|
"getCountryList": {
|
|
449
449
|
"complexType": {
|
|
450
|
-
"signature": "() => Promise<
|
|
450
|
+
"signature": "() => Promise<ICountryJson | null>",
|
|
451
451
|
"parameters": [],
|
|
452
452
|
"references": {
|
|
453
453
|
"Promise": {
|
|
454
454
|
"location": "global",
|
|
455
455
|
"id": "global::Promise"
|
|
456
|
+
},
|
|
457
|
+
"ICountryJson": {
|
|
458
|
+
"location": "import",
|
|
459
|
+
"path": "src/types/ICountryJson",
|
|
460
|
+
"id": "src/types/ICountryJson.ts::ICountryJson"
|
|
456
461
|
}
|
|
457
462
|
},
|
|
458
463
|
"return": "Promise<ICountryJson | null>"
|
|
@@ -52,12 +52,6 @@ const handleRequest = async (url, options) => {
|
|
|
52
52
|
const usingZonosPreview = window.Zonos.zonosQaUrl;
|
|
53
53
|
// We only want to alert once if the user is in preview mode and it's also using production environment
|
|
54
54
|
if (!window.Zonos.modeAlerted && zonosMode && usingZonosPreview) {
|
|
55
|
-
if (zonosMode === 'production') {
|
|
56
|
-
alert(`Please be aware that you are currently operating in the production environment. Any interactions with the customer store, including payments, will be processed as real transactions!`);
|
|
57
|
-
}
|
|
58
|
-
if (zonosMode === 'test') {
|
|
59
|
-
alert(`For testing payments, you can utilize the test payment information provided at this link: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-test-the-integration`);
|
|
60
|
-
}
|
|
61
55
|
window.Zonos.modeAlerted = true;
|
|
62
56
|
}
|
|
63
57
|
if (response.ok) {
|
package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js
CHANGED
|
@@ -40,7 +40,10 @@ const convertCurrency = (element) => {
|
|
|
40
40
|
});
|
|
41
41
|
// default to the currencyConvertAndFormat if the currencyConverter function does not return a value, or invalid value. This is to make sure we don't break the merchant's price.
|
|
42
42
|
const observedFormattedValue = customizedCurrencyFormat || currencyConvertAndFormat(amount);
|
|
43
|
-
element.textContent
|
|
43
|
+
if (observedFormattedValue !== element.textContent) {
|
|
44
|
+
// Only set textContent if the value has changed, this is to prevent it redrawing the element if the value is the same
|
|
45
|
+
element.textContent = observedFormattedValue;
|
|
46
|
+
}
|
|
44
47
|
// save the new rate to the data-zrate attribute
|
|
45
48
|
element.setAttribute('data-zrate', rate.toString());
|
|
46
49
|
// save the new value to the data-zintl attribute
|
|
@@ -21,6 +21,10 @@ const JS_DELIVR_ZONOS_URL = `https://cdn.jsdelivr.net/npm/@zonos/elements@${pack
|
|
|
21
21
|
* @example https://unpkg.com/@zonos/elements@1.3.15/dist/scripts/zonos.js
|
|
22
22
|
*/
|
|
23
23
|
const UNPKG_ZONOS_URL = `https://unpkg.com/@zonos/elements@${packageVersion}`;
|
|
24
|
+
/**
|
|
25
|
+
* @example https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.41/dist/scripts/loadZonos.js
|
|
26
|
+
*/
|
|
27
|
+
const CDNJS_ZONOS_URL = `https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/${packageVersion}`;
|
|
24
28
|
const currentBranch = process.env.VERCEL_GIT_COMMIT_REF || process.env.BRANCH_NAME;
|
|
25
29
|
export const formattedUrl = ({ branchName, inCI: _inCI, inVercel: _inVercel, isVercelPreview: _isVercelPreview, packageVersion: _packageVersion, type = 'full', url, }) => {
|
|
26
30
|
if (!url) {
|
|
@@ -121,6 +125,7 @@ else {
|
|
|
121
125
|
const envClient = {
|
|
122
126
|
NEXT_PUBLIC_FLAG_URL: z.string(),
|
|
123
127
|
NEXT_PUBLIC_ZONOS_API_KEY: z.string(),
|
|
128
|
+
NEXT_PUBLIC_ZONOS_CDNJS_CDN_URL: z.string(),
|
|
124
129
|
NEXT_PUBLIC_ZONOS_CDN_URL: z.string(),
|
|
125
130
|
NEXT_PUBLIC_ZONOS_JS_DELIVR_CDN_URL: z.string(),
|
|
126
131
|
NEXT_PUBLIC_ZONOS_PACKAGE_VERSION: z.string(),
|
|
@@ -145,6 +150,7 @@ export const env = createEnv({
|
|
|
145
150
|
runtimeEnvStrict: {
|
|
146
151
|
NEXT_PUBLIC_FLAG_URL: process.env.NEXT_PUBLIC_FLAG_URL,
|
|
147
152
|
NEXT_PUBLIC_ZONOS_API_KEY: process.env.NEXT_PUBLIC_ZONOS_API_KEY,
|
|
153
|
+
NEXT_PUBLIC_ZONOS_CDNJS_CDN_URL: CDNJS_ZONOS_URL,
|
|
148
154
|
/**
|
|
149
155
|
* Versioning url for production environment
|
|
150
156
|
* @example v1.2.3.js.zonos.com
|
|
@@ -4,10 +4,21 @@ import { extractZonosQaUrl } from "./_extractZonosQaUrl";
|
|
|
4
4
|
* Get the Zonos QA URL and return it. Will remove `zonosQaUrl` from the url query if it doesn't exists.
|
|
5
5
|
*/
|
|
6
6
|
export const getZonosQaUrl = () => {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* This is flag to force load cdn for testing purpose
|
|
9
|
+
* When developing, if the script load is from `dev.elements.zonos.com`,
|
|
10
|
+
* it would load script from that same domain instead of loading from cdn
|
|
11
|
+
*/
|
|
12
|
+
const shoudForceLoadCdn = window && window.location.href.includes('forceLoadCdn');
|
|
13
|
+
if (typeof window === 'undefined' || shoudForceLoadCdn) {
|
|
8
14
|
return null;
|
|
9
15
|
}
|
|
10
16
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
17
|
+
const cdnUrl = process.env.NEXT_PUBLIC_ZONOS_CDN_URL;
|
|
18
|
+
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
19
|
+
if (!qaUrl && cdnUrl.includes('test.')) {
|
|
20
|
+
return cdnUrl;
|
|
21
|
+
}
|
|
11
22
|
// when local demo app is running, it needs to use the local dev script unless the qaUrl is set
|
|
12
23
|
if (!qaUrl && window.location.hostname === 'dev.demo.elements.zonos.com') {
|
|
13
24
|
return 'https://dev.elements.zonos.com';
|
|
@@ -24,6 +24,7 @@ const zonosLoadUrl = (() => {
|
|
|
24
24
|
const ZONOS_URL = process.env.NEXT_PUBLIC_ZONOS_CDN_URL;
|
|
25
25
|
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || process.env.NEXT_PUBLIC_ZONOS_JS_DELIVR_CDN_URL;
|
|
26
26
|
const UNPKG_ZONOS_URL = process.env.NEXT_PUBLIC_ZONOS_UNPKG_CDN_URL;
|
|
27
|
+
const CDNJS_ZONOS_URL = process.env.NEXT_PUBLIC_ZONOS_CDNJS_CDN_URL;
|
|
27
28
|
export const MAIN_LOAD_CDN_TYPE = 'jsdelivr';
|
|
28
29
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
29
30
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
@@ -244,7 +245,9 @@ Zonos.getZonosUrl = (type) => {
|
|
|
244
245
|
return JS_DELIVR_ZONOS_URL;
|
|
245
246
|
case 'unpkg':
|
|
246
247
|
return UNPKG_ZONOS_URL;
|
|
247
|
-
|
|
248
|
+
case 'cdnjs':
|
|
249
|
+
return CDNJS_ZONOS_URL;
|
|
250
|
+
case 'vercel':
|
|
248
251
|
return ZONOS_URL;
|
|
249
252
|
}
|
|
250
253
|
};
|
|
@@ -6864,12 +6864,6 @@ const handleRequest = async (url, options) => {
|
|
|
6864
6864
|
const usingZonosPreview = window.Zonos.zonosQaUrl;
|
|
6865
6865
|
// We only want to alert once if the user is in preview mode and it's also using production environment
|
|
6866
6866
|
if (!window.Zonos.modeAlerted && zonosMode && usingZonosPreview) {
|
|
6867
|
-
if (zonosMode === 'production') {
|
|
6868
|
-
alert(`Please be aware that you are currently operating in the production environment. Any interactions with the customer store, including payments, will be processed as real transactions!`);
|
|
6869
|
-
}
|
|
6870
|
-
if (zonosMode === 'test') {
|
|
6871
|
-
alert(`For testing payments, you can utilize the test payment information provided at this link: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-test-the-integration`);
|
|
6872
|
-
}
|
|
6873
6867
|
window.Zonos.modeAlerted = true;
|
|
6874
6868
|
}
|
|
6875
6869
|
if (response.ok) {
|
|
@@ -7217,7 +7211,10 @@ const convertCurrency = (element) => {
|
|
|
7217
7211
|
});
|
|
7218
7212
|
// default to the currencyConvertAndFormat if the currencyConverter function does not return a value, or invalid value. This is to make sure we don't break the merchant's price.
|
|
7219
7213
|
const observedFormattedValue = customizedCurrencyFormat || currencyConvertAndFormat(amount);
|
|
7220
|
-
element.textContent
|
|
7214
|
+
if (observedFormattedValue !== element.textContent) {
|
|
7215
|
+
// Only set textContent if the value has changed, this is to prevent it redrawing the element if the value is the same
|
|
7216
|
+
element.textContent = observedFormattedValue;
|
|
7217
|
+
}
|
|
7221
7218
|
// save the new rate to the data-zrate attribute
|
|
7222
7219
|
element.setAttribute('data-zrate', rate.toString());
|
|
7223
7220
|
// save the new value to the data-zintl attribute
|
package/dist/esm/index.js
CHANGED
|
@@ -36,7 +36,7 @@ const checkIfLoadVersionDomain = ({ loadScriptSrc }) => {
|
|
|
36
36
|
return { currentLoadScriptUrl, isForceLoadVersionDomain, isWhiteListed };
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
const fallbackList = ['jsdelivr', 'unpkg', 'vercel'];
|
|
39
|
+
const fallbackList = ['jsdelivr', 'cdnjs', 'unpkg', 'vercel'];
|
|
40
40
|
/**
|
|
41
41
|
* Get the next cdn type in the fallback list
|
|
42
42
|
* @param currentCdnType The current cdn type that want to get the next fallback url
|
|
@@ -80,10 +80,21 @@ const extractZonosQaUrl = (url) => {
|
|
|
80
80
|
* Get the Zonos QA URL and return it. Will remove `zonosQaUrl` from the url query if it doesn't exists.
|
|
81
81
|
*/
|
|
82
82
|
const getZonosQaUrl = () => {
|
|
83
|
-
|
|
83
|
+
/**
|
|
84
|
+
* This is flag to force load cdn for testing purpose
|
|
85
|
+
* When developing, if the script load is from `dev.elements.zonos.com`,
|
|
86
|
+
* it would load script from that same domain instead of loading from cdn
|
|
87
|
+
*/
|
|
88
|
+
const shoudForceLoadCdn = window && window.location.href.includes('forceLoadCdn');
|
|
89
|
+
if (typeof window === 'undefined' || shoudForceLoadCdn) {
|
|
84
90
|
return null;
|
|
85
91
|
}
|
|
86
92
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
93
|
+
const cdnUrl = "https://v1.3.42.js.zonos.com";
|
|
94
|
+
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
95
|
+
if (!qaUrl && cdnUrl.includes('test.')) {
|
|
96
|
+
return cdnUrl;
|
|
97
|
+
}
|
|
87
98
|
// when local demo app is running, it needs to use the local dev script unless the qaUrl is set
|
|
88
99
|
if (!qaUrl && window.location.hostname === 'dev.demo.elements.zonos.com') {
|
|
89
100
|
return 'https://dev.elements.zonos.com';
|
|
@@ -249,9 +260,10 @@ const zonosLoadUrl = (() => {
|
|
|
249
260
|
}
|
|
250
261
|
return null;
|
|
251
262
|
})();
|
|
252
|
-
const ZONOS_URL = "https://v1.3.
|
|
253
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
254
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
263
|
+
const ZONOS_URL = "https://v1.3.42.js.zonos.com";
|
|
264
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.42";
|
|
265
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.42";
|
|
266
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.42";
|
|
255
267
|
const MAIN_LOAD_CDN_TYPE = 'jsdelivr';
|
|
256
268
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
257
269
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
@@ -272,7 +284,7 @@ Zonos.isBigCommerce = false;
|
|
|
272
284
|
*/
|
|
273
285
|
Zonos.isNpm = true;
|
|
274
286
|
Zonos.zonosQaUrl = null;
|
|
275
|
-
Zonos.version = `v${"1.3.
|
|
287
|
+
Zonos.version = `v${"1.3.42"}`;
|
|
276
288
|
Zonos.modeAlerted = false;
|
|
277
289
|
Zonos.tempCartData = null;
|
|
278
290
|
Zonos.paypal = null;
|
|
@@ -472,7 +484,9 @@ Zonos.getZonosUrl = (type) => {
|
|
|
472
484
|
return JS_DELIVR_ZONOS_URL;
|
|
473
485
|
case 'unpkg':
|
|
474
486
|
return UNPKG_ZONOS_URL;
|
|
475
|
-
|
|
487
|
+
case 'cdnjs':
|
|
488
|
+
return CDNJS_ZONOS_URL;
|
|
489
|
+
case 'vercel':
|
|
476
490
|
return ZONOS_URL;
|
|
477
491
|
}
|
|
478
492
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-8fc9ceb2.js';
|
|
2
|
-
import { w as handleFetch, d as cartStore, q as stripeStoreHandleInventoryCheck, t as translate, p as cartStoreNextStep, h as cartStoreClearCheckoutInterval, x as jsonParse } from './cart-
|
|
2
|
+
import { w as handleFetch, d as cartStore, q as stripeStoreHandleInventoryCheck, t as translate, p as cartStoreNextStep, h as cartStoreClearCheckoutInterval, x as jsonParse } from './cart-bc217300.js';
|
|
3
3
|
import { t as tinycolor } from './isDarkColor-3119e351.js';
|
|
4
4
|
import { l as log, a as logError } from './logError-c456c092.js';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as handleFetch, d as cartStore, l as localizationStore } from './cart-
|
|
1
|
+
import { w as handleFetch, d as cartStore, l as localizationStore } from './cart-bc217300.js';
|
|
2
2
|
import { z as zonosStore } from './zonosStore-8fc9ceb2.js';
|
|
3
3
|
|
|
4
4
|
const trackConversionEvent = async (eventName, metadata) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { j as stripeStore, l as localizationStore, t as translate } from './cart-
|
|
2
|
+
import { j as stripeStore, l as localizationStore, t as translate } from './cart-bc217300.js';
|
|
3
3
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
4
4
|
import { a as logError } from './logError-c456c092.js';
|
|
5
5
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
@@ -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, F as currencyFormat, G as cartStoreHasOneEligibleItem, t as translate, w as handleFetch, u as stripeStoreReset, j as stripeStore, H as stripeStoreRetrievePayment, I as stripeStoreMessageBasedOnStatus, l as localizationStore, J as stripeStoreTranslateAddressToLatin, K as cartStoreUpdateSelectedShippingOption, L as cartStoreGetShippingTransitInfo } from './cart-
|
|
2
|
+
import { d as cartStore, F as currencyFormat, G as cartStoreHasOneEligibleItem, t as translate, w as handleFetch, u as stripeStoreReset, j as stripeStore, H as stripeStoreRetrievePayment, I as stripeStoreMessageBasedOnStatus, l as localizationStore, J as stripeStoreTranslateAddressToLatin, K as cartStoreUpdateSelectedShippingOption, L as cartStoreGetShippingTransitInfo } from './cart-bc217300.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-
|
|
4
|
+
import { s as submitGtag, a as paypalStore, b as paypalStoreReset, c as paypalStoreHasPaypalEnabled, i as isContrastColor } from './paypal-fa96e7c3.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-8fc9ceb2.js';
|
|
6
|
-
import { t as trackConversionEvent, s as sendErrorLog, c as createCustomEvent, g as getIsTestMode } from './sendErrorLog-
|
|
6
|
+
import { t as trackConversionEvent, s as sendErrorLog, c as createCustomEvent, g as getIsTestMode } from './sendErrorLog-c40b553a.js';
|
|
7
7
|
import { g as getBorderRadius } from './getBorderRadius-3ba98361.js';
|
|
8
8
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
9
9
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
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 stripeStorePrefetchLandedCost, p as cartStoreNextStep, q as stripeStoreHandleInventoryCheck, r as stripeStoreConfirmPayment, u as stripeStoreReset, v 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 stripeStorePrefetchLandedCost, p as cartStoreNextStep, q as stripeStoreHandleInventoryCheck, r as stripeStoreConfirmPayment, u as stripeStoreReset, v as localizationStoreOnUpdate } from './cart-bc217300.js';
|
|
3
|
+
import { s as submitGtag, p as paypalInitScript } from './paypal-fa96e7c3.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-8fc9ceb2.js';
|
|
5
|
-
import { c as createCustomEvent, s as sendErrorLog, t as trackConversionEvent, g as getIsTestMode } from './sendErrorLog-
|
|
5
|
+
import { c as createCustomEvent, s as sendErrorLog, t as trackConversionEvent, g as getIsTestMode } from './sendErrorLog-c40b553a.js';
|
|
6
6
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
7
7
|
import { l as log, a as logError } from './logError-c456c092.js';
|
|
8
8
|
import { c as classes } from './classes-0d95c529.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { w as handleFetch, y as isValidSelector, j as stripeStore, z as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-
|
|
2
|
+
import { w as handleFetch, y as isValidSelector, j as stripeStore, z as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-bc217300.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-8fc9ceb2.js';
|
|
4
4
|
import { a as logError, l as log } from './logError-c456c092.js';
|
|
5
5
|
import './isDarkColor-3119e351.js';
|
|
@@ -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-bc217300.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-8fc9ceb2.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './logError-c456c092.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './cart-bc217300.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-8fc9ceb2.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-3119e351.js';
|
|
@@ -1818,7 +1818,7 @@ const ZonosCountrySelect = class {
|
|
|
1818
1818
|
componentDidRender() {
|
|
1819
1819
|
var _a, _b;
|
|
1820
1820
|
// focus the input on render
|
|
1821
|
-
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-
|
|
1821
|
+
(_b = (_a = this.ele.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.zonos--country-filter-input')) === null || _b === void 0 ? void 0 : _b.focus();
|
|
1822
1822
|
}
|
|
1823
1823
|
render() {
|
|
1824
1824
|
const { helloCountryList } = localizationStore;
|
|
@@ -1833,9 +1833,9 @@ const ZonosCountrySelect = class {
|
|
|
1833
1833
|
? fuseObject.map(country => country.item)
|
|
1834
1834
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
1835
1835
|
const isEmpty = !filteredCountries.length;
|
|
1836
|
-
return (h(Host, { key: '
|
|
1836
|
+
return (h(Host, { key: 'd6d6a0736660d0c6e76f749f8ea78a8c95825b88', class: "zonos--elements", style: {
|
|
1837
1837
|
'--font-family': zonosStoreFontFamily(),
|
|
1838
|
-
} }, h("div", { key: '
|
|
1838
|
+
} }, h("div", { key: '0bc3773965c49f0ee4da2056b6acc0ae361e227a', class: "zonos--country-select" }, h("zonos-v-stack", { key: '9e00877189dc39b789861c0425702d276cdad410', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '9c098afdf6db8ef8e18dc855e19ab6d45b7db8be', handleOnClose: () => this.handleOnClose(), label: translate('Select a country') }, h("input", { key: '10c59b07a42da02fb348e289dc0211ae33b96638', autocomplete: "off", autofocus: "autofocus", class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: translate('Search countries'), value: this.inputValue }))), h("div", { key: 'fec8fb874726377a3c4a03ac5d264fc7d8a94a21', class: "zonos--country-select-content" }, isEmpty && (h("zonos-text", { key: '182fb6955798519e63d63121752bc65ac6045770', class: "no-country", textColor: "gray-800" }, translate('No countries found'))), h("zonos-virtual-scroll", { key: '3ccda154b37344857595d65ce3131ca6d2610a11', class: "zonos--country-filter-content", fallbackItemHeight: 34, itemHeights: filteredCountries.map(() => 34), renderItem: index => {
|
|
1839
1839
|
const country = filteredCountries[index];
|
|
1840
1840
|
if (!country) {
|
|
1841
1841
|
return null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { t as translate, l as localizationStore, F as currencyFormat } from './cart-
|
|
2
|
+
import { t as translate, l as localizationStore, F as currencyFormat } from './cart-bc217300.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-8fc9ceb2.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|