@zonos/elements 1.3.263 → 1.3.264
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-02a93797.js → cart-d4486651.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-751ef38b.js → hasInclusivePrice-40358cb1.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-215b8d2b.js → invoice-600fa2a4.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-0d909501.js → isCollectMobileTablet-f56566ef.js} +2 -2
- package/dist/cjs/{localization-68ebf7c6.js → localization-06cc0379.js} +15 -1
- package/dist/cjs/{paypal-f8a0cca3.js → paypal-52c4a4d4.js} +2 -2
- package/dist/cjs/{placeTestOrder-ce734b60.js → placeTestOrder-7c88197a.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-d163c1c4.js → renderCheckoutCurrency-2ebeff09.js} +2 -2
- package/dist/cjs/zonos-address-display_8.cjs.entry.js +19 -19
- package/dist/cjs/zonos-address_4.cjs.entry.js +8 -8
- package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_5.cjs.entry.js +9 -9
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +17 -15
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-checkout.cjs.entry.js +210 -60
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +22 -20
- 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 +13 -11
- 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 +8 -8
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +17 -15
- 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-store-credit.cjs.entry.js +3 -3
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
- 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-footer/zonos-checkout-footer.css +5 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +4 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +52 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +2 -2
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.css +5 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +5 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +5 -5
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +2 -2
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.css +5 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +5 -3
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +2 -2
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-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.css +5 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +4 -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/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/bigcommerceStorefrontApi.js +1 -1
- package/dist/collection/components/utils/checkout/getBigCommerceCustomerAddresses.js +99 -0
- package/dist/collection/components/utils/hello/currencyConversion/currencyDisplay.js +15 -0
- package/dist/collection/components/utils/hello/currencyConversion/currencyFormat.js +1 -1
- package/dist/esm/{cart-34b11708.js → cart-41f41429.js} +1 -1
- package/dist/esm/{hasInclusivePrice-dfb21fc9.js → hasInclusivePrice-afc0dd6e.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-6d8bdf21.js → invoice-e6721745.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-85403c93.js → isCollectMobileTablet-d02bb448.js} +2 -2
- package/dist/esm/{localization-2e523b35.js → localization-ee06df70.js} +15 -1
- package/dist/esm/{paypal-d3b3d967.js → paypal-ac74241f.js} +2 -2
- package/dist/esm/{placeTestOrder-e1d6dfcd.js → placeTestOrder-0416d327.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-cc72a6c2.js → renderCheckoutCurrency-99da51f5.js} +2 -2
- package/dist/esm/zonos-address-display_8.entry.js +19 -19
- package/dist/esm/zonos-address_4.entry.js +8 -8
- package/dist/esm/zonos-badge.entry.js +3 -3
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card_5.entry.js +9 -9
- package/dist/esm/zonos-cart-items_12.entry.js +17 -15
- package/dist/esm/zonos-checkbox_2.entry.js +5 -5
- package/dist/esm/zonos-checkout.entry.js +211 -61
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -6
- package/dist/esm/zonos-collect-finish_6.entry.js +22 -20
- 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 +13 -11
- 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 +8 -8
- package/dist/esm/zonos-invoice-finish_5.entry.js +17 -15
- 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-store-credit.entry.js +3 -3
- package/dist/esm/zonos-stripe-input.entry.js +4 -4
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/{cart-34b11708.js → cart-41f41429.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-dfb21fc9.js → hasInclusivePrice-afc0dd6e.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-6d8bdf21.js → invoice-e6721745.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-85403c93.js → isCollectMobileTablet-d02bb448.js} +1 -1
- package/dist/esm-es5/{localization-2e523b35.js → localization-ee06df70.js} +1 -1
- package/dist/esm-es5/{paypal-d3b3d967.js → paypal-ac74241f.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-e1d6dfcd.js → placeTestOrder-0416d327.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-cc72a6c2.js → renderCheckoutCurrency-99da51f5.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.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-checkbox_2.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-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-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-store-credit.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.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.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 +9 -0
- package/dist/types/components/utils/checkout/bigcommerceStorefrontApi.d.ts +22 -11
- package/dist/types/components/utils/checkout/getBigCommerceCustomerAddresses.d.ts +26 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-17b6f9ff.system.entry.js → p-0529a06b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-227a1ecc.system.js → p-076ca381.system.js} +1 -1
- package/dist/zonos-elements/{p-bccae0df.entry.js → p-07cdff18.entry.js} +1 -1
- package/dist/zonos-elements/{p-dc71be6f.system.entry.js → p-0914b8a1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-155b4425.entry.js → p-0b4ba025.entry.js} +1 -1
- package/dist/zonos-elements/{p-c361d520.system.entry.js → p-0f9a04fe.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c2b86522.js → p-14ce8e3a.js} +1 -1
- package/dist/zonos-elements/{p-a3936c44.system.entry.js → p-15f70aae.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b1c76c38.system.entry.js → p-16948eea.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5290d104.entry.js → p-1ed2827f.entry.js} +1 -1
- package/dist/zonos-elements/p-20e0c24e.entry.js +1 -0
- package/dist/zonos-elements/{p-5496e9ae.system.js → p-24aae506.system.js} +1 -1
- package/dist/zonos-elements/{p-92f40018.system.entry.js → p-2555ba6b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1f107c84.entry.js → p-258c0551.entry.js} +1 -1
- package/dist/zonos-elements/{p-30b19a4e.system.entry.js → p-274a7c0e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fb87172c.entry.js → p-283ffaad.entry.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-25b5ac23.system.entry.js → p-2c027b67.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2fc253b3.js +1 -0
- package/dist/zonos-elements/{p-e06936f4.entry.js → p-32ecece3.entry.js} +1 -1
- package/dist/zonos-elements/{p-de44cccd.system.entry.js → p-349bdc03.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-adeaa7cf.entry.js → p-34dc7755.entry.js} +1 -1
- package/dist/zonos-elements/{p-356b2068.js → p-37f47658.js} +1 -1
- package/dist/zonos-elements/{p-9c5cce08.system.entry.js → p-3a23ec5f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3bc1adb7.entry.js +1 -0
- package/dist/zonos-elements/p-41f2e301.entry.js +1 -0
- package/dist/zonos-elements/{p-a50d095f.js → p-4220556e.js} +1 -1
- package/dist/zonos-elements/{p-926c33b1.system.entry.js → p-42518502.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2b40fab2.entry.js → p-52077d7c.entry.js} +1 -1
- package/dist/zonos-elements/{p-70c485df.js → p-551dd2e0.js} +1 -1
- package/dist/zonos-elements/{p-5d32f10f.system.entry.js → p-5678c044.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-15161658.entry.js → p-59aa5785.entry.js} +1 -1
- package/dist/zonos-elements/{p-20e1a5a0.entry.js → p-66edcaa4.entry.js} +1 -1
- package/dist/zonos-elements/{p-b8710131.entry.js → p-6b9ad020.entry.js} +1 -1
- package/dist/zonos-elements/{p-a076cf7f.system.js → p-721069c3.system.js} +1 -1
- package/dist/zonos-elements/{p-501d16ad.system.entry.js → p-72833da8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-96f8cea8.entry.js → p-7564d199.entry.js} +1 -1
- package/dist/zonos-elements/{p-8331aa21.system.entry.js → p-79f3c227.system.entry.js} +1 -1
- package/dist/zonos-elements/p-84c7cae6.system.entry.js +1 -0
- package/dist/zonos-elements/{p-0f3b9ed7.entry.js → p-86ed51fd.entry.js} +1 -1
- package/dist/zonos-elements/{p-73765370.system.entry.js → p-88596f27.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8a01157e.system.entry.js +1 -0
- package/dist/zonos-elements/{p-7e313e45.entry.js → p-8a21ed2d.entry.js} +1 -1
- package/dist/zonos-elements/{p-191661c6.system.entry.js → p-90a19f4c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-562fbdab.js → p-90d19cb6.js} +1 -1
- package/dist/zonos-elements/{p-024a4af5.entry.js → p-9288878f.entry.js} +1 -1
- package/dist/zonos-elements/{p-2381985c.entry.js → p-92a14180.entry.js} +1 -1
- package/dist/zonos-elements/{p-22a8b44b.system.js → p-98c53c77.system.js} +1 -1
- package/dist/zonos-elements/{p-7297f6bd.system.entry.js → p-9da832b2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1c1149ff.js → p-9eff0691.js} +1 -1
- package/dist/zonos-elements/{p-47a58a38.system.entry.js → p-9f18348f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1b5d90ee.system.entry.js → p-a2e9b2aa.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-51c60875.system.entry.js → p-a5f5993f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-65ea8ae4.js → p-a901d002.js} +1 -1
- package/dist/zonos-elements/{p-fe5303d1.entry.js → p-ab73cbed.entry.js} +1 -1
- package/dist/zonos-elements/p-b0526805.system.entry.js +1 -0
- package/dist/zonos-elements/{p-bee55d71.entry.js → p-b13d56b9.entry.js} +1 -1
- package/dist/zonos-elements/p-b32cd0c5.system.js +1 -0
- package/dist/zonos-elements/{p-f440cd53.entry.js → p-b4b23475.entry.js} +1 -1
- package/dist/zonos-elements/{p-7b6e65d6.system.js → p-b65bca4b.system.js} +1 -1
- package/dist/zonos-elements/p-ba7cf5e8.system.entry.js +1 -0
- package/dist/zonos-elements/{p-45ceb26f.system.entry.js → p-c0fffa75.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c52bc5ad.system.entry.js +1 -0
- package/dist/zonos-elements/{p-07c228a7.entry.js → p-cc481c69.entry.js} +1 -1
- package/dist/zonos-elements/p-ccc4f69b.entry.js +1 -0
- package/dist/zonos-elements/{p-60a391b8.system.js → p-ce855245.system.js} +1 -1
- package/dist/zonos-elements/{p-4d776228.entry.js → p-d1ff24f5.entry.js} +1 -1
- package/dist/zonos-elements/p-d6b49830.entry.js +1 -0
- package/dist/zonos-elements/{p-b2d462f9.system.js → p-db607fc3.system.js} +1 -1
- package/dist/zonos-elements/{p-4d0b8897.system.js → p-dea75665.system.js} +1 -1
- package/dist/zonos-elements/{p-6a11cccc.system.entry.js → p-e3bc3917.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e0ea6e24.entry.js → p-e5582c35.entry.js} +1 -1
- package/dist/zonos-elements/{p-7dbac3ae.system.entry.js → p-e6cc5a25.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3ae1a543.entry.js → p-f546bd7d.entry.js} +1 -1
- package/dist/zonos-elements/{p-235ee1d3.entry.js → p-f9c715ad.entry.js} +1 -1
- package/dist/zonos-elements/{p-50a15e3d.system.entry.js → p-fb684748.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-06d8f294.entry.js +0 -1
- package/dist/zonos-elements/p-1fb6b787.entry.js +0 -1
- package/dist/zonos-elements/p-3baf98a0.system.entry.js +0 -1
- package/dist/zonos-elements/p-4039b72d.system.entry.js +0 -1
- package/dist/zonos-elements/p-5834833a.entry.js +0 -1
- package/dist/zonos-elements/p-5aa86f9c.entry.js +0 -1
- package/dist/zonos-elements/p-79a7998f.system.entry.js +0 -1
- package/dist/zonos-elements/p-8603fb37.system.entry.js +0 -1
- package/dist/zonos-elements/p-97f0eda6.system.js +0 -1
- package/dist/zonos-elements/p-c4d057b0.js +0 -1
- package/dist/zonos-elements/p-cda0b441.entry.js +0 -1
- package/dist/zonos-elements/p-e4792f63.system.entry.js +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { r as registerInstance, e as getAssetPath, h, a as Host, F as Fragment, d as createEvent, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { d as cartStore, I as cartStoreHasOneEligibleItem, J as stripeStoreApplyPromoCode, K as stripeStoreRemovePromoCode, b as stripeStore, C as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, L as stripeStoreResetPromoCode, M as stripeStoreMessageBasedOnStatus, N as storeCreditStore, O as storeCreditStoreReset, x as storeCreditStoreCoversFullAmount, r as cartStoreNextStep, P as stripeStoreTranslateAddressToLatin, Q as extractName, D as cartStoreOnChange, R as stripeStoreAsyncAddressUpdate, H as cartStoreUpdateSelectedShippingOption, S as cartStoreGetShippingTransitInfo, T as cartStoreGetMethod, U as sortServiceLevelOptionsByAmount } from './cart-
|
|
3
|
-
import { t as translate, l as localizationStore, s as storageStore, c as localizationStoreOnChange } from './localization-
|
|
4
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
2
|
+
import { d as cartStore, I as cartStoreHasOneEligibleItem, J as stripeStoreApplyPromoCode, K as stripeStoreRemovePromoCode, b as stripeStore, C as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, L as stripeStoreResetPromoCode, M as stripeStoreMessageBasedOnStatus, N as storeCreditStore, O as storeCreditStoreReset, x as storeCreditStoreCoversFullAmount, r as cartStoreNextStep, P as stripeStoreTranslateAddressToLatin, Q as extractName, D as cartStoreOnChange, R as stripeStoreAsyncAddressUpdate, H as cartStoreUpdateSelectedShippingOption, S as cartStoreGetShippingTransitInfo, T as cartStoreGetMethod, U as sortServiceLevelOptionsByAmount } from './cart-41f41429.js';
|
|
3
|
+
import { t as translate, l as localizationStore, s as storageStore, c as localizationStoreOnChange } from './localization-ee06df70.js';
|
|
4
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-99da51f5.js';
|
|
5
5
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-5f7856f2.js';
|
|
6
6
|
import { c as classes } from './classes-0d95c529.js';
|
|
7
7
|
import { z as zonosStore, h as zonosStoreOnChange, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-9662b071.js';
|
|
8
|
-
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-
|
|
9
|
-
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore } from './paypal-
|
|
8
|
+
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-afc0dd6e.js';
|
|
9
|
+
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore } from './paypal-ac74241f.js';
|
|
10
10
|
import { h as handleFetch, s as sendErrorLog, j as jsonParse, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
|
|
11
11
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
12
12
|
import { g as getBorderRadius } from './getBorderRadius-98c64be8.js';
|
|
13
13
|
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
14
14
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
15
|
-
import { p as placeTestOrder } from './placeTestOrder-
|
|
15
|
+
import { p as placeTestOrder } from './placeTestOrder-0416d327.js';
|
|
16
16
|
import { i as isDarkColor } from './isDarkColor-0a8453e7.js';
|
|
17
17
|
import { g as getContrastColor } from './getContrastColor-2340485f.js';
|
|
18
18
|
import { i as isColorVariable } from './isColorVariable-0a94004f.js';
|
|
@@ -909,6 +909,8 @@ const ZonosCheckoutFinish = class {
|
|
|
909
909
|
};
|
|
910
910
|
ZonosCheckoutFinish.style = ZonosCheckoutFinishStyle0;
|
|
911
911
|
|
|
912
|
+
const ChevronDownIcon$1 = `<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
913
|
+
|
|
912
914
|
const Globe = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">
|
|
913
915
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>
|
|
914
916
|
</svg>
|
|
@@ -926,7 +928,7 @@ const ZonosIconDark = `<svg width="408" height="112" viewBox="0 0 408 112" fill=
|
|
|
926
928
|
</svg>
|
|
927
929
|
`;
|
|
928
930
|
|
|
929
|
-
const zonosCheckoutFooterCss = ":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{position:absolute;bottom:-50px;left:0;right:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--checkout-footer{width:calc(90vw - 22px);gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:24px}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo a{line-height:0}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper a{text-decoration:none}:host .zonos--checkout-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{gap:4px}}:host .zonos--checkout-footer .zonos--checkout-footer-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar{width:10px}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog.zonos--checkout-footer-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host(.mobile){-ms-flex-direction:column;flex-direction:column;gap:32px;background:var(--zonos-elements-gray-0);position:relative;padding-top:24px;bottom:0}:host(.mobile) .zonos--checkout-footer{-ms-flex-direction:column;flex-direction:column;gap:4px}:host(.mobile) .zonos--checkout-locale-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-icon-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-dialog{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw}";
|
|
931
|
+
const zonosCheckoutFooterCss = ":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{position:absolute;bottom:-50px;left:0;right:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--checkout-footer{width:calc(90vw - 22px);gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:24px}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo a{line-height:0}:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper a{text-decoration:none}:host .zonos--checkout-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--checkout-footer .zonos--checkout-locale-wrapper{gap:4px}}:host .zonos--checkout-footer .zonos--checkout-locale-wrapper .zonos--checkout-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px}:host .zonos--checkout-footer .zonos--checkout-footer-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar{width:10px}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--checkout-footer .zonos--checkout-footer-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--checkout-footer .zonos--checkout-footer-dialog.zonos--checkout-footer-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host(.mobile){-ms-flex-direction:column;flex-direction:column;gap:32px;background:var(--zonos-elements-gray-0);position:relative;padding-top:24px;bottom:0}:host(.mobile) .zonos--checkout-footer{-ms-flex-direction:column;flex-direction:column;gap:4px}:host(.mobile) .zonos--checkout-locale-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-icon-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.mobile) .zonos--checkout-footer-dialog{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw}";
|
|
930
932
|
const ZonosCheckoutFooterStyle0 = zonosCheckoutFooterCss;
|
|
931
933
|
|
|
932
934
|
const ZonosCheckoutFooter = class {
|
|
@@ -958,10 +960,10 @@ const ZonosCheckoutFooter = class {
|
|
|
958
960
|
const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
|
|
959
961
|
// reverse color when on desktop. With the coversheet backdrop, the color should be white
|
|
960
962
|
const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-1000';
|
|
961
|
-
return (h(Host, { key: '
|
|
963
|
+
return (h(Host, { key: '608a64c8e871bc0544cb80b719c9e11d441e2909', class: classes(['zonos--elements', this.isMobile && 'mobile']) }, h("div", { key: '37e6da358ce729c118128d9fae97efed127d83b9', class: "zonos--checkout-footer" }, h("div", { key: 'd42eb447dd73073debd6c0d48b766ce31f995b32', class: "zonos--checkout-locale-wrapper" }, h("zonos-button", { key: '3a61cc1647aa2e74d0e1fd5534ae9ff66446ba7a', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, h("span", { key: '28bfc7ed3b75c9724e951177914f2d874fff27fe', class: "zonos--checkout-locale-label" }, languageLabel, h("zonos-icon", { key: 'b082108bcc0b5dded10136056fa1426bb6adda8e', "aria-hidden": "true", class: "zonos--checkout-locale-chevron", content: ChevronDownIcon$1, iconColor: colorDesktop, size: 18 }))), h("div", { key: 'ddccc795078e5eb55b25cbe5d5a6bf502579cded', class: classes([
|
|
962
964
|
'zonos--checkout-footer-dialog',
|
|
963
965
|
this.showLanguageDialog && 'zonos--checkout-footer-dialog-open',
|
|
964
|
-
]) }, h("zonos-language-select", { key: '
|
|
966
|
+
]) }, h("zonos-language-select", { key: 'c38f3ebb835b15cbfbe624507c0addb8622f65e6', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: 'b4862df1b1f4a27071ad4291891b968d016c7024', class: "zonos--checkout-footer-icon-wrapper" }, h("a", { key: 'ac15fc57811b44fbe9d6c032f02660bb41bd40f9', href: "https://zonos.com/docs/legal/zonos-privacy-policy", target: "_blank" }, h("zonos-text", { key: 'dc954edc4349a90c41b54348516c6922fe6c5e56', textColor: colorDesktop }, "Privacy policy")), h("div", { key: 'f8d5136948a871718cbd73f982b229c8ea46bbf8', class: "zonos--checkout-footer-logo" }, h("zonos-text", { key: '2e3542d9d2ddd78ba855858b93ccdeca47269962', textColor: colorDesktop }, "Powered by"), h("a", { key: '240abfbd5b86c5d0068cb20305ab3bb39abf22b5', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '7d5fe50373919e4bc22da89b00915e607eb1b9df', autoHeight: true, content: ZonosIconDark, size: 108 })))))));
|
|
965
967
|
}
|
|
966
968
|
get el() { return getElement(this); }
|
|
967
969
|
static get watchers() { return {
|
|
@@ -1269,17 +1271,17 @@ const ZonosCheckoutProgressTabs = class {
|
|
|
1269
1271
|
color: labelSelectedColor,
|
|
1270
1272
|
})
|
|
1271
1273
|
: labelSelectedColor;
|
|
1272
|
-
return (h(Host, { key: '
|
|
1274
|
+
return (h(Host, { key: '425c77b4ab1b9a29ada76644a60c2c6f54fa2e28', class: "zonos--elements", style: {
|
|
1273
1275
|
'--zonos--color': contrastLabelColor,
|
|
1274
1276
|
'--zonos--progress-percent': this.getTotalSuccessStep(),
|
|
1275
|
-
} }, h("div", { key: '
|
|
1277
|
+
} }, h("div", { key: 'd8e13a57521242f597c8b8adf7c6f304b3a9d3ce', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
1276
1278
|
const isSelected = tab.value === selectedStep;
|
|
1277
1279
|
return (h("button", { "aria-label": `Tab ${tab.label}`, class: classes([
|
|
1278
1280
|
'zonos--tab-item',
|
|
1279
1281
|
tab.value === selectedStep && 'selected',
|
|
1280
1282
|
tab.isDone && 'done',
|
|
1281
1283
|
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => this.setTabSelected(tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1000' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, translate(tab.label))));
|
|
1282
|
-
})), h("div", { key: '
|
|
1284
|
+
})), h("div", { key: '9461341c83a92c810a3cf02f3828610732eecfe2', class: "zonos--tab-progress" }, h("div", { key: '142824930f5a8a6ef4fdafc7b39d9a96aa518cff', class: "zonos--progress-bar-fill" }))));
|
|
1283
1285
|
}
|
|
1284
1286
|
static get assetsDirs() { return ["assets"]; }
|
|
1285
1287
|
get ele() { return getElement(this); }
|
|
@@ -1992,11 +1994,11 @@ const ZonosRestState = class {
|
|
|
1992
1994
|
}
|
|
1993
1995
|
render() {
|
|
1994
1996
|
const imageUrl = this.getImageRestState();
|
|
1995
|
-
return (h(Host, { key: '
|
|
1997
|
+
return (h(Host, { key: '70b8901469cba98007780b2dc6cceaa61f96d8ac', class: classes(['zonos--elements zonos--restState']), style: {
|
|
1996
1998
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
1997
|
-
} }, h("div", { key: '
|
|
1999
|
+
} }, h("div", { key: '7903d837e37c843a55aee6211cc2071add4f5a05', class: "zonos--restState-image" }, h("img", { key: 'dee0733ab529b004f53d1d69a29a07d7a44a3eea', alt: this.restStateType, onError: () => {
|
|
1998
2000
|
this.isErrorImageLoad = true;
|
|
1999
|
-
}, src: imageUrl })), h("div", { key: '
|
|
2001
|
+
}, src: imageUrl })), h("div", { key: '612e7d71d5e6bd2e0c37d7c6595b35ea5ca416dd', class: "content" }, h("zonos-text", { key: 'c28379a4b4546afa6b323986c092c9538aa66b65', class: "title", type: "boldSubheader" }, this.restStateTitle), h("zonos-text", { key: '309e2e9c5086d0c84ccbe6c695d657d9f8e16da0', class: "subtitle" }, this.restStateSubtitle)), h("div", { key: '7fb9586682d221a311598ee8d294c6daede33e96', class: "action" }, h("slot", { key: '87959654a7a3c9c621d633a492627d53ff561fd4' }))));
|
|
2000
2002
|
}
|
|
2001
2003
|
static get assetsDirs() { return ["assets"]; }
|
|
2002
2004
|
};
|
|
@@ -68,14 +68,14 @@ const ZonosCheckbox = class {
|
|
|
68
68
|
customRoundRadius: '4px',
|
|
69
69
|
overrideBorderStyle: this.borderStyle,
|
|
70
70
|
});
|
|
71
|
-
return (h(Host, { key: '
|
|
71
|
+
return (h(Host, { key: 'b72500a3ead1362eebf6cd90fc60fddbade0bccf', class: classes(['zonos--elements zonos--checkbox']), style: {
|
|
72
72
|
'--zonos--background-color': backgroundColor,
|
|
73
73
|
'--zonos--border-radius': borderStyle,
|
|
74
74
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
75
75
|
'--zonos--size': `${this.size}px`,
|
|
76
|
-
} }, h("label", { key: '
|
|
76
|
+
} }, h("label", { key: '3a5104fa8f2b3874108f27732df0aee9d4bebbd6', class: classes([this.isDisabled && 'disabled']), htmlFor: this.inputId }, h("input", { key: 'aea12725ffa80d01c7fe1753d637f6e94e1d0fad', checked: this.isChecked, disabled: this.isDisabled, hidden: true, id: this.inputId, onChange: e => {
|
|
77
77
|
this.checkboxSelected.emit(e.target.checked);
|
|
78
|
-
}, type: "checkbox" }), h("span", { key: '
|
|
78
|
+
}, type: "checkbox" }), h("span", { key: '807f1b1b8acf88793abe74d329c8ffd81a450d9b', class: "checkmark-container" }, h("svg", { key: '18bec57b0554f70704f5c53e57a5929a48165f44', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'd98ba6681c05d63e242518b332b7d3292e19d39e', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (h("zonos-text", { key: 'f540e55464dd67bf513cf6a77b078c7492945b50', size: this.fontSize }, this.label)))));
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
ZonosCheckbox.style = ZonosCheckboxStyle0;
|
|
@@ -93,9 +93,9 @@ const ZonosToggle = class {
|
|
|
93
93
|
this.options = [];
|
|
94
94
|
}
|
|
95
95
|
render() {
|
|
96
|
-
return (h(Host, { key: '
|
|
96
|
+
return (h(Host, { key: 'a69d1282e442b2cc5b24df68ee41c452b02fb022', class: classes(['zonos--elements zonos--toggle']), style: {
|
|
97
97
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
98
|
-
} }, h("div", { key: '
|
|
98
|
+
} }, h("div", { key: 'a0fff3107e8d9a98d3ff323379c6e39bee294eca', class: "wrapper" }, this.options.map(option => {
|
|
99
99
|
const selected = option.value === this.value;
|
|
100
100
|
return (h("button", { class: classes(['zonos--option', selected && 'selected']), key: option.value, onClick: () => {
|
|
101
101
|
this.toggleChanged.emit(option.value);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, h, F as Fragment, a as Host } from './index-cfd394c8.js';
|
|
2
|
-
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, l as cartStoreStartCheckoutInterval, t as trackConversionEvent, m as getCheckoutSessionBody, n as cartStoreUpdateToErrorState, o as stripeStoreCleanupDomesticShippingSession, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as storeCreditStoreApplyCredit, x as storeCreditStoreCoversFullAmount, y as validateCheckoutSession, z as storeCreditStoreCreateOrder, A as stripeStoreConfirmPayment, B as stripeStoreHandleInventoryRefund, C as stripeStoreReset, D as cartStoreOnChange, E as stripeStoreOnChange, F as storeCreditStoreGetEffectiveAmount } from './cart-
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitAnalytics, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
4
|
-
import { f as filterValidTests, l as localizationStore, a as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, b as storageStoreSetEnabledVariantTestKeys, t as translate, c as localizationStoreOnChange, d as currencyFormat } from './localization-
|
|
2
|
+
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, l as cartStoreStartCheckoutInterval, t as trackConversionEvent, m as getCheckoutSessionBody, n as cartStoreUpdateToErrorState, o as stripeStoreCleanupDomesticShippingSession, p as cartStoreSetCheckoutSession, q as stripeStorePrefetchLandedCost, r as cartStoreNextStep, u as stripeStoreUpdateCheckoutSessionBaseCurrency, v as stripeStoreHandleInventoryCheck, w as storeCreditStoreApplyCredit, x as storeCreditStoreCoversFullAmount, y as validateCheckoutSession, z as storeCreditStoreCreateOrder, A as stripeStoreConfirmPayment, B as stripeStoreHandleInventoryRefund, C as stripeStoreReset, D as cartStoreOnChange, E as stripeStoreOnChange, F as storeCreditStoreGetEffectiveAmount } from './cart-41f41429.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitAnalytics, a as paypalStore, b as paypalInitScript } from './paypal-ac74241f.js';
|
|
4
|
+
import { f as filterValidTests, l as localizationStore, a as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, b as storageStoreSetEnabledVariantTestKeys, t as translate, c as localizationStoreOnChange, d as currencyFormat } from './localization-ee06df70.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-9662b071.js';
|
|
6
6
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
|
|
7
|
-
import { h as handleFetch,
|
|
7
|
+
import { h as handleFetch, l as logError, g as getIsTestMode, j as jsonParse, b as getAdditionalLogMetadata, s as sendErrorLog, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-a844cac1.js';
|
|
8
8
|
import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-da7fdd37.js';
|
|
9
9
|
import { l as log, g as getElapsedTime, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
10
10
|
import { _ as _getIsValidCartId, c as checkoutHiddenBtnSelector, a as checkoutHiddenInternationalBtnSelector, d as domesticRedirectedBtnSelector, g as getAbandonedCartRenewTokenValue } from './CheckoutConfig-724d7bae.js';
|
|
@@ -93,6 +93,63 @@ const buildCartUrl = ({ cartId, checkoutSessionId, customerAddress1, customerAdd
|
|
|
93
93
|
return `${hostedCheckoutUrl}?${urlParams.toString()}`;
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Fetch the checkout/cart ID from the BigCommerce Storefront Cart API.
|
|
98
|
+
* The `/checkout` page URL does not include the checkout ID, so we
|
|
99
|
+
* retrieve it from `/api/storefront/cart` which returns the active cart(s).
|
|
100
|
+
*/
|
|
101
|
+
const fetchCheckoutId = async () => {
|
|
102
|
+
var _a, _b;
|
|
103
|
+
try {
|
|
104
|
+
const response = await fetch('/api/storefront/cart', {
|
|
105
|
+
credentials: 'same-origin',
|
|
106
|
+
headers: {
|
|
107
|
+
Accept: 'application/json',
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
if (!response.ok) {
|
|
111
|
+
log(`Failed to fetch BigCommerce cart: ${String(response.status)}`, 'error');
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
const carts = (await response.json());
|
|
115
|
+
return (_b = (_a = carts === null || carts === void 0 ? void 0 : carts[0]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null;
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
logError('Error fetching BigCommerce cart data', error);
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Fetch checkout data from the BigCommerce Storefront API.
|
|
124
|
+
* This API is cookie-authenticated (same-origin), so no token is needed.
|
|
125
|
+
*/
|
|
126
|
+
const fetchBigCommerceCheckout = async (checkoutId) => {
|
|
127
|
+
try {
|
|
128
|
+
const response = await fetch(`/api/storefront/checkouts/${checkoutId}?include=customer.customerGroup,customer.addresses`, {
|
|
129
|
+
credentials: 'same-origin',
|
|
130
|
+
headers: {
|
|
131
|
+
Accept: 'application/json',
|
|
132
|
+
'Content-Type': 'application/json',
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
if (!response.ok) {
|
|
136
|
+
log(`Failed to fetch BigCommerce checkout: ${String(response.status)}`, 'error');
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
return (await response.json());
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
logError('Error fetching BigCommerce checkout data', error);
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Whether the BigCommerce shopper is already logged in. We key off the
|
|
148
|
+
* customer's numeric `id` since the storefront API populates it only for
|
|
149
|
+
* authenticated sessions (guest checkouts have an empty `customer` object).
|
|
150
|
+
*/
|
|
151
|
+
const isBigCommerceCustomerLoggedIn = (checkout) => { var _a; return !!((_a = checkout === null || checkout === void 0 ? void 0 : checkout.customer) === null || _a === void 0 ? void 0 : _a.id); };
|
|
152
|
+
|
|
96
153
|
/**
|
|
97
154
|
* The query flag that BigCommerce carries back to `cart.php` after the
|
|
98
155
|
* shopper logs in. When present, Zonos-elements knows to resume the
|
|
@@ -180,63 +237,6 @@ const buildBigcommerceRedirectUrl = (pathname) => {
|
|
|
180
237
|
return url.toString();
|
|
181
238
|
};
|
|
182
239
|
|
|
183
|
-
/**
|
|
184
|
-
* Fetch the checkout/cart ID from the BigCommerce Storefront Cart API.
|
|
185
|
-
* The `/checkout` page URL does not include the checkout ID, so we
|
|
186
|
-
* retrieve it from `/api/storefront/cart` which returns the active cart(s).
|
|
187
|
-
*/
|
|
188
|
-
const fetchCheckoutId = async () => {
|
|
189
|
-
var _a, _b;
|
|
190
|
-
try {
|
|
191
|
-
const response = await fetch('/api/storefront/cart', {
|
|
192
|
-
credentials: 'same-origin',
|
|
193
|
-
headers: {
|
|
194
|
-
Accept: 'application/json',
|
|
195
|
-
},
|
|
196
|
-
});
|
|
197
|
-
if (!response.ok) {
|
|
198
|
-
log(`Failed to fetch BigCommerce cart: ${String(response.status)}`, 'error');
|
|
199
|
-
return null;
|
|
200
|
-
}
|
|
201
|
-
const carts = (await response.json());
|
|
202
|
-
return (_b = (_a = carts === null || carts === void 0 ? void 0 : carts[0]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null;
|
|
203
|
-
}
|
|
204
|
-
catch (error) {
|
|
205
|
-
logError('Error fetching BigCommerce cart data', error);
|
|
206
|
-
return null;
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
/**
|
|
210
|
-
* Fetch checkout data from the BigCommerce Storefront API.
|
|
211
|
-
* This API is cookie-authenticated (same-origin), so no token is needed.
|
|
212
|
-
*/
|
|
213
|
-
const fetchBigCommerceCheckout = async (checkoutId) => {
|
|
214
|
-
try {
|
|
215
|
-
const response = await fetch(`/api/storefront/checkouts/${checkoutId}?include=customer.customerGroup`, {
|
|
216
|
-
credentials: 'same-origin',
|
|
217
|
-
headers: {
|
|
218
|
-
Accept: 'application/json',
|
|
219
|
-
'Content-Type': 'application/json',
|
|
220
|
-
},
|
|
221
|
-
});
|
|
222
|
-
if (!response.ok) {
|
|
223
|
-
log(`Failed to fetch BigCommerce checkout: ${String(response.status)}`, 'error');
|
|
224
|
-
return null;
|
|
225
|
-
}
|
|
226
|
-
return (await response.json());
|
|
227
|
-
}
|
|
228
|
-
catch (error) {
|
|
229
|
-
logError('Error fetching BigCommerce checkout data', error);
|
|
230
|
-
return null;
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
/**
|
|
234
|
-
* Whether the BigCommerce shopper is already logged in. We key off the
|
|
235
|
-
* customer's numeric `id` since the storefront API populates it only for
|
|
236
|
-
* authenticated sessions (guest checkouts have an empty `customer` object).
|
|
237
|
-
*/
|
|
238
|
-
const isBigCommerceCustomerLoggedIn = (checkout) => { var _a; return !!((_a = checkout === null || checkout === void 0 ? void 0 : checkout.customer) === null || _a === void 0 ? void 0 : _a.id); };
|
|
239
|
-
|
|
240
240
|
const DEFAULT_RESULT = {
|
|
241
241
|
customerGroupId: null,
|
|
242
242
|
shouldBypass: false,
|
|
@@ -610,6 +610,106 @@ const fixBigCommerceLoginCreateAccountLink = () => {
|
|
|
610
610
|
setTimeout(() => observer.disconnect(), 10000);
|
|
611
611
|
};
|
|
612
612
|
|
|
613
|
+
const toContactOption = (address, email) => {
|
|
614
|
+
// Skip entries missing the fields the address form treats as required.
|
|
615
|
+
if (!address.address1 || !address.countryCode) {
|
|
616
|
+
return null;
|
|
617
|
+
}
|
|
618
|
+
const name = [address.firstName, address.lastName]
|
|
619
|
+
.filter(Boolean)
|
|
620
|
+
.join(' ')
|
|
621
|
+
.trim();
|
|
622
|
+
return {
|
|
623
|
+
address: {
|
|
624
|
+
city: address.city || '',
|
|
625
|
+
country: address.countryCode,
|
|
626
|
+
line1: address.address1,
|
|
627
|
+
line2: address.address2 || '',
|
|
628
|
+
postal_code: address.postalCode || '',
|
|
629
|
+
// Prefer the ISO subdivision code when present so it round-trips through
|
|
630
|
+
// Stripe; fall back to the human-readable state name.
|
|
631
|
+
state: address.stateOrProvinceCode || address.stateOrProvince || '',
|
|
632
|
+
},
|
|
633
|
+
email,
|
|
634
|
+
name,
|
|
635
|
+
phone: address.phone || '',
|
|
636
|
+
};
|
|
637
|
+
};
|
|
638
|
+
const dedupKey = (option) => [
|
|
639
|
+
option.address.line1,
|
|
640
|
+
option.address.line2 || '',
|
|
641
|
+
option.address.postal_code,
|
|
642
|
+
option.address.country,
|
|
643
|
+
]
|
|
644
|
+
.join('|')
|
|
645
|
+
.toLowerCase();
|
|
646
|
+
/**
|
|
647
|
+
* Extract a logged-in BigCommerce shopper's known addresses from a Storefront
|
|
648
|
+
* API checkout response and convert them into the shape that `zonos-address`
|
|
649
|
+
* consumes (`StripeStoreContactOption[]`).
|
|
650
|
+
*
|
|
651
|
+
* Combines the saved address book (`customer.addresses`) with any address
|
|
652
|
+
* already attached to the active checkout's consignments, so a shopper who
|
|
653
|
+
* just selected a one-off shipping address on BC native checkout still sees
|
|
654
|
+
* that address in the international checkout's address picker. Deduplicates
|
|
655
|
+
* by line1 + line2 + postal code + country.
|
|
656
|
+
*
|
|
657
|
+
* Callers must supply `isShippable` so addresses outside the merchant's
|
|
658
|
+
* shipping zones are filtered out — international checkout can't fulfill
|
|
659
|
+
* them and showing them would just confuse the shopper. The optional
|
|
660
|
+
* `selectedCountryCode` floats addresses in that country to the top of the
|
|
661
|
+
* list so the shopper's current destination is the default choice.
|
|
662
|
+
*
|
|
663
|
+
* Returns an empty list for guest sessions (no `customer.id`) or when the
|
|
664
|
+
* checkout response is missing the relevant includes.
|
|
665
|
+
*/
|
|
666
|
+
const getBigCommerceCustomerAddresses = (checkout, options) => {
|
|
667
|
+
var _a, _b, _c, _d;
|
|
668
|
+
if (!((_a = checkout === null || checkout === void 0 ? void 0 : checkout.customer) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
669
|
+
return [];
|
|
670
|
+
}
|
|
671
|
+
const { isShippable, selectedCountryCode } = options;
|
|
672
|
+
const email = checkout.customer.email || '';
|
|
673
|
+
const consignmentAddresses = (_c = (_b = checkout.consignments) === null || _b === void 0 ? void 0 : _b.flatMap(consignment => consignment.shippingAddress ? [consignment.shippingAddress] : [])) !== null && _c !== void 0 ? _c : [];
|
|
674
|
+
const savedAddresses = (_d = checkout.customer.addresses) !== null && _d !== void 0 ? _d : [];
|
|
675
|
+
const seen = new Set();
|
|
676
|
+
const result = [];
|
|
677
|
+
// Iterate saved addresses first so the dedup key for an address present in
|
|
678
|
+
// both lists keeps the saved-book version (which carries an `id` and is the
|
|
679
|
+
// shopper's canonical entry).
|
|
680
|
+
for (const address of [...savedAddresses, ...consignmentAddresses]) {
|
|
681
|
+
const option = toContactOption(address, email);
|
|
682
|
+
if (!option) {
|
|
683
|
+
continue;
|
|
684
|
+
}
|
|
685
|
+
if (!isShippable(option.address.country)) {
|
|
686
|
+
continue;
|
|
687
|
+
}
|
|
688
|
+
const key = dedupKey(option);
|
|
689
|
+
if (seen.has(key)) {
|
|
690
|
+
continue;
|
|
691
|
+
}
|
|
692
|
+
seen.add(key);
|
|
693
|
+
result.push(option);
|
|
694
|
+
}
|
|
695
|
+
if (!selectedCountryCode) {
|
|
696
|
+
return result;
|
|
697
|
+
}
|
|
698
|
+
// Stable-sort the survivors so addresses matching the currently-selected
|
|
699
|
+
// country come first while everything else keeps its original order.
|
|
700
|
+
return result
|
|
701
|
+
.map((option, index) => ({ index, option }))
|
|
702
|
+
.sort((a, b) => {
|
|
703
|
+
const aMatches = a.option.address.country === selectedCountryCode;
|
|
704
|
+
const bMatches = b.option.address.country === selectedCountryCode;
|
|
705
|
+
if (aMatches === bMatches) {
|
|
706
|
+
return a.index - b.index;
|
|
707
|
+
}
|
|
708
|
+
return aMatches ? -1 : 1;
|
|
709
|
+
})
|
|
710
|
+
.map(entry => entry.option);
|
|
711
|
+
};
|
|
712
|
+
|
|
613
713
|
const isDisabledCountry = (showLog = true) => {
|
|
614
714
|
if (!localizationStore.localizationLoaded) {
|
|
615
715
|
return true;
|
|
@@ -1514,6 +1614,51 @@ const ZonosCheckout = class {
|
|
|
1514
1614
|
settlementAmount: total,
|
|
1515
1615
|
};
|
|
1516
1616
|
};
|
|
1617
|
+
/**
|
|
1618
|
+
* For BigCommerce stores with a logged-in shopper, seed
|
|
1619
|
+
* `defaultCustomerProfileAddress` from the BC Storefront API so the
|
|
1620
|
+
* `zonos-address` picker prefills the shopper's saved address book without
|
|
1621
|
+
* forcing them to retype anything. Skips when an address has already been
|
|
1622
|
+
* prefilled by another path (Stripe customer profile, merchant-provided
|
|
1623
|
+
* `defaultAddress`, or the BC redirect's session-storage handoff).
|
|
1624
|
+
*/
|
|
1625
|
+
this.prefillBigCommerceCustomerAddresses = async () => {
|
|
1626
|
+
if (!window.Zonos.isBigCommerce) {
|
|
1627
|
+
return;
|
|
1628
|
+
}
|
|
1629
|
+
if (this.defaultCustomerProfileAddress.length) {
|
|
1630
|
+
return;
|
|
1631
|
+
}
|
|
1632
|
+
const hasManualDefault = (Array.isArray(this.defaultAddress) && this.defaultAddress.length > 0) ||
|
|
1633
|
+
(!Array.isArray(this.defaultAddress) &&
|
|
1634
|
+
typeof this.defaultAddress === 'object' &&
|
|
1635
|
+
this.defaultAddress !== null);
|
|
1636
|
+
if (hasManualDefault) {
|
|
1637
|
+
return;
|
|
1638
|
+
}
|
|
1639
|
+
const checkoutId = await fetchCheckoutId();
|
|
1640
|
+
if (!checkoutId) {
|
|
1641
|
+
return;
|
|
1642
|
+
}
|
|
1643
|
+
const checkout = await fetchBigCommerceCheckout(checkoutId);
|
|
1644
|
+
if (!isBigCommerceCustomerLoggedIn(checkout)) {
|
|
1645
|
+
return;
|
|
1646
|
+
}
|
|
1647
|
+
const addresses = getBigCommerceCustomerAddresses(checkout, {
|
|
1648
|
+
isShippable: countryCode => isShippableCountry(false, countryCode),
|
|
1649
|
+
selectedCountryCode: localizationStore.selectedCountryCode || undefined,
|
|
1650
|
+
});
|
|
1651
|
+
if (!addresses.length) {
|
|
1652
|
+
return;
|
|
1653
|
+
}
|
|
1654
|
+
// Re-check after the awaits — another prefill path may have populated state
|
|
1655
|
+
// while we were waiting on the network.
|
|
1656
|
+
if (this.defaultCustomerProfileAddress.length) {
|
|
1657
|
+
return;
|
|
1658
|
+
}
|
|
1659
|
+
this.defaultCustomerProfileAddress = addresses;
|
|
1660
|
+
log(`Prefilled ${String(addresses.length)} BigCommerce customer address(es) for logged-in shopper`, 'info');
|
|
1661
|
+
};
|
|
1517
1662
|
this.getDefaultAddress = () => {
|
|
1518
1663
|
// If checkout customer is authenticated, use the address from the customer profile
|
|
1519
1664
|
if (this.defaultCustomerProfileAddress.length) {
|
|
@@ -2200,6 +2345,11 @@ const ZonosCheckout = class {
|
|
|
2200
2345
|
// resume flag, auto-open the international checkout. Strip the flag
|
|
2201
2346
|
// from the URL so a refresh doesn't keep re-triggering the dialog.
|
|
2202
2347
|
this.handleBigcommerceInternationalResumeFlag();
|
|
2348
|
+
// For BigCommerce + logged-in shopper, prefetch the saved address book
|
|
2349
|
+
// (`customer.addresses` include) so the international checkout's address
|
|
2350
|
+
// picker is populated by the time the shopper opens it. Fire-and-forget —
|
|
2351
|
+
// the prefill itself guards against overwriting other prefill sources.
|
|
2352
|
+
void this.prefillBigCommerceCustomerAddresses();
|
|
2203
2353
|
// check if bigcommerce, if user enters the shipping address that's in the shipping zone at bigcommerce checkout
|
|
2204
2354
|
watchImmediateBigcommerceDomesticCheckoutRedirect({
|
|
2205
2355
|
domesticRedirectedBtnSelector: domesticRedirectedBtnSelector,
|
|
@@ -53,10 +53,10 @@ const ZonosCollapse = class {
|
|
|
53
53
|
// set overflow to hidden to prevent content from showing when collapsed
|
|
54
54
|
this.el.style.overflow = 'hidden';
|
|
55
55
|
}
|
|
56
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: '3e88dfbb76bc891e26c8b25729719b3bdc7e4087', class: 'zonos--elements zonos--collapse', style: {
|
|
57
57
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
58
58
|
height: this.getElementHeight(),
|
|
59
|
-
} }, h("div", { key: '
|
|
59
|
+
} }, h("div", { key: '3304ccae3cf01ee2100f10e0e4751bb1ea709d00' }, h("iframe", { key: 'c7af721e790b0b7cea8a5345403d485c8ed0dae4', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: 'be37b54db2a486750777edf71ff1001e4589f80a' }))));
|
|
60
60
|
}
|
|
61
61
|
get el() { return getElement(this); }
|
|
62
62
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, e as getAssetPath, h, a as Host } from './index-cfd394c8.js';
|
|
2
|
-
import { d as cartStore } from './cart-
|
|
2
|
+
import { d as cartStore } from './cart-41f41429.js';
|
|
3
3
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-5f7856f2.js';
|
|
4
4
|
import { f as zonosStoreFontFamily } from './zonosStore-9662b071.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
6
6
|
import { s as styles } from './styles-6fc2fad9.js';
|
|
7
|
-
import './localization-
|
|
7
|
+
import './localization-ee06df70.js';
|
|
8
8
|
import './handleFetch-a844cac1.js';
|
|
9
9
|
import './VarianceTest-572cecf5.js';
|
|
10
10
|
import './isDarkColor-0a8453e7.js';
|
|
@@ -21,7 +21,7 @@ const ZonosCollectCartItems = class {
|
|
|
21
21
|
render() {
|
|
22
22
|
const emptyItemImg = getAssetPath('./assets/empty-item.jpeg');
|
|
23
23
|
const nonRestrictedItems = cartStore.items.filter(item => !item.isRestricted);
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: 'ccad7b37a4f0d00d679dfdecb98fa15c2600aea2', class: "zonos--collect-cart-items zonos--elements" }, h("table", { key: '0464336c854621f6f2b31b2fa6ce93daa152e607', class: "zonos--cart-table" }, h("tbody", { key: 'a32edcb6ed81d0117fb96f93c9e4fea5d1971abe' }, nonRestrictedItems.map(item => {
|
|
25
25
|
const itemImg = item.imageUrl;
|
|
26
26
|
const cleanedItemNames = cleanHtmlMarkdown(item.name);
|
|
27
27
|
return (h("tr", { class: "zonos--collect-cart-item" }, h("td", { class: "zonos--column zonos--cart-item-image" }, itemImg && !this.errorImages.includes(itemImg) ? (h("img", { alt: item.name, onError: () => {
|
|
@@ -48,10 +48,10 @@ const HStack = class {
|
|
|
48
48
|
this.spacing = 24;
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: '6d17afddd6bee4215f1ca29e6d1876ead04b1cf4', style: {
|
|
52
52
|
'--spacing': `${this.spacing}px`,
|
|
53
53
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
54
|
-
} }, h("slot", { key: '
|
|
54
|
+
} }, h("slot", { key: '1588eca69137d187ce946df8004a5192187e963b' })));
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
HStack.style = ZonosHStackStyle0;
|
|
@@ -74,7 +74,7 @@ const ZonosSkeleton = class {
|
|
|
74
74
|
this.skeletonHeight = '14px';
|
|
75
75
|
}
|
|
76
76
|
render() {
|
|
77
|
-
return (h(Host, { key: '
|
|
77
|
+
return (h(Host, { key: '06888cfea3918480152b8f1af660148882747195', class: classes(['zonos--elements zonos--skeleton']), style: styles({
|
|
78
78
|
'--zonos--skeleton-height': this.skeletonHeight,
|
|
79
79
|
'--zonos--skeleton-width': this.skeletonWidth,
|
|
80
80
|
}) }));
|