@zonos/elements 1.3.127 → 1.3.129
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/{CheckoutConfig-8e3cdcb3.js → CheckoutConfig-62479cef.js} +1 -1
- package/dist/cjs/{cart-3bdaf092.js → cart-ba8cca00.js} +22 -3
- package/dist/cjs/{handleFetch-fa0ce321.js → handleFetch-a8dfb07c.js} +1 -1
- package/dist/cjs/index.cjs.js +15 -9
- package/dist/cjs/{paypal-2f48ab8d.js → paypal-441c3f79.js} +2 -2
- package/dist/cjs/zonos-address_7.cjs.entry.js +2 -2
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +6 -9
- package/dist/cjs/zonos-checkout.cjs.entry.js +7 -8
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +21 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +3 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +4 -4
- package/dist/collection/components/common/zonos-text/zonos-text.css +6 -6
- package/dist/collection/components/common/zonos-text/zonos-text.js +20 -2
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +1 -1
- package/dist/collection/components/store/checkout/stripe.js +17 -2
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +4 -0
- package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +0 -1
- package/dist/collection/components/utils/logging/sendErrorLog.js +1 -1
- package/dist/collection/scripts/_zonosBase.js +6 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +5 -0
- package/dist/collection/types/generated/graphql.internal.types.js +39 -0
- package/dist/esm/{CheckoutConfig-101b97e6.js → CheckoutConfig-5da839fa.js} +1 -1
- package/dist/esm/{cart-519f08e3.js → cart-01b5bf4a.js} +22 -3
- package/dist/esm/{handleFetch-da1a9c5d.js → handleFetch-40fc3562.js} +1 -1
- package/dist/esm/index.js +16 -10
- package/dist/esm/{paypal-d0a05eda.js → paypal-4c094b25.js} +2 -2
- package/dist/esm/zonos-address_7.entry.js +2 -2
- package/dist/esm/zonos-cart-items_13.entry.js +6 -9
- package/dist/esm/zonos-checkout.entry.js +7 -8
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +2 -2
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-notification_3.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +21 -3
- package/dist/esm-es5/{CheckoutConfig-101b97e6.js → CheckoutConfig-5da839fa.js} +1 -1
- package/dist/esm-es5/{cart-519f08e3.js → cart-01b5bf4a.js} +1 -1
- package/dist/esm-es5/handleFetch-40fc3562.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-d0a05eda.js → paypal-4c094b25.js} +1 -1
- package/dist/esm-es5/zonos-address_7.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.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/esm-es5/zonos-text.entry.js +1 -1
- package/dist/scripts/index.d.ts +13 -1
- 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/store/checkout/stripe.d.ts +1 -0
- package/dist/types/components/store/zonosStore.d.ts +7 -1
- package/dist/types/scripts/_zonosBase.d.ts +2 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +23 -0
- package/dist/types/types/generated/graphql.frontend.types.ts +33 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +44 -0
- package/dist/types/types/generated/graphql.internal.types.ts +57 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-eca920dc.system.entry.js → p-08948e65.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0cfb97ae.js +1 -0
- package/dist/zonos-elements/p-0e8613be.entry.js +1 -0
- package/dist/zonos-elements/{p-0cb426b8.entry.js → p-0f465aa6.entry.js} +1 -1
- package/dist/zonos-elements/{p-f962fc6a.system.entry.js → p-10aef679.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2db962f9.system.entry.js → p-17a5550a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-26172f0d.entry.js +1 -0
- package/dist/zonos-elements/{p-8df3d5d0.system.entry.js → p-2bb86f3d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2faa3104.system.entry.js +1 -0
- package/dist/zonos-elements/p-4d4ea5dc.system.entry.js +1 -0
- package/dist/zonos-elements/{p-ea8663b7.entry.js → p-55a3db7d.entry.js} +1 -1
- package/dist/zonos-elements/{p-f7d56ce5.system.js → p-582cdd52.system.js} +1 -1
- package/dist/zonos-elements/{p-d9dceba1.system.js → p-5e22a288.system.js} +1 -1
- package/dist/zonos-elements/{p-9833f37d.system.entry.js → p-5ee9685e.system.entry.js} +1 -1
- package/dist/zonos-elements/p-60b0025b.system.js +1 -0
- package/dist/zonos-elements/p-6305e92c.system.js +1 -0
- package/dist/zonos-elements/{p-3dbfe639.entry.js → p-700c5732.entry.js} +1 -1
- package/dist/zonos-elements/{p-e2cda105.system.entry.js → p-7312d038.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7c7feadb.system.entry.js +1 -0
- package/dist/zonos-elements/{p-167b7fa8.system.entry.js → p-8390f23d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d6f1b6fa.system.entry.js → p-8612f8d1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-723c9d4d.entry.js → p-91e111c4.entry.js} +1 -1
- package/dist/zonos-elements/{p-2402e12c.js → p-94146bc9.js} +1 -1
- package/dist/zonos-elements/p-9b0cbd91.entry.js +1 -0
- package/dist/zonos-elements/{p-f50f48da.entry.js → p-9d057d1d.entry.js} +1 -1
- package/dist/zonos-elements/{p-00ff4f4a.js → p-a9069f68.js} +1 -1
- package/dist/zonos-elements/{p-a3b195e9.js → p-b7cfbfc1.js} +1 -1
- package/dist/zonos-elements/p-c562de4a.entry.js +1 -0
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-abbfde44.system.js → p-c93c9524.system.js} +2 -2
- package/dist/zonos-elements/{p-76d03238.entry.js → p-ce391c90.entry.js} +1 -1
- package/dist/zonos-elements/{p-efffbaec.entry.js → p-d6f8309b.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/handleFetch-da1a9c5d.js +0 -1
- package/dist/zonos-elements/p-0fa85ff9.system.js +0 -1
- package/dist/zonos-elements/p-1ed1ce99.system.js +0 -1
- package/dist/zonos-elements/p-61380d53.system.entry.js +0 -1
- package/dist/zonos-elements/p-685e395e.entry.js +0 -1
- package/dist/zonos-elements/p-6a2bed3e.system.entry.js +0 -1
- package/dist/zonos-elements/p-7769b60c.js +0 -1
- package/dist/zonos-elements/p-a7eaa9ad.entry.js +0 -1
- package/dist/zonos-elements/p-bc9987f2.system.entry.js +0 -1
- package/dist/zonos-elements/p-bf2f9095.entry.js +0 -1
- package/dist/zonos-elements/p-cf7a5119.entry.js +0 -1
|
@@ -205,6 +205,7 @@ const stripeCalculateLandedCost = async () => {
|
|
|
205
205
|
};
|
|
206
206
|
const stripeStorePrefetchLandedCost = async (params) => {
|
|
207
207
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
208
|
+
const retries = (params === null || params === void 0 ? void 0 : params.retries) || 0;
|
|
208
209
|
const applyingPromocode = !!(params === null || params === void 0 ? void 0 : params.applyingPromocode);
|
|
209
210
|
const stripeAddressReady = !!((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
210
211
|
const stripeLinkReady = !!((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.complete);
|
|
@@ -224,7 +225,16 @@ const stripeStorePrefetchLandedCost = async (params) => {
|
|
|
224
225
|
!stripeBillingAddressReady) {
|
|
225
226
|
return;
|
|
226
227
|
}
|
|
227
|
-
|
|
228
|
+
// If there is retries, stop loading for a moment and then showing the spinner again (this is just so customer can see that checkout is doing something and not stuck)
|
|
229
|
+
if (retries) {
|
|
230
|
+
stripeStore.isFetchingLandedCost = false;
|
|
231
|
+
setTimeout(() => {
|
|
232
|
+
stripeStore.isFetchingLandedCost = true;
|
|
233
|
+
}, 300);
|
|
234
|
+
}
|
|
235
|
+
else {
|
|
236
|
+
stripeStore.isFetchingLandedCost = true;
|
|
237
|
+
}
|
|
228
238
|
if (stripeStore.stripeAddressEventData) {
|
|
229
239
|
stripeStore.stripeAddressUsedWhenFetchingLC = Object.assign({}, stripeStore.stripeAddressEventData);
|
|
230
240
|
}
|
|
@@ -263,9 +273,14 @@ const stripeStorePrefetchLandedCost = async (params) => {
|
|
|
263
273
|
if (err instanceof Error &&
|
|
264
274
|
err.message &&
|
|
265
275
|
!excludeErrors.includes(err.message)) {
|
|
276
|
+
if (retries < 1) {
|
|
277
|
+
// retry fetching landed cost one more time
|
|
278
|
+
await stripeStorePrefetchLandedCost(Object.assign(Object.assign({}, params), { retries: (retries || 0) + 1 }));
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
266
281
|
const shipToAddress = (_h = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _h === void 0 ? void 0 : _h.value;
|
|
267
282
|
void sendErrorLog({
|
|
268
|
-
endpoint:
|
|
283
|
+
endpoint: `Failed to fetch landed cost (${retries} retries)`,
|
|
269
284
|
errors: [err.message],
|
|
270
285
|
metadata: {
|
|
271
286
|
cartId: window.Zonos.cartId,
|
|
@@ -25,6 +25,7 @@ const getTranslatedAddress = ({ currentAddress, translatedAddress, }) => {
|
|
|
25
25
|
*/
|
|
26
26
|
export const prepCartCalculateLandedCost = (cartId) => {
|
|
27
27
|
var _a;
|
|
28
|
+
const isE2ETest = new URLSearchParams(window.location.search).get('zonosE2ETest') === '1';
|
|
28
29
|
// maybe we don't need email now for prefetch the landed cost
|
|
29
30
|
const stripeLinkData = stripeStore.stripeLinkEventData;
|
|
30
31
|
const stripeAddressData = stripeStore.stripeAddressEventData;
|
|
@@ -75,6 +76,7 @@ export const prepCartCalculateLandedCost = (cartId) => {
|
|
|
75
76
|
lastName: shippingLastName,
|
|
76
77
|
phone: translatedShippingAddress.phone,
|
|
77
78
|
},
|
|
79
|
+
isTest: !!isE2ETest,
|
|
78
80
|
landedCostAdjustments: cartStore.promoCode
|
|
79
81
|
? [
|
|
80
82
|
{
|
|
@@ -97,6 +99,7 @@ export const prepCartCalculateLandedCost = (cartId) => {
|
|
|
97
99
|
};
|
|
98
100
|
};
|
|
99
101
|
export const prepCalculateLandedCost = () => {
|
|
102
|
+
const isE2ETest = new URLSearchParams(window.location.search).get('zonosE2ETest') === '1';
|
|
100
103
|
// maybe we don't need email now for prefetch the landed cost
|
|
101
104
|
const stripeLinkData = stripeStore.stripeLinkEventData;
|
|
102
105
|
const stripeAddressData = stripeStore.stripeAddressEventData;
|
|
@@ -157,6 +160,7 @@ export const prepCalculateLandedCost = () => {
|
|
|
157
160
|
lastName: shippingLastName,
|
|
158
161
|
phone: translatedShippingAddress.phone,
|
|
159
162
|
},
|
|
163
|
+
isTest: isE2ETest,
|
|
160
164
|
items: cartStore.items,
|
|
161
165
|
landedCostAdjustments: adjustments,
|
|
162
166
|
shippingAddress: {
|
|
@@ -23,7 +23,7 @@ export const sendErrorLog = async ({ endpoint, errors, metadata, shouldPostRelea
|
|
|
23
23
|
endpoint,
|
|
24
24
|
errors,
|
|
25
25
|
href: window.location.href,
|
|
26
|
-
metadata: Object.assign({ userAgent: userAgentData && userAgentData.brands.length > 0
|
|
26
|
+
metadata: Object.assign({ domain: window.Zonos.domain, userAgent: userAgentData && userAgentData.brands.length > 0
|
|
27
27
|
? userAgentData
|
|
28
28
|
: window.navigator.userAgent }, metadata),
|
|
29
29
|
};
|
|
@@ -44,6 +44,12 @@ Zonos._paypalMockResponse = null;
|
|
|
44
44
|
Zonos.isBigCommerce = false;
|
|
45
45
|
Zonos.releaseDate = process.env.NEXT_PUBLIC_RELEASE_DATE;
|
|
46
46
|
Zonos.isLegacyCheckout = false;
|
|
47
|
+
Zonos.domain = typeof window !== 'undefined'
|
|
48
|
+
? // domain that embeds the iframe
|
|
49
|
+
(window.location != window.parent.location && document.referrer) ||
|
|
50
|
+
// current domain
|
|
51
|
+
document.location.hostname
|
|
52
|
+
: '';
|
|
47
53
|
Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
48
54
|
window.location.search.includes('zonosShowBaseForeign');
|
|
49
55
|
/**
|
|
@@ -29,6 +29,7 @@ export const featureAspectKeyEnum = {
|
|
|
29
29
|
NewPayoutReport: 'new_payout_report',
|
|
30
30
|
PageAuditor: 'page_auditor',
|
|
31
31
|
PromptExplorer: 'prompt_explorer',
|
|
32
|
+
SupportTicketSystem: 'support_ticket_system',
|
|
32
33
|
TeamAuditor: 'team_auditor',
|
|
33
34
|
};
|
|
34
35
|
export const featureAudienceNameEnum = {
|
|
@@ -54,6 +55,7 @@ export const featureAudienceNameEnum = {
|
|
|
54
55
|
PrincipalEngineer: 'principal_engineer',
|
|
55
56
|
ProServeHead: 'pro_serve_head',
|
|
56
57
|
ProductManager: 'product_manager',
|
|
58
|
+
SupportTicketMerchants: 'support_ticket_merchants',
|
|
57
59
|
TechLead: 'tech_lead',
|
|
58
60
|
};
|
|
59
61
|
export const graphHubCategoryLabelEnum = {
|
|
@@ -483,6 +485,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
483
485
|
deleteReserveOrders(variables, requestHeaders) {
|
|
484
486
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'deleteReserveOrders', 'mutation');
|
|
485
487
|
},
|
|
488
|
+
failToGetQuoteErrors(variables, requestHeaders) {
|
|
489
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'failToGetQuoteErrors', 'query');
|
|
490
|
+
},
|
|
486
491
|
getAudienceByAspectKey(variables, requestHeaders) {
|
|
487
492
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getAudienceByAspectKey', 'query');
|
|
488
493
|
},
|
|
@@ -1069,6 +1069,16 @@ export const customsDocumentType = {
|
|
|
1069
1069
|
Other: 'OTHER',
|
|
1070
1070
|
ProFormaInvoice: 'PRO_FORMA_INVOICE',
|
|
1071
1071
|
};
|
|
1072
|
+
export const customsItemValueSource = {
|
|
1073
|
+
ApiRequest: 'API_REQUEST',
|
|
1074
|
+
Catalog: 'CATALOG',
|
|
1075
|
+
Classify: 'CLASSIFY',
|
|
1076
|
+
ClassifyOnTheFly: 'CLASSIFY_ON_THE_FLY',
|
|
1077
|
+
Fallback: 'FALLBACK',
|
|
1078
|
+
Hybrid: 'HYBRID',
|
|
1079
|
+
OrganizationSetting: 'ORGANIZATION_SETTING',
|
|
1080
|
+
UserProvided: 'USER_PROVIDED',
|
|
1081
|
+
};
|
|
1072
1082
|
export const customsSpecAttributeType = {
|
|
1073
1083
|
AccountNumber: 'ACCOUNT_NUMBER',
|
|
1074
1084
|
B13A: 'B13A',
|
|
@@ -1514,6 +1524,7 @@ export const itemValueSource = {
|
|
|
1514
1524
|
ApiRequest: 'API_REQUEST',
|
|
1515
1525
|
Catalog: 'CATALOG',
|
|
1516
1526
|
Classify: 'CLASSIFY',
|
|
1527
|
+
ClassifyOnTheFly: 'CLASSIFY_ON_THE_FLY',
|
|
1517
1528
|
Fallback: 'FALLBACK',
|
|
1518
1529
|
Hybrid: 'HYBRID',
|
|
1519
1530
|
OrganizationSetting: 'ORGANIZATION_SETTING',
|
|
@@ -1751,6 +1762,12 @@ export const manualClassificationBulkJobStatus = {
|
|
|
1751
1762
|
ManuallyClassified: 'MANUALLY_CLASSIFIED',
|
|
1752
1763
|
Processing: 'PROCESSING',
|
|
1753
1764
|
};
|
|
1765
|
+
export const manualClassificationExportJobStatus = {
|
|
1766
|
+
Completed: 'COMPLETED',
|
|
1767
|
+
Error: 'ERROR',
|
|
1768
|
+
Initialized: 'INITIALIZED',
|
|
1769
|
+
Processing: 'PROCESSING',
|
|
1770
|
+
};
|
|
1754
1771
|
export const manualClassificationRequestCreateStatus = {
|
|
1755
1772
|
Created: 'CREATED',
|
|
1756
1773
|
Existing: 'EXISTING',
|
|
@@ -1939,6 +1956,28 @@ export const paypalMockResponse = {
|
|
|
1939
1956
|
InternalServerError: 'INTERNAL_SERVER_ERROR',
|
|
1940
1957
|
TransactionRefused: 'TRANSACTION_REFUSED',
|
|
1941
1958
|
};
|
|
1959
|
+
export const paypalOrderStatus = {
|
|
1960
|
+
Approved: 'APPROVED',
|
|
1961
|
+
Completed: 'COMPLETED',
|
|
1962
|
+
Created: 'CREATED',
|
|
1963
|
+
PayerActionRequired: 'PAYER_ACTION_REQUIRED',
|
|
1964
|
+
Saved: 'SAVED',
|
|
1965
|
+
Voided: 'VOIDED',
|
|
1966
|
+
};
|
|
1967
|
+
export const paypalPaymentStatus = {
|
|
1968
|
+
Completed: 'COMPLETED',
|
|
1969
|
+
Declined: 'DECLINED',
|
|
1970
|
+
Failed: 'FAILED',
|
|
1971
|
+
PartiallyRefunded: 'PARTIALLY_REFUNDED',
|
|
1972
|
+
Pending: 'PENDING',
|
|
1973
|
+
Refunded: 'REFUNDED',
|
|
1974
|
+
};
|
|
1975
|
+
export const paypalRefundStatus = {
|
|
1976
|
+
Cancelled: 'CANCELLED',
|
|
1977
|
+
Completed: 'COMPLETED',
|
|
1978
|
+
Failed: 'FAILED',
|
|
1979
|
+
Pending: 'PENDING',
|
|
1980
|
+
};
|
|
1942
1981
|
export const pddpAmountType = {
|
|
1943
1982
|
FlcTotalCost: 'FLC_TOTAL_COST',
|
|
1944
1983
|
InsuredValue: 'INSURED_VALUE',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as handleFetch, l as log, a as logError } from './handleFetch-
|
|
1
|
+
import { h as handleFetch, l as log, a as logError } from './handleFetch-40fc3562.js';
|
|
2
2
|
|
|
3
3
|
const getTempCartById = async ({ cartId, retries, }) => {
|
|
4
4
|
const urlParams = new URLSearchParams(window.location.search);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-6b5bd87c.js';
|
|
2
|
-
import { h as handleFetch, a as logError, l as log, f as fallbackApiList, s as sendErrorLog, j as jsonParse } from './handleFetch-
|
|
2
|
+
import { h as handleFetch, a as logError, l as log, f as fallbackApiList, s as sendErrorLog, j as jsonParse } from './handleFetch-40fc3562.js';
|
|
3
3
|
import { i as isDarkColor } from './isDarkColor-dc08fa26.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-008516a4.js';
|
|
5
5
|
|
|
@@ -9208,6 +9208,7 @@ const getTranslatedAddress = ({ currentAddress, translatedAddress, }) => {
|
|
|
9208
9208
|
*/
|
|
9209
9209
|
const prepCartCalculateLandedCost = (cartId) => {
|
|
9210
9210
|
var _a;
|
|
9211
|
+
const isE2ETest = new URLSearchParams(window.location.search).get('zonosE2ETest') === '1';
|
|
9211
9212
|
// maybe we don't need email now for prefetch the landed cost
|
|
9212
9213
|
const stripeLinkData = stripeStore.stripeLinkEventData;
|
|
9213
9214
|
const stripeAddressData = stripeStore.stripeAddressEventData;
|
|
@@ -9258,6 +9259,7 @@ const prepCartCalculateLandedCost = (cartId) => {
|
|
|
9258
9259
|
lastName: shippingLastName,
|
|
9259
9260
|
phone: translatedShippingAddress.phone,
|
|
9260
9261
|
},
|
|
9262
|
+
isTest: !!isE2ETest,
|
|
9261
9263
|
landedCostAdjustments: cartStore.promoCode
|
|
9262
9264
|
? [
|
|
9263
9265
|
{
|
|
@@ -9280,6 +9282,7 @@ const prepCartCalculateLandedCost = (cartId) => {
|
|
|
9280
9282
|
};
|
|
9281
9283
|
};
|
|
9282
9284
|
const prepCalculateLandedCost = () => {
|
|
9285
|
+
const isE2ETest = new URLSearchParams(window.location.search).get('zonosE2ETest') === '1';
|
|
9283
9286
|
// maybe we don't need email now for prefetch the landed cost
|
|
9284
9287
|
const stripeLinkData = stripeStore.stripeLinkEventData;
|
|
9285
9288
|
const stripeAddressData = stripeStore.stripeAddressEventData;
|
|
@@ -9340,6 +9343,7 @@ const prepCalculateLandedCost = () => {
|
|
|
9340
9343
|
lastName: shippingLastName,
|
|
9341
9344
|
phone: translatedShippingAddress.phone,
|
|
9342
9345
|
},
|
|
9346
|
+
isTest: isE2ETest,
|
|
9343
9347
|
items: cartStore.items,
|
|
9344
9348
|
landedCostAdjustments: adjustments,
|
|
9345
9349
|
shippingAddress: {
|
|
@@ -9858,6 +9862,7 @@ const stripeCalculateLandedCost = async () => {
|
|
|
9858
9862
|
};
|
|
9859
9863
|
const stripeStorePrefetchLandedCost = async (params) => {
|
|
9860
9864
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
9865
|
+
const retries = (params === null || params === void 0 ? void 0 : params.retries) || 0;
|
|
9861
9866
|
const applyingPromocode = !!(params === null || params === void 0 ? void 0 : params.applyingPromocode);
|
|
9862
9867
|
const stripeAddressReady = !!((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
9863
9868
|
const stripeLinkReady = !!((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.complete);
|
|
@@ -9877,7 +9882,16 @@ const stripeStorePrefetchLandedCost = async (params) => {
|
|
|
9877
9882
|
!stripeBillingAddressReady) {
|
|
9878
9883
|
return;
|
|
9879
9884
|
}
|
|
9880
|
-
|
|
9885
|
+
// If there is retries, stop loading for a moment and then showing the spinner again (this is just so customer can see that checkout is doing something and not stuck)
|
|
9886
|
+
if (retries) {
|
|
9887
|
+
stripeStore.isFetchingLandedCost = false;
|
|
9888
|
+
setTimeout(() => {
|
|
9889
|
+
stripeStore.isFetchingLandedCost = true;
|
|
9890
|
+
}, 300);
|
|
9891
|
+
}
|
|
9892
|
+
else {
|
|
9893
|
+
stripeStore.isFetchingLandedCost = true;
|
|
9894
|
+
}
|
|
9881
9895
|
if (stripeStore.stripeAddressEventData) {
|
|
9882
9896
|
stripeStore.stripeAddressUsedWhenFetchingLC = Object.assign({}, stripeStore.stripeAddressEventData);
|
|
9883
9897
|
}
|
|
@@ -9916,9 +9930,14 @@ const stripeStorePrefetchLandedCost = async (params) => {
|
|
|
9916
9930
|
if (err instanceof Error &&
|
|
9917
9931
|
err.message &&
|
|
9918
9932
|
!excludeErrors.includes(err.message)) {
|
|
9933
|
+
if (retries < 1) {
|
|
9934
|
+
// retry fetching landed cost one more time
|
|
9935
|
+
await stripeStorePrefetchLandedCost(Object.assign(Object.assign({}, params), { retries: (retries || 0) + 1 }));
|
|
9936
|
+
return;
|
|
9937
|
+
}
|
|
9919
9938
|
const shipToAddress = (_h = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _h === void 0 ? void 0 : _h.value;
|
|
9920
9939
|
void sendErrorLog({
|
|
9921
|
-
endpoint:
|
|
9940
|
+
endpoint: `Failed to fetch landed cost (${retries} retries)`,
|
|
9922
9941
|
errors: [err.message],
|
|
9923
9942
|
metadata: {
|
|
9924
9943
|
cartId: window.Zonos.cartId,
|
|
@@ -139,7 +139,7 @@ const sendErrorLog = async ({ endpoint, errors, metadata, shouldPostReleaseError
|
|
|
139
139
|
endpoint,
|
|
140
140
|
errors,
|
|
141
141
|
href: window.location.href,
|
|
142
|
-
metadata: Object.assign({ userAgent: userAgentData && userAgentData.brands.length > 0
|
|
142
|
+
metadata: Object.assign({ domain: window.Zonos.domain, userAgent: userAgentData && userAgentData.brands.length > 0
|
|
143
143
|
? userAgentData
|
|
144
144
|
: window.navigator.userAgent }, metadata),
|
|
145
145
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as log, a as logError } from './handleFetch-
|
|
2
|
-
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-
|
|
3
|
-
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-
|
|
1
|
+
import { l as log, a as logError } from './handleFetch-40fc3562.js';
|
|
2
|
+
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-5da839fa.js';
|
|
3
|
+
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-5da839fa.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Get the load version and url based on the loadScriptSrc and version
|
|
@@ -94,7 +94,7 @@ const getZonosQaUrl = () => {
|
|
|
94
94
|
return null;
|
|
95
95
|
}
|
|
96
96
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
97
|
-
const cdnUrl = "https://v1.3.
|
|
97
|
+
const cdnUrl = "https://v1.3.129.js.zonos.com";
|
|
98
98
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
99
99
|
if (!qaUrl &&
|
|
100
100
|
(cdnUrl.includes('test.') ||
|
|
@@ -278,10 +278,10 @@ const zonosLoadUrl = (() => {
|
|
|
278
278
|
}
|
|
279
279
|
return null;
|
|
280
280
|
})();
|
|
281
|
-
const ZONOS_URL = "https://v1.3.
|
|
282
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
283
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
284
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
281
|
+
const ZONOS_URL = "https://v1.3.129.js.zonos.com";
|
|
282
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.129";
|
|
283
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.129";
|
|
284
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.129";
|
|
285
285
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
286
286
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
287
287
|
const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
|
|
@@ -296,8 +296,14 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
296
296
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
297
297
|
Zonos._paypalMockResponse = null;
|
|
298
298
|
Zonos.isBigCommerce = false;
|
|
299
|
-
Zonos.releaseDate = "
|
|
299
|
+
Zonos.releaseDate = "1731519234165";
|
|
300
300
|
Zonos.isLegacyCheckout = false;
|
|
301
|
+
Zonos.domain = typeof window !== 'undefined'
|
|
302
|
+
? // domain that embeds the iframe
|
|
303
|
+
(window.location != window.parent.location && document.referrer) ||
|
|
304
|
+
// current domain
|
|
305
|
+
document.location.hostname
|
|
306
|
+
: '';
|
|
301
307
|
Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
302
308
|
window.location.search.includes('zonosShowBaseForeign');
|
|
303
309
|
/**
|
|
@@ -306,7 +312,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
306
312
|
Zonos.isNpm = true;
|
|
307
313
|
Zonos.zonosQaUrl = null;
|
|
308
314
|
Zonos.zonosQaUrlApi = null;
|
|
309
|
-
Zonos.version = `v${"1.3.
|
|
315
|
+
Zonos.version = `v${"1.3.129"}`;
|
|
310
316
|
Zonos.modeAlerted = false;
|
|
311
317
|
Zonos.cartData = null;
|
|
312
318
|
Zonos.paypal = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-6b5bd87c.js';
|
|
2
|
-
import { d as cartStore, w as stripeStoreHandleInventoryCheck, p as translate, v as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-
|
|
3
|
-
import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-
|
|
2
|
+
import { d as cartStore, w as stripeStoreHandleInventoryCheck, p as translate, v as cartStoreNextStep, h as cartStoreClearCheckoutInterval } from './cart-01b5bf4a.js';
|
|
3
|
+
import { h as handleFetch, l as log, a as logError, j as jsonParse } from './handleFetch-40fc3562.js';
|
|
4
4
|
import { t as tinycolor } from './isDarkColor-dc08fa26.js';
|
|
5
5
|
|
|
6
6
|
/*!
|
|
@@ -1,7 +1,7 @@
|
|
|
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, S as getFallbackDefaultCountryCode, l as localizationStore, p as translate } from './cart-
|
|
2
|
+
import { j as stripeStore, S as getFallbackDefaultCountryCode, l as localizationStore, p as translate } from './cart-01b5bf4a.js';
|
|
3
3
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
4
|
-
import { a as logError, l as log } from './handleFetch-
|
|
4
|
+
import { a as logError, l as log } from './handleFetch-40fc3562.js';
|
|
5
5
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
6
6
|
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-6b5bd87c.js';
|
|
7
7
|
import { c as classes } from './classes-0d95c529.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
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, H as currencyFormat, p as translate, I as cartStoreHasOneEligibleItem, J as stripeStoreApplyPromoCode, K as stripeStoreRemovePromoCode, z as stripeStoreReset, j as stripeStore, L as stripeStoreRetrievePayment, t as trackConversionEvent, M as stripeStoreResetPromoCode, N as stripeStoreMessageBasedOnStatus, l as localizationStore, O as stripeStoreTranslateAddressToLatin, P as cartStoreUpdateSelectedShippingOption, Q as cartStoreGetShippingTransitInfo, R as sortServiceLevelOptionsByAmount } from './cart-
|
|
2
|
+
import { d as cartStore, H as currencyFormat, p as translate, I as cartStoreHasOneEligibleItem, J as stripeStoreApplyPromoCode, K as stripeStoreRemovePromoCode, z as stripeStoreReset, j as stripeStore, L as stripeStoreRetrievePayment, t as trackConversionEvent, M as stripeStoreResetPromoCode, N as stripeStoreMessageBasedOnStatus, l as localizationStore, O as stripeStoreTranslateAddressToLatin, P as cartStoreUpdateSelectedShippingOption, Q as cartStoreGetShippingTransitInfo, R as sortServiceLevelOptionsByAmount } from './cart-01b5bf4a.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { s as submitGtag, b as paypalStore, c as paypalStoreReset, i as isContrastColor } from './paypal-
|
|
4
|
+
import { s as submitGtag, b as paypalStore, c as paypalStoreReset, i as isContrastColor } from './paypal-4c094b25.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-6b5bd87c.js';
|
|
6
6
|
import { c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-31a792d3.js';
|
|
7
7
|
import { g as getBorderRadius } from './getBorderRadius-008516a4.js';
|
|
8
|
-
import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, b as allLogs } from './handleFetch-
|
|
8
|
+
import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, b as allLogs } from './handleFetch-40fc3562.js';
|
|
9
9
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
10
10
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
11
11
|
import { i as isDarkColor, t as tinycolor } from './isDarkColor-dc08fa26.js';
|
|
@@ -1385,7 +1385,6 @@ const ZonosCheckoutFinish = class {
|
|
|
1385
1385
|
metadata: {
|
|
1386
1386
|
allLogs,
|
|
1387
1387
|
checkoutSessionId: cartStore.checkoutSessionId || '',
|
|
1388
|
-
domain: window.location.hostname,
|
|
1389
1388
|
orderId: order.id,
|
|
1390
1389
|
storeId: zonosStore.storeId,
|
|
1391
1390
|
},
|
|
@@ -1400,7 +1399,6 @@ const ZonosCheckoutFinish = class {
|
|
|
1400
1399
|
metadata: {
|
|
1401
1400
|
allLogs,
|
|
1402
1401
|
checkoutSessionId: cartStore.checkoutSessionId || '',
|
|
1403
|
-
domain: window.location.hostname,
|
|
1404
1402
|
orderId: order.id,
|
|
1405
1403
|
storeId: zonosStore.storeId,
|
|
1406
1404
|
},
|
|
@@ -1420,7 +1418,6 @@ const ZonosCheckoutFinish = class {
|
|
|
1420
1418
|
metadata: {
|
|
1421
1419
|
allLogs,
|
|
1422
1420
|
checkoutSessionId: cartStore.checkoutSessionId || '',
|
|
1423
|
-
domain: window.location.hostname,
|
|
1424
1421
|
storeId: zonosStore.storeId,
|
|
1425
1422
|
},
|
|
1426
1423
|
});
|
|
@@ -1562,12 +1559,12 @@ const ZonosCheckoutFinish = class {
|
|
|
1562
1559
|
}
|
|
1563
1560
|
render() {
|
|
1564
1561
|
const isTestMode = getIsTestMode();
|
|
1565
|
-
return (h(Host, { key: '
|
|
1562
|
+
return (h(Host, { key: '09ad6462aeafdfa1be8b0f0e34159aa74934b85c', class: "zonos--checkout-finish zonos--elements", style: {
|
|
1566
1563
|
'--zonos--border-radius': getBorderRadius({
|
|
1567
1564
|
overrideBorderStyle: this.borderRadius,
|
|
1568
1565
|
}),
|
|
1569
|
-
} }, !this.isLoading && (h("div", { key: '
|
|
1570
|
-
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '
|
|
1566
|
+
} }, !this.isLoading && (h("div", { key: '81df3ec5804d346938cd0052232446500805e5dd', class: "zonos--finish-details" }, h("div", { key: '49f0b91cd04f2f6e1291de3c542cec6ed1f3c0a9', 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: '398e803727b65d2dd7da40bb37e25702f69009d6', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: '75ee45470ceca25057259916c76dd227f62b7276', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), !window.Zonos.isLegacyCheckout &&
|
|
1567
|
+
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: 'cd792a9dd314e291d0957e0859e3b0e088cf1767', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode && cartStore.step === 'finish' && (h("div", { key: 'b54c583f058c23b2b5001179acac0c98780b1ded', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: '2405f70c3143725d51d6f6a5e5a440350aeb9b80', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: 'c977d79e45170cce70695006de1274ef7cc39df4', onClick: () => this.redirectToUrl(`/orders/all`), size: "lg", variant: "primary" }, "View order in Dashboard")))))));
|
|
1571
1568
|
}
|
|
1572
1569
|
static get assetsDirs() { return ["assets"]; }
|
|
1573
1570
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
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, t as trackConversionEvent, n as getCheckoutSessionBody, o as cartStoreUpdateToErrorState, p as translate, q as getZCountryUrlParam, r as cartStoreSetCheckoutSession, u as stripeStorePrefetchLandedCost, v as cartStoreNextStep, w as stripeStoreHandleInventoryCheck, x as stripeStoreConfirmPayment, y as stripeStoreHandleInventoryRefund, z as stripeStoreReset, A as localizationStoreOnUpdate } from './cart-
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a 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, t as trackConversionEvent, n as getCheckoutSessionBody, o as cartStoreUpdateToErrorState, p as translate, q as getZCountryUrlParam, r as cartStoreSetCheckoutSession, u as stripeStorePrefetchLandedCost, v as cartStoreNextStep, w as stripeStoreHandleInventoryCheck, x as stripeStoreConfirmPayment, y as stripeStoreHandleInventoryRefund, z as stripeStoreReset, A as localizationStoreOnUpdate } from './cart-01b5bf4a.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript } from './paypal-4c094b25.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-6b5bd87c.js';
|
|
5
|
-
import { h as handleFetch, l as log, a as logError, s as sendErrorLog, g as getElapsedTime, b as allLogs, j as jsonParse } from './handleFetch-
|
|
5
|
+
import { h as handleFetch, l as log, a as logError, s as sendErrorLog, g as getElapsedTime, b as allLogs, j as jsonParse } from './handleFetch-40fc3562.js';
|
|
6
6
|
import { c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-31a792d3.js';
|
|
7
7
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
8
8
|
import { c as classes } from './classes-0d95c529.js';
|
|
9
9
|
import { g as getBorderRadius } from './getBorderRadius-008516a4.js';
|
|
10
10
|
import { i as isDarkColor } from './isDarkColor-dc08fa26.js';
|
|
11
11
|
import { s as styles } from './styles-6fc2fad9.js';
|
|
12
|
-
import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-
|
|
12
|
+
import { s as setupCartData, d as domesticRedirectedBtnSelector, c as checkoutHiddenBtnSelector } from './CheckoutConfig-5da839fa.js';
|
|
13
13
|
import { R as RemoveIcon } from './RemoveIcon-9dc5dd1a.js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -151,7 +151,6 @@ const watchBigcommerceDomesticCheckout = ({ domesticRedirectedBtnSelector, onShi
|
|
|
151
151
|
JSON.stringify(Object.entries(shippingAddress)),
|
|
152
152
|
],
|
|
153
153
|
metadata: {
|
|
154
|
-
domain: window.location.hostname,
|
|
155
154
|
storeId: zonosStore.storeId,
|
|
156
155
|
},
|
|
157
156
|
});
|
|
@@ -600,12 +599,12 @@ const ZonosCheckout = class {
|
|
|
600
599
|
const postal_code = getParam('customerZip') || '';
|
|
601
600
|
const state = getParam('customerState') || '';
|
|
602
601
|
/**
|
|
603
|
-
* If one of the value is null, no need to preset the default address
|
|
602
|
+
* If one of the value is null, no need to preset the default address.
|
|
603
|
+
* City and state are optional (they are not always provided for example Puerto Rico)
|
|
604
604
|
**/
|
|
605
|
-
if (!line1 ||
|
|
605
|
+
if (!line1 || !name || !phone || !country) {
|
|
606
606
|
log('Missing required query params so it can not be prefilled', 'info', [
|
|
607
607
|
!line1 && 'line1',
|
|
608
|
-
!city && 'city',
|
|
609
608
|
!name && 'name',
|
|
610
609
|
!phone && 'phone',
|
|
611
610
|
!country && 'country',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { B as isValidSelector, j as stripeStore, C as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-
|
|
2
|
+
import { B as isValidSelector, j as stripeStore, C as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-01b5bf4a.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-6b5bd87c.js';
|
|
4
|
-
import { h as handleFetch, a as logError, l as log } from './handleFetch-
|
|
4
|
+
import { h as handleFetch, a as logError, l as log } from './handleFetch-40fc3562.js';
|
|
5
5
|
import './isDarkColor-dc08fa26.js';
|
|
6
6
|
import './getBorderRadius-008516a4.js';
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
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-01b5bf4a.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-6b5bd87c.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import './handleFetch-
|
|
5
|
+
import './handleFetch-40fc3562.js';
|
|
6
6
|
import './isDarkColor-dc08fa26.js';
|
|
7
7
|
import './getBorderRadius-008516a4.js';
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { a as localizationStoreUpdateSelectedCountryCode, p as translate, l as localizationStore } from './cart-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, p as translate, l as localizationStore } from './cart-01b5bf4a.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-6b5bd87c.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-dc08fa26.js';
|
|
6
6
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
7
|
-
import './handleFetch-
|
|
7
|
+
import './handleFetch-40fc3562.js';
|
|
8
8
|
import './getBorderRadius-008516a4.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { p as translate, l as localizationStore, H as currencyFormat } from './cart-
|
|
2
|
+
import { p as translate, l as localizationStore, H as currencyFormat } from './cart-01b5bf4a.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-6b5bd87c.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
|
-
import './handleFetch-
|
|
7
|
+
import './handleFetch-40fc3562.js';
|
|
8
8
|
import './isDarkColor-dc08fa26.js';
|
|
9
9
|
import './getBorderRadius-008516a4.js';
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-86b8247e.js';
|
|
2
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-6b5bd87c.js';
|
|
3
|
-
import { l as localizationStore, B as isValidSelector, p as translate, q as getZCountryUrlParam, D as setZCountryUrlParam, E as currencyDisplay, F as currencyConvertAndFormat, G as currencyConvert, H as currencyFormat } from './cart-
|
|
3
|
+
import { l as localizationStore, B as isValidSelector, p as translate, q as getZCountryUrlParam, D as setZCountryUrlParam, E as currencyDisplay, F as currencyConvertAndFormat, G as currencyConvert, H as currencyFormat } from './cart-01b5bf4a.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
|
-
import { h as handleFetch, a as logError, l as log } from './handleFetch-
|
|
5
|
+
import { h as handleFetch, a as logError, l as log } from './handleFetch-40fc3562.js';
|
|
6
6
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
|
|
7
7
|
import './isDarkColor-dc08fa26.js';
|
|
8
8
|
import './getBorderRadius-008516a4.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import { T as localizationStoreUpdateSelectedLocale, p as translate, l as localizationStore } from './cart-
|
|
2
|
+
import { T as localizationStoreUpdateSelectedLocale, p as translate, l as localizationStore } from './cart-01b5bf4a.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-6b5bd87c.js';
|
|
4
4
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
5
|
-
import './handleFetch-
|
|
5
|
+
import './handleFetch-40fc3562.js';
|
|
6
6
|
import './isDarkColor-dc08fa26.js';
|
|
7
7
|
import './getBorderRadius-008516a4.js';
|
|
8
8
|
|
|
@@ -2,9 +2,9 @@ import { r as registerInstance, h, H as Host, d as getElement, c as createEvent
|
|
|
2
2
|
import { d as zonosStoreFontFamily } from './zonosStore-6b5bd87c.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-008516a4.js';
|
|
5
|
-
import { j as stripeStore } from './cart-
|
|
6
|
-
import { a as logError, l as log } from './handleFetch-
|
|
7
|
-
import { d as paypalStoreInitButtons } from './paypal-
|
|
5
|
+
import { j as stripeStore } from './cart-01b5bf4a.js';
|
|
6
|
+
import { a as logError, l as log } from './handleFetch-40fc3562.js';
|
|
7
|
+
import { d as paypalStoreInitButtons } from './paypal-4c094b25.js';
|
|
8
8
|
import './isDarkColor-dc08fa26.js';
|
|
9
9
|
|
|
10
10
|
const zonosNotificationCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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:9999999999;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(--zonos--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)}";
|
|
@@ -104,7 +104,7 @@ const textOptions = {
|
|
|
104
104
|
},
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
const zonosTextCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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{color:var(--zonos--color)}:host(.zonos--text-size-3xl)>*,:host(.zonos--text-size-3xl){font-size:var(--zonos-elements-font-size-3xl)}:host(.zonos--text-size-2xl)>*,:host(.zonos--text-size-2xl){font-size:var(--zonos-elements-font-size-2xl)}:host(.zonos--text-size-xl)>*,:host(.zonos--text-size-xl){font-size:var(--zonos-elements-font-size-xl)}:host(.zonos--text-size-l)>*,:host(.zonos--text-size-l){font-size:var(--zonos-elements-font-size-l)}:host(.zonos--text-size-base)>*,:host(.zonos--text-size-base){font-size:var(--zonos--font-size-base, var(--zonos-elements-font-size-base))}:host(.zonos--text-size-s)>*,:host(.zonos--text-size-s){font-size:var(--zonos-elements-font-size-s)}:host(.zonos--text-size-xs)>*,:host(.zonos--text-size-xs){font-size:var(--zonos-elements-font-size-xs)}:host(.zonos--text-weight-900)>*,:host(.zonos--text-weight-900){font-weight:900}:host(.zonos--text-weight-700)>*,:host(.zonos--text-weight-700){font-weight:700}:host(.zonos--text-weight-600)>*,:host(.zonos--text-weight-600){font-weight:600}:host(.zonos--text-weight-500)>*,:host(.zonos--text-weight-500){font-weight:500}:host(.zonos--text-weight-400)>*,:host(.zonos--text-weight-400){font-weight:400}";
|
|
107
|
+
const zonosTextCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--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{color:var(--zonos--color)}:host(.zonos--text-size-3xl)>*,:host(.zonos--text-size-3xl){font-size:var(--zonos--font-size-3xl, var(--zonos-elements-font-size-3xl))}:host(.zonos--text-size-2xl)>*,:host(.zonos--text-size-2xl){font-size:var(--zonos--font-size-2xl, var(--zonos-elements-font-size-2xl))}:host(.zonos--text-size-xl)>*,:host(.zonos--text-size-xl){font-size:var(--zonos--font-size-xl, var(--zonos-elements-font-size-xl))}:host(.zonos--text-size-l)>*,:host(.zonos--text-size-l){font-size:var(--zonos--font-size-l, var(--zonos-elements-font-size-l))}:host(.zonos--text-size-base)>*,:host(.zonos--text-size-base){font-size:var(--zonos--font-size-base, var(--zonos-elements-font-size-base))}:host(.zonos--text-size-s)>*,:host(.zonos--text-size-s){font-size:var(--zonos--font-size-s, var(--zonos-elements-font-size-s))}:host(.zonos--text-size-xs)>*,:host(.zonos--text-size-xs){font-size:var(--zonos--font-size-xs, var(--zonos-elements-font-size-xs))}:host(.zonos--text-weight-900)>*,:host(.zonos--text-weight-900){font-weight:900}:host(.zonos--text-weight-700)>*,:host(.zonos--text-weight-700){font-weight:700}:host(.zonos--text-weight-600)>*,:host(.zonos--text-weight-600){font-weight:600}:host(.zonos--text-weight-500)>*,:host(.zonos--text-weight-500){font-weight:500}:host(.zonos--text-weight-400)>*,:host(.zonos--text-weight-400){font-weight:400}";
|
|
108
108
|
const ZonosTextStyle0 = zonosTextCss;
|
|
109
109
|
|
|
110
110
|
const ZonosText = class {
|
|
@@ -152,8 +152,26 @@ const ZonosText = class {
|
|
|
152
152
|
]), style: styles({
|
|
153
153
|
'--zonos--color': actualTextColor,
|
|
154
154
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
155
|
-
'--zonos--font-size-
|
|
156
|
-
? `${zonosStore.appearance.
|
|
155
|
+
'--zonos--font-size-2xl': zonosStore.appearance.fontSize2XL
|
|
156
|
+
? `${zonosStore.appearance.fontSize2XL}px`
|
|
157
|
+
: undefined,
|
|
158
|
+
'--zonos--font-size-3xl': zonosStore.appearance.fontSize3XL
|
|
159
|
+
? `${zonosStore.appearance.fontSize3XL}px`
|
|
160
|
+
: undefined,
|
|
161
|
+
'--zonos--font-size-base': zonosStore.appearance.fontSizeBase
|
|
162
|
+
? `${zonosStore.appearance.fontSizeBase}px`
|
|
163
|
+
: undefined,
|
|
164
|
+
'--zonos--font-size-l': zonosStore.appearance.fontSizeL
|
|
165
|
+
? `${zonosStore.appearance.fontSizeL}px`
|
|
166
|
+
: undefined,
|
|
167
|
+
'--zonos--font-size-s': zonosStore.appearance.fontSizeS
|
|
168
|
+
? `${zonosStore.appearance.fontSizeS}px`
|
|
169
|
+
: undefined,
|
|
170
|
+
'--zonos--font-size-xl': zonosStore.appearance.fontSizeXL
|
|
171
|
+
? `${zonosStore.appearance.fontSizeXL}px`
|
|
172
|
+
: undefined,
|
|
173
|
+
'--zonos--font-size-xs': zonosStore.appearance.fontSizeXS
|
|
174
|
+
? `${zonosStore.appearance.fontSizeXS}px`
|
|
157
175
|
: undefined,
|
|
158
176
|
}) }, renderText()));
|
|
159
177
|
}
|