@zonos/elements 1.3.18-alpha.0 → 1.3.18-alpha.2
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-d25723e7.js → cart-941a31dd.js} +562 -12
- package/dist/cjs/{getBorderRadius-44b3eca1.js → getBorderRadius-bcb309a8.js} +1 -1
- package/dist/cjs/{index-654a6001.js → index-b071017b.js} +4 -1
- package/dist/cjs/{isDarkColor-01f45d3f.js → isDarkColor-b0393089.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{submitGtag-484eaf9d.js → submitGtag-9210b4fe.js} +2 -2
- package/dist/cjs/zonos-address_8.cjs.entry.js +22 -11
- package/dist/cjs/zonos-badge_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
- package/dist/cjs/zonos-button_3.cjs.entry.js +22 -11
- package/dist/cjs/zonos-card_2.cjs.entry.js +7 -7
- package/dist/cjs/{zonos-cart-items_9.cjs.entry.js → zonos-cart-items_11.cjs.entry.js} +224 -14
- package/dist/cjs/zonos-checkout.cjs.entry.js +36 -10
- package/dist/cjs/zonos-component.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +11 -11
- package/dist/cjs/zonos-elements.cjs.js +2 -2
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +8 -8
- package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
- package/dist/cjs/zonos-input.cjs.entry.js +7 -7
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +4 -4
- package/dist/cjs/zonos-notification.cjs.entry.js +2 -2
- package/dist/cjs/zonos-payment.cjs.entry.js +6 -6
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/{zonosStore-d8bb0bda.js → zonosStore-7c6205ca.js} +2 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +2 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/assets/ChevronUpIcon.svg +23 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/assets/empty-item.jpeg +0 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.css +105 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +101 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +6 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +43 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +18 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +3 -2
- package/dist/collection/components/common/zonos-button/zonos-button.css +12 -0
- package/dist/collection/components/common/zonos-button/zonos-button.js +43 -8
- package/dist/collection/components/common/zonos-confirm-dialog/assets/ExclamationMarkDuotoneIcon.svg +4 -0
- package/dist/collection/components/common/zonos-confirm-dialog/assets/HelpDuotoneIcon.svg +4 -0
- package/dist/collection/components/common/zonos-confirm-dialog/assets/WarningDuotoneIcon.svg +4 -0
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.css +125 -0
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +322 -0
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +1 -4
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +38 -4
- 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-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.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/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +3 -3
- package/dist/collection/components/main/zonos-controller.js +3 -3
- package/dist/collection/components/store/checkout/cart.js +55 -5
- package/dist/collection/components/store/checkout/stripe.js +6 -2
- package/dist/collection/components/store/hello/localization.js +12 -2
- package/dist/collection/components/store/translationStore/strings.arabic.js +24 -0
- package/dist/collection/components/store/translationStore/strings.base.js +24 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +24 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +24 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +24 -0
- package/dist/collection/components/store/translationStore/strings.french.js +24 -0
- package/dist/collection/components/store/translationStore/strings.german.js +24 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +24 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +24 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +24 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +24 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +24 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +24 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +24 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +24 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +24 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +24 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +24 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +24 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +24 -0
- package/dist/collection/components/store/zonosStore.js +1 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +1 -1
- package/dist/collection/components/utils/hello/currencyConversion/currencyDisplay.js +6 -1
- package/dist/collection/scripts/zonosBase.js +2 -1
- package/dist/collection/types/checkout/RestrictProduct.js +1 -0
- package/dist/collection/types/generated/graphql.customer.types.js +40 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +1 -0
- package/dist/components/stripe.js +79 -10
- package/dist/components/submitGtag.js +1 -1
- package/dist/components/trackConversionEvent.js +1 -1
- package/dist/components/translationStore.js +480 -0
- package/dist/components/zonos-address2.js +1 -1
- package/dist/components/zonos-button2.js +20 -8
- package/dist/components/zonos-cart-items2.js +2 -1
- package/dist/components/zonos-cart-restricted-items.d.ts +11 -0
- package/dist/components/zonos-cart-restricted-items.js +6 -0
- package/dist/components/zonos-cart-restricted-items2.js +135 -0
- package/dist/components/zonos-cart-subtotal2.js +6 -3
- package/dist/components/zonos-checkout-finish2.js +1 -1
- package/dist/components/zonos-checkout-payment2.js +1 -1
- package/dist/components/zonos-checkout.js +77 -38
- package/dist/components/zonos-component.js +1 -1
- package/dist/components/zonos-confirm-dialog.d.ts +11 -0
- package/dist/components/zonos-confirm-dialog.js +6 -0
- package/dist/components/zonos-confirm-dialog2.js +161 -0
- package/dist/components/zonos-controller.js +2 -2
- package/dist/components/zonos-country-select2.js +3 -3
- package/dist/components/zonos-custom-message2.js +2 -2
- package/dist/components/zonos-customer-info2.js +19 -3
- package/dist/components/zonos-dialog2.js +17 -5
- package/dist/components/zonos-hello-dialog-footer2.js +2 -2
- package/dist/components/zonos-hello-dialog2.js +4 -4
- package/dist/components/zonos-hello.js +1 -1
- package/dist/components/zonos-input2.js +4 -4
- package/dist/components/zonos-language-select2.js +3 -3
- package/dist/components/zonos-link-authentication2.js +1 -1
- package/dist/components/zonos-logo.js +2 -2
- package/dist/components/zonos-payment2.js +1 -1
- package/dist/components/zonos-review2.js +3 -2
- package/dist/components/zonos-select-dialog-header2.js +2 -2
- package/dist/components/zonos-shipping2.js +1 -1
- package/dist/components/zonos-tooltip2.js +2 -2
- package/dist/components/zonos-v-stack2.js +2 -2
- package/dist/components/zonosStore.js +1 -0
- package/dist/esm/{cart-02f5c2ea.js → cart-cc593c2b.js} +562 -13
- package/dist/esm/{getBorderRadius-567f1786.js → getBorderRadius-d244b4b1.js} +1 -1
- package/dist/esm/{index-e063389c.js → index-3b46f3c3.js} +4 -1
- package/dist/esm/{isDarkColor-7f62035a.js → isDarkColor-39a36e82.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{submitGtag-ba38e1ac.js → submitGtag-e50f903f.js} +2 -2
- package/dist/esm/zonos-address_8.entry.js +22 -11
- package/dist/esm/zonos-badge_2.entry.js +4 -4
- package/dist/esm/zonos-banner.entry.js +2 -2
- package/dist/esm/zonos-button_3.entry.js +22 -11
- package/dist/esm/zonos-card_2.entry.js +7 -7
- package/dist/esm/{zonos-cart-items_9.entry.js → zonos-cart-items_11.entry.js} +223 -15
- package/dist/esm/zonos-checkout.entry.js +36 -10
- package/dist/esm/zonos-component.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +6 -6
- package/dist/esm/zonos-country-flag.entry.js +5 -5
- package/dist/esm/zonos-country-select_3.entry.js +11 -11
- package/dist/esm/zonos-elements.js +3 -3
- package/dist/esm/zonos-hello-dialog.entry.js +8 -8
- package/dist/esm/zonos-hello.entry.js +5 -5
- package/dist/esm/zonos-input.entry.js +7 -7
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +4 -4
- package/dist/esm/zonos-notification.entry.js +2 -2
- package/dist/esm/zonos-payment.entry.js +6 -6
- package/dist/esm/zonos-select-dialog-header_2.entry.js +6 -6
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/{zonosStore-33ff08ff.js → zonosStore-32e33a45.js} +2 -1
- package/dist/esm-es5/cart-cc593c2b.js +1 -0
- package/dist/esm-es5/{getBorderRadius-567f1786.js → getBorderRadius-d244b4b1.js} +1 -1
- package/dist/esm-es5/{index-e063389c.js → index-3b46f3c3.js} +1 -1
- package/dist/esm-es5/{isDarkColor-7f62035a.js → isDarkColor-39a36e82.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{submitGtag-ba38e1ac.js → submitGtag-e50f903f.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_11.entry.js +1 -0
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.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-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-33ff08ff.js → zonosStore-32e33a45.js} +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.d.ts +14 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +11 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +2 -0
- package/dist/types/components/common/zonos-button/zonos-button.d.ts +7 -1
- package/dist/types/components/common/zonos-confirm-dialog/zonos-confirm-dialog.d.ts +60 -0
- package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +6 -1
- package/dist/types/components/store/checkout/cart.d.ts +38 -4
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +24 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +24 -0
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/store/zonosStore.d.ts +4 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components.d.ts +163 -5
- package/dist/types/scripts/zonosBase.d.ts +21 -2
- package/dist/types/types/checkout/CheckoutConfig.d.ts +7 -0
- package/dist/types/types/checkout/RestrictProduct.d.ts +7 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +54 -0
- package/dist/types/types/generated/graphql.customer.types.ts +66 -1
- package/dist/types/types/generated/graphql.frontend.types.d.ts +2 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +2 -1
- package/dist/zonos-elements/assets/ExclamationMarkDuotoneIcon.svg +4 -0
- package/dist/zonos-elements/assets/HelpDuotoneIcon.svg +4 -0
- package/dist/zonos-elements/assets/WarningDuotoneIcon.svg +4 -0
- package/dist/zonos-elements/{p-d7acc81c.entry.js → p-020a9b86.entry.js} +1 -1
- package/dist/zonos-elements/{p-905d842b.entry.js → p-04030a48.entry.js} +1 -1
- package/dist/zonos-elements/{p-fe246229.system.entry.js → p-0d0f9694.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0267a969.entry.js → p-0e892292.entry.js} +1 -1
- package/dist/zonos-elements/{p-57adc7f8.entry.js → p-0fac99e7.entry.js} +1 -1
- package/dist/zonos-elements/p-1795c760.system.entry.js +1 -0
- package/dist/zonos-elements/{p-771fbeb3.system.js → p-1b9442f6.system.js} +1 -1
- package/dist/zonos-elements/{p-1ba4cf64.entry.js → p-24ac1c6f.entry.js} +1 -1
- package/dist/zonos-elements/p-26a60a6e.entry.js +1 -0
- package/dist/zonos-elements/{p-835c8928.entry.js → p-281b8bdf.entry.js} +1 -1
- package/dist/zonos-elements/{p-a889c1bc.entry.js → p-2af19b63.entry.js} +1 -1
- package/dist/zonos-elements/{p-582d8b27.entry.js → p-2ced091f.entry.js} +1 -1
- package/dist/zonos-elements/{p-909a331c.js → p-2f759d82.js} +1 -1
- package/dist/zonos-elements/p-32744531.entry.js +1 -0
- package/dist/zonos-elements/{p-532995a4.system.entry.js → p-35ac375a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9da0562e.system.entry.js → p-3bc88c3c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-36a461a6.system.entry.js → p-3e26d7b3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9ec93319.entry.js → p-498a0e18.entry.js} +1 -1
- package/dist/zonos-elements/{p-572a4de2.system.entry.js → p-4caaaaeb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-79f3c4f5.system.js → p-58e730b6.system.js} +1 -1
- package/dist/zonos-elements/{p-e7b4b756.entry.js → p-597b75f3.entry.js} +1 -1
- package/dist/zonos-elements/{p-6ece23b9.entry.js → p-5e783394.entry.js} +1 -1
- package/dist/zonos-elements/{p-87badea9.system.js → p-62ecfbcc.system.js} +1 -1
- package/dist/zonos-elements/{p-f99eb5e7.entry.js → p-6366e7e3.entry.js} +1 -1
- package/dist/zonos-elements/p-693b9985.js +1 -0
- package/dist/zonos-elements/{p-bf32179a.system.entry.js → p-6eda6199.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6dec476d.system.entry.js → p-7c8ee4b9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-305f27c7.entry.js → p-80442f16.entry.js} +1 -1
- package/dist/zonos-elements/{p-cf0f8e32.entry.js → p-80ea85b8.entry.js} +1 -1
- package/dist/zonos-elements/{p-679877b1.system.entry.js → p-8171d013.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-83cc2936.js → p-8c0b4a61.js} +1 -1
- package/dist/zonos-elements/{p-4dca5484.system.entry.js → p-8cd6633a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8da16d53.system.js +1 -0
- package/dist/zonos-elements/p-96b8c9ba.system.entry.js +1 -0
- package/dist/zonos-elements/{p-f124e659.system.entry.js → p-98a0b694.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fd49d864.entry.js → p-9aab3ad7.entry.js} +1 -1
- package/dist/zonos-elements/{p-ad088d46.system.entry.js → p-9e8d38f7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-83fecb2a.entry.js → p-9e9c318b.entry.js} +1 -1
- package/dist/zonos-elements/{p-e108e5ed.system.entry.js → p-a47382ae.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-47e00966.system.entry.js → p-b98cdf39.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3638e2ed.entry.js → p-bd9b2165.entry.js} +1 -1
- package/dist/zonos-elements/{p-ff403840.entry.js → p-c20e5430.entry.js} +1 -1
- package/dist/zonos-elements/{p-13ddaf31.js → p-ce347974.js} +1 -1
- package/dist/zonos-elements/{p-f71489e5.system.entry.js → p-d0bc8902.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-17e265c3.system.entry.js → p-d7a939df.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d7b8c1c1.system.entry.js +1 -0
- package/dist/zonos-elements/{p-163ff5b5.system.js → p-d99232c5.system.js} +1 -1
- package/dist/zonos-elements/p-dd0fd351.entry.js +1 -0
- package/dist/zonos-elements/p-e015cb0e.js +1 -0
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -0
- package/dist/zonos-elements/{p-b98bdbcc.system.entry.js → p-e13bfbda.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-239cc943.system.entry.js → p-e1fbd05d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0265da6f.js → p-e553dd19.js} +1 -1
- package/dist/zonos-elements/p-e6fa0ebc.system.js +1 -0
- package/dist/zonos-elements/{p-5e33aab7.system.entry.js → p-f6546bf4.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +13 -13
- package/dist/esm-es5/cart-02f5c2ea.js +0 -1
- package/dist/esm-es5/zonos-cart-items_9.entry.js +0 -1
- package/dist/zonos-elements/p-154aaf95.system.js +0 -1
- package/dist/zonos-elements/p-168e5b5f.system.js +0 -1
- package/dist/zonos-elements/p-1b8082dd.entry.js +0 -1
- package/dist/zonos-elements/p-246133d3.entry.js +0 -1
- package/dist/zonos-elements/p-54004793.system.entry.js +0 -1
- package/dist/zonos-elements/p-54a32fd7.entry.js +0 -1
- package/dist/zonos-elements/p-5d13795a.system.entry.js +0 -1
- package/dist/zonos-elements/p-981bf71a.js +0 -1
- package/dist/zonos-elements/p-e0e66004.system.js +0 -1
- package/dist/zonos-elements/p-ed7d251d.system.entry.js +0 -1
- package/dist/zonos-elements/p-f1962041.js +0 -1
|
@@ -426,7 +426,12 @@ const currencyDisplay = () => {
|
|
|
426
426
|
}
|
|
427
427
|
const { currencyElementSelector } = zonosStore.helloSettings;
|
|
428
428
|
if (zonosStore.currencyConverter) {
|
|
429
|
-
zonosStore.currencyConverter(
|
|
429
|
+
zonosStore.currencyConverter({
|
|
430
|
+
convert: currencyConvert,
|
|
431
|
+
convertAndFormat: currencyConvertAndFormat,
|
|
432
|
+
format: currencyFormat,
|
|
433
|
+
selector: currencyElementSelector,
|
|
434
|
+
});
|
|
430
435
|
}
|
|
431
436
|
else {
|
|
432
437
|
defaultCurrencyConverter();
|
|
@@ -528,7 +533,7 @@ const getOverrideLocale = () => {
|
|
|
528
533
|
return zonosLocale;
|
|
529
534
|
};
|
|
530
535
|
const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
|
|
531
|
-
var _a;
|
|
536
|
+
var _a, _b;
|
|
532
537
|
log('update selected country code');
|
|
533
538
|
localizationStore.selectedCountryCode = newSelectedCountryCode;
|
|
534
539
|
const { selectedCountryCode, shippingZoneCountries } = localizationStore;
|
|
@@ -554,6 +559,11 @@ const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
|
|
|
554
559
|
setZCountryUrlParam(selectedCountryCode);
|
|
555
560
|
(_a = document
|
|
556
561
|
.querySelector('zonos-hello')) === null || _a === void 0 ? void 0 : _a.setAttribute('z-country', selectedCountryCode);
|
|
562
|
+
// Trigger callback onCountryChange
|
|
563
|
+
(_b = zonosStore.onCountryChange) === null || _b === void 0 ? void 0 : _b.call(zonosStore, {
|
|
564
|
+
countryCode: selectedCountryCode,
|
|
565
|
+
currencyCode,
|
|
566
|
+
});
|
|
557
567
|
};
|
|
558
568
|
const initLocalizationStore = async () => {
|
|
559
569
|
// all countries from countries.json, shipping zone and localization
|
|
@@ -572,7 +582,12 @@ const initLocalizationStore = async () => {
|
|
|
572
582
|
const overrideLocale = getOverrideLocale();
|
|
573
583
|
localizationStore.selectedLocale = overrideLocale || locale || 'en';
|
|
574
584
|
translationStoreUpdateLanguage(localizationStore.selectedLocale);
|
|
575
|
-
const devSites = [
|
|
585
|
+
const devSites = [
|
|
586
|
+
'dev.storybook.elements',
|
|
587
|
+
'dev.elements',
|
|
588
|
+
'dev.demo.elements',
|
|
589
|
+
'dev.dashboard',
|
|
590
|
+
];
|
|
576
591
|
// If the country code is not set, set it to the US for development (vercel can't get geo country in dev)
|
|
577
592
|
if (!localizationStore.selectedCountryCode &&
|
|
578
593
|
devSites.some(site => window.location.origin.includes(site))) {
|
|
@@ -637,6 +652,7 @@ const { onChange: onChange$1, reset: reset$1, state: cartStore, } = createStore(
|
|
|
637
652
|
isSelectedShippingGuarantee: false,
|
|
638
653
|
items: [],
|
|
639
654
|
landedCostData: null,
|
|
655
|
+
restrictedItems: [],
|
|
640
656
|
selectedLandedCost: null,
|
|
641
657
|
selectedShippingOption: null,
|
|
642
658
|
selectedShippingOptionExpectedDate: '',
|
|
@@ -693,6 +709,39 @@ const cartStoreGetShippingTransitInfo = (item) => {
|
|
|
693
709
|
minTransit,
|
|
694
710
|
};
|
|
695
711
|
};
|
|
712
|
+
const getMatchItem = ({ item1, item2, }) => {
|
|
713
|
+
if (!item1 || !item2) {
|
|
714
|
+
return false;
|
|
715
|
+
}
|
|
716
|
+
return ((item2.sku && item1.sku && item1.sku === item2.sku) ||
|
|
717
|
+
(item2.description &&
|
|
718
|
+
item1.description &&
|
|
719
|
+
item1.description === item2.description) ||
|
|
720
|
+
(item1.name && item2.name && item1.name === item2.name));
|
|
721
|
+
};
|
|
722
|
+
/**
|
|
723
|
+
* Check and set restricted items in cart
|
|
724
|
+
*/
|
|
725
|
+
const cartStoreCheckItemRestrictions = (itemsWorkflow) => {
|
|
726
|
+
log('Checking item restrictions');
|
|
727
|
+
const mappedRestrictedItems = itemsWorkflow
|
|
728
|
+
.map(item => {
|
|
729
|
+
if (!item.restriction) {
|
|
730
|
+
return null;
|
|
731
|
+
}
|
|
732
|
+
const { restriction } = item;
|
|
733
|
+
const matchedItem = cartStore.items.find(x => getMatchItem({ item1: x, item2: item }));
|
|
734
|
+
return Object.assign(Object.assign({ matchedItem }, item), { restriction });
|
|
735
|
+
})
|
|
736
|
+
.filter(Boolean);
|
|
737
|
+
cartStore.restrictedItems = mappedRestrictedItems;
|
|
738
|
+
// remove items that are restricted from cart
|
|
739
|
+
cartStore.items = cartStore.items.map(item => (Object.assign(Object.assign({}, item), { isRestricted: !!mappedRestrictedItems.find(x => getMatchItem({ item1: x, item2: item })) })));
|
|
740
|
+
return {
|
|
741
|
+
cartItems: cartStore.items,
|
|
742
|
+
restrictedItems: mappedRestrictedItems,
|
|
743
|
+
};
|
|
744
|
+
};
|
|
696
745
|
const cartStoreReset = () => {
|
|
697
746
|
sessionStorage.removeItem('zonos--checkout-session-id');
|
|
698
747
|
// reset cart store
|
|
@@ -715,6 +764,16 @@ const cartStoreApplySubtotals = (subtotals) => {
|
|
|
715
764
|
cartStore.total = subtotals.total;
|
|
716
765
|
cartStore.currency = subtotals.presentmentCurrencyCode;
|
|
717
766
|
};
|
|
767
|
+
/**
|
|
768
|
+
* Detect if there are any items in cart that are not restricted and have positive amount, exclude negative amount items
|
|
769
|
+
*/
|
|
770
|
+
const cartStoreHasOneEligibleItem = () => {
|
|
771
|
+
// filter all items with positive amount
|
|
772
|
+
const checkItems = cartStore.items.filter(item => item.amount > 0);
|
|
773
|
+
// only check restricted status for items with positive amount
|
|
774
|
+
// if there is no item restricted found => all items are restricted
|
|
775
|
+
return !!checkItems.find(item => !item.isRestricted);
|
|
776
|
+
};
|
|
718
777
|
const cartStoreReCalculateTotal = async ({ currency, itemsAmount, landedCostId, }) => {
|
|
719
778
|
if (landedCostId && cartStore.selectedLandedCost) {
|
|
720
779
|
// update cart total right away if we have landed cost id to avoid order total flickering
|
|
@@ -795,11 +854,17 @@ onChange$1('checkoutSessionId', () => {
|
|
|
795
854
|
}
|
|
796
855
|
sessionStorage.setItem('zonos--checkout-session-id', cartStore.checkoutSessionId);
|
|
797
856
|
});
|
|
798
|
-
const
|
|
857
|
+
const getCartItemToUse = (items) => items.map(item => (Object.assign(Object.assign({}, item), { isRestricted: false })));
|
|
858
|
+
const cartStoreResetCartItems = () => {
|
|
859
|
+
// mark all items as not restricted
|
|
860
|
+
cartStore.items = cartStore.items.map(item => (Object.assign(Object.assign({}, item), { isRestricted: false })));
|
|
861
|
+
cartStore.restrictedItems = [];
|
|
862
|
+
};
|
|
863
|
+
const cartStoreUpdateItems = async (cartItems) => {
|
|
799
864
|
var _a;
|
|
800
|
-
cartStore.items =
|
|
801
|
-
const currency = (_a =
|
|
802
|
-
const total =
|
|
865
|
+
cartStore.items = getCartItemToUse(cartItems);
|
|
866
|
+
const currency = (_a = cartItems.find(Boolean)) === null || _a === void 0 ? void 0 : _a.currencyCode;
|
|
867
|
+
const total = cartItems.reduce((amt, item) => {
|
|
803
868
|
return amt + item.amount * item.quantity;
|
|
804
869
|
}, 0);
|
|
805
870
|
if (!currency || !total) {
|
|
@@ -882,7 +947,7 @@ const prepCalculateLandedCost = () => {
|
|
|
882
947
|
lastName: stripeAddressData.value.lastName || '',
|
|
883
948
|
phone: stripeAddressData.value.phone || '',
|
|
884
949
|
},
|
|
885
|
-
items: cartStore.items
|
|
950
|
+
items: cartStore.items,
|
|
886
951
|
shippingAddress: {
|
|
887
952
|
addressLine1: stripeAddressData.value.address.line1,
|
|
888
953
|
addressLine2: stripeAddressData.value.address.line2 || '',
|
|
@@ -1292,7 +1357,9 @@ const stripeStorePrefetchLandedCost = async () => {
|
|
|
1292
1357
|
try {
|
|
1293
1358
|
const abortController = new AbortController();
|
|
1294
1359
|
stripeStore.fetchingLandedCostAbordController = abortController;
|
|
1295
|
-
|
|
1360
|
+
// Reset cart items to non-restricted state and restricted item list
|
|
1361
|
+
cartStoreResetCartItems();
|
|
1362
|
+
const { checkoutSessionWorkflow, itemCreateWorkflow, landedCostCalculateWorkflow, shipmentRatingCalculateWorkflow, } = await calculateLandedCost(abortController);
|
|
1296
1363
|
// reset abort controller after we are done
|
|
1297
1364
|
stripeStore.fetchingLandedCostAbordController = null;
|
|
1298
1365
|
// update cart store with landed cost info
|
|
@@ -1311,6 +1378,8 @@ const stripeStorePrefetchLandedCost = async () => {
|
|
|
1311
1378
|
const subtotals = !!firstLandedCostData
|
|
1312
1379
|
? firstLandedCostData.subtotals
|
|
1313
1380
|
: null;
|
|
1381
|
+
// check and update cart items with restrictions
|
|
1382
|
+
cartStoreCheckItemRestrictions(itemCreateWorkflow);
|
|
1314
1383
|
if (subtotals) {
|
|
1315
1384
|
// prefetch landed cost will not update shipping and taxes since we haven't selected shipping method yet
|
|
1316
1385
|
cartStoreApplySubtotals({
|
|
@@ -1619,4 +1688,4 @@ onChange('clientSecret', clientSecret => {
|
|
|
1619
1688
|
}
|
|
1620
1689
|
});
|
|
1621
1690
|
|
|
1622
|
-
export {
|
|
1691
|
+
export { cartStoreGetShippingTransitInfo as A, isValidSelector as B, initLocalizationStore as C, getZCountryUrlParam as D, setZCountryUrlParam as E, currencyDisplay as F, currencyConvertAndFormat as G, currencyConvert as H, currencyFormat as I, localizationStore as a, cartStoreHasOneEligibleItem as b, cartStore as c, log as d, stripeStoreGetDomesticShippingSession as e, localizationStoreUpdateSelectedCountryCode as f, stripeStoreCleanupDomesticShippingSession as g, stripeStoreSaveDomesticShippingSession as h, initStripeElements as i, cartStoreUpdateItems as j, cartStoreReset as k, logError as l, cartStoreResetTabItems as m, stripeStoreInitCheckoutSession as n, cartStoreUpdateToErrorState as o, stripeStorePrefetchLandedCost as p, cartStoreNextStep as q, stripeStoreConfirmPayment as r, stripeStore as s, stripeStoreReset as t, localizationStoreOnUpdate as u, handleFetch as v, stripeStoreRetrievePayment as w, stripeStoreTranslateAddressToLatin as x, localizationStoreUpdateSelectedLocale as y, cartStoreUpdateSelectedShippingOption as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { v as handleFetch, c as cartStore, a as localizationStore } from './stripe.js';
|
|
2
2
|
import { z as zonosStore } from './zonosStore.js';
|
|
3
3
|
|
|
4
4
|
const trackConversionEvent = async (eventName, metadata) => {
|