@zonos/elements 1.3.81 → 1.3.83
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-97e693e4.js → cart-4de3faca.js} +798 -74
- package/dist/cjs/{createCustomEvent-777b3fa7.js → createCustomEvent-65331eae.js} +1 -3
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-16029169.js → paypal-370b3a10.js} +1 -1
- package/dist/cjs/{zonos-address_8.cjs.entry.js → zonos-address_7.cjs.entry.js} +9 -64
- package/dist/cjs/zonos-badge.cjs.entry.js +44 -0
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card.cjs.entry.js +4 -4
- package/dist/cjs/{zonos-badge_13.cjs.entry.js → zonos-cart-items_12.cjs.entry.js} +135 -80
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -5
- package/dist/cjs/zonos-collapse.cjs.entry.js +62 -0
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +9 -9
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +1 -11
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.css +10 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +89 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +5 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/assets/ChevronUpIcon.svg +23 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +55 -9
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +52 -12
- package/dist/collection/components/common/zonos-badge/assets/RemoveLineIcon.svg +3 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.css +3 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +43 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +8 -7
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +20 -27
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +45 -11
- package/dist/collection/components/store/checkout/stripe.js +119 -65
- package/dist/collection/components/store/translationStore/strings.arabic.js +30 -0
- package/dist/collection/components/store/translationStore/strings.base.js +30 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +30 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +30 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +30 -0
- package/dist/collection/components/store/translationStore/strings.french.js +30 -0
- package/dist/collection/components/store/translationStore/strings.german.js +30 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +30 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +30 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +30 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +30 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +30 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +30 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +30 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +30 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +30 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +30 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +30 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +30 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +30 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +22 -0
- package/dist/collection/components/utils/api/trackConversionEvent.js +0 -2
- package/dist/collection/components/utils/api/triggerBuildLandedCost.js +1 -0
- package/dist/collection/components/utils/checkout/{sortServiceLevelOptions.js → sortServiceLevelOptionsByAmount.js} +1 -1
- package/dist/collection/components/utils/hello/currencyConversion/currencyFormat.js +1 -1
- package/dist/esm/{cart-9bf6dece.js → cart-bdc45f59.js} +795 -75
- package/dist/esm/{createCustomEvent-a18e45a2.js → createCustomEvent-4db13122.js} +1 -3
- package/dist/esm/index.js +7 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-edab4cee.js → paypal-1b29d424.js} +1 -1
- package/dist/esm/{zonos-address_8.entry.js → zonos-address_7.entry.js} +10 -64
- package/dist/esm/zonos-badge.entry.js +40 -0
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card.entry.js +4 -4
- package/dist/esm/{zonos-badge_13.entry.js → zonos-cart-items_12.entry.js} +137 -81
- package/dist/esm/zonos-checkout.entry.js +5 -5
- package/dist/esm/zonos-collapse.entry.js +58 -0
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +9 -9
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +5 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-notification_3.entry.js +4 -4
- package/dist/esm/zonos-shipping-rich-radio.entry.js +1 -11
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/cart-bdc45f59.js +1 -0
- package/dist/esm-es5/{createCustomEvent-a18e45a2.js → createCustomEvent-4db13122.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-edab4cee.js → paypal-1b29d424.js} +1 -1
- package/dist/esm-es5/zonos-address_7.entry.js +1 -0
- package/dist/esm-es5/zonos-badge.entry.js +1 -0
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -0
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -0
- package/dist/esm-es5/zonos-component.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-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/scripts/index.d.ts +542 -494
- 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-cart-subtotal/zonos-cart-subtotal.d.ts +12 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +4 -1
- package/dist/types/components/common/zonos-badge/zonos-badge.d.ts +9 -0
- package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +2 -6
- package/dist/types/components/store/checkout/cart.d.ts +16 -7
- package/dist/types/components/store/checkout/stripe.d.ts +12 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +30 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +30 -0
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/triggerBuildLandedCost.d.ts +1 -0
- package/dist/types/components/utils/checkout/sortServiceLevelOptionsByAmount.d.ts +6 -0
- package/dist/types/components.d.ts +44 -8
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +2 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +12 -0
- package/dist/types/types/generated/graphql.internal.types.ts +9 -0
- package/dist/zonos-elements/assets/ChevronUpIcon.svg +23 -1
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-8cbbdd53.system.entry.js → p-00bb8221.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e468f85e.entry.js → p-017bf338.entry.js} +1 -1
- package/dist/zonos-elements/{p-1b8c8e0c.system.entry.js → p-01d11845.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0cc8c6a3.system.js +1 -0
- package/dist/zonos-elements/p-1a92ff9a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-92ba4082.system.entry.js → p-2140ccb4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8dae668f.system.entry.js → p-2183128a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1e4f7997.system.entry.js → p-22e81fee.system.entry.js} +1 -1
- package/dist/zonos-elements/p-278d61ed.js +1 -0
- package/dist/zonos-elements/p-2b60faf8.entry.js +1 -0
- package/dist/zonos-elements/p-2d2ff962.entry.js +1 -0
- package/dist/zonos-elements/{p-bc4a147d.entry.js → p-3347e142.entry.js} +1 -1
- package/dist/zonos-elements/{p-811ed9bf.system.entry.js → p-3457c5e8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2a47d2cc.system.entry.js → p-38886017.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-41f42a5c.entry.js → p-42636c5a.entry.js} +1 -1
- package/dist/zonos-elements/p-4abca0e9.system.entry.js +1 -0
- package/dist/zonos-elements/{p-e3cb74fd.system.js → p-4ec7afc5.system.js} +1 -1
- package/dist/zonos-elements/{p-25633055.entry.js → p-58832515.entry.js} +1 -1
- package/dist/zonos-elements/{p-19fc5e11.system.entry.js → p-5d186fc7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a2fedd1c.entry.js → p-5fb337a0.entry.js} +1 -1
- package/dist/zonos-elements/{p-f3fc05a8.entry.js → p-6a5d714a.entry.js} +1 -1
- package/dist/zonos-elements/{p-fca6f444.entry.js → p-6a83b682.entry.js} +1 -1
- package/dist/zonos-elements/{p-97f0d9d2.entry.js → p-6aa35f18.entry.js} +1 -1
- package/dist/zonos-elements/{p-a3200d5c.entry.js → p-771e2623.entry.js} +1 -1
- package/dist/zonos-elements/{p-7ca0622f.js → p-7cc5e325.js} +1 -1
- package/dist/zonos-elements/p-7f3aeb53.system.entry.js +1 -0
- package/dist/zonos-elements/p-844ec9f9.system.entry.js +1 -0
- package/dist/zonos-elements/p-9931bea7.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7be7bd28.entry.js → p-997c8f07.entry.js} +1 -1
- package/dist/zonos-elements/{p-fac38f60.entry.js → p-9b911f6f.entry.js} +1 -1
- package/dist/zonos-elements/{p-95f0ffd1.system.entry.js → p-9cfa3736.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-49478dba.system.js → p-a1fa0a1c.system.js} +1 -1
- package/dist/zonos-elements/{p-df4deb97.entry.js → p-a34f0674.entry.js} +1 -1
- package/dist/zonos-elements/{p-d26d827d.system.js → p-a6cff57f.system.js} +1 -1
- package/dist/zonos-elements/{p-a3e2592b.system.entry.js → p-ae7526a2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6de38759.entry.js → p-afad2fae.entry.js} +1 -1
- package/dist/zonos-elements/{p-264fbd27.entry.js → p-b0303b0e.entry.js} +1 -1
- package/dist/zonos-elements/{p-a033685e.system.entry.js → p-c2b7b670.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d775bd42.entry.js → p-c6350880.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/p-ce41cbde.js +1 -0
- package/dist/zonos-elements/p-cec3e1ed.entry.js +1 -0
- package/dist/zonos-elements/{p-ba05f1d6.system.entry.js → p-d621f462.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f7b5ae86.system.entry.js → p-e3df5ff6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f4765417.entry.js → p-e93b511f.entry.js} +1 -1
- package/dist/zonos-elements/{p-747eed39.entry.js → p-ea68ee1f.entry.js} +1 -1
- package/dist/zonos-elements/{p-51f8c3d5.system.entry.js → p-f1d043ad.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f1e452e1.entry.js +1 -0
- package/dist/zonos-elements/{p-de93cc65.system.entry.js → p-f68c38d8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d56f87ab.system.entry.js → p-f7bbdd0c.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-9bf6dece.js +0 -1
- package/dist/esm-es5/zonos-address_8.entry.js +0 -1
- package/dist/esm-es5/zonos-badge_13.entry.js +0 -1
- package/dist/types/components/utils/checkout/sortServiceLevelOptions.d.ts +0 -5
- package/dist/zonos-elements/p-214724f8.system.entry.js +0 -1
- package/dist/zonos-elements/p-23358611.js +0 -1
- package/dist/zonos-elements/p-62044821.system.js +0 -1
- package/dist/zonos-elements/p-6b4fec5a.js +0 -1
- package/dist/zonos-elements/p-6f821997.entry.js +0 -1
- package/dist/zonos-elements/p-a1c5c1a2.entry.js +0 -1
- package/dist/zonos-elements/p-d08ed3ea.system.entry.js +0 -1
- package/dist/zonos-elements/p-f4667002.system.entry.js +0 -1
|
@@ -13,7 +13,8 @@ const { onChange, reset, state: cartStore, } = createStore(() => ({
|
|
|
13
13
|
checkoutTimeoutInterval: null,
|
|
14
14
|
currency: 'USD',
|
|
15
15
|
doneSteps: [],
|
|
16
|
-
|
|
16
|
+
dutiesTaxesFees: 0,
|
|
17
|
+
dutiesTaxesFeesEstimate: 0,
|
|
17
18
|
error: null,
|
|
18
19
|
exchangeRate: null,
|
|
19
20
|
externalConfirmationPageURL: null,
|
|
@@ -22,6 +23,11 @@ const { onChange, reset, state: cartStore, } = createStore(() => ({
|
|
|
22
23
|
isSelectedShippingGuarantee: false,
|
|
23
24
|
items: [],
|
|
24
25
|
landedCostData: null,
|
|
26
|
+
landedCostMethod: 'DDP',
|
|
27
|
+
promoCode: sessionStorage.getItem('promoCode') || '',
|
|
28
|
+
// When user clicked applied button, save promocode into session storage for later use. So if session has promocode, applied button is clicked
|
|
29
|
+
promoCodeApplied: !!sessionStorage.getItem('promoCode'),
|
|
30
|
+
promoCodeError: false,
|
|
25
31
|
restrictedItems: [],
|
|
26
32
|
selectedLandedCost: null,
|
|
27
33
|
selectedShippingOption: null,
|
|
@@ -132,14 +138,15 @@ const cartStoreUpdateToErrorState = ({ messages, title, }) => {
|
|
|
132
138
|
title,
|
|
133
139
|
};
|
|
134
140
|
};
|
|
135
|
-
const cartStoreApplySubtotals = (subtotals) => {
|
|
141
|
+
const cartStoreApplySubtotals = (subtotals, dutiesTaxesFeesEstimate) => {
|
|
136
142
|
// update exchange rate so we can use it to display cart items
|
|
137
143
|
cartStore.exchangeRate = subtotals.exchangeRate;
|
|
138
144
|
cartStore.adjustmentTotal = subtotals.adjustments;
|
|
139
|
-
cartStore.
|
|
145
|
+
cartStore.dutiesTaxesFees = subtotals.landedCostTotal;
|
|
140
146
|
cartStore.subtotal = subtotals.items;
|
|
141
147
|
cartStore.total = subtotals.total;
|
|
142
148
|
cartStore.currency = subtotals.presentmentCurrencyCode;
|
|
149
|
+
cartStore.dutiesTaxesFeesEstimate = dutiesTaxesFeesEstimate || 0;
|
|
143
150
|
};
|
|
144
151
|
/**
|
|
145
152
|
* Detect if there are any items in cart that are not restricted and have positive amount, exclude negative amount items
|
|
@@ -162,11 +169,11 @@ const cartStoreSetCheckoutSession = (checkoutSession) => {
|
|
|
162
169
|
cartStore.externalConfirmationPageURL = externalConfirmationPageURL;
|
|
163
170
|
}
|
|
164
171
|
};
|
|
165
|
-
const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency, itemsAmount, landedCostId, }) => {
|
|
172
|
+
const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency, dutiesTaxesFeesEstimate, itemsAmount, landedCostId, }) => {
|
|
166
173
|
if (landedCostId && cartStore.selectedLandedCost) {
|
|
167
174
|
// update cart total right away if we have landed cost id to avoid order total flickering
|
|
168
175
|
const subtotals = cartStore.selectedLandedCost.subtotals;
|
|
169
|
-
cartStoreApplySubtotals(subtotals);
|
|
176
|
+
cartStoreApplySubtotals(subtotals, dutiesTaxesFeesEstimate);
|
|
170
177
|
log('Exchange rate updated for cart items (landed cost subtotal)', 'info', cartStore.exchangeRate);
|
|
171
178
|
}
|
|
172
179
|
// update checkout session
|
|
@@ -204,7 +211,7 @@ const cartStoreReCalculateTotal = async ({ adjustmentsAmount, cartId, currency,
|
|
|
204
211
|
return true;
|
|
205
212
|
};
|
|
206
213
|
const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, landedCostId) => {
|
|
207
|
-
var _a, _b, _c, _d, _e;
|
|
214
|
+
var _a, _b, _c, _d, _e, _f;
|
|
208
215
|
cartStore.selectedShippingOption = selectedShippingOption;
|
|
209
216
|
// update shipping transit info
|
|
210
217
|
const transitData = cartStoreGetShippingTransitInfo(cartStore.selectedShippingOption);
|
|
@@ -212,6 +219,9 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, lan
|
|
|
212
219
|
const { maxTransit, minTransit, unit } = transitData;
|
|
213
220
|
cartStore.selectedShippingOptionTransitTime = `${minTransit}-${maxTransit} ${unit}`;
|
|
214
221
|
}
|
|
222
|
+
else {
|
|
223
|
+
cartStore.selectedShippingOptionTransitTime = '';
|
|
224
|
+
}
|
|
215
225
|
const selectedLandedCost = (_a = cartStore.landedCostData) === null || _a === void 0 ? void 0 : _a.find(x => x.landedCostId === landedCostId);
|
|
216
226
|
// save selected landed cost for later use
|
|
217
227
|
cartStore.selectedLandedCost = selectedLandedCost || null;
|
|
@@ -219,19 +229,28 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, lan
|
|
|
219
229
|
// do nothing if we can't find landed cost for selected shipping option
|
|
220
230
|
return false;
|
|
221
231
|
}
|
|
232
|
+
// If the quote is DAP, get the estimate from the corresponding DDP quote if available
|
|
233
|
+
const correspondingDdpQuote = (_b = cartStore.landedCostData) === null || _b === void 0 ? void 0 : _b.find(x => x.landedCost.shipmentRating.id === selectedShippingOption.id &&
|
|
234
|
+
x.landedCost.method === 'DDP');
|
|
235
|
+
const dutiesTaxesFeesEstimate = correspondingDdpQuote === null || correspondingDdpQuote === void 0 ? void 0 : correspondingDdpQuote.subtotals.landedCostTotal;
|
|
236
|
+
if (dutiesTaxesFeesEstimate) {
|
|
237
|
+
log(`DAP quote, using estimate from DDP quote: ${dutiesTaxesFeesEstimate}`, 'info');
|
|
238
|
+
}
|
|
239
|
+
cartStore.landedCostMethod = selectedLandedCost.landedCost.method || 'DDP';
|
|
222
240
|
// update shipping value and dutiesTaxFees on selectedShippingOption change
|
|
223
241
|
cartStore.shipping = selectedLandedCost.subtotals.shipping;
|
|
224
242
|
// update deminimis status
|
|
225
|
-
const isGuarantee = ((
|
|
243
|
+
const isGuarantee = ((_c = selectedLandedCost === null || selectedLandedCost === void 0 ? void 0 : selectedLandedCost.landedCost) === null || _c === void 0 ? void 0 : _c.landedCostGuaranteeCode) === 'ZONOS';
|
|
226
244
|
// one item in deminimis with type of duty and tax has threshold value is "ABOVE"
|
|
227
|
-
const isAboveDeminimis = !!((
|
|
245
|
+
const isAboveDeminimis = !!((_e = (_d = selectedLandedCost === null || selectedLandedCost === void 0 ? void 0 : selectedLandedCost.landedCost) === null || _d === void 0 ? void 0 : _d.deMinimis) === null || _e === void 0 ? void 0 : _e.find(item => ['DUTY', 'TAX'].includes(item.type) && item.threshold === 'ABOVE'));
|
|
228
246
|
cartStore.isSelectedShippingAboveDeminimis = isAboveDeminimis;
|
|
229
247
|
cartStore.isSelectedShippingGuarantee = isGuarantee;
|
|
230
248
|
// update session with selected landed cost
|
|
231
249
|
const updateCalculateStatus = await cartStoreReCalculateTotal({
|
|
232
250
|
adjustmentsAmount: cartStore.adjustmentTotal,
|
|
233
251
|
cartId: window.Zonos.cartId,
|
|
234
|
-
|
|
252
|
+
dutiesTaxesFeesEstimate: dutiesTaxesFeesEstimate,
|
|
253
|
+
landedCostId: (_f = selectedLandedCost.landedCost) === null || _f === void 0 ? void 0 : _f.id,
|
|
235
254
|
});
|
|
236
255
|
return updateCalculateStatus;
|
|
237
256
|
};
|
|
@@ -291,6 +310,8 @@ const cartStoreUpdateItems = async ({ adjustments, cartItems, }) => {
|
|
|
291
310
|
adjustmentsAmount: adjustmentTotal,
|
|
292
311
|
cartId: window.Zonos.cartId,
|
|
293
312
|
currency: currency,
|
|
313
|
+
// TEMP: test
|
|
314
|
+
dutiesTaxesFeesEstimate: 0,
|
|
294
315
|
itemsAmount: total,
|
|
295
316
|
});
|
|
296
317
|
stripeStore.isFetchingSession = false;
|
|
@@ -300,11 +321,24 @@ const cartStoreResetSelectedShippingOption = () => {
|
|
|
300
321
|
cartStore.isSelectedShippingAboveDeminimis = false;
|
|
301
322
|
cartStore.isSelectedShippingGuarantee = false;
|
|
302
323
|
cartStore.selectedShippingOptionTransitTime = '';
|
|
303
|
-
cartStore.
|
|
324
|
+
cartStore.dutiesTaxesFees = 0;
|
|
325
|
+
cartStore.dutiesTaxesFeesEstimate = 0;
|
|
304
326
|
cartStore.shipping = 0;
|
|
305
327
|
// reset total to subtotal
|
|
306
328
|
cartStore.total = cartStore.subtotal;
|
|
307
329
|
};
|
|
330
|
+
const cartStorePreviousStep = () => {
|
|
331
|
+
if (cartStore.step === 'shipping') {
|
|
332
|
+
cartStore.step = 'customer-info';
|
|
333
|
+
// set shipping step to done
|
|
334
|
+
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
|
|
335
|
+
}
|
|
336
|
+
else if (cartStore.step === 'payment') {
|
|
337
|
+
cartStore.step = 'shipping';
|
|
338
|
+
// set shipping step to done
|
|
339
|
+
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
|
|
340
|
+
}
|
|
341
|
+
};
|
|
308
342
|
const cartStoreNextStep = () => {
|
|
309
343
|
if (cartStore.step === 'customer-info') {
|
|
310
344
|
cartStore.step = 'shipping';
|
|
@@ -325,4 +359,4 @@ const cartStoreResetTabItems = () => {
|
|
|
325
359
|
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: false }), payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }), shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
|
|
326
360
|
cartStoreResetSelectedShippingOption();
|
|
327
361
|
};
|
|
328
|
-
export { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStoreClearCheckoutInterval, cartStoreGetShippingTransitInfo, cartStoreHasOneEligibleItem, cartStoreNextStep,
|
|
362
|
+
export { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStoreClearCheckoutInterval, cartStoreGetShippingTransitInfo, cartStoreHasOneEligibleItem, cartStoreNextStep, cartStorePreviousStep, cartStoreReset, cartStoreResetCartItems, cartStoreResetTabItems, cartStoreSetCheckoutSession, cartStoreStartCheckoutInterval, cartStoreUpdateItems, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { createStore } from "@stencil/store";
|
|
2
|
-
import { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStoreResetCartItems, cartStoreSetCheckoutSession, } from "./cart";
|
|
2
|
+
import { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStorePreviousStep, cartStoreResetCartItems, cartStoreSetCheckoutSession, cartStoreUpdateSelectedShippingOption, } from "./cart";
|
|
3
3
|
import { localizationStore } from "../hello/localization";
|
|
4
4
|
import { translate } from "../translationStore";
|
|
5
5
|
import { zonosStore } from "../zonosStore";
|
|
6
6
|
import { calculateLandedCostNormalized } from "../../utils/api/calculateLandedCostNormaliz";
|
|
7
7
|
import { buildTranslateRequest } from "../../utils/checkout/buildTranslateRequest";
|
|
8
|
+
import { sortServiceLevelOptionsByAmount } from "../../utils/checkout/sortServiceLevelOptionsByAmount";
|
|
8
9
|
import { handleFetch } from "../../utils/handleFetch";
|
|
9
10
|
import { isDarkColor } from "../../utils/isDarkColor";
|
|
10
11
|
import { jsonParse } from "../../utils/jsonParse";
|
|
@@ -163,8 +164,42 @@ const isPrefetchInfoOutdated = () => {
|
|
|
163
164
|
// if landed cost data is not available, we need to fetch it
|
|
164
165
|
!cartStore.landedCostData || isAddressOutdated || isTotalAmountChanged);
|
|
165
166
|
};
|
|
166
|
-
const
|
|
167
|
-
|
|
167
|
+
const stripeCalculateLandedCost = async () => {
|
|
168
|
+
const abortController = new AbortController();
|
|
169
|
+
stripeStore.fetchingLandedCostAbortController = abortController;
|
|
170
|
+
// Reset cart items to non-restricted state and restricted item list
|
|
171
|
+
cartStoreResetCartItems();
|
|
172
|
+
const { checkoutSessionWorkflow, itemCreateWorkflow, landedCostCalculateWorkflow, shipmentRatingCalculateWorkflow, } = await calculateLandedCostNormalized(abortController);
|
|
173
|
+
cartStore.shippingData = sortServiceLevelOptionsByAmount((shipmentRatingCalculateWorkflow === null || shipmentRatingCalculateWorkflow === void 0 ? void 0 : shipmentRatingCalculateWorkflow.filter(Boolean)) || []);
|
|
174
|
+
// check and update cart items with restrictions
|
|
175
|
+
cartStoreCheckItemRestrictions(itemCreateWorkflow);
|
|
176
|
+
// reset abort controller after we are done
|
|
177
|
+
stripeStore.fetchingLandedCostAbortController = null;
|
|
178
|
+
// update cart store with landed cost info
|
|
179
|
+
cartStore.landedCostData =
|
|
180
|
+
(checkoutSessionWorkflow === null || checkoutSessionWorkflow === void 0 ? void 0 : checkoutSessionWorkflow.map(checkoutSession => {
|
|
181
|
+
const foundLandedCost = landedCostCalculateWorkflow === null || landedCostCalculateWorkflow === void 0 ? void 0 : landedCostCalculateWorkflow.find(item => (item === null || item === void 0 ? void 0 : item.id) === checkoutSession.landedCostId);
|
|
182
|
+
if (!foundLandedCost) {
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
return Object.assign(Object.assign({}, checkoutSession), { landedCost: foundLandedCost });
|
|
186
|
+
}).filter(Boolean)) || [];
|
|
187
|
+
// update adjustmentTotal
|
|
188
|
+
// highlight promocode input error if promocode is applied but no adjustment applied in landed cost
|
|
189
|
+
const isInvalidPromoCode = cartStore.promoCodeApplied &&
|
|
190
|
+
!cartStore.landedCostData.find(item => {
|
|
191
|
+
var _a;
|
|
192
|
+
return (_a = item.landedCost.appliedAdjustments) === null || _a === void 0 ? void 0 : _a.find(_item => _item.type === 'PROMO_CODE');
|
|
193
|
+
});
|
|
194
|
+
cartStore.promoCodeError = isInvalidPromoCode;
|
|
195
|
+
// When promocode is valid, set promoCode to session storage so if user close the modal, we can still reapply for them
|
|
196
|
+
if (!isInvalidPromoCode) {
|
|
197
|
+
sessionStorage.setItem('promoCode', cartStore.promoCode);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
const stripeStorePrefetchLandedCost = async (params) => {
|
|
201
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
202
|
+
const applyingPromocode = !!(params === null || params === void 0 ? void 0 : params.applyingPromocode);
|
|
168
203
|
const stripeAddressReady = !!((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
169
204
|
const stripeLinkReady = !!((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.complete);
|
|
170
205
|
const stripeBillingAddressReady = stripeStore.stripeShippingSameAsBilling
|
|
@@ -176,68 +211,87 @@ const stripeStorePrefetchLandedCost = async () => {
|
|
|
176
211
|
(_e = stripeStore.fetchingLandedCostAbortController) === null || _e === void 0 ? void 0 : _e.abort();
|
|
177
212
|
stripeStore.fetchingLandedCostAbortController = null;
|
|
178
213
|
}
|
|
179
|
-
//
|
|
180
|
-
if (
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
// check and update cart items with restrictions
|
|
219
|
-
cartStoreCheckItemRestrictions(itemCreateWorkflow);
|
|
220
|
-
if (subtotals) {
|
|
221
|
-
// prefetch landed cost will not update shipping and taxes since we haven't selected shipping method yet
|
|
222
|
-
cartStoreApplySubtotals({
|
|
223
|
-
adjustments: subtotals.adjustments,
|
|
224
|
-
exchangeRate: subtotals.exchangeRate,
|
|
225
|
-
items: subtotals.items,
|
|
226
|
-
landedCostTotal: 0,
|
|
227
|
-
presentmentCurrencyCode: subtotals.presentmentCurrencyCode,
|
|
228
|
-
shipping: 0,
|
|
229
|
-
total: subtotals.items,
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
catch (err) {
|
|
234
|
-
// default to empty array if we failed to fetch landed cost, so we can show the error message
|
|
235
|
-
cartStore.landedCostData = [];
|
|
236
|
-
cartStore.shippingData = [];
|
|
237
|
-
logError(err);
|
|
214
|
+
// Do not fetch if we are not ready or data is not outdated
|
|
215
|
+
if ((!shouldRefetch && !applyingPromocode) ||
|
|
216
|
+
!stripeAddressReady ||
|
|
217
|
+
!stripeLinkReady ||
|
|
218
|
+
!stripeBillingAddressReady) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
stripeStore.isFetchingLandedCost = true;
|
|
222
|
+
if (stripeStore.stripeAddressEventData) {
|
|
223
|
+
stripeStore.stripeAddressUsedWhenFetchingLC = Object.assign({}, stripeStore.stripeAddressEventData);
|
|
224
|
+
}
|
|
225
|
+
if (stripeStore.stripeBillingAddressEventData) {
|
|
226
|
+
stripeStore.stripeBillingAddressUsedWhenFetchingLC = Object.assign({}, stripeStore.stripeBillingAddressEventData);
|
|
227
|
+
}
|
|
228
|
+
if (stripeStore.stripeLinkEventData) {
|
|
229
|
+
stripeStore.stripeLinkUsedWhenFetchingLC = Object.assign({}, stripeStore.stripeLinkEventData);
|
|
230
|
+
}
|
|
231
|
+
try {
|
|
232
|
+
// Reset cart items to non-restricted state and restricted item list
|
|
233
|
+
cartStoreResetCartItems();
|
|
234
|
+
// fetch and apply landed cost
|
|
235
|
+
await stripeCalculateLandedCost();
|
|
236
|
+
// This is the cheapest service level since we already sorted them after fetching landed cost
|
|
237
|
+
const cheapestServiceLevel = (_f = cartStore.shippingData) === null || _f === void 0 ? void 0 : _f.find(Boolean);
|
|
238
|
+
// Landed cost that matches with service level
|
|
239
|
+
const matchLandedCost = (_g = cartStore.landedCostData) === null || _g === void 0 ? void 0 : _g.find(x => x.landedCost.shipmentRating.id === (cheapestServiceLevel === null || cheapestServiceLevel === void 0 ? void 0 : cheapestServiceLevel.id));
|
|
240
|
+
// apply new subtotal and total, this is mainly to show items in the presentment currency
|
|
241
|
+
const subtotals = !!matchLandedCost ? matchLandedCost.subtotals : null;
|
|
242
|
+
if (subtotals) {
|
|
243
|
+
// prefetch landed cost will not update shipping and taxes since we haven't selected shipping method yet
|
|
244
|
+
cartStoreApplySubtotals({
|
|
245
|
+
adjustments: subtotals.adjustments,
|
|
246
|
+
exchangeRate: subtotals.exchangeRate,
|
|
247
|
+
items: subtotals.items,
|
|
248
|
+
landedCostTotal: subtotals.landedCostTotal,
|
|
249
|
+
presentmentCurrencyCode: subtotals.presentmentCurrencyCode,
|
|
250
|
+
shipping: subtotals.shipping,
|
|
251
|
+
total: subtotals.total,
|
|
252
|
+
});
|
|
238
253
|
}
|
|
239
|
-
stripeStore.isFetchingLandedCost = false;
|
|
240
254
|
}
|
|
255
|
+
catch (err) {
|
|
256
|
+
// default to empty array if we failed to fetch landed cost, so we can show the error message
|
|
257
|
+
cartStore.landedCostData = [];
|
|
258
|
+
cartStore.shippingData = [];
|
|
259
|
+
logError(err);
|
|
260
|
+
}
|
|
261
|
+
stripeStore.isFetchingLandedCost = false;
|
|
262
|
+
};
|
|
263
|
+
const stripeStoreApplyPromoCode = async () => {
|
|
264
|
+
var _a, _b;
|
|
265
|
+
await stripeStorePrefetchLandedCost({
|
|
266
|
+
applyingPromocode: true,
|
|
267
|
+
});
|
|
268
|
+
// Go back to shipping step if we are in payment step so user can reselect shipping method
|
|
269
|
+
if (cartStore.step === 'payment') {
|
|
270
|
+
cartStorePreviousStep();
|
|
271
|
+
}
|
|
272
|
+
// This is the cheapest service level since we already sorted them after fetching landed cost
|
|
273
|
+
const cheapestServiceLevel = (_a = cartStore.shippingData) === null || _a === void 0 ? void 0 : _a.find(Boolean);
|
|
274
|
+
// Landed cost that matches with service level
|
|
275
|
+
const matchLandedCost = (_b = cartStore.landedCostData) === null || _b === void 0 ? void 0 : _b.find(x => x.landedCost.id === (cheapestServiceLevel === null || cheapestServiceLevel === void 0 ? void 0 : cheapestServiceLevel.id));
|
|
276
|
+
if (!cheapestServiceLevel || !matchLandedCost) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
await cartStoreUpdateSelectedShippingOption(cheapestServiceLevel, matchLandedCost.landedCostId);
|
|
280
|
+
};
|
|
281
|
+
const stripeStoreResetPromoCode = () => {
|
|
282
|
+
cartStore.promoCode = '';
|
|
283
|
+
sessionStorage.removeItem('promoCode');
|
|
284
|
+
// reset promocode error state
|
|
285
|
+
cartStore.promoCodeError = false;
|
|
286
|
+
cartStore.promoCodeApplied = false;
|
|
287
|
+
};
|
|
288
|
+
const stripeStoreRemovePromoCode = async () => {
|
|
289
|
+
// Go back to shipping step if we are in payment step so user can reselect shipping method
|
|
290
|
+
if (cartStore.step === 'payment') {
|
|
291
|
+
cartStorePreviousStep();
|
|
292
|
+
}
|
|
293
|
+
stripeStoreResetPromoCode();
|
|
294
|
+
await stripeStoreApplyPromoCode();
|
|
241
295
|
};
|
|
242
296
|
const stripeStoreMessageBasedOnStatus = (status) => {
|
|
243
297
|
let messages = [];
|
|
@@ -521,7 +575,7 @@ const stripeStoreTranslateAddressToLatin = async ({ addressInvalidCharactersList
|
|
|
521
575
|
: {},
|
|
522
576
|
billingAddress: !stripeStore.stripeShippingSameAsBilling
|
|
523
577
|
? buildTranslatedAddress({
|
|
524
|
-
currentAddress: Object.assign(Object.assign({}, billingAddress), { name: (_d = stripeStore.stripeBillingAddressEventData) === null || _d === void 0 ? void 0 : _d.value.name })
|
|
578
|
+
currentAddress: Object.assign(Object.assign({}, billingAddress), { name: (_d = stripeStore.stripeBillingAddressEventData) === null || _d === void 0 ? void 0 : _d.value.name }),
|
|
525
579
|
translatedAddressResult: json.billingAddress || null,
|
|
526
580
|
})
|
|
527
581
|
: {},
|
|
@@ -536,4 +590,4 @@ onChange('clientSecret', clientSecret => {
|
|
|
536
590
|
sessionStorage.removeItem('zonos--client-secret');
|
|
537
591
|
}
|
|
538
592
|
});
|
|
539
|
-
export { initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreGetDomesticShippingSession, stripeStoreHandleInventoryCheck, stripeStoreInitCheckoutSession, stripeStoreMessageBasedOnStatus, stripeStorePrefetchLandedCost, stripeStoreReset, stripeStoreRetrievePayment, stripeStoreSaveDomesticShippingSession, stripeStoreTranslateAddressToLatin, stripeStoreUpdateCheckoutSession, };
|
|
593
|
+
export { initStripeElements, stripeCalculateLandedCost, stripeStore, stripeStoreApplyPromoCode, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreGetDomesticShippingSession, stripeStoreHandleInventoryCheck, stripeStoreInitCheckoutSession, stripeStoreMessageBasedOnStatus, stripeStorePrefetchLandedCost, stripeStoreRemovePromoCode, stripeStoreReset, stripeStoreResetPromoCode, stripeStoreRetrievePayment, stripeStoreSaveDomesticShippingSession, stripeStoreTranslateAddressToLatin, stripeStoreUpdateCheckoutSession, };
|
|
@@ -8,6 +8,9 @@ export const stringsArabic = {
|
|
|
8
8
|
'Above de minimis threshold for': {
|
|
9
9
|
value: 'أعلى من الحد الأدنى لـ',
|
|
10
10
|
},
|
|
11
|
+
'Add promotional code': {
|
|
12
|
+
value: 'أضف رمز ترويجي',
|
|
13
|
+
},
|
|
11
14
|
Address: {
|
|
12
15
|
value: 'العنوان',
|
|
13
16
|
},
|
|
@@ -20,6 +23,9 @@ export const stringsArabic = {
|
|
|
20
23
|
'An unexpected error occurred when processing PayPal order.': {
|
|
21
24
|
value: 'حدث خطأ غير متوقع عند معالجة طلب PayPal.',
|
|
22
25
|
},
|
|
26
|
+
Apply: {
|
|
27
|
+
value: 'تطبيق',
|
|
28
|
+
},
|
|
23
29
|
'Are you sure?': {
|
|
24
30
|
value: 'هل أنت متأكد؟',
|
|
25
31
|
},
|
|
@@ -80,12 +86,18 @@ export const stringsArabic = {
|
|
|
80
86
|
"Don't close": {
|
|
81
87
|
value: 'لا تغلق',
|
|
82
88
|
},
|
|
89
|
+
'Due at delivery': {
|
|
90
|
+
value: 'مستحق عند التسليم',
|
|
91
|
+
},
|
|
83
92
|
'Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.': {
|
|
84
93
|
value: 'الرسوم والضرائب في أستراليا، ضريبة القيمة المضافة أو GST هي [percentage] وتستحق على جميع الطلبات.',
|
|
85
94
|
},
|
|
86
95
|
'Duties and taxes will be applied to items and shipping.': {
|
|
87
96
|
value: 'سيتم تطبيق الرسوم والضرائب على العناصر والشحن.',
|
|
88
97
|
},
|
|
98
|
+
'Duties and taxes will be charged upon delivery.': {
|
|
99
|
+
value: 'سيتم فرض الرسوم والضرائب عند التسليم.',
|
|
100
|
+
},
|
|
89
101
|
'Duties will apply to all orders.': {
|
|
90
102
|
value: 'ستنطبق الرسوم على جميع الطلبات.',
|
|
91
103
|
},
|
|
@@ -101,6 +113,9 @@ export const stringsArabic = {
|
|
|
101
113
|
'Error updating Checkout': {
|
|
102
114
|
value: 'خطأ في تحديث جلسة الخروج',
|
|
103
115
|
},
|
|
116
|
+
Estimated: {
|
|
117
|
+
value: 'مقدر',
|
|
118
|
+
},
|
|
104
119
|
'Expected delivery': {
|
|
105
120
|
value: 'التوصيل المتوقع',
|
|
106
121
|
},
|
|
@@ -122,6 +137,12 @@ export const stringsArabic = {
|
|
|
122
137
|
Hide: {
|
|
123
138
|
value: 'اخفِ',
|
|
124
139
|
},
|
|
140
|
+
'Hide non prepaid methods': {
|
|
141
|
+
value: 'إخفاء الطرق غير المدفوعة مسبقًا',
|
|
142
|
+
},
|
|
143
|
+
'Invalid promo code': {
|
|
144
|
+
value: 'رمز ترويجي غير صالح',
|
|
145
|
+
},
|
|
125
146
|
'Keep shopping': {
|
|
126
147
|
value: 'متابعة التسوق',
|
|
127
148
|
},
|
|
@@ -152,6 +173,9 @@ export const stringsArabic = {
|
|
|
152
173
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
153
174
|
value: 'لم يتم العثور على طرق شحن - جرب تحرير عنوانك أو الاتصال بالدعم إذا استمر الخطأ',
|
|
154
175
|
},
|
|
176
|
+
'Nothing due at delivery': {
|
|
177
|
+
value: 'لا شيء مستحق عند التسليم',
|
|
178
|
+
},
|
|
155
179
|
'Nothing due at the door': {
|
|
156
180
|
value: 'لا شيء مستحق عند الباب',
|
|
157
181
|
},
|
|
@@ -260,6 +284,9 @@ export const stringsArabic = {
|
|
|
260
284
|
Show: {
|
|
261
285
|
value: 'عرض',
|
|
262
286
|
},
|
|
287
|
+
'Show non prepaid methods': {
|
|
288
|
+
value: 'عرض طرق غير مدفوعة مسبقًا',
|
|
289
|
+
},
|
|
263
290
|
'Something went wrong.': {
|
|
264
291
|
value: 'حدث خطأ ما.',
|
|
265
292
|
},
|
|
@@ -332,6 +359,9 @@ export const stringsArabic = {
|
|
|
332
359
|
'Would you like to close checkout and return to the site?': {
|
|
333
360
|
value: 'هل ترغب في إغلاق عملية الدفع والعودة إلى الموقع؟',
|
|
334
361
|
},
|
|
362
|
+
'You may incur additional fees from the shipping carrier by not prepaying.': {
|
|
363
|
+
value: 'قد تتكبد رسومًا إضافية من شركة الشحن إذا لم تدفع مسبقًا.',
|
|
364
|
+
},
|
|
335
365
|
"You're all set!": {
|
|
336
366
|
value: 'أنت جاهز!',
|
|
337
367
|
},
|
|
@@ -8,6 +8,9 @@ export const stringsBase = {
|
|
|
8
8
|
'Above de minimis threshold for': {
|
|
9
9
|
value: 'Above de minimis threshold for',
|
|
10
10
|
},
|
|
11
|
+
'Add promotional code': {
|
|
12
|
+
value: 'Add promotional code',
|
|
13
|
+
},
|
|
11
14
|
Address: {
|
|
12
15
|
value: 'Address',
|
|
13
16
|
},
|
|
@@ -20,6 +23,9 @@ export const stringsBase = {
|
|
|
20
23
|
'An unexpected error occurred when processing PayPal order.': {
|
|
21
24
|
value: 'An unexpected error occurred when processing PayPal order.',
|
|
22
25
|
},
|
|
26
|
+
Apply: {
|
|
27
|
+
value: 'Apply',
|
|
28
|
+
},
|
|
23
29
|
'Are you sure?': {
|
|
24
30
|
value: 'Are you sure?',
|
|
25
31
|
},
|
|
@@ -80,12 +86,18 @@ export const stringsBase = {
|
|
|
80
86
|
"Don't close": {
|
|
81
87
|
value: "Don't close",
|
|
82
88
|
},
|
|
89
|
+
'Due at delivery': {
|
|
90
|
+
value: 'Due at delivery',
|
|
91
|
+
},
|
|
83
92
|
'Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.': {
|
|
84
93
|
value: 'Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.',
|
|
85
94
|
},
|
|
86
95
|
'Duties and taxes will be applied to items and shipping.': {
|
|
87
96
|
value: 'Duties and taxes will be applied to items and shipping.',
|
|
88
97
|
},
|
|
98
|
+
'Duties and taxes will be charged upon delivery.': {
|
|
99
|
+
value: 'Duties and taxes will be charged upon delivery.',
|
|
100
|
+
},
|
|
89
101
|
'Duties will apply to all orders.': {
|
|
90
102
|
value: 'Duties will apply to all orders.',
|
|
91
103
|
},
|
|
@@ -101,6 +113,9 @@ export const stringsBase = {
|
|
|
101
113
|
'Error updating Checkout': {
|
|
102
114
|
value: 'Error updating Checkout',
|
|
103
115
|
},
|
|
116
|
+
Estimated: {
|
|
117
|
+
value: 'Estimated',
|
|
118
|
+
},
|
|
104
119
|
'Expected delivery': {
|
|
105
120
|
value: 'Expected delivery',
|
|
106
121
|
},
|
|
@@ -122,6 +137,12 @@ export const stringsBase = {
|
|
|
122
137
|
Hide: {
|
|
123
138
|
value: 'Hide',
|
|
124
139
|
},
|
|
140
|
+
'Hide non prepaid methods': {
|
|
141
|
+
value: 'Hide non prepaid methods',
|
|
142
|
+
},
|
|
143
|
+
'Invalid promo code': {
|
|
144
|
+
value: 'Invalid promo code',
|
|
145
|
+
},
|
|
125
146
|
'Keep shopping': {
|
|
126
147
|
value: 'Keep shopping',
|
|
127
148
|
},
|
|
@@ -152,6 +173,9 @@ export const stringsBase = {
|
|
|
152
173
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
153
174
|
value: 'No shipping methods found - try editing your address or contacting support if the error persists',
|
|
154
175
|
},
|
|
176
|
+
'Nothing due at delivery': {
|
|
177
|
+
value: 'Nothing due at delivery',
|
|
178
|
+
},
|
|
155
179
|
'Nothing due at the door': {
|
|
156
180
|
value: 'Nothing due at the door',
|
|
157
181
|
},
|
|
@@ -260,6 +284,9 @@ export const stringsBase = {
|
|
|
260
284
|
Show: {
|
|
261
285
|
value: 'Show',
|
|
262
286
|
},
|
|
287
|
+
'Show non prepaid methods': {
|
|
288
|
+
value: 'Show non prepaid methods',
|
|
289
|
+
},
|
|
263
290
|
'Something went wrong.': {
|
|
264
291
|
value: 'Something went wrong.',
|
|
265
292
|
},
|
|
@@ -332,6 +359,9 @@ export const stringsBase = {
|
|
|
332
359
|
'Would you like to close checkout and return to the site?': {
|
|
333
360
|
value: 'Would you like to close checkout and return to the site?',
|
|
334
361
|
},
|
|
362
|
+
'You may incur additional fees from the shipping carrier by not prepaying.': {
|
|
363
|
+
value: 'You may incur additional fees from the shipping carrier by not prepaying.',
|
|
364
|
+
},
|
|
335
365
|
"You're all set!": {
|
|
336
366
|
value: "You're all set!",
|
|
337
367
|
},
|
|
@@ -8,6 +8,9 @@ export const stringsChinese = {
|
|
|
8
8
|
'Above de minimis threshold for': {
|
|
9
9
|
value: '超过最低征税门槛',
|
|
10
10
|
},
|
|
11
|
+
'Add promotional code': {
|
|
12
|
+
value: '添加促销代码',
|
|
13
|
+
},
|
|
11
14
|
Address: {
|
|
12
15
|
value: '地址',
|
|
13
16
|
},
|
|
@@ -20,6 +23,9 @@ export const stringsChinese = {
|
|
|
20
23
|
'An unexpected error occurred when processing PayPal order.': {
|
|
21
24
|
value: '处理PayPal订单时发生意外错误。',
|
|
22
25
|
},
|
|
26
|
+
Apply: {
|
|
27
|
+
value: '应用',
|
|
28
|
+
},
|
|
23
29
|
'Are you sure?': {
|
|
24
30
|
value: '你确定吗?',
|
|
25
31
|
},
|
|
@@ -80,12 +86,18 @@ export const stringsChinese = {
|
|
|
80
86
|
"Don't close": {
|
|
81
87
|
value: '不要关',
|
|
82
88
|
},
|
|
89
|
+
'Due at delivery': {
|
|
90
|
+
value: '交货时付款',
|
|
91
|
+
},
|
|
83
92
|
'Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders.': {
|
|
84
93
|
value: '澳大利亚的关税和税费,增值税或GST为[percentage],适用于所有订单。',
|
|
85
94
|
},
|
|
86
95
|
'Duties and taxes will be applied to items and shipping.': {
|
|
87
96
|
value: '商品和运费将征收关税和税款。',
|
|
88
97
|
},
|
|
98
|
+
'Duties and taxes will be charged upon delivery.': {
|
|
99
|
+
value: '关税和税款将在交货时收取。',
|
|
100
|
+
},
|
|
89
101
|
'Duties will apply to all orders.': {
|
|
90
102
|
value: '所有订单都将适用关税。',
|
|
91
103
|
},
|
|
@@ -101,6 +113,9 @@ export const stringsChinese = {
|
|
|
101
113
|
'Error updating Checkout': {
|
|
102
114
|
value: '更新结账时出错',
|
|
103
115
|
},
|
|
116
|
+
Estimated: {
|
|
117
|
+
value: '估计',
|
|
118
|
+
},
|
|
104
119
|
'Expected delivery': {
|
|
105
120
|
value: '预计送达',
|
|
106
121
|
},
|
|
@@ -122,6 +137,12 @@ export const stringsChinese = {
|
|
|
122
137
|
Hide: {
|
|
123
138
|
value: '隐藏',
|
|
124
139
|
},
|
|
140
|
+
'Hide non prepaid methods': {
|
|
141
|
+
value: '隐藏非预付费方法',
|
|
142
|
+
},
|
|
143
|
+
'Invalid promo code': {
|
|
144
|
+
value: '无效的促销代码',
|
|
145
|
+
},
|
|
125
146
|
'Keep shopping': {
|
|
126
147
|
value: '继续购物',
|
|
127
148
|
},
|
|
@@ -152,6 +173,9 @@ export const stringsChinese = {
|
|
|
152
173
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
153
174
|
value: '未找到运输方法 - 如果错误仍然存在,请尝试编辑您的地址或联系支持',
|
|
154
175
|
},
|
|
176
|
+
'Nothing due at delivery': {
|
|
177
|
+
value: '交货时无需付款',
|
|
178
|
+
},
|
|
155
179
|
'Nothing due at the door': {
|
|
156
180
|
value: '门口无需付款',
|
|
157
181
|
},
|
|
@@ -260,6 +284,9 @@ export const stringsChinese = {
|
|
|
260
284
|
Show: {
|
|
261
285
|
value: '显示',
|
|
262
286
|
},
|
|
287
|
+
'Show non prepaid methods': {
|
|
288
|
+
value: '显示非预付费方法',
|
|
289
|
+
},
|
|
263
290
|
'Something went wrong.': {
|
|
264
291
|
value: '出了些问题。',
|
|
265
292
|
},
|
|
@@ -332,6 +359,9 @@ export const stringsChinese = {
|
|
|
332
359
|
'Would you like to close checkout and return to the site?': {
|
|
333
360
|
value: '您要关闭结帐并返回网站吗?',
|
|
334
361
|
},
|
|
362
|
+
'You may incur additional fees from the shipping carrier by not prepaying.': {
|
|
363
|
+
value: '如果不预付,您可能会产生来自运输公司的额外费用。',
|
|
364
|
+
},
|
|
335
365
|
"You're all set!": {
|
|
336
366
|
value: '您已完成设置!',
|
|
337
367
|
},
|