@zonos/elements 1.3.214 → 1.3.216
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-e0b62259.js → cart-96520eab.js} +51 -22
- package/dist/cjs/{handleFetch-7cf3752e.js → handleFetch-b821ed5d.js} +2 -2
- package/dist/cjs/index.cjs.js +8 -8
- package/dist/cjs/{localization-91bcde0e.js → localization-e241e025.js} +1 -1
- package/dist/cjs/{paypal-93e5de01.js → paypal-97ac0999.js} +3 -3
- package/dist/cjs/{updateCheckoutSessionAttributes-047bc0cb.js → updateCheckoutSessionAttributes-5f794550.js} +1 -1
- package/dist/cjs/zonos-address_11.cjs.entry.js +25 -16
- package/dist/cjs/zonos-cart-items_14.cjs.entry.js +27 -19
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -5
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +25 -8
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +4 -4
- 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/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +6 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/zonosIconDark.svg +10 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/zonosIconLight.svg +10 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +6 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/zonosIconDark.svg +10 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/zonosIconLight.svg +10 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +5 -3
- package/dist/collection/components/store/checkout/stripe.js +6 -2
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +9 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +8 -4
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +13 -8
- package/dist/collection/components/utils/checkout/buildTranslateRequest.js +14 -10
- package/dist/collection/components/utils/extractName.js +17 -0
- package/dist/collection/components/utils/handleFetch.js +2 -2
- package/dist/esm/{cart-c3540cd7.js → cart-011aa510.js} +51 -23
- package/dist/esm/{handleFetch-dd74bbb1.js → handleFetch-bb221e63.js} +2 -2
- package/dist/esm/index.js +8 -8
- package/dist/esm/{localization-cf31c728.js → localization-b3bdf691.js} +1 -1
- package/dist/esm/{paypal-5963c1ab.js → paypal-8af04edf.js} +3 -3
- package/dist/esm/{updateCheckoutSessionAttributes-7babf0f2.js → updateCheckoutSessionAttributes-fa58ba66.js} +1 -1
- package/dist/esm/zonos-address_11.entry.js +25 -16
- package/dist/esm/zonos-cart-items_14.entry.js +27 -19
- package/dist/esm/zonos-checkout.entry.js +5 -5
- package/dist/esm/zonos-controller.entry.js +3 -3
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +25 -8
- package/dist/esm/zonos-empty-state-payment_4.entry.js +4 -4
- 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-es5/cart-011aa510.js +1 -0
- package/dist/esm-es5/{handleFetch-dd74bbb1.js → handleFetch-bb221e63.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{localization-cf31c728.js → localization-b3bdf691.js} +1 -1
- package/dist/esm-es5/{paypal-5963c1ab.js → paypal-8af04edf.js} +1 -1
- package/dist/esm-es5/{updateCheckoutSessionAttributes-7babf0f2.js → updateCheckoutSessionAttributes-fa58ba66.js} +1 -1
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_14.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-empty-state-payment_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/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/utils/extractName.d.ts +14 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-c34645cb.js → p-0627d793.js} +1 -1
- package/dist/zonos-elements/{p-6c69c5fa.system.entry.js → p-24043e4f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e72b61c1.system.entry.js → p-2fa8f2b8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-41ec9531.entry.js → p-3940f15d.entry.js} +1 -1
- package/dist/zonos-elements/p-48b2fbb7.entry.js +1 -0
- package/dist/zonos-elements/{p-ac784ab8.system.entry.js → p-4ec7abf7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6e8354c1.system.entry.js → p-4f2994f9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-547babdd.entry.js +1 -0
- package/dist/zonos-elements/{p-4444bb4e.system.js → p-54fd7799.system.js} +1 -1
- package/dist/zonos-elements/{p-755cf8bc.system.js → p-56a2d942.system.js} +1 -1
- package/dist/zonos-elements/{p-b22fcbda.system.entry.js → p-573b0565.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8d37bb03.entry.js → p-592cdd54.entry.js} +1 -1
- package/dist/zonos-elements/p-5a7130da.entry.js +1 -0
- package/dist/zonos-elements/p-62cb568d.system.entry.js +1 -0
- package/dist/zonos-elements/p-6cd4160d.system.js +1 -0
- package/dist/zonos-elements/{p-fb898c4f.system.js → p-801919e5.system.js} +1 -1
- package/dist/zonos-elements/p-8037d54c.entry.js +1 -0
- package/dist/zonos-elements/p-81b357f7.system.js +1 -1
- package/dist/zonos-elements/{p-1d0e40b7.entry.js → p-8cafb9a4.entry.js} +1 -1
- package/dist/zonos-elements/{p-a9b63cdb.system.js → p-9d717d8d.system.js} +1 -1
- package/dist/zonos-elements/{p-a1cd5572.system.entry.js → p-a3e6cf3e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a45a15a0.js → p-b6dfa589.js} +1 -1
- package/dist/zonos-elements/{p-137ee43a.system.entry.js → p-c4b7b1a4.system.entry.js} +1 -1
- package/dist/zonos-elements/p-cd62465e.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c8433f89.js → p-da079b20.js} +1 -1
- package/dist/zonos-elements/p-db07e61c.entry.js +1 -0
- package/dist/zonos-elements/{p-2eec2d7c.js → p-e4d475c3.js} +1 -1
- package/dist/zonos-elements/p-ef76be6f.system.js +1 -0
- package/dist/zonos-elements/p-f04bad33.system.entry.js +1 -0
- package/dist/zonos-elements/p-f08d180a.js +1 -0
- package/dist/zonos-elements/{p-752220fe.entry.js → p-f1ba6a31.entry.js} +1 -1
- package/dist/zonos-elements/{p-6a157c84.entry.js → p-f530cb04.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/zonosIcon.svg +0 -5
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/zonosIcon.svg +0 -5
- package/dist/esm-es5/cart-c3540cd7.js +0 -1
- package/dist/zonos-elements/p-003f37f4.entry.js +0 -1
- package/dist/zonos-elements/p-0707379c.entry.js +0 -1
- package/dist/zonos-elements/p-0fd105fa.system.entry.js +0 -1
- package/dist/zonos-elements/p-236643d0.system.entry.js +0 -1
- package/dist/zonos-elements/p-2820aff2.system.js +0 -1
- package/dist/zonos-elements/p-299efbcf.system.entry.js +0 -1
- package/dist/zonos-elements/p-6d7e45f3.entry.js +0 -1
- package/dist/zonos-elements/p-9004bdda.entry.js +0 -1
- package/dist/zonos-elements/p-adbc4643.system.js +0 -1
- package/dist/zonos-elements/p-aeae5a7f.entry.js +0 -1
- package/dist/zonos-elements/p-f979a131.js +0 -1
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
4
|
-
const localization = require('./localization-
|
|
5
|
-
const handleFetch = require('./handleFetch-
|
|
4
|
+
const localization = require('./localization-e241e025.js');
|
|
5
|
+
const handleFetch = require('./handleFetch-b821ed5d.js');
|
|
6
6
|
const isDarkColor = require('./isDarkColor-428965f4.js');
|
|
7
7
|
const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Extract first name and last name from the name string
|
|
11
|
+
* If first name and last name are provided, use them
|
|
12
|
+
* If name is provided, extract and return the first and last name from the name string
|
|
13
|
+
* If neither are provided, return an empty object
|
|
14
|
+
*/
|
|
15
|
+
const extractName = ({ firstName, lastName, name, }) => {
|
|
16
|
+
var _a;
|
|
17
|
+
if (!name && !firstName && !lastName) {
|
|
18
|
+
return { firstName: '', lastName: '' };
|
|
19
|
+
}
|
|
20
|
+
// Use first name and last name if they are provided
|
|
21
|
+
const nameParts = (name === null || name === void 0 ? void 0 : name.split(/\s+/)) || [];
|
|
22
|
+
const _firstName = (firstName === null || firstName === void 0 ? void 0 : firstName.trim()) || ((_a = nameParts[0]) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
23
|
+
const _lastName = (lastName === null || lastName === void 0 ? void 0 : lastName.trim()) || nameParts.slice(1).join(' ').trim() || '';
|
|
24
|
+
return { firstName: _firstName, lastName: _lastName };
|
|
25
|
+
};
|
|
26
|
+
|
|
9
27
|
/**
|
|
10
28
|
* Extract value from translated object
|
|
11
29
|
*/
|
|
@@ -45,14 +63,16 @@ const prepCartCalculateLandedCost = (cartId) => {
|
|
|
45
63
|
currentAddress: stripeAddressData,
|
|
46
64
|
translatedAddress: stripeStore.translatedAddress.address,
|
|
47
65
|
});
|
|
48
|
-
const shippingFirstName
|
|
49
|
-
|
|
66
|
+
const { firstName: shippingFirstName, lastName: shippingLastName } = extractName({
|
|
67
|
+
name: translatedShippingAddress.name,
|
|
68
|
+
});
|
|
50
69
|
const translatedBillingAddress = getTranslatedAddress({
|
|
51
70
|
currentAddress: stripeBillingAddressData,
|
|
52
71
|
translatedAddress: stripeStore.translatedAddress.address,
|
|
53
72
|
});
|
|
54
|
-
const billingFirstName
|
|
55
|
-
|
|
73
|
+
const { firstName: billingFirstName, lastName: billingLastName } = extractName({
|
|
74
|
+
name: translatedBillingAddress.name,
|
|
75
|
+
});
|
|
56
76
|
return {
|
|
57
77
|
billingAddress: {
|
|
58
78
|
addressLine1: translatedBillingAddress.line1,
|
|
@@ -122,14 +142,16 @@ const prepCalculateLandedCost = () => {
|
|
|
122
142
|
currentAddress: stripeAddressData,
|
|
123
143
|
translatedAddress: stripeStore.translatedAddress.address,
|
|
124
144
|
});
|
|
125
|
-
const shippingFirstName
|
|
126
|
-
|
|
145
|
+
const { firstName: shippingFirstName, lastName: shippingLastName } = extractName({
|
|
146
|
+
name: translatedShippingAddress.name,
|
|
147
|
+
});
|
|
127
148
|
const translatedBillingAddress = getTranslatedAddress({
|
|
128
149
|
currentAddress: stripeBillingAddressData,
|
|
129
150
|
translatedAddress: stripeStore.translatedAddress.address,
|
|
130
151
|
});
|
|
131
|
-
const billingFirstName
|
|
132
|
-
|
|
152
|
+
const { firstName: billingFirstName, lastName: billingLastName } = extractName({
|
|
153
|
+
name: translatedBillingAddress.name,
|
|
154
|
+
});
|
|
133
155
|
const convertedCartAdjuments = cartStore.adjustments.map(adjustment => ({
|
|
134
156
|
amount: adjustment.amount,
|
|
135
157
|
name: adjustment.description || null,
|
|
@@ -424,7 +446,6 @@ const getExcludeAddressFieldsObject = ({ address, invalidAdddressList, }) => {
|
|
|
424
446
|
* @returns {ValidateAddressRequest | null} - An object that contains the address fields that have invalid characters, the destination country, and the first and last name. If the conditions are not met, the function returns null.
|
|
425
447
|
*/
|
|
426
448
|
const buildTranslateRequest = ({ addressInvalidCharactersList, billingAddressInvalidCharactersList, stripeAddressEventData, stripeBillingAddressEventData, stripeShippingSameAsBilling, }) => {
|
|
427
|
-
var _a, _b, _c, _d;
|
|
428
449
|
const isStripeAddressReady = !!(stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.complete);
|
|
429
450
|
const isStripeBillingAddressReady = stripeShippingSameAsBilling
|
|
430
451
|
? isStripeAddressReady
|
|
@@ -440,15 +461,19 @@ const buildTranslateRequest = ({ addressInvalidCharactersList, billingAddressInv
|
|
|
440
461
|
const stripeAddressValue = stripeAddressEventData.value;
|
|
441
462
|
const stripeBillingAddressValue = (stripeBillingAddressEventData === null || stripeBillingAddressEventData === void 0 ? void 0 : stripeBillingAddressEventData.value) || null;
|
|
442
463
|
// Returns undefined if the name is Latin so it won't be included in the request body
|
|
443
|
-
const firstName
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
const
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
?
|
|
464
|
+
const { firstName: stripeShippingFirstName, lastName: stripeShippingLastName, } = extractName({
|
|
465
|
+
firstName: stripeAddressValue.firstName,
|
|
466
|
+
lastName: stripeAddressValue.lastName,
|
|
467
|
+
name: stripeAddressValue.name,
|
|
468
|
+
});
|
|
469
|
+
const name = `${stripeShippingFirstName} ${stripeShippingLastName}`;
|
|
470
|
+
const { firstName: stripeBillingFirstName, lastName: stripeBillingLastName } = extractName({
|
|
471
|
+
firstName: stripeBillingAddressValue === null || stripeBillingAddressValue === void 0 ? void 0 : stripeBillingAddressValue.firstName,
|
|
472
|
+
lastName: stripeBillingAddressValue === null || stripeBillingAddressValue === void 0 ? void 0 : stripeBillingAddressValue.lastName,
|
|
473
|
+
name: (stripeBillingAddressValue === null || stripeBillingAddressValue === void 0 ? void 0 : stripeBillingAddressValue.name) || '',
|
|
474
|
+
});
|
|
475
|
+
const billingName = stripeBillingFirstName && stripeBillingLastName
|
|
476
|
+
? `${stripeBillingFirstName} ${stripeBillingLastName}`
|
|
452
477
|
: '';
|
|
453
478
|
const address = stripeAddressValue.address;
|
|
454
479
|
const billingAddress = stripeBillingAddressValue === null || stripeBillingAddressValue === void 0 ? void 0 : stripeBillingAddressValue.address;
|
|
@@ -785,8 +810,11 @@ const checkIsAddressOutdatedForAsyncAddressUpdate = () => {
|
|
|
785
810
|
isCompanyNameDirty);
|
|
786
811
|
};
|
|
787
812
|
const buildAddressForPartyCreate = ({ address, firstName, lastName, name, phone, }) => {
|
|
788
|
-
const
|
|
789
|
-
|
|
813
|
+
const { firstName: _firstName, lastName: _lastName } = extractName({
|
|
814
|
+
firstName,
|
|
815
|
+
lastName,
|
|
816
|
+
name,
|
|
817
|
+
});
|
|
790
818
|
if (!_firstName || !_lastName) {
|
|
791
819
|
void handleFetch.sendErrorLog({
|
|
792
820
|
endpoint: 'PARTY_CREATE_NO_NAME_FOUND',
|
|
@@ -2163,6 +2191,7 @@ exports.cartStoreStartCheckoutInterval = cartStoreStartCheckoutInterval;
|
|
|
2163
2191
|
exports.cartStoreUpdateItems = cartStoreUpdateItems;
|
|
2164
2192
|
exports.cartStoreUpdateSelectedShippingOption = cartStoreUpdateSelectedShippingOption;
|
|
2165
2193
|
exports.cartStoreUpdateToErrorState = cartStoreUpdateToErrorState;
|
|
2194
|
+
exports.extractName = extractName;
|
|
2166
2195
|
exports.getCheckoutSessionBody = getCheckoutSessionBody;
|
|
2167
2196
|
exports.initStripeElements = initStripeElements;
|
|
2168
2197
|
exports.sortServiceLevelOptionsByAmount = sortServiceLevelOptionsByAmount;
|
|
@@ -433,9 +433,9 @@ const handleRequestWithFallback = async ({ basePathType: _basePathType, options,
|
|
|
433
433
|
(message.includes('signal is aborted') ||
|
|
434
434
|
message.includes('The operation was aborted') ||
|
|
435
435
|
message.includes('Fetch is aborted')));
|
|
436
|
-
const isUnknownError = !!unknownError || (response === null || response === void 0 ? void 0 : response.status) === 404;
|
|
436
|
+
const isUnknownError = !!unknownError || (response === null || response === void 0 ? void 0 : response.status) === 404 || (response === null || response === void 0 ? void 0 : response.status) === 500;
|
|
437
437
|
const shouldCallFallback =
|
|
438
|
-
// If next fallback is available, and the error is unknown (Failed to fetch) or 404
|
|
438
|
+
// If next fallback is available, and the error is unknown (Failed to fetch) or 404 or 500 (server error)
|
|
439
439
|
nextFallbackApiType && isUnknownError;
|
|
440
440
|
// Should log the error if it's unknown error
|
|
441
441
|
if (isUnknownError && !isAbortError) {
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
6
6
|
const getGenericSettingsOverride = require('./getGenericSettingsOverride-c0ca32b9.js');
|
|
7
|
-
const handleFetch = require('./handleFetch-
|
|
7
|
+
const handleFetch = require('./handleFetch-b821ed5d.js');
|
|
8
8
|
const CheckoutConfig = require('./CheckoutConfig-27c82f94.js');
|
|
9
9
|
const VarianceTest = require('./VarianceTest-0cb1e118.js');
|
|
10
10
|
const TaxId = require('./TaxId-12acedde.js');
|
|
@@ -132,7 +132,7 @@ const getZonosQaUrl = () => {
|
|
|
132
132
|
return null;
|
|
133
133
|
}
|
|
134
134
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
135
|
-
const cdnUrl = "https://v1.3.
|
|
135
|
+
const cdnUrl = "https://v1.3.216.js.zonos.com";
|
|
136
136
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
137
137
|
if (!qaUrl &&
|
|
138
138
|
(cdnUrl.includes('test.') ||
|
|
@@ -375,10 +375,10 @@ const zonosLoadUrl = (() => {
|
|
|
375
375
|
}
|
|
376
376
|
return null;
|
|
377
377
|
})();
|
|
378
|
-
const ZONOS_URL = "https://v1.3.
|
|
379
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
380
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
381
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
378
|
+
const ZONOS_URL = "https://v1.3.216.js.zonos.com";
|
|
379
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.216";
|
|
380
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.216";
|
|
381
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.216";
|
|
382
382
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
383
383
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
384
384
|
class Zonos {
|
|
@@ -396,7 +396,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
396
396
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
397
397
|
: null;
|
|
398
398
|
Zonos.isBigCommerce = false;
|
|
399
|
-
Zonos.releaseDate = "
|
|
399
|
+
Zonos.releaseDate = "1749769356368";
|
|
400
400
|
Zonos.isLegacyCheckout = false;
|
|
401
401
|
Zonos.domain = typeof window !== 'undefined'
|
|
402
402
|
? // domain that embeds the iframe
|
|
@@ -414,7 +414,7 @@ Zonos.isNpm = true;
|
|
|
414
414
|
Zonos.zonosQaUrl = null;
|
|
415
415
|
Zonos.zonosQaUrlApi = null;
|
|
416
416
|
Zonos.trackEventLogs = [];
|
|
417
|
-
Zonos.version = `v${"1.3.
|
|
417
|
+
Zonos.version = `v${"1.3.216"}`;
|
|
418
418
|
Zonos.modeAlerted = false;
|
|
419
419
|
Zonos.cartData = null;
|
|
420
420
|
Zonos.paypal = null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
4
|
-
const cart = require('./cart-
|
|
5
|
-
const localization = require('./localization-
|
|
6
|
-
const handleFetch = require('./handleFetch-
|
|
4
|
+
const cart = require('./cart-96520eab.js');
|
|
5
|
+
const localization = require('./localization-e241e025.js');
|
|
6
|
+
const handleFetch = require('./handleFetch-b821ed5d.js');
|
|
7
7
|
const isDarkColor = require('./isDarkColor-428965f4.js');
|
|
8
8
|
|
|
9
9
|
/*!
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const debounce = require('./debounce-465a4328.js');
|
|
4
|
-
const handleFetch = require('./handleFetch-
|
|
4
|
+
const handleFetch = require('./handleFetch-b821ed5d.js');
|
|
5
5
|
|
|
6
6
|
const attributesToUpdate = {};
|
|
7
7
|
// Store debounced functions per session to ensure proper debouncing
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
6
|
const debounce$1 = require('./debounce-465a4328.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
8
|
-
const cart = require('./cart-
|
|
9
|
-
const localization = require('./localization-
|
|
10
|
-
const handleFetch = require('./handleFetch-
|
|
8
|
+
const cart = require('./cart-96520eab.js');
|
|
9
|
+
const localization = require('./localization-e241e025.js');
|
|
10
|
+
const handleFetch = require('./handleFetch-b821ed5d.js');
|
|
11
11
|
const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-9b8a8de1.js');
|
|
12
12
|
const TaxId = require('./TaxId-12acedde.js');
|
|
13
13
|
const classes = require('./classes-b7918f56.js');
|
|
@@ -273,8 +273,14 @@ const ZonosAddress$1 = class {
|
|
|
273
273
|
}
|
|
274
274
|
}, 600);
|
|
275
275
|
}
|
|
276
|
+
const { firstName, lastName } = cart.extractName({
|
|
277
|
+
firstName: eventValue.firstName,
|
|
278
|
+
lastName: eventValue.lastName,
|
|
279
|
+
name: eventValue.name,
|
|
280
|
+
});
|
|
276
281
|
this.updateAddressEventData({
|
|
277
|
-
event: Object.assign(Object.assign({}, event), { elementMode: this.type, elementType: 'address', value: Object.assign(Object.assign({}, eventValue), { firstName
|
|
282
|
+
event: Object.assign(Object.assign({}, event), { elementMode: this.type, elementType: 'address', value: Object.assign(Object.assign({}, eventValue), { firstName,
|
|
283
|
+
lastName }) }),
|
|
278
284
|
type: this.type,
|
|
279
285
|
});
|
|
280
286
|
});
|
|
@@ -378,7 +384,7 @@ const ZonosAddress$1 = class {
|
|
|
378
384
|
this.isAddressFilled = true;
|
|
379
385
|
}
|
|
380
386
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
381
|
-
return (index.h(index.Host, { key: '
|
|
387
|
+
return (index.h(index.Host, { key: '13b9fdc214b7ffeacaa180f1ba0d49032b417b6f', class: "zonos--address zonos--elements" }, index.h("zonos-text", { key: '7a6ec3c462293e85926b0f379860d8d4edfe6120', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), this.renderTaxIdInput(), index.h("div", { key: '36c094186e6ce2ce1d1c4e8f56823fd032b3ad9e', class: "zonos--address-component" })));
|
|
382
388
|
}
|
|
383
389
|
get el() { return index.getElement(this); }
|
|
384
390
|
static get watchers() { return {
|
|
@@ -443,18 +449,18 @@ const ZonosAddressForm = class {
|
|
|
443
449
|
}
|
|
444
450
|
render() {
|
|
445
451
|
const { city, country, line1, line2, name, phone, postal_code, state } = this.localAddress;
|
|
446
|
-
const firstName =
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
return (index.h(index.Host, { key: '
|
|
452
|
+
const { firstName, lastName } = cart.extractName({
|
|
453
|
+
name,
|
|
454
|
+
});
|
|
455
|
+
return (index.h(index.Host, { key: '22d085e462e69a4100a8cb1763367f53b933ed1d', class: "zonos--address-form zonos--elements" }, index.h("div", { key: '17d6c92370343ffbd1b4a85b3c49055a5a7f9d72', class: "zonos--title" }, index.h("zonos-text", { key: 'a4cb01bd8fed154567e0b7ade87777a1552ea815', textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
|
|
450
456
|
? localization.translate('Shipping')
|
|
451
|
-
: localization.translate('Billing'))), index.h("div", { key: '
|
|
457
|
+
: localization.translate('Billing'))), index.h("div", { key: '4a1dddabc011e465d295b5c2994fda3a2531c96e', class: "zonos--address-group" }, index.h("div", { key: '60df882b5717b2f557a5051f492b2c838f938cd9', class: "zonos--contact" }, index.h("zonos-text", { key: '90b6613ccf1b2a445baae5f700f392d195924688', type: "label" }, localization.translate('Contact')), index.h("zonos-input", { key: '125815769a366e113b61d5581578ef6ecbdffa79', class: "zonos--form-email", inputLabel: localization.translate('Email'), inputValue: this.currentAddress.email, isDisabled: true }), index.h("div", { key: 'd0d331fb33f40243ce23824db5ba9551fd5636f8', class: "zonos--name zonos--address-row" }, index.h("zonos-input", { key: '46323db8f305e491215df03ef2092e76eec38355', class: "zonos--form-first-name", inputLabel: localization.translate('First name'), inputValue: firstName, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(firstName), onInputChange: e => this.onInputChange({
|
|
452
458
|
key: 'name',
|
|
453
459
|
value: `${e.detail} ${lastName}`,
|
|
454
|
-
}) }), index.h("zonos-input", { key: '
|
|
460
|
+
}) }), index.h("zonos-input", { key: '3c055ee2f1fcaf93ebcbd8f11ad6609cd33e9e14', class: "zonos--form-last-name", inputLabel: localization.translate('Last name'), inputValue: lastName, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(lastName), onInputChange: e => this.onInputChange({
|
|
455
461
|
key: 'name',
|
|
456
462
|
value: `${firstName} ${e.detail}`,
|
|
457
|
-
}) }))), index.h("div", { key: '
|
|
463
|
+
}) }))), index.h("div", { key: 'ce30f816d03b497eb4491d2554eb63c0aabf110c', class: "zonos--address" }, index.h("zonos-text", { key: '304867c5354ac55071c88944a63bba88ea3fb86f', type: "label" }, localization.translate('Address')), index.h("zonos-input", { key: 'f0efe937603a38761643af1486b53359a19593e5', class: "zonos--form-country", inputLabel: localization.translate('Country'), inputValue: country, isDisabled: true }), index.h("zonos-input", { key: '8360a4ae65c8963e886a3fb8322e0e539d121142', class: "zonos--form-line1", inputLabel: localization.translate('Address line 1'), inputValue: line1, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(line1), onInputChange: e => this.onInputChange({ key: 'line1', value: e.detail }) }), index.h("zonos-input", { key: '2c9374917b705c2c9306d3d4d7fc4b4043c2b73b', class: "zonos--form-line2", inputLabel: localization.translate('Address line 2'), inputValue: line2, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(line2), onInputChange: e => this.onInputChange({ key: 'line2', value: e.detail }) }), index.h("div", { key: 'fd067074070cadba3d895503f35c344ff817fec2', class: "zonos--address-row" }, index.h("zonos-input", { key: 'a565bee68e2498403df2801eb90005e8cb2d6f44', class: "zonos--form-city", inputLabel: localization.translate('City'), inputValue: city, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(city), onInputChange: e => this.onInputChange({ key: 'city', value: e.detail }) }), index.h("zonos-input", { key: '89bae75b691aacdd62b624f65eee303bfb3fc811', class: "zonos--form-state", inputLabel: localization.translate('State/Province'), inputValue: state, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(state), onInputChange: e => this.onInputChange({ key: 'state', value: e.detail }) })), index.h("zonos-input", { key: '9a851b9f449ed135859b7b828bf362168caf76fb', class: "zonos--form-postal-code", inputLabel: localization.translate('Postal code'), inputValue: postal_code, isError: shouldRenderTaxIdInput.isTextContainsNonLatinChars(postal_code), onInputChange: e => this.onInputChange({ key: 'postal_code', value: e.detail }) }), index.h("zonos-input", { key: 'a51b8ba1e22d5a12eac9021abe83fdc20f8eb1a6', class: "zonos--form-phone", inputLabel: localization.translate('Phone number'), inputValue: phone, onInputChange: e => this.onInputChange({ key: 'phone', value: e.detail }) })))));
|
|
458
464
|
}
|
|
459
465
|
static get watchers() { return {
|
|
460
466
|
"translatedAddress": ["watchCurrentAddress"]
|
|
@@ -1254,14 +1260,17 @@ const ZonosAddress = class {
|
|
|
1254
1260
|
// Use data from default address if it's available
|
|
1255
1261
|
const firstDefaultAddress = this.defaultAddress[0];
|
|
1256
1262
|
if (firstDefaultAddress) {
|
|
1263
|
+
const { firstName, lastName } = cart.extractName({
|
|
1264
|
+
name: firstDefaultAddress.name,
|
|
1265
|
+
});
|
|
1257
1266
|
const countryCode = firstDefaultAddress.address.country ||
|
|
1258
1267
|
localization.localizationStore.selectedCountryCode ||
|
|
1259
1268
|
'US';
|
|
1260
1269
|
this.setFormValues({
|
|
1261
1270
|
city: firstDefaultAddress.address.city,
|
|
1262
1271
|
country: countryCode,
|
|
1263
|
-
firstName
|
|
1264
|
-
lastName
|
|
1272
|
+
firstName,
|
|
1273
|
+
lastName,
|
|
1265
1274
|
line1: firstDefaultAddress.address.line1,
|
|
1266
1275
|
line2: firstDefaultAddress.address.line2 || '',
|
|
1267
1276
|
phone: firstDefaultAddress.phone || '',
|
|
@@ -1729,10 +1738,10 @@ const ZonosAddress = class {
|
|
|
1729
1738
|
this.country = localization.localizationStore.selectedCountryCode;
|
|
1730
1739
|
}
|
|
1731
1740
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
1732
|
-
return (index.h(index.Host, { key: '
|
|
1741
|
+
return (index.h(index.Host, { key: '9e1d9e1ed3fca30876ba8310510873a5b10c6552', class: classes.classes([
|
|
1733
1742
|
'zonos--address zonos--elements',
|
|
1734
1743
|
`zonos--${this.type}-address`,
|
|
1735
|
-
]) }, index.h("zonos-text", { key: '
|
|
1744
|
+
]) }, index.h("zonos-text", { key: '2356d42946b3ed93c4670fb876101a1371ac5c14', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
|
|
1736
1745
|
}
|
|
1737
1746
|
get el() { return index.getElement(this); }
|
|
1738
1747
|
static get watchers() { return {
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const localization = require('./localization-
|
|
6
|
+
const cart = require('./cart-96520eab.js');
|
|
7
|
+
const localization = require('./localization-e241e025.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
10
|
-
const paypal = require('./paypal-
|
|
11
|
-
const handleFetch = require('./handleFetch-
|
|
10
|
+
const paypal = require('./paypal-97ac0999.js');
|
|
11
|
+
const handleFetch = require('./handleFetch-b821ed5d.js');
|
|
12
12
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
13
13
|
const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
|
|
14
14
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
15
15
|
const isDarkColor = require('./isDarkColor-428965f4.js');
|
|
16
16
|
const isColorVariable = require('./isColorVariable-525dbfa7.js');
|
|
17
|
-
const updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-
|
|
17
|
+
const updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-5f794550.js');
|
|
18
18
|
const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-9b8a8de1.js');
|
|
19
19
|
const TaxId = require('./TaxId-12acedde.js');
|
|
20
20
|
require('./VarianceTest-0cb1e118.js');
|
|
@@ -1507,7 +1507,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1507
1507
|
this.checkStripePaymentStatus = async () => {
|
|
1508
1508
|
const clientSecret = new URLSearchParams(window.location.search).get('payment_intent_client_secret') || cart.stripeStore.clientSecret;
|
|
1509
1509
|
if (clientSecret || this.storybookForceStatus) {
|
|
1510
|
-
const { error, messages,
|
|
1510
|
+
const { error, messages, status } = await cart.stripeStoreRetrievePayment({
|
|
1511
1511
|
clientSecret,
|
|
1512
1512
|
storybookForceStatus: this.storybookForceStatus,
|
|
1513
1513
|
});
|
|
@@ -1537,7 +1537,7 @@ const ZonosCheckoutFinish = class {
|
|
|
1537
1537
|
void handleFetch.sendErrorLog({
|
|
1538
1538
|
endpoint: 'Stripe payment failed',
|
|
1539
1539
|
errors: [
|
|
1540
|
-
`Payment intent "${
|
|
1540
|
+
`Payment intent "${clientSecret.split('_secret_')[0]}" status: ${status} - checkout session: ${localization.storageStore.checkoutSessionId}`,
|
|
1541
1541
|
],
|
|
1542
1542
|
metadata: {
|
|
1543
1543
|
allLogs: handleFetch.allLogs,
|
|
@@ -1657,11 +1657,11 @@ const ZonosCheckoutFinish = class {
|
|
|
1657
1657
|
}
|
|
1658
1658
|
render() {
|
|
1659
1659
|
const isTestMode = handleFetch.getIsTestMode();
|
|
1660
|
-
return (index.h(index.Host, { key: '
|
|
1660
|
+
return (index.h(index.Host, { key: '7b18913d8ebe7be5cbe9ee7d520b643c342c409d', class: "zonos--checkout-finish zonos--elements", style: {
|
|
1661
1661
|
'--zonos--border-radius': getBorderRadius.getBorderRadius({
|
|
1662
1662
|
overrideBorderStyle: this.borderRadius,
|
|
1663
1663
|
}),
|
|
1664
|
-
} }, !this.isLoading && (index.h("div", { key: '
|
|
1664
|
+
} }, !this.isLoading && (index.h("div", { key: 'afb522b8b3b769817c00312fc9c14b4c032873ca', class: "zonos--finish-details" }, index.h("div", { key: 'c8cd43bc5269f7f252abaeb25dc98929f52b89bb', class: "zonos--group" }, this.notificationType === 'success' ? (index.h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (index.h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), index.h("zonos-text", { key: '1a7ead411d64fc8edf2de0383049bfd60660a315', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), index.h("zonos-text", { key: '0c63714bbefc4e9beb1d2cf7414e5774bab4eabe', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (index.h(index.Fragment, null, message, index.h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (index.h("zonos-button", { key: '06304d9815e2199108dfcb3dade1494f17b76137',
|
|
1665
1665
|
// Only show loading spinner if it's not an error notification
|
|
1666
1666
|
loading: this.isWaitingToRedirect &&
|
|
1667
1667
|
this.notificationType !== 'error', onClick: () => {
|
|
@@ -1673,9 +1673,9 @@ const ZonosCheckoutFinish = class {
|
|
|
1673
1673
|
}
|
|
1674
1674
|
this.closeClickHandler();
|
|
1675
1675
|
}, size: "md", variant: "primary" }, localization.translate('Close'))), !window.Zonos.isLegacyCheckout &&
|
|
1676
|
-
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '
|
|
1676
|
+
this.shouldRenderKeepShoppingButton() && (index.h("zonos-button", { key: '9b809e21052fddb2149a2a1d0c22db4b10808403', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
|
|
1677
1677
|
cart.cartStore.step === 'finish' &&
|
|
1678
|
-
this.notificationType === 'success' && (index.h("div", { key: '
|
|
1678
|
+
this.notificationType === 'success' && (index.h("div", { key: '4a278c7c4270d265c61b6b36d20864c55e1b42f1', class: "zonos--finish-button-wrapper" }, index.h("zonos-button", { key: 'fd8a876a0c5b76edd3be2d9b28da9c3963aee714', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), index.h("zonos-button", { key: '7882981c1fe01ab6f78d8f84bcfc9aab94bffb74', onClick: () => {
|
|
1679
1679
|
const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
1680
1680
|
this.redirectToUrl(isZonosDashboard
|
|
1681
1681
|
? '/orders/all'
|
|
@@ -1691,10 +1691,15 @@ const Globe = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color
|
|
|
1691
1691
|
</svg>
|
|
1692
1692
|
`;
|
|
1693
1693
|
|
|
1694
|
-
const
|
|
1695
|
-
<path d="
|
|
1696
|
-
<path
|
|
1697
|
-
<path
|
|
1694
|
+
const ZonosIconDark = `<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1695
|
+
<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="white"/>
|
|
1696
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="white"/>
|
|
1697
|
+
<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="white"/>
|
|
1698
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="white"/>
|
|
1699
|
+
<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="white"/>
|
|
1700
|
+
<path d="M8.8 58C8.8 31.9322 29.9322 10.8 56 10.8C82.0678 10.8 103.2 31.9322 103.2 58C103.2 74.868 94.3524 89.6734 81.0342 98.022C80.6447 98.2662 80.1318 98.123 79.9175 97.7162L78.7941 95.5842C78.5971 95.2104 78.7255 94.7484 79.0825 94.5224C91.1684 86.8682 99.2 73.374 99.2 58C99.2 45.1582 93.5931 33.6223 84.7029 25.7135L83.8042 24.914C83.1429 24.3257 82.1296 24.3861 81.5428 25.0488L76.655 30.5694C76.3787 30.8815 75.9095 30.9282 75.5707 30.6852C70.0598 26.7304 63.2996 24.4 56 24.4C37.4432 24.4 22.4 39.4432 22.4 58C22.4 70.9369 29.7121 82.1614 40.4157 87.7744L41.4783 88.3315C42.2607 88.7419 43.2277 88.4403 43.6381 87.6579L47.1029 81.0544C47.2912 80.6954 47.7178 80.5354 48.1006 80.6688C50.5764 81.5315 53.2355 82 56 82C69.2548 82 80 71.2548 80 58C80 44.7452 69.2548 34 56 34H54.8C53.9163 34 53.2 34.7163 53.2 35.6V43.2143C53.2 43.5965 52.9289 43.923 52.5577 44.014C46.267 45.5571 41.6 51.2335 41.6 58C41.6 62.3276 43.5125 66.2118 46.529 68.8473C49.059 71.0578 52.3762 72.4 56 72.4C63.9529 72.4 70.4 65.9529 70.4 58C70.4 51.2335 65.733 45.5571 59.4423 44.014C59.0711 43.923 58.8 43.5965 58.8 43.2143V40.7431C58.8 40.2532 59.2372 39.8772 59.7171 39.9756C68.0973 41.6948 74.4 49.1114 74.4 58C74.4 68.162 66.162 76.4 56 76.4C52.9185 76.4 50.0216 75.6447 47.4764 74.3116L46.4142 73.7552C45.6318 73.3454 44.6653 73.6471 44.255 74.4292L41.0133 80.6075C40.7934 81.0267 40.2589 81.165 39.8722 80.8921C32.6864 75.8202 28 67.4556 28 58C28 42.536 40.536 30 56 30C63.1489 30 69.6662 32.6755 74.6156 37.0841L75.5144 37.8846C76.1757 38.4736 77.1895 38.4135 77.7765 37.7505L82.4362 32.4876C82.745 32.1388 83.2861 32.1262 83.6026 32.4681C89.8104 39.1755 93.6 48.1438 93.6 58C93.6 72.4821 85.4133 85.0566 73.4023 91.3398C68.2018 94.0603 62.2848 95.6 56 95.6C39.9975 95.6 26.3233 85.602 20.8962 71.502L20.467 70.3868C20.1505 69.5646 19.229 69.1529 18.4054 69.4659L11.7892 71.9802C11.3597 72.1434 10.8807 71.9123 10.7497 71.4719C9.48157 67.2056 8.8 62.6844 8.8 58Z" fill="white"/>
|
|
1701
|
+
<path d="M47.2 58C47.2 53.1399 51.1399 49.2 56 49.2C60.8601 49.2 64.8 53.1399 64.8 58C64.8 62.8601 60.8601 66.8 56 66.8C53.7822 66.8 51.7621 65.9832 50.2135 64.6302C48.3624 63.0129 47.2 60.6439 47.2 58Z" fill="white"/>
|
|
1702
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM73.8305 98.177C73.6343 97.8047 73.1837 97.6488 72.7961 97.8125C67.6303 99.9943 61.9532 101.2 56 101.2C38.8594 101.2 24.0562 91.2184 17.0752 76.7588C16.8924 76.3802 16.4515 76.1992 16.0585 76.3485L9.18358 78.9612C8.35959 79.2743 7.43754 78.862 7.12154 78.0391L6.69286 76.9227C4.43567 71.0446 3.2 64.6633 3.2 58C3.2 28.8394 26.8394 5.2 56 5.2C85.1606 5.2 108.8 28.8394 108.8 58C108.8 78.3323 97.3067 95.9756 80.4757 104.796L79.4152 105.352C78.6338 105.761 77.6683 105.461 77.257 104.68L73.8305 98.177Z" fill="white"/>
|
|
1698
1703
|
</svg>
|
|
1699
1704
|
`;
|
|
1700
1705
|
|
|
@@ -1730,10 +1735,10 @@ const ZonosCheckoutFooter = class {
|
|
|
1730
1735
|
const languageLabel = (_a = ILanguage.languages.find(x => x.code === localization.localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
|
|
1731
1736
|
// reverse color when on desktop. With the coversheet backdrop, the color should be white
|
|
1732
1737
|
const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-1000';
|
|
1733
|
-
return (index.h(index.Host, { key: '
|
|
1738
|
+
return (index.h(index.Host, { key: 'aa7fe5e0bb22626f590d93a6c8a52876523a2dfb', class: classes.classes(['zonos--elements', this.isMobile && 'mobile']) }, index.h("div", { key: '5fb0fc90649a06e324935484d0c5c1dba31d792c', class: "zonos--checkout-footer" }, index.h("div", { key: 'e34ac7fda1d9a13830276313e4a36a7840497d7e', class: "zonos--checkout-locale-wrapper" }, index.h("zonos-button", { key: '775156c9f331715768b1bf9c36970d0c7da02fd2', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: index.h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, languageLabel), index.h("div", { key: 'e2cc31362529661507811b9f5aa68586b3bf9ea5', class: classes.classes([
|
|
1734
1739
|
'zonos--checkout-footer-dialog',
|
|
1735
1740
|
this.showLanguageDialog && 'zonos--checkout-footer-dialog-open',
|
|
1736
|
-
]) }, index.h("zonos-language-select", { key: '
|
|
1741
|
+
]) }, index.h("zonos-language-select", { key: 'ad43b0a6bb947a69ea970485ee8d9afb5c8d1adb', handleOnClose: () => this.toggleLanguageDialog() }))), index.h("div", { key: 'c652833a9ce05beb22b9530003863ac0e5e9f8ea', class: "zonos--checkout-footer-icon-wrapper" }, index.h("a", { key: 'f2f8fb4ef070fe6a59a8b787e9e3e6237c2cc395', href: "https://zonos.com/docs/legal/zonos-privacy-policy", target: "_blank" }, index.h("zonos-text", { key: '50b8962317bfc01bc7edbbe4c51f58476ca3c4ec', textColor: colorDesktop }, "Privacy policy")), index.h("div", { key: '7b4b70f7c0bd4ae5f385d6738f844a795261b9b9', class: "zonos--checkout-footer-logo" }, index.h("zonos-text", { key: '8a4279a6584a376cb10e8da6b33d8006ac896d5b', textColor: colorDesktop }, "Powered by"), index.h("a", { key: '523a822b1c5b80bcb1d5dde2a7d9fce5fe476d20', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, index.h("zonos-icon", { key: '19753e93a7820765cf208916f53adebdcdf05cf9', autoHeight: true, content: ZonosIconDark, size: 108 })))))));
|
|
1737
1742
|
}
|
|
1738
1743
|
get el() { return index.getElement(this); }
|
|
1739
1744
|
static get watchers() { return {
|
|
@@ -2443,11 +2448,14 @@ const ZonosCustomerInfo = class {
|
|
|
2443
2448
|
if (!stripeEventDataObj || !submitDataByKey) {
|
|
2444
2449
|
return;
|
|
2445
2450
|
}
|
|
2451
|
+
const { firstName, lastName } = cart.extractName({
|
|
2452
|
+
name: submitDataByKey.name,
|
|
2453
|
+
});
|
|
2446
2454
|
const updateData = Object.assign(Object.assign({}, stripeEventDataObj), { complete: true, value: Object.assign(Object.assign({}, stripeEventDataObj === null || stripeEventDataObj === void 0 ? void 0 : stripeEventDataObj.value), { address: Object.assign(Object.assign({}, stripeEventDataObj === null || stripeEventDataObj === void 0 ? void 0 : stripeEventDataObj.value.address), { city: submitDataByKey.city ||
|
|
2447
2455
|
(stripeEventDataObj === null || stripeEventDataObj === void 0 ? void 0 : stripeEventDataObj.value.address.city) ||
|
|
2448
|
-
'', line1: submitDataByKey.line1, line2: submitDataByKey.line2, postal_code: submitDataByKey.postal_code, state: submitDataByKey.state }), firstName
|
|
2456
|
+
'', line1: submitDataByKey.line1, line2: submitDataByKey.line2, postal_code: submitDataByKey.postal_code, state: submitDataByKey.state }), firstName,
|
|
2449
2457
|
// get all the names after
|
|
2450
|
-
lastName
|
|
2458
|
+
lastName, name: submitDataByKey.name }) });
|
|
2451
2459
|
// overwrite the address object with the new data
|
|
2452
2460
|
if (type === 'shippingAddress') {
|
|
2453
2461
|
cart.stripeStore.stripeAddressEventData = updateData;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
8
|
-
const localization = require('./localization-
|
|
6
|
+
const cart = require('./cart-96520eab.js');
|
|
7
|
+
const paypal = require('./paypal-97ac0999.js');
|
|
8
|
+
const localization = require('./localization-e241e025.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
10
|
-
const handleFetch = require('./handleFetch-
|
|
11
|
-
const updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-
|
|
10
|
+
const handleFetch = require('./handleFetch-b821ed5d.js');
|
|
11
|
+
const updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-5f794550.js');
|
|
12
12
|
const CheckoutConfig = require('./CheckoutConfig-27c82f94.js');
|
|
13
13
|
const classes = require('./classes-b7918f56.js');
|
|
14
14
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const localization = require('./localization-
|
|
6
|
+
const cart = require('./cart-96520eab.js');
|
|
7
|
+
const localization = require('./localization-e241e025.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
9
9
|
const getGenericSettingsOverride = require('./getGenericSettingsOverride-c0ca32b9.js');
|
|
10
|
-
const handleFetch = require('./handleFetch-
|
|
10
|
+
const handleFetch = require('./handleFetch-b821ed5d.js');
|
|
11
11
|
require('./isDarkColor-428965f4.js');
|
|
12
12
|
require('./getBorderRadius-1b5e33cf.js');
|
|
13
13
|
require('./VarianceTest-0cb1e118.js');
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const localization = require('./localization-
|
|
6
|
+
const localization = require('./localization-e241e025.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-b821ed5d.js');
|
|
10
10
|
require('./VarianceTest-0cb1e118.js');
|
|
11
11
|
|
|
12
12
|
const zonosCountryFlagCss = ":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-inline-flexbox;display:inline-flex}:host .flag-container{position:relative;overflow:hidden;width:100%;height:100%}:host .flag-icon{position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-repeat:no-repeat;background-size:cover}";
|