@zonos/elements 1.1.1 → 1.1.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-108bc407.js → cart-a969ee0b.js} +8 -8
- package/dist/cjs/{cart-108bc407.js.map → cart-a969ee0b.js.map} +1 -1
- package/dist/cjs/{getBorderRadius-2904800c.js → getBorderRadius-ae52cae1.js} +2 -2
- package/dist/cjs/{getBorderRadius-2904800c.js.map → getBorderRadius-ae52cae1.js.map} +1 -1
- package/dist/cjs/{isDarkColor-a86b8a05.js → isDarkColor-e1a7bf45.js} +2 -2
- package/dist/cjs/{isDarkColor-a86b8a05.js.map → isDarkColor-e1a7bf45.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-f6a1b679.js → localization-d510574c.js} +200 -12
- package/dist/cjs/localization-d510574c.js.map +1 -0
- package/dist/cjs/{submitGtag-b1b96579.js → submitGtag-4de4430f.js} +3 -3
- package/dist/cjs/{submitGtag-b1b96579.js.map → submitGtag-4de4430f.js.map} +1 -1
- package/dist/cjs/zonos-address_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-banner.cjs.entry.js +68 -0
- package/dist/cjs/zonos-banner.cjs.entry.js.map +1 -0
- package/dist/cjs/zonos-button_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +12 -12
- package/dist/cjs/zonos-checkout.cjs.entry.js +9 -9
- package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
- package/dist/cjs/zonos-controller.cjs.entry.js.map +1 -1
- package/dist/cjs/zonos-country-flag_4.cjs.entry.js +6 -6
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +12 -8
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js.map +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +237 -22
- package/dist/cjs/zonos-hello.cjs.entry.js.map +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +60 -0
- package/dist/cjs/zonos-payment.cjs.entry.js.map +1 -0
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/{zonosStore-960e5542.js → zonosStore-d9cdaec6.js} +6 -22
- package/dist/cjs/zonosStore-d9cdaec6.js.map +1 -0
- package/dist/collection/components/checkout/zonos-checkout/assets/LeftArrow.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/assets/MessageIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/assets/RemoveIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/assets/InfoIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/assets/RemoveIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/assets/SuccessIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/assets/ChevronDownIcon.svg +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/assets/ChevronUpIcon.svg +1 -1
- package/dist/collection/components/common/zonos-banner/zonos-banner.css +6 -1
- package/dist/collection/components/common/zonos-banner/zonos-banner.js +1 -1
- package/dist/collection/components/common/zonos-banner/zonos-banner.js.map +1 -1
- package/dist/collection/components/common/zonos-country-select/assets/arrowLeftBlue.svg +1 -1
- package/dist/collection/components/common/zonos-dialog/assets/removeIcon.svg +1 -1
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +1 -1
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js.map +1 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.css +20 -2
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +135 -20
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js.map +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/assets/bagIcon.svg +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/assets/messageIcon.svg +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/assets/moneyIcon.svg +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/assets/removeIcon.svg +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/chevronDownIcon.svg +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/zonosIcon.svg +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.css +12 -4
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +30 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js.map +1 -1
- package/dist/collection/components/store/hello/localization.js +2 -4
- package/dist/collection/components/store/hello/localization.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
- package/dist/collection/components/store/translationStore/strings.arabic.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.base.js +9 -0
- package/dist/collection/components/store/translationStore/strings.base.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.danish.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.french.js +9 -0
- package/dist/collection/components/store/translationStore/strings.french.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.german.js +9 -0
- package/dist/collection/components/store/translationStore/strings.german.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.italian.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
- package/dist/collection/components/store/translationStore/strings.korean.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.polish.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.russian.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js.map +1 -1
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js.map +1 -1
- package/dist/collection/components/store/zonosStore.js +5 -3
- package/dist/collection/components/store/zonosStore.js.map +1 -1
- package/dist/collection/components/utils/api/checkItemRestrictions.js +18 -0
- package/dist/collection/components/utils/api/checkItemRestrictions.js.map +1 -0
- package/dist/collection/components/utils/hello/detectItemRestrictions.js +29 -0
- package/dist/collection/components/utils/hello/detectItemRestrictions.js.map +1 -0
- package/dist/collection/components/utils/hello/getCurrentHelloLocalePage.js +8 -7
- package/dist/collection/components/utils/hello/getCurrentHelloLocalePage.js.map +1 -1
- package/dist/collection/components/utils/hello/getProductsOnPage.js +49 -0
- package/dist/collection/components/utils/hello/getProductsOnPage.js.map +1 -0
- package/dist/collection/components/utils/hello/setZonosCountryUrlParam.js +10 -0
- package/dist/collection/components/utils/hello/setZonosCountryUrlParam.js.map +1 -0
- package/dist/collection/environment.js +34 -7
- package/dist/collection/environment.js.map +1 -1
- package/dist/collection/scripts/loadStripe.js +3 -3
- package/dist/collection/scripts/loadStripe.js.map +1 -1
- package/dist/collection/scripts/stripe.js +3 -3
- package/dist/collection/scripts/stripe.js.map +1 -1
- package/dist/collection/scripts/zonos.js +83 -30
- package/dist/collection/scripts/zonos.js.map +1 -1
- package/dist/collection/types/generated/graphql.customer.types.js +34 -0
- package/dist/collection/types/generated/graphql.customer.types.js.map +1 -1
- package/dist/collection/types/hello/HelloConfig.js.map +1 -1
- package/dist/collection/types/hello/Product.js +2 -0
- package/dist/collection/types/hello/Product.js.map +1 -0
- package/dist/collection/types/hello/RestrictedItem.js +2 -0
- package/dist/collection/types/hello/RestrictedItem.js.map +1 -0
- package/dist/components/localization.js +198 -11
- package/dist/components/localization.js.map +1 -1
- package/dist/components/stripe.js +3 -3
- package/dist/components/stripe.js.map +1 -1
- package/dist/components/zonos-banner2.js +2 -2
- package/dist/components/zonos-banner2.js.map +1 -1
- package/dist/components/zonos-cart-subtotal2.js +1 -1
- package/dist/components/zonos-checkout-finish2.js +2 -2
- package/dist/components/zonos-checkout.js +3 -3
- package/dist/components/zonos-controller.js +1 -1
- package/dist/components/zonos-controller.js.map +1 -1
- package/dist/components/zonos-country-select2.js +1 -1
- package/dist/components/zonos-dialog2.js +1 -1
- package/dist/components/zonos-hello-dialog-footer2.js +2 -2
- package/dist/components/zonos-hello-dialog2.js +18 -7
- package/dist/components/zonos-hello-dialog2.js.map +1 -1
- package/dist/components/zonos-hello.js +247 -22
- package/dist/components/zonos-hello.js.map +1 -1
- package/dist/components/zonos-review2.js +2 -2
- package/dist/components/zonos-shipping-rich-radio2.js +1 -1
- package/dist/components/zonos-shipping-rich-radio2.js.map +1 -1
- package/dist/components/zonosStore.js +5 -21
- package/dist/components/zonosStore.js.map +1 -1
- package/dist/{zonos-elements/cart-2f83e048.js → esm/cart-d00e1acb.js} +8 -8
- package/dist/esm/{cart-2f83e048.js.map → cart-d00e1acb.js.map} +1 -1
- package/dist/{zonos-elements/getBorderRadius-82fbaf25.js → esm/getBorderRadius-e8ad5967.js} +2 -2
- package/dist/esm/{getBorderRadius-82fbaf25.js.map → getBorderRadius-e8ad5967.js.map} +1 -1
- package/dist/{zonos-elements/isDarkColor-b21326ae.js → esm/isDarkColor-3bb345f4.js} +2 -2
- package/dist/{zonos-elements/isDarkColor-b21326ae.js.map → esm/isDarkColor-3bb345f4.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/{zonos-elements/localization-4a424f49.js → esm/localization-1d92a557.js} +200 -13
- package/dist/esm/localization-1d92a557.js.map +1 -0
- package/dist/{zonos-elements/submitGtag-fbdb454b.js → esm/submitGtag-85914088.js} +3 -3
- package/dist/esm/{submitGtag-fbdb454b.js.map → submitGtag-85914088.js.map} +1 -1
- package/dist/esm/zonos-address_2.entry.js +5 -5
- package/dist/esm/zonos-banner.entry.js +64 -0
- package/dist/esm/zonos-banner.entry.js.map +1 -0
- package/dist/esm/zonos-button_2.entry.js +3 -3
- package/dist/esm/zonos-cart-items_10.entry.js +12 -12
- package/dist/esm/zonos-checkout.entry.js +9 -9
- package/dist/esm/zonos-controller.entry.js +6 -6
- package/dist/esm/zonos-controller.entry.js.map +1 -1
- package/dist/esm/zonos-country-flag_4.entry.js +6 -6
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +12 -8
- package/dist/esm/zonos-hello-dialog.entry.js.map +1 -1
- package/dist/esm/zonos-hello.entry.js +237 -22
- package/dist/esm/zonos-hello.entry.js.map +1 -1
- package/dist/esm/zonos-payment.entry.js +56 -0
- package/dist/esm/zonos-payment.entry.js.map +1 -0
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-shipping-rich-radio.entry.js.map +1 -1
- package/dist/{zonos-elements/zonosStore-13a7b534.js → esm/zonosStore-1c9c7d76.js} +6 -22
- package/dist/esm/zonosStore-1c9c7d76.js.map +1 -0
- package/dist/esm-es5/cart-d00e1acb.js +2 -0
- package/dist/esm-es5/{cart-2f83e048.js.map → cart-d00e1acb.js.map} +1 -1
- package/dist/esm-es5/{getBorderRadius-82fbaf25.js → getBorderRadius-e8ad5967.js} +2 -2
- package/dist/esm-es5/{isDarkColor-b21326ae.js → isDarkColor-3bb345f4.js} +2 -2
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/localization-1d92a557.js +2 -0
- package/dist/esm-es5/localization-1d92a557.js.map +1 -0
- package/dist/esm-es5/{submitGtag-fbdb454b.js → submitGtag-85914088.js} +2 -2
- package/dist/esm-es5/zonos-address_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +2 -0
- package/dist/esm-es5/zonos-banner.entry.js.map +1 -0
- package/dist/esm-es5/zonos-button_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js.map +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js.map +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js.map +1 -1
- package/dist/esm-es5/zonos-country-flag_4.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag_4.entry.js.map +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-elements.js.map +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js.map +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js.map +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +2 -0
- package/dist/esm-es5/zonos-payment.entry.js.map +1 -0
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js.map +1 -1
- package/dist/esm-es5/zonosStore-1c9c7d76.js +2 -0
- package/dist/esm-es5/zonosStore-1c9c7d76.js.map +1 -0
- package/dist/scripts/loadStripe.js +6 -6
- package/dist/scripts/loadZonos.js +92 -35
- package/dist/scripts/stripe.js +5 -5
- package/dist/scripts/zonos.js +92 -35
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +24 -1
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
- package/dist/types/components/store/zonosStore.d.ts +1 -1
- package/dist/types/components/utils/api/checkItemRestrictions.d.ts +22 -0
- package/dist/types/components/utils/hello/detectItemRestrictions.d.ts +14 -0
- package/dist/types/components/utils/hello/getCurrentHelloLocalePage.d.ts +2 -1
- package/dist/types/components/utils/hello/getProductsOnPage.d.ts +2 -0
- package/dist/types/components/utils/hello/setZonosCountryUrlParam.d.ts +2 -0
- package/dist/types/components.d.ts +12 -0
- package/dist/types/environment.d.ts +9 -0
- package/dist/types/scripts/loadStripe.d.ts +1 -1
- package/dist/types/scripts/stripe.d.ts +2 -2
- package/dist/types/scripts/zonos.d.ts +2 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +75 -1
- package/dist/types/types/generated/graphql.customer.types.ts +113 -1
- package/dist/types/types/hello/HelloConfig.d.ts +4 -0
- package/dist/types/types/hello/Product.d.ts +5 -0
- package/dist/types/types/hello/RestrictedItem.d.ts +6 -0
- package/dist/zonos-elements/assets/ChevronDownIcon.svg +1 -1
- package/dist/zonos-elements/assets/ChevronUpIcon.svg +1 -1
- package/dist/zonos-elements/assets/InfoIcon.svg +1 -1
- package/dist/zonos-elements/assets/LeftArrow.svg +1 -1
- package/dist/zonos-elements/assets/MessageIcon.svg +1 -1
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/assets/SuccessIcon.svg +1 -1
- package/dist/zonos-elements/assets/bagIcon.svg +1 -1
- package/dist/zonos-elements/assets/messageIcon.svg +1 -1
- package/dist/zonos-elements/assets/moneyIcon.svg +1 -1
- package/dist/zonos-elements/assets/removeIcon.svg +1 -1
- package/dist/zonos-elements/cart-c641ddaf.system.js +2 -0
- package/dist/zonos-elements/{cart-9780fa28.system.js.map → cart-c641ddaf.system.js.map} +1 -1
- package/dist/{esm/cart-2f83e048.js → zonos-elements/cart-d00e1acb.js} +8 -8
- package/dist/zonos-elements/{cart-2f83e048.js.map → cart-d00e1acb.js.map} +1 -1
- package/dist/zonos-elements/{getBorderRadius-4fbe49de.system.js → getBorderRadius-b59c3ada.system.js} +2 -2
- package/dist/{esm/getBorderRadius-82fbaf25.js → zonos-elements/getBorderRadius-e8ad5967.js} +2 -2
- package/dist/zonos-elements/{getBorderRadius-82fbaf25.js.map → getBorderRadius-e8ad5967.js.map} +1 -1
- package/dist/zonos-elements/{isDarkColor-dc2b7c8f.system.js → isDarkColor-231502d4.system.js} +2 -2
- package/dist/{esm/isDarkColor-b21326ae.js → zonos-elements/isDarkColor-3bb345f4.js} +2 -2
- package/dist/{esm/isDarkColor-b21326ae.js.map → zonos-elements/isDarkColor-3bb345f4.js.map} +1 -1
- package/dist/{esm/localization-4a424f49.js → zonos-elements/localization-1d92a557.js} +200 -13
- package/dist/zonos-elements/localization-1d92a557.js.map +1 -0
- package/dist/zonos-elements/localization-a6b6a5a5.system.js +2 -0
- package/dist/zonos-elements/localization-a6b6a5a5.system.js.map +1 -0
- package/dist/zonos-elements/submitGtag-764af8c4.system.js +2 -0
- package/dist/{esm/submitGtag-fbdb454b.js → zonos-elements/submitGtag-85914088.js} +3 -3
- package/dist/zonos-elements/{submitGtag-fbdb454b.js.map → submitGtag-85914088.js.map} +1 -1
- package/dist/zonos-elements/zonos-address_2.entry.js +5 -5
- package/dist/zonos-elements/zonos-address_2.system.entry.js +1 -1
- package/dist/zonos-elements/zonos-banner.entry.js +64 -0
- package/dist/zonos-elements/zonos-banner.entry.js.map +1 -0
- package/dist/zonos-elements/zonos-banner.system.entry.js +2 -0
- package/dist/zonos-elements/zonos-banner.system.entry.js.map +1 -0
- package/dist/zonos-elements/zonos-button_2.entry.js +3 -3
- package/dist/zonos-elements/zonos-button_2.system.entry.js +1 -1
- package/dist/zonos-elements/zonos-cart-items_10.entry.js +12 -12
- package/dist/zonos-elements/zonos-cart-items_10.system.entry.js +1 -1
- package/dist/zonos-elements/zonos-cart-items_10.system.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-checkout.entry.js +9 -9
- package/dist/zonos-elements/zonos-checkout.system.entry.js +1 -1
- package/dist/zonos-elements/zonos-checkout.system.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-controller.entry.js +6 -6
- package/dist/zonos-elements/zonos-controller.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-controller.system.entry.js +1 -1
- package/dist/zonos-elements/zonos-controller.system.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-country-flag_4.entry.js +6 -6
- package/dist/zonos-elements/zonos-country-flag_4.system.entry.js +1 -1
- package/dist/zonos-elements/zonos-country-flag_4.system.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.system.js +1 -1
- package/dist/zonos-elements/zonos-elements.system.js.map +1 -1
- package/dist/zonos-elements/zonos-hello-dialog.entry.js +12 -8
- package/dist/zonos-elements/zonos-hello-dialog.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-hello-dialog.system.entry.js +1 -1
- package/dist/zonos-elements/zonos-hello-dialog.system.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-hello.entry.js +237 -22
- package/dist/zonos-elements/zonos-hello.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-hello.system.entry.js +1 -1
- package/dist/zonos-elements/zonos-hello.system.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-payment.entry.js +56 -0
- package/dist/zonos-elements/zonos-payment.entry.js.map +1 -0
- package/dist/zonos-elements/zonos-payment.system.entry.js +2 -0
- package/dist/zonos-elements/zonos-payment.system.entry.js.map +1 -0
- package/dist/zonos-elements/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/zonos-elements/zonos-shipping-rich-radio.entry.js.map +1 -1
- package/dist/zonos-elements/zonos-shipping-rich-radio.system.entry.js +1 -1
- package/dist/zonos-elements/zonos-shipping-rich-radio.system.entry.js.map +1 -1
- package/dist/{esm/zonosStore-13a7b534.js → zonos-elements/zonosStore-1c9c7d76.js} +6 -22
- package/dist/zonos-elements/zonosStore-1c9c7d76.js.map +1 -0
- package/dist/zonos-elements/zonosStore-e5c545ea.system.js +2 -0
- package/dist/zonos-elements/zonosStore-e5c545ea.system.js.map +1 -0
- package/package.json +1 -1
- package/dist/cjs/localization-f6a1b679.js.map +0 -1
- package/dist/cjs/zonos-banner_2.cjs.entry.js +0 -120
- package/dist/cjs/zonos-banner_2.cjs.entry.js.map +0 -1
- package/dist/cjs/zonosStore-960e5542.js.map +0 -1
- package/dist/esm/localization-4a424f49.js.map +0 -1
- package/dist/esm/zonos-banner_2.entry.js +0 -115
- package/dist/esm/zonos-banner_2.entry.js.map +0 -1
- package/dist/esm/zonosStore-13a7b534.js.map +0 -1
- package/dist/esm-es5/cart-2f83e048.js +0 -2
- package/dist/esm-es5/localization-4a424f49.js +0 -2
- package/dist/esm-es5/localization-4a424f49.js.map +0 -1
- package/dist/esm-es5/zonos-banner_2.entry.js +0 -2
- package/dist/esm-es5/zonos-banner_2.entry.js.map +0 -1
- package/dist/esm-es5/zonosStore-13a7b534.js +0 -2
- package/dist/esm-es5/zonosStore-13a7b534.js.map +0 -1
- package/dist/zonos-elements/cart-9780fa28.system.js +0 -2
- package/dist/zonos-elements/localization-3c43290f.system.js +0 -2
- package/dist/zonos-elements/localization-3c43290f.system.js.map +0 -1
- package/dist/zonos-elements/localization-4a424f49.js.map +0 -1
- package/dist/zonos-elements/submitGtag-23ecdc20.system.js +0 -2
- package/dist/zonos-elements/zonos-banner_2.entry.js +0 -115
- package/dist/zonos-elements/zonos-banner_2.entry.js.map +0 -1
- package/dist/zonos-elements/zonos-banner_2.system.entry.js +0 -2
- package/dist/zonos-elements/zonos-banner_2.system.entry.js.map +0 -1
- package/dist/zonos-elements/zonosStore-13a7b534.js.map +0 -1
- package/dist/zonos-elements/zonosStore-77bcd7c0.system.js +0 -2
- package/dist/zonos-elements/zonosStore-77bcd7c0.system.js.map +0 -1
- /package/dist/esm-es5/{getBorderRadius-82fbaf25.js.map → getBorderRadius-e8ad5967.js.map} +0 -0
- /package/dist/esm-es5/{isDarkColor-b21326ae.js.map → isDarkColor-3bb345f4.js.map} +0 -0
- /package/dist/esm-es5/{submitGtag-fbdb454b.js.map → submitGtag-85914088.js.map} +0 -0
- /package/dist/zonos-elements/{getBorderRadius-4fbe49de.system.js.map → getBorderRadius-b59c3ada.system.js.map} +0 -0
- /package/dist/zonos-elements/{isDarkColor-dc2b7c8f.system.js.map → isDarkColor-231502d4.system.js.map} +0 -0
- /package/dist/zonos-elements/{submitGtag-23ecdc20.system.js.map → submitGtag-764af8c4.system.js.map} +0 -0
|
@@ -2,6 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { f as currencyConvertAndFormat, t as translate, a as localizationStore } from './localization.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore.js';
|
|
4
4
|
import { c as classes } from './classes.js';
|
|
5
|
+
import { d as defineCustomElement$b } from './zonos-banner2.js';
|
|
5
6
|
import { d as defineCustomElement$a } from './zonos-button2.js';
|
|
6
7
|
import { d as defineCustomElement$9 } from './zonos-card2.js';
|
|
7
8
|
import { d as defineCustomElement$8 } from './zonos-country-flag2.js';
|
|
@@ -20,24 +21,24 @@ const getHasMoreSpaceOnRight = (ref) => {
|
|
|
20
21
|
return availableSpaceLeft <= availableSpaceRight;
|
|
21
22
|
};
|
|
22
23
|
|
|
23
|
-
const BagIcon = `<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="
|
|
24
|
+
const BagIcon = `<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">
|
|
24
25
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>
|
|
25
26
|
</svg>
|
|
26
27
|
`;
|
|
27
28
|
|
|
28
|
-
const MessageIcon = `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="
|
|
29
|
+
const MessageIcon = `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">
|
|
29
30
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>
|
|
30
31
|
</svg>
|
|
31
32
|
`;
|
|
32
33
|
|
|
33
|
-
const MoneyIcon = `<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="
|
|
34
|
+
const MoneyIcon = `<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">
|
|
34
35
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16666 5.83301C2.16666 4.4523 3.28594 3.33301 4.66666 3.33301H16.3333C17.714 3.33301 18.8333 4.4523 18.8333 5.83301V14.1663C18.8333 15.5471 17.714 16.6663 16.3333 16.6663H4.66666C3.28594 16.6663 2.16666 15.5471 2.16666 14.1663V5.83301ZM4.66666 4.99967C4.20642 4.99967 3.83332 5.37277 3.83332 5.83301V14.1663C3.83332 14.6266 4.20642 14.9997 4.66666 14.9997H16.3333C16.7936 14.9997 17.1667 14.6266 17.1667 14.1663V5.83301C17.1667 5.37277 16.7936 4.99967 16.3333 4.99967H4.66666ZM6.33332 8.33301C6.79356 8.33301 7.16666 8.7061 7.16666 9.16634V10.833C7.16666 11.2932 6.79356 11.6663 6.33332 11.6663C5.87309 11.6663 5.49999 11.2932 5.49999 10.833V9.16634C5.49999 8.7061 5.87309 8.33301 6.33332 8.33301ZM8.83332 9.99967C8.83332 9.0792 9.57952 8.33301 10.5 8.33301C11.4205 8.33301 12.1667 9.0792 12.1667 9.99967C12.1667 10.9201 11.4205 11.6663 10.5 11.6663C9.57952 11.6663 8.83332 10.9201 8.83332 9.99967ZM14.6667 8.33301C15.1269 8.33301 15.5 8.7061 15.5 9.16634V10.833C15.5 11.2932 15.1269 11.6663 14.6667 11.6663C14.2064 11.6663 13.8333 11.2932 13.8333 10.833V9.16634C13.8333 8.7061 14.2064 8.33301 14.6667 8.33301Z" fill="#4D505A"/>
|
|
35
36
|
</svg>
|
|
36
37
|
`;
|
|
37
38
|
|
|
38
|
-
const RemoveIcon = `<svg xmlns="
|
|
39
|
+
const RemoveIcon = `<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>`;
|
|
39
40
|
|
|
40
|
-
const zonosHelloDialogCss = ":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--amino-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--amino-radius-12);outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;
|
|
41
|
+
const zonosHelloDialogCss = ":host{font-family:Inter;display:block}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-dialog{position:absolute;background:var(--amino-surface-color);width:100vw;max-width:430px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:600px;border-radius:var(--amino-radius-12);outline:none;-webkit-box-shadow:var(--amino-v3-shadow-xxl);box-shadow:var(--amino-v3-shadow-xxl);overflow-y:auto;top:-2px;right:-2px;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top right;transform-origin:top right;z-index:1001}:host .zonos--hello-dialog .zonos--hello-dialog-header{text-align:center}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:top left;transform-origin:top left;right:unset;left:-2px}:host .zonos--hello-dialog::-webkit-scrollbar{width:12px;height:12px}:host .zonos--hello-dialog::-webkit-scrollbar-track{background:#f5f5f5;border-top-right-radius:var(--amino-radius-12);border-bottom-right-radius:var(--amino-radius-12)}:host .zonos--hello-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#ccc;border:4px solid transparent;background-clip:content-box}:host .zonos--hello-dialog::-webkit-scrollbar-thumb:hover{background:#999}:host .zonos--hello-dialog .zonos--animate-content{opacity:0;height:0;-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out}:host .zonos--hello-dialog .zonos--show-animate-content{opacity:1;height:100%}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .zonos--hello-dialog .zonos--close-button{position:absolute;right:var(--amino-space-8);top:var(--amino-space-8);width:var(--amino-size-md);height:var(--amino-size-md);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;z-index:10}:host .zonos--hello-dialog .zonos--close-button:hover{background:var(--amino-hover-color);border-radius:var(--amino-radius-6)}:host .zonos--hello-dialog .zonos--hello-dialog-content{padding:var(--amino-space-16)}:host .zonos--hello-dialog .zonos--hello-dialog-content .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:32px;height:24px}:host .zonos--hello-dialog .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--amino-space-12)}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:unset;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-mobile-override.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}@media (max-width: 768px){:host .zonos--hello-dialog{position:-webkit-sticky;position:sticky;top:unset;left:unset;right:unset;bottom:0;width:100vw;max-width:100vw;max-height:unset;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-transform:scaleY(0);transform:scaleY(0);border-radius:0;-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-animate-from-left{-webkit-transform-origin:bottom;transform-origin:bottom}:host .zonos--hello-dialog.zonos--hello-dialog-open{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1)}}";
|
|
41
42
|
|
|
42
43
|
const ZonosHelloDialog = /*@__PURE__*/ proxyCustomElement(class ZonosHelloDialog extends HTMLElement {
|
|
43
44
|
constructor() {
|
|
@@ -72,6 +73,7 @@ const ZonosHelloDialog = /*@__PURE__*/ proxyCustomElement(class ZonosHelloDialog
|
|
|
72
73
|
this.mobileLocationOverride = undefined;
|
|
73
74
|
this.animateFromLeftOverride = undefined;
|
|
74
75
|
this.appearanceSettings = undefined;
|
|
76
|
+
this.restrictedItems = [];
|
|
75
77
|
this.welcomeMessage = 'Welcome to our Demo App!';
|
|
76
78
|
this.showCountrySelect = false;
|
|
77
79
|
}
|
|
@@ -115,7 +117,10 @@ const ZonosHelloDialog = /*@__PURE__*/ proxyCustomElement(class ZonosHelloDialog
|
|
|
115
117
|
!!this.mobileLocationOverride &&
|
|
116
118
|
'zonos--hello-dialog-mobile-override',
|
|
117
119
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
118
|
-
]), ref: el => el && (this.dialogRef = el) }, h("div", { class: "zonos--hello-dialog-content" }, h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), this.showCountrySelect ? (h("div", null, h("zonos-country-select", { closeCountrySelect: () => this.setShowCountrySelect(false) }))) : (h("div", null, h("zonos-v-stack", { spacing: 24 }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { spacing: 4 }, h("zonos-text", { type: "boldSubheader" }, welcomeMessage), h("zonos-text", { color: "gray-800" }, defaultMessage)), h("zonos-v-stack", { spacing: 8 },
|
|
120
|
+
]), ref: el => el && (this.dialogRef = el) }, h("div", { class: "zonos--hello-dialog-content" }, h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), this.showCountrySelect ? (h("div", null, h("zonos-country-select", { closeCountrySelect: () => this.setShowCountrySelect(false) }))) : (h("div", null, h("zonos-v-stack", { spacing: 24 }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { type: "boldSubheader" }, welcomeMessage), h("zonos-text", { color: "gray-800" }, defaultMessage)), h("zonos-v-stack", { spacing: 8 }, this.restrictedItems.map(item => {
|
|
121
|
+
var _a;
|
|
122
|
+
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", { color: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
123
|
+
}), h("zonos-card", { spacing: "12px" }, h("zonos-v-stack", { spacing: 12 }, h("div", { class: "zonos--flex-message" }, h("zonos-icon", { content: BagIcon }), h("zonos-text", null, dutyDeMinimisMessage)), h("div", { class: "zonos--flex-message" }, h("zonos-icon", { content: MoneyIcon }), h("zonos-text", null, taxDeMinimisMessage)))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))))), !this.showCountrySelect && (h("zonos-hello-dialog-footer", { appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value) })))));
|
|
119
124
|
}
|
|
120
125
|
static get assetsDirs() { return ["assets"]; }
|
|
121
126
|
static get watchers() { return {
|
|
@@ -128,6 +133,7 @@ const ZonosHelloDialog = /*@__PURE__*/ proxyCustomElement(class ZonosHelloDialog
|
|
|
128
133
|
"mobileLocationOverride": [1, "mobile-location-override"],
|
|
129
134
|
"animateFromLeftOverride": [4, "animate-from-left-override"],
|
|
130
135
|
"appearanceSettings": [16],
|
|
136
|
+
"restrictedItems": [16],
|
|
131
137
|
"welcomeMessage": [32],
|
|
132
138
|
"showCountrySelect": [32]
|
|
133
139
|
}, [[4, "click", "globalClickHandler"]], {
|
|
@@ -137,13 +143,18 @@ function defineCustomElement() {
|
|
|
137
143
|
if (typeof customElements === "undefined") {
|
|
138
144
|
return;
|
|
139
145
|
}
|
|
140
|
-
const components = ["zonos-hello-dialog", "zonos-button", "zonos-card", "zonos-country-flag", "zonos-country-select", "zonos-custom-message", "zonos-hello-dialog-footer", "zonos-icon", "zonos-spinner", "zonos-text", "zonos-v-stack"];
|
|
146
|
+
const components = ["zonos-hello-dialog", "zonos-banner", "zonos-button", "zonos-card", "zonos-country-flag", "zonos-country-select", "zonos-custom-message", "zonos-hello-dialog-footer", "zonos-icon", "zonos-spinner", "zonos-text", "zonos-v-stack"];
|
|
141
147
|
components.forEach(tagName => { switch (tagName) {
|
|
142
148
|
case "zonos-hello-dialog":
|
|
143
149
|
if (!customElements.get(tagName)) {
|
|
144
150
|
customElements.define(tagName, ZonosHelloDialog);
|
|
145
151
|
}
|
|
146
152
|
break;
|
|
153
|
+
case "zonos-banner":
|
|
154
|
+
if (!customElements.get(tagName)) {
|
|
155
|
+
defineCustomElement$b();
|
|
156
|
+
}
|
|
157
|
+
break;
|
|
147
158
|
case "zonos-button":
|
|
148
159
|
if (!customElements.get(tagName)) {
|
|
149
160
|
defineCustomElement$a();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"zonos-hello-dialog2.js","mappings":";;;;;;;;;;;;;;;MAGa,sBAAsB,GAAG,CAAC,GAAgB;EACrD,MAAM,aAAa,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC;EAClD,MAAM,kBAAkB,GAAG,aAAa,CAAC,IAAI,CAAC;EAC9C,MAAM,mBAAmB,GAAG,MAAM,CAAC,UAAU,GAAG,aA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I,CAAC,kBAAkB,EAC3C,oBAAoB,EAAE,KAAK,IAAI,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,GACpC,CAC9B,CACG,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/utils/hello/getHasMoreSpaceOnRight.ts","src/components/hello/zonos-hello-dialog/zonos-hello-dialog.scss?tag=zonos-hello-dialog&encapsulation=shadow","src/components/hello/zonos-hello-dialog/zonos-hello-dialog.tsx"],"sourcesContent":["{\n /** @description determines if the element has more space on the right than the left. Helpful for determining animation direction */\n}\nexport const getHasMoreSpaceOnRight = (ref: HTMLElement) => {\n const componentRect = ref.getBoundingClientRect();\n const availableSpaceLeft = componentRect.left;\n const availableSpaceRight = window.innerWidth - componentRect.right;\n return availableSpaceLeft <= availableSpaceRight;\n};\n",":host {\n .zonos--hello-country-flag {\n @include zonos--hello-country-flag;\n }\n\n .zonos--hello-dialog {\n position: absolute;\n background: $amino-surface-color;\n width: 100vw;\n max-width: 430px;\n height: fit-content;\n max-height: 600px;\n border-radius: $amino-radius-12;\n outline: none;\n box-shadow: $amino-v3-shadow-xxl;\n overflow-y: auto;\n top: -2px;\n right: -2px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;\n transform: scale(0);\n transform-origin: top right;\n text-align: center;\n z-index: 1001;\n\n &.zonos--hello-dialog-animate-from-left {\n transform-origin: top left;\n right: unset;\n left: -2px;\n }\n\n &::-webkit-scrollbar {\n width: 12px;\n height: 12px;\n }\n\n &::-webkit-scrollbar-track {\n background: #f5f5f5;\n border-top-right-radius: $amino-radius-12;\n border-bottom-right-radius: $amino-radius-12;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: 10px;\n background: #ccc;\n border: 4px solid transparent;\n background-clip: content-box;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #999;\n }\n\n .zonos--animate-content {\n opacity: 0;\n height: 0;\n transition: all 0.3s ease-in-out;\n }\n .zonos--show-animate-content {\n opacity: 1;\n height: 100%;\n }\n\n &.zonos--hello-dialog-open {\n opacity: 1;\n transform: scale(1);\n }\n\n .zonos--close-button {\n position: absolute;\n right: $amino-space-8;\n top: $amino-space-8;\n width: $amino-size-md;\n height: $amino-size-md;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n z-index: 10;\n &:hover {\n background: $amino-hover-color;\n border-radius: $amino-radius-6;\n }\n }\n\n .zonos--hello-dialog-content {\n padding: $amino-space-16;\n\n .zonos--hello-country-flag {\n border-radius: $amino-radius-4;\n width: 32px;\n height: 24px;\n }\n }\n\n .zonos--flex-message {\n display: flex;\n align-items: center;\n gap: $amino-space-8;\n }\n\n &.zonos--hello-dialog-mobile-override {\n @include zonos--hello-dialog-mobile;\n }\n @media (max-width: 768px) {\n @include zonos--hello-dialog-mobile;\n }\n }\n}\n","import {\n type EventEmitter,\n Component,\n Event,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\nimport { localizationStore } from 'src/components/store/hello/localization';\nimport { translate } from 'src/components/store/translationStore';\nimport { zonosStore } from 'src/components/store/zonosStore';\nimport { classes } from 'src/components/utils/classes';\nimport { currencyConvertAndFormat } from 'src/components/utils/hello/currencyConversion/currencyConvertAndFormat';\nimport { getHasMoreSpaceOnRight } from 'src/components/utils/hello/getHasMoreSpaceOnRight';\nimport type { AppearanceConfig, HelloMobileLocation } from 'src/types';\nimport type { Locale_PageName_Enum } from 'src/types/generated/graphql.frontend.types';\n\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport BagIcon from './assets/bagIcon.svg';\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport MessageIcon from './assets/messageIcon.svg';\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport MoneyIcon from './assets/moneyIcon.svg';\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport RemoveIcon from './assets/removeIcon.svg';\n\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-hello-dialog.scss',\n tag: 'zonos-hello-dialog',\n})\nexport class ZonosHelloDialog {\n /**\n * Whether or not the dialog is open\n */\n @Prop() isOpen: boolean = false;\n\n /**\n * The function to set the open state\n * @default () => {}\n */\n @Prop() setIsOpen: (isOpen: boolean) => void = () => {};\n\n /**\n * Force mobile styling instead of media query and use the passed location value\n * @default false\n */\n @Prop() mobileLocationOverride?: HelloMobileLocation;\n /**\n * Force left animation instead of detecting which side has more space\n * @default false\n */\n @Prop() animateFromLeftOverride?: boolean;\n /**\n * Override the appearance settings\n */\n @Prop() appearanceSettings?: Partial<AppearanceConfig>;\n\n @State() welcomeMessage: string = 'Welcome to our Demo App!';\n @State() showCountrySelect: boolean = false;\n\n /**\n * Close dialog button click\n */\n @Event() closeDialog!: EventEmitter<void>;\n\n private dialogRef!: HTMLDivElement;\n\n private clickOutsideDialogHandler = (e: MouseEvent) => {\n if (!e.composedPath().includes(this.dialogRef) && this.isOpen) {\n this.setIsOpen(false);\n }\n };\n\n private getCurrentPageEnum = (): Locale_PageName_Enum | null => {\n switch (zonosStore.currentHelloPage) {\n case 'home':\n return 'hello_homepage';\n case 'cart':\n return 'hello_cart';\n case 'productList':\n return 'hello_item_list';\n case 'productDetail':\n return 'hello_item_details';\n\n default:\n return null;\n }\n };\n\n private setShowCountrySelect = async (value: boolean) => {\n this.showCountrySelect = value;\n };\n\n @Listen('click', { target: 'document' })\n globalClickHandler(e: MouseEvent) {\n this.clickOutsideDialogHandler(e);\n }\n\n @Watch('isOpen')\n isOpenHandler(isOpen: boolean) {\n if (!isOpen) {\n void this.setShowCountrySelect(false);\n }\n }\n\n render() {\n const { countryLandedCost, selectedCountryCode } = localizationStore;\n\n // Our Robby API spells deminimis wrong here\n const dutyDeminimis = countryLandedCost?.dutyDeminimus\n ? currencyConvertAndFormat(countryLandedCost.dutyDeminimus)\n : null;\n // If deminimis is undefined or null, assume it's $0\n const dutyDeMinimisMessage = dutyDeminimis\n ? `${translate('Spend')} ${dutyDeminimis} ${translate('duty free')}`\n : translate('Duties will apply to all orders');\n\n // Our Robby API spells deminimis wrong here\n const taxDeminimis = countryLandedCost?.vatTaxDeminimus\n ? currencyConvertAndFormat(countryLandedCost.vatTaxDeminimus)\n : null;\n const taxDeMinimisMessage = taxDeminimis\n ? `${translate('Spend')} ${taxDeminimis} ${translate('tax free')}`\n : translate('Taxes will apply to all orders');\n\n const animateLeft =\n this.animateFromLeftOverride ||\n (this.dialogRef && getHasMoreSpaceOnRight(this.dialogRef));\n\n const { customMessages } = localizationStore;\n const welcomeMessage = `${translate('Welcome to')} ${\n zonosStore.organizationName\n }!`;\n const defaultMessage =\n customMessages.find(x => x.pageName === 'hello_default')?.message ||\n translate(\n 'Know about duties and taxes before you buy. Shop with confidence!',\n );\n\n const currentPage = this.getCurrentPageEnum();\n const filteredMessages = customMessages.filter(\n x => x.pageName === currentPage,\n );\n\n return (\n <Host class=\"zonos--elements\">\n <div\n aria-hidden=\"true\"\n class={classes([\n 'zonos--hello-dialog',\n animateLeft && 'zonos--hello-dialog-animate-from-left',\n !!this.mobileLocationOverride &&\n 'zonos--hello-dialog-mobile-override',\n this.isOpen && 'zonos--hello-dialog-open',\n ])}\n ref={el => el && (this.dialogRef = el)}\n >\n <div class=\"zonos--hello-dialog-content\">\n <zonos-button\n class=\"zonos--close-button\"\n icon={<zonos-icon content={RemoveIcon}></zonos-icon>}\n noBackground\n onClick={() => this.setIsOpen(false)}\n ></zonos-button>\n\n {this.showCountrySelect ? (\n <div>\n <zonos-country-select\n closeCountrySelect={() => this.setShowCountrySelect(false)}\n ></zonos-country-select>\n </div>\n ) : (\n <div>\n <zonos-v-stack spacing={24}>\n <zonos-country-flag\n class=\"zonos--hello-country-flag\"\n countryCode={selectedCountryCode}\n ></zonos-country-flag>\n\n <zonos-v-stack spacing={4}>\n <zonos-text type=\"boldSubheader\">\n {welcomeMessage}\n </zonos-text>\n <zonos-text color=\"gray-800\">{defaultMessage}</zonos-text>\n </zonos-v-stack>\n\n <zonos-v-stack spacing={8}>\n <zonos-card spacing=\"12px\">\n <zonos-v-stack spacing={8}>\n <div class=\"zonos--flex-message\">\n <zonos-icon content={BagIcon}></zonos-icon>\n <zonos-text>{dutyDeMinimisMessage}</zonos-text>\n </div>\n\n <div class=\"zonos--flex-message\">\n <zonos-icon content={MoneyIcon}></zonos-icon>\n <zonos-text>{taxDeMinimisMessage}</zonos-text>\n </div>\n </zonos-v-stack>\n </zonos-card>\n\n {filteredMessages.map(x => (\n <zonos-custom-message\n icon={MessageIcon}\n message={x.message}\n ></zonos-custom-message>\n ))}\n </zonos-v-stack>\n </zonos-v-stack>\n </div>\n )}\n </div>\n\n {!this.showCountrySelect && (\n <zonos-hello-dialog-footer\n appearanceSettings={this.appearanceSettings}\n setShowCountrySelect={value => this.setShowCountrySelect(value)}\n ></zonos-hello-dialog-footer>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"zonos-hello-dialog2.js","mappings":";;;;;;;;;;;;;;;;MAGa,sBAAsB,GAAG,CAAC,GAAgB;EACrD,MAAM,aAAa,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC;EAClD,MAAM,kBAAkB,GAAG,aAAa,CAAC,IAAI,CAAC;EAC9C,MAAM,mBAAmB,GAAG,MAAM,CAAC,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC;EACpE,OAAO,kBAAkB,IAAI,mBAAmB,CAAC;AACnD;;;;;;;;;;;;;;;;;;;ACRA,MAAM,mBAAmB,GAAG,6zIAA6zI;;MCqC50I,gBAAgB;;;;;;IA2CnB,8BAAyB,GAAG,CAAC,CAAa;MAChD,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE;QAC7D,IAAI,CAAC,SAAS,CAAC,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B,iCACE,kBAAkB,EAAE,IAAI,CAAC,kBAAkB,EAC3C,oBAAoB,EAAE,KAAK,IAAI,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,GACpC,CAC9B,CACG,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/utils/hello/getHasMoreSpaceOnRight.ts","src/components/hello/zonos-hello-dialog/zonos-hello-dialog.scss?tag=zonos-hello-dialog&encapsulation=shadow","src/components/hello/zonos-hello-dialog/zonos-hello-dialog.tsx"],"sourcesContent":["{\n /** @description determines if the element has more space on the right than the left. Helpful for determining animation direction */\n}\nexport const getHasMoreSpaceOnRight = (ref: HTMLElement) => {\n const componentRect = ref.getBoundingClientRect();\n const availableSpaceLeft = componentRect.left;\n const availableSpaceRight = window.innerWidth - componentRect.right;\n return availableSpaceLeft <= availableSpaceRight;\n};\n",":host {\n .zonos--hello-country-flag {\n @include zonos--hello-country-flag;\n }\n\n .zonos--hello-dialog {\n position: absolute;\n background: $amino-surface-color;\n width: 100vw;\n max-width: 430px;\n height: fit-content;\n max-height: 600px;\n border-radius: $amino-radius-12;\n outline: none;\n box-shadow: $amino-v3-shadow-xxl;\n overflow-y: auto;\n top: -2px;\n right: -2px;\n opacity: 0;\n transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;\n transform: scale(0);\n transform-origin: top right;\n z-index: 1001;\n\n .zonos--hello-dialog-header {\n text-align: center;\n }\n\n &.zonos--hello-dialog-animate-from-left {\n transform-origin: top left;\n right: unset;\n left: -2px;\n }\n\n &::-webkit-scrollbar {\n width: 12px;\n height: 12px;\n }\n\n &::-webkit-scrollbar-track {\n background: #f5f5f5;\n border-top-right-radius: $amino-radius-12;\n border-bottom-right-radius: $amino-radius-12;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: 10px;\n background: #ccc;\n border: 4px solid transparent;\n background-clip: content-box;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #999;\n }\n\n .zonos--animate-content {\n opacity: 0;\n height: 0;\n transition: all 0.3s ease-in-out;\n }\n .zonos--show-animate-content {\n opacity: 1;\n height: 100%;\n }\n\n &.zonos--hello-dialog-open {\n opacity: 1;\n transform: scale(1);\n }\n\n .zonos--close-button {\n position: absolute;\n right: $amino-space-8;\n top: $amino-space-8;\n width: $amino-size-md;\n height: $amino-size-md;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n z-index: 10;\n &:hover {\n background: $amino-hover-color;\n border-radius: $amino-radius-6;\n }\n }\n\n .zonos--hello-dialog-content {\n padding: $amino-space-16;\n\n .zonos--hello-country-flag {\n border-radius: $amino-radius-4;\n width: 32px;\n height: 24px;\n }\n }\n\n .zonos--flex-message {\n display: flex;\n align-items: center;\n gap: $amino-space-12;\n }\n\n &.zonos--hello-dialog-mobile-override {\n @include zonos--hello-dialog-mobile;\n }\n @media (max-width: 768px) {\n @include zonos--hello-dialog-mobile;\n }\n }\n}\n","import {\n type EventEmitter,\n Component,\n Event,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\nimport { localizationStore } from 'src/components/store/hello/localization';\nimport { translate } from 'src/components/store/translationStore';\nimport { zonosStore } from 'src/components/store/zonosStore';\nimport { classes } from 'src/components/utils/classes';\nimport { currencyConvertAndFormat } from 'src/components/utils/hello/currencyConversion/currencyConvertAndFormat';\nimport { getHasMoreSpaceOnRight } from 'src/components/utils/hello/getHasMoreSpaceOnRight';\nimport type { AppearanceConfig, HelloMobileLocation } from 'src/types';\nimport type { Locale_PageName_Enum } from 'src/types/generated/graphql.frontend.types';\nimport type { RestrictedItem } from 'src/types/hello/RestrictedItem';\n\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport BagIcon from './assets/bagIcon.svg';\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport MessageIcon from './assets/messageIcon.svg';\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport MoneyIcon from './assets/moneyIcon.svg';\n// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths\nimport RemoveIcon from './assets/removeIcon.svg';\n\n@Component({\n assetsDirs: ['assets'],\n shadow: true,\n styleUrl: 'zonos-hello-dialog.scss',\n tag: 'zonos-hello-dialog',\n})\nexport class ZonosHelloDialog {\n /**\n * Whether or not the dialog is open\n */\n @Prop() isOpen: boolean = false;\n\n /**\n * The function to set the open state\n * @default () => {}\n */\n @Prop() setIsOpen: (isOpen: boolean) => void = () => {};\n\n /**\n * Force mobile styling instead of media query and use the passed location value\n * @default false\n */\n @Prop() mobileLocationOverride?: HelloMobileLocation;\n /**\n * Force left animation instead of detecting which side has more space\n * @default false\n */\n @Prop() animateFromLeftOverride?: boolean;\n /**\n * Override the appearance settings\n */\n @Prop() appearanceSettings?: Partial<AppearanceConfig>;\n\n /**\n * Item restrictions array if any\n * @default []\n */\n @Prop() restrictedItems: RestrictedItem[] = [];\n\n @State() welcomeMessage: string = 'Welcome to our Demo App!';\n @State() showCountrySelect: boolean = false;\n\n /**\n * Close dialog button click\n */\n @Event() closeDialog!: EventEmitter<void>;\n\n private dialogRef!: HTMLDivElement;\n\n private clickOutsideDialogHandler = (e: MouseEvent) => {\n if (!e.composedPath().includes(this.dialogRef) && this.isOpen) {\n this.setIsOpen(false);\n }\n };\n\n private getCurrentPageEnum = (): Locale_PageName_Enum | null => {\n switch (zonosStore.currentHelloPage) {\n case 'home':\n return 'hello_homepage';\n case 'cart':\n return 'hello_cart';\n case 'productList':\n return 'hello_item_list';\n case 'productDetail':\n return 'hello_item_details';\n\n default:\n return null;\n }\n };\n\n private setShowCountrySelect = async (value: boolean) => {\n this.showCountrySelect = value;\n };\n\n @Listen('click', { target: 'document' })\n globalClickHandler(e: MouseEvent) {\n this.clickOutsideDialogHandler(e);\n }\n\n @Watch('isOpen')\n isOpenHandler(isOpen: boolean) {\n if (!isOpen) {\n void this.setShowCountrySelect(false);\n }\n }\n\n render() {\n const { countryLandedCost, selectedCountryCode } = localizationStore;\n\n // Our Robby API spells deminimis wrong here\n const dutyDeminimis = countryLandedCost?.dutyDeminimus\n ? currencyConvertAndFormat(countryLandedCost.dutyDeminimus)\n : null;\n // If deminimis is undefined or null, assume it's $0\n const dutyDeMinimisMessage = dutyDeminimis\n ? `${translate('Spend')} ${dutyDeminimis} ${translate('duty free')}`\n : translate('Duties will apply to all orders');\n\n // Our Robby API spells deminimis wrong here\n const taxDeminimis = countryLandedCost?.vatTaxDeminimus\n ? currencyConvertAndFormat(countryLandedCost.vatTaxDeminimus)\n : null;\n const taxDeMinimisMessage = taxDeminimis\n ? `${translate('Spend')} ${taxDeminimis} ${translate('tax free')}`\n : translate('Taxes will apply to all orders');\n\n const animateLeft =\n this.animateFromLeftOverride ||\n (this.dialogRef && getHasMoreSpaceOnRight(this.dialogRef));\n\n const { customMessages } = localizationStore;\n const welcomeMessage = `${translate('Welcome to')} ${\n zonosStore.organizationName\n }!`;\n const defaultMessage =\n customMessages.find(x => x.pageName === 'hello_default')?.message ||\n translate(\n 'Know about duties and taxes before you buy. Shop with confidence!',\n );\n\n const currentPage = this.getCurrentPageEnum();\n const filteredMessages = customMessages.filter(\n x => x.pageName === currentPage,\n );\n\n return (\n <Host class=\"zonos--elements\">\n <div\n aria-hidden=\"true\"\n class={classes([\n 'zonos--hello-dialog',\n animateLeft && 'zonos--hello-dialog-animate-from-left',\n !!this.mobileLocationOverride &&\n 'zonos--hello-dialog-mobile-override',\n this.isOpen && 'zonos--hello-dialog-open',\n ])}\n ref={el => el && (this.dialogRef = el)}\n >\n <div class=\"zonos--hello-dialog-content\">\n <zonos-button\n class=\"zonos--close-button\"\n icon={<zonos-icon content={RemoveIcon}></zonos-icon>}\n noBackground\n onClick={() => this.setIsOpen(false)}\n ></zonos-button>\n\n {this.showCountrySelect ? (\n <div>\n <zonos-country-select\n closeCountrySelect={() => this.setShowCountrySelect(false)}\n ></zonos-country-select>\n </div>\n ) : (\n <div>\n <zonos-v-stack spacing={24}>\n <zonos-country-flag\n class=\"zonos--hello-country-flag\"\n countryCode={selectedCountryCode}\n ></zonos-country-flag>\n\n <zonos-v-stack class=\"zonos--hello-dialog-header\" spacing={4}>\n <zonos-text type=\"boldSubheader\">\n {welcomeMessage}\n </zonos-text>\n <zonos-text color=\"gray-800\">{defaultMessage}</zonos-text>\n </zonos-v-stack>\n\n <zonos-v-stack spacing={8}>\n {this.restrictedItems.map(\n item =>\n item && (\n <zonos-banner bannerTitle={item.name} intent=\"error\">\n {item.itemRestrictions?.map(x => (\n <zonos-text color=\"red-800\">{x?.note}</zonos-text>\n ))}\n </zonos-banner>\n ),\n )}\n\n <zonos-card spacing=\"12px\">\n <zonos-v-stack spacing={12}>\n <div class=\"zonos--flex-message\">\n <zonos-icon content={BagIcon}></zonos-icon>\n <zonos-text>{dutyDeMinimisMessage}</zonos-text>\n </div>\n\n <div class=\"zonos--flex-message\">\n <zonos-icon content={MoneyIcon}></zonos-icon>\n <zonos-text>{taxDeMinimisMessage}</zonos-text>\n </div>\n </zonos-v-stack>\n </zonos-card>\n\n {filteredMessages.map(x => (\n <zonos-custom-message\n icon={MessageIcon}\n message={x.message}\n ></zonos-custom-message>\n ))}\n </zonos-v-stack>\n </zonos-v-stack>\n </div>\n )}\n </div>\n\n {!this.showCountrySelect && (\n <zonos-hello-dialog-footer\n appearanceSettings={this.appearanceSettings}\n setShowCountrySelect={value => this.setShowCountrySelect(value)}\n ></zonos-hello-dialog-footer>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { _ as _root, i as isObjectLike_1, e as _baseGetTag, f as isObject_1, z as zonosStore, m as mergeConfig } from './zonosStore.js';
|
|
3
|
-
import {
|
|
3
|
+
import { h as handleFetch, l as logError, a as localizationStore, i as isValidSelector, t as translate, s as setZonosCountryUrlParam, e as currencyDisplay, f as currencyConvertAndFormat, g as currencyConvert, j as currencyFormat, b as log } from './localization.js';
|
|
4
4
|
import { c as classes } from './classes.js';
|
|
5
5
|
import { g as getHasMoreSpaceOnRight, d as defineCustomElement$7 } from './zonos-hello-dialog2.js';
|
|
6
|
+
import { d as defineCustomElement$d } from './zonos-banner2.js';
|
|
6
7
|
import { d as defineCustomElement$c } from './zonos-button2.js';
|
|
7
8
|
import { d as defineCustomElement$b } from './zonos-card2.js';
|
|
8
9
|
import { d as defineCustomElement$a } from './zonos-country-flag2.js';
|
|
@@ -350,14 +351,133 @@ function debounce(func, wait, options) {
|
|
|
350
351
|
|
|
351
352
|
var debounce_1 = debounce;
|
|
352
353
|
|
|
353
|
-
const
|
|
354
|
+
const checkItemRestrictions = async ({ items, shipFrom, shipTo, }) => {
|
|
355
|
+
var _a;
|
|
356
|
+
const url = `${"https://v1.route.js.zonos.com"}/api/check-item-restrictions`;
|
|
357
|
+
const body = {
|
|
358
|
+
items,
|
|
359
|
+
shipFrom,
|
|
360
|
+
shipTo,
|
|
361
|
+
};
|
|
362
|
+
const { errors, json } = await handleFetch(url, { body, method: 'POST' });
|
|
363
|
+
if (errors.length || !json) {
|
|
364
|
+
logError(`Error fetching item restrictions: ${(_a = errors.find(Boolean)) === null || _a === void 0 ? void 0 : _a.message}`);
|
|
365
|
+
return [];
|
|
366
|
+
}
|
|
367
|
+
return json.filter(Boolean);
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
const detectItemRestrictions = async (newProducts) => {
|
|
371
|
+
if (!newProducts.length) {
|
|
372
|
+
return [];
|
|
373
|
+
}
|
|
374
|
+
const { selectedCountryCode } = localizationStore;
|
|
375
|
+
if (!selectedCountryCode) {
|
|
376
|
+
logError('Hello Could not check item restrictions - No country code selected');
|
|
377
|
+
return [];
|
|
378
|
+
}
|
|
379
|
+
const items = newProducts.map(product => ({
|
|
380
|
+
description: product.description,
|
|
381
|
+
name: product.title,
|
|
382
|
+
}));
|
|
383
|
+
const restrictedItems = await checkItemRestrictions({
|
|
384
|
+
items: items,
|
|
385
|
+
shipFrom: 'AD',
|
|
386
|
+
shipTo: selectedCountryCode,
|
|
387
|
+
});
|
|
388
|
+
const restrictedItemsWithName = restrictedItems.map(item => {
|
|
389
|
+
var _a;
|
|
390
|
+
const name = ((_a = items.filter(x => x.description === item.itemDescription).find(Boolean)) === null || _a === void 0 ? void 0 : _a.name) || '';
|
|
391
|
+
return Object.assign(Object.assign({}, item), { name });
|
|
392
|
+
});
|
|
393
|
+
return restrictedItemsWithName;
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
const getCurrentHelloLocalePage = () => {
|
|
397
|
+
const { href } = window.location;
|
|
398
|
+
const { cartUrlPattern, homepageUrlPattern, productDetailUrlPattern, productListUrlPattern, } = zonosStore.helloSettings;
|
|
399
|
+
// The 'if' statements are sorted by most specific to least specific to help with regex matching
|
|
400
|
+
if (cartUrlPattern && new RegExp(cartUrlPattern).test(href)) {
|
|
401
|
+
return 'cart';
|
|
402
|
+
}
|
|
403
|
+
if (productDetailUrlPattern &&
|
|
404
|
+
new RegExp(productDetailUrlPattern).test(href)) {
|
|
405
|
+
return 'productDetail';
|
|
406
|
+
}
|
|
407
|
+
if (productListUrlPattern && new RegExp(productListUrlPattern).test(href)) {
|
|
408
|
+
return 'productList';
|
|
409
|
+
}
|
|
410
|
+
if (homepageUrlPattern && new RegExp(homepageUrlPattern).test(href)) {
|
|
411
|
+
return 'home';
|
|
412
|
+
}
|
|
413
|
+
return '';
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
const getProductsOnPage = () => {
|
|
417
|
+
var _a, _b;
|
|
418
|
+
const { productAddToCartElementSelector, productDescriptionElementSelector, productTitleElementSelector, restrictionBehavior, } = zonosStore.helloSettings;
|
|
419
|
+
if (!productTitleElementSelector || !productDescriptionElementSelector) {
|
|
420
|
+
logError(`Hello Could not check item restrictions - must provide title and description selectors.`);
|
|
421
|
+
}
|
|
422
|
+
const titleNodes = (productTitleElementSelector &&
|
|
423
|
+
isValidSelector(productTitleElementSelector) &&
|
|
424
|
+
document.querySelectorAll(productTitleElementSelector)) ||
|
|
425
|
+
[];
|
|
426
|
+
const descriptionNodes = (productDescriptionElementSelector &&
|
|
427
|
+
isValidSelector(productDescriptionElementSelector) &&
|
|
428
|
+
document.querySelectorAll(productDescriptionElementSelector)) ||
|
|
429
|
+
[];
|
|
430
|
+
if (titleNodes.length !== descriptionNodes.length) {
|
|
431
|
+
// If the title and description selectors don't match, kill item restrictions altogether
|
|
432
|
+
logError('Hello Could not check item restrictions - Title and description selectors do not match');
|
|
433
|
+
return [];
|
|
434
|
+
}
|
|
435
|
+
const shouldDisableCart = restrictionBehavior === 'RESTRICT_AND_BLOCK';
|
|
436
|
+
const cartButtonNodes = (shouldDisableCart &&
|
|
437
|
+
productAddToCartElementSelector &&
|
|
438
|
+
isValidSelector(productAddToCartElementSelector) &&
|
|
439
|
+
document.querySelectorAll(productAddToCartElementSelector)) ||
|
|
440
|
+
[];
|
|
441
|
+
if (shouldDisableCart && cartButtonNodes.length !== descriptionNodes.length) {
|
|
442
|
+
// If the "add to cart" selectors don't match, log the error and continue
|
|
443
|
+
logError('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');
|
|
444
|
+
}
|
|
445
|
+
const mergedElements = [];
|
|
446
|
+
for (let i = 0; i < titleNodes.length; i++) {
|
|
447
|
+
const titleNode = titleNodes[i];
|
|
448
|
+
const descriptionNode = descriptionNodes[i];
|
|
449
|
+
const cartButtonNode = cartButtonNodes[i];
|
|
450
|
+
if (titleNode && descriptionNode) {
|
|
451
|
+
const element = {
|
|
452
|
+
cartButtonNode: cartButtonNode || null,
|
|
453
|
+
description: ((_a = descriptionNode.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '',
|
|
454
|
+
title: ((_b = titleNode.textContent) === null || _b === void 0 ? void 0 : _b.trim()) || '',
|
|
455
|
+
};
|
|
456
|
+
mergedElements.push(element);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
return mergedElements;
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
const zonosHelloCss = ":host{font-family:Inter;display:block}: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{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--amino-page-background);font-size:var(--amino-font-size-s);border:var(--amino-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;width:100%;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--amino-text-color);position:absolute;background:var(--amino-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + var(--amino-space-16)));transform:translateX(calc(-100% + var(--amino-space-16)));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--amino-border);border-bottom:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--amino-red-100);border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--amino-red-100);color:var(--amino-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--amino-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:var(--amino-space-16);border:var(--amino-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:0;border-bottom-left-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:0;border-bottom-right-radius:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-16);padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--amino-space-16)));transform:translateX(calc(100% - var(--amino-space-16)));right:0;left:auto;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--amino-v3-shadow-medium);box-shadow:var(--amino-v3-shadow-medium);z-index:10;justify-self:center}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:var(--amino-space-32);right:var(--amino-space-32);border-radius:var(--amino-radius-4);padding:var(--amino-space-4);border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:var(--amino-space-32);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--amino-space-32)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--amino-radius-4);border-bottom-left-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--amino-radius-4);border-bottom-right-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:var(--amino-space-8);padding-right:var(--amino-space-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--amino-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--amino-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--amino-radius-4);width:24px}";
|
|
354
463
|
|
|
464
|
+
const PEEK_MESSAGE_DELAY_MS = 3000;
|
|
465
|
+
const RESIZE_DEBOUNCE_DELAY_MS = 500;
|
|
355
466
|
const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends HTMLElement {
|
|
356
467
|
constructor() {
|
|
357
468
|
super();
|
|
358
469
|
this.__registerHost();
|
|
359
470
|
this.__attachShadow();
|
|
360
471
|
this.getHelloPeekMessage = () => {
|
|
472
|
+
const isRestrictionPage = zonosStore.currentHelloPage === 'productDetail' ||
|
|
473
|
+
zonosStore.currentHelloPage === 'productList';
|
|
474
|
+
if (isRestrictionPage && this.allRestrictedItems.length) {
|
|
475
|
+
const clickMessage = translate('click to learn more');
|
|
476
|
+
const restrictMessage = zonosStore.currentHelloPage === 'productDetail'
|
|
477
|
+
? translate('Restricted item')
|
|
478
|
+
: translate('Restricted items found');
|
|
479
|
+
return `${restrictMessage} - ${clickMessage}`;
|
|
480
|
+
}
|
|
361
481
|
switch (zonosStore.currentHelloPage) {
|
|
362
482
|
case 'cart':
|
|
363
483
|
return translate(`Prepay duties and taxes at checkout`);
|
|
@@ -373,16 +493,116 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
373
493
|
this.showPeekMessage = true;
|
|
374
494
|
}
|
|
375
495
|
};
|
|
496
|
+
this.getNewItemRestrictions = async (newProducts) => {
|
|
497
|
+
const isRestrictionPage = zonosStore.currentHelloPage === 'productDetail' ||
|
|
498
|
+
zonosStore.currentHelloPage === 'productList';
|
|
499
|
+
// Only run detectItemRestrictions on product pages if the restrictionBehavior is not DISABLED
|
|
500
|
+
if (!isRestrictionPage ||
|
|
501
|
+
zonosStore.helloSettings.restrictionBehavior === 'DISABLED') {
|
|
502
|
+
return [];
|
|
503
|
+
}
|
|
504
|
+
const newRestrictions = await detectItemRestrictions(newProducts);
|
|
505
|
+
return newRestrictions;
|
|
506
|
+
};
|
|
507
|
+
this.triggerShowPeekMessage = () => {
|
|
508
|
+
this.peekMessage = this.getHelloPeekMessage();
|
|
509
|
+
const { peekMessageBehavior, peekMessageDelay } = zonosStore.helloSettings;
|
|
510
|
+
// peek message delay is passed in seconds, but setTimeout expects milliseconds
|
|
511
|
+
const peekMessageDelayToUse = peekMessageDelay * 1000;
|
|
512
|
+
if (peekMessageBehavior === 'ENABLED') {
|
|
513
|
+
setTimeout(() => {
|
|
514
|
+
this.enableShowPeekMessage();
|
|
515
|
+
setTimeout(() => {
|
|
516
|
+
this.showPeekMessage = false;
|
|
517
|
+
}, PEEK_MESSAGE_DELAY_MS);
|
|
518
|
+
}, peekMessageDelayToUse);
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
this.disableAddToCartButtons = () => {
|
|
522
|
+
// Remove disabled attribute from all "add to cart" buttons
|
|
523
|
+
if (this.productsOnPage.length) {
|
|
524
|
+
this.productsOnPage.forEach(product => {
|
|
525
|
+
var _a, _b;
|
|
526
|
+
const isRestricted = this.allRestrictedItems.some(item => item.itemDescription === product.description);
|
|
527
|
+
// if a product description matches a restrictedItems itemDescription, then disable the add to cart button. Otherwise, enable it.
|
|
528
|
+
if (isRestricted) {
|
|
529
|
+
(_a = product.cartButtonNode) === null || _a === void 0 ? void 0 : _a.setAttribute('disabled', 'disabled');
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
(_b = product.cartButtonNode) === null || _b === void 0 ? void 0 : _b.removeAttribute('disabled');
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
this.handleItemRestrictions = async () => {
|
|
538
|
+
this.productsOnPage = getProductsOnPage();
|
|
539
|
+
const newProducts = this.productsOnPage.filter(product => !this.allFoundProducts.some(foundProduct => foundProduct.title === product.title));
|
|
540
|
+
const newRestrictions = await this.getNewItemRestrictions(newProducts);
|
|
541
|
+
this.allRestrictedItems.push(...newRestrictions);
|
|
542
|
+
this.allFoundProducts.push(...newProducts);
|
|
543
|
+
this.disableAddToCartButtons();
|
|
544
|
+
};
|
|
545
|
+
this.reloadHelloData = async () => {
|
|
546
|
+
await this.handleItemRestrictions();
|
|
547
|
+
this.triggerShowPeekMessage();
|
|
548
|
+
void this.displayCurrency();
|
|
549
|
+
};
|
|
550
|
+
this.handleProductCountChange = debounce_1(() => {
|
|
551
|
+
const { productTitleElementSelector } = zonosStore.helloSettings;
|
|
552
|
+
if (productTitleElementSelector) {
|
|
553
|
+
const allProductsOnPage = getProductsOnPage();
|
|
554
|
+
if (this.allFoundProducts.length !== allProductsOnPage.length &&
|
|
555
|
+
window.location.href === this.initialUrl) {
|
|
556
|
+
// if allFoundProducts length is 0 (first render or no products), kill item restriction process as initial restrictions are handled in updateHelloOnPageChange
|
|
557
|
+
if (!this.allFoundProducts.length) {
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
void this.reloadHelloData();
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}, 1000);
|
|
564
|
+
this.watchProductCountChange = () => {
|
|
565
|
+
const observer = new MutationObserver(this.handleProductCountChange);
|
|
566
|
+
observer.observe(document.body, {
|
|
567
|
+
childList: true,
|
|
568
|
+
subtree: true,
|
|
569
|
+
});
|
|
570
|
+
};
|
|
571
|
+
this.updateHelloOnPageChange = () => {
|
|
572
|
+
// If the product count changes on the same url (loading more products), update the peek message and item restrictions
|
|
573
|
+
this.watchProductCountChange();
|
|
574
|
+
// Check url change on interval. If changed, update the peek message and item restrictions
|
|
575
|
+
setInterval(() => {
|
|
576
|
+
if (window.location.href !== this.initialUrl) {
|
|
577
|
+
const prevUrl = this.initialUrl && new URL(this.initialUrl);
|
|
578
|
+
const initialZonosCountry = prevUrl && prevUrl.searchParams.get('zonosCountry');
|
|
579
|
+
// If the zonosCountry url param changes, reset current item restriction tracking
|
|
580
|
+
if (initialZonosCountry !== localizationStore.selectedCountryCode) {
|
|
581
|
+
this.allFoundProducts = [];
|
|
582
|
+
this.allRestrictedItems = [];
|
|
583
|
+
this.productsOnPage = [];
|
|
584
|
+
}
|
|
585
|
+
this.initialUrl = window.location.href;
|
|
586
|
+
zonosStore.currentHelloPage = getCurrentHelloLocalePage();
|
|
587
|
+
const currentUrl = new URL(window.location.href);
|
|
588
|
+
const zonosCountry = currentUrl.searchParams.get('zonosCountry');
|
|
589
|
+
if (!zonosCountry) {
|
|
590
|
+
setZonosCountryUrlParam(localizationStore.selectedCountryCode);
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
void this.reloadHelloData();
|
|
594
|
+
}
|
|
595
|
+
}, 1000);
|
|
596
|
+
};
|
|
376
597
|
this.changeShowDialog = (value) => {
|
|
377
598
|
this.showDialog = value;
|
|
378
599
|
};
|
|
379
600
|
this.shouldAnimateLeftDesktop = () => {
|
|
380
|
-
// Get
|
|
601
|
+
// Get Hello position (relative = desktop, fixed = mobile)
|
|
381
602
|
const elPosition = this.helloRef && getComputedStyle(this.helloRef).position;
|
|
382
603
|
// If relative position, determine if peek message should animate left or right. Mobile is pre-determined.
|
|
383
604
|
if (this.helloRef && elPosition === 'relative') {
|
|
384
605
|
const hasMoreSpaceOnRight = getHasMoreSpaceOnRight(this.helloRef);
|
|
385
|
-
// Determine peek message direction
|
|
386
606
|
return hasMoreSpaceOnRight;
|
|
387
607
|
}
|
|
388
608
|
};
|
|
@@ -393,26 +613,19 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
393
613
|
this.zonosStoreHelloSettings = zonosStore.helloSettings;
|
|
394
614
|
this.showDialog = false;
|
|
395
615
|
this.peekMessage = '';
|
|
616
|
+
this.initialUrl = '';
|
|
617
|
+
this.allRestrictedItems = [];
|
|
618
|
+
this.allFoundProducts = [];
|
|
619
|
+
this.productsOnPage = [];
|
|
396
620
|
}
|
|
397
|
-
|
|
398
|
-
const initInterval = setInterval(() => {
|
|
621
|
+
componentWillLoad() {
|
|
622
|
+
const initInterval = setInterval(async () => {
|
|
399
623
|
if (!this.helloRef) {
|
|
400
624
|
return;
|
|
401
625
|
}
|
|
402
626
|
if (zonosStore.loadedConfig) {
|
|
403
627
|
this.helloRef.setAttribute('data-zonos-hello-loaded', '');
|
|
404
|
-
this.
|
|
405
|
-
const { peekMessageBehavior, peekMessageDelay } = zonosStore.helloSettings;
|
|
406
|
-
// peek message delay is passed in seconds, but setTimeout expects milliseconds
|
|
407
|
-
const peekMessageDelayToUse = peekMessageDelay * 1000;
|
|
408
|
-
if (peekMessageBehavior === 'ENABLED') {
|
|
409
|
-
setTimeout(() => {
|
|
410
|
-
this.enableShowPeekMessage();
|
|
411
|
-
setTimeout(() => {
|
|
412
|
-
this.showPeekMessage = false;
|
|
413
|
-
}, 3000);
|
|
414
|
-
}, peekMessageDelayToUse);
|
|
415
|
-
}
|
|
628
|
+
this.updateHelloOnPageChange();
|
|
416
629
|
clearInterval(initInterval);
|
|
417
630
|
}
|
|
418
631
|
}, 100);
|
|
@@ -451,10 +664,10 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
451
664
|
currencyFormat(value);
|
|
452
665
|
}
|
|
453
666
|
handleResize() {
|
|
454
|
-
debounce_1(this.render.bind(this),
|
|
667
|
+
debounce_1(this.render.bind(this), RESIZE_DEBOUNCE_DELAY_MS);
|
|
455
668
|
}
|
|
456
669
|
render() {
|
|
457
|
-
var _a;
|
|
670
|
+
var _a, _b;
|
|
458
671
|
const isExcludedUrl = (_a = zonosStore.helloSettings.excludedUrlPatterns) === null || _a === void 0 ? void 0 : _a.some(pattern => new RegExp(pattern).test(window.location.href));
|
|
459
672
|
if (isExcludedUrl) {
|
|
460
673
|
log('Hello is excluded on this url', 'warn');
|
|
@@ -470,6 +683,7 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
470
683
|
const isOnTop = mobileLocation.includes('TOP');
|
|
471
684
|
const appearanceSettings = mergeConfig(zonosStore.appearance, this.appearanceSettingsOverride);
|
|
472
685
|
const { theme } = appearanceSettings;
|
|
686
|
+
const restrictedItemsOnPage = (_b = this.allRestrictedItems) === null || _b === void 0 ? void 0 : _b.filter(product => this.productsOnPage.some(restriction => restriction.description === product.itemDescription));
|
|
473
687
|
return (h(Host, { class: "zonos--hello zonos--elements", "data-theme": theme }, selectedCountryCode && (h("div", { class: "zonos--hello-wrapper" }, h("button", { class: classes([
|
|
474
688
|
'zonos--hello-widget',
|
|
475
689
|
this.showPeekMessage && 'zonos--hello-show-peek-message',
|
|
@@ -477,13 +691,15 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
477
691
|
isOnLeft &&
|
|
478
692
|
'zonos--hello-widget-left zonos--hello-widget-animate-from-left',
|
|
479
693
|
isOnTop && 'zonos--hello-widget-top',
|
|
694
|
+
!!this.allRestrictedItems.length &&
|
|
695
|
+
'zonos--hello-has-restrictions',
|
|
480
696
|
]), onClick: () => {
|
|
481
697
|
this.changeShowDialog(!this.showDialog);
|
|
482
698
|
}, onMouseEnter: () => this.enableShowPeekMessage(), onMouseLeave: () => (this.showPeekMessage = false), ref: el => el && (this.helloRef = el) }, h("span", { class: "zonos--hello-message" }, this.peekMessage), selectedCountryCode && (h("div", { class: "zonos--hello-country-flag-wrapper" }, h("zonos-country-flag", { class: "zonos--hello-country-flag", countryCode: selectedCountryCode })))), h("div", { class: classes([
|
|
483
699
|
'zonos--hello-dialog-wrapper',
|
|
484
700
|
this.mobileLocationOverride &&
|
|
485
701
|
'zonos--hello-dialog-wrapper-mobile-override',
|
|
486
|
-
]), style: { height: this.showDialog ? 'fit-content' : '0px' } }, h("zonos-hello-dialog", { animateFromLeftOverride: this.animateFromLeftOverride, appearanceSettings: appearanceSettings, isOpen: this.showDialog, mobileLocationOverride: this.mobileLocationOverride, setIsOpen: this.changeShowDialog }))))));
|
|
702
|
+
]), style: { height: this.showDialog ? 'fit-content' : '0px' } }, h("zonos-hello-dialog", { animateFromLeftOverride: this.animateFromLeftOverride, appearanceSettings: appearanceSettings, isOpen: this.showDialog, mobileLocationOverride: this.mobileLocationOverride, restrictedItems: restrictedItemsOnPage, setIsOpen: this.changeShowDialog }))))));
|
|
487
703
|
}
|
|
488
704
|
static get style() { return zonosHelloCss; }
|
|
489
705
|
}, [1, "zonos-hello", {
|
|
@@ -494,6 +710,10 @@ const ZonosHello$1 = /*@__PURE__*/ proxyCustomElement(class ZonosHello extends H
|
|
|
494
710
|
"zonosStoreHelloSettings": [32],
|
|
495
711
|
"showDialog": [32],
|
|
496
712
|
"peekMessage": [32],
|
|
713
|
+
"initialUrl": [32],
|
|
714
|
+
"allRestrictedItems": [32],
|
|
715
|
+
"allFoundProducts": [32],
|
|
716
|
+
"productsOnPage": [32],
|
|
497
717
|
"displayCurrency": [64],
|
|
498
718
|
"convertAndFormat": [64],
|
|
499
719
|
"convert": [64],
|
|
@@ -503,13 +723,18 @@ function defineCustomElement$1() {
|
|
|
503
723
|
if (typeof customElements === "undefined") {
|
|
504
724
|
return;
|
|
505
725
|
}
|
|
506
|
-
const components = ["zonos-hello", "zonos-button", "zonos-card", "zonos-country-flag", "zonos-country-select", "zonos-custom-message", "zonos-hello-dialog", "zonos-hello-dialog-footer", "zonos-icon", "zonos-spinner", "zonos-text", "zonos-v-stack"];
|
|
726
|
+
const components = ["zonos-hello", "zonos-banner", "zonos-button", "zonos-card", "zonos-country-flag", "zonos-country-select", "zonos-custom-message", "zonos-hello-dialog", "zonos-hello-dialog-footer", "zonos-icon", "zonos-spinner", "zonos-text", "zonos-v-stack"];
|
|
507
727
|
components.forEach(tagName => { switch (tagName) {
|
|
508
728
|
case "zonos-hello":
|
|
509
729
|
if (!customElements.get(tagName)) {
|
|
510
730
|
customElements.define(tagName, ZonosHello$1);
|
|
511
731
|
}
|
|
512
732
|
break;
|
|
733
|
+
case "zonos-banner":
|
|
734
|
+
if (!customElements.get(tagName)) {
|
|
735
|
+
defineCustomElement$d();
|
|
736
|
+
}
|
|
737
|
+
break;
|
|
513
738
|
case "zonos-button":
|
|
514
739
|
if (!customElements.get(tagName)) {
|
|
515
740
|
defineCustomElement$c();
|