@zonos/elements 1.3.75 → 1.3.76
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-6dd9e3cd.js → cart-307b8dc7.js} +23 -17
- package/dist/cjs/{createCustomEvent-4efb5ab7.js → createCustomEvent-8b7e430f.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{paypal-f0d2a8cf.js → paypal-f0e6424f.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
- package/dist/cjs/zonos-badge_13.cjs.entry.js +3 -3
- package/dist/cjs/zonos-checkout.cjs.entry.js +9 -6
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification_3.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +8 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +1 -1
- package/dist/collection/components/common/zonos-button/zonos-button.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +2 -2
- package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +2 -2
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +4 -4
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +2 -2
- package/dist/collection/components/main/zonos-controller.js +4 -4
- package/dist/collection/components/store/checkout/cart.js +4 -4
- package/dist/collection/components/store/checkout/stripe.js +6 -6
- package/dist/collection/components/store/hello/localization.js +11 -5
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +1 -1
- package/dist/collection/components/utils/checkout/{buildTranslateRequestBody.js → buildTranslateRequest.js} +2 -2
- package/dist/collection/types/checkout/api/CheckoutSession.js +1 -0
- package/dist/collection/types/checkout/api/Paypal.js +1 -0
- package/dist/collection/types/checkout/api/ValidateAddress.js +1 -0
- package/dist/collection/types/generated/{graphql.customer.types.js → graphql.internal.types.js} +8 -0
- package/dist/collection/types/index.js +8 -1
- package/dist/esm/{cart-66d17f99.js → cart-0345943b.js} +23 -17
- package/dist/esm/{createCustomEvent-4ac32a26.js → createCustomEvent-11fa43d2.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{paypal-3e2c7b41.js → paypal-7592a690.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +1 -1
- package/dist/esm/zonos-badge_13.entry.js +3 -3
- package/dist/esm/zonos-checkout.entry.js +9 -6
- package/dist/esm/zonos-controller.entry.js +3 -3
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-notification_3.entry.js +2 -2
- package/dist/esm-es5/{cart-66d17f99.js → cart-0345943b.js} +1 -1
- package/dist/esm-es5/{createCustomEvent-4ac32a26.js → createCustomEvent-11fa43d2.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-3e2c7b41.js → paypal-7592a690.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_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/scripts/index.d.ts +51 -50
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.d.ts +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +2 -2
- package/dist/types/components/common/zonos-button/zonos-button.d.ts +1 -1
- package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -1
- package/dist/types/components/common/zonos-country-flag/zonos-country-flag.d.ts +1 -1
- package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +1 -1
- package/dist/types/components/common/zonos-logo/zonos-logo.d.ts +1 -1
- package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +1 -1
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +1 -1
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +1 -1
- package/dist/types/components/main/zonos-controller.d.ts +1 -1
- package/dist/types/components/store/checkout/cart.d.ts +8 -8
- package/dist/types/components/store/checkout/paypal.d.ts +1 -1
- package/dist/types/components/store/checkout/stripe.d.ts +3 -15
- package/dist/types/components/store/hello/localization.d.ts +1 -1
- package/dist/types/components/store/zonosStore.d.ts +1 -1
- package/dist/types/components/utils/api/calculateLandedCost.d.ts +1 -1
- package/dist/types/components/utils/api/calculateLandedCostNormalized.d.ts +1 -1
- package/dist/types/components/utils/api/cartCalculateLandedCost.d.ts +1 -1
- package/dist/types/components/utils/api/checkItemRestrictions.d.ts +4 -13
- package/dist/types/components/utils/api/getInclusivePricing.d.ts +1 -1
- package/dist/types/components/utils/api/getShippingZones.d.ts +1 -1
- package/dist/types/components/utils/api/getZonosSettings.d.ts +1 -1
- package/dist/types/components/utils/api/paypalCaptureOrder.d.ts +3 -7
- package/dist/types/components/utils/api/paypalCreateOrder.d.ts +3 -6
- package/dist/types/components/utils/api/prepCalculateLandedCost.d.ts +1 -1
- package/dist/types/components/utils/api/trackConversionEvent.d.ts +1 -2
- package/dist/types/components/utils/api/triggerBuildLandedCost.d.ts +2 -2
- package/dist/types/components/utils/checkout/{buildTranslateRequestBody.d.ts → buildTranslateRequest.d.ts} +3 -3
- package/dist/types/components/utils/getBorderRadius.d.ts +1 -1
- package/dist/types/components/utils/hello/currencyConversion/currencyFormat.d.ts +1 -1
- package/dist/types/components/utils/hello/currencyConversion/getCurrencyCode.d.ts +1 -1
- package/dist/types/components/utils/hello/currencyConversion/numberFormat.d.ts +1 -1
- package/dist/types/components/utils/hello/detectItemRestrictions.d.ts +2 -2
- package/dist/types/components/utils/hello/initHello.d.ts +1 -1
- package/dist/types/components/utils/logging/sendLoadScriptLog.d.ts +2 -2
- package/dist/types/components.d.ts +2 -2
- package/dist/types/scripts/_zonosBase.d.ts +1 -1
- package/dist/types/scripts/cart/_setupCartData.d.ts +1 -1
- package/dist/types/styles/stripe/addressRuleStyle.d.ts +1 -1
- package/dist/types/styles/stripe/defaultVariable.d.ts +1 -1
- package/dist/types/types/ConversionEvent.d.ts +12 -0
- package/dist/types/types/ICountryJson.d.ts +1 -1
- package/dist/types/types/{LogErrorRequestBody.d.ts → LogError.d.ts} +1 -1
- package/dist/types/types/{LogLoadScriptRequestBody.d.ts → LogLoadScript.d.ts} +1 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +1 -1
- package/dist/types/types/checkout/TranslatedText.d.ts +1 -1
- package/dist/types/types/checkout/api/{CalculateLandedCostRequest.d.ts → CalculateLandedCost.d.ts} +12 -11
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +30 -0
- package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +1 -1
- package/dist/types/types/checkout/api/Paypal.d.ts +8 -0
- package/dist/types/types/checkout/api/{ValidateAddressRequest.d.ts → ValidateAddress.d.ts} +2 -2
- package/dist/types/types/generated/{graphql.customer.types.d.ts → graphql.internal.types.d.ts} +10 -0
- package/dist/types/types/generated/{graphql.customer.types.ts → graphql.internal.types.ts} +14 -0
- package/dist/types/types/hello/HelloConfig.d.ts +1 -1
- package/dist/types/types/hello/RestrictedItem.d.ts +10 -1
- package/dist/types/types/index.d.ts +8 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-31c8e3f2.entry.js +1 -0
- package/dist/zonos-elements/{p-3088517c.system.js → p-320e3627.system.js} +2 -2
- package/dist/zonos-elements/{p-0d719ad2.system.js → p-3b78b5db.system.js} +1 -1
- package/dist/zonos-elements/{p-325233e3.js → p-4e21f719.js} +2 -2
- package/dist/zonos-elements/{p-432a5555.system.entry.js → p-514b94ec.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6488e805.system.entry.js → p-54d31641.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-01a8ec15.system.entry.js → p-55020546.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ea340dbf.entry.js → p-70acd15f.entry.js} +1 -1
- package/dist/zonos-elements/{p-dbbf8d3e.system.js → p-71382e47.system.js} +1 -1
- package/dist/zonos-elements/{p-ffaef730.js → p-76b9668f.js} +1 -1
- package/dist/zonos-elements/{p-bc803391.system.entry.js → p-78abda17.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b6e58c30.js → p-8478f4ee.js} +1 -1
- package/dist/zonos-elements/{p-d0ae7ede.system.entry.js → p-85140605.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0a411ee0.system.entry.js → p-8915c7ff.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1b101d0f.entry.js → p-94d92a0b.entry.js} +1 -1
- package/dist/zonos-elements/{p-c86fa519.system.js → p-95c4785f.system.js} +1 -1
- package/dist/zonos-elements/{p-0819aa2d.system.entry.js → p-9a88fb19.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-882d2619.entry.js → p-a57f0556.entry.js} +1 -1
- package/dist/zonos-elements/{p-3ec5cfe1.entry.js → p-be6c49ec.entry.js} +1 -1
- package/dist/zonos-elements/{p-438ac9d0.entry.js → p-c6e90e75.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-b362e3c9.entry.js → p-cab296cc.entry.js} +1 -1
- package/dist/zonos-elements/{p-72345655.entry.js → p-cf61027a.entry.js} +1 -1
- package/dist/zonos-elements/{p-999c1c0b.entry.js → p-dc430b34.entry.js} +1 -1
- package/dist/zonos-elements/{p-bad47d15.system.entry.js → p-e3068a5f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ac3cd38e.system.entry.js → p-eacd1669.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a6223def.system.entry.js → p-f7965bc8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ea124e18.entry.js → p-f8cbd1b8.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-913efe84.entry.js +0 -1
- /package/dist/collection/types/{LogErrorRequestBody.js → ConversionEvent.js} +0 -0
- /package/dist/collection/types/{LogLoadScriptRequestBody.js → LogError.js} +0 -0
- /package/dist/collection/types/{checkout/api/CalculateLandedCostRequest.js → LogLoadScript.js} +0 -0
- /package/dist/collection/types/checkout/api/{ValidateAddressRequest.js → CalculateLandedCost.js} +0 -0
|
@@ -7844,11 +7844,17 @@ const getNewLocalization = async () => {
|
|
|
7844
7844
|
var _a;
|
|
7845
7845
|
handleFetch.log('get new localization store');
|
|
7846
7846
|
const { isDisabledCountry, isShippableCountry, selectedCountryCode } = localizationStore;
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7847
|
+
if (!window.Zonos.isLegacyCheckout) {
|
|
7848
|
+
// These requests are only needed for Hello, so we can skip them for legacy checkout
|
|
7849
|
+
localizationStore.countryLandedCost = await getCountryLandedCost(localizationStore.selectedCountryCode);
|
|
7850
|
+
localizationStore.inclusivePricing =
|
|
7851
|
+
((_a = (await getInclusivePricing(selectedCountryCode))) === null || _a === void 0 ? void 0 : _a.setting) || null;
|
|
7852
|
+
if (localizationStore.inclusivePricing) {
|
|
7853
|
+
handleFetch.log(`Inclusive price setting found for this country (${selectedCountryCode}) ${JSON.stringify(localizationStore.inclusivePricing, null, 2)}`);
|
|
7854
|
+
}
|
|
7855
|
+
}
|
|
7856
|
+
else {
|
|
7857
|
+
handleFetch.log('Skipping country landed cost and inclusive pricing requests, because this is a legacy checkout');
|
|
7852
7858
|
}
|
|
7853
7859
|
if (zonosStore.zonosStore.helloSettings.currencyBehavior === 'DISABLED' ||
|
|
7854
7860
|
!isShippableCountry ||
|
|
@@ -8027,7 +8033,7 @@ const getTranslatedAddress = ({ currentAddress, translatedAddress, }) => {
|
|
|
8027
8033
|
[currentAddress.value.firstName, currentAddress.value.lastName].join(' ');
|
|
8028
8034
|
return {
|
|
8029
8035
|
city: ((_a = translatedAddress.city) === null || _a === void 0 ? void 0 : _a[city]) || city,
|
|
8030
|
-
country,
|
|
8036
|
+
country: country,
|
|
8031
8037
|
line1: ((_b = translatedAddress.line1) === null || _b === void 0 ? void 0 : _b[line1]) || line1,
|
|
8032
8038
|
line2: ((_c = translatedAddress.line2) === null || _c === void 0 ? void 0 : _c[line2 || '']) || line2 || '',
|
|
8033
8039
|
name: ((_d = translatedAddress.name) === null || _d === void 0 ? void 0 : _d[name]) || name,
|
|
@@ -8316,9 +8322,9 @@ const getExcludeAddressFieldsObject = ({ address, invalidAdddressList, }) => {
|
|
|
8316
8322
|
* @param {StripeAddressEventData} params.stripeBillingAddressEventData - The Stripe event data for the billing address.
|
|
8317
8323
|
* @param {boolean} params.stripeShippingSameAsBilling - A flag indicating whether the shipping address is the same as the billing address.
|
|
8318
8324
|
*
|
|
8319
|
-
* @returns {
|
|
8325
|
+
* @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.
|
|
8320
8326
|
*/
|
|
8321
|
-
const
|
|
8327
|
+
const buildTranslateRequest = ({ addressInvalidCharactersList, billingAddressInvalidCharactersList, stripeAddressEventData, stripeBillingAddressEventData, stripeShippingSameAsBilling, }) => {
|
|
8322
8328
|
var _a, _b, _c, _d;
|
|
8323
8329
|
const isStripeAddressReady = !!(stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.complete);
|
|
8324
8330
|
const isStripeBillingAddressReady = stripeShippingSameAsBilling
|
|
@@ -8770,7 +8776,7 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
8770
8776
|
stripeStore.isFetchingSession = true;
|
|
8771
8777
|
const { errors, json } = await handleFetch.handleFetch('/api/zonos-elements/create-checkout-session', {
|
|
8772
8778
|
body: {
|
|
8773
|
-
|
|
8779
|
+
adjustmentsAmount: cartStore.adjustments.reduce((prev, adj) => prev + adj.amount, 0),
|
|
8774
8780
|
cartId: window.Zonos.cartId,
|
|
8775
8781
|
currency: ((_a = cartStore.items.find(Boolean)) === null || _a === void 0 ? void 0 : _a.currencyCode) || '',
|
|
8776
8782
|
itemsAmount: total,
|
|
@@ -8781,7 +8787,7 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
8781
8787
|
});
|
|
8782
8788
|
stripeStore.isFetchingSession = false;
|
|
8783
8789
|
if (errors.length || !json) {
|
|
8784
|
-
handleFetch.logError('Error
|
|
8790
|
+
handleFetch.logError('Error occured when creating checkout session', JSON.stringify(errors, null, 2));
|
|
8785
8791
|
return false;
|
|
8786
8792
|
}
|
|
8787
8793
|
const result = json.checkoutSessionCreate;
|
|
@@ -8796,12 +8802,12 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
8796
8802
|
/**
|
|
8797
8803
|
* Update checkout session. Use for updating amount with landed cost id, or update session when cart items change
|
|
8798
8804
|
*/
|
|
8799
|
-
const stripeStoreUpdateCheckoutSession = async ({
|
|
8805
|
+
const stripeStoreUpdateCheckoutSession = async ({ adjustmentsAmount, cartId, currency, id, itemsAmount, landedCostId, presentmentCountryCode, }) => {
|
|
8800
8806
|
// No need to set loading state here because this function will be called under the hood to update
|
|
8801
8807
|
// landed cost id for the section.
|
|
8802
8808
|
const { errors, json } = await handleFetch.handleFetch('/api/zonos-elements/update-checkout-session', {
|
|
8803
8809
|
body: {
|
|
8804
|
-
|
|
8810
|
+
adjustmentsAmount,
|
|
8805
8811
|
cartId,
|
|
8806
8812
|
currency,
|
|
8807
8813
|
id,
|
|
@@ -8880,7 +8886,7 @@ const buildTranslatedAddress = ({ currentAddress, translatedAddressResult, }) =>
|
|
|
8880
8886
|
*/
|
|
8881
8887
|
const stripeStoreTranslateAddressToLatin = async ({ addressInvalidCharactersList, billingAddressInvalidCharactersList, }) => {
|
|
8882
8888
|
var _a, _b, _c, _d;
|
|
8883
|
-
const requestBody =
|
|
8889
|
+
const requestBody = buildTranslateRequest({
|
|
8884
8890
|
addressInvalidCharactersList,
|
|
8885
8891
|
billingAddressInvalidCharactersList,
|
|
8886
8892
|
stripeAddressEventData: stripeStore.stripeAddressEventData,
|
|
@@ -9104,7 +9110,7 @@ const cartStoreSetCheckoutSession = (checkoutSession) => {
|
|
|
9104
9110
|
cartStore.externalConfirmationPageURL = externalConfirmationPageURL;
|
|
9105
9111
|
}
|
|
9106
9112
|
};
|
|
9107
|
-
const cartStoreReCalculateTotal = async ({
|
|
9113
|
+
const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency, itemsAmount, landedCostId, }) => {
|
|
9108
9114
|
if (landedCostId && cartStore.selectedLandedCost) {
|
|
9109
9115
|
// update cart total right away if we have landed cost id to avoid order total flickering
|
|
9110
9116
|
const subtotals = cartStore.selectedLandedCost.subtotals;
|
|
@@ -9117,7 +9123,7 @@ const cartStoreReCalculateTotal = async ({ adjustmentAmount, cartId, currency, i
|
|
|
9117
9123
|
return false;
|
|
9118
9124
|
}
|
|
9119
9125
|
const { errors, json } = await stripeStoreUpdateCheckoutSession({
|
|
9120
|
-
|
|
9126
|
+
adjustmentsAmount,
|
|
9121
9127
|
cartId,
|
|
9122
9128
|
currency,
|
|
9123
9129
|
id: cartStore.checkoutSessionId,
|
|
@@ -9171,7 +9177,7 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, lan
|
|
|
9171
9177
|
cartStore.isSelectedShippingGuarantee = isGuarantee;
|
|
9172
9178
|
// update session with selected landed cost
|
|
9173
9179
|
const updateCalculateStatus = await cartStoreReCalculateTotal({
|
|
9174
|
-
|
|
9180
|
+
adjustmentsAmount: cartStore.adjustmentTotal,
|
|
9175
9181
|
cartId: window.Zonos.cartId,
|
|
9176
9182
|
landedCostId: (_e = selectedLandedCost.landedCost) === null || _e === void 0 ? void 0 : _e.id,
|
|
9177
9183
|
});
|
|
@@ -9230,7 +9236,7 @@ const cartStoreUpdateItems = async ({ adjustments, cartItems, }) => {
|
|
|
9230
9236
|
// set loading state here because this is the first load checkout session when we already have checkout session id stored
|
|
9231
9237
|
stripeStore.isFetchingSession = true;
|
|
9232
9238
|
await cartStoreReCalculateTotal({
|
|
9233
|
-
|
|
9239
|
+
adjustmentsAmount: adjustmentTotal,
|
|
9234
9240
|
cartId: window.Zonos.cartId,
|
|
9235
9241
|
currency: currency,
|
|
9236
9242
|
itemsAmount: total,
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -97,7 +97,7 @@ const getZonosQaUrl = () => {
|
|
|
97
97
|
return null;
|
|
98
98
|
}
|
|
99
99
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
100
|
-
const cdnUrl = "https://v1.3.
|
|
100
|
+
const cdnUrl = "https://v1.3.76.js.zonos.com";
|
|
101
101
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
102
102
|
if (!qaUrl &&
|
|
103
103
|
(cdnUrl.includes('test.') ||
|
|
@@ -281,10 +281,10 @@ const zonosLoadUrl = (() => {
|
|
|
281
281
|
}
|
|
282
282
|
return null;
|
|
283
283
|
})();
|
|
284
|
-
const ZONOS_URL = "https://v1.3.
|
|
285
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
286
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
287
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
284
|
+
const ZONOS_URL = "https://v1.3.76.js.zonos.com";
|
|
285
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.76";
|
|
286
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.76";
|
|
287
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.76";
|
|
288
288
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
289
289
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
290
290
|
const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
|
|
@@ -299,7 +299,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
299
299
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
300
300
|
Zonos._paypalMockResponse = null;
|
|
301
301
|
Zonos.isBigCommerce = false;
|
|
302
|
-
Zonos.releaseDate = "
|
|
302
|
+
Zonos.releaseDate = "1728577765420";
|
|
303
303
|
Zonos.isLegacyCheckout = false;
|
|
304
304
|
/**
|
|
305
305
|
* By default, the package will load from npm
|
|
@@ -307,7 +307,7 @@ Zonos.isLegacyCheckout = false;
|
|
|
307
307
|
Zonos.isNpm = true;
|
|
308
308
|
Zonos.zonosQaUrl = null;
|
|
309
309
|
Zonos.zonosQaUrlApi = null;
|
|
310
|
-
Zonos.version = `v${"1.3.
|
|
310
|
+
Zonos.version = `v${"1.3.76"}`;
|
|
311
311
|
Zonos.modeAlerted = false;
|
|
312
312
|
Zonos.cartData = null;
|
|
313
313
|
Zonos.paypal = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
4
|
-
const cart = require('./cart-
|
|
4
|
+
const cart = require('./cart-307b8dc7.js');
|
|
5
5
|
const handleFetch = require('./handleFetch-661a8225.js');
|
|
6
6
|
const isDarkColor = require('./isDarkColor-5efc8367.js');
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-307b8dc7.js');
|
|
7
7
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
8
8
|
const handleFetch = require('./handleFetch-661a8225.js');
|
|
9
9
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const cart = require('./cart-
|
|
9
|
-
const paypal = require('./paypal-
|
|
10
|
-
const createCustomEvent = require('./createCustomEvent-
|
|
8
|
+
const cart = require('./cart-307b8dc7.js');
|
|
9
|
+
const paypal = require('./paypal-f0e6424f.js');
|
|
10
|
+
const createCustomEvent = require('./createCustomEvent-8b7e430f.js');
|
|
11
11
|
const getBorderRadius = require('./getBorderRadius-5a64574c.js');
|
|
12
12
|
const handleFetch = require('./handleFetch-661a8225.js');
|
|
13
13
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
6
|
+
const cart = require('./cart-307b8dc7.js');
|
|
7
|
+
const paypal = require('./paypal-f0e6424f.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
9
|
-
const createCustomEvent = require('./createCustomEvent-
|
|
9
|
+
const createCustomEvent = require('./createCustomEvent-8b7e430f.js');
|
|
10
10
|
const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
|
|
11
11
|
const handleFetch = require('./handleFetch-661a8225.js');
|
|
12
12
|
const classes = require('./classes-b7918f56.js');
|
|
@@ -421,7 +421,7 @@ const ZonosCheckout = class {
|
|
|
421
421
|
/**
|
|
422
422
|
* Set default address from query param if it's valid
|
|
423
423
|
*/
|
|
424
|
-
|
|
424
|
+
useLegacyQueryParams() {
|
|
425
425
|
const urlParams = new URLSearchParams(window.location.search);
|
|
426
426
|
const legacyShippingInfo = {
|
|
427
427
|
country:
|
|
@@ -490,7 +490,7 @@ const ZonosCheckout = class {
|
|
|
490
490
|
* When temp cart data is available, set default address if it exists
|
|
491
491
|
*/
|
|
492
492
|
if (window.Zonos) {
|
|
493
|
-
this.
|
|
493
|
+
this.useLegacyQueryParams();
|
|
494
494
|
}
|
|
495
495
|
// only initialize checkout if visitor's country is in the shipping zones.
|
|
496
496
|
const interval = setInterval(() => {
|
|
@@ -721,7 +721,10 @@ const ZonosCheckout = class {
|
|
|
721
721
|
};
|
|
722
722
|
const isTestMode = createCustomEvent.getIsTestMode();
|
|
723
723
|
const renderTopHeader = () => {
|
|
724
|
-
|
|
724
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
725
|
+
const zonosQaUrl = urlParams.get('zonosQaUrl');
|
|
726
|
+
const zonosDebug = urlParams.get('zonosDebug');
|
|
727
|
+
return (index.h("zonos-v-stack", null, index.h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (index.h("zonos-badge", { badgeColor: "orange", size: "small" }, cart.translate('Test mode'))), zonosDebug === '1' && (index.h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (index.h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl))), index.h("zonos-checkout-progress-tabs", { backgroundColor:
|
|
725
728
|
// only use different contrast color when the secondary color is too off with the background in mobile
|
|
726
729
|
this.isMobile ? '--zonos-elements-gray-0' : null }), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))));
|
|
727
730
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-307b8dc7.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
8
8
|
const handleFetch = require('./handleFetch-661a8225.js');
|
|
9
9
|
require('./isDarkColor-5efc8367.js');
|
|
@@ -237,7 +237,7 @@ const ZonosController = class {
|
|
|
237
237
|
// Try to use new settings first for legacy stores
|
|
238
238
|
return (((_a = json === null || json === void 0 ? void 0 : json.appearanceSettings) === null || _a === void 0 ? void 0 : _a.logoUrl) || ((_b = this.config.appearance) === null || _b === void 0 ? void 0 : _b.logoUrl));
|
|
239
239
|
}
|
|
240
|
-
//
|
|
240
|
+
// Otherwise respect override
|
|
241
241
|
return (_c = this.config.appearance) === null || _c === void 0 ? void 0 : _c.logoUrl;
|
|
242
242
|
};
|
|
243
243
|
// override subscription status
|
|
@@ -332,7 +332,7 @@ const ZonosController = class {
|
|
|
332
332
|
zonosStore.zonosStore.organizationName = organizationName;
|
|
333
333
|
}
|
|
334
334
|
render() {
|
|
335
|
-
return index.h(index.Host, { key: '
|
|
335
|
+
return index.h(index.Host, { key: 'c168f24dcc30dffd48c604f8888b093a7a3f1525', class: "zonos--elements" });
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
338
|
ZonosController.style = ZonosControllerStyle0;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-307b8dc7.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
require('./handleFetch-661a8225.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-307b8dc7.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
9
|
const isDarkColor = require('./isDarkColor-5efc8367.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-307b8dc7.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-307b8dc7.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const handleFetch = require('./handleFetch-661a8225.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-307b8dc7.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
9
|
require('./handleFetch-661a8225.js');
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const cart = require('./cart-
|
|
8
|
+
const cart = require('./cart-307b8dc7.js');
|
|
9
9
|
const handleFetch = require('./handleFetch-661a8225.js');
|
|
10
|
-
const paypal = require('./paypal-
|
|
10
|
+
const paypal = require('./paypal-f0e6424f.js');
|
|
11
11
|
require('./isDarkColor-5efc8367.js');
|
|
12
12
|
require('./getBorderRadius-5a64574c.js');
|
|
13
13
|
|
|
@@ -263,8 +263,8 @@ export class ZonosCheckoutFinish {
|
|
|
263
263
|
"references": {
|
|
264
264
|
"ElementsUiStyle": {
|
|
265
265
|
"location": "import",
|
|
266
|
-
"path": "src/types/generated/graphql.
|
|
267
|
-
"id": "src/types/generated/graphql.
|
|
266
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
267
|
+
"id": "src/types/generated/graphql.internal.types.ts::ElementsUiStyle"
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
},
|
|
@@ -79,8 +79,8 @@ export class ZonosCheckoutFooter {
|
|
|
79
79
|
"references": {
|
|
80
80
|
"ElementsUiTheme": {
|
|
81
81
|
"location": "import",
|
|
82
|
-
"path": "src/types/generated/graphql.
|
|
83
|
-
"id": "src/types/generated/graphql.
|
|
82
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
83
|
+
"id": "src/types/generated/graphql.internal.types.ts::ElementsUiTheme"
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
},
|
|
@@ -264,7 +264,7 @@ export class ZonosCheckout {
|
|
|
264
264
|
/**
|
|
265
265
|
* Set default address from query param if it's valid
|
|
266
266
|
*/
|
|
267
|
-
|
|
267
|
+
useLegacyQueryParams() {
|
|
268
268
|
const urlParams = new URLSearchParams(window.location.search);
|
|
269
269
|
const legacyShippingInfo = {
|
|
270
270
|
country:
|
|
@@ -333,7 +333,7 @@ export class ZonosCheckout {
|
|
|
333
333
|
* When temp cart data is available, set default address if it exists
|
|
334
334
|
*/
|
|
335
335
|
if (window.Zonos) {
|
|
336
|
-
this.
|
|
336
|
+
this.useLegacyQueryParams();
|
|
337
337
|
}
|
|
338
338
|
// only initialize checkout if visitor's country is in the shipping zones.
|
|
339
339
|
const interval = setInterval(() => {
|
|
@@ -564,7 +564,10 @@ export class ZonosCheckout {
|
|
|
564
564
|
};
|
|
565
565
|
const isTestMode = getIsTestMode();
|
|
566
566
|
const renderTopHeader = () => {
|
|
567
|
-
|
|
567
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
568
|
+
const zonosQaUrl = urlParams.get('zonosQaUrl');
|
|
569
|
+
const zonosDebug = urlParams.get('zonosDebug');
|
|
570
|
+
return (h("zonos-v-stack", null, h("div", { class: "zonos--logo-wrapper" }, renderLogo(), isTestMode && (h("zonos-badge", { badgeColor: "orange", size: "small" }, translate('Test mode'))), zonosDebug === '1' && (h("zonos-badge", { badgeColor: "cyan", size: "small" }, "debug")), zonosQaUrl && (h("zonos-badge", { badgeColor: "purple", size: "small" }, zonosQaUrl))), h("zonos-checkout-progress-tabs", { backgroundColor:
|
|
568
571
|
// only use different contrast color when the secondary color is too off with the background in mobile
|
|
569
572
|
this.isMobile ? '--zonos-elements-gray-0' : null }), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))));
|
|
570
573
|
};
|
|
@@ -829,8 +832,8 @@ export class ZonosCheckout {
|
|
|
829
832
|
},
|
|
830
833
|
"CheckoutSessionDetailsFragment": {
|
|
831
834
|
"location": "import",
|
|
832
|
-
"path": "src/types/generated/graphql.
|
|
833
|
-
"id": "src/types/generated/graphql.
|
|
835
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
836
|
+
"id": "src/types/generated/graphql.internal.types.ts::CheckoutSessionDetailsFragment"
|
|
834
837
|
}
|
|
835
838
|
},
|
|
836
839
|
"return": "Promise<void>"
|
|
@@ -5,7 +5,7 @@ import { zonosStore } from "../../../store/zonosStore";
|
|
|
5
5
|
import { isCheckoutMobile } from "../../../utils/checkout/isCheckoutMobile";
|
|
6
6
|
import { classes } from "../../../utils/classes";
|
|
7
7
|
import { currencyFormat } from "../../../utils/hello/currencyConversion/currencyFormat";
|
|
8
|
-
/** These assets
|
|
8
|
+
/** These assets need to be in relative path as https://www.npmjs.com/package/stencil-inline-svg suggested */
|
|
9
9
|
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
10
10
|
import ChevronDownIcon from "./assets/ChevronDownIcon.svg";
|
|
11
11
|
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
@@ -213,8 +213,8 @@ export class ZonosButton {
|
|
|
213
213
|
"references": {
|
|
214
214
|
"ElementsUiStyle": {
|
|
215
215
|
"location": "import",
|
|
216
|
-
"path": "src/types/generated/graphql.
|
|
217
|
-
"id": "src/types/generated/graphql.
|
|
216
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
217
|
+
"id": "src/types/generated/graphql.internal.types.ts::ElementsUiStyle"
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
},
|
|
@@ -473,8 +473,8 @@ export class ZonosButton {
|
|
|
473
473
|
"references": {
|
|
474
474
|
"ElementsUiTheme": {
|
|
475
475
|
"location": "import",
|
|
476
|
-
"path": "src/types/generated/graphql.
|
|
477
|
-
"id": "src/types/generated/graphql.
|
|
476
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
477
|
+
"id": "src/types/generated/graphql.internal.types.ts::ElementsUiTheme"
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
},
|
|
@@ -187,8 +187,8 @@ export class ZonosCheckbox {
|
|
|
187
187
|
"references": {
|
|
188
188
|
"ElementsUiStyle": {
|
|
189
189
|
"location": "import",
|
|
190
|
-
"path": "src/types/generated/graphql.
|
|
191
|
-
"id": "src/types/generated/graphql.
|
|
190
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
191
|
+
"id": "src/types/generated/graphql.internal.types.ts::ElementsUiStyle"
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
},
|
|
@@ -47,8 +47,8 @@ export class ZonosCountryFlag {
|
|
|
47
47
|
"references": {
|
|
48
48
|
"CountryCode": {
|
|
49
49
|
"location": "import",
|
|
50
|
-
"path": "src/types/generated/graphql.
|
|
51
|
-
"id": "src/types/generated/graphql.
|
|
50
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
51
|
+
"id": "src/types/generated/graphql.internal.types.ts::CountryCode"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
},
|
|
@@ -257,8 +257,8 @@ export class ZonosDialog {
|
|
|
257
257
|
"references": {
|
|
258
258
|
"ElementsUiStyle": {
|
|
259
259
|
"location": "import",
|
|
260
|
-
"path": "src/types/generated/graphql.
|
|
261
|
-
"id": "src/types/generated/graphql.
|
|
260
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
261
|
+
"id": "src/types/generated/graphql.internal.types.ts::ElementsUiStyle"
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
},
|
|
@@ -40,8 +40,8 @@ export class ZonosLogo {
|
|
|
40
40
|
"references": {
|
|
41
41
|
"ElementsUiTheme": {
|
|
42
42
|
"location": "import",
|
|
43
|
-
"path": "src/types/generated/graphql.
|
|
44
|
-
"id": "src/types/generated/graphql.
|
|
43
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
44
|
+
"id": "src/types/generated/graphql.internal.types.ts::ElementsUiTheme"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
},
|
package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js
CHANGED
|
@@ -115,8 +115,8 @@ export class ZonosShippingRichRadio {
|
|
|
115
115
|
"references": {
|
|
116
116
|
"ElementsUiStyle": {
|
|
117
117
|
"location": "import",
|
|
118
|
-
"path": "src/types/generated/graphql.
|
|
119
|
-
"id": "src/types/generated/graphql.
|
|
118
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
119
|
+
"id": "src/types/generated/graphql.internal.types.ts::ElementsUiStyle"
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
},
|
|
@@ -138,8 +138,8 @@ export class ZonosShippingRichRadio {
|
|
|
138
138
|
"references": {
|
|
139
139
|
"ElementsUiTheme": {
|
|
140
140
|
"location": "import",
|
|
141
|
-
"path": "src/types/generated/graphql.
|
|
142
|
-
"id": "src/types/generated/graphql.
|
|
141
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
142
|
+
"id": "src/types/generated/graphql.internal.types.ts::ElementsUiTheme"
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
},
|
|
@@ -409,8 +409,8 @@ export class ZonosHello {
|
|
|
409
409
|
"references": {
|
|
410
410
|
"HelloMobileLocation": {
|
|
411
411
|
"location": "import",
|
|
412
|
-
"path": "src/types/generated/graphql.
|
|
413
|
-
"id": "src/types/generated/graphql.
|
|
412
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
413
|
+
"id": "src/types/generated/graphql.internal.types.ts::HelloMobileLocation"
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
},
|
|
@@ -306,8 +306,8 @@ export class ZonosHelloDialog {
|
|
|
306
306
|
"references": {
|
|
307
307
|
"HelloMobileLocation": {
|
|
308
308
|
"location": "import",
|
|
309
|
-
"path": "src/types/generated/graphql.
|
|
310
|
-
"id": "src/types/generated/graphql.
|
|
309
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
310
|
+
"id": "src/types/generated/graphql.internal.types.ts::HelloMobileLocation"
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
},
|
|
@@ -109,7 +109,7 @@ export class ZonosController {
|
|
|
109
109
|
// Try to use new settings first for legacy stores
|
|
110
110
|
return (((_a = json === null || json === void 0 ? void 0 : json.appearanceSettings) === null || _a === void 0 ? void 0 : _a.logoUrl) || ((_b = this.config.appearance) === null || _b === void 0 ? void 0 : _b.logoUrl));
|
|
111
111
|
}
|
|
112
|
-
//
|
|
112
|
+
// Otherwise respect override
|
|
113
113
|
return (_c = this.config.appearance) === null || _c === void 0 ? void 0 : _c.logoUrl;
|
|
114
114
|
};
|
|
115
115
|
// override subscription status
|
|
@@ -204,7 +204,7 @@ export class ZonosController {
|
|
|
204
204
|
zonosStore.organizationName = organizationName;
|
|
205
205
|
}
|
|
206
206
|
render() {
|
|
207
|
-
return h(Host, { key: '
|
|
207
|
+
return h(Host, { key: 'c168f24dcc30dffd48c604f8888b093a7a3f1525', class: "zonos--elements" });
|
|
208
208
|
}
|
|
209
209
|
static get is() { return "zonos-controller"; }
|
|
210
210
|
static get encapsulation() { return "shadow"; }
|
|
@@ -429,8 +429,8 @@ export class ZonosController {
|
|
|
429
429
|
},
|
|
430
430
|
"CountryCode": {
|
|
431
431
|
"location": "import",
|
|
432
|
-
"path": "src/types/generated/graphql.
|
|
433
|
-
"id": "src/types/generated/graphql.
|
|
432
|
+
"path": "src/types/generated/graphql.internal.types",
|
|
433
|
+
"id": "src/types/generated/graphql.internal.types.ts::CountryCode"
|
|
434
434
|
}
|
|
435
435
|
},
|
|
436
436
|
"return": "Promise<void>"
|
|
@@ -162,7 +162,7 @@ const cartStoreSetCheckoutSession = (checkoutSession) => {
|
|
|
162
162
|
cartStore.externalConfirmationPageURL = externalConfirmationPageURL;
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
|
-
const cartStoreReCalculateTotal = async ({
|
|
165
|
+
const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency, itemsAmount, landedCostId, }) => {
|
|
166
166
|
if (landedCostId && cartStore.selectedLandedCost) {
|
|
167
167
|
// update cart total right away if we have landed cost id to avoid order total flickering
|
|
168
168
|
const subtotals = cartStore.selectedLandedCost.subtotals;
|
|
@@ -175,7 +175,7 @@ const cartStoreReCalculateTotal = async ({ adjustmentAmount, cartId, currency, i
|
|
|
175
175
|
return false;
|
|
176
176
|
}
|
|
177
177
|
const { errors, json } = await stripeStoreUpdateCheckoutSession({
|
|
178
|
-
|
|
178
|
+
adjustmentsAmount,
|
|
179
179
|
cartId,
|
|
180
180
|
currency,
|
|
181
181
|
id: cartStore.checkoutSessionId,
|
|
@@ -229,7 +229,7 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, lan
|
|
|
229
229
|
cartStore.isSelectedShippingGuarantee = isGuarantee;
|
|
230
230
|
// update session with selected landed cost
|
|
231
231
|
const updateCalculateStatus = await cartStoreReCalculateTotal({
|
|
232
|
-
|
|
232
|
+
adjustmentsAmount: cartStore.adjustmentTotal,
|
|
233
233
|
cartId: window.Zonos.cartId,
|
|
234
234
|
landedCostId: (_e = selectedLandedCost.landedCost) === null || _e === void 0 ? void 0 : _e.id,
|
|
235
235
|
});
|
|
@@ -288,7 +288,7 @@ const cartStoreUpdateItems = async ({ adjustments, cartItems, }) => {
|
|
|
288
288
|
// set loading state here because this is the first load checkout session when we already have checkout session id stored
|
|
289
289
|
stripeStore.isFetchingSession = true;
|
|
290
290
|
await cartStoreReCalculateTotal({
|
|
291
|
-
|
|
291
|
+
adjustmentsAmount: adjustmentTotal,
|
|
292
292
|
cartId: window.Zonos.cartId,
|
|
293
293
|
currency: currency,
|
|
294
294
|
itemsAmount: total,
|