@zonos/elements 1.3.204 → 1.3.205
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-0d91ad0b.js → cart-193af95a.js} +6 -5
- package/dist/cjs/{debounce-94e1b7ff.js → debounce-0b9c0f8a.js} +1 -1
- package/dist/cjs/{getBorderRadius-8d3b1049.js → getBorderRadius-c424eb05.js} +1 -1
- package/dist/cjs/{index-0993f42d.js → index-1c710d00.js} +455 -377
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{isDarkColor-bcf49625.js → isDarkColor-35e8daec.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-2f17c95f.js → localization-88da0959.js} +1 -1
- package/dist/cjs/{paypal-9953115b.js → paypal-8525404c.js} +4 -4
- package/dist/cjs/zonos-address_11.cjs.entry.js +273 -121
- package/dist/cjs/zonos-badge.cjs.entry.js +26 -4
- package/dist/cjs/zonos-banner.cjs.entry.js +6 -5
- package/dist/cjs/zonos-button_3.cjs.entry.js +89 -24
- package/dist/cjs/zonos-card.cjs.entry.js +10 -9
- package/dist/cjs/zonos-cart-items_14.cjs.entry.js +193 -74
- package/dist/cjs/zonos-checkout.cjs.entry.js +90 -35
- package/dist/cjs/zonos-collapse.cjs.entry.js +8 -2
- package/dist/cjs/zonos-component.cjs.entry.js +10 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +6 -8
- package/dist/cjs/zonos-country-flag.cjs.entry.js +8 -4
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +52 -24
- package/dist/cjs/zonos-elements.cjs.js +2 -2
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +11 -10
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +21 -13
- package/dist/cjs/zonos-hello.cjs.entry.js +29 -17
- package/dist/cjs/zonos-input.cjs.entry.js +18 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +15 -4
- package/dist/cjs/zonos-link.cjs.entry.js +4 -4
- package/dist/cjs/zonos-logo.cjs.entry.js +8 -2
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +8 -8
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +25 -9
- package/dist/cjs/zonos-text.cjs.entry.js +11 -4
- package/dist/cjs/zonos-toggle.cjs.entry.js +5 -3
- package/dist/cjs/zonos-tooltip.cjs.entry.js +7 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +6 -2
- package/dist/cjs/{zonosStore-9264749e.js → zonosStore-7c1e1bc1.js} +4 -5
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +0 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +24 -13
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +6 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +3 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +14 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +25 -9
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +83 -28
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +54 -17
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +8 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +20 -12
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +24 -2
- package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +69 -18
- package/dist/collection/components/common/zonos-card/zonos-card.js +7 -6
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +15 -2
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +8 -2
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +6 -0
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +34 -9
- package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +5 -1
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +6 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +6 -0
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +48 -14
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +12 -1
- package/dist/collection/components/common/zonos-input/zonos-input.js +15 -1
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +5 -1
- package/dist/collection/components/common/zonos-link/zonos-link.js +3 -3
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +7 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +6 -0
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +4 -4
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +7 -0
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +5 -5
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +4 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +21 -5
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +19 -14
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +37 -12
- package/dist/collection/components/common/zonos-text/zonos-text.js +9 -2
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +3 -1
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +6 -0
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +4 -0
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -7
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +9 -0
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +25 -13
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +8 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +0 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +17 -9
- package/dist/collection/components/main/zonos-controller.js +0 -4
- package/dist/collection/components/store/checkout/stripe.js +2 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +21 -8
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +13 -5
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +73 -33
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +11 -6
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -2
- package/dist/esm/{cart-db61eb95.js → cart-a921e0b7.js} +7 -6
- package/dist/esm/{debounce-3a9f27a0.js → debounce-eaee3a94.js} +1 -1
- package/dist/esm/{getBorderRadius-78b28b4d.js → getBorderRadius-b18c924f.js} +1 -1
- package/dist/esm/{index-a457c60c.js → index-5ea9f81d.js} +455 -377
- package/dist/esm/index.js +7 -7
- package/dist/esm/{isDarkColor-31dd7dff.js → isDarkColor-d8bb8659.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{localization-bf7224aa.js → localization-a2b8f9ed.js} +1 -1
- package/dist/esm/{paypal-2e0ffb07.js → paypal-67d51f03.js} +4 -4
- package/dist/esm/zonos-address_11.entry.js +273 -121
- package/dist/esm/zonos-badge.entry.js +26 -4
- package/dist/esm/zonos-banner.entry.js +6 -5
- package/dist/esm/zonos-button_3.entry.js +89 -24
- package/dist/esm/zonos-card.entry.js +10 -9
- package/dist/esm/zonos-cart-items_14.entry.js +193 -74
- package/dist/esm/zonos-checkout.entry.js +90 -35
- package/dist/esm/zonos-collapse.entry.js +8 -2
- package/dist/esm/zonos-component.entry.js +10 -1
- package/dist/esm/zonos-controller.entry.js +6 -8
- package/dist/esm/zonos-country-flag.entry.js +8 -4
- package/dist/esm/zonos-country-select_4.entry.js +52 -24
- package/dist/esm/zonos-elements.js +3 -3
- package/dist/esm/zonos-empty-state-payment_4.entry.js +11 -10
- package/dist/esm/zonos-hello-dialog.entry.js +21 -13
- package/dist/esm/zonos-hello.entry.js +29 -17
- package/dist/esm/zonos-input.entry.js +18 -4
- package/dist/esm/zonos-language-select_2.entry.js +15 -4
- package/dist/esm/zonos-link.entry.js +4 -4
- package/dist/esm/zonos-logo.entry.js +8 -2
- package/dist/esm/zonos-shipping-rich-radio.entry.js +8 -8
- package/dist/esm/zonos-stripe-input.entry.js +25 -9
- package/dist/esm/zonos-text.entry.js +11 -4
- package/dist/esm/zonos-toggle.entry.js +5 -3
- package/dist/esm/zonos-tooltip.entry.js +7 -1
- package/dist/esm/zonos-v-stack.entry.js +6 -2
- package/dist/esm/{zonosStore-d10a829f.js → zonosStore-1e015fa5.js} +4 -5
- package/dist/esm-es5/{cart-db61eb95.js → cart-a921e0b7.js} +1 -1
- package/dist/esm-es5/{debounce-3a9f27a0.js → debounce-eaee3a94.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-78b28b4d.js → getBorderRadius-b18c924f.js} +1 -1
- package/dist/esm-es5/index-5ea9f81d.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-31dd7dff.js → isDarkColor-d8bb8659.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{localization-bf7224aa.js → localization-a2b8f9ed.js} +1 -1
- package/dist/esm-es5/{paypal-2e0ffb07.js → paypal-67d51f03.js} +1 -1
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_14.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.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-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.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/esm-es5/{zonosStore-d10a829f.js → zonosStore-1e015fa5.js} +1 -1
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-019f8637.entry.js +1 -0
- package/dist/zonos-elements/p-02da743b.system.js +2 -0
- package/dist/zonos-elements/{p-df4c46a6.entry.js → p-05a91fe6.entry.js} +1 -1
- package/dist/zonos-elements/p-0c4c8d63.entry.js +1 -0
- package/dist/zonos-elements/{p-5d0f7364.system.js → p-0d2df4d2.system.js} +1 -1
- package/dist/zonos-elements/p-0d7af8be.system.entry.js +1 -0
- package/dist/zonos-elements/p-12cd9d3a.entry.js +1 -0
- package/dist/zonos-elements/{p-d42dfd32.system.js → p-1327b935.system.js} +1 -1
- package/dist/zonos-elements/p-1640d77f.js +2 -0
- package/dist/zonos-elements/{p-3d82a352.js → p-16678764.js} +1 -1
- package/dist/zonos-elements/p-16e858f9.entry.js +1 -0
- package/dist/zonos-elements/{p-c291bac1.entry.js → p-18149db1.entry.js} +1 -1
- package/dist/zonos-elements/{p-db025dfc.system.entry.js → p-1ad099ec.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c5fcbc92.system.entry.js → p-1bc09abe.system.entry.js} +1 -1
- package/dist/zonos-elements/p-20ac92e1.system.entry.js +1 -0
- package/dist/zonos-elements/{p-d46349d3.system.entry.js → p-22cb6880.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c9aa902e.system.entry.js → p-2866fd29.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0693422b.system.js → p-28fcd277.system.js} +1 -1
- package/dist/zonos-elements/p-3196bf98.entry.js +1 -0
- package/dist/zonos-elements/p-3afc27ef.entry.js +1 -0
- package/dist/zonos-elements/p-3c921768.system.entry.js +1 -0
- package/dist/zonos-elements/{p-ea6d87a1.system.js → p-3ee44728.system.js} +1 -1
- package/dist/zonos-elements/{p-be5afc91.system.entry.js → p-4329f616.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-715d0f59.system.entry.js → p-43b72ad6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f8d0d488.system.entry.js → p-469ccc66.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4a3bb31d.entry.js +1 -0
- package/dist/zonos-elements/{p-80bbd9c0.system.entry.js → p-4fb88ebc.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5fbaa153.system.entry.js +1 -0
- package/dist/zonos-elements/{p-6a71f76b.system.js → p-69577745.system.js} +1 -1
- package/dist/zonos-elements/p-6d467dfb.entry.js +1 -0
- package/dist/zonos-elements/{p-3284f459.system.entry.js → p-719e14a8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fbe36bc8.system.entry.js → p-7234f876.system.entry.js} +1 -1
- package/dist/zonos-elements/p-74bcb5cc.entry.js +1 -0
- package/dist/zonos-elements/{p-27987298.system.entry.js → p-7777d85f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-aa1193bc.entry.js → p-848e08e8.entry.js} +1 -1
- package/dist/zonos-elements/{p-ab176281.system.entry.js → p-858b7908.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f255e822.js → p-8609e956.js} +1 -1
- package/dist/zonos-elements/p-87e807b4.entry.js +1 -0
- package/dist/zonos-elements/{p-cdd3087f.system.entry.js → p-8debefec.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d99d9e00.js → p-8e000d8d.js} +1 -1
- package/dist/zonos-elements/p-90c185ac.entry.js +1 -0
- package/dist/zonos-elements/p-91fc6911.entry.js +1 -0
- package/dist/zonos-elements/{p-851c642e.system.entry.js → p-93aeba62.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9b8a5372.entry.js +1 -0
- package/dist/zonos-elements/{p-cb823c4d.system.js → p-9e9ac7a2.system.js} +1 -1
- package/dist/zonos-elements/p-9fa17353.js +1 -0
- package/dist/zonos-elements/{p-01987cb2.system.entry.js → p-a0f570ea.system.entry.js} +1 -1
- package/dist/zonos-elements/p-abc83d01.entry.js +1 -0
- package/dist/zonos-elements/{p-45ebc788.entry.js → p-b21b0330.entry.js} +1 -1
- package/dist/zonos-elements/{p-488ad646.system.entry.js → p-b50eaeac.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b922c441.system.js +1 -0
- package/dist/zonos-elements/{p-6b6a9dd6.system.js → p-be53e893.system.js} +1 -1
- package/dist/zonos-elements/{p-c50b3100.system.js → p-c666d557.system.js} +1 -1
- package/dist/zonos-elements/{p-f891d470.entry.js → p-c988cf84.entry.js} +1 -1
- package/dist/zonos-elements/{p-26a634a5.system.entry.js → p-d649fb9a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-dcbd57df.entry.js +1 -0
- package/dist/zonos-elements/p-dd0f8f06.system.entry.js +1 -0
- package/dist/zonos-elements/{p-a9307caa.js → p-dfe7d1dd.js} +1 -1
- package/dist/zonos-elements/p-e0587eeb.entry.js +1 -0
- package/dist/zonos-elements/p-e0ebbefe.entry.js +1 -0
- package/dist/zonos-elements/{p-72f37935.js → p-e337fa88.js} +1 -1
- package/dist/zonos-elements/{p-d6a10007.entry.js → p-e5152c04.entry.js} +1 -1
- package/dist/zonos-elements/p-eb2560b6.system.entry.js +1 -0
- package/dist/zonos-elements/p-ebe08e44.entry.js +1 -0
- package/dist/zonos-elements/{p-452070af.system.entry.js → p-eca09508.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e26c9e83.js → p-ed20f2f7.js} +1 -1
- package/dist/zonos-elements/{p-5c74e5c9.system.entry.js → p-ee7a661d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f98276ed.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +50 -40
- package/dist/esm-es5/index-a457c60c.js +0 -2
- package/dist/zonos-elements/p-04b43dd5.entry.js +0 -1
- package/dist/zonos-elements/p-06f25f75.entry.js +0 -1
- package/dist/zonos-elements/p-0944fe64.entry.js +0 -1
- package/dist/zonos-elements/p-0c62cfb3.entry.js +0 -1
- package/dist/zonos-elements/p-1dcdb65f.system.entry.js +0 -1
- package/dist/zonos-elements/p-25970cb8.system.entry.js +0 -1
- package/dist/zonos-elements/p-43633269.system.js +0 -2
- package/dist/zonos-elements/p-4b5197e7.system.entry.js +0 -1
- package/dist/zonos-elements/p-4c81112f.entry.js +0 -1
- package/dist/zonos-elements/p-4efa8187.js +0 -1
- package/dist/zonos-elements/p-5170bc41.entry.js +0 -1
- package/dist/zonos-elements/p-7ae5cd60.entry.js +0 -1
- package/dist/zonos-elements/p-8d870d4c.entry.js +0 -1
- package/dist/zonos-elements/p-9af5e93a.entry.js +0 -1
- package/dist/zonos-elements/p-bc8bda92.entry.js +0 -1
- package/dist/zonos-elements/p-c137dc82.js +0 -2
- package/dist/zonos-elements/p-c3d2422e.entry.js +0 -1
- package/dist/zonos-elements/p-c66fc4e5.system.entry.js +0 -1
- package/dist/zonos-elements/p-c767242b.entry.js +0 -1
- package/dist/zonos-elements/p-cf6ae7dc.entry.js +0 -1
- package/dist/zonos-elements/p-d2165441.system.entry.js +0 -1
- package/dist/zonos-elements/p-dcd6acd4.system.entry.js +0 -1
- package/dist/zonos-elements/p-dd1cfa74.entry.js +0 -1
- package/dist/zonos-elements/p-dfd1ba1d.entry.js +0 -1
- package/dist/zonos-elements/p-e68d5219.entry.js +0 -1
- package/dist/zonos-elements/p-ef3e05e5.system.js +0 -1
- package/dist/zonos-elements/p-f29edb65.entry.js +0 -1
- package/dist/zonos-elements/p-f655ec36.entry.js +0 -1
- package/dist/zonos-elements/p-fcc2e712.entry.js +0 -1
|
@@ -691,7 +691,8 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
691
691
|
if (errors.length || !json) {
|
|
692
692
|
const messages = (_a = errors.find(error => error.message)) === null || _a === void 0 ? void 0 : _a.message;
|
|
693
693
|
// check if the error is related to expired cart and thow error so we can show error message accordingly
|
|
694
|
-
if (
|
|
694
|
+
if (Array.isArray(messages) &&
|
|
695
|
+
messages.some(message => message.message === 'Cart is expired.')) {
|
|
695
696
|
throw new Error('Cart is expired.');
|
|
696
697
|
}
|
|
697
698
|
logError('Error occurred when creating checkout session', JSON.stringify(errors, null, 2));
|
|
@@ -20,6 +20,27 @@ export class ZonosAddress {
|
|
|
20
20
|
* Google autocomplete overlay is conflict with our button, this is to adjust z index of the autocomplete
|
|
21
21
|
*/
|
|
22
22
|
this.isAutoCompleteAdjusted = false;
|
|
23
|
+
/**
|
|
24
|
+
* Default address for stripe
|
|
25
|
+
*/
|
|
26
|
+
this.defaultAddress = [];
|
|
27
|
+
/**
|
|
28
|
+
* Error message for tax id input
|
|
29
|
+
*/
|
|
30
|
+
this.taxIdErrorMessage = '';
|
|
31
|
+
this.stripe = window.Zonos.stripe;
|
|
32
|
+
/**
|
|
33
|
+
* Check if the address is dirty or not to scroll into view. When the component is mounted, if the data is filled with address line 1, it's considered dirty
|
|
34
|
+
*/
|
|
35
|
+
this.isDirtyAddress = false;
|
|
36
|
+
/**
|
|
37
|
+
* Local address event for stripe address element
|
|
38
|
+
*/
|
|
39
|
+
this.isAddressFilled = false;
|
|
40
|
+
/**
|
|
41
|
+
* Local checkout session id to check if the address is filled after checkout is loaded
|
|
42
|
+
*/
|
|
43
|
+
this.checkoutSessionId = storageStore.checkoutSessionId;
|
|
23
44
|
/**
|
|
24
45
|
* Check if the tracking event is sent
|
|
25
46
|
*/
|
|
@@ -32,14 +53,6 @@ export class ZonosAddress {
|
|
|
32
53
|
onCheckoutSessionIdChange();
|
|
33
54
|
this.onStoreCheckoutSessionIdChangedSubscription = storageStoreOnChange('checkoutSessionId', onCheckoutSessionIdChange);
|
|
34
55
|
};
|
|
35
|
-
this.type = undefined;
|
|
36
|
-
this.titleText = undefined;
|
|
37
|
-
this.defaultAddress = [];
|
|
38
|
-
this.taxIdErrorMessage = '';
|
|
39
|
-
this.stripe = window.Zonos.stripe;
|
|
40
|
-
this.isDirtyAddress = false;
|
|
41
|
-
this.isAddressFilled = false;
|
|
42
|
-
this.checkoutSessionId = storageStore.checkoutSessionId;
|
|
43
56
|
}
|
|
44
57
|
getStripeAddressInstance() {
|
|
45
58
|
if (this.type === 'billing') {
|
|
@@ -9,6 +9,19 @@ import RemoveIcon from "./assets/RemoveIcon.svg";
|
|
|
9
9
|
*/
|
|
10
10
|
export class ZonosAddressSuggestions {
|
|
11
11
|
constructor() {
|
|
12
|
+
/**
|
|
13
|
+
* Suggestions to display
|
|
14
|
+
*/
|
|
15
|
+
this.suggestions = [];
|
|
16
|
+
/**
|
|
17
|
+
* Selected suggestion id
|
|
18
|
+
*/
|
|
19
|
+
this.selectedSuggestionId = null;
|
|
20
|
+
/**
|
|
21
|
+
* Local suggestions to display
|
|
22
|
+
*/
|
|
23
|
+
this.localSuggestions = [];
|
|
24
|
+
this.lastHoveredSuggestionId = null;
|
|
12
25
|
/**
|
|
13
26
|
* Handle clicks outside of the suggestions component
|
|
14
27
|
*/
|
|
@@ -17,11 +30,6 @@ export class ZonosAddressSuggestions {
|
|
|
17
30
|
this.localSuggestions = [];
|
|
18
31
|
}
|
|
19
32
|
};
|
|
20
|
-
this.type = undefined;
|
|
21
|
-
this.suggestions = [];
|
|
22
|
-
this.selectedSuggestionId = null;
|
|
23
|
-
this.localSuggestions = [];
|
|
24
|
-
this.lastHoveredSuggestionId = null;
|
|
25
33
|
}
|
|
26
34
|
suggestionsChanged() {
|
|
27
35
|
var _a, _b;
|
|
@@ -31,6 +31,74 @@ import { countryRequireTaxId, shipToTaxIdLabels, } from "../../../types/checkout
|
|
|
31
31
|
export class ZonosAddress {
|
|
32
32
|
constructor() {
|
|
33
33
|
this.onStoreCheckoutSessionIdChangedSubscription = () => { };
|
|
34
|
+
/**
|
|
35
|
+
* Default address for stripe
|
|
36
|
+
*/
|
|
37
|
+
this.defaultAddress = [];
|
|
38
|
+
/**
|
|
39
|
+
* Error message for tax id input
|
|
40
|
+
*/
|
|
41
|
+
this.taxIdErrorMessage = '';
|
|
42
|
+
this.stripe = window.Zonos.stripe;
|
|
43
|
+
/**
|
|
44
|
+
* Check if the address is dirty or not to scroll into view. When the component is mounted, if the data is filled with address line 1, it's considered dirty
|
|
45
|
+
*/
|
|
46
|
+
this.isDirtyAddress = false;
|
|
47
|
+
/**
|
|
48
|
+
* Local address event for stripe address element
|
|
49
|
+
*/
|
|
50
|
+
this.isAddressFilled = false;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the address line 1 is already entered greater than 3 characters once
|
|
53
|
+
*/
|
|
54
|
+
this.isAddressLine1Entered = false;
|
|
55
|
+
/**
|
|
56
|
+
* Address suggestions from google place api
|
|
57
|
+
*/
|
|
58
|
+
this.addressSuggestions = [];
|
|
59
|
+
/**
|
|
60
|
+
* Country fields for the current country
|
|
61
|
+
*/
|
|
62
|
+
this.countryField = null;
|
|
63
|
+
/**
|
|
64
|
+
* Whether to start google place suggestions
|
|
65
|
+
*/
|
|
66
|
+
this.startGooglePlaceSuggestions = false;
|
|
67
|
+
/**
|
|
68
|
+
* List of countries to show in the address element
|
|
69
|
+
*/
|
|
70
|
+
this.shipToCountries = null;
|
|
71
|
+
/**
|
|
72
|
+
* Shipping zones from localization
|
|
73
|
+
*/
|
|
74
|
+
this.shippingZones = null;
|
|
75
|
+
this.city = '';
|
|
76
|
+
this.country = '';
|
|
77
|
+
this.firstName = '';
|
|
78
|
+
this.lastName = '';
|
|
79
|
+
this.line1 = '';
|
|
80
|
+
this.line2 = null;
|
|
81
|
+
this.phone = '';
|
|
82
|
+
this.postalCode = '';
|
|
83
|
+
this.state = '';
|
|
84
|
+
this.cityError = '';
|
|
85
|
+
this.stateError = '';
|
|
86
|
+
this.postalCodeError = '';
|
|
87
|
+
this.phoneError = '';
|
|
88
|
+
this.firstNameError = '';
|
|
89
|
+
this.lastNameError = '';
|
|
90
|
+
/**
|
|
91
|
+
* Whether the address element is loaded
|
|
92
|
+
*/
|
|
93
|
+
this.isFirstInitialization = true;
|
|
94
|
+
/**
|
|
95
|
+
* Address service instance
|
|
96
|
+
*/
|
|
97
|
+
this.addressService = null;
|
|
98
|
+
/**
|
|
99
|
+
* Local checkout session id to check if the address is filled after checkout is loaded
|
|
100
|
+
*/
|
|
101
|
+
this.checkoutSessionId = storageStore.checkoutSessionId;
|
|
34
102
|
/**
|
|
35
103
|
* Whether the suggestion is clicked
|
|
36
104
|
*/
|
|
@@ -193,37 +261,6 @@ export class ZonosAddress {
|
|
|
193
261
|
onCheckoutSessionIdChange();
|
|
194
262
|
this.onStoreCheckoutSessionIdChangedSubscription = storageStoreOnChange('checkoutSessionId', onCheckoutSessionIdChange);
|
|
195
263
|
};
|
|
196
|
-
this.type = undefined;
|
|
197
|
-
this.titleText = undefined;
|
|
198
|
-
this.defaultAddress = [];
|
|
199
|
-
this.taxIdErrorMessage = '';
|
|
200
|
-
this.stripe = window.Zonos.stripe;
|
|
201
|
-
this.isDirtyAddress = false;
|
|
202
|
-
this.isAddressFilled = false;
|
|
203
|
-
this.isAddressLine1Entered = false;
|
|
204
|
-
this.addressSuggestions = [];
|
|
205
|
-
this.countryField = null;
|
|
206
|
-
this.startGooglePlaceSuggestions = false;
|
|
207
|
-
this.shipToCountries = null;
|
|
208
|
-
this.shippingZones = null;
|
|
209
|
-
this.city = '';
|
|
210
|
-
this.country = '';
|
|
211
|
-
this.firstName = '';
|
|
212
|
-
this.lastName = '';
|
|
213
|
-
this.line1 = '';
|
|
214
|
-
this.line2 = null;
|
|
215
|
-
this.phone = '';
|
|
216
|
-
this.postalCode = '';
|
|
217
|
-
this.state = '';
|
|
218
|
-
this.cityError = '';
|
|
219
|
-
this.stateError = '';
|
|
220
|
-
this.postalCodeError = '';
|
|
221
|
-
this.phoneError = '';
|
|
222
|
-
this.firstNameError = '';
|
|
223
|
-
this.lastNameError = '';
|
|
224
|
-
this.isFirstInitialization = true;
|
|
225
|
-
this.addressService = null;
|
|
226
|
-
this.checkoutSessionId = storageStore.checkoutSessionId;
|
|
227
264
|
}
|
|
228
265
|
getStripeAddressInstance() {
|
|
229
266
|
if (this.type === 'billing') {
|
|
@@ -289,6 +326,9 @@ export class ZonosAddress {
|
|
|
289
326
|
}
|
|
290
327
|
getIsComplete() {
|
|
291
328
|
const { city, firstName, lastName, line1, phone, postalCode, state } = this.getCustomAddressErrors();
|
|
329
|
+
if (!this.line1 || !this.firstName || !this.lastName || !this.phone) {
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
292
332
|
// has any errors from any of the fields
|
|
293
333
|
const hasErrors = line1 || postalCode || state || city || firstName || lastName || phone;
|
|
294
334
|
return !hasErrors;
|
|
@@ -848,10 +888,10 @@ export class ZonosAddress {
|
|
|
848
888
|
this.country = localizationStore.selectedCountryCode;
|
|
849
889
|
}
|
|
850
890
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
851
|
-
return (h(Host, { key: '
|
|
891
|
+
return (h(Host, { key: 'd66b492bb6eb663ce3311012de3cc14e9848e41e', class: classes([
|
|
852
892
|
'zonos--address zonos--elements',
|
|
853
893
|
`zonos--${this.type}-address`,
|
|
854
|
-
]) }, h("zonos-text", { key: '
|
|
894
|
+
]) }, h("zonos-text", { key: '4ab2a112115c951719063f94247d1d85f16faec8', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
|
|
855
895
|
}
|
|
856
896
|
static get is() { return "zonos-custom-address"; }
|
|
857
897
|
static get encapsulation() { return "scoped"; }
|
package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js
CHANGED
|
@@ -12,6 +12,17 @@ import { validateEmailValue } from "../../utils/validateEmailValue";
|
|
|
12
12
|
*/
|
|
13
13
|
export class ZonosLinkAuthentication {
|
|
14
14
|
constructor() {
|
|
15
|
+
/**
|
|
16
|
+
* Default email for stripe
|
|
17
|
+
*/
|
|
18
|
+
this.defaultEmail = null;
|
|
19
|
+
/**
|
|
20
|
+
* Email error text to dispaly
|
|
21
|
+
*/
|
|
22
|
+
this.isEmailError = false;
|
|
23
|
+
this.stripe = stripeStore.stripe;
|
|
24
|
+
this.isStagingMode = cartStore.isStagingMode;
|
|
25
|
+
this.clientSecret = stripeStore.clientSecret;
|
|
15
26
|
this.setCustomEmailInputToLinkEvent = (emailValue) => {
|
|
16
27
|
// check if the email is valid
|
|
17
28
|
const isValid = validateEmailValue(emailValue);
|
|
@@ -31,12 +42,6 @@ export class ZonosLinkAuthentication {
|
|
|
31
42
|
this.setCustomEmailInputToLinkEvent(inputValue);
|
|
32
43
|
(_a = this.linkAuthenticationChange) === null || _a === void 0 ? void 0 : _a.emit();
|
|
33
44
|
};
|
|
34
|
-
this.titleText = undefined;
|
|
35
|
-
this.defaultEmail = null;
|
|
36
|
-
this.isEmailError = false;
|
|
37
|
-
this.stripe = stripeStore.stripe;
|
|
38
|
-
this.isStagingMode = cartStore.isStagingMode;
|
|
39
|
-
this.clientSecret = stripeStore.clientSecret;
|
|
40
45
|
}
|
|
41
46
|
watchIsStagingMode() {
|
|
42
47
|
// Wait for the DOM to be ready before re-initializing Link element
|
|
@@ -8,11 +8,10 @@ import { logError } from "../../utils/logging/logError";
|
|
|
8
8
|
*/
|
|
9
9
|
export class ZonosPayment {
|
|
10
10
|
constructor() {
|
|
11
|
-
this.trackingSent = false;
|
|
12
|
-
this.titleText = undefined;
|
|
13
11
|
this.stripe = stripeStore.stripe;
|
|
14
12
|
this.stripeElements = stripeStore.stripeElements;
|
|
15
13
|
this.isPaymentInfoFilled = false;
|
|
14
|
+
this.trackingSent = false;
|
|
16
15
|
}
|
|
17
16
|
watchIsPaymentInfoFilled() {
|
|
18
17
|
var _a;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { z as zonosStore, c as createStore } from './zonosStore-
|
|
2
|
-
import { s as storageStore, l as localizationStore, t as translate, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-
|
|
1
|
+
import { z as zonosStore, c as createStore } from './zonosStore-1e015fa5.js';
|
|
2
|
+
import { s as storageStore, l as localizationStore, t as translate, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-a2b8f9ed.js';
|
|
3
3
|
import { l as log, f as fallbackApiList, h as handleFetch, g as getIsTestMode, a as getIsStagingMode, s as sendErrorLog, d as allLogs, b as logError, j as jsonParse } from './handleFetch-621e45bc.js';
|
|
4
|
-
import { i as isDarkColor } from './isDarkColor-
|
|
5
|
-
import { g as getBorderRadius } from './getBorderRadius-
|
|
4
|
+
import { i as isDarkColor } from './isDarkColor-d8bb8659.js';
|
|
5
|
+
import { g as getBorderRadius } from './getBorderRadius-b18c924f.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Extract value from translated object
|
|
@@ -1266,7 +1266,8 @@ const stripeStoreInitCheckoutSession = async () => {
|
|
|
1266
1266
|
if (errors.length || !json) {
|
|
1267
1267
|
const messages = (_a = errors.find(error => error.message)) === null || _a === void 0 ? void 0 : _a.message;
|
|
1268
1268
|
// check if the error is related to expired cart and thow error so we can show error message accordingly
|
|
1269
|
-
if (
|
|
1269
|
+
if (Array.isArray(messages) &&
|
|
1270
|
+
messages.some(message => message.message === 'Cart is expired.')) {
|
|
1270
1271
|
throw new Error('Cart is expired.');
|
|
1271
1272
|
}
|
|
1272
1273
|
logError('Error occurred when creating checkout session', JSON.stringify(errors, null, 2));
|
|
@@ -1915,4 +1916,4 @@ const cartStoreResetTabItems = () => {
|
|
|
1915
1916
|
cartStoreResetSelectedShippingOption();
|
|
1916
1917
|
};
|
|
1917
1918
|
|
|
1918
|
-
export { cartStoreHasOneEligibleItem as A, stripeStoreApplyPromoCode as B, stripeStoreRemovePromoCode as C, stripeStoreResetPromoCode as D, stripeStoreMessageBasedOnStatus as E, stripeStoreTranslateAddressToLatin as F, cartStoreUpdateSelectedShippingOption as G, cartStoreGetShippingTransitInfo as H, sortServiceLevelOptionsByAmount as I, cartStoreGetMethod as J, stripeStoreCleanupDomesticShippingSession as a, stripeStoreSaveDomesticShippingSession as b,
|
|
1919
|
+
export { cartStoreHasOneEligibleItem as A, stripeStoreApplyPromoCode as B, stripeStoreRemovePromoCode as C, stripeStoreResetPromoCode as D, stripeStoreMessageBasedOnStatus as E, stripeStoreTranslateAddressToLatin as F, cartStoreUpdateSelectedShippingOption as G, cartStoreGetShippingTransitInfo as H, sortServiceLevelOptionsByAmount as I, cartStoreGetMethod as J, stripeStoreCleanupDomesticShippingSession as a, stripeStoreSaveDomesticShippingSession as b, stripeStore as c, stripeStoreRetrievePayment as d, cartStore as e, cartStoreUpdateItems as f, cartStoreReset as g, cartStoreResetTabItems as h, initStripeElements as i, cartStoreClearCheckoutInterval as j, stripeStoreInitCheckoutSession as k, stripeStoreGetPaymentIntent as l, cartStoreStartCheckoutInterval as m, getCheckoutSessionBody as n, cartStoreUpdateToErrorState as o, cartStoreSetCheckoutSession as p, stripeStorePrefetchLandedCost as q, cartStoreNextStep as r, stripeStoreGetDomesticShippingSession as s, trackConversionEvent as t, stripeStoreUpdateCheckoutSessionBaseCurrency as u, stripeStoreHandleInventoryCheck as v, stripeStoreConfirmPayment as w, stripeStoreHandleInventoryRefund as x, stripeStoreReset as y, validateCheckoutSession as z };
|