@zonos/elements 1.3.5 → 1.3.7-alpha.0
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/ILanguage-d247b45b.js +26 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/{localization-d43e1540.js → cart-ecc80eb0.js} +1086 -2
- package/dist/cjs/{getBorderRadius-cd7ef574.js → getBorderRadius-834c321d.js} +8 -4
- package/dist/cjs/index.cjs.js +0 -21
- package/dist/cjs/{isDarkColor-5eda1323.js → isDarkColor-924e6a7a.js} +1 -1
- package/dist/cjs/loader.cjs.js +5 -3
- package/dist/cjs/{submitGtag-bd6e9b42.js → submitGtag-907e71d3.js} +3 -3
- package/dist/cjs/zonos-address_4.cjs.entry.js +301 -0
- package/dist/cjs/zonos-badge_2.cjs.entry.js +57 -0
- package/dist/cjs/zonos-banner.cjs.entry.js +4 -9
- package/dist/cjs/{zonos-button_2.cjs.entry.js → zonos-button_3.cjs.entry.js} +42 -15
- package/dist/cjs/zonos-card_2.cjs.entry.js +28 -14
- package/dist/cjs/{zonos-cart-items_10.cjs.entry.js → zonos-cart-items_9.cjs.entry.js} +98 -99
- package/dist/cjs/zonos-checkout.cjs.entry.js +25 -27
- package/dist/cjs/zonos-component.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +29 -30
- package/dist/cjs/zonos-country-flag.cjs.entry.js +42 -0
- package/dist/cjs/{zonos-country-flag_4.cjs.entry.js → zonos-country-select_3.cjs.entry.js} +31 -56
- package/dist/cjs/zonos-elements.cjs.js +6 -4
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +29 -22
- package/dist/cjs/zonos-hello.cjs.entry.js +35 -33
- package/dist/cjs/zonos-logo.cjs.entry.js +32 -0
- package/dist/cjs/zonos-notification.cjs.entry.js +5 -6
- package/dist/cjs/zonos-payment.cjs.entry.js +6 -7
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +45 -0
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +4 -4
- package/dist/cjs/zonos-text.cjs.entry.js +4 -6
- package/dist/cjs/{zonosStore-b88b5671.js → zonosStore-49d4c92a.js} +5 -5
- package/dist/collection/collection-manifest.json +6 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +13 -8
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/chevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/globe.svg +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/zonosIcon.svg +5 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +126 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +60 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +12 -21
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +4 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +11 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +12 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +7 -26
- package/dist/collection/components/common/zonos-banner/zonos-banner.js +2 -25
- package/dist/collection/components/common/zonos-button/zonos-button.css +18 -0
- package/dist/collection/components/common/zonos-button/zonos-button.js +9 -28
- package/dist/collection/components/common/zonos-card/zonos-card.js +2 -20
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.css +82 -0
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +218 -0
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +15 -2
- package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +1 -20
- package/dist/collection/components/common/zonos-country-select/assets/greenCheckDuotone.svg +4 -0
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.css +11 -10
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +7 -11
- 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-icon/zonos-icon.js +4 -4
- package/dist/collection/components/common/zonos-language-select/assets/greenCheckDuotone.svg +4 -0
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.css +61 -0
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +58 -0
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -21
- package/dist/collection/components/common/zonos-notification/zonos-notification.js +3 -26
- package/dist/collection/components/common/zonos-select-dialog-header/assets/removeIcon.svg +1 -0
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.css +45 -0
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +68 -0
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +1 -1
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +4 -4
- package/dist/collection/components/common/zonos-text/zonos-text.js +4 -24
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.css +55 -0
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +72 -0
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -21
- 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/assets/globe.svg +3 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +10 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +27 -5
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +16 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +11 -5
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/checkout/stripe.js +31 -7
- package/dist/collection/components/store/hello/localization.js +32 -2
- package/dist/collection/components/store/translationStore/strings.arabic.js +18 -0
- package/dist/collection/components/store/translationStore/strings.base.js +18 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +18 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +18 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +18 -0
- package/dist/collection/components/store/translationStore/strings.french.js +18 -0
- package/dist/collection/components/store/translationStore/strings.german.js +18 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +18 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +18 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +18 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +18 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +18 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +18 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +18 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +18 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +18 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +18 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +18 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +18 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +18 -0
- package/dist/collection/components/store/zonosStore.js +4 -4
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +63 -24
- 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 +19 -1
- package/dist/collection/components/utils/api/triggerBuildLandedCost.js +11 -5
- package/dist/collection/components/utils/getBorderRadius.js +7 -3
- package/dist/collection/types/ILanguage.js +22 -0
- package/dist/collection/types/generated/graphql.customer.types.js +19 -0
- package/dist/collection/types/index.js +0 -1
- package/dist/collection/types/styles/Color.js +9 -0
- package/dist/components/ILanguage.js +24 -0
- package/dist/components/getBorderRadius.js +7 -3
- package/dist/components/index.js +0 -1
- package/dist/components/isDarkColor.js +1 -1
- package/dist/components/{localization.js → stripe.js} +1070 -2
- package/dist/components/submitGtag.js +1 -1
- package/dist/components/zonos-address2.js +64 -26
- package/dist/components/zonos-badge2.js +8 -10
- package/dist/components/zonos-banner2.js +3 -9
- package/dist/components/zonos-button2.js +10 -12
- package/dist/components/zonos-card2.js +3 -5
- package/dist/components/zonos-cart-items2.js +1 -1
- package/dist/components/zonos-cart-subtotal2.js +14 -9
- package/dist/components/zonos-checkbox.d.ts +11 -0
- package/dist/components/zonos-checkbox.js +6 -0
- package/dist/components/zonos-checkbox2.js +87 -0
- package/dist/components/zonos-checkout-finish2.js +15 -7
- package/dist/components/zonos-checkout-footer.d.ts +11 -0
- package/dist/components/zonos-checkout-footer.js +6 -0
- package/dist/components/zonos-checkout-footer2.js +109 -0
- package/dist/components/zonos-checkout-payment2.js +2 -3
- package/dist/components/zonos-checkout.js +74 -52
- package/dist/components/zonos-collapse2.js +16 -3
- package/dist/components/zonos-component.js +1 -1
- package/dist/components/zonos-controller.js +3 -4
- package/dist/components/zonos-country-flag2.js +3 -5
- package/dist/components/zonos-country-select2.js +26 -19
- package/dist/components/zonos-custom-message2.js +3 -3
- package/dist/components/zonos-customer-info2.js +30 -11
- package/dist/components/zonos-dialog2.js +4 -4
- package/dist/components/zonos-hello-dialog-footer2.js +23 -10
- package/dist/components/zonos-hello-dialog2.js +41 -23
- package/dist/components/zonos-hello.js +31 -19
- package/dist/components/zonos-icon2.js +4 -4
- package/dist/components/zonos-language-select.d.ts +11 -0
- package/dist/components/zonos-language-select.js +6 -0
- package/dist/components/zonos-language-select2.js +87 -0
- package/dist/components/zonos-link-authentication2.js +2 -2
- package/dist/components/zonos-logo.js +44 -1
- package/dist/components/zonos-notification2.js +4 -6
- package/dist/components/zonos-payment2.js +2 -2
- package/dist/components/zonos-review2.js +4 -5
- package/dist/components/zonos-select-dialog-header.d.ts +11 -0
- package/dist/components/zonos-select-dialog-header.js +6 -0
- package/dist/components/zonos-select-dialog-header2.js +71 -0
- package/dist/components/zonos-shipping-rich-radio2.js +2 -2
- package/dist/components/zonos-shipping2.js +2 -3
- package/dist/components/zonos-spinner2.js +3 -3
- package/dist/components/zonos-text2.js +4 -7
- package/dist/components/zonos-tooltip.d.ts +11 -0
- package/dist/components/zonos-tooltip.js +6 -0
- package/dist/components/zonos-tooltip2.js +48 -0
- package/dist/components/zonos-v-stack2.js +4 -6
- package/dist/components/zonosStore.js +5 -5
- package/dist/esm/ILanguage-97790bee.js +24 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/{localization-5d83fde2.js → cart-2a0a6871.js} +1071 -3
- package/dist/esm/getBorderRadius-0c7dfcf0.js +20 -0
- package/dist/esm/index.js +1 -6
- package/dist/esm/{isDarkColor-8696cb70.js → isDarkColor-d0a57fd2.js} +1 -1
- package/dist/esm/loader.js +6 -4
- package/dist/esm/{submitGtag-776c5e10.js → submitGtag-a38aed23.js} +2 -2
- package/dist/esm/zonos-address_4.entry.js +294 -0
- package/dist/esm/zonos-badge_2.entry.js +52 -0
- package/dist/esm/zonos-banner.entry.js +4 -9
- package/dist/esm/{zonos-button_2.entry.js → zonos-button_3.entry.js} +42 -16
- package/dist/esm/zonos-card_2.entry.js +28 -14
- package/dist/esm/{zonos-cart-items_10.entry.js → zonos-cart-items_9.entry.js} +86 -86
- package/dist/esm/zonos-checkout.entry.js +11 -13
- package/dist/esm/zonos-component.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +6 -7
- package/dist/esm/zonos-country-flag.entry.js +38 -0
- package/dist/esm/{zonos-country-flag_4.entry.js → zonos-country-select_3.entry.js} +31 -55
- package/dist/esm/zonos-elements.js +7 -5
- package/dist/esm/zonos-hello-dialog.entry.js +15 -8
- package/dist/esm/zonos-hello.entry.js +5 -3
- package/dist/esm/zonos-logo.entry.js +28 -0
- package/dist/esm/zonos-notification.entry.js +5 -6
- package/dist/esm/zonos-payment.entry.js +6 -7
- package/dist/esm/zonos-select-dialog-header_2.entry.js +40 -0
- package/dist/esm/zonos-shipping-rich-radio.entry.js +4 -4
- package/dist/esm/zonos-text.entry.js +4 -6
- package/dist/esm/{zonosStore-e59617f8.js → zonosStore-dec6bd7e.js} +5 -5
- package/dist/esm-es5/ILanguage-97790bee.js +1 -0
- package/dist/esm-es5/app-globals-0f993ce5.js +1 -0
- package/dist/esm-es5/cart-2a0a6871.js +1 -0
- package/dist/esm-es5/getBorderRadius-0c7dfcf0.js +1 -0
- package/dist/esm-es5/index.js +0 -1
- package/dist/esm-es5/{isDarkColor-8696cb70.js → isDarkColor-d0a57fd2.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/submitGtag-a38aed23.js +1 -0
- package/dist/esm-es5/zonos-address_4.entry.js +1 -0
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -0
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -0
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -0
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- 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 -0
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -0
- 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-logo.entry.js +1 -0
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -0
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-e59617f8.js → zonosStore-dec6bd7e.js} +1 -1
- package/dist/scripts/insertTranslations.js +1 -0
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +2 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.d.ts +7 -0
- package/dist/types/components/common/zonos-badge/zonos-badge.d.ts +1 -5
- package/dist/types/components/common/zonos-banner/zonos-banner.d.ts +0 -4
- package/dist/types/components/common/zonos-button/zonos-button.d.ts +1 -5
- package/dist/types/components/common/zonos-card/zonos-card.d.ts +0 -4
- package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +42 -0
- package/dist/types/components/common/zonos-country-flag/zonos-country-flag.d.ts +0 -4
- package/dist/types/components/common/zonos-country-select/zonos-country-select.d.ts +1 -1
- package/dist/types/components/common/zonos-icon/zonos-icon.d.ts +1 -1
- package/dist/types/components/common/zonos-language-select/zonos-language-select.d.ts +9 -0
- package/dist/types/components/common/zonos-logo/zonos-logo.d.ts +0 -4
- package/dist/types/components/common/zonos-notification/zonos-notification.d.ts +0 -4
- package/dist/types/components/common/zonos-select-dialog-header/zonos-select-dialog-header.d.ts +12 -0
- package/dist/types/components/common/zonos-spinner/zonos-spinner.d.ts +1 -1
- package/dist/types/components/common/zonos-text/zonos-text.d.ts +1 -5
- package/dist/types/components/common/zonos-tooltip/zonos-tooltip.d.ts +12 -0
- package/dist/types/components/common/zonos-v-stack/zonos-v-stack.d.ts +0 -4
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.d.ts +5 -0
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +2 -0
- package/dist/types/components/store/checkout/stripe.d.ts +12 -0
- package/dist/types/components/store/hello/localization.d.ts +2 -1
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +18 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +18 -0
- package/dist/types/components/store/zonosStore.d.ts +1 -1
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +3 -0
- package/dist/types/components/utils/api/triggerBuildLandedCost.d.ts +18 -2
- package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
- package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
- package/dist/types/components/utils/getBorderRadius.d.ts +1 -1
- package/dist/types/components/utils/hello/currencyConversion/getLanguageCode.d.ts +1 -1
- package/dist/types/components.d.ts +242 -116
- package/dist/types/types/ICountryJson.d.ts +2 -1
- package/dist/types/types/ILanguage.d.ts +81 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +3 -3
- package/dist/types/types/checkout/api/CalculateLandedCostRequest.d.ts +13 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +31 -4
- package/dist/types/types/generated/graphql.customer.types.ts +45 -4
- package/dist/types/types/generated/graphql.frontend.types.d.ts +5 -5
- package/dist/types/types/generated/graphql.frontend.types.ts +13 -3
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/styles/Color.d.ts +2 -0
- package/dist/zonos-elements/index.esm.js +0 -1
- package/dist/zonos-elements/p-0057e374.entry.js +1 -0
- package/dist/zonos-elements/{p-120df5be.system.entry.js → p-06652d87.system.entry.js} +1 -1
- package/dist/zonos-elements/p-066c5893.system.js +1 -0
- package/dist/zonos-elements/p-0c72fb79.system.entry.js +1 -0
- package/dist/zonos-elements/p-16ad90ca.js +1 -0
- package/dist/zonos-elements/p-1f85a98c.system.entry.js +1 -0
- package/dist/zonos-elements/p-290c3670.entry.js +1 -0
- package/dist/zonos-elements/p-2d2e1831.entry.js +1 -0
- package/dist/zonos-elements/p-2f1e1cbb.system.entry.js +1 -0
- package/dist/zonos-elements/p-33080cde.system.entry.js +1 -0
- package/dist/zonos-elements/{p-0024f8c2.js → p-34c03be2.js} +1 -1
- package/dist/zonos-elements/p-34efed1d.entry.js +1 -0
- package/dist/zonos-elements/p-375c472a.system.entry.js +1 -0
- package/dist/zonos-elements/p-50ea2036.system.js +1 -0
- package/dist/zonos-elements/p-549c181b.system.js +1 -0
- package/dist/zonos-elements/{p-be23cc91.system.entry.js → p-55970b10.system.entry.js} +1 -1
- package/dist/zonos-elements/p-561e44d6.entry.js +1 -0
- package/dist/zonos-elements/p-56ba5cbf.system.js +1 -0
- package/dist/zonos-elements/{p-dc09ca69.system.js → p-591eb6dd.system.js} +1 -1
- package/dist/zonos-elements/p-5b44abc8.system.js +1 -0
- package/dist/zonos-elements/p-5c4dc123.js +1 -0
- package/dist/zonos-elements/p-656c836b.entry.js +1 -0
- package/dist/zonos-elements/p-67737613.system.entry.js +1 -0
- package/dist/zonos-elements/p-79b910bf.system.entry.js +1 -0
- package/dist/zonos-elements/p-7d1d862f.system.entry.js +1 -0
- package/dist/zonos-elements/{p-5a0264e8.system.entry.js → p-88a55076.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8aeb4679.system.entry.js +1 -0
- package/dist/zonos-elements/p-8d645a00.entry.js +1 -0
- package/dist/zonos-elements/p-9878a770.js +1 -0
- package/dist/zonos-elements/p-a219689f.entry.js +1 -0
- package/dist/zonos-elements/p-a3d72a33.entry.js +1 -0
- package/dist/zonos-elements/{p-aca66e4b.entry.js → p-a4de3fb2.entry.js} +1 -1
- package/dist/zonos-elements/p-a93c594f.entry.js +1 -0
- package/dist/zonos-elements/p-a95c034c.entry.js +1 -0
- package/dist/zonos-elements/p-abe7524f.system.js +1 -0
- package/dist/zonos-elements/p-afe40057.entry.js +1 -0
- package/dist/zonos-elements/p-b10ff468.entry.js +1 -0
- package/dist/zonos-elements/p-b6992dc2.system.entry.js +1 -0
- package/dist/zonos-elements/{p-af910392.js → p-bce46c41.js} +1 -1
- package/dist/zonos-elements/p-c56d4a44.entry.js +1 -0
- package/dist/zonos-elements/p-c7098c3b.entry.js +1 -0
- package/dist/zonos-elements/{p-ead79548.system.js → p-cbb1e700.system.js} +1 -1
- package/dist/zonos-elements/p-cc63a29f.system.entry.js +1 -0
- package/dist/zonos-elements/p-cd8bd5e9.system.entry.js +1 -0
- package/dist/zonos-elements/p-d36faf87.system.entry.js +1 -0
- package/dist/zonos-elements/p-dfd3edcf.entry.js +1 -0
- package/dist/zonos-elements/p-e1255160.js +1 -0
- package/dist/zonos-elements/p-e161a08c.entry.js +1 -0
- package/dist/zonos-elements/p-e2770968.system.entry.js +1 -0
- package/dist/zonos-elements/p-e2c6ad57.entry.js +1 -0
- package/dist/zonos-elements/{p-73174d0c.system.entry.js → p-e855966f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ea93943a.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7f68c103.system.js → p-ec4d08b3.system.js} +1 -1
- package/dist/zonos-elements/{p-e8da4463.js → p-f455e08c.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +17 -18
- package/dist/cjs/cart-c1b0915c.js +0 -655
- package/dist/cjs/zonos-address_2.cjs.entry.js +0 -161
- package/dist/cjs/zonos-badge.cjs.entry.js +0 -38
- package/dist/cjs/zonos-icon.cjs.entry.js +0 -35
- package/dist/collection/components/common/zonos-country-select/assets/arrowLeftBlue.svg +0 -1
- package/dist/components/cart.js +0 -637
- package/dist/components/zonos-logo2.js +0 -48
- package/dist/esm/cart-7e7c7585.js +0 -637
- package/dist/esm/getBorderRadius-9e4cb3b1.js +0 -16
- package/dist/esm/zonos-address_2.entry.js +0 -156
- package/dist/esm/zonos-badge.entry.js +0 -34
- package/dist/esm/zonos-icon.entry.js +0 -31
- package/dist/esm-es5/cart-7e7c7585.js +0 -1
- package/dist/esm-es5/getBorderRadius-9e4cb3b1.js +0 -1
- package/dist/esm-es5/localization-5d83fde2.js +0 -1
- package/dist/esm-es5/submitGtag-776c5e10.js +0 -1
- package/dist/esm-es5/zonos-address_2.entry.js +0 -1
- package/dist/esm-es5/zonos-badge.entry.js +0 -1
- package/dist/esm-es5/zonos-button_2.entry.js +0 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +0 -1
- package/dist/esm-es5/zonos-country-flag_4.entry.js +0 -1
- package/dist/esm-es5/zonos-icon.entry.js +0 -1
- package/dist/zonos-elements/p-027abb50.entry.js +0 -1
- package/dist/zonos-elements/p-09c5dc1b.system.entry.js +0 -1
- package/dist/zonos-elements/p-1156ae5d.system.entry.js +0 -1
- package/dist/zonos-elements/p-12ecf765.system.js +0 -1
- package/dist/zonos-elements/p-174239da.system.js +0 -1
- package/dist/zonos-elements/p-18e09138.system.entry.js +0 -1
- package/dist/zonos-elements/p-1c00ffea.system.entry.js +0 -1
- package/dist/zonos-elements/p-21793192.entry.js +0 -1
- package/dist/zonos-elements/p-2589a038.system.entry.js +0 -1
- package/dist/zonos-elements/p-28d7b75d.entry.js +0 -1
- package/dist/zonos-elements/p-31fa76da.entry.js +0 -1
- package/dist/zonos-elements/p-3319e4db.entry.js +0 -1
- package/dist/zonos-elements/p-357f0c61.entry.js +0 -1
- package/dist/zonos-elements/p-410045c5.system.entry.js +0 -1
- package/dist/zonos-elements/p-4d0861e9.system.js +0 -1
- package/dist/zonos-elements/p-54ef8ff3.entry.js +0 -1
- package/dist/zonos-elements/p-626b5a52.system.entry.js +0 -1
- package/dist/zonos-elements/p-6444a4b9.entry.js +0 -1
- package/dist/zonos-elements/p-65f4af1a.system.entry.js +0 -1
- package/dist/zonos-elements/p-661bc488.entry.js +0 -1
- package/dist/zonos-elements/p-6c47083f.entry.js +0 -1
- package/dist/zonos-elements/p-6d454281.entry.js +0 -1
- package/dist/zonos-elements/p-7748735d.entry.js +0 -1
- package/dist/zonos-elements/p-78886ed6.system.entry.js +0 -1
- package/dist/zonos-elements/p-8ebc0b64.js +0 -1
- package/dist/zonos-elements/p-a6f2e282.system.js +0 -1
- package/dist/zonos-elements/p-b035f9e5.system.js +0 -1
- package/dist/zonos-elements/p-b1ffb37b.entry.js +0 -1
- package/dist/zonos-elements/p-b58d2231.entry.js +0 -1
- package/dist/zonos-elements/p-bd02a65c.entry.js +0 -1
- package/dist/zonos-elements/p-bea31a7b.system.entry.js +0 -1
- package/dist/zonos-elements/p-cfe4a318.js +0 -1
- package/dist/zonos-elements/p-e4a2a1b0.system.entry.js +0 -1
- package/dist/zonos-elements/p-eb631432.system.entry.js +0 -1
- package/dist/zonos-elements/p-f2733cc7.js +0 -1
- package/dist/zonos-elements/p-f342e7c7.entry.js +0 -1
- package/dist/zonos-elements/p-f82e000f.system.entry.js +0 -1
- /package/dist/cjs/{index-3ead02fe.js → index-72767498.js} +0 -0
- /package/dist/esm/{index-81a199ef.js → index-b5be4dc3.js} +0 -0
- /package/dist/esm-es5/{index-81a199ef.js → index-b5be4dc3.js} +0 -0
- /package/dist/zonos-elements/{p-4d8545e1.js → p-58127116.js} +0 -0
- /package/dist/zonos-elements/{p-4d39efb6.system.js → p-d1ab0823.system.js} +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const zonosStore = require('./zonosStore-
|
|
3
|
+
const zonosStore = require('./zonosStore-49d4c92a.js');
|
|
4
|
+
const isDarkColor = require('./isDarkColor-924e6a7a.js');
|
|
5
|
+
const getBorderRadius = require('./getBorderRadius-834c321d.js');
|
|
4
6
|
|
|
5
7
|
const stringsArabic = {
|
|
6
8
|
'Above de minimis threshold for': {
|
|
@@ -12,6 +14,9 @@ const stringsArabic = {
|
|
|
12
14
|
Back: {
|
|
13
15
|
value: 'رجوع',
|
|
14
16
|
},
|
|
17
|
+
'Billing address': {
|
|
18
|
+
value: 'عنوان الفوترة',
|
|
19
|
+
},
|
|
15
20
|
'Cart subtotal': {
|
|
16
21
|
value: 'المجموع الفرعي للسلة',
|
|
17
22
|
},
|
|
@@ -60,6 +65,9 @@ const stringsArabic = {
|
|
|
60
65
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
61
66
|
value: 'لم يتم العثور على طرق شحن - جرب تحرير عنوانك أو الاتصال بالدعم إذا استمر الخطأ',
|
|
62
67
|
},
|
|
68
|
+
'Nothing due at the door': {
|
|
69
|
+
value: 'لا شيء مستحق عند الباب',
|
|
70
|
+
},
|
|
63
71
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
64
72
|
value: 'الطلبية أعلى من الحد الأدنى لكل من الرسوم والضرائب',
|
|
65
73
|
},
|
|
@@ -93,12 +101,24 @@ const stringsArabic = {
|
|
|
93
101
|
'Restricted items found': {
|
|
94
102
|
value: 'تم العثور على عناصر مقيدة',
|
|
95
103
|
},
|
|
104
|
+
'Search countries': {
|
|
105
|
+
value: 'ابحث عن الدول',
|
|
106
|
+
},
|
|
96
107
|
'See duty and tax thresholds': {
|
|
97
108
|
value: 'انظر عتبات الرسوم والضرائب',
|
|
98
109
|
},
|
|
110
|
+
'Select a country': {
|
|
111
|
+
value: 'اختر دولة',
|
|
112
|
+
},
|
|
113
|
+
'Select a language': {
|
|
114
|
+
value: 'اختر لغة',
|
|
115
|
+
},
|
|
99
116
|
Shipping: {
|
|
100
117
|
value: 'الشحن',
|
|
101
118
|
},
|
|
119
|
+
'Shipping address same as billing': {
|
|
120
|
+
value: 'عنوان الشحن مطابق لعنوان الفوترة',
|
|
121
|
+
},
|
|
102
122
|
'Shipping information': {
|
|
103
123
|
value: 'معلومات الشحن',
|
|
104
124
|
},
|
|
@@ -162,6 +182,9 @@ const stringsBase = {
|
|
|
162
182
|
Back: {
|
|
163
183
|
value: 'Back',
|
|
164
184
|
},
|
|
185
|
+
'Billing address': {
|
|
186
|
+
value: 'Billing address',
|
|
187
|
+
},
|
|
165
188
|
'Cart subtotal': {
|
|
166
189
|
value: 'Cart subtotal',
|
|
167
190
|
},
|
|
@@ -210,6 +233,9 @@ const stringsBase = {
|
|
|
210
233
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
211
234
|
value: 'No shipping methods found - try editing your address or contacting support if the error persists',
|
|
212
235
|
},
|
|
236
|
+
'Nothing due at the door': {
|
|
237
|
+
value: 'Nothing due at the door',
|
|
238
|
+
},
|
|
213
239
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
214
240
|
value: 'Order is over the de minimis threshold for both duty and tax',
|
|
215
241
|
},
|
|
@@ -243,12 +269,24 @@ const stringsBase = {
|
|
|
243
269
|
'Restricted items found': {
|
|
244
270
|
value: 'Restricted items found',
|
|
245
271
|
},
|
|
272
|
+
'Search countries': {
|
|
273
|
+
value: 'Search countries',
|
|
274
|
+
},
|
|
246
275
|
'See duty and tax thresholds': {
|
|
247
276
|
value: 'See duty and tax thresholds',
|
|
248
277
|
},
|
|
278
|
+
'Select a country': {
|
|
279
|
+
value: 'Select a country',
|
|
280
|
+
},
|
|
281
|
+
'Select a language': {
|
|
282
|
+
value: 'Select a language',
|
|
283
|
+
},
|
|
249
284
|
Shipping: {
|
|
250
285
|
value: 'Shipping',
|
|
251
286
|
},
|
|
287
|
+
'Shipping address same as billing': {
|
|
288
|
+
value: 'Shipping address same as billing',
|
|
289
|
+
},
|
|
252
290
|
'Shipping information': {
|
|
253
291
|
value: 'Shipping information',
|
|
254
292
|
},
|
|
@@ -312,6 +350,9 @@ const stringsChinese = {
|
|
|
312
350
|
Back: {
|
|
313
351
|
value: '返回',
|
|
314
352
|
},
|
|
353
|
+
'Billing address': {
|
|
354
|
+
value: '账单地址',
|
|
355
|
+
},
|
|
315
356
|
'Cart subtotal': {
|
|
316
357
|
value: '购物车小计',
|
|
317
358
|
},
|
|
@@ -360,6 +401,9 @@ const stringsChinese = {
|
|
|
360
401
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
361
402
|
value: '未找到运输方法 - 如果错误仍然存在,请尝试编辑您的地址或联系支持',
|
|
362
403
|
},
|
|
404
|
+
'Nothing due at the door': {
|
|
405
|
+
value: '门口无需付款',
|
|
406
|
+
},
|
|
363
407
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
364
408
|
value: '订单超过关税和税款的最低征税门槛',
|
|
365
409
|
},
|
|
@@ -393,12 +437,24 @@ const stringsChinese = {
|
|
|
393
437
|
'Restricted items found': {
|
|
394
438
|
value: '发现受限制的商品',
|
|
395
439
|
},
|
|
440
|
+
'Search countries': {
|
|
441
|
+
value: '搜索国家',
|
|
442
|
+
},
|
|
396
443
|
'See duty and tax thresholds': {
|
|
397
444
|
value: '查看关税和税款门槛',
|
|
398
445
|
},
|
|
446
|
+
'Select a country': {
|
|
447
|
+
value: '选择一个国家',
|
|
448
|
+
},
|
|
449
|
+
'Select a language': {
|
|
450
|
+
value: '选择一种语言',
|
|
451
|
+
},
|
|
399
452
|
Shipping: {
|
|
400
453
|
value: '运输',
|
|
401
454
|
},
|
|
455
|
+
'Shipping address same as billing': {
|
|
456
|
+
value: '送货地址与账单地址相同',
|
|
457
|
+
},
|
|
402
458
|
'Shipping information': {
|
|
403
459
|
value: '运输信息',
|
|
404
460
|
},
|
|
@@ -462,6 +518,9 @@ const stringsDanish = {
|
|
|
462
518
|
Back: {
|
|
463
519
|
value: 'Tilbage',
|
|
464
520
|
},
|
|
521
|
+
'Billing address': {
|
|
522
|
+
value: 'Fakturaadresse',
|
|
523
|
+
},
|
|
465
524
|
'Cart subtotal': {
|
|
466
525
|
value: 'Subtotal på kurv',
|
|
467
526
|
},
|
|
@@ -510,6 +569,9 @@ const stringsDanish = {
|
|
|
510
569
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
511
570
|
value: 'Ingen forsendelsesmetoder fundet - prøv at redigere din adresse eller kontakte support, hvis fejlen fortsætter',
|
|
512
571
|
},
|
|
572
|
+
'Nothing due at the door': {
|
|
573
|
+
value: 'Intet at betale ved døren',
|
|
574
|
+
},
|
|
513
575
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
514
576
|
value: 'Ordre er over de minimis-grænsen for både told og skat',
|
|
515
577
|
},
|
|
@@ -543,12 +605,24 @@ const stringsDanish = {
|
|
|
543
605
|
'Restricted items found': {
|
|
544
606
|
value: 'Begrænsede varer fundet',
|
|
545
607
|
},
|
|
608
|
+
'Search countries': {
|
|
609
|
+
value: 'Søg lande',
|
|
610
|
+
},
|
|
546
611
|
'See duty and tax thresholds': {
|
|
547
612
|
value: 'Se grænser for told og skatter',
|
|
548
613
|
},
|
|
614
|
+
'Select a country': {
|
|
615
|
+
value: 'Vælg et land',
|
|
616
|
+
},
|
|
617
|
+
'Select a language': {
|
|
618
|
+
value: 'Vælg et sprog',
|
|
619
|
+
},
|
|
549
620
|
Shipping: {
|
|
550
621
|
value: 'Levering',
|
|
551
622
|
},
|
|
623
|
+
'Shipping address same as billing': {
|
|
624
|
+
value: 'Leveringsadresse samme som fakturaadresse',
|
|
625
|
+
},
|
|
552
626
|
'Shipping information': {
|
|
553
627
|
value: 'Leveringsinformation',
|
|
554
628
|
},
|
|
@@ -612,6 +686,9 @@ const stringsDutch = {
|
|
|
612
686
|
Back: {
|
|
613
687
|
value: 'Terug',
|
|
614
688
|
},
|
|
689
|
+
'Billing address': {
|
|
690
|
+
value: 'Factuuradres',
|
|
691
|
+
},
|
|
615
692
|
'Cart subtotal': {
|
|
616
693
|
value: 'Winkelwagen subtotaal',
|
|
617
694
|
},
|
|
@@ -660,6 +737,9 @@ const stringsDutch = {
|
|
|
660
737
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
661
738
|
value: 'Geen verzendmethoden gevonden - probeer uw adres te bewerken of neem contact op met de ondersteuning als de fout aanhoudt',
|
|
662
739
|
},
|
|
740
|
+
'Nothing due at the door': {
|
|
741
|
+
value: 'Niets te betalen aan de deur',
|
|
742
|
+
},
|
|
663
743
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
664
744
|
value: 'Bestelling overschrijdt de minimale drempel voor zowel heffing als belasting',
|
|
665
745
|
},
|
|
@@ -693,12 +773,24 @@ const stringsDutch = {
|
|
|
693
773
|
'Restricted items found': {
|
|
694
774
|
value: 'Beperkte items gevonden',
|
|
695
775
|
},
|
|
776
|
+
'Search countries': {
|
|
777
|
+
value: 'Zoek landen',
|
|
778
|
+
},
|
|
696
779
|
'See duty and tax thresholds': {
|
|
697
780
|
value: 'Bekijk heffings- en belastingdrempels',
|
|
698
781
|
},
|
|
782
|
+
'Select a country': {
|
|
783
|
+
value: 'Selecteer een land',
|
|
784
|
+
},
|
|
785
|
+
'Select a language': {
|
|
786
|
+
value: 'Selecteer een taal',
|
|
787
|
+
},
|
|
699
788
|
Shipping: {
|
|
700
789
|
value: 'Verzending',
|
|
701
790
|
},
|
|
791
|
+
'Shipping address same as billing': {
|
|
792
|
+
value: 'Verzendadres gelijk aan factuuradres',
|
|
793
|
+
},
|
|
702
794
|
'Shipping information': {
|
|
703
795
|
value: 'Verzendinformatie',
|
|
704
796
|
},
|
|
@@ -762,6 +854,9 @@ const stringsFrench = {
|
|
|
762
854
|
Back: {
|
|
763
855
|
value: 'Retour',
|
|
764
856
|
},
|
|
857
|
+
'Billing address': {
|
|
858
|
+
value: 'Adresse de facturation',
|
|
859
|
+
},
|
|
765
860
|
'Cart subtotal': {
|
|
766
861
|
value: 'Sous-total du panier',
|
|
767
862
|
},
|
|
@@ -810,6 +905,9 @@ const stringsFrench = {
|
|
|
810
905
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
811
906
|
value: "Aucune méthode d'expédition trouvée - essayez de modifier votre adresse ou de contacter le support si l'erreur persiste",
|
|
812
907
|
},
|
|
908
|
+
'Nothing due at the door': {
|
|
909
|
+
value: 'Rien à payer à la porte',
|
|
910
|
+
},
|
|
813
911
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
814
912
|
value: 'La commande dépasse le seuil de minimis pour les droits et les taxes',
|
|
815
913
|
},
|
|
@@ -843,12 +941,24 @@ const stringsFrench = {
|
|
|
843
941
|
'Restricted items found': {
|
|
844
942
|
value: 'Articles restreints trouvés',
|
|
845
943
|
},
|
|
944
|
+
'Search countries': {
|
|
945
|
+
value: 'Rechercher des pays',
|
|
946
|
+
},
|
|
846
947
|
'See duty and tax thresholds': {
|
|
847
948
|
value: 'Voir les seuils pour les droits et taxes',
|
|
848
949
|
},
|
|
950
|
+
'Select a country': {
|
|
951
|
+
value: 'Sélectionner un pays',
|
|
952
|
+
},
|
|
953
|
+
'Select a language': {
|
|
954
|
+
value: 'Sélectionner une langue',
|
|
955
|
+
},
|
|
849
956
|
Shipping: {
|
|
850
957
|
value: 'Livraison',
|
|
851
958
|
},
|
|
959
|
+
'Shipping address same as billing': {
|
|
960
|
+
value: "Adresse de livraison identique à l'adresse de facturation",
|
|
961
|
+
},
|
|
852
962
|
'Shipping information': {
|
|
853
963
|
value: 'Informations de livraison',
|
|
854
964
|
},
|
|
@@ -912,6 +1022,9 @@ const stringsGerman = {
|
|
|
912
1022
|
Back: {
|
|
913
1023
|
value: 'Zurück',
|
|
914
1024
|
},
|
|
1025
|
+
'Billing address': {
|
|
1026
|
+
value: 'Rechnungsadresse',
|
|
1027
|
+
},
|
|
915
1028
|
'Cart subtotal': {
|
|
916
1029
|
value: 'Warenkorbzwischensumme',
|
|
917
1030
|
},
|
|
@@ -960,6 +1073,9 @@ const stringsGerman = {
|
|
|
960
1073
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
961
1074
|
value: 'Keine Versandmethoden gefunden - versuchen Sie, Ihre Adresse zu bearbeiten, oder kontaktieren Sie den Support, wenn der Fehler weiterhin besteht',
|
|
962
1075
|
},
|
|
1076
|
+
'Nothing due at the door': {
|
|
1077
|
+
value: 'An der Tür nichts zu bezahlen',
|
|
1078
|
+
},
|
|
963
1079
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
964
1080
|
value: 'Bestellung überschreitet Mindestgrenze sowohl für Zoll als auch Steuer',
|
|
965
1081
|
},
|
|
@@ -993,12 +1109,24 @@ const stringsGerman = {
|
|
|
993
1109
|
'Restricted items found': {
|
|
994
1110
|
value: 'Eingeschränkte Artikel gefunden',
|
|
995
1111
|
},
|
|
1112
|
+
'Search countries': {
|
|
1113
|
+
value: 'Länder durchsuchen',
|
|
1114
|
+
},
|
|
996
1115
|
'See duty and tax thresholds': {
|
|
997
1116
|
value: 'Zoll- und Steuerschwellen ansehen',
|
|
998
1117
|
},
|
|
1118
|
+
'Select a country': {
|
|
1119
|
+
value: 'Wählen Sie ein Land aus',
|
|
1120
|
+
},
|
|
1121
|
+
'Select a language': {
|
|
1122
|
+
value: 'Wähle eine Sprache',
|
|
1123
|
+
},
|
|
999
1124
|
Shipping: {
|
|
1000
1125
|
value: 'Versand',
|
|
1001
1126
|
},
|
|
1127
|
+
'Shipping address same as billing': {
|
|
1128
|
+
value: 'Lieferadresse wie Rechnungsadresse',
|
|
1129
|
+
},
|
|
1002
1130
|
'Shipping information': {
|
|
1003
1131
|
value: 'Versandinformationen',
|
|
1004
1132
|
},
|
|
@@ -1062,6 +1190,9 @@ const stringsHebrew = {
|
|
|
1062
1190
|
Back: {
|
|
1063
1191
|
value: 'חזור',
|
|
1064
1192
|
},
|
|
1193
|
+
'Billing address': {
|
|
1194
|
+
value: 'כתובת לחיוב',
|
|
1195
|
+
},
|
|
1065
1196
|
'Cart subtotal': {
|
|
1066
1197
|
value: 'סיכום ביניים של העגלה',
|
|
1067
1198
|
},
|
|
@@ -1110,6 +1241,9 @@ const stringsHebrew = {
|
|
|
1110
1241
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
1111
1242
|
value: 'לא נמצאו שיטות משלוח - נסו לערוך את הכתובת שלך או ליצור קשר עם התמיכה אם השגיאה ממשיכה',
|
|
1112
1243
|
},
|
|
1244
|
+
'Nothing due at the door': {
|
|
1245
|
+
value: 'אין כלום לשלם בדלת',
|
|
1246
|
+
},
|
|
1113
1247
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
1114
1248
|
value: 'ההזמנה חורגת מסף המינימום גם למכס וגם למס',
|
|
1115
1249
|
},
|
|
@@ -1143,12 +1277,24 @@ const stringsHebrew = {
|
|
|
1143
1277
|
'Restricted items found': {
|
|
1144
1278
|
value: 'נמצאו פריטים מוגבלים',
|
|
1145
1279
|
},
|
|
1280
|
+
'Search countries': {
|
|
1281
|
+
value: 'חיפוש מדינות',
|
|
1282
|
+
},
|
|
1146
1283
|
'See duty and tax thresholds': {
|
|
1147
1284
|
value: 'צפה בספים של מכסים ומסים',
|
|
1148
1285
|
},
|
|
1286
|
+
'Select a country': {
|
|
1287
|
+
value: 'בחר מדינה',
|
|
1288
|
+
},
|
|
1289
|
+
'Select a language': {
|
|
1290
|
+
value: 'בחר שפה',
|
|
1291
|
+
},
|
|
1149
1292
|
Shipping: {
|
|
1150
1293
|
value: 'משלוח',
|
|
1151
1294
|
},
|
|
1295
|
+
'Shipping address same as billing': {
|
|
1296
|
+
value: 'כתובת המשלוח זהה לכתובת החיוב',
|
|
1297
|
+
},
|
|
1152
1298
|
'Shipping information': {
|
|
1153
1299
|
value: 'פרטי משלוח',
|
|
1154
1300
|
},
|
|
@@ -1212,6 +1358,9 @@ const stringsIndonesian = {
|
|
|
1212
1358
|
Back: {
|
|
1213
1359
|
value: 'Kembali',
|
|
1214
1360
|
},
|
|
1361
|
+
'Billing address': {
|
|
1362
|
+
value: 'Alamat Penagihan',
|
|
1363
|
+
},
|
|
1215
1364
|
'Cart subtotal': {
|
|
1216
1365
|
value: 'Subtotal keranjang',
|
|
1217
1366
|
},
|
|
@@ -1260,6 +1409,9 @@ const stringsIndonesian = {
|
|
|
1260
1409
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
1261
1410
|
value: 'Tidak ditemukan metode pengiriman - coba edit alamat Anda atau hubungi dukungan jika kesalahan masih berlanjut',
|
|
1262
1411
|
},
|
|
1412
|
+
'Nothing due at the door': {
|
|
1413
|
+
value: 'Tidak ada yang harus dibayar di pintu',
|
|
1414
|
+
},
|
|
1263
1415
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
1264
1416
|
value: 'Pesanan melebihi ambang batas de minimis untuk bea masuk dan pajak',
|
|
1265
1417
|
},
|
|
@@ -1293,12 +1445,24 @@ const stringsIndonesian = {
|
|
|
1293
1445
|
'Restricted items found': {
|
|
1294
1446
|
value: 'Item terbatas ditemukan',
|
|
1295
1447
|
},
|
|
1448
|
+
'Search countries': {
|
|
1449
|
+
value: 'Cari negara',
|
|
1450
|
+
},
|
|
1296
1451
|
'See duty and tax thresholds': {
|
|
1297
1452
|
value: 'Lihat ambang batas bea masuk dan pajak',
|
|
1298
1453
|
},
|
|
1454
|
+
'Select a country': {
|
|
1455
|
+
value: 'Pilih sebuah negara',
|
|
1456
|
+
},
|
|
1457
|
+
'Select a language': {
|
|
1458
|
+
value: 'Pilih bahasa',
|
|
1459
|
+
},
|
|
1299
1460
|
Shipping: {
|
|
1300
1461
|
value: 'Pengiriman',
|
|
1301
1462
|
},
|
|
1463
|
+
'Shipping address same as billing': {
|
|
1464
|
+
value: 'Alamat pengiriman sama dengan alamat penagihan',
|
|
1465
|
+
},
|
|
1302
1466
|
'Shipping information': {
|
|
1303
1467
|
value: 'Informasi pengiriman',
|
|
1304
1468
|
},
|
|
@@ -1362,6 +1526,9 @@ const stringsItalian = {
|
|
|
1362
1526
|
Back: {
|
|
1363
1527
|
value: 'Indietro',
|
|
1364
1528
|
},
|
|
1529
|
+
'Billing address': {
|
|
1530
|
+
value: 'Indirizzo di fatturazione',
|
|
1531
|
+
},
|
|
1365
1532
|
'Cart subtotal': {
|
|
1366
1533
|
value: 'Subtotale carrello',
|
|
1367
1534
|
},
|
|
@@ -1410,6 +1577,9 @@ const stringsItalian = {
|
|
|
1410
1577
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
1411
1578
|
value: "Nessun metodo di spedizione trovato - prova a modificare il tuo indirizzo o contatta il supporto se l'errore persiste",
|
|
1412
1579
|
},
|
|
1580
|
+
'Nothing due at the door': {
|
|
1581
|
+
value: 'Nulla da pagare alla porta',
|
|
1582
|
+
},
|
|
1413
1583
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
1414
1584
|
value: "L'ordine supera la soglia di minimis sia per i dazi che per le tasse",
|
|
1415
1585
|
},
|
|
@@ -1443,12 +1613,24 @@ const stringsItalian = {
|
|
|
1443
1613
|
'Restricted items found': {
|
|
1444
1614
|
value: 'Articoli limitati trovati',
|
|
1445
1615
|
},
|
|
1616
|
+
'Search countries': {
|
|
1617
|
+
value: 'Cerca paesi',
|
|
1618
|
+
},
|
|
1446
1619
|
'See duty and tax thresholds': {
|
|
1447
1620
|
value: 'Visualizza le soglie di dazi e tasse',
|
|
1448
1621
|
},
|
|
1622
|
+
'Select a country': {
|
|
1623
|
+
value: 'Seleziona un paese',
|
|
1624
|
+
},
|
|
1625
|
+
'Select a language': {
|
|
1626
|
+
value: 'Seleziona una lingua',
|
|
1627
|
+
},
|
|
1449
1628
|
Shipping: {
|
|
1450
1629
|
value: 'Spedizione',
|
|
1451
1630
|
},
|
|
1631
|
+
'Shipping address same as billing': {
|
|
1632
|
+
value: 'Indirizzo di spedizione uguale a quello di fatturazione',
|
|
1633
|
+
},
|
|
1452
1634
|
'Shipping information': {
|
|
1453
1635
|
value: 'Informazioni di spedizione',
|
|
1454
1636
|
},
|
|
@@ -1512,6 +1694,9 @@ const stringsJapanese = {
|
|
|
1512
1694
|
Back: {
|
|
1513
1695
|
value: '戻る',
|
|
1514
1696
|
},
|
|
1697
|
+
'Billing address': {
|
|
1698
|
+
value: '請求先住所',
|
|
1699
|
+
},
|
|
1515
1700
|
'Cart subtotal': {
|
|
1516
1701
|
value: 'カートの小計',
|
|
1517
1702
|
},
|
|
@@ -1560,6 +1745,9 @@ const stringsJapanese = {
|
|
|
1560
1745
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
1561
1746
|
value: '配送方法が見つかりません - 住所を編集するか、エラーが続く場合はサポートにお問い合わせください',
|
|
1562
1747
|
},
|
|
1748
|
+
'Nothing due at the door': {
|
|
1749
|
+
value: 'ドアでの支払いはありません',
|
|
1750
|
+
},
|
|
1563
1751
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
1564
1752
|
value: '注文が関税と税金のデミニマス閾値を超えています',
|
|
1565
1753
|
},
|
|
@@ -1593,12 +1781,24 @@ const stringsJapanese = {
|
|
|
1593
1781
|
'Restricted items found': {
|
|
1594
1782
|
value: '制限付き商品が見つかりました',
|
|
1595
1783
|
},
|
|
1784
|
+
'Search countries': {
|
|
1785
|
+
value: '国を検索',
|
|
1786
|
+
},
|
|
1596
1787
|
'See duty and tax thresholds': {
|
|
1597
1788
|
value: '関税と税金の閾値を見る',
|
|
1598
1789
|
},
|
|
1790
|
+
'Select a country': {
|
|
1791
|
+
value: '国を選択',
|
|
1792
|
+
},
|
|
1793
|
+
'Select a language': {
|
|
1794
|
+
value: '言語を選択',
|
|
1795
|
+
},
|
|
1599
1796
|
Shipping: {
|
|
1600
1797
|
value: '配送',
|
|
1601
1798
|
},
|
|
1799
|
+
'Shipping address same as billing': {
|
|
1800
|
+
value: '送付先住所は請求先住所と同じ',
|
|
1801
|
+
},
|
|
1602
1802
|
'Shipping information': {
|
|
1603
1803
|
value: '配送情報',
|
|
1604
1804
|
},
|
|
@@ -1662,6 +1862,9 @@ const stringsKorean = {
|
|
|
1662
1862
|
Back: {
|
|
1663
1863
|
value: '뒤로',
|
|
1664
1864
|
},
|
|
1865
|
+
'Billing address': {
|
|
1866
|
+
value: '청구지 주소',
|
|
1867
|
+
},
|
|
1665
1868
|
'Cart subtotal': {
|
|
1666
1869
|
value: '장바구니 합계',
|
|
1667
1870
|
},
|
|
@@ -1710,6 +1913,9 @@ const stringsKorean = {
|
|
|
1710
1913
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
1711
1914
|
value: '배송 방법을 찾을 수 없습니다 - 주소를 편집하거나 오류가 계속되는 경우 지원팀에 문의하세요',
|
|
1712
1915
|
},
|
|
1916
|
+
'Nothing due at the door': {
|
|
1917
|
+
value: '문 앞에 납부할 것이 없습니다',
|
|
1918
|
+
},
|
|
1713
1919
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
1714
1920
|
value: '주문 금액이 관세와 세금의 최저 임계값을 초과합니다',
|
|
1715
1921
|
},
|
|
@@ -1743,12 +1949,24 @@ const stringsKorean = {
|
|
|
1743
1949
|
'Restricted items found': {
|
|
1744
1950
|
value: '제한 물품 발견',
|
|
1745
1951
|
},
|
|
1952
|
+
'Search countries': {
|
|
1953
|
+
value: '국가 검색',
|
|
1954
|
+
},
|
|
1746
1955
|
'See duty and tax thresholds': {
|
|
1747
1956
|
value: '관세 및 세금 임계값 보기',
|
|
1748
1957
|
},
|
|
1958
|
+
'Select a country': {
|
|
1959
|
+
value: '국가 선택',
|
|
1960
|
+
},
|
|
1961
|
+
'Select a language': {
|
|
1962
|
+
value: '언어 선택',
|
|
1963
|
+
},
|
|
1749
1964
|
Shipping: {
|
|
1750
1965
|
value: '배송',
|
|
1751
1966
|
},
|
|
1967
|
+
'Shipping address same as billing': {
|
|
1968
|
+
value: '배송 주소와 청구 주소가 동일',
|
|
1969
|
+
},
|
|
1752
1970
|
'Shipping information': {
|
|
1753
1971
|
value: '배송 정보',
|
|
1754
1972
|
},
|
|
@@ -1812,6 +2030,9 @@ const stringsNorwegian = {
|
|
|
1812
2030
|
Back: {
|
|
1813
2031
|
value: 'Tilbake',
|
|
1814
2032
|
},
|
|
2033
|
+
'Billing address': {
|
|
2034
|
+
value: 'Fakturaadresse',
|
|
2035
|
+
},
|
|
1815
2036
|
'Cart subtotal': {
|
|
1816
2037
|
value: 'Delsum handlevogn',
|
|
1817
2038
|
},
|
|
@@ -1860,6 +2081,9 @@ const stringsNorwegian = {
|
|
|
1860
2081
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
1861
2082
|
value: 'Ingen fraktmetoder funnet - prøv å redigere adressen din eller kontakte støtte hvis feilen fortsetter',
|
|
1862
2083
|
},
|
|
2084
|
+
'Nothing due at the door': {
|
|
2085
|
+
value: 'Ingenting å betale ved døren',
|
|
2086
|
+
},
|
|
1863
2087
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
1864
2088
|
value: 'Bestillingen er over minstegrensen for både avgift og skatt',
|
|
1865
2089
|
},
|
|
@@ -1893,12 +2117,24 @@ const stringsNorwegian = {
|
|
|
1893
2117
|
'Restricted items found': {
|
|
1894
2118
|
value: 'Begrensede varer funnet',
|
|
1895
2119
|
},
|
|
2120
|
+
'Search countries': {
|
|
2121
|
+
value: 'Søk land',
|
|
2122
|
+
},
|
|
1896
2123
|
'See duty and tax thresholds': {
|
|
1897
2124
|
value: 'Se minstegrenser for avgifter og skatt',
|
|
1898
2125
|
},
|
|
2126
|
+
'Select a country': {
|
|
2127
|
+
value: 'Velg et land',
|
|
2128
|
+
},
|
|
2129
|
+
'Select a language': {
|
|
2130
|
+
value: 'Velg et språk',
|
|
2131
|
+
},
|
|
1899
2132
|
Shipping: {
|
|
1900
2133
|
value: 'Frakt',
|
|
1901
2134
|
},
|
|
2135
|
+
'Shipping address same as billing': {
|
|
2136
|
+
value: 'Leveringsadresse samme som fakturaadresse',
|
|
2137
|
+
},
|
|
1902
2138
|
'Shipping information': {
|
|
1903
2139
|
value: 'Fraktinformasjon',
|
|
1904
2140
|
},
|
|
@@ -1962,6 +2198,9 @@ const stringsPolish = {
|
|
|
1962
2198
|
Back: {
|
|
1963
2199
|
value: 'Wstecz',
|
|
1964
2200
|
},
|
|
2201
|
+
'Billing address': {
|
|
2202
|
+
value: 'Adres rozliczeniowy',
|
|
2203
|
+
},
|
|
1965
2204
|
'Cart subtotal': {
|
|
1966
2205
|
value: 'Suma częściowa koszyka',
|
|
1967
2206
|
},
|
|
@@ -2010,6 +2249,9 @@ const stringsPolish = {
|
|
|
2010
2249
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
2011
2250
|
value: 'Nie znaleziono metod dostawy - spróbuj edytować swój adres lub skontaktować się z obsługą, jeśli błąd będzie się utrzymywać',
|
|
2012
2251
|
},
|
|
2252
|
+
'Nothing due at the door': {
|
|
2253
|
+
value: 'Nic do zapłacenia przy drzwiach',
|
|
2254
|
+
},
|
|
2013
2255
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
2014
2256
|
value: 'Zamówienie przekracza próg minimalny zarówno dla cła, jak i podatku',
|
|
2015
2257
|
},
|
|
@@ -2043,12 +2285,24 @@ const stringsPolish = {
|
|
|
2043
2285
|
'Restricted items found': {
|
|
2044
2286
|
value: 'Znaleziono ograniczone przedmioty',
|
|
2045
2287
|
},
|
|
2288
|
+
'Search countries': {
|
|
2289
|
+
value: 'Szukaj krajów',
|
|
2290
|
+
},
|
|
2046
2291
|
'See duty and tax thresholds': {
|
|
2047
2292
|
value: 'Zobacz progi cła i podatków',
|
|
2048
2293
|
},
|
|
2294
|
+
'Select a country': {
|
|
2295
|
+
value: 'Wybierz kraj',
|
|
2296
|
+
},
|
|
2297
|
+
'Select a language': {
|
|
2298
|
+
value: 'Wybierz język',
|
|
2299
|
+
},
|
|
2049
2300
|
Shipping: {
|
|
2050
2301
|
value: 'Wysyłka',
|
|
2051
2302
|
},
|
|
2303
|
+
'Shipping address same as billing': {
|
|
2304
|
+
value: 'Adres wysyłki taki sam jak adres rozliczeniowy',
|
|
2305
|
+
},
|
|
2052
2306
|
'Shipping information': {
|
|
2053
2307
|
value: 'Informacje o wysyłce',
|
|
2054
2308
|
},
|
|
@@ -2112,6 +2366,9 @@ const stringsPortuguese = {
|
|
|
2112
2366
|
Back: {
|
|
2113
2367
|
value: 'Voltar',
|
|
2114
2368
|
},
|
|
2369
|
+
'Billing address': {
|
|
2370
|
+
value: 'Endereço de faturação',
|
|
2371
|
+
},
|
|
2115
2372
|
'Cart subtotal': {
|
|
2116
2373
|
value: 'Subtotal do carrinho',
|
|
2117
2374
|
},
|
|
@@ -2160,6 +2417,9 @@ const stringsPortuguese = {
|
|
|
2160
2417
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
2161
2418
|
value: 'Nenhum método de envio encontrado - tente editar seu endereço ou entrar em contato com o suporte se o erro persistir',
|
|
2162
2419
|
},
|
|
2420
|
+
'Nothing due at the door': {
|
|
2421
|
+
value: 'Nada a pagar na porta',
|
|
2422
|
+
},
|
|
2163
2423
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
2164
2424
|
value: 'O pedido ultrapassa o limite de isenção tanto para impostos quanto para taxas',
|
|
2165
2425
|
},
|
|
@@ -2193,12 +2453,24 @@ const stringsPortuguese = {
|
|
|
2193
2453
|
'Restricted items found': {
|
|
2194
2454
|
value: 'Itens restritos encontrados',
|
|
2195
2455
|
},
|
|
2456
|
+
'Search countries': {
|
|
2457
|
+
value: 'Buscar países',
|
|
2458
|
+
},
|
|
2196
2459
|
'See duty and tax thresholds': {
|
|
2197
2460
|
value: 'Veja os limites de isenção de impostos e taxas',
|
|
2198
2461
|
},
|
|
2462
|
+
'Select a country': {
|
|
2463
|
+
value: 'Selecionar um país',
|
|
2464
|
+
},
|
|
2465
|
+
'Select a language': {
|
|
2466
|
+
value: 'Selecionar um idioma',
|
|
2467
|
+
},
|
|
2199
2468
|
Shipping: {
|
|
2200
2469
|
value: 'Frete',
|
|
2201
2470
|
},
|
|
2471
|
+
'Shipping address same as billing': {
|
|
2472
|
+
value: 'Endereço de entrega igual ao de faturação',
|
|
2473
|
+
},
|
|
2202
2474
|
'Shipping information': {
|
|
2203
2475
|
value: 'Informações de envio',
|
|
2204
2476
|
},
|
|
@@ -2262,6 +2534,9 @@ const stringsRussian = {
|
|
|
2262
2534
|
Back: {
|
|
2263
2535
|
value: 'Назад',
|
|
2264
2536
|
},
|
|
2537
|
+
'Billing address': {
|
|
2538
|
+
value: 'Платежный адрес',
|
|
2539
|
+
},
|
|
2265
2540
|
'Cart subtotal': {
|
|
2266
2541
|
value: 'Промежуточный итог',
|
|
2267
2542
|
},
|
|
@@ -2310,6 +2585,9 @@ const stringsRussian = {
|
|
|
2310
2585
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
2311
2586
|
value: 'Не найдено методов доставки - попробуйте отредактировать ваш адрес или свяжитесь с поддержкой, если ошибка сохраняется',
|
|
2312
2587
|
},
|
|
2588
|
+
'Nothing due at the door': {
|
|
2589
|
+
value: 'На двери ничего не должно',
|
|
2590
|
+
},
|
|
2313
2591
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
2314
2592
|
value: 'Заказ превышает минимальный порог как для пошлины, так и для налога',
|
|
2315
2593
|
},
|
|
@@ -2343,12 +2621,24 @@ const stringsRussian = {
|
|
|
2343
2621
|
'Restricted items found': {
|
|
2344
2622
|
value: 'Найдены ограниченные товары',
|
|
2345
2623
|
},
|
|
2624
|
+
'Search countries': {
|
|
2625
|
+
value: 'Поиск стран',
|
|
2626
|
+
},
|
|
2346
2627
|
'See duty and tax thresholds': {
|
|
2347
2628
|
value: 'Смотреть пороги пошлин и налогов',
|
|
2348
2629
|
},
|
|
2630
|
+
'Select a country': {
|
|
2631
|
+
value: 'Выберите страну',
|
|
2632
|
+
},
|
|
2633
|
+
'Select a language': {
|
|
2634
|
+
value: 'Выберите язык',
|
|
2635
|
+
},
|
|
2349
2636
|
Shipping: {
|
|
2350
2637
|
value: 'Доставка',
|
|
2351
2638
|
},
|
|
2639
|
+
'Shipping address same as billing': {
|
|
2640
|
+
value: 'Адрес доставки совпадает с платежным адресом',
|
|
2641
|
+
},
|
|
2352
2642
|
'Shipping information': {
|
|
2353
2643
|
value: 'Информация о доставке',
|
|
2354
2644
|
},
|
|
@@ -2412,6 +2702,9 @@ const stringsSpanish = {
|
|
|
2412
2702
|
Back: {
|
|
2413
2703
|
value: 'Regresar',
|
|
2414
2704
|
},
|
|
2705
|
+
'Billing address': {
|
|
2706
|
+
value: 'Dirección de facturación',
|
|
2707
|
+
},
|
|
2415
2708
|
'Cart subtotal': {
|
|
2416
2709
|
value: 'Subtotal del carrito',
|
|
2417
2710
|
},
|
|
@@ -2460,6 +2753,9 @@ const stringsSpanish = {
|
|
|
2460
2753
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
2461
2754
|
value: 'No se encontraron métodos de envío: intenta editar tu dirección o contactar al soporte si el error persiste',
|
|
2462
2755
|
},
|
|
2756
|
+
'Nothing due at the door': {
|
|
2757
|
+
value: 'Nada debido en la puerta',
|
|
2758
|
+
},
|
|
2463
2759
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
2464
2760
|
value: 'El pedido supera el umbral mínimo tanto para impuestos como para aranceles',
|
|
2465
2761
|
},
|
|
@@ -2493,12 +2789,24 @@ const stringsSpanish = {
|
|
|
2493
2789
|
'Restricted items found': {
|
|
2494
2790
|
value: 'Se encontraron artículos restringidos',
|
|
2495
2791
|
},
|
|
2792
|
+
'Search countries': {
|
|
2793
|
+
value: 'Buscar países',
|
|
2794
|
+
},
|
|
2496
2795
|
'See duty and tax thresholds': {
|
|
2497
2796
|
value: 'Ver umbrales de aranceles e impuestos',
|
|
2498
2797
|
},
|
|
2798
|
+
'Select a country': {
|
|
2799
|
+
value: 'Seleccionar un país',
|
|
2800
|
+
},
|
|
2801
|
+
'Select a language': {
|
|
2802
|
+
value: 'Seleccionar un idioma',
|
|
2803
|
+
},
|
|
2499
2804
|
Shipping: {
|
|
2500
2805
|
value: 'Envío',
|
|
2501
2806
|
},
|
|
2807
|
+
'Shipping address same as billing': {
|
|
2808
|
+
value: 'La dirección de envío es la misma que la de facturación',
|
|
2809
|
+
},
|
|
2502
2810
|
'Shipping information': {
|
|
2503
2811
|
value: 'Información de envío',
|
|
2504
2812
|
},
|
|
@@ -2562,6 +2870,9 @@ const stringsSwedish = {
|
|
|
2562
2870
|
Back: {
|
|
2563
2871
|
value: 'Tillbaka',
|
|
2564
2872
|
},
|
|
2873
|
+
'Billing address': {
|
|
2874
|
+
value: 'Fakturaadress',
|
|
2875
|
+
},
|
|
2565
2876
|
'Cart subtotal': {
|
|
2566
2877
|
value: 'Varukorgens delsumma',
|
|
2567
2878
|
},
|
|
@@ -2610,6 +2921,9 @@ const stringsSwedish = {
|
|
|
2610
2921
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
2611
2922
|
value: 'Inga leveransmetoder hittades - försök redigera din adress eller kontakta supporten om felet kvarstår',
|
|
2612
2923
|
},
|
|
2924
|
+
'Nothing due at the door': {
|
|
2925
|
+
value: 'Ingenting att betala vid dörren',
|
|
2926
|
+
},
|
|
2613
2927
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
2614
2928
|
value: 'Beställningen överstiger minimibeloppet för både tull och skatt',
|
|
2615
2929
|
},
|
|
@@ -2643,12 +2957,24 @@ const stringsSwedish = {
|
|
|
2643
2957
|
'Restricted items found': {
|
|
2644
2958
|
value: 'Begränsade artiklar hittades',
|
|
2645
2959
|
},
|
|
2960
|
+
'Search countries': {
|
|
2961
|
+
value: 'Sök länder',
|
|
2962
|
+
},
|
|
2646
2963
|
'See duty and tax thresholds': {
|
|
2647
2964
|
value: 'Se tull- och skattetrösklar',
|
|
2648
2965
|
},
|
|
2966
|
+
'Select a country': {
|
|
2967
|
+
value: 'Välj ett land',
|
|
2968
|
+
},
|
|
2969
|
+
'Select a language': {
|
|
2970
|
+
value: 'Välj ett språk',
|
|
2971
|
+
},
|
|
2649
2972
|
Shipping: {
|
|
2650
2973
|
value: 'Frakt',
|
|
2651
2974
|
},
|
|
2975
|
+
'Shipping address same as billing': {
|
|
2976
|
+
value: 'Leveransadressen är densamma som fakturaadressen',
|
|
2977
|
+
},
|
|
2652
2978
|
'Shipping information': {
|
|
2653
2979
|
value: 'Fraktinformation',
|
|
2654
2980
|
},
|
|
@@ -2712,6 +3038,9 @@ const stringsTurkish = {
|
|
|
2712
3038
|
Back: {
|
|
2713
3039
|
value: 'Geri',
|
|
2714
3040
|
},
|
|
3041
|
+
'Billing address': {
|
|
3042
|
+
value: 'Fatura Adresi',
|
|
3043
|
+
},
|
|
2715
3044
|
'Cart subtotal': {
|
|
2716
3045
|
value: 'Sepet ara toplam',
|
|
2717
3046
|
},
|
|
@@ -2760,6 +3089,9 @@ const stringsTurkish = {
|
|
|
2760
3089
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
2761
3090
|
value: 'Hiçbir gönderi yöntemi bulunamadı - eğer hata devam ediyorsa adresinizi düzenlemeyi deneyin veya destekle iletişime geçin',
|
|
2762
3091
|
},
|
|
3092
|
+
'Nothing due at the door': {
|
|
3093
|
+
value: 'Kapıda ödenecek bir şey yok',
|
|
3094
|
+
},
|
|
2763
3095
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
2764
3096
|
value: 'Sipariş hem gümrük hem vergi için minimum sınırın üzerinde',
|
|
2765
3097
|
},
|
|
@@ -2793,12 +3125,24 @@ const stringsTurkish = {
|
|
|
2793
3125
|
'Restricted items found': {
|
|
2794
3126
|
value: 'Kısıtlı ürün bulundu',
|
|
2795
3127
|
},
|
|
3128
|
+
'Search countries': {
|
|
3129
|
+
value: 'Ülkeleri ara',
|
|
3130
|
+
},
|
|
2796
3131
|
'See duty and tax thresholds': {
|
|
2797
3132
|
value: 'Vergi ve gümrük vergisi limitlerini gör',
|
|
2798
3133
|
},
|
|
3134
|
+
'Select a country': {
|
|
3135
|
+
value: 'Bir ülke seç',
|
|
3136
|
+
},
|
|
3137
|
+
'Select a language': {
|
|
3138
|
+
value: 'Bir dil seçin',
|
|
3139
|
+
},
|
|
2799
3140
|
Shipping: {
|
|
2800
3141
|
value: 'Kargo',
|
|
2801
3142
|
},
|
|
3143
|
+
'Shipping address same as billing': {
|
|
3144
|
+
value: 'Teslimat adresi fatura adresi ile aynı',
|
|
3145
|
+
},
|
|
2802
3146
|
'Shipping information': {
|
|
2803
3147
|
value: 'Kargo bilgileri',
|
|
2804
3148
|
},
|
|
@@ -2862,6 +3206,9 @@ const stringsVietnamese = {
|
|
|
2862
3206
|
Back: {
|
|
2863
3207
|
value: 'Quay lại',
|
|
2864
3208
|
},
|
|
3209
|
+
'Billing address': {
|
|
3210
|
+
value: 'Địa chỉ thanh toán',
|
|
3211
|
+
},
|
|
2865
3212
|
'Cart subtotal': {
|
|
2866
3213
|
value: 'Tổng giỏ hàng',
|
|
2867
3214
|
},
|
|
@@ -2910,6 +3257,9 @@ const stringsVietnamese = {
|
|
|
2910
3257
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
2911
3258
|
value: 'Không tìm thấy phương thức vận chuyển - hãy thử chỉnh sửa địa chỉ của bạn hoặc liên hệ hỗ trợ nếu lỗi vẫn tiếp tục',
|
|
2912
3259
|
},
|
|
3260
|
+
'Nothing due at the door': {
|
|
3261
|
+
value: 'Không có gì phải trả tại cửa',
|
|
3262
|
+
},
|
|
2913
3263
|
'Order is over the de minimis threshold for both duty and tax': {
|
|
2914
3264
|
value: 'Đơn hàng vượt ngưỡng miễn thuế cho cả thuế nhập khẩu và thuế',
|
|
2915
3265
|
},
|
|
@@ -2943,12 +3293,24 @@ const stringsVietnamese = {
|
|
|
2943
3293
|
'Restricted items found': {
|
|
2944
3294
|
value: 'Tìm thấy hàng hóa bị hạn chế',
|
|
2945
3295
|
},
|
|
3296
|
+
'Search countries': {
|
|
3297
|
+
value: 'Tìm kiếm quốc gia',
|
|
3298
|
+
},
|
|
2946
3299
|
'See duty and tax thresholds': {
|
|
2947
3300
|
value: 'Xem ngưỡng thuế nhập khẩu và thuế',
|
|
2948
3301
|
},
|
|
3302
|
+
'Select a country': {
|
|
3303
|
+
value: 'Chọn một quốc gia',
|
|
3304
|
+
},
|
|
3305
|
+
'Select a language': {
|
|
3306
|
+
value: 'Chọn một ngôn ngữ',
|
|
3307
|
+
},
|
|
2949
3308
|
Shipping: {
|
|
2950
3309
|
value: 'Vận chuyển',
|
|
2951
3310
|
},
|
|
3311
|
+
'Shipping address same as billing': {
|
|
3312
|
+
value: 'Địa chỉ giao hàng giống hệt địa chỉ thanh toán',
|
|
3313
|
+
},
|
|
2952
3314
|
'Shipping information': {
|
|
2953
3315
|
value: 'Thông tin vận chuyển',
|
|
2954
3316
|
},
|
|
@@ -3629,7 +3991,7 @@ const initLocalizationStore = async () => {
|
|
|
3629
3991
|
// Filter countries to only include countries in the shipping zone
|
|
3630
3992
|
const filteredCountries = shippingZoneCountries === null || shippingZoneCountries === void 0 ? void 0 : shippingZoneCountries.reduce((acc, countryCode) => {
|
|
3631
3993
|
const countryInfo = allCountries === null || allCountries === void 0 ? void 0 : allCountries[countryCode];
|
|
3632
|
-
return countryInfo
|
|
3994
|
+
return countryInfo && countryInfo.active
|
|
3633
3995
|
? Object.assign(Object.assign({}, acc), { [countryCode]: countryInfo }) : acc;
|
|
3634
3996
|
}, {});
|
|
3635
3997
|
localizationStore.shippingZoneCountries = filteredCountries || null;
|
|
@@ -3650,7 +4012,721 @@ const initLocalizationStore = async () => {
|
|
|
3650
4012
|
localizationStore.localizationLoaded = true;
|
|
3651
4013
|
void getCustomMessages();
|
|
3652
4014
|
};
|
|
4015
|
+
const updateCheckoutSessionLanguage = async () => {
|
|
4016
|
+
if (!cartStore.checkoutSessionId) {
|
|
4017
|
+
return null;
|
|
4018
|
+
}
|
|
4019
|
+
const { errors, json } = await handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/update-checkout-session-metadata`, {
|
|
4020
|
+
body: {
|
|
4021
|
+
id: cartStore.checkoutSessionId,
|
|
4022
|
+
metadata: [
|
|
4023
|
+
{
|
|
4024
|
+
key: 'language',
|
|
4025
|
+
value: localizationStore.selectedLocale,
|
|
4026
|
+
},
|
|
4027
|
+
],
|
|
4028
|
+
},
|
|
4029
|
+
method: 'POST',
|
|
4030
|
+
});
|
|
4031
|
+
if (errors.length || !json) {
|
|
4032
|
+
logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
|
|
4033
|
+
return { errors, json };
|
|
4034
|
+
}
|
|
4035
|
+
return { errors: [], json };
|
|
4036
|
+
};
|
|
4037
|
+
const localizationStoreUpdateSelectedLocale = (newSelectedLocale) => {
|
|
4038
|
+
localizationStore.selectedLocale = newSelectedLocale;
|
|
4039
|
+
translationStoreUpdateLanguage(newSelectedLocale);
|
|
4040
|
+
void updateCheckoutSessionLanguage();
|
|
4041
|
+
};
|
|
4042
|
+
|
|
4043
|
+
const prepCalculateLandedCost = () => {
|
|
4044
|
+
// maybe we don't need email now for prefetch the landed cost
|
|
4045
|
+
const stripeLinkData = stripeStore.stripeLinkEventData;
|
|
4046
|
+
const stripeAddressData = stripeStore.stripeAddressEventData;
|
|
4047
|
+
const stripeBillingAddressData = stripeStore.stripeShippingSameAsBilling
|
|
4048
|
+
? stripeStore.stripeAddressEventData
|
|
4049
|
+
: stripeStore.stripeBillingAddressEventData;
|
|
4050
|
+
if (!(stripeAddressData === null || stripeAddressData === void 0 ? void 0 : stripeAddressData.complete) || !(stripeBillingAddressData === null || stripeBillingAddressData === void 0 ? void 0 : stripeBillingAddressData.complete)) {
|
|
4051
|
+
throw new Error('Missing stripe address data');
|
|
4052
|
+
}
|
|
4053
|
+
return {
|
|
4054
|
+
billingAddress: {
|
|
4055
|
+
addressLine1: stripeBillingAddressData.value.address.line1,
|
|
4056
|
+
addressLine2: stripeBillingAddressData.value.address.line2 || '',
|
|
4057
|
+
city: stripeBillingAddressData.value.address.city,
|
|
4058
|
+
country: stripeBillingAddressData.value.address.country,
|
|
4059
|
+
postalCode: stripeBillingAddressData.value.address.postal_code,
|
|
4060
|
+
state: stripeBillingAddressData.value.address.state,
|
|
4061
|
+
},
|
|
4062
|
+
billingContact: {
|
|
4063
|
+
// firstName and lastName should be valid now since stripe only mark
|
|
4064
|
+
// the address as complete when both fields are filled.
|
|
4065
|
+
firstName: stripeBillingAddressData.value.firstName || '',
|
|
4066
|
+
lastName: stripeBillingAddressData.value.lastName || '',
|
|
4067
|
+
phone: stripeBillingAddressData.value.phone || '',
|
|
4068
|
+
},
|
|
4069
|
+
checkoutSessionId: cartStore.checkoutSessionId || '',
|
|
4070
|
+
contact: {
|
|
4071
|
+
email: (stripeLinkData === null || stripeLinkData === void 0 ? void 0 : stripeLinkData.value.email) || '',
|
|
4072
|
+
// firstName and lastName should be valid now since stripe only mark
|
|
4073
|
+
// the address as complete when both fields are filled.
|
|
4074
|
+
firstName: stripeAddressData.value.firstName || '',
|
|
4075
|
+
lastName: stripeAddressData.value.lastName || '',
|
|
4076
|
+
phone: stripeAddressData.value.phone || '',
|
|
4077
|
+
},
|
|
4078
|
+
items: cartStore.items.map(item => item),
|
|
4079
|
+
shippingAddress: {
|
|
4080
|
+
addressLine1: stripeAddressData.value.address.line1,
|
|
4081
|
+
addressLine2: stripeAddressData.value.address.line2 || '',
|
|
4082
|
+
city: stripeAddressData.value.address.city,
|
|
4083
|
+
country: stripeAddressData.value.address.country,
|
|
4084
|
+
postalCode: stripeAddressData.value.address.postal_code,
|
|
4085
|
+
state: stripeAddressData.value.address.state,
|
|
4086
|
+
},
|
|
4087
|
+
};
|
|
4088
|
+
};
|
|
4089
|
+
|
|
4090
|
+
const triggerBuildLandedCost = async (buildLandedCost) => {
|
|
4091
|
+
var _a, _b, _c, _d;
|
|
4092
|
+
const data = prepCalculateLandedCost();
|
|
4093
|
+
const landedCost = await buildLandedCost({
|
|
4094
|
+
billingAddress: data.billingAddress,
|
|
4095
|
+
billingContact: data.billingContact,
|
|
4096
|
+
checkoutSessionId: data.checkoutSessionId,
|
|
4097
|
+
contact: data.contact,
|
|
4098
|
+
shippingAddress: data.shippingAddress,
|
|
4099
|
+
});
|
|
4100
|
+
if (!landedCost || ((_a = landedCost.errors) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
4101
|
+
throw new Error(`Failed to build landed cost: ${((_c = (_b = landedCost === null || landedCost === void 0 ? void 0 : landedCost.errors) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.message) || 'Unknown error'}`);
|
|
4102
|
+
}
|
|
4103
|
+
// Validate the landed cost object to make sure the returned value from buildLandedCost has a valid schema
|
|
4104
|
+
const { errors, json } = await handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/validate-landed-cost`, {
|
|
4105
|
+
body: landedCost,
|
|
4106
|
+
headers: {
|
|
4107
|
+
'Content-Type': 'application/json',
|
|
4108
|
+
},
|
|
4109
|
+
method: 'POST',
|
|
4110
|
+
});
|
|
4111
|
+
if (!json || errors.length) {
|
|
4112
|
+
throw new Error(`Invalid landed cost object: ${((_d = errors.find(Boolean)) === null || _d === void 0 ? void 0 : _d.message) || 'Unknown error'}`);
|
|
4113
|
+
}
|
|
4114
|
+
return landedCost;
|
|
4115
|
+
};
|
|
4116
|
+
|
|
4117
|
+
const calculateLandedCost = async (abortController) => {
|
|
4118
|
+
var _a;
|
|
4119
|
+
// If buildLandedCost callback is supplied, use that instead of our regular request to '/calculate-landed-cost'
|
|
4120
|
+
const buildLandedCost = zonosStore.zonosStore.checkoutSettings.buildLandedCost;
|
|
4121
|
+
if (buildLandedCost) {
|
|
4122
|
+
const json = await triggerBuildLandedCost(buildLandedCost);
|
|
4123
|
+
return json;
|
|
4124
|
+
}
|
|
4125
|
+
// request to get landed cost info
|
|
4126
|
+
const url = `${"https://v1.route.js.zonos.com"}/api/zonos-elements/calculate-landed-cost`;
|
|
4127
|
+
const { errors, json } = await handleFetch(url, {
|
|
4128
|
+
body: prepCalculateLandedCost(),
|
|
4129
|
+
method: 'POST',
|
|
4130
|
+
signal: abortController === null || abortController === void 0 ? void 0 : abortController.signal,
|
|
4131
|
+
});
|
|
4132
|
+
if (errors.length || !json) {
|
|
4133
|
+
const isAbortedRequest = ((_a = errors[0]) === null || _a === void 0 ? void 0 : _a.message) === 'The user aborted a request.';
|
|
4134
|
+
const errorMessage = isAbortedRequest
|
|
4135
|
+
? 'The landed cost calculation request was aborted to initiate a new one.'
|
|
4136
|
+
: 'Failed to calculate landed cost';
|
|
4137
|
+
throw new Error(errorMessage);
|
|
4138
|
+
}
|
|
4139
|
+
return json;
|
|
4140
|
+
};
|
|
4141
|
+
|
|
4142
|
+
const addressRuleStyle = ({ theme, }) => {
|
|
4143
|
+
switch (theme) {
|
|
4144
|
+
default:
|
|
4145
|
+
return {
|
|
4146
|
+
'.Input': {
|
|
4147
|
+
// need to reset everything and the paddingTop to default, otherwise the paddingTop will not be updated.
|
|
4148
|
+
padding: '0',
|
|
4149
|
+
paddingBottom: '8px',
|
|
4150
|
+
paddingLeft: '16px',
|
|
4151
|
+
paddingRight: '8px',
|
|
4152
|
+
// any value here will be add up to the default paddingTop (20px).
|
|
4153
|
+
paddingTop: '6px',
|
|
4154
|
+
},
|
|
4155
|
+
};
|
|
4156
|
+
}
|
|
4157
|
+
};
|
|
4158
|
+
|
|
4159
|
+
const defaultVariable = ({ borderStyle, theme, }) => {
|
|
4160
|
+
switch (theme) {
|
|
4161
|
+
case 'DARK':
|
|
4162
|
+
return {
|
|
4163
|
+
borderRadius: getBorderRadius.getBorderRadius(borderStyle),
|
|
4164
|
+
colorBackground: '#101117',
|
|
4165
|
+
colorBackgroundText: '#C5C6CA',
|
|
4166
|
+
colorText: '#C5C6CA',
|
|
4167
|
+
colorTextPlaceholder: '#C5C6CA',
|
|
4168
|
+
};
|
|
4169
|
+
default:
|
|
4170
|
+
return {
|
|
4171
|
+
borderRadius: getBorderRadius.getBorderRadius(borderStyle),
|
|
4172
|
+
};
|
|
4173
|
+
}
|
|
4174
|
+
};
|
|
4175
|
+
|
|
4176
|
+
const { onChange: onChange$1, reset: reset$1, state: stripeStore, } = zonosStore.createStore(() => ({
|
|
4177
|
+
clientSecret: sessionStorage.getItem('zonos--client-secret') || null,
|
|
4178
|
+
fetchingLandedCostAbordController: null,
|
|
4179
|
+
isFetchingLandedCost: false,
|
|
4180
|
+
isFetchingSession: false,
|
|
4181
|
+
stripe: null,
|
|
4182
|
+
stripeAddressElement: null,
|
|
4183
|
+
stripeAddressEventData: null,
|
|
4184
|
+
stripeAddressUsedWhenFetchingLC: null,
|
|
4185
|
+
stripeBillingAddressElement: null,
|
|
4186
|
+
stripeBillingAddressEventData: null,
|
|
4187
|
+
stripeBillingAddressUsedWhenFetchingLC: null,
|
|
4188
|
+
stripeElements: null,
|
|
4189
|
+
stripeElementsForBillingAddress: null,
|
|
4190
|
+
stripeElementsOptions: null,
|
|
4191
|
+
stripeLinkElement: null,
|
|
4192
|
+
stripeLinkEventData: null,
|
|
4193
|
+
stripeLinkUsedWhenFetchingLC: null,
|
|
4194
|
+
stripePaymentElement: null,
|
|
4195
|
+
stripePaymentEventData: null,
|
|
4196
|
+
stripeShippingSameAsBilling: true,
|
|
4197
|
+
}));
|
|
4198
|
+
const getStripeOptions = ({ clientSecret, overrideBorderRaidus, overridePrimaryColor, overrideSecondaryColor, overrideTheme, }) => {
|
|
4199
|
+
const primaryColor = overridePrimaryColor || zonosStore.zonosStore.appearance.colorPrimary;
|
|
4200
|
+
const secondaryColor = overrideSecondaryColor || zonosStore.zonosStore.appearance.colorSecondary;
|
|
4201
|
+
const themeBasedColor = primaryColor && isDarkColor.isDarkColor(primaryColor) ? 'night' : 'flat';
|
|
4202
|
+
// if overrideTheme is provided, use it. Otherwise, use theme based on primary color
|
|
4203
|
+
const theme = overrideTheme === 'DARK' ? 'night' : 'flat';
|
|
4204
|
+
return {
|
|
4205
|
+
appearance: {
|
|
4206
|
+
labels: 'floating',
|
|
4207
|
+
rules: Object.assign({}, addressRuleStyle({ theme: 'LIGHT' })),
|
|
4208
|
+
// get contrast theme color base on primary color
|
|
4209
|
+
theme: overrideTheme ? theme : themeBasedColor,
|
|
4210
|
+
variables: Object.assign(Object.assign({}, defaultVariable({
|
|
4211
|
+
borderStyle: overrideBorderRaidus,
|
|
4212
|
+
theme: 'LIGHT',
|
|
4213
|
+
})), {
|
|
4214
|
+
// use the button background color for input glow color
|
|
4215
|
+
colorPrimary: secondaryColor }),
|
|
4216
|
+
},
|
|
4217
|
+
clientSecret,
|
|
4218
|
+
locale: localizationStore.selectedLocale,
|
|
4219
|
+
};
|
|
4220
|
+
};
|
|
4221
|
+
const initStripeElements = async (props) => {
|
|
4222
|
+
var _a, _b;
|
|
4223
|
+
const clientSecret = stripeStore.clientSecret;
|
|
4224
|
+
if (!stripeStore.stripe) {
|
|
4225
|
+
log('Skip. Stripe is not initialized');
|
|
4226
|
+
return;
|
|
4227
|
+
}
|
|
4228
|
+
if (clientSecret) {
|
|
4229
|
+
const stripeOptions = getStripeOptions({
|
|
4230
|
+
clientSecret,
|
|
4231
|
+
overrideBorderRaidus: props === null || props === void 0 ? void 0 : props.overrideBorderRaidus,
|
|
4232
|
+
overridePrimaryColor: props === null || props === void 0 ? void 0 : props.overridePrimaryColor,
|
|
4233
|
+
overrideSecondaryColor: props === null || props === void 0 ? void 0 : props.overrideSecondaryColor,
|
|
4234
|
+
overrideTheme: props === null || props === void 0 ? void 0 : props.overrideTheme,
|
|
4235
|
+
});
|
|
4236
|
+
// compare with the previous options to see if we need to update
|
|
4237
|
+
const isSameOptions = JSON.stringify(stripeOptions) ===
|
|
4238
|
+
JSON.stringify(stripeStore.stripeElementsOptions);
|
|
4239
|
+
if (!stripeStore.stripeElements ||
|
|
4240
|
+
!stripeStore.stripeElementsForBillingAddress) {
|
|
4241
|
+
// init stripe elements if it doesn't exist
|
|
4242
|
+
stripeStore.stripeElements = (_a = stripeStore.stripe) === null || _a === void 0 ? void 0 : _a.elements(stripeOptions);
|
|
4243
|
+
// save stripe elements options for later comparison
|
|
4244
|
+
stripeStore.stripeElementsOptions = stripeOptions;
|
|
4245
|
+
log('Stripe elements initialized');
|
|
4246
|
+
// init stripe elements for billing address
|
|
4247
|
+
stripeStore.stripeElementsForBillingAddress =
|
|
4248
|
+
(_b = stripeStore.stripe) === null || _b === void 0 ? void 0 : _b.elements(stripeOptions);
|
|
4249
|
+
log('Stripe elements for billing address initialized');
|
|
4250
|
+
return;
|
|
4251
|
+
}
|
|
4252
|
+
if (!isSameOptions) {
|
|
4253
|
+
// update elements with new option if it already exists
|
|
4254
|
+
stripeStore.stripeElements.update(stripeOptions);
|
|
4255
|
+
// update elements for stripe billing address
|
|
4256
|
+
stripeStore.stripeElementsForBillingAddress.update(stripeOptions);
|
|
4257
|
+
// save stripe elements options for later comparison
|
|
4258
|
+
stripeStore.stripeElementsOptions = stripeOptions;
|
|
4259
|
+
}
|
|
4260
|
+
log('Stripe elements initialized');
|
|
4261
|
+
}
|
|
4262
|
+
};
|
|
4263
|
+
const stripeStoreReset = () => {
|
|
4264
|
+
// clean clientSecret so that we can start the new one.
|
|
4265
|
+
sessionStorage.removeItem('zonos--client-secret');
|
|
4266
|
+
// cleanup stripe elements
|
|
4267
|
+
reset$1();
|
|
4268
|
+
// set stripe back to window.Zonos.stripe
|
|
4269
|
+
stripeStore.stripe = window.Zonos.stripe;
|
|
4270
|
+
};
|
|
4271
|
+
/**
|
|
4272
|
+
* Check if the address and email info used when fetching landed cost with the current email and address info are different
|
|
4273
|
+
* Purpose is to resend the request if the info used when fetching landed cost is different from the current info
|
|
4274
|
+
*/
|
|
4275
|
+
const isPrefetchInfoOutdated = () => {
|
|
4276
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4277
|
+
const hasAbortController = stripeStore.fetchingLandedCostAbordController;
|
|
4278
|
+
if (!hasAbortController) {
|
|
4279
|
+
// if there is no abort controller, this is a new request
|
|
4280
|
+
return false;
|
|
4281
|
+
}
|
|
4282
|
+
const isLinkDataDirty = JSON.stringify((_a = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _a === void 0 ? void 0 : _a.value) !==
|
|
4283
|
+
JSON.stringify((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.value);
|
|
4284
|
+
const isAddressDataDirty = JSON.stringify((_c = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _c === void 0 ? void 0 : _c.value) !==
|
|
4285
|
+
JSON.stringify((_d = stripeStore.stripeAddressEventData) === null || _d === void 0 ? void 0 : _d.value);
|
|
4286
|
+
const isBillingAddressDataDirty = !stripeStore.stripeShippingSameAsBilling &&
|
|
4287
|
+
JSON.stringify((_e = stripeStore.stripeBillingAddressEventData) === null || _e === void 0 ? void 0 : _e.value) !==
|
|
4288
|
+
JSON.stringify((_f = stripeStore.stripeBillingAddressUsedWhenFetchingLC) === null || _f === void 0 ? void 0 : _f.value);
|
|
4289
|
+
return isLinkDataDirty || isAddressDataDirty || isBillingAddressDataDirty;
|
|
4290
|
+
};
|
|
4291
|
+
const stripeStorePrefetchLandedCost = async () => {
|
|
4292
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4293
|
+
const stripeAddressReady = !!((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
4294
|
+
const stripeLinkReady = !!((_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.complete);
|
|
4295
|
+
const stripeBillingAddressReady = stripeStore.stripeShippingSameAsBilling
|
|
4296
|
+
? !!((_c = stripeStore.stripeLinkEventData) === null || _c === void 0 ? void 0 : _c.complete)
|
|
4297
|
+
: !!((_d = stripeStore.stripeBillingAddressEventData) === null || _d === void 0 ? void 0 : _d.complete);
|
|
4298
|
+
const shouldRefetch = isPrefetchInfoOutdated();
|
|
4299
|
+
if (shouldRefetch) {
|
|
4300
|
+
// if the info used when fetching landed cost is different from the current info, abort the previous request
|
|
4301
|
+
(_e = stripeStore.fetchingLandedCostAbordController) === null || _e === void 0 ? void 0 : _e.abort();
|
|
4302
|
+
stripeStore.fetchingLandedCostAbordController = null;
|
|
4303
|
+
}
|
|
4304
|
+
// only fetch if we are not fetching or we need to refetch
|
|
4305
|
+
if (stripeAddressReady &&
|
|
4306
|
+
stripeLinkReady &&
|
|
4307
|
+
stripeBillingAddressReady &&
|
|
4308
|
+
(shouldRefetch || !stripeStore.isFetchingLandedCost)) {
|
|
4309
|
+
stripeStore.isFetchingLandedCost = true;
|
|
4310
|
+
if (stripeStore.stripeAddressEventData) {
|
|
4311
|
+
stripeStore.stripeAddressUsedWhenFetchingLC = Object.assign({}, stripeStore.stripeAddressEventData);
|
|
4312
|
+
}
|
|
4313
|
+
if (stripeStore.stripeBillingAddressEventData) {
|
|
4314
|
+
stripeStore.stripeBillingAddressUsedWhenFetchingLC = Object.assign({}, stripeStore.stripeBillingAddressEventData);
|
|
4315
|
+
}
|
|
4316
|
+
if (stripeStore.stripeLinkEventData) {
|
|
4317
|
+
stripeStore.stripeLinkUsedWhenFetchingLC = Object.assign({}, stripeStore.stripeLinkEventData);
|
|
4318
|
+
}
|
|
4319
|
+
try {
|
|
4320
|
+
const abortController = new AbortController();
|
|
4321
|
+
stripeStore.fetchingLandedCostAbordController = abortController;
|
|
4322
|
+
const { checkoutSessionWorkflow, shipmentRatingCalculateWorkflow } = await calculateLandedCost(abortController);
|
|
4323
|
+
// reset abort controller after we are done
|
|
4324
|
+
stripeStore.fetchingLandedCostAbordController = null;
|
|
4325
|
+
// update cart store with landed cost info
|
|
4326
|
+
cartStore.landedCostData =
|
|
4327
|
+
(checkoutSessionWorkflow === null || checkoutSessionWorkflow === void 0 ? void 0 : checkoutSessionWorkflow.filter(Boolean)) || null;
|
|
4328
|
+
cartStore.shippingData =
|
|
4329
|
+
(shipmentRatingCalculateWorkflow === null || shipmentRatingCalculateWorkflow === void 0 ? void 0 : shipmentRatingCalculateWorkflow.filter(Boolean)) || null;
|
|
4330
|
+
// apply new subtotal and total, this is mainly to show items in the presentment currency
|
|
4331
|
+
const firstLandedCostData = (_f = cartStore.landedCostData) === null || _f === void 0 ? void 0 : _f.find(Boolean);
|
|
4332
|
+
const subtotals = !!firstLandedCostData
|
|
4333
|
+
? firstLandedCostData.subtotals
|
|
4334
|
+
: null;
|
|
4335
|
+
if (subtotals) {
|
|
4336
|
+
// prefetch landed cost will not update shipping and taxes since we haven't selected shipping method yet
|
|
4337
|
+
cartStoreApplySubtotals({
|
|
4338
|
+
exchangeRate: subtotals.exchangeRate,
|
|
4339
|
+
items: subtotals.items,
|
|
4340
|
+
landedCostTotal: 0,
|
|
4341
|
+
presentmentCurrencyCode: subtotals.presentmentCurrencyCode,
|
|
4342
|
+
shipping: 0,
|
|
4343
|
+
total: subtotals.items,
|
|
4344
|
+
});
|
|
4345
|
+
}
|
|
4346
|
+
}
|
|
4347
|
+
catch (err) {
|
|
4348
|
+
logError(err);
|
|
4349
|
+
}
|
|
4350
|
+
stripeStore.isFetchingLandedCost = false;
|
|
4351
|
+
}
|
|
4352
|
+
};
|
|
4353
|
+
const getStripeMessageBasedOnStatus = (status) => {
|
|
4354
|
+
let messages = [];
|
|
4355
|
+
let isError = true;
|
|
4356
|
+
// Inspect the PaymentIntent `status` to indicate the status of the payment
|
|
4357
|
+
// to your customer.
|
|
4358
|
+
//
|
|
4359
|
+
// Some payment methods will [immediately succeed or fail][0] upon
|
|
4360
|
+
// confirmation, while others will first enter a `processing` state.
|
|
4361
|
+
//
|
|
4362
|
+
// [0]: https://stripe.com/docs/payments/payment-methods#payment-notification
|
|
4363
|
+
switch (status) {
|
|
4364
|
+
case 'succeeded': {
|
|
4365
|
+
messages = [
|
|
4366
|
+
translate('Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.'),
|
|
4367
|
+
'',
|
|
4368
|
+
'',
|
|
4369
|
+
translate("We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time."),
|
|
4370
|
+
];
|
|
4371
|
+
isError = false;
|
|
4372
|
+
break;
|
|
4373
|
+
}
|
|
4374
|
+
case 'requires_capture':
|
|
4375
|
+
case 'processing': {
|
|
4376
|
+
messages = [
|
|
4377
|
+
translate("Payment processing. We'll update you when payment is received."),
|
|
4378
|
+
];
|
|
4379
|
+
isError = false;
|
|
4380
|
+
break;
|
|
4381
|
+
}
|
|
4382
|
+
case 'requires_payment_method': {
|
|
4383
|
+
messages = [
|
|
4384
|
+
translate('Payment failed. Please try another payment method.'),
|
|
4385
|
+
];
|
|
4386
|
+
break;
|
|
4387
|
+
}
|
|
4388
|
+
default: {
|
|
4389
|
+
messages = [translate('Something went wrong.')];
|
|
4390
|
+
break;
|
|
4391
|
+
}
|
|
4392
|
+
}
|
|
4393
|
+
return {
|
|
4394
|
+
isError,
|
|
4395
|
+
messages,
|
|
4396
|
+
};
|
|
4397
|
+
};
|
|
4398
|
+
const stripeStoreRetrievePayment = async ({ clientSecret: _clientSecret, storybookForceStatus, }) => {
|
|
4399
|
+
if (storybookForceStatus) {
|
|
4400
|
+
// return status right away if we are in storybook mode
|
|
4401
|
+
const { isError, messages } = getStripeMessageBasedOnStatus(storybookForceStatus);
|
|
4402
|
+
return { error: isError, messages };
|
|
4403
|
+
}
|
|
4404
|
+
const clientSecret = _clientSecret || stripeStore.clientSecret;
|
|
4405
|
+
if (!stripeStore.stripe || !clientSecret) {
|
|
4406
|
+
logError('Failed to retrieve payment intent. Stripe is not initialized');
|
|
4407
|
+
return { error: true, message: [translate('Something went wrong.')] };
|
|
4408
|
+
}
|
|
4409
|
+
const { paymentIntent } = await stripeStore.stripe.retrievePaymentIntent(clientSecret);
|
|
4410
|
+
const status = paymentIntent === null || paymentIntent === void 0 ? void 0 : paymentIntent.status;
|
|
4411
|
+
const { isError, messages } = getStripeMessageBasedOnStatus(status);
|
|
4412
|
+
return { error: isError, messages };
|
|
4413
|
+
};
|
|
4414
|
+
const stripeStoreConfirmPayment = async () => {
|
|
4415
|
+
var _a, _b, _c;
|
|
4416
|
+
const stripePaymentReady = !!((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
4417
|
+
const stripeElements = stripeStore.stripeElements;
|
|
4418
|
+
const stripe = stripeStore.stripe;
|
|
4419
|
+
const stripeClientSecret = stripeStore.clientSecret;
|
|
4420
|
+
if (stripe && stripeElements && stripePaymentReady && stripeClientSecret) {
|
|
4421
|
+
const { error } = await stripe.confirmPayment({
|
|
4422
|
+
confirmParams: {
|
|
4423
|
+
receipt_email: (_c = (_b = stripeStore.stripeLinkEventData) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.email,
|
|
4424
|
+
return_url: window.location.href,
|
|
4425
|
+
},
|
|
4426
|
+
elements: stripeElements,
|
|
4427
|
+
redirect: 'if_required',
|
|
4428
|
+
});
|
|
4429
|
+
if (error) {
|
|
4430
|
+
if (error.type === 'card_error' || error.type === 'validation_error') {
|
|
4431
|
+
throw new Error(error.message);
|
|
4432
|
+
}
|
|
4433
|
+
if (error.type === 'invalid_request_error') {
|
|
4434
|
+
if (error.code === 'payment_intent_unexpected_state') {
|
|
4435
|
+
// PaymentIntent was canceled or expired, or status is `require_capture`.
|
|
4436
|
+
// don't throw error here because we will reset the checkout session last step
|
|
4437
|
+
return;
|
|
4438
|
+
}
|
|
4439
|
+
}
|
|
4440
|
+
throw new Error('An unexpected error occurred.');
|
|
4441
|
+
}
|
|
4442
|
+
}
|
|
4443
|
+
};
|
|
4444
|
+
/**
|
|
4445
|
+
* Init checkout session
|
|
4446
|
+
* @returns {boolean} whether or not the checkout session is successfully created
|
|
4447
|
+
*/
|
|
4448
|
+
const stripeStoreInitCheckoutSession = async () => {
|
|
4449
|
+
var _a;
|
|
4450
|
+
const total = cartStore.items.reduce((amount, item) => amount + item.amount * item.quantity, 0);
|
|
4451
|
+
if (!total || !localizationStore.targetCurrency) {
|
|
4452
|
+
logError('Fail to create checkout session - invalid total or currency');
|
|
4453
|
+
return false;
|
|
4454
|
+
}
|
|
4455
|
+
stripeStore.isFetchingSession = true;
|
|
4456
|
+
const { errors, json } = await handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/create-checkout-session`, {
|
|
4457
|
+
body: {
|
|
4458
|
+
currency: ((_a = cartStore.items.find(Boolean)) === null || _a === void 0 ? void 0 : _a.currencyCode) || '',
|
|
4459
|
+
itemsAmount: total,
|
|
4460
|
+
metadata: [
|
|
4461
|
+
{ key: 'language', value: localizationStore.selectedLocale },
|
|
4462
|
+
],
|
|
4463
|
+
presentmentCountryCode: localizationStore.selectedCountryCode || null,
|
|
4464
|
+
},
|
|
4465
|
+
method: 'POST',
|
|
4466
|
+
});
|
|
4467
|
+
stripeStore.isFetchingSession = false;
|
|
4468
|
+
if (errors.length || !json) {
|
|
4469
|
+
logError('Error occurs when creating checkout session', JSON.stringify(errors, null, 2));
|
|
4470
|
+
return false;
|
|
4471
|
+
}
|
|
4472
|
+
const result = json.checkoutSessionCreate;
|
|
4473
|
+
stripeStore.clientSecret = result.clientSecret;
|
|
4474
|
+
// update cart store with updated informations
|
|
4475
|
+
cartStore.checkoutSessionId = result.id;
|
|
4476
|
+
cartStoreApplySubtotals(Object.assign(Object.assign({}, result.subtotals), { landedCostTotal: 0, shipping: 0, total: result.subtotals.items }));
|
|
4477
|
+
log('Exchange rate updated for cart items (checkout session create)', 'info', cartStore.exchangeRate);
|
|
4478
|
+
log('done-init-checkout-session');
|
|
4479
|
+
return true;
|
|
4480
|
+
};
|
|
4481
|
+
/**
|
|
4482
|
+
* Update checkout session. Use for updating amount with landed cost id, or update session when cart items change
|
|
4483
|
+
*/
|
|
4484
|
+
const stripeStoreUpdateCheckoutSession = async ({ currency, id, itemsAmount, landedCostId, presentmentCountryCode, }) => {
|
|
4485
|
+
// No need to set loading state here because this function will be called under the hood to update
|
|
4486
|
+
// landed cost id for the section.
|
|
4487
|
+
const { errors, json } = await handleFetch(`${"https://v1.route.js.zonos.com"}/api/zonos-elements/update-checkout-session`, {
|
|
4488
|
+
body: {
|
|
4489
|
+
currency,
|
|
4490
|
+
id,
|
|
4491
|
+
itemsAmount,
|
|
4492
|
+
landedCostId,
|
|
4493
|
+
presentmentCountryCode,
|
|
4494
|
+
},
|
|
4495
|
+
method: 'POST',
|
|
4496
|
+
});
|
|
4497
|
+
if (errors.length || !json) {
|
|
4498
|
+
logError('Error occurs when updating checkout session', JSON.stringify(errors, null, 2));
|
|
4499
|
+
return { errors, json };
|
|
4500
|
+
}
|
|
4501
|
+
return { errors: [], json };
|
|
4502
|
+
};
|
|
4503
|
+
onChange$1('clientSecret', clientSecret => {
|
|
4504
|
+
// update stripe elements when client secret changes
|
|
4505
|
+
if (clientSecret && stripeStore.stripe) {
|
|
4506
|
+
sessionStorage.setItem('zonos--client-secret', clientSecret);
|
|
4507
|
+
}
|
|
4508
|
+
if (!clientSecret) {
|
|
4509
|
+
sessionStorage.removeItem('zonos--client-secret');
|
|
4510
|
+
}
|
|
4511
|
+
});
|
|
4512
|
+
|
|
4513
|
+
const formatDate = ({ date, formatOptions = { day: 'numeric', weekday: 'long', year: 'numeric' }, }) => {
|
|
4514
|
+
// format date to Thursday 3, 2023
|
|
4515
|
+
return new Intl.DateTimeFormat('en-US', formatOptions).format(date);
|
|
4516
|
+
};
|
|
4517
|
+
|
|
4518
|
+
const getDaysDifference = (targetDate) => {
|
|
4519
|
+
const currentDate = new Date();
|
|
4520
|
+
const timeDifference = targetDate.getTime() - currentDate.getTime();
|
|
4521
|
+
const daysDifference = Math.floor(timeDifference / (1000 * 60 * 60 * 24)); // Convert milliseconds to days
|
|
4522
|
+
return daysDifference;
|
|
4523
|
+
};
|
|
4524
|
+
|
|
4525
|
+
const { onChange, reset, state: cartStore, } = zonosStore.createStore(() => ({
|
|
4526
|
+
checkoutSessionId: sessionStorage.getItem('zonos--checkout-session-id') || null,
|
|
4527
|
+
currency: 'USD',
|
|
4528
|
+
dutiesTaxFees: 0,
|
|
4529
|
+
error: null,
|
|
4530
|
+
exchangeRate: null,
|
|
4531
|
+
isSelectedShippingAboveDeminimis: false,
|
|
4532
|
+
isSelectedShippingGuarantee: false,
|
|
4533
|
+
items: [],
|
|
4534
|
+
landedCostData: null,
|
|
4535
|
+
selectedLandedCost: null,
|
|
4536
|
+
selectedShippingOption: null,
|
|
4537
|
+
selectedShippingOptionExpectedDate: '',
|
|
4538
|
+
selectedShippingOptionTransitTime: '',
|
|
4539
|
+
shipping: 0,
|
|
4540
|
+
shippingData: null,
|
|
4541
|
+
step: 'customer-info',
|
|
4542
|
+
subtotal: 0,
|
|
4543
|
+
total: 0,
|
|
4544
|
+
}));
|
|
4545
|
+
/**
|
|
4546
|
+
* Format shipping transit info to be displayed on UI
|
|
4547
|
+
* @returns
|
|
4548
|
+
* - expectedDate: Thursday, Aug 12
|
|
4549
|
+
* - maxTransit: 5
|
|
4550
|
+
* - minTransit: 3
|
|
4551
|
+
*/
|
|
4552
|
+
const cartStoreGetShippingTransitInfo = (item) => {
|
|
4553
|
+
const minTransit = item.minTransitAt
|
|
4554
|
+
? getDaysDifference(new Date(item.minTransitAt))
|
|
4555
|
+
: '';
|
|
4556
|
+
const maxTransit = item.maxTransitAt
|
|
4557
|
+
? getDaysDifference(new Date(item.maxTransitAt))
|
|
4558
|
+
: '';
|
|
4559
|
+
const expectedDate = item.minTransitAt
|
|
4560
|
+
? formatDate({
|
|
4561
|
+
date: new Date(item.minTransitAt),
|
|
4562
|
+
})
|
|
4563
|
+
: '';
|
|
4564
|
+
return {
|
|
4565
|
+
expectedDate,
|
|
4566
|
+
maxTransit,
|
|
4567
|
+
minTransit,
|
|
4568
|
+
};
|
|
4569
|
+
};
|
|
4570
|
+
const cartStoreReset = () => {
|
|
4571
|
+
sessionStorage.removeItem('zonos--checkout-session-id');
|
|
4572
|
+
// reset cart store
|
|
4573
|
+
reset();
|
|
4574
|
+
};
|
|
4575
|
+
const cartStoreUpdateToErrorState = ({ messages, title, }) => {
|
|
4576
|
+
cartStoreReset();
|
|
4577
|
+
stripeStoreReset();
|
|
4578
|
+
cartStore.step = 'error';
|
|
4579
|
+
cartStore.error = {
|
|
4580
|
+
messages,
|
|
4581
|
+
title,
|
|
4582
|
+
};
|
|
4583
|
+
};
|
|
4584
|
+
const cartStoreApplySubtotals = (subtotals) => {
|
|
4585
|
+
// update exchange rate so we can use it to display cart items
|
|
4586
|
+
cartStore.exchangeRate = subtotals.exchangeRate;
|
|
4587
|
+
cartStore.dutiesTaxFees = subtotals.landedCostTotal;
|
|
4588
|
+
cartStore.subtotal = subtotals.items;
|
|
4589
|
+
cartStore.total = subtotals.total;
|
|
4590
|
+
cartStore.currency = subtotals.presentmentCurrencyCode;
|
|
4591
|
+
};
|
|
4592
|
+
const cartStoreReCalculateTotal = async ({ currency, itemsAmount, landedCostId, }) => {
|
|
4593
|
+
if (landedCostId && cartStore.selectedLandedCost) {
|
|
4594
|
+
// update cart total right away if we have landed cost id to avoid order total flickering
|
|
4595
|
+
const subtotals = cartStore.selectedLandedCost.subtotals;
|
|
4596
|
+
cartStoreApplySubtotals(subtotals);
|
|
4597
|
+
log('Exchange rate updated for cart items (landed cost subtotal)', 'info', cartStore.exchangeRate);
|
|
4598
|
+
}
|
|
4599
|
+
// update checkout session
|
|
4600
|
+
if (!cartStore.checkoutSessionId) {
|
|
4601
|
+
logError('Could not update cart total without checkout session id');
|
|
4602
|
+
return false;
|
|
4603
|
+
}
|
|
4604
|
+
const { json } = await stripeStoreUpdateCheckoutSession({
|
|
4605
|
+
currency,
|
|
4606
|
+
id: cartStore.checkoutSessionId,
|
|
4607
|
+
itemsAmount,
|
|
4608
|
+
landedCostId,
|
|
4609
|
+
presentmentCountryCode: localizationStore.selectedCountryCode,
|
|
4610
|
+
});
|
|
4611
|
+
if (!json) {
|
|
4612
|
+
// do nothing if we can't get checkout session
|
|
4613
|
+
logError('Error occurs when updating checkout session');
|
|
4614
|
+
cartStoreUpdateToErrorState({
|
|
4615
|
+
messages: [
|
|
4616
|
+
translate("There's been an error updating your checkout session. Please reload and try again or contact support if the error persists"),
|
|
4617
|
+
],
|
|
4618
|
+
title: translate('Error updating Checkout'),
|
|
4619
|
+
});
|
|
4620
|
+
return false;
|
|
4621
|
+
}
|
|
4622
|
+
if (!landedCostId) {
|
|
4623
|
+
// This is when first open the checkout modal and we just want to get info from the old cart session.
|
|
4624
|
+
// use subtotals from checkout session to update cart total
|
|
4625
|
+
cartStoreApplySubtotals(json.checkoutSessionUpdate.subtotals);
|
|
4626
|
+
log('Exchange rate updated for cart items (checkout session update)', 'info', cartStore.exchangeRate);
|
|
4627
|
+
}
|
|
4628
|
+
return true;
|
|
4629
|
+
};
|
|
4630
|
+
const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption) => {
|
|
4631
|
+
var _a, _b, _c, _d, _e;
|
|
4632
|
+
cartStore.selectedShippingOption = selectedShippingOption;
|
|
4633
|
+
// update shipping transit info
|
|
4634
|
+
const { expectedDate, maxTransit, minTransit } = cartStoreGetShippingTransitInfo(cartStore.selectedShippingOption);
|
|
4635
|
+
cartStore.selectedShippingOptionExpectedDate = expectedDate;
|
|
4636
|
+
cartStore.selectedShippingOptionTransitTime =
|
|
4637
|
+
minTransit && maxTransit
|
|
4638
|
+
? `${minTransit}-${maxTransit}`
|
|
4639
|
+
: `${minTransit || maxTransit}`;
|
|
4640
|
+
const selectedLandedCost = (_a = cartStore.landedCostData) === null || _a === void 0 ? void 0 : _a.find(checkoutSessionPresentment => {
|
|
4641
|
+
var _a, _b, _c;
|
|
4642
|
+
return ((_b = (_a = checkoutSessionPresentment.landedCost) === null || _a === void 0 ? void 0 : _a.shipmentRating) === null || _b === void 0 ? void 0 : _b.id) ===
|
|
4643
|
+
((_c = cartStore.selectedShippingOption) === null || _c === void 0 ? void 0 : _c.id);
|
|
4644
|
+
});
|
|
4645
|
+
// save selected landed cost for later use
|
|
4646
|
+
cartStore.selectedLandedCost = selectedLandedCost || null;
|
|
4647
|
+
if (!selectedLandedCost) {
|
|
4648
|
+
// do nothing if we can't find landed cost for selected shipping option
|
|
4649
|
+
return false;
|
|
4650
|
+
}
|
|
4651
|
+
// update shipping value and dutiesTaxFees on selectedShippingOption change
|
|
4652
|
+
cartStore.shipping = selectedLandedCost.subtotals.shipping;
|
|
4653
|
+
// update deminimis status
|
|
4654
|
+
const isGuarantee = ((_b = selectedLandedCost === null || selectedLandedCost === void 0 ? void 0 : selectedLandedCost.landedCost) === null || _b === void 0 ? void 0 : _b.landedCostGuaranteeCode) === 'ZONOS';
|
|
4655
|
+
// one item in deminimis with type of duty and tax has threshold value is "ABOVE"
|
|
4656
|
+
const isAboveDeminimis = !!((_d = (_c = selectedLandedCost === null || selectedLandedCost === void 0 ? void 0 : selectedLandedCost.landedCost) === null || _c === void 0 ? void 0 : _c.deMinimis) === null || _d === void 0 ? void 0 : _d.find(item => ['DUTY', 'TAX'].includes(item.type) && item.threshold === 'ABOVE'));
|
|
4657
|
+
cartStore.isSelectedShippingAboveDeminimis = isAboveDeminimis;
|
|
4658
|
+
cartStore.isSelectedShippingGuarantee = isGuarantee;
|
|
4659
|
+
// update session with selected landed cost
|
|
4660
|
+
const updateCalulateStatus = await cartStoreReCalculateTotal({
|
|
4661
|
+
landedCostId: (_e = selectedLandedCost.landedCost) === null || _e === void 0 ? void 0 : _e.id,
|
|
4662
|
+
});
|
|
4663
|
+
return updateCalulateStatus;
|
|
4664
|
+
};
|
|
4665
|
+
onChange('checkoutSessionId', () => {
|
|
4666
|
+
if (!cartStore.checkoutSessionId) {
|
|
4667
|
+
sessionStorage.removeItem('zonos--checkout-session-id');
|
|
4668
|
+
return;
|
|
4669
|
+
}
|
|
4670
|
+
sessionStorage.setItem('zonos--checkout-session-id', cartStore.checkoutSessionId);
|
|
4671
|
+
});
|
|
4672
|
+
const cartStoreUpdateItems = async (items) => {
|
|
4673
|
+
var _a;
|
|
4674
|
+
cartStore.items = items;
|
|
4675
|
+
const currency = (_a = items.find(Boolean)) === null || _a === void 0 ? void 0 : _a.currencyCode;
|
|
4676
|
+
const total = items.reduce((amt, item) => {
|
|
4677
|
+
return amt + item.amount * item.quantity;
|
|
4678
|
+
}, 0);
|
|
4679
|
+
if (!currency || !total) {
|
|
4680
|
+
// do nothing if we can't get currency or total
|
|
4681
|
+
return;
|
|
4682
|
+
}
|
|
4683
|
+
cartStore.currency = currency;
|
|
4684
|
+
// set loading state here because this is first load checkout session when we already have checkout session id stored
|
|
4685
|
+
stripeStore.isFetchingSession = true;
|
|
4686
|
+
await cartStoreReCalculateTotal({
|
|
4687
|
+
currency: currency,
|
|
4688
|
+
itemsAmount: total,
|
|
4689
|
+
});
|
|
4690
|
+
stripeStore.isFetchingSession = false;
|
|
4691
|
+
};
|
|
4692
|
+
const cartStoreResetSelectedShippingOption = () => {
|
|
4693
|
+
cartStore.selectedShippingOption = null;
|
|
4694
|
+
cartStore.isSelectedShippingAboveDeminimis = false;
|
|
4695
|
+
cartStore.isSelectedShippingGuarantee = false;
|
|
4696
|
+
cartStore.selectedShippingOptionExpectedDate = '';
|
|
4697
|
+
cartStore.selectedShippingOptionTransitTime = '';
|
|
4698
|
+
cartStore.shipping = 0;
|
|
4699
|
+
};
|
|
4700
|
+
const cartStoreNextStep = () => {
|
|
4701
|
+
if (cartStore.step === 'customer-info') {
|
|
4702
|
+
cartStore.step = 'shipping';
|
|
4703
|
+
}
|
|
4704
|
+
else if (cartStore.step === 'shipping') {
|
|
4705
|
+
cartStore.step = 'payment';
|
|
4706
|
+
}
|
|
4707
|
+
else if (cartStore.step === 'payment') {
|
|
4708
|
+
cartStore.step = 'finish';
|
|
4709
|
+
}
|
|
4710
|
+
};
|
|
4711
|
+
const cartStorePreviousStep = () => {
|
|
4712
|
+
if (cartStore.step === 'payment') {
|
|
4713
|
+
cartStore.step = 'shipping';
|
|
4714
|
+
}
|
|
4715
|
+
else if (cartStore.step === 'shipping') {
|
|
4716
|
+
cartStore.step = 'customer-info';
|
|
4717
|
+
// reset selected shipping option
|
|
4718
|
+
cartStoreResetSelectedShippingOption();
|
|
4719
|
+
}
|
|
4720
|
+
};
|
|
3653
4721
|
|
|
4722
|
+
exports.cartStore = cartStore;
|
|
4723
|
+
exports.cartStoreGetShippingTransitInfo = cartStoreGetShippingTransitInfo;
|
|
4724
|
+
exports.cartStoreNextStep = cartStoreNextStep;
|
|
4725
|
+
exports.cartStorePreviousStep = cartStorePreviousStep;
|
|
4726
|
+
exports.cartStoreReset = cartStoreReset;
|
|
4727
|
+
exports.cartStoreUpdateItems = cartStoreUpdateItems;
|
|
4728
|
+
exports.cartStoreUpdateSelectedShippingOption = cartStoreUpdateSelectedShippingOption;
|
|
4729
|
+
exports.cartStoreUpdateToErrorState = cartStoreUpdateToErrorState;
|
|
3654
4730
|
exports.currencyConvert = currencyConvert;
|
|
3655
4731
|
exports.currencyConvertAndFormat = currencyConvertAndFormat;
|
|
3656
4732
|
exports.currencyDisplay = currencyDisplay;
|
|
@@ -3658,10 +4734,18 @@ exports.currencyFormat = currencyFormat;
|
|
|
3658
4734
|
exports.getZCountryUrlParam = getZCountryUrlParam;
|
|
3659
4735
|
exports.handleFetch = handleFetch;
|
|
3660
4736
|
exports.initLocalizationStore = initLocalizationStore;
|
|
4737
|
+
exports.initStripeElements = initStripeElements;
|
|
3661
4738
|
exports.isValidSelector = isValidSelector;
|
|
3662
4739
|
exports.localizationStore = localizationStore;
|
|
3663
4740
|
exports.localizationStoreUpdateSelectedCountryCode = localizationStoreUpdateSelectedCountryCode;
|
|
4741
|
+
exports.localizationStoreUpdateSelectedLocale = localizationStoreUpdateSelectedLocale;
|
|
3664
4742
|
exports.log = log;
|
|
3665
4743
|
exports.logError = logError;
|
|
3666
4744
|
exports.setZCountryUrlParam = setZCountryUrlParam;
|
|
4745
|
+
exports.stripeStore = stripeStore;
|
|
4746
|
+
exports.stripeStoreConfirmPayment = stripeStoreConfirmPayment;
|
|
4747
|
+
exports.stripeStoreInitCheckoutSession = stripeStoreInitCheckoutSession;
|
|
4748
|
+
exports.stripeStorePrefetchLandedCost = stripeStorePrefetchLandedCost;
|
|
4749
|
+
exports.stripeStoreReset = stripeStoreReset;
|
|
4750
|
+
exports.stripeStoreRetrievePayment = stripeStoreRetrievePayment;
|
|
3667
4751
|
exports.translate = translate;
|