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