@zonos/elements 1.3.263 → 1.3.265
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-c325b9e4.js} +2 -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-ac9414df.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-0d909501.js → isCollectMobileTablet-92fa5e8f.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-68ebf7c6.js → localization-06cc0379.js} +15 -1
- package/dist/cjs/{paypal-f8a0cca3.js → paypal-b52e1f24.js} +2 -2
- package/dist/cjs/{placeTestOrder-ce734b60.js → placeTestOrder-d93a6f2b.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-d163c1c4.js → renderCheckoutCurrency-1f521ea7.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 +98 -17
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-checkout.cjs.entry.js +219 -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-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +6 -6
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +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-cart-subtotal/zonos-cart-subtotal.css +9 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +15 -1
- 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 +61 -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/store/checkout/cart.js +1 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/checkout/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/collection/components/utils/parseLinkedText.js +65 -0
- package/dist/esm/{cart-34b11708.js → cart-0625a766.js} +2 -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-0daa7f74.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-85403c93.js → isCollectMobileTablet-8d3fb5f4.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-2e523b35.js → localization-ee06df70.js} +15 -1
- package/dist/esm/{paypal-d3b3d967.js → paypal-78c3572c.js} +2 -2
- package/dist/esm/{placeTestOrder-e1d6dfcd.js → placeTestOrder-18de7b6f.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-cc72a6c2.js → renderCheckoutCurrency-ba1702db.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 +98 -17
- package/dist/esm/zonos-checkbox_2.entry.js +5 -5
- package/dist/esm/zonos-checkout.entry.js +220 -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-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +6 -6
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +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-0625a766.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-0daa7f74.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-85403c93.js → isCollectMobileTablet-8d3fb5f4.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{localization-2e523b35.js → localization-ee06df70.js} +1 -1
- package/dist/esm-es5/{paypal-d3b3d967.js → paypal-78c3572c.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-e1d6dfcd.js → placeTestOrder-18de7b6f.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-cc72a6c2.js → renderCheckoutCurrency-ba1702db.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-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-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.d.ts +6 -0
- 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-cart-subtotal/zonos-cart-subtotal.d.ts +7 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +9 -0
- package/dist/types/components/store/checkout/cart.d.ts +5 -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/types/components/utils/parseLinkedText.d.ts +24 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +6 -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-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-2b40fab2.entry.js → p-105b7ebe.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-dc71be6f.system.entry.js → p-19a1cc70.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1ce71a7d.entry.js +1 -0
- package/dist/zonos-elements/{p-5290d104.entry.js → p-1ed2827f.entry.js} +1 -1
- 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-26374593.system.entry.js +1 -0
- package/dist/zonos-elements/{p-30b19a4e.system.entry.js → p-274a7c0e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1b5d90ee.system.entry.js → p-281063f4.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-024a4af5.entry.js → p-30a0aed1.entry.js} +1 -1
- 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-c2b86522.js → p-3686190f.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-562fbdab.js → p-3d6ce58a.js} +1 -1
- package/dist/zonos-elements/{p-2381985c.entry.js → p-3fbdb83f.entry.js} +1 -1
- package/dist/zonos-elements/{p-47a58a38.system.entry.js → p-407b49f1.system.entry.js} +1 -1
- package/dist/zonos-elements/p-41f2e301.entry.js +1 -0
- package/dist/zonos-elements/{p-926c33b1.system.entry.js → p-42518502.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6a11cccc.system.entry.js → p-4477556a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-45ceb26f.system.entry.js → p-4a4c3af1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-bccae0df.entry.js → p-4baa51ef.entry.js} +1 -1
- package/dist/zonos-elements/{p-96f8cea8.entry.js → p-5353cfa4.entry.js} +1 -1
- package/dist/zonos-elements/{p-5d32f10f.system.entry.js → p-5678c044.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a3936c44.system.entry.js → p-595e2a7d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-15161658.entry.js → p-59aa5785.entry.js} +1 -1
- package/dist/zonos-elements/{p-227a1ecc.system.js → p-59e16c6f.system.js} +1 -1
- package/dist/zonos-elements/{p-a076cf7f.system.js → p-62db5d7c.system.js} +1 -1
- package/dist/zonos-elements/{p-20e1a5a0.entry.js → p-66edcaa4.entry.js} +1 -1
- package/dist/zonos-elements/p-69e2a7dd.js +1 -0
- package/dist/zonos-elements/{p-b8710131.entry.js → p-6b9ad020.entry.js} +1 -1
- package/dist/zonos-elements/p-6ef88d96.system.entry.js +1 -0
- package/dist/zonos-elements/p-6f8abf4f.js +1 -0
- package/dist/zonos-elements/{p-7297f6bd.system.entry.js → p-72058aac.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-501d16ad.system.entry.js → p-72833da8.system.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-1f107c84.entry.js → p-7c312bc2.entry.js} +1 -1
- package/dist/zonos-elements/p-85cc83e5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-0f3b9ed7.entry.js → p-86ed51fd.entry.js} +1 -1
- package/dist/zonos-elements/{p-4d0b8897.system.js → p-8753cb36.system.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-9b2d6f06.entry.js +1 -0
- package/dist/zonos-elements/{p-22a8b44b.system.js → p-9bd63d7a.system.js} +1 -1
- package/dist/zonos-elements/{p-60a391b8.system.js → p-a054c5eb.system.js} +1 -1
- package/dist/zonos-elements/{p-a50d095f.js → p-a52ddeb5.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-73765370.system.entry.js → p-aaf9d8a4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3ae1a543.entry.js → p-ac54de99.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-bb0ce525.entry.js +1 -0
- package/dist/zonos-elements/p-c3ee352b.entry.js +1 -0
- package/dist/zonos-elements/{p-07c228a7.entry.js → p-cc481c69.entry.js} +1 -1
- package/dist/zonos-elements/{p-4d776228.entry.js → p-d1ff24f5.entry.js} +1 -1
- package/dist/zonos-elements/p-d2b91bb9.entry.js +1 -0
- package/dist/zonos-elements/{p-1c1149ff.js → p-dfe45cfd.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-7b6e65d6.system.js → p-e755ab57.system.js} +1 -1
- package/dist/zonos-elements/p-e89a411c.system.entry.js +1 -0
- package/dist/zonos-elements/{p-bee55d71.entry.js → p-eaa79ed8.entry.js} +1 -1
- package/dist/zonos-elements/{p-25b5ac23.system.entry.js → p-ec6472c9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b2d462f9.system.js → p-f4f71ae4.system.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-70c485df.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
- package/dist/zonos-elements/p-fe5303d1.entry.js +0 -1
|
@@ -3,6 +3,8 @@ import { localizationStore } from "../../../store/hello/localization";
|
|
|
3
3
|
import { isDarkColor } from "../../../utils/isDarkColor";
|
|
4
4
|
import { languages } from "../../../../types/ILanguage";
|
|
5
5
|
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
6
|
+
import ChevronDownIcon from "./assets/chevronDownIcon.svg";
|
|
7
|
+
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
6
8
|
import Globe from "./assets/globe.svg";
|
|
7
9
|
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
8
10
|
import ZonosIconDark from "./assets/zonosIconDark.svg";
|
|
@@ -27,9 +29,9 @@ export class ZonosHelloDialogFooter {
|
|
|
27
29
|
const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
|
|
28
30
|
// Only use gray-0 (white) when the background color is dark (apply inverted color if the element is using dark theme variable)
|
|
29
31
|
const mainColor = primaryColor && isDarkColor(primaryColor) ? 'white' : 'black';
|
|
30
|
-
return (h(Host, { key: '
|
|
32
|
+
return (h(Host, { key: 'b8c4b5608d3af10147572ad97b363e6216ceb1a7', class: "zonos--elements" }, h("div", { key: 'a136c029e2f15171be4c14b706b41d8477fae649', class: "zonos--hello-dialog-footer", style: {
|
|
31
33
|
'--zonos--primary-color': primaryColor,
|
|
32
|
-
} }, h("a", { key: '
|
|
34
|
+
} }, h("a", { key: '99eb0554b1167e07efeb4f30c2352fb2210b51e3', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '7b2df9be8326d1913710ff10a6633a31268e8d9b', "aria-label": "Zonos Logo", autoHeight: true, content: mainColor === 'black' ? ZonosIconLight : ZonosIconDark, iconColor: mainColor, size: 108 })), h("div", { key: 'cbb70cb5dc7d03c0345bf0b3fea2f255be0a2b6b', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'c974f79edf2185706404f66f820eb602b15e6467', buttonColor: mainColor, icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, h("span", { key: 'd98e82523a82be43aaaf8dc2b8660af0f240f734', class: "zonos--hello-locale-label" }, language, h("zonos-icon", { key: '06968564c732df35d141d01ef7ecdc62936cade7', "aria-hidden": "true", class: "zonos--hello-locale-chevron", content: ChevronDownIcon, iconColor: mainColor, size: 18 }))), h("zonos-button", { key: '21b299e19244e57a89890c874217ef8848c59be5', buttonColor: mainColor, icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, h("span", { key: '6a7629ffc25230ff13a4ff814dfb22796487ad6f', class: "zonos--hello-locale-label" }, localizationStore.selectedCountryCode, h("zonos-icon", { key: 'fbf465f93fea211f54967c8bd1811ac92f10f140', "aria-hidden": "true", class: "zonos--hello-locale-chevron", content: ChevronDownIcon, iconColor: mainColor, size: 18 })))))));
|
|
33
35
|
}
|
|
34
36
|
static get is() { return "zonos-hello-dialog-footer"; }
|
|
35
37
|
static get encapsulation() { return "shadow"; }
|
|
@@ -347,25 +347,25 @@ export class ZonosHelloDialog {
|
|
|
347
347
|
// If deminimis is undefined or null, assume it's $0
|
|
348
348
|
const taxDeMinimisMessage = this.getTaxMessage();
|
|
349
349
|
const inclusivePriceMessage = this.getInclusivePriceMessage();
|
|
350
|
-
return (h(Host, { key: '
|
|
350
|
+
return (h(Host, { key: '4f03947b13c6e6d9f19d3d4241c427f9ef8cb07b', class: "zonos--elements" }, h("div", { key: 'c5001cd7c4c7bb0fcf2375fc211c9afbd2059f32', class: classes([
|
|
351
351
|
'zonos--hello-dialog',
|
|
352
352
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
353
353
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
354
354
|
!!this.mobileLocationOverride &&
|
|
355
355
|
'zonos--hello-dialog-mobile-override',
|
|
356
356
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
357
|
-
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '
|
|
357
|
+
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'cb86aadda605b075152c21009b11f57b87b1d815' }, h("div", { key: '77a7e3bd67cd2b19f2adec81f15c642d76151f74', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: 'ac5d1386f34c2948ea087d64ba60d1af87e76487', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { key: '50fcf820665b013090f8b22bd011b48edd23e47d', spacing: 24 }, h("zonos-country-flag", { key: 'fba9eb926c23fdad59d4262582fefd102aa9e721', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '08438a0f1f7ab1ed7aa6077bd8c0c040d10a48e2', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: 'f3ed157753544a886c2362e48d4ff941135f69dd', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '989155955d1b6b50e54b38b9aedf71041a1ca57e', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '480acbed038550026005317e0fa41c74db4befe6', spacing: 8 }, this.restrictedItems.map(item => {
|
|
358
358
|
var _a;
|
|
359
359
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
360
360
|
}), (dutyDeMinimisMessage ||
|
|
361
361
|
taxDeMinimisMessage ||
|
|
362
362
|
inclusivePriceMessage ||
|
|
363
|
-
!!(additionalInformation === null || additionalInformation === void 0 ? void 0 : additionalInformation.length)) && (h("zonos-card", { key: '
|
|
363
|
+
!!(additionalInformation === null || additionalInformation === void 0 ? void 0 : additionalInformation.length)) && (h("zonos-card", { key: 'ec95384f56843f11e7ef678363c08718ce879bea', spacing: "12px" }, h("zonos-v-stack", { key: 'e56aedf0bf3c2e698b6911ae0d96f3c46059158e', spacing: 12 }, this.renderHelloMessage({
|
|
364
364
|
dutyDeMinimisMessage,
|
|
365
365
|
inclusivePriceMessage,
|
|
366
366
|
taxDeMinimisMessage,
|
|
367
367
|
}), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
368
|
-
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info }))))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '
|
|
368
|
+
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info }))))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '103bcee4af2a3979a7db3e86b287063bec16310b', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '900e288096edd6aa4bcfddd3b80932a11c675a6a' }, h("zonos-country-select", { key: '278e3cfe7dcd69332e6257517759ca2c8e959ae0', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '2d70d0c380fc681492b7b97b4d78677db88a78fc' }, h("zonos-language-select", { key: '7debc2fa20436565b00c7f9832b89f388a814a96', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
369
369
|
}
|
|
370
370
|
static get is() { return "zonos-hello-dialog"; }
|
|
371
371
|
static get encapsulation() { return "shadow"; }
|
|
@@ -331,7 +331,7 @@ export class ZonosController {
|
|
|
331
331
|
zonosStore.organizationName = organizationName;
|
|
332
332
|
}
|
|
333
333
|
render() {
|
|
334
|
-
return h(Host, { key: '
|
|
334
|
+
return h(Host, { key: '681a81baa59bfe91e9fe0927aee49fa720fcb35b', class: "zonos--elements" });
|
|
335
335
|
}
|
|
336
336
|
static get is() { return "zonos-controller"; }
|
|
337
337
|
static get encapsulation() { return "shadow"; }
|
|
@@ -52,7 +52,7 @@ export class ZonosPaypalPayment {
|
|
|
52
52
|
this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: 'c01e031b29e0089389be2a16e888bd0b7c24dcd8', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: 'f03c880bde17291f083cfe1f0db6a918f92d720b', class: "zonos--payment-paypal-container" })));
|
|
56
56
|
}
|
|
57
57
|
static get is() { return "zonos-paypal-payment"; }
|
|
58
58
|
static get encapsulation() { return "scoped"; }
|
|
@@ -18,6 +18,7 @@ const { onChange: cartStoreOnChange, reset, state: cartStore, } = createStore(()
|
|
|
18
18
|
checkoutSessionTimeoutShow: false,
|
|
19
19
|
checkoutTimeoutInterval: null,
|
|
20
20
|
currency: 'USD',
|
|
21
|
+
customMessage: [],
|
|
21
22
|
customQuotingError: null,
|
|
22
23
|
customerAuthenticationToken: null,
|
|
23
24
|
displayBaseCurrency: false,
|
|
@@ -352,11 +352,11 @@ export class ZonosAddress {
|
|
|
352
352
|
this.isAddressFilled = true;
|
|
353
353
|
}
|
|
354
354
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
355
|
-
return (h(Host, { key: '
|
|
355
|
+
return (h(Host, { key: 'ebba5be32c456e8b71d397db63e666e5d5df1543', class: classes([
|
|
356
356
|
'zonos--address',
|
|
357
357
|
'zonos--elements',
|
|
358
358
|
`zonos--${this.type}-address`,
|
|
359
|
-
]) }, this.titleText && (h("zonos-text", { key: '
|
|
359
|
+
]) }, this.titleText && (h("zonos-text", { key: '25f15ea17b50ed055eb98b072850296312785b06', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("slot", { key: '631bc324d1bb96fb9e796b38a6da42ef6ca601a3', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), h("div", { key: '25f88c72f8fc9b788b042f2df2f1b8085132f683', class: "zonos--address-component" })));
|
|
360
360
|
}
|
|
361
361
|
static get is() { return "zonos-address"; }
|
|
362
362
|
static get encapsulation() { return "scoped"; }
|
|
@@ -78,9 +78,9 @@ export class ZonosAddressSuggestions {
|
|
|
78
78
|
return segments;
|
|
79
79
|
}
|
|
80
80
|
render() {
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '95f0fa0a1a5eb62ae2f08f305216a365f166af96', class: "zonos--address-suggestions", role: "group", style: {
|
|
82
82
|
'--zonos--border-radius': getBorderRadius(),
|
|
83
|
-
} }, h("ul", { key: '
|
|
83
|
+
} }, h("ul", { key: 'd76493f93428da65b645b8bf16ee82b780b2eb97', "aria-label": "Suggestions", class: "wrapper", role: "listbox" }, !!this.localSuggestions.length && (h("li", { key: 'b7d4a61c717a2df1057a81ff2e6517a0b7a7869a', "aria-selected": false, class: "powered-by option", role: "option" }, h("div", { key: '0dca2094920653d6205dd79e717290536e7ae1c9', class: "powered-by-container" }, h("zonos-text", { key: 'baa29ec5e43286d4df28eb418c7b2ccc4bf7d1e7', type: "caption" }, "Suggestions powered by"), h("zonos-text", { key: '2b544408cc75a9c50750072b1efb63e4cd4f1323', type: "semiBoldLabel" }, "Google")), h("zonos-button", { key: '939ba84809ce8f113a8d13cc75cb8a3c23013847', "aria-label": "Clear suggestions", icon: h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => {
|
|
84
84
|
this.localSuggestions = [];
|
|
85
85
|
} }))), this.localSuggestions.map(suggestion => (
|
|
86
86
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
@@ -924,10 +924,10 @@ export class ZonosAddress {
|
|
|
924
924
|
this.country = localizationStore.selectedCountryCode;
|
|
925
925
|
}
|
|
926
926
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
927
|
-
return (h(Host, { key: '
|
|
927
|
+
return (h(Host, { key: 'ce15e47889c185c72b9f79327ebbd24950da1811', class: classes([
|
|
928
928
|
'zonos--address zonos--elements',
|
|
929
929
|
`zonos--${this.type}-address`,
|
|
930
|
-
]) }, h("zonos-text", { key: '
|
|
930
|
+
]) }, h("zonos-text", { key: '91d1a627a89b8114075f5ecc1dff7bd8d52dd0b7', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("slot", { key: '1a69664bc17a2d59cff241bbb0917714340e006e', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), this.renderCustomAddressForm()));
|
|
931
931
|
}
|
|
932
932
|
static get is() { return "zonos-custom-address"; }
|
|
933
933
|
static get encapsulation() { return "scoped"; }
|
|
@@ -67,7 +67,7 @@ export class ZonosPayment {
|
|
|
67
67
|
}
|
|
68
68
|
render() {
|
|
69
69
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
70
|
-
return (h(Host, { key: '
|
|
70
|
+
return (h(Host, { key: '6bc25553430c9e23c77a0607ad28dc4c9efa66e6', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { key: 'e4ba3f581697a799e50fe066e7cc922a206af8e5', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: '0247eecadf083f09b67c5f668da845431234750d', class: "zonos--payment-component" }), h("div", { key: '7f63abd0a2c1cbc62f931e44fc44c69b57a4f8ed', class: "zonos--payment-paypal-container" })));
|
|
71
71
|
}
|
|
72
72
|
static get is() { return "zonos-payment"; }
|
|
73
73
|
static get encapsulation() { return "scoped"; }
|
|
@@ -32,7 +32,7 @@ export const fetchCheckoutId = async () => {
|
|
|
32
32
|
*/
|
|
33
33
|
export const fetchBigCommerceCheckout = async (checkoutId) => {
|
|
34
34
|
try {
|
|
35
|
-
const response = await fetch(`/api/storefront/checkouts/${checkoutId}?include=customer.customerGroup`, {
|
|
35
|
+
const response = await fetch(`/api/storefront/checkouts/${checkoutId}?include=customer.customerGroup,customer.addresses`, {
|
|
36
36
|
credentials: 'same-origin',
|
|
37
37
|
headers: {
|
|
38
38
|
Accept: 'application/json',
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
const toContactOption = (address, email) => {
|
|
2
|
+
// Skip entries missing the fields the address form treats as required.
|
|
3
|
+
if (!address.address1 || !address.countryCode) {
|
|
4
|
+
return null;
|
|
5
|
+
}
|
|
6
|
+
const name = [address.firstName, address.lastName]
|
|
7
|
+
.filter(Boolean)
|
|
8
|
+
.join(' ')
|
|
9
|
+
.trim();
|
|
10
|
+
return {
|
|
11
|
+
address: {
|
|
12
|
+
city: address.city || '',
|
|
13
|
+
country: address.countryCode,
|
|
14
|
+
line1: address.address1,
|
|
15
|
+
line2: address.address2 || '',
|
|
16
|
+
postal_code: address.postalCode || '',
|
|
17
|
+
// Prefer the ISO subdivision code when present so it round-trips through
|
|
18
|
+
// Stripe; fall back to the human-readable state name.
|
|
19
|
+
state: address.stateOrProvinceCode || address.stateOrProvince || '',
|
|
20
|
+
},
|
|
21
|
+
email,
|
|
22
|
+
name,
|
|
23
|
+
phone: address.phone || '',
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
const dedupKey = (option) => [
|
|
27
|
+
option.address.line1,
|
|
28
|
+
option.address.line2 || '',
|
|
29
|
+
option.address.postal_code,
|
|
30
|
+
option.address.country,
|
|
31
|
+
]
|
|
32
|
+
.join('|')
|
|
33
|
+
.toLowerCase();
|
|
34
|
+
/**
|
|
35
|
+
* Extract a logged-in BigCommerce shopper's known addresses from a Storefront
|
|
36
|
+
* API checkout response and convert them into the shape that `zonos-address`
|
|
37
|
+
* consumes (`StripeStoreContactOption[]`).
|
|
38
|
+
*
|
|
39
|
+
* Combines the saved address book (`customer.addresses`) with any address
|
|
40
|
+
* already attached to the active checkout's consignments, so a shopper who
|
|
41
|
+
* just selected a one-off shipping address on BC native checkout still sees
|
|
42
|
+
* that address in the international checkout's address picker. Deduplicates
|
|
43
|
+
* by line1 + line2 + postal code + country.
|
|
44
|
+
*
|
|
45
|
+
* Callers must supply `isShippable` so addresses outside the merchant's
|
|
46
|
+
* shipping zones are filtered out — international checkout can't fulfill
|
|
47
|
+
* them and showing them would just confuse the shopper. The optional
|
|
48
|
+
* `selectedCountryCode` floats addresses in that country to the top of the
|
|
49
|
+
* list so the shopper's current destination is the default choice.
|
|
50
|
+
*
|
|
51
|
+
* Returns an empty list for guest sessions (no `customer.id`) or when the
|
|
52
|
+
* checkout response is missing the relevant includes.
|
|
53
|
+
*/
|
|
54
|
+
export const getBigCommerceCustomerAddresses = (checkout, options) => {
|
|
55
|
+
var _a, _b, _c, _d;
|
|
56
|
+
if (!((_a = checkout === null || checkout === void 0 ? void 0 : checkout.customer) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
const { isShippable, selectedCountryCode } = options;
|
|
60
|
+
const email = checkout.customer.email || '';
|
|
61
|
+
const consignmentAddresses = (_c = (_b = checkout.consignments) === null || _b === void 0 ? void 0 : _b.flatMap(consignment => consignment.shippingAddress ? [consignment.shippingAddress] : [])) !== null && _c !== void 0 ? _c : [];
|
|
62
|
+
const savedAddresses = (_d = checkout.customer.addresses) !== null && _d !== void 0 ? _d : [];
|
|
63
|
+
const seen = new Set();
|
|
64
|
+
const result = [];
|
|
65
|
+
// Iterate saved addresses first so the dedup key for an address present in
|
|
66
|
+
// both lists keeps the saved-book version (which carries an `id` and is the
|
|
67
|
+
// shopper's canonical entry).
|
|
68
|
+
for (const address of [...savedAddresses, ...consignmentAddresses]) {
|
|
69
|
+
const option = toContactOption(address, email);
|
|
70
|
+
if (!option) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
if (!isShippable(option.address.country)) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const key = dedupKey(option);
|
|
77
|
+
if (seen.has(key)) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
seen.add(key);
|
|
81
|
+
result.push(option);
|
|
82
|
+
}
|
|
83
|
+
if (!selectedCountryCode) {
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
// Stable-sort the survivors so addresses matching the currently-selected
|
|
87
|
+
// country come first while everything else keeps its original order.
|
|
88
|
+
return result
|
|
89
|
+
.map((option, index) => ({ index, option }))
|
|
90
|
+
.sort((a, b) => {
|
|
91
|
+
const aMatches = a.option.address.country === selectedCountryCode;
|
|
92
|
+
const bMatches = b.option.address.country === selectedCountryCode;
|
|
93
|
+
if (aMatches === bMatches) {
|
|
94
|
+
return a.index - b.index;
|
|
95
|
+
}
|
|
96
|
+
return aMatches ? -1 : 1;
|
|
97
|
+
})
|
|
98
|
+
.map(entry => entry.option);
|
|
99
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { zonosStore } from "../../../store/zonosStore";
|
|
2
2
|
import { defaultCurrencyConverter } from "./defaultCurrencyConverter";
|
|
3
|
+
import { log } from "../../logging/log";
|
|
3
4
|
import { removeBlurCurrency } from "../../../../utils/performBlurCurrency";
|
|
4
5
|
export const currencyDisplay = () => {
|
|
5
6
|
if (zonosStore.helloSettings.currencyBehavior === 'DISABLED' ||
|
|
@@ -7,5 +8,19 @@ export const currencyDisplay = () => {
|
|
|
7
8
|
void removeBlurCurrency();
|
|
8
9
|
return;
|
|
9
10
|
}
|
|
11
|
+
// BigCommerce renders prices server-side using its native currency selector
|
|
12
|
+
// (exposed via `document.body.dataset.currencyCode`). When that currency
|
|
13
|
+
// differs from `zonosStore.sourceCurrency`, the DOM amounts are not in the
|
|
14
|
+
// currency Hello would convert *from* — running conversion would double-
|
|
15
|
+
// convert and produce wrong prices.
|
|
16
|
+
if (window.Zonos.isBigCommerce) {
|
|
17
|
+
const bigcommerceCurrencyCode = document.body.dataset.currencyCode;
|
|
18
|
+
if (bigcommerceCurrencyCode &&
|
|
19
|
+
bigcommerceCurrencyCode !== zonosStore.sourceCurrency) {
|
|
20
|
+
log(`Skipping Hello currency conversion: BigCommerce native currency "${bigcommerceCurrencyCode}" does not match sourceCurrency "${zonosStore.sourceCurrency}".`, 'info');
|
|
21
|
+
void removeBlurCurrency();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
10
25
|
defaultCurrencyConverter();
|
|
11
26
|
};
|
|
@@ -40,7 +40,7 @@ export const currencyFormat = ({ amount, currency, }) => {
|
|
|
40
40
|
return result;
|
|
41
41
|
}
|
|
42
42
|
const currencyDisplay = (overrideCurrencyFormat === null || overrideCurrencyFormat === void 0 ? void 0 : overrideCurrencyFormat.currencyDisplay) || 'symbol';
|
|
43
|
-
const formattedNumber = new Intl.NumberFormat(window.navigator.language, {
|
|
43
|
+
const formattedNumber = new Intl.NumberFormat(zonosStore.sourceCurrency === 'AUD' ? 'en-AU' : window.navigator.language, {
|
|
44
44
|
currency: targetCurrency,
|
|
45
45
|
currencyDisplay,
|
|
46
46
|
minimumFractionDigits: minimumFractionDigits,
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Markdown URL allows a single level of balanced `(...)` (e.g.
|
|
2
|
+
// `https://example.com/foo_(v2)`); anything deeper is rare in real-world URLs
|
|
3
|
+
// and we'd rather not write a recursive grammar. Bare URLs match greedily up
|
|
4
|
+
// to whitespace and rely on `BARE_URL_TRAILING_PUNCT` to peel off sentence
|
|
5
|
+
// punctuation.
|
|
6
|
+
const LINK_REGEX = /\[([^\]]+)\]\((https?:\/\/(?:[^\s()]|\([^\s()]*\))+)\)|(https?:\/\/[^\s]+)/g;
|
|
7
|
+
// Trailing characters that look like sentence punctuation rather than part of
|
|
8
|
+
// a URL. Stripped from bare URL matches so `Visit https://example.com.` keeps
|
|
9
|
+
// the period out of the link. `)` is intentionally excluded — Wikipedia-style
|
|
10
|
+
// URLs (e.g. `https://example.com/foo_(v2)`) embed balanced parens, and we
|
|
11
|
+
// don't want to break those.
|
|
12
|
+
const BARE_URL_TRAILING_PUNCT = /[.,;:!?\]}"']+$/;
|
|
13
|
+
/**
|
|
14
|
+
* Parse a string into an ordered list of plain-text and link segments.
|
|
15
|
+
*
|
|
16
|
+
* Supports Markdown-style links `[text](url)` and bare `https?://` URLs.
|
|
17
|
+
* Anything else is returned as a plain text segment so callers can render it
|
|
18
|
+
* as text (never `innerHTML`) — this is what keeps merchant-provided strings
|
|
19
|
+
* safe from HTML injection in [[customMessage]] banners.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* parseLinkedText('Visit [docs](https://example.com)')
|
|
23
|
+
* // [
|
|
24
|
+
* // { type: 'text', value: 'Visit ' },
|
|
25
|
+
* // { type: 'link', href: 'https://example.com', text: 'docs' },
|
|
26
|
+
* // ]
|
|
27
|
+
*/
|
|
28
|
+
export const parseLinkedText = (input) => {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
const segments = [];
|
|
31
|
+
// Reset the shared regex state in case a previous call left a lastIndex.
|
|
32
|
+
LINK_REGEX.lastIndex = 0;
|
|
33
|
+
let lastIndex = 0;
|
|
34
|
+
let match;
|
|
35
|
+
while ((match = LINK_REGEX.exec(input)) !== null) {
|
|
36
|
+
if (match.index > lastIndex) {
|
|
37
|
+
segments.push({
|
|
38
|
+
type: 'text',
|
|
39
|
+
value: input.slice(lastIndex, match.index),
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const [, mdText, mdUrl, plainUrl] = match;
|
|
43
|
+
// One of the alternations matched: either a markdown link (mdText + mdUrl)
|
|
44
|
+
// or a bare URL (plainUrl). Use the URL as both href and display text for
|
|
45
|
+
// bare URLs.
|
|
46
|
+
if (mdUrl && mdText) {
|
|
47
|
+
segments.push({ href: mdUrl, text: mdText, type: 'link' });
|
|
48
|
+
}
|
|
49
|
+
else if (plainUrl) {
|
|
50
|
+
const trailing = (_b = (_a = plainUrl.match(BARE_URL_TRAILING_PUNCT)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : '';
|
|
51
|
+
const url = trailing
|
|
52
|
+
? plainUrl.slice(0, plainUrl.length - trailing.length)
|
|
53
|
+
: plainUrl;
|
|
54
|
+
segments.push({ href: url, text: url, type: 'link' });
|
|
55
|
+
if (trailing) {
|
|
56
|
+
segments.push({ type: 'text', value: trailing });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
lastIndex = LINK_REGEX.lastIndex;
|
|
60
|
+
}
|
|
61
|
+
if (lastIndex < input.length) {
|
|
62
|
+
segments.push({ type: 'text', value: input.slice(lastIndex) });
|
|
63
|
+
}
|
|
64
|
+
return segments;
|
|
65
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-9662b071.js';
|
|
2
|
-
import { s as storageStore, l as localizationStore, e as getOverridenZCountry, t as translate, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-
|
|
2
|
+
import { s as storageStore, l as localizationStore, e as getOverridenZCountry, t as translate, f as filterValidTests, b as storageStoreSetEnabledVariantTestKeys } from './localization-ee06df70.js';
|
|
3
3
|
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
4
4
|
import { h as handleFetch, l as logError, f as fallbackApiList, g as getIsTestMode, a as getIsStagingMode, s as sendErrorLog, j as jsonParse } from './handleFetch-a844cac1.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-0a8453e7.js';
|
|
@@ -2037,6 +2037,7 @@ const { onChange: cartStoreOnChange, reset, state: cartStore, } = createStore(()
|
|
|
2037
2037
|
checkoutSessionTimeoutShow: false,
|
|
2038
2038
|
checkoutTimeoutInterval: null,
|
|
2039
2039
|
currency: 'USD',
|
|
2040
|
+
customMessage: [],
|
|
2040
2041
|
customQuotingError: null,
|
|
2041
2042
|
customerAuthenticationToken: null,
|
|
2042
2043
|
displayBaseCurrency: false,
|
package/dist/esm/index.js
CHANGED
|
@@ -131,7 +131,7 @@ const getZonosQaUrl = () => {
|
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
133
133
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
134
|
-
const cdnUrl = "https://v1.3.
|
|
134
|
+
const cdnUrl = "https://v1.3.265.js.zonos.com";
|
|
135
135
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
136
136
|
if (!qaUrl &&
|
|
137
137
|
(cdnUrl.includes('test.') ||
|
|
@@ -379,10 +379,10 @@ const zonosLoadUrl = (() => {
|
|
|
379
379
|
return null;
|
|
380
380
|
})();
|
|
381
381
|
const startLoadTime = Date.now();
|
|
382
|
-
const ZONOS_URL = "https://v1.3.
|
|
383
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
384
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
385
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
382
|
+
const ZONOS_URL = "https://v1.3.265.js.zonos.com";
|
|
383
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.265";
|
|
384
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.265";
|
|
385
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.265";
|
|
386
386
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
387
387
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
388
388
|
class Zonos {
|
|
@@ -400,7 +400,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
|
|
|
400
400
|
? new URLSearchParams(window.location.search).get('iframeLogType')
|
|
401
401
|
: null;
|
|
402
402
|
Zonos.isBigCommerce = false;
|
|
403
|
-
Zonos.releaseDate = "
|
|
403
|
+
Zonos.releaseDate = "1779136884210";
|
|
404
404
|
Zonos.isLegacyCheckout = false;
|
|
405
405
|
Zonos.googleAnalyticId = null;
|
|
406
406
|
Zonos.googleAnalyticReady = false;
|
|
@@ -425,7 +425,7 @@ Zonos.isNpm = true;
|
|
|
425
425
|
Zonos.zonosQaUrl = null;
|
|
426
426
|
Zonos.zonosQaUrlApi = null;
|
|
427
427
|
Zonos.trackEventLogs = [];
|
|
428
|
-
Zonos.version = `v${"1.3.
|
|
428
|
+
Zonos.version = `v${"1.3.265"}`;
|
|
429
429
|
Zonos.modeAlerted = false;
|
|
430
430
|
Zonos.cartData = null;
|
|
431
431
|
Zonos.paypal = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-9662b071.js';
|
|
2
|
-
import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-
|
|
3
|
-
import { s as storageStore } from './localization-
|
|
2
|
+
import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-0625a766.js';
|
|
3
|
+
import { s as storageStore } from './localization-ee06df70.js';
|
|
4
4
|
import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-a844cac1.js';
|
|
5
5
|
import { b as allLogs } from './VarianceTest-572cecf5.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as createStore, z as zonosStore } from './zonosStore-9662b071.js';
|
|
2
|
-
import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-
|
|
3
|
-
import { s as storageStore } from './localization-
|
|
2
|
+
import { b as stripeStore, G as stripeStoreBuildAddressForPartyCreate, d as cartStore, H as cartStoreUpdateSelectedShippingOption } from './cart-0625a766.js';
|
|
3
|
+
import { s as storageStore } from './localization-ee06df70.js';
|
|
4
4
|
import { h as handleFetch, s as sendErrorLog, l as logError } from './handleFetch-a844cac1.js';
|
|
5
5
|
import { b as allLogs } from './VarianceTest-572cecf5.js';
|
|
6
6
|
|