@zonos/elements 1.3.241 → 1.3.242
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-376f0f29.js → cart-4246c004.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-2e306ea5.js → hasInclusivePrice-ac0440e7.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-856220a7.js → invoice-d9655e9e.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-72ea7338.js → isCollectMobileTablet-65da8408.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-08aa03da.js → localization-ec5a6780.js} +120 -0
- package/dist/cjs/{paypal-ef7e2610.js → paypal-a3921278.js} +2 -2
- package/dist/cjs/{placeTestOrder-427786ae.js → placeTestOrder-907b981d.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-9057dec8.js → renderCheckoutCurrency-5fe59d60.js} +2 -2
- package/dist/cjs/zonos-address-display_9.cjs.entry.js +20 -20
- package/dist/cjs/zonos-address_4.cjs.entry.js +5 -5
- package/dist/cjs/zonos-card_5.cjs.entry.js +5 -5
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +9 -9
- package/dist/cjs/zonos-checkout.cjs.entry.js +119 -79
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +5 -5
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +5 -5
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +6 -6
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +13 -3
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +8 -0
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +41 -3
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +6 -0
- package/dist/collection/components/store/translationStore/strings.base.js +6 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +6 -0
- package/dist/collection/components/store/translationStore/strings.french.js +6 -0
- package/dist/collection/components/store/translationStore/strings.german.js +6 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +6 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +6 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +6 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/checkout/isShippableCountry.js +15 -1
- package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +129 -0
- package/dist/collection/types/generated/graphql.internal.types.js +2 -0
- package/dist/esm/{cart-60532eb4.js → cart-697f78dc.js} +2 -2
- package/dist/esm/{hasInclusivePrice-736c9eec.js → hasInclusivePrice-f41e52b8.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-cbb44b0b.js → invoice-50918381.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-e5503ab8.js → isCollectMobileTablet-2e7b4f01.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-285da14c.js → localization-ee8bb238.js} +120 -0
- package/dist/esm/{paypal-ac12eedb.js → paypal-b3299b37.js} +2 -2
- package/dist/esm/{placeTestOrder-bba48f55.js → placeTestOrder-245f2030.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-0176e66f.js → renderCheckoutCurrency-9404ed70.js} +2 -2
- package/dist/esm/zonos-address-display_9.entry.js +20 -20
- package/dist/esm/zonos-address_4.entry.js +5 -5
- package/dist/esm/zonos-card_5.entry.js +5 -5
- package/dist/esm/zonos-cart-items_12.entry.js +9 -9
- package/dist/esm/zonos-checkout.entry.js +120 -80
- package/dist/esm/zonos-collect-cart-items_3.entry.js +5 -5
- package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +3 -3
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +5 -5
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +6 -6
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +5 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-stripe-input.entry.js +4 -4
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/{cart-60532eb4.js → cart-697f78dc.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-736c9eec.js → hasInclusivePrice-f41e52b8.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-cbb44b0b.js → invoice-50918381.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-e5503ab8.js → isCollectMobileTablet-2e7b4f01.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-ee8bb238.js +1 -0
- package/dist/esm-es5/{paypal-ac12eedb.js → paypal-b3299b37.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-bba48f55.js → placeTestOrder-245f2030.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-0176e66f.js → renderCheckoutCurrency-9404ed70.js} +1 -1
- package/dist/esm-es5/zonos-address-display_9.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.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 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/scripts/index.d.ts +34 -2
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +4 -0
- package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +8 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +6 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/checkout/isShippableCountry.d.ts +2 -1
- package/dist/types/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.d.ts +24 -0
- package/dist/types/components.d.ts +16 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +14 -2
- package/dist/types/types/generated/graphql.internal.types.ts +15 -3
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-3a19ae6e.system.js → p-036e6a72.system.js} +1 -1
- package/dist/zonos-elements/{p-328990f0.js → p-1023a77d.js} +1 -1
- package/dist/zonos-elements/p-13b3a9bd.entry.js +1 -0
- package/dist/zonos-elements/{p-5afb9260.system.entry.js → p-14c920b2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-22e26d61.entry.js → p-1864fc4e.entry.js} +1 -1
- package/dist/zonos-elements/{p-f2614438.js → p-1af042d1.js} +1 -1
- package/dist/zonos-elements/{p-4954a927.system.entry.js → p-1c54c3db.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-32fddb6d.system.entry.js → p-1db4ae37.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-59a76f73.entry.js → p-231baaf8.entry.js} +1 -1
- package/dist/zonos-elements/{p-8dc025c7.system.entry.js → p-232b0fb5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-258407c6.js +1 -0
- package/dist/zonos-elements/{p-de517648.entry.js → p-28077dd4.entry.js} +1 -1
- package/dist/zonos-elements/{p-c5195813.entry.js → p-29bb70e0.entry.js} +1 -1
- package/dist/zonos-elements/{p-1a5a23ed.js → p-2aa284e6.js} +1 -1
- package/dist/zonos-elements/{p-8792fef2.system.entry.js → p-2c2a1339.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2dd9b3e0.entry.js +1 -0
- package/dist/zonos-elements/{p-60397a04.system.entry.js → p-3318ba9e.system.entry.js} +1 -1
- package/dist/zonos-elements/p-343dee8b.system.js +1 -0
- package/dist/zonos-elements/{p-bd603c1a.entry.js → p-3e67ca05.entry.js} +1 -1
- package/dist/zonos-elements/{p-2ed81f5d.system.js → p-457a2957.system.js} +1 -1
- package/dist/zonos-elements/{p-85205ac8.system.js → p-5216584e.system.js} +1 -1
- package/dist/zonos-elements/{p-2ab3f86c.system.entry.js → p-5aff8a31.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5feb3750.system.entry.js +1 -0
- package/dist/zonos-elements/{p-61aa9365.system.entry.js → p-633017f0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8fd37163.entry.js → p-635b8da9.entry.js} +1 -1
- package/dist/zonos-elements/{p-cd12c86c.system.js → p-67414f66.system.js} +1 -1
- package/dist/zonos-elements/{p-d9007f2e.system.entry.js → p-689ce3eb.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6dc9b9e5.js +1 -0
- package/dist/zonos-elements/p-752dae00.system.js +1 -0
- package/dist/zonos-elements/{p-fc43442d.system.entry.js → p-75813a38.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7e51fe84.system.entry.js +1 -0
- package/dist/zonos-elements/{p-f04c208e.js → p-8159d0f8.js} +2 -2
- package/dist/zonos-elements/{p-149365e3.system.entry.js → p-8432de4c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2f869f2c.system.entry.js → p-84cf1a90.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-944d00da.entry.js → p-8f0f6449.entry.js} +1 -1
- package/dist/zonos-elements/{p-90f58466.system.entry.js → p-90e10b7e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ba456282.system.entry.js → p-917f714c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-949c9d2a.entry.js +1 -0
- package/dist/zonos-elements/{p-e0227f2c.entry.js → p-9a67d4f2.entry.js} +1 -1
- package/dist/zonos-elements/{p-4dfd33d9.entry.js → p-9ab32f9b.entry.js} +1 -1
- package/dist/zonos-elements/{p-14314ad3.entry.js → p-9c49daa4.entry.js} +1 -1
- package/dist/zonos-elements/{p-b5c31ca4.system.entry.js → p-9fa90292.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9e29a4a3.entry.js → p-a04c7b1e.entry.js} +1 -1
- package/dist/zonos-elements/{p-121c60c1.system.entry.js → p-a359e0a2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fa322dc1.entry.js → p-aa028d91.entry.js} +1 -1
- package/dist/zonos-elements/p-b34553d8.entry.js +1 -0
- package/dist/zonos-elements/{p-3e30e203.system.js → p-b526a41e.system.js} +1 -1
- package/dist/zonos-elements/{p-79b9aee4.system.entry.js → p-b90f346f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-62cfcd21.system.entry.js → p-b9974182.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e8f4da3a.js → p-bcdf1cba.js} +1 -1
- package/dist/zonos-elements/p-bdf49bed.entry.js +1 -0
- package/dist/zonos-elements/{p-fc64f69d.entry.js → p-bfc09897.entry.js} +1 -1
- package/dist/zonos-elements/{p-264690d7.entry.js → p-c01f86b4.entry.js} +1 -1
- package/dist/zonos-elements/{p-865536f0.entry.js → p-c1fb3a2d.entry.js} +1 -1
- package/dist/zonos-elements/p-c2442878.system.js +1 -1
- package/dist/zonos-elements/{p-de5a68c3.system.entry.js → p-ce48f579.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-094f9c5a.entry.js → p-cfb2b5c7.entry.js} +1 -1
- package/dist/zonos-elements/{p-89a5e936.system.entry.js → p-cfb9b847.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-87bed9ec.system.js → p-d9b96ce6.system.js} +1 -1
- package/dist/zonos-elements/{p-9f1bd9b8.entry.js → p-dcf999d8.entry.js} +1 -1
- package/dist/zonos-elements/{p-13927760.system.entry.js → p-e1ed7c4a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3a8a6092.system.js → p-ea0289e8.system.js} +1 -1
- package/dist/zonos-elements/{p-7eae7c62.entry.js → p-ea1d5802.entry.js} +1 -1
- package/dist/zonos-elements/{p-9c7edad5.system.entry.js → p-ee5d5203.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-dfb429d7.system.entry.js → p-f7e6c1b5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-fab5f272.js +1 -0
- package/dist/zonos-elements/{p-df69f036.entry.js → p-fc783723.entry.js} +1 -1
- package/dist/zonos-elements/{p-706d1537.entry.js → p-fecf66da.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/localization-285da14c.js +0 -1
- package/dist/zonos-elements/p-0307e4ac.entry.js +0 -1
- package/dist/zonos-elements/p-0c977c47.system.js +0 -1
- package/dist/zonos-elements/p-3ef06605.js +0 -1
- package/dist/zonos-elements/p-5a5c06ad.entry.js +0 -1
- package/dist/zonos-elements/p-664da916.entry.js +0 -1
- package/dist/zonos-elements/p-83bf52d6.js +0 -1
- package/dist/zonos-elements/p-ab195686.system.js +0 -1
- package/dist/zonos-elements/p-b152859d.system.entry.js +0 -1
- package/dist/zonos-elements/p-b408debb.system.entry.js +0 -1
- package/dist/zonos-elements/p-c3533444.entry.js +0 -1
- package/dist/zonos-elements/p-e5ee64c0.entry.js +0 -1
- package/dist/zonos-elements/p-f73d243a.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const zonosStore = require('./zonosStore-37a4b4f4.js');
|
|
4
|
-
const cart = require('./cart-
|
|
5
|
-
const localization = require('./localization-
|
|
4
|
+
const cart = require('./cart-4246c004.js');
|
|
5
|
+
const localization = require('./localization-ec5a6780.js');
|
|
6
6
|
const handleFetch = require('./handleFetch-954f30e1.js');
|
|
7
7
|
const isDarkColor = require('./isDarkColor-878e600e.js');
|
|
8
8
|
const VarianceTest = require('./VarianceTest-bec00ea8.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const cart = require('./cart-
|
|
4
|
-
const localization = require('./localization-
|
|
3
|
+
const cart = require('./cart-4246c004.js');
|
|
4
|
+
const localization = require('./localization-ec5a6780.js');
|
|
5
5
|
const handleFetch = require('./handleFetch-954f30e1.js');
|
|
6
6
|
|
|
7
7
|
const placeTestOrder = async () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const cart = require('./cart-
|
|
4
|
-
const localization = require('./localization-
|
|
3
|
+
const cart = require('./cart-4246c004.js');
|
|
4
|
+
const localization = require('./localization-ec5a6780.js');
|
|
5
5
|
|
|
6
6
|
const getDisplayCurrency = () => {
|
|
7
7
|
var _a, _b;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-69fa8852.js');
|
|
6
|
-
const localization = require('./localization-
|
|
6
|
+
const localization = require('./localization-ec5a6780.js');
|
|
7
7
|
const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
|
|
8
|
-
const cart = require('./cart-
|
|
8
|
+
const cart = require('./cart-4246c004.js');
|
|
9
9
|
const classes = require('./classes-b7918f56.js');
|
|
10
10
|
const getBorderRadius = require('./getBorderRadius-2ef1170d.js');
|
|
11
11
|
const zonosStore = require('./zonosStore-37a4b4f4.js');
|
|
@@ -169,9 +169,9 @@ const ZonosAddressSuggestions = class {
|
|
|
169
169
|
return segments;
|
|
170
170
|
}
|
|
171
171
|
render() {
|
|
172
|
-
return (index.h(index.Host, { key: '
|
|
172
|
+
return (index.h(index.Host, { key: '00686fe9c09bb764f18548ea438f9fa39deb5413', class: "zonos--address-suggestions", role: "group", style: {
|
|
173
173
|
'--zonos--border-radius': getBorderRadius.getBorderRadius(),
|
|
174
|
-
} }, index.h("ul", { key: '
|
|
174
|
+
} }, index.h("ul", { key: '89c0f50ea5bbabdf3efe3e58bd4d7a7c96f33b47', "aria-label": "Suggestions", class: "wrapper", role: "listbox" }, !!this.localSuggestions.length && (index.h("li", { key: 'ad3286076569701e1318c93b7ebc674ad85a7ae6', "aria-selected": false, class: "powered-by option", role: "option" }, index.h("div", { key: 'bdcb8cc865eb77b3a0189c8d88a7698d405c332e', class: "powered-by-container" }, index.h("zonos-text", { key: '1db905ec989aef0f8dd30835657d1dd1b1836fc2', type: "caption" }, "Suggestions powered by"), index.h("zonos-text", { key: '55c36840f1bb850ce135bd238d01b9a3055463d7', type: "semiBoldLabel" }, "Google")), index.h("zonos-button", { key: 'e89402e39549482c41b046fb534e727690e43100', "aria-label": "Clear suggestions", icon: index.h("zonos-icon", { content: RemoveIcon$1 }), noBackground: true, onClick: () => {
|
|
175
175
|
this.localSuggestions = [];
|
|
176
176
|
} }))), this.localSuggestions.map(suggestion => (
|
|
177
177
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
@@ -1361,10 +1361,10 @@ const ZonosAddress = class {
|
|
|
1361
1361
|
this.country = localization.localizationStore.selectedCountryCode;
|
|
1362
1362
|
}
|
|
1363
1363
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
1364
|
-
return (index.h(index.Host, { key: '
|
|
1364
|
+
return (index.h(index.Host, { key: '7214ab1c348c1236dfa65f3bb20866fb3262c35d', class: classes.classes([
|
|
1365
1365
|
'zonos--address zonos--elements',
|
|
1366
1366
|
`zonos--${this.type}-address`,
|
|
1367
|
-
]) }, index.h("zonos-text", { key: '
|
|
1367
|
+
]) }, index.h("zonos-text", { key: '3ce287d8ffd3f5fdb4745311d17992c0b9ee9678', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("slot", { key: '0e33486852d6512b054bb480d0295ce97d2667eb', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
|
|
1368
1368
|
}
|
|
1369
1369
|
get el() { return index.getElement(this); }
|
|
1370
1370
|
static get watchers() { return {
|
|
@@ -1388,7 +1388,7 @@ ZonosAddress.style = ZonosCustomAddressStyle0;
|
|
|
1388
1388
|
|
|
1389
1389
|
const RemoveIcon = `<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>`;
|
|
1390
1390
|
|
|
1391
|
-
const zonosDialogCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:2147483009;background:var(--zonos-elements-gray-0);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:2147483008;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:var(--zonos--min-height, auto);height:var(--zonos--height, auto);width:var(--zonos--width, auto);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--zonos-elements-radius-10);-ms-flex-item-align:start;align-self:flex-start}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483008;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:2147483009;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";
|
|
1391
|
+
const zonosDialogCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--backdrop,:host .zonos--dialog-layout{opacity:0;z-index:-999;visibility:hidden;-webkit-transition:0.3s all ease;transition:0.3s all ease}:host .zonos--backdrop{width:100vw;height:100vh;left:0;top:0;background:var(--zonos-elements-backdrop-color);position:fixed}:host .zonos--loading{position:absolute;left:0;right:0;bottom:0;top:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:4px;z-index:2147483009;background:var(--zonos-elements-gray-0);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--loading-text,:host .zonos--loading-title{max-width:100%;padding:0 32px;text-align:center}:host .zonos--dialog-layout{width:100vw;height:100vh;left:0;top:0;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--zonos-elements-text-color);visibility:hidden}:host .zonos--dialog{position:relative;z-index:2147483008;background:var(--zonos-elements-gray-0);max-width:90vw;max-height:90vh;min-height:var(--zonos--min-height, auto);height:var(--zonos--height, auto);width:var(--zonos--width, auto);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));outline:none;-webkit-box-shadow:var(--zonos-elements-v3-shadow-xxl);box-shadow:var(--zonos-elements-v3-shadow-xxl);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--header{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:16px 24px}:host .zonos--header .-zonos-stencil-library--header-text{-ms-flex-positive:1;flex-grow:1}:host .zonos--header .zonos--close-button{width:var(--zonos-elements-size-md);height:var(--zonos-elements-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;border-radius:var(--zonos-elements-radius-10);-ms-flex-item-align:start;align-self:flex-start}:host .zonos--header .zonos--close-button:hover{background:var(--zonos-elements-hover-color)}:host .zonos--body{padding:8px 24px;max-height:100%;height:100%;overflow:auto}:host .zonos--body.zonos--no-body-padding{padding:0}:host .zonos--footer{padding:16px 24px}:host(.open) .zonos--dialog-layout,:host(.open) .zonos--backdrop{visibility:visible}:host(.open) .zonos--backdrop{z-index:2147483008;opacity:0.65}:host(.open) .zonos--dialog-layout{opacity:1;z-index:2147483009;-webkit-transform:scale(1);transform:scale(1)}:host(.no-border) .zonos--dialog{border:none}:host(.mobile) .zonos--dialog{max-width:100vw;max-height:100vh;height:100%;width:100%;border-radius:0;-webkit-box-shadow:none;box-shadow:none;border:none}";
|
|
1392
1392
|
const ZonosDialogStyle0 = zonosDialogCss;
|
|
1393
1393
|
|
|
1394
1394
|
const ZonosDialog = class {
|
|
@@ -1474,7 +1474,7 @@ const ZonosDialog = class {
|
|
|
1474
1474
|
const borderStyle = getBorderRadius.getBorderRadius({
|
|
1475
1475
|
overrideBorderStyle: this.borderStyle,
|
|
1476
1476
|
});
|
|
1477
|
-
return (index.h(index.Host, { key: '
|
|
1477
|
+
return (index.h(index.Host, { key: '3764ddd25cf29e7b5ebc420c2fc47de213d2bcd6', class: classes.classes([
|
|
1478
1478
|
'zonos--elements',
|
|
1479
1479
|
this.open && 'open',
|
|
1480
1480
|
this.isLoading && 'is-loading',
|
|
@@ -1486,10 +1486,10 @@ const ZonosDialog = class {
|
|
|
1486
1486
|
'--zonos--height': this.height || 'initial',
|
|
1487
1487
|
'--zonos--min-height': this.minHeight || '500px',
|
|
1488
1488
|
'--zonos--width': this.width,
|
|
1489
|
-
} }, index.h("div", { key: '
|
|
1489
|
+
} }, index.h("div", { key: 'aded0d33e4605a40b107e89fcbc95ef024b187f7', class: "zonos--backdrop" }), index.h("div", { key: '55500b0bb118be90d474fc758f979ac3f317d52e', class: "zonos--dialog-layout", inert: !this.open, onClick: this.clickOutsideDialogHandler }, index.h("div", { key: 'a21fa7808c16df11cab8800279774abb38828f1b', class: "zonos--dialog" }, this.isLoading && (index.h("div", { key: 'b8e9229591ad83446400deafdf5bee284091f1d9', class: "zonos--loading" }, index.h("zonos-spinner", { key: 'f284c8604d8710be60a725fa8c23c04f32e44b1f', size: 30 }), this.loadingTitle && (index.h("zonos-text", { key: '16d605c9272d9bdbb2d8b7f2d5685978cc2cf6eb', class: "zonos--loading-title", size: "l", weight: 700 }, this.loadingTitle)), this.loadingText && (index.h("zonos-text", { key: '0e9acec26d8502781ad8c853959740ece8fd2907', class: "zonos--loading-text" }, this.loadingText)))), (this.headerText || !this.noCloseButton) && (index.h("div", { key: '77d2dac98791ddea7e3bc3ab0e740c0b170072d8', class: "zonos--header" }, this.headerText && (index.h("h3", { key: 'f8b07366a4a9d5cd1686d7e3663ce0f6ba401ec7', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (index.h("zonos-button", { key: '8c82dbf7d636715f3a391fe13ced4e3bc0ee079c', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler, title: "Close dialog", variant: "subtle" })))), index.h("div", { key: 'd44cbf2cbb551043502e5e0c80048adeffaaf303', class: classes.classes([
|
|
1490
1490
|
'zonos--body',
|
|
1491
1491
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
1492
|
-
]) }, index.h("slot", { key: '
|
|
1492
|
+
]) }, index.h("slot", { key: '508a3fcc6fbfdec55033a584e235ba9fd9e7448f' })), index.h("slot", { key: '1f24ec0974cd1def288b744d6aa68399367aefd8', name: "dialog-footer" })))));
|
|
1493
1493
|
}
|
|
1494
1494
|
static get assetsDirs() { return ["assets"]; }
|
|
1495
1495
|
};
|
|
@@ -7519,24 +7519,24 @@ const ZonosStripePhoneInput = class {
|
|
|
7519
7519
|
.filter(Boolean)
|
|
7520
7520
|
.sort((a, b) => a.displayName.localeCompare(b.displayName))
|
|
7521
7521
|
: [];
|
|
7522
|
-
return (index.h(index.Host, { key: '
|
|
7522
|
+
return (index.h(index.Host, { key: '3f073620fb9250208be54ffd6d0dfbc8c5da7d6f', class: classes.classes([
|
|
7523
7523
|
'zonos--phone-input zonos--elements',
|
|
7524
7524
|
isDark && 'dark',
|
|
7525
|
-
]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: '
|
|
7525
|
+
]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: 'bdaf73f9a51fa2a39dd9684584ec4f032ea39d00', class: classes.classes([
|
|
7526
7526
|
'zonos--label-wrapper',
|
|
7527
7527
|
this.disabled && 'disabled',
|
|
7528
7528
|
this.isFocused && 'focused',
|
|
7529
7529
|
hasContent && 'has-content',
|
|
7530
7530
|
this.error && 'has-error',
|
|
7531
7531
|
this.inputLabel && 'has-label',
|
|
7532
|
-
]) }, index.h("select", { key: '
|
|
7532
|
+
]) }, index.h("select", { key: 'ad4477bfc5e1971a5e7a34a5e06b699c6115b3d3', class: "zonos--select", disabled: this.disabled, onBlur: this.handleBlur, onChange: this.handleCountryChange, onFocus: this.handleFocus }, countryOptionsList.map(option => {
|
|
7533
7533
|
var _a;
|
|
7534
7534
|
return (index.h("option", { key: option.countryCode, selected: option.countryCode === ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.countryCode), value: option.countryCode }, option.displayName, " (+", option.phoneCode, ")"));
|
|
7535
|
-
})), index.h("div", { key: '
|
|
7535
|
+
})), index.h("div", { key: '39d6ae20a62bfa7d21a3d4a1143a4b42a87bbc41', class: "zonos--input-group" }, index.h("div", { key: 'dba0974115ce5e4f3f22689f406c3defe2989b29', class: "zonos--select-wrapper" }, index.h("div", { key: '3231072a3dba2d61a5567ad8ceacd871b3b7657c', class: "zonos--country-select" }, index.h("div", { key: '3fd9224b1ef63a6e2e1c11c19a1dddbaa1337ad1', class: "zonos--country-select-content" }, this.selectedCountry && (index.h("div", { key: 'ba2d811521d84bbe3c0a2749307cce90e9347457', class: "zonos--country-select-selected" }, index.h("div", { key: '4b21bf8d586b51f3d0ef9ba881e5a73d4742d440', class: "zonos--country-flag-wrapper" }, index.h("zonos-country-flag", { key: 'ed2fca152a8f1064051758bf624bb02d0af61379', class: "zonos--country-flag", countryCode: this.selectedCountry.countryCode })), index.h("div", { key: 'ee43fea008cfde320a15a151a07f1295dd0d77dd', class: "zonos--country-code" }, "+", this.selectedCountry.phoneCode))), index.h("div", { key: '28961fccf5ad433b3a81fab91773d8d8d4e17b30', class: "zonos--select-chevron-wrapper" }, index.h("zonos-icon", { key: '8233c34fdbf221f2289506b57b3fd429ec048df3', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon$1, iconColor: "gray-800" }))))), index.h("div", { key: '0d947d929218bac9929f411c5989a18ab36054fe', class: classes.classes([
|
|
7536
7536
|
'zonos--input-container',
|
|
7537
7537
|
this.inputLabel && 'has-label',
|
|
7538
7538
|
hasContent && 'has-content',
|
|
7539
|
-
]) }, index.h("input", Object.assign({ key: '
|
|
7539
|
+
]) }, index.h("input", Object.assign({ key: '16956304c84642b82039e0180aea6ce96269799a' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: "zonos--floated-input", disabled: this.disabled, id: this.inputId, onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handlePhoneChange, placeholder: ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.phonePlaceholder) || '', ref: el => (this.inputRef = el), type: "tel" })), this.inputLabel && (index.h("div", { key: '57f3d9ad16aee89271c134d409abb6383b225f55', class: "zonos--floated-label" }, index.h("label", { key: 'd2af8c75f82df1b3176f708bea86a18b7ee4840d', htmlFor: this.inputId }, this.inputLabel || localization.translate('Phone number'))))))), this.error && (index.h("zonos-text", { key: '3bb993c5e780f4394d141d7c62bd1f8ea4d1fc70', textColor: "red-600" }, this.error))));
|
|
7540
7540
|
}
|
|
7541
7541
|
get el() { return index.getElement(this); }
|
|
7542
7542
|
static get watchers() { return {
|
|
@@ -7652,14 +7652,14 @@ const ZonosStripeSelect = class {
|
|
|
7652
7652
|
const fontSize = zonosStore.zonosStore.appearance.fontSizeInputValue || 16;
|
|
7653
7653
|
const hasContent = this.internalValue || this.selectPlaceholder;
|
|
7654
7654
|
const showClearButton = this.isClearable && this.internalValue && !this.isDisabled;
|
|
7655
|
-
return (index.h(index.Host, { key: '
|
|
7655
|
+
return (index.h(index.Host, { key: '61d5f0b2c7fafd2df4ea6beacc8500bad9b64da7', class: classes.classes([
|
|
7656
7656
|
'zonos--select zonos--elements',
|
|
7657
7657
|
isDark && 'dark',
|
|
7658
7658
|
this.isError && 'has-error',
|
|
7659
|
-
]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: '
|
|
7659
|
+
]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius.getBorderRadius(), '--zonos--font-family': zonosStore.zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, index.h("div", { key: '63198cbb818342d8deecbe1e0c5d9978a51df064', class: classes.classes([
|
|
7660
7660
|
'zonos--label-wrapper',
|
|
7661
7661
|
this.isDisabled && 'disabled',
|
|
7662
|
-
]) }, index.h("select", Object.assign({ key: '
|
|
7662
|
+
]) }, index.h("select", Object.assign({ key: '8bbe869f708d9f87f9dc6d66a8f573a795399e23' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes.classes([
|
|
7663
7663
|
'zonos--floated-select',
|
|
7664
7664
|
!!this.selectLabel && 'has-label',
|
|
7665
7665
|
hasContent && 'has-content',
|
|
@@ -7669,9 +7669,9 @@ const ZonosStripeSelect = class {
|
|
|
7669
7669
|
this.selectChange.emit(select.value);
|
|
7670
7670
|
this.selectedValue = select.value;
|
|
7671
7671
|
this.el.dispatchEvent(new Event('change'));
|
|
7672
|
-
}, required: this.required }), index.h("option", { key: '
|
|
7672
|
+
}, required: this.required }), index.h("option", { key: '6ae19c6b12976cd32e6efc9771a000b29945ee71', disabled: true, selected: !this.internalValue, value: "" }, this.selectPlaceholder || localization.translate('Select')), this.internalOptions.map(option => (index.h("option", { key: option.value, selected: this.internalValue === option.value ||
|
|
7673
7673
|
// Sometimes google returns the label not the code for some countries
|
|
7674
|
-
this.internalValue === option.label, value: option.value }, option.label)))), index.h("div", { key: '
|
|
7674
|
+
this.internalValue === option.label, value: option.value }, option.label)))), index.h("div", { key: 'a21b56d32839669a95c3d36f215f85bb94f6bb1a', class: "zonos--floated-label" }, index.h("label", { key: 'fb710c149659ece3d433f57d8d27562395bb2a52', htmlFor: this.selectId }, this.selectLabel)), index.h("div", { key: '0f57b78a3fdafc0ff7bd1a5a2ead9e37be7ee915', class: "zonos--actions-wrapper" }, showClearButton && (index.h("button", { key: 'ffc562b96195b1990a26d4091971ddb2293b6ac7', "aria-label": "Clear selection", class: "zonos--clear-button", onClick: this.handleClear, tabIndex: 0, type: "button" }, index.h("zonos-icon", { key: 'c3eb42b95f57df3187772d1502e07a7052a72913', class: "zonos--clear-icon", content: RemoveLineIcon, iconColor: "gray-1200" }))), index.h("zonos-icon", { key: '7a6581602aa531d5d9bdea82c3f50952d901bad4', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))), this.error && (index.h("zonos-text", { key: 'b1a3819c075d5e8f70020274145675c8d19b143a', textColor: "red-600" }, this.error))));
|
|
7675
7675
|
}
|
|
7676
7676
|
get el() { return index.getElement(this); }
|
|
7677
7677
|
static get watchers() { return {
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-69fa8852.js');
|
|
6
6
|
const throttle = require('./throttle-7dd64984.js');
|
|
7
|
-
const cart = require('./cart-
|
|
8
|
-
const localization = require('./localization-
|
|
7
|
+
const cart = require('./cart-4246c004.js');
|
|
8
|
+
const localization = require('./localization-ec5a6780.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-37a4b4f4.js');
|
|
10
10
|
const handleFetch = require('./handleFetch-954f30e1.js');
|
|
11
11
|
const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-eda13ef8.js');
|
|
@@ -328,11 +328,11 @@ const ZonosAddress = class {
|
|
|
328
328
|
this.isAddressFilled = true;
|
|
329
329
|
}
|
|
330
330
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
331
|
-
return (index.h(index.Host, { key: '
|
|
331
|
+
return (index.h(index.Host, { key: 'b02889c4677a27a8c54a411d66fb31e15af78e1a', class: classes.classes([
|
|
332
332
|
'zonos--address',
|
|
333
333
|
'zonos--elements',
|
|
334
334
|
`zonos--${this.type}-address`,
|
|
335
|
-
]) }, this.titleText && (index.h("zonos-text", { key: '
|
|
335
|
+
]) }, this.titleText && (index.h("zonos-text", { key: 'f52beb7ed6699ec1c73ee35a3436798a1fea38c7', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), index.h("slot", { key: '7c9602892de932e8a3f90a37b53a936f39082916', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), index.h("div", { key: '8ea6698f5b9d3bb525942c146e2cf67fefad6ad8', class: "zonos--address-component" })));
|
|
336
336
|
}
|
|
337
337
|
get el() { return index.getElement(this); }
|
|
338
338
|
static get watchers() { return {
|
|
@@ -704,7 +704,7 @@ const ZonosLoadingOverlay = class {
|
|
|
704
704
|
this.size = 40;
|
|
705
705
|
}
|
|
706
706
|
render() {
|
|
707
|
-
return (index.h(index.Host, { key: '
|
|
707
|
+
return (index.h(index.Host, { key: '13154a3c9250f15d8dca292f0673c6465bfb15e0', class: classes.classes(['zonos--elements', this.open && 'zonos--open']) }, index.h("div", { key: '4470fccd21e58bd7959ef3e20c8775ac637cace0', class: "zonos--loading-overlay" }, index.h("zonos-spinner", { key: '5b32b821cea982866da56176eeaafd5d8958f25d', size: this.size, spinnerColor: this.spinnerColor }))));
|
|
708
708
|
}
|
|
709
709
|
};
|
|
710
710
|
ZonosLoadingOverlay.style = ZonosLoadingOverlayStyle0;
|
|
@@ -6,10 +6,10 @@ const index = require('./index-69fa8852.js');
|
|
|
6
6
|
const zonosStore = require('./zonosStore-37a4b4f4.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const getBorderRadius = require('./getBorderRadius-2ef1170d.js');
|
|
9
|
-
const cart = require('./cart-
|
|
10
|
-
const localization = require('./localization-
|
|
9
|
+
const cart = require('./cart-4246c004.js');
|
|
10
|
+
const localization = require('./localization-ec5a6780.js');
|
|
11
11
|
const handleFetch = require('./handleFetch-954f30e1.js');
|
|
12
|
-
const paypal = require('./paypal-
|
|
12
|
+
const paypal = require('./paypal-a3921278.js');
|
|
13
13
|
const VarianceTest = require('./VarianceTest-bec00ea8.js');
|
|
14
14
|
require('./isDarkColor-878e600e.js');
|
|
15
15
|
|
|
@@ -259,7 +259,7 @@ const ZonosPayment = class {
|
|
|
259
259
|
}
|
|
260
260
|
render() {
|
|
261
261
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
262
|
-
return (index.h(index.Host, { key: '
|
|
262
|
+
return (index.h(index.Host, { key: '1fb61e01184d3a0b2dc079ae468e96175d9f6518', class: "zonos--payment zonos--elements" }, this.titleText && (index.h("zonos-text", { key: '3860ff7fc2656ff045ce09c0de2e14aa7a22e194', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), index.h("div", { key: '3cabad9c095f2eeba8cfc464374ca9abfc2af5ee', class: "zonos--payment-component" }), index.h("div", { key: '9e2b13a0d8131a5513f99e2a6436ca3c5f03d7cf', class: "zonos--payment-paypal-container" })));
|
|
263
263
|
}
|
|
264
264
|
get el() { return index.getElement(this); }
|
|
265
265
|
static get watchers() { return {
|
|
@@ -323,7 +323,7 @@ const ZonosPaypalPayment = class {
|
|
|
323
323
|
this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
|
|
324
324
|
}
|
|
325
325
|
render() {
|
|
326
|
-
return (index.h(index.Host, { key: '
|
|
326
|
+
return (index.h(index.Host, { key: '35387382aaa81e3f8e025e8f3503be41b86e2355', class: "zonos--paypal-payment zonos--elements" }, index.h("div", { key: '34fad15dee67d8b913071a59d35b1c2317d4d3a0', class: "zonos--payment-paypal-container" })));
|
|
327
327
|
}
|
|
328
328
|
get el() { return index.getElement(this); }
|
|
329
329
|
};
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-69fa8852.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const localization = require('./localization-
|
|
8
|
-
const renderCheckoutCurrency = require('./renderCheckoutCurrency-
|
|
6
|
+
const cart = require('./cart-4246c004.js');
|
|
7
|
+
const localization = require('./localization-ec5a6780.js');
|
|
8
|
+
const renderCheckoutCurrency = require('./renderCheckoutCurrency-5fe59d60.js');
|
|
9
9
|
const cleanHtmlMarkdown = require('./cleanHtmlMarkdown-577d0a77.js');
|
|
10
10
|
const classes = require('./classes-b7918f56.js');
|
|
11
11
|
const zonosStore = require('./zonosStore-37a4b4f4.js');
|
|
12
|
-
const hasInclusivePrice = require('./hasInclusivePrice-
|
|
13
|
-
const paypal = require('./paypal-
|
|
12
|
+
const hasInclusivePrice = require('./hasInclusivePrice-ac0440e7.js');
|
|
13
|
+
const paypal = require('./paypal-a3921278.js');
|
|
14
14
|
const handleFetch = require('./handleFetch-954f30e1.js');
|
|
15
15
|
const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
|
|
16
16
|
const getBorderRadius = require('./getBorderRadius-2ef1170d.js');
|
|
17
17
|
const VarianceTest = require('./VarianceTest-bec00ea8.js');
|
|
18
18
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
19
|
-
const placeTestOrder = require('./placeTestOrder-
|
|
19
|
+
const placeTestOrder = require('./placeTestOrder-907b981d.js');
|
|
20
20
|
const isDarkColor = require('./isDarkColor-878e600e.js');
|
|
21
21
|
const isColorVariable = require('./isColorVariable-525dbfa7.js');
|
|
22
22
|
const updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-3a1db9de.js');
|
|
@@ -1742,11 +1742,11 @@ const ZonosRestState = class {
|
|
|
1742
1742
|
}
|
|
1743
1743
|
render() {
|
|
1744
1744
|
const imageUrl = this.getImageRestState();
|
|
1745
|
-
return (index.h(index.Host, { key: '
|
|
1745
|
+
return (index.h(index.Host, { key: '2d9be86849c6ff2f039ca21676cbdf912538eb1d', class: classes.classes(['zonos--elements zonos--restState']), style: {
|
|
1746
1746
|
'--zonos--font-family': zonosStore.zonosStoreFontFamily(),
|
|
1747
|
-
} }, index.h("div", { key: '
|
|
1747
|
+
} }, index.h("div", { key: 'f538f05fe92eca4ee05daf72ee3387bea337c20c', class: "zonos--restState-image" }, index.h("img", { key: 'cc752b1ed3e9e656810c901df9f8b19462efc978', alt: this.restStateType, onError: () => {
|
|
1748
1748
|
this.isErrorImageLoad = true;
|
|
1749
|
-
}, src: imageUrl })), index.h("div", { key: '
|
|
1749
|
+
}, src: imageUrl })), index.h("div", { key: '4729c415dbac98876fcd907437b8df21b925dec5', class: "content" }, index.h("zonos-text", { key: '39313c8c71d228cd1076e809146ad7ac3d877a9a', class: "title", type: "boldSubheader" }, this.restStateTitle), index.h("zonos-text", { key: '69813bd32ae3867ebebcc511655f2052b1175945', class: "subtitle" }, this.restStateSubtitle)), index.h("div", { key: '98b085930fd76e2ff095cc971ae4699041c1a550', class: "action" }, index.h("slot", { key: '188318643319081914ed30aad91de5f15b014953' }))));
|
|
1750
1750
|
}
|
|
1751
1751
|
static get assetsDirs() { return ["assets"]; }
|
|
1752
1752
|
};
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-69fa8852.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const paypal = require('./paypal-
|
|
8
|
-
const localization = require('./localization-
|
|
6
|
+
const cart = require('./cart-4246c004.js');
|
|
7
|
+
const paypal = require('./paypal-a3921278.js');
|
|
8
|
+
const localization = require('./localization-ec5a6780.js');
|
|
9
9
|
const zonosStore = require('./zonosStore-37a4b4f4.js');
|
|
10
10
|
const buildCartItemsByTempCart = require('./buildCartItemsByTempCart-edddbf4b.js');
|
|
11
11
|
const handleFetch = require('./handleFetch-954f30e1.js');
|
|
@@ -108,10 +108,23 @@ const isDisabledCountry = (showLog = true) => {
|
|
|
108
108
|
return false;
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
const isShippableCountry = (showLog = true
|
|
111
|
+
const isShippableCountry = (showLog = true,
|
|
112
|
+
/**
|
|
113
|
+
* If provided, will check if the country is shippable based on the provided country code instead of the Hello selected country code
|
|
114
|
+
*/
|
|
115
|
+
providedCountryCode) => {
|
|
116
|
+
var _a;
|
|
112
117
|
if (!localization.localizationStore.localizationLoaded) {
|
|
113
118
|
return false;
|
|
114
119
|
}
|
|
120
|
+
if (providedCountryCode) {
|
|
121
|
+
const isProvidedCountryCodeShippableCountry = !!((_a = localization.localizationStore.shippingZoneCountries) === null || _a === void 0 ? void 0 : _a[providedCountryCode]) &&
|
|
122
|
+
!zonosStore.zonosStore.disabledCountries.includes(providedCountryCode);
|
|
123
|
+
if (showLog && !isProvidedCountryCodeShippableCountry) {
|
|
124
|
+
VarianceTest.log(`Checkout: ${providedCountryCode} is not a shippable country: ${isProvidedCountryCodeShippableCountry}`);
|
|
125
|
+
}
|
|
126
|
+
return isProvidedCountryCodeShippableCountry;
|
|
127
|
+
}
|
|
115
128
|
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
116
129
|
if (!localization.localizationStore.isShippableCountry) {
|
|
117
130
|
if (showLog) {
|
|
@@ -122,15 +135,70 @@ const isShippableCountry = (showLog = true) => {
|
|
|
122
135
|
return true;
|
|
123
136
|
};
|
|
124
137
|
|
|
138
|
+
const SHIP_TO_COUNTRY_SELECTOR = 'select[name="shippingAddress.countryCode"]';
|
|
125
139
|
/**
|
|
126
|
-
* Watch for changes in domestic checkout step
|
|
140
|
+
* Watch for changes in domestic checkout step. Redirects user to home page to open international checkout when user selects a country in the international shipping zone.
|
|
127
141
|
* @note Only works on default bigcommerce checkout page
|
|
128
142
|
*/
|
|
129
|
-
const
|
|
143
|
+
const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedBtnSelector, onInternationalCheckoutSelected, onShippingAddressSessionFound, }) => {
|
|
130
144
|
if (!window.Zonos.isBigCommerce) {
|
|
131
145
|
return;
|
|
132
146
|
}
|
|
133
|
-
|
|
147
|
+
/**
|
|
148
|
+
* Keep checking
|
|
149
|
+
*/
|
|
150
|
+
const handleInternationalCheckoutSelected = async () => {
|
|
151
|
+
const shipToCountryElement = document.querySelector(SHIP_TO_COUNTRY_SELECTOR);
|
|
152
|
+
if (!shipToCountryElement) {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
const shippingCountry = shipToCountryElement.value;
|
|
156
|
+
if (!shippingCountry) {
|
|
157
|
+
// do nothing if shipping country is not found
|
|
158
|
+
return false;
|
|
159
|
+
}
|
|
160
|
+
if (!isShippableCountry(false, shippingCountry)) {
|
|
161
|
+
// do nothing if shipping country is not shippable
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
if (onInternationalCheckoutSelected) {
|
|
165
|
+
await onInternationalCheckoutSelected();
|
|
166
|
+
}
|
|
167
|
+
// update the country code in localization store and check if it's shippable
|
|
168
|
+
localization.localizationStoreUpdateSelectedCountryCode({
|
|
169
|
+
isInitializing: false,
|
|
170
|
+
newSelectedCountryCode: shippingCountry,
|
|
171
|
+
});
|
|
172
|
+
const shippingAddress = {
|
|
173
|
+
address1: '',
|
|
174
|
+
address2: '',
|
|
175
|
+
city: '',
|
|
176
|
+
countryCode: shippingCountry,
|
|
177
|
+
firstName: '',
|
|
178
|
+
lastName: '',
|
|
179
|
+
phone: '',
|
|
180
|
+
postalCode: '',
|
|
181
|
+
stateOrProvince: '',
|
|
182
|
+
};
|
|
183
|
+
// save the shipping address to session storage
|
|
184
|
+
cart.stripeStoreSaveDomesticShippingSession({
|
|
185
|
+
address1: shippingAddress.address1,
|
|
186
|
+
address2: shippingAddress.address2,
|
|
187
|
+
city: shippingAddress.city,
|
|
188
|
+
countryCode: shippingAddress.countryCode,
|
|
189
|
+
firstName: shippingAddress.firstName,
|
|
190
|
+
lastName: shippingAddress.lastName,
|
|
191
|
+
phone: shippingAddress.phone,
|
|
192
|
+
postalCode: shippingAddress.postalCode,
|
|
193
|
+
state: shippingAddress.stateOrProvince,
|
|
194
|
+
});
|
|
195
|
+
// redirect to home page, home page then will open the checkout dialog if having domestic shipping session
|
|
196
|
+
window.location.href = '/';
|
|
197
|
+
return true;
|
|
198
|
+
};
|
|
199
|
+
let isProcessing = false;
|
|
200
|
+
let intervalCreated = false;
|
|
201
|
+
const observer = new MutationObserver(() => {
|
|
134
202
|
const domesticRedirectedButton = document.querySelector(domesticRedirectedBtnSelector);
|
|
135
203
|
const shippingAddressSession = cart.stripeStoreGetDomesticShippingSession();
|
|
136
204
|
// append a hidden button to the body if the shipping address session is found
|
|
@@ -145,84 +213,47 @@ const watchBigcommerceDomesticCheckout = ({ domesticRedirectedBtnSelector, onShi
|
|
|
145
213
|
observer.disconnect();
|
|
146
214
|
return;
|
|
147
215
|
}
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
const
|
|
151
|
-
if
|
|
216
|
+
const isBigcommerceDomesticCheckoutPage = window.location.pathname.includes('/checkout') &&
|
|
217
|
+
window.Zonos.isBigCommerce;
|
|
218
|
+
const shipToCountryElement = document.querySelector(SHIP_TO_COUNTRY_SELECTOR);
|
|
219
|
+
// Should just disconnect the observer if it's not bigcommerce domestic checkout page
|
|
220
|
+
if (!isBigcommerceDomesticCheckoutPage) {
|
|
221
|
+
observer.disconnect();
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
// Shouldn't do anything if it's not bigcommerce domestic checkout page
|
|
225
|
+
if (!shipToCountryElement) {
|
|
152
226
|
// do nothing if shipping country and the continue button is not found
|
|
153
227
|
return;
|
|
154
228
|
}
|
|
155
|
-
|
|
229
|
+
VarianceTest.log('Domestic checkout found - Listening for shipping country change', 'info', {
|
|
230
|
+
value: shipToCountryElement.value,
|
|
231
|
+
});
|
|
232
|
+
// Should not create a new interval if it's already created
|
|
233
|
+
if (intervalCreated) {
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
intervalCreated = true;
|
|
237
|
+
// disconnect the observer after we know that's bigcommerce domestic checkout page
|
|
156
238
|
observer.disconnect();
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const shippingCountry = shipToCountryElement.value;
|
|
160
|
-
if (!shippingCountry) {
|
|
161
|
-
// do nothing if shipping country is not found
|
|
239
|
+
const interval = setInterval(async () => {
|
|
240
|
+
if (isProcessing) {
|
|
162
241
|
return;
|
|
163
242
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
return;
|
|
243
|
+
isProcessing = true;
|
|
244
|
+
try {
|
|
245
|
+
const isInternationalCountrySelected = await handleInternationalCheckoutSelected();
|
|
246
|
+
// When isInternationalCountrySelected is true, user will be redirected shortly, so we can stop the checking interval here
|
|
247
|
+
if (isInternationalCountrySelected) {
|
|
248
|
+
clearInterval(interval);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
isProcessing = false;
|
|
174
252
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
if (!shipToFormElement) {
|
|
178
|
-
return;
|
|
253
|
+
catch (_a) {
|
|
254
|
+
isProcessing = false;
|
|
179
255
|
}
|
|
180
|
-
|
|
181
|
-
const shipAddress1Element = document.querySelector('input#addressLine1Input');
|
|
182
|
-
const shippingAddress = {
|
|
183
|
-
address1: (_a = formData.get('shippingAddress.address1')) !== null && _a !== void 0 ? _a :
|
|
184
|
-
// in Canada, the address1 is not included in the form, try to get value from input id instead.
|
|
185
|
-
(shipAddress1Element && shipAddress1Element.value),
|
|
186
|
-
address2: formData.get('shippingAddress.address2'),
|
|
187
|
-
city: formData.get('shippingAddress.city'),
|
|
188
|
-
countryCode: formData.get('shippingAddress.countryCode'),
|
|
189
|
-
firstName: formData.get('shippingAddress.firstName'),
|
|
190
|
-
lastName: formData.get('shippingAddress.lastName'),
|
|
191
|
-
phone: formData.get('shippingAddress.phone'),
|
|
192
|
-
postalCode: formData.get('shippingAddress.postalCode'),
|
|
193
|
-
stateOrProvince: (_b = formData.get('shippingAddress.stateOrProvince')) !== null && _b !== void 0 ? _b : formData.get('shippingAddress.stateOrProvinceCode'),
|
|
194
|
-
};
|
|
195
|
-
if (Object.values(shippingAddress).some(value => value === undefined || value === null)) {
|
|
196
|
-
handleFetch.logError('One or more shipping address field is missing', Object.entries(shippingAddress));
|
|
197
|
-
void handleFetch.sendErrorLog({
|
|
198
|
-
endpoint: 'No endpoint, domestic checkout form missing fields',
|
|
199
|
-
errors: [
|
|
200
|
-
'Bigcommerce: One or more shipping address field is missing in the domestic checkout form',
|
|
201
|
-
JSON.stringify(Object.entries(shippingAddress)),
|
|
202
|
-
],
|
|
203
|
-
metadata: {
|
|
204
|
-
storeId: zonosStore.zonosStore.storeId,
|
|
205
|
-
},
|
|
206
|
-
});
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
// save the shipping address to session storage
|
|
210
|
-
cart.stripeStoreSaveDomesticShippingSession({
|
|
211
|
-
address1: shippingAddress.address1,
|
|
212
|
-
address2: shippingAddress.address2,
|
|
213
|
-
city: shippingAddress.city,
|
|
214
|
-
countryCode: shippingAddress.countryCode,
|
|
215
|
-
firstName: shippingAddress.firstName,
|
|
216
|
-
lastName: shippingAddress.lastName,
|
|
217
|
-
phone: shippingAddress.phone,
|
|
218
|
-
postalCode: shippingAddress.postalCode,
|
|
219
|
-
state: shippingAddress.stateOrProvince,
|
|
220
|
-
});
|
|
221
|
-
e.preventDefault();
|
|
222
|
-
e.stopPropagation();
|
|
223
|
-
// redirect to home page, home page then will open the checkout dialog if having domestic shipping session
|
|
224
|
-
window.location.href = '/';
|
|
225
|
-
});
|
|
256
|
+
}, 1000);
|
|
226
257
|
});
|
|
227
258
|
observer.observe(document.body, {
|
|
228
259
|
childList: true,
|
|
@@ -516,6 +547,10 @@ const ZonosCheckout = class {
|
|
|
516
547
|
* Whether or not the fedex shipping dialog should be shown
|
|
517
548
|
*/
|
|
518
549
|
this.shouldShowFedexShippingConsentDialog = false;
|
|
550
|
+
/**
|
|
551
|
+
* Whether or not the domestic checkout dialog should be shown
|
|
552
|
+
*/
|
|
553
|
+
this.detectedDomesticCheckoutDialogOpen = false;
|
|
519
554
|
/**
|
|
520
555
|
* Client secret value
|
|
521
556
|
*/
|
|
@@ -1367,8 +1402,13 @@ const ZonosCheckout = class {
|
|
|
1367
1402
|
cart.cartStore.isStagingMode = this.overrideStagingMode;
|
|
1368
1403
|
}
|
|
1369
1404
|
// check if bigcommerce, if user enters the shipping address that's in the shipping zone at bigcommerce checkout
|
|
1370
|
-
|
|
1405
|
+
watchImmediateBigcommerceDomesticCheckoutRedirect({
|
|
1371
1406
|
domesticRedirectedBtnSelector: CheckoutConfig.domesticRedirectedBtnSelector,
|
|
1407
|
+
onInternationalCheckoutSelected: async () => {
|
|
1408
|
+
this.detectedDomesticCheckoutDialogOpen = true;
|
|
1409
|
+
// wait for 2 secs
|
|
1410
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
1411
|
+
},
|
|
1372
1412
|
onShippingAddressSessionFound: shippingAddressSession => {
|
|
1373
1413
|
// prefilled the default address if shipping address session is found for checkout on open
|
|
1374
1414
|
this.defaultAddress = [
|
|
@@ -1881,7 +1921,7 @@ const ZonosCheckout = class {
|
|
|
1881
1921
|
this.isMobile && 'mobile',
|
|
1882
1922
|
this.isIframed && 'iframed',
|
|
1883
1923
|
this.hiddenMode && 'hidden-mode',
|
|
1884
|
-
]) }, this.preview ? (renderContent()) : (index.h("zonos-dialog", { borderStyle: style, "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), index.h("zonos-confirm-dialog", { class: "zonos--close-confirm-dialog", dialogCancelBtnText: localization.translate("Don't close"), dialogConfirmBtnText: localization.translate('Close'), dialogIntent: "warn", dialogOpen: this.confirmDialogOpen, dialogSubtitle: localization.translate('Would you like to close checkout and return to the site?'), dialogTitle: localization.translate('Are you sure?'), onCancelClicked: () => {
|
|
1924
|
+
]) }, this.preview ? (renderContent()) : (index.h("zonos-dialog", { borderStyle: style, "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), index.h("zonos-dialog", { isLoading: true, loadingText: localization.translate('You will be redirected to international checkout shortly.'), loadingTitle: localization.translate('We detected that you are shipping to an international address.'), noClickOutside: true, noCloseButton: true, open: this.detectedDomesticCheckoutDialogOpen, width: "450px" }), index.h("zonos-confirm-dialog", { class: "zonos--close-confirm-dialog", dialogCancelBtnText: localization.translate("Don't close"), dialogConfirmBtnText: localization.translate('Close'), dialogIntent: "warn", dialogOpen: this.confirmDialogOpen, dialogSubtitle: localization.translate('Would you like to close checkout and return to the site?'), dialogTitle: localization.translate('Are you sure?'), onCancelClicked: () => {
|
|
1885
1925
|
this.confirmDialogOpen = false;
|
|
1886
1926
|
},
|
|
1887
1927
|
// Mark user selected confirm to close the dialog
|