@zonos/elements 1.3.218 → 1.3.220
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/buildCartItemsByTempCart-309fcebf.js +28 -0
- package/dist/cjs/{cart-c54d05ce.js → cart-9a9ae4b9.js} +90 -47
- package/dist/cjs/cleanHtmlMarkdown-577d0a77.js +999 -0
- package/dist/cjs/index.cjs.js +19 -9
- package/dist/cjs/isCollectMobileTablet-7a9413e3.js +175 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/localization-0169b27d.js +738 -0
- package/dist/cjs/{paypal-d36b5dd1.js → paypal-9ee374a0.js} +12 -8
- package/dist/cjs/placeTestOrder-0dfff170.js +93 -0
- package/dist/cjs/{localization-ab7e1902.js → translationStore-0c67178f.js} +1023 -734
- package/dist/cjs/zonos-address_11.cjs.entry.js +116 -74
- package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
- package/dist/cjs/{zonos-banner.cjs.entry.js → zonos-banner_2.cjs.entry.js} +40 -0
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/{zonos-cart-items_14.cjs.entry.js → zonos-cart-items_12.cjs.entry.js} +70 -1292
- package/dist/cjs/zonos-checkout.cjs.entry.js +25 -48
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +92 -0
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +811 -0
- package/dist/cjs/zonos-collect.cjs.entry.js +468 -0
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +168 -0
- package/dist/cjs/zonos-controller.cjs.entry.js +84 -28
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +11 -10
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +23 -5
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +34 -33
- package/dist/cjs/zonos-hello.cjs.entry.js +8 -7
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -5
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +8 -5
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +10 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +5 -1
- package/dist/collection/components/checkout/zonos-collect/assets/ChevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/assets/empty-item.jpeg +0 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.css +60 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.js +39 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/assets/RemoveIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/assets/SuccessIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.css +90 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +405 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/chevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/globe.svg +3 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/zonosIconDark.svg +10 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/zonosIconLight.svg +10 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/assets/zonosWordmark.svg +7 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.css +152 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +164 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/assets/ChevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/assets/ChevronUpIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.css +109 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.js +194 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/assets/CheckmarkLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/assets/RemoveLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.css +98 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +369 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.css +71 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +151 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.css +78 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +115 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect.css +349 -0
- package/dist/collection/components/checkout/zonos-collect/zonos-collect.js +547 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.css +38 -0
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +63 -0
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-skeleton/assets/RemoveLineIcon.svg +3 -0
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.css +40 -0
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +102 -0
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +8 -5
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
- package/dist/collection/components/common/zonos-text/zonos-text.css +1 -0
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +91 -25
- package/dist/collection/components/paypal/zonos-paypal-payment.js +13 -2
- package/dist/collection/components/store/checkout/cart.js +36 -15
- package/dist/collection/components/store/checkout/collect.js +160 -0
- package/dist/collection/components/store/checkout/paypal.js +4 -2
- package/dist/collection/components/store/checkout/stripe.js +31 -12
- package/dist/collection/components/store/translationStore/strings.arabic.js +51 -0
- package/dist/collection/components/store/translationStore/strings.base.js +51 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +51 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +51 -0
- package/dist/collection/components/store/translationStore/strings.french.js +51 -0
- package/dist/collection/components/store/translationStore/strings.german.js +51 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +51 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +51 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +51 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +51 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +51 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +51 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +51 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +51 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +51 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +51 -0
- package/dist/collection/components/store/translationStore.js +2 -1
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +35 -18
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +29 -4
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +9 -1
- package/dist/collection/components/utils/checkout/initCollect.js +15 -0
- package/dist/collection/components/utils/checkout/isCollectMobileTablet.js +10 -0
- package/dist/collection/components/utils/checkout/renderCheckoutCurrency.js +10 -1
- package/dist/collection/components/utils/renderFallback.js +7 -0
- package/dist/collection/scripts/_getZonosQaUrl.js +5 -1
- package/dist/collection/scripts/_zonosBase.js +7 -1
- package/dist/collection/types/checkout/api/PartyInfo.js +1 -0
- package/dist/collection/types/generated/graphql.internal.types.js +113 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/esm/buildCartItemsByTempCart-c4488f73.js +26 -0
- package/dist/esm/{cart-bb0ee971.js → cart-b2dd578c.js} +68 -27
- package/dist/esm/cleanHtmlMarkdown-b5b18743.js +997 -0
- package/dist/esm/index.js +19 -9
- package/dist/esm/isCollectMobileTablet-7f9a5e2b.js +168 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/localization-d7125e4e.js +719 -0
- package/dist/esm/{paypal-bd4520eb.js → paypal-555bbf1e.js} +7 -4
- package/dist/esm/placeTestOrder-2d67c1a9.js +90 -0
- package/dist/esm/{localization-d8326254.js → translationStore-13502f49.js} +1023 -718
- package/dist/esm/zonos-address_11.entry.js +85 -43
- package/dist/esm/zonos-badge.entry.js +3 -3
- package/dist/esm/{zonos-banner.entry.js → zonos-banner_2.entry.js} +40 -1
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/{zonos-cart-items_14.entry.js → zonos-cart-items_12.entry.js} +20 -1240
- package/dist/esm/zonos-checkout.entry.js +6 -29
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +86 -0
- package/dist/esm/zonos-collect-finish_6.entry.js +802 -0
- package/dist/esm/zonos-collect.entry.js +464 -0
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-confirm-dialog_2.entry.js +163 -0
- package/dist/esm/zonos-controller.entry.js +84 -28
- package/dist/esm/zonos-country-flag.entry.js +2 -1
- package/dist/esm/zonos-country-select_4.entry.js +11 -10
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +23 -5
- package/dist/esm/zonos-hello-dialog.entry.js +6 -5
- package/dist/esm/zonos-hello.entry.js +2 -1
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +6 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-stripe-input.entry.js +9 -6
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/buildCartItemsByTempCart-c4488f73.js +1 -0
- package/dist/esm-es5/cart-b2dd578c.js +1 -0
- package/dist/esm-es5/cleanHtmlMarkdown-b5b18743.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/isCollectMobileTablet-7f9a5e2b.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-d7125e4e.js +1 -0
- package/dist/esm-es5/paypal-555bbf1e.js +17 -0
- package/dist/esm-es5/placeTestOrder-2d67c1a9.js +1 -0
- package/dist/esm-es5/translationStore-13502f49.js +1 -0
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner_2.entry.js +1 -0
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -0
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -0
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -0
- package/dist/esm-es5/zonos-collect.entry.js +1 -0
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -0
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/scripts/index.d.ts +470 -2
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.d.ts +4 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.d.ts +50 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.d.ts +25 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.d.ts +29 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.d.ts +62 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.d.ts +22 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.d.ts +10 -0
- package/dist/types/components/checkout/zonos-collect/zonos-collect.d.ts +86 -0
- package/dist/types/components/common/zonos-h-stack/zonos-h-stack.d.ts +9 -0
- package/dist/types/components/common/zonos-skeleton/zonos-skeleton.d.ts +17 -0
- package/dist/types/components/main/zonos-controller.d.ts +5 -0
- package/dist/types/components/paypal/zonos-paypal-payment.d.ts +3 -0
- package/dist/types/components/store/checkout/cart.d.ts +23 -3
- package/dist/types/components/store/checkout/collect.d.ts +21 -0
- package/dist/types/components/store/checkout/paypal.d.ts +4 -3
- package/dist/types/components/store/checkout/stripe.d.ts +6 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +51 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +51 -0
- package/dist/types/components/store/translationStore.d.ts +2 -1
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +1 -2
- package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +3 -1
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/checkout/initCollect.d.ts +1 -0
- package/dist/types/components/utils/checkout/isCollectMobileTablet.d.ts +4 -0
- package/dist/types/components/utils/renderFallback.d.ts +6 -0
- package/dist/types/components.d.ts +401 -2
- package/dist/types/scripts/_zonosBase.d.ts +5 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +5 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +9 -1
- package/dist/types/types/checkout/api/CreateParty.d.ts +24 -0
- package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +6 -1
- package/dist/types/types/checkout/api/PartyInfo.d.ts +24 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +616 -5
- package/dist/types/types/generated/graphql.internal.types.ts +626 -6
- package/dist/types/types/index.d.ts +1 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-7b5de646.entry.js → p-02667a58.entry.js} +1 -1
- package/dist/zonos-elements/p-031d646e.system.js +1 -0
- package/dist/zonos-elements/p-0e07e1d6.entry.js +1 -0
- package/dist/zonos-elements/p-0ef2a242.js +1 -0
- package/dist/zonos-elements/p-126087a2.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c7d5d45d.entry.js → p-14f9bc8c.entry.js} +1 -1
- package/dist/zonos-elements/p-27d9abab.js +1 -0
- package/dist/zonos-elements/p-2813d72e.system.js +1 -0
- package/dist/zonos-elements/p-295d9c07.system.entry.js +1 -0
- package/dist/zonos-elements/p-29c80a34.js +1 -0
- package/dist/zonos-elements/p-2a6c964d.js +1 -0
- package/dist/zonos-elements/p-2b3c7c77.system.entry.js +1 -0
- package/dist/zonos-elements/p-2b8897d1.system.entry.js +1 -0
- package/dist/zonos-elements/{p-544c173a.system.entry.js → p-30432622.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3462e9e4.system.entry.js +1 -0
- package/dist/zonos-elements/p-372c2fc5.entry.js +1 -0
- package/dist/zonos-elements/p-3c1b1be1.system.entry.js +1 -0
- package/dist/zonos-elements/p-40a4266f.js +1 -0
- package/dist/zonos-elements/{p-47ffacd8.system.entry.js → p-421dfb66.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-288761b1.system.entry.js → p-4f8563ad.system.entry.js} +1 -1
- package/dist/zonos-elements/p-52d35358.system.entry.js +1 -0
- package/dist/zonos-elements/p-567f7de7.entry.js +1 -0
- package/dist/zonos-elements/p-5d9410da.entry.js +1 -0
- package/dist/zonos-elements/p-637b22ee.system.entry.js +1 -0
- package/dist/zonos-elements/p-63a42823.entry.js +1 -0
- package/dist/zonos-elements/p-69451a50.system.js +1 -0
- package/dist/zonos-elements/p-6b3a0874.entry.js +1 -0
- package/dist/zonos-elements/p-73c1e91f.js +1 -0
- package/dist/zonos-elements/p-759ef3ca.entry.js +1 -0
- package/dist/zonos-elements/p-79d8c3f3.system.entry.js +1 -0
- package/dist/zonos-elements/{p-3f31901f.entry.js → p-7c4e7651.entry.js} +1 -1
- package/dist/zonos-elements/{p-1c45cd15.entry.js → p-7d2d2c94.entry.js} +1 -1
- package/dist/zonos-elements/{p-1ac8bfbb.system.entry.js → p-7e5bd9af.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7ecbb2cb.entry.js +1 -0
- package/dist/zonos-elements/p-81b357f7.system.js +1 -1
- package/dist/zonos-elements/p-82e88a33.system.js +1 -0
- package/dist/zonos-elements/p-849b47aa.entry.js +1 -0
- package/dist/zonos-elements/p-8dd47520.system.entry.js +1 -0
- package/dist/zonos-elements/p-932600b7.js +1 -0
- package/dist/zonos-elements/p-960e0ab1.system.entry.js +1 -0
- package/dist/zonos-elements/p-9c5b8239.system.js +1 -0
- package/dist/zonos-elements/{p-d55aec11.system.entry.js → p-9fdd3264.system.entry.js} +1 -1
- package/dist/zonos-elements/p-a08a005d.entry.js +1 -0
- package/dist/zonos-elements/p-a10de7fb.entry.js +1 -0
- package/dist/zonos-elements/p-a49b5e7f.system.entry.js +1 -0
- package/dist/zonos-elements/{p-62813488.entry.js → p-a5b0a636.entry.js} +1 -1
- package/dist/zonos-elements/p-a61a9b65.system.entry.js +1 -0
- package/dist/zonos-elements/{p-d6fa2dc2.entry.js → p-a77ed1b9.entry.js} +1 -1
- package/dist/zonos-elements/{p-eeb01de6.system.entry.js → p-a800965d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b2ae8eb7.system.js +1 -0
- package/dist/zonos-elements/p-b3d5bcf9.entry.js +1 -0
- package/dist/zonos-elements/{p-da4c01da.system.entry.js → p-b669050d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b9e9b82f.system.entry.js +1 -0
- package/dist/zonos-elements/{p-714c28b1.system.entry.js → p-ba18c5f5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-bbf48b31.entry.js +1 -0
- package/dist/zonos-elements/{p-77666360.entry.js → p-c4b3c878.entry.js} +1 -1
- package/dist/zonos-elements/p-c7b57886.js +17 -0
- package/dist/zonos-elements/p-c803753e.entry.js +1 -0
- package/dist/zonos-elements/{p-e640e8b8.entry.js → p-cbb01de9.entry.js} +1 -1
- package/dist/zonos-elements/p-ce15d62d.system.js +1 -0
- package/dist/zonos-elements/p-d291e964.system.entry.js +1 -0
- package/dist/zonos-elements/p-d3485a03.system.js +1 -0
- package/dist/zonos-elements/{p-59eaebe3.system.entry.js → p-de626806.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e5388438.system.entry.js +1 -0
- package/dist/zonos-elements/p-e77b6e42.entry.js +1 -0
- package/dist/zonos-elements/p-ea8aff21.system.js +17 -0
- package/dist/zonos-elements/{p-7ab62a26.system.entry.js → p-eb6a35ce.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-92cc26b7.system.entry.js → p-ee6f8c02.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a98b1e8d.entry.js → p-efa6203f.entry.js} +1 -1
- package/dist/zonos-elements/{p-edc77ea1.entry.js → p-f4fa8720.entry.js} +1 -1
- package/dist/zonos-elements/{p-ebaaaee9.entry.js → p-fa90adb8.entry.js} +1 -1
- package/dist/zonos-elements/p-fe7e2dc4.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/zonos-card.cjs.entry.js +0 -49
- package/dist/esm/zonos-card.entry.js +0 -45
- package/dist/esm-es5/cart-bb0ee971.js +0 -1
- package/dist/esm-es5/localization-d8326254.js +0 -1
- package/dist/esm-es5/paypal-bd4520eb.js +0 -17
- package/dist/esm-es5/zonos-banner.entry.js +0 -1
- package/dist/esm-es5/zonos-card.entry.js +0 -1
- package/dist/esm-es5/zonos-cart-items_14.entry.js +0 -1
- package/dist/zonos-elements/p-043f57e8.system.entry.js +0 -1
- package/dist/zonos-elements/p-0631d2b9.js +0 -1
- package/dist/zonos-elements/p-0a6ac265.system.js +0 -1
- package/dist/zonos-elements/p-0f041dc5.system.entry.js +0 -1
- package/dist/zonos-elements/p-1432a217.system.entry.js +0 -1
- package/dist/zonos-elements/p-1b51b738.system.entry.js +0 -1
- package/dist/zonos-elements/p-3a1513ae.system.entry.js +0 -1
- package/dist/zonos-elements/p-3b8d11dd.entry.js +0 -1
- package/dist/zonos-elements/p-4333afcb.entry.js +0 -1
- package/dist/zonos-elements/p-4d0d89da.system.entry.js +0 -1
- package/dist/zonos-elements/p-5dd9cb44.system.entry.js +0 -1
- package/dist/zonos-elements/p-605a21ac.entry.js +0 -1
- package/dist/zonos-elements/p-674981ad.system.js +0 -1
- package/dist/zonos-elements/p-6d090b53.entry.js +0 -1
- package/dist/zonos-elements/p-73c8c551.system.entry.js +0 -1
- package/dist/zonos-elements/p-795d223d.entry.js +0 -1
- package/dist/zonos-elements/p-8218ff62.system.entry.js +0 -1
- package/dist/zonos-elements/p-82f80c8a.entry.js +0 -1
- package/dist/zonos-elements/p-88f7256d.js +0 -1
- package/dist/zonos-elements/p-8b083884.entry.js +0 -1
- package/dist/zonos-elements/p-a449940d.entry.js +0 -1
- package/dist/zonos-elements/p-a5a4ad2f.entry.js +0 -1
- package/dist/zonos-elements/p-a5d45585.system.entry.js +0 -1
- package/dist/zonos-elements/p-a751e819.system.entry.js +0 -1
- package/dist/zonos-elements/p-ad556be6.entry.js +0 -1
- package/dist/zonos-elements/p-b4792af0.entry.js +0 -1
- package/dist/zonos-elements/p-b9ff6458.entry.js +0 -1
- package/dist/zonos-elements/p-d3dbae8c.system.js +0 -1
- package/dist/zonos-elements/p-ebb9b902.system.js +0 -17
- package/dist/zonos-elements/p-ef1ce617.system.entry.js +0 -1
- package/dist/zonos-elements/p-ef75da6f.js +0 -17
- package/dist/zonos-elements/p-f3dbe934.entry.js +0 -1
- package/dist/zonos-elements/p-f741407e.system.entry.js +0 -1
|
@@ -105,14 +105,14 @@ export class ZonosStripeSelect {
|
|
|
105
105
|
const fontSize = zonosStore.appearance.fontSizeInputValue || 16;
|
|
106
106
|
const hasContent = this.internalValue || this.selectPlaceholder;
|
|
107
107
|
const showClearButton = this.isClearable && this.internalValue && !this.isDisabled;
|
|
108
|
-
return (h(Host, { key: '
|
|
108
|
+
return (h(Host, { key: 'e781d691f1f1f72ceed06c488af7f427ed4f82d0', class: classes([
|
|
109
109
|
'zonos--select zonos--elements',
|
|
110
110
|
isDark && 'dark',
|
|
111
111
|
this.isError && 'has-error',
|
|
112
|
-
]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius(), '--zonos--font-family': zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, h("div", { key: '
|
|
112
|
+
]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius(), '--zonos--font-family': zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, h("div", { key: '4df83fa9bcb12e94e2d4bba3d6f31a4f56006097', class: classes([
|
|
113
113
|
'zonos--label-wrapper',
|
|
114
114
|
this.isDisabled && 'disabled',
|
|
115
|
-
]) }, h("select", Object.assign({ key: '
|
|
115
|
+
]) }, h("select", Object.assign({ key: '31daa88fdaeb8a35055b97ade6aa10bbd234568a' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: classes([
|
|
116
116
|
'zonos--floated-select',
|
|
117
117
|
!!this.selectLabel && 'has-label',
|
|
118
118
|
hasContent && 'has-content',
|
|
@@ -122,9 +122,9 @@ export class ZonosStripeSelect {
|
|
|
122
122
|
this.selectChange.emit(select.value);
|
|
123
123
|
this.selectedValue = select.value;
|
|
124
124
|
this.el.dispatchEvent(new Event('change'));
|
|
125
|
-
}, required: this.required }), h("option", { key: '
|
|
125
|
+
}, required: this.required }), h("option", { key: '4c5c09493d0e9d38bc56860682c092017dc927ff', disabled: true, selected: !this.internalValue, value: "" }, this.selectPlaceholder || translate('Select')), this.internalOptions.map(option => (h("option", { key: option.value, selected: this.internalValue === option.value ||
|
|
126
126
|
// Sometimes google returns the label not the code for some countries
|
|
127
|
-
this.internalValue === option.label, value: option.value }, option.label)))), h("div", { key: '
|
|
127
|
+
this.internalValue === option.label, value: option.value }, option.label)))), h("div", { key: 'abe6ea181a207b8b85232226078c92ab1a8b6618', class: "zonos--floated-label" }, h("label", { key: 'c079f2f21289e5ba06906fd7e29b3c8216c6ae01', htmlFor: this.selectId }, this.selectLabel)), h("div", { key: '3cad61609828a9b38a4a38625629481c9fb5411e', class: "zonos--actions-wrapper" }, showClearButton && (h("button", { key: 'f24323bdbd652cff52bec827f3a93a2e343e35c4', "aria-label": "Clear selection", class: "zonos--clear-button", onClick: this.handleClear, tabIndex: 0, type: "button" }, h("zonos-icon", { key: 'e8fe204b510477855de4dfee29d1200f30c50933', class: "zonos--clear-icon", content: RemoveLineIcon, iconColor: "gray-1200" }))), h("zonos-icon", { key: 'f071765d705d67b741f9381bbe96e2e8beb0968d', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon, iconColor: "gray-800" }))), this.error && (h("zonos-text", { key: '7425ced4032df77a7f1219f9c03caedcd1a55841', textColor: "red-600" }, this.error))));
|
|
128
128
|
}
|
|
129
129
|
static get is() { return "zonos-stripe-select"; }
|
|
130
130
|
static get encapsulation() { return "shadow"; }
|
|
@@ -9,9 +9,9 @@ export class ZonosToggle {
|
|
|
9
9
|
this.options = [];
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: '1b844d11272181b9c81c2bfb03a13a1ad412cb9f', class: classes(['zonos--elements zonos--toggle']), style: {
|
|
13
13
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
14
|
-
} }, h("div", { key: '
|
|
14
|
+
} }, h("div", { key: 'f5991e19ea02a82ae1f6e7529bb3bb77e66b7165', class: "wrapper" }, this.options.map(option => {
|
|
15
15
|
const selected = option.value === this.value;
|
|
16
16
|
return (h("button", { class: classes(['zonos--option', selected && 'selected']), key: option.value, onClick: () => {
|
|
17
17
|
this.toggleChanged.emit(option.value);
|
|
@@ -13,10 +13,10 @@ export class ZonosTooltip {
|
|
|
13
13
|
this.showTooltip = false;
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: 'd96671c8c9b426cbde335b3d8024a56f4e188281', class: "zonos--elements" }, h("div", { key: 'de75e111a65033501e9907992df0d9ae8cbf5df5', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, h("slot", { key: '3d8297ef44c97112e29a62a31b3acf47789726a9' }), h("div", { key: 'ee777f084991e28255a2957cf3585110f14c65d5', class: classes([
|
|
17
17
|
this.showTooltip && 'zonos--show-tooltip',
|
|
18
18
|
'zonos--tooltip-content',
|
|
19
|
-
]) }, h("zonos-text", { key: '
|
|
19
|
+
]) }, h("zonos-text", { key: 'fb22b220feb39c31111d45a393024e7df4d3e314', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), h("zonos-text", { key: '6019665e4e0b8eb4390a70b5d90cdcc4f16c6ba3', size: "xs", textColor: "gray-0" }, this.subtitle)))));
|
|
20
20
|
}
|
|
21
21
|
static get is() { return "zonos-tooltip"; }
|
|
22
22
|
static get encapsulation() { return "shadow"; }
|
|
@@ -11,9 +11,9 @@ export class VStack {
|
|
|
11
11
|
this.spacing = 24;
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: 'd65f235ba8ffaefff1ec5e5bbd8bba1313e97a83', style: {
|
|
15
15
|
'--zonos--font-family': zonosStoreFontFamily(),
|
|
16
|
-
} }, h("div", { key: '
|
|
16
|
+
} }, h("div", { key: '31806036975f9640fdccafcc11053596dd17f4ef', class: classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, h("slot", { key: 'a3c5a3f592f86cfd9ebb810c72e2e22011ec4758' }))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "zonos-v-stack"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -106,10 +106,10 @@ export class ZonosVirtualScroll {
|
|
|
106
106
|
render() {
|
|
107
107
|
const { width: containerWidth } = this.containerDimensions;
|
|
108
108
|
const visibleItems = this.getVisibleItems();
|
|
109
|
-
return (h(Host, { key: '
|
|
109
|
+
return (h(Host, { key: '931ec0dfcbb239d4e3f6f127acfffd22b4b9316f', class: classes(['zonos--virtual-scroll']) }, h("div", { key: '65b5823473b15304317e7a3ec51efd807b3215fa', class: classes(['scroller']), style: {
|
|
110
110
|
height: `${this.totalHeight}px`,
|
|
111
111
|
width: `${containerWidth}px`,
|
|
112
|
-
} }), h("div", { key: '
|
|
112
|
+
} }), h("div", { key: 'ac8fae50951a3a03ff76ebcef744d739c03bbad8', class: classes(['item-container']), style: {
|
|
113
113
|
height: `${this.totalHeight}px`,
|
|
114
114
|
} }, visibleItems.map(({ element }) => element))));
|
|
115
115
|
}
|
|
@@ -19,7 +19,7 @@ export class ZonosComponent {
|
|
|
19
19
|
return format(this.first, this.middle, this.last);
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return h("div", { key: '
|
|
22
|
+
return h("div", { key: 'ce1a6a656f02ba26460066561b08f449e9e042bc' }, "Hello, World! I'm ", this.getText());
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "zonos-component"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -27,9 +27,9 @@ export class ZonosHelloDialogFooter {
|
|
|
27
27
|
const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
|
|
28
28
|
// Only use gray-0 (white) when the background color is dark (apply inverted color if the element is using dark theme variable)
|
|
29
29
|
const mainColor = primaryColor && isDarkColor(primaryColor) ? 'white' : 'black';
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: 'ff7ca3834fbd8febed2ad016add7832c84b3d067', class: "zonos--elements" }, h("div", { key: 'f3c28cb5afe06a98789e61ed233317402eb7deca', class: "zonos--hello-dialog-footer", style: {
|
|
31
31
|
'--zonos--primary-color': primaryColor,
|
|
32
|
-
} }, h("a", { key: '
|
|
32
|
+
} }, h("a", { key: 'e229fcdcc64734e9ed762f5324c7c35ae88a8e17', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '7eb45e7359e7c5d411801d29f06d7c700633c7f3', "aria-label": "Zonos Logo", autoHeight: true, content: mainColor === 'black' ? ZonosIconLight : ZonosIconDark, iconColor: mainColor, size: 108 })), h("div", { key: '9dba0c118f8d7cac5c9aaae36d8270f2a8cb8360', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'd40f08f0e1437290ed4fbbd6ad4dd6e61878804c', buttonColor: mainColor, icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: '6312ac59bc58142aee85702b3f4538949255cbb9', buttonColor: mainColor, icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "zonos-hello-dialog-footer"; }
|
|
35
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -308,18 +308,18 @@ export class ZonosHelloDialog {
|
|
|
308
308
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
309
309
|
const currentPage = this.getCurrentPageEnum();
|
|
310
310
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
311
|
-
return (h(Host, { key: '
|
|
311
|
+
return (h(Host, { key: '178654e9b701bb68a4d47495897445cf87806c37', class: "zonos--elements" }, h("div", { key: 'eb0f3ced0226513df3911e0664aff10d523fdac7', class: classes([
|
|
312
312
|
'zonos--hello-dialog',
|
|
313
313
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
314
314
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
315
315
|
!!this.mobileLocationOverride &&
|
|
316
316
|
'zonos--hello-dialog-mobile-override',
|
|
317
317
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
318
|
-
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '
|
|
318
|
+
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'f185f2d707a3b9628896a7e15f2a0ad20da112ec' }, h("div", { key: '80c53ad6728b221bedbfaec2ec77fee96029e12b', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '31b71832bee5e4515dbf060746f022d9c91502af', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { key: '5f11c3b0355ba0c85cf134522b6e21fd28dfe16c', spacing: 24 }, h("zonos-country-flag", { key: '6d6dcad7e3700f67c4261995d867aacb42715404', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '7a325a9b94e58dc5f8dba5baba9a00f835466ee2', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '24e2407475b740b50ca07fe9278363fdefc27d01', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '6b38dee6ec6fcf39e02c5225155e2af69c367a39', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '567d126d05f236fa0aab764d78b1692ebfe82f8b', spacing: 8 }, this.restrictedItems.map(item => {
|
|
319
319
|
var _a;
|
|
320
320
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
321
|
-
}), h("zonos-card", { key: '
|
|
322
|
-
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '
|
|
321
|
+
}), h("zonos-card", { key: 'e96943bc58d47531f748217858939ddf2a586441', spacing: "12px" }, h("zonos-v-stack", { key: '3e1850a86542ad66c224e4b81f1c5442e7716f6d', spacing: 12 }, hasInclusivePrices ? (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), h("zonos-text", null, inclusivePriceMessage))) : (h(Fragment, null, dutyDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Duty de minimis icon", content: ImportIcon }), h("zonos-text", { "aria-label": "Duty de minimis message" }, dutyDeMinimisMessage))), taxDeMinimisMessage && (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Tax de minimis icon", content: MoneyIcon }), h("zonos-text", { "aria-label": "Tax de minimis message" }, taxDeMinimisMessage))))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
322
|
+
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country icon", content: BagIcon }), h("zonos-text", { "aria-label": `Additional information for buying goods from selected country message`, innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: '33e41b69e4a5b00623f3e412609e7162cb560c38', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: 'fa17c20b3d893ed9f2249bbceca5237fa48bc64e' }, h("zonos-country-select", { key: '15a5924f176c4a805405684c3eda90f47979cf0b', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: 'ab1d061a3c9c68b43c4203fa14af2ffcf7d33e82' }, h("zonos-language-select", { key: '97f4c760e65d7af39160a1ff978d8a7b0864a763', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
323
323
|
}
|
|
324
324
|
static get is() { return "zonos-hello-dialog"; }
|
|
325
325
|
static get encapsulation() { return "shadow"; }
|
|
@@ -5,6 +5,7 @@ import { storageStore } from "../store/storageStore";
|
|
|
5
5
|
import { zonosStore, zonosStoreFontFamily, zonosStoreInitSetting, } from "../store/zonosStore";
|
|
6
6
|
import { getZonosSettings } from "../utils/api/getZonosSettings";
|
|
7
7
|
import { initCheckout } from "../utils/checkout/initCheckout";
|
|
8
|
+
import { initCollect } from "../utils/checkout/initCollect";
|
|
8
9
|
import { handleFetch } from "../utils/handleFetch";
|
|
9
10
|
import { initHello } from "../utils/hello/initHello";
|
|
10
11
|
import { CheckoutAddressService } from "../utils/iframe/CheckoutAddressService";
|
|
@@ -23,6 +24,18 @@ export class ZonosController {
|
|
|
23
24
|
void initCheckout(zonosStore.checkoutSettings);
|
|
24
25
|
log('init checkout element');
|
|
25
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Method to initialize Collect element
|
|
29
|
+
*/
|
|
30
|
+
async initCollectElement(stripe) {
|
|
31
|
+
if (!stripe) {
|
|
32
|
+
log('Stripe is not loaded yet - cannot init Collect element', 'warn');
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
stripeStore.stripe = stripe;
|
|
36
|
+
void initCollect();
|
|
37
|
+
log('init Collect element');
|
|
38
|
+
}
|
|
26
39
|
/**
|
|
27
40
|
* Init zonos notification
|
|
28
41
|
*/
|
|
@@ -94,8 +107,8 @@ export class ZonosController {
|
|
|
94
107
|
if (!htmlString) {
|
|
95
108
|
return;
|
|
96
109
|
}
|
|
97
|
-
// Skip injecting custom HTML for legacy checkout
|
|
98
|
-
if (!window.Zonos.isLegacyCheckout) {
|
|
110
|
+
// Skip injecting custom HTML for legacy checkout and collect
|
|
111
|
+
if (!window.Zonos.isLegacyCheckout || window.Zonos.isCollect) {
|
|
99
112
|
log('=== Skip injecting custom HTML for hosted checkout', 'info');
|
|
100
113
|
return;
|
|
101
114
|
}
|
|
@@ -134,12 +147,48 @@ export class ZonosController {
|
|
|
134
147
|
src: `${process.env.NEXT_PUBLIC_ZONOS_CLOUDFLARE_URL}/iframe/google-maps?signedToken=${signedPayload}`,
|
|
135
148
|
});
|
|
136
149
|
}
|
|
150
|
+
buildBaseConfig(json) {
|
|
151
|
+
var _a, _b;
|
|
152
|
+
const baseCheckoutConfig = Object.assign(Object.assign({}, this.config.checkoutSettings), {
|
|
153
|
+
// Don't allow to override settlement currencies setting. This setting is only configured by Zonos
|
|
154
|
+
allowedSettlementCurrencies: undefined,
|
|
155
|
+
// Don't allow to override capture delay setting. This setting is only configured by Zonos
|
|
156
|
+
captureDelay: undefined,
|
|
157
|
+
// Don't allow to override subscription status
|
|
158
|
+
subscriptionStatus: undefined
|
|
159
|
+
});
|
|
160
|
+
if (window.Zonos.isCollect) {
|
|
161
|
+
return Object.assign(Object.assign({}, this.config), { checkoutSettings: baseCheckoutConfig, helloSettings: Object.assign(Object.assign({}, this.config.helloSettings), {
|
|
162
|
+
// No need to show hello for collect
|
|
163
|
+
visibilityStatus: 'DISABLED'
|
|
164
|
+
}) });
|
|
165
|
+
}
|
|
166
|
+
if (!this.config.checkoutSettings) {
|
|
167
|
+
return Object.assign(Object.assign({}, this.config), {
|
|
168
|
+
// If there is no override checkout settings from Zonos.init, just use the default checkout settings from our settings
|
|
169
|
+
checkoutSettings: undefined
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
// Should override success behavior for legacy checkout if
|
|
173
|
+
const shouldOverrideSuccessBehavior = window.Zonos.isLegacyCheckout &&
|
|
174
|
+
!!window.Zonos.cartData &&
|
|
175
|
+
((_a = this.config.checkoutSettings) === null || _a === void 0 ? void 0 : _a.successBehavior) === 'CLOSE_MODAL';
|
|
176
|
+
return Object.assign(Object.assign({}, this.config), { checkoutSettings: Object.assign(Object.assign({}, baseCheckoutConfig), {
|
|
177
|
+
// Set success redirect url to store url if it's legacy checkout.
|
|
178
|
+
// when success behavior is CLOSE_MODAL, use the default success behavior and update the keep shopping button link to their store, because just redirect user without confirmation page would confuse them
|
|
179
|
+
successBehavior: shouldOverrideSuccessBehavior
|
|
180
|
+
? 'ZONOS_SUCCESS_PAGE'
|
|
181
|
+
: this.config.checkoutSettings.successBehavior, successRedirectUrl: shouldOverrideSuccessBehavior
|
|
182
|
+
? ((_b = window.Zonos.cartData) === null || _b === void 0 ? void 0 : _b.storeBaseUrl) || (json === null || json === void 0 ? void 0 : json.onlineStoreSettings.url)
|
|
183
|
+
: this.config.checkoutSettings.successRedirectUrl
|
|
184
|
+
}) });
|
|
185
|
+
}
|
|
137
186
|
async componentWillLoad() {
|
|
138
187
|
this.initHistoryListener();
|
|
139
188
|
zonosStore.zonosApiKey = this.zonosApiKey;
|
|
140
189
|
// running with scope async function to avoid blocking the main thread
|
|
141
190
|
(async () => {
|
|
142
|
-
var _a, _b, _c, _d
|
|
191
|
+
var _a, _b, _c, _d;
|
|
143
192
|
const { errors, json, zonosMode } = await getZonosSettings();
|
|
144
193
|
if (((_b = (_a = errors[0]) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.toString()) === '403') {
|
|
145
194
|
log('Failed to load zonos settings. This domain may not have access', 'warn');
|
|
@@ -158,27 +207,9 @@ export class ZonosController {
|
|
|
158
207
|
// Otherwise respect override
|
|
159
208
|
return (_c = this.config.appearance) === null || _c === void 0 ? void 0 : _c.logoUrl;
|
|
160
209
|
};
|
|
161
|
-
const
|
|
162
|
-
!!window.Zonos.cartData &&
|
|
163
|
-
((_d = this.config.checkoutSettings) === null || _d === void 0 ? void 0 : _d.successBehavior) === 'CLOSE_MODAL';
|
|
210
|
+
const baseConfig = this.buildBaseConfig(json);
|
|
164
211
|
// override subscription status
|
|
165
|
-
const config = Object.assign(Object.assign({}, this.config), { appearance: Object.assign(Object.assign({}, this.config.appearance), { logoUrl: getLogoUrl() }),
|
|
166
|
-
? Object.assign(Object.assign({}, this.config.checkoutSettings), {
|
|
167
|
-
// Don't allow to override settlement currencies setting. This setting is only configured by Zonos
|
|
168
|
-
allowedSettlementCurrencies: undefined,
|
|
169
|
-
// Don't allow to override capture delay setting. This setting is only configured by Zonos
|
|
170
|
-
captureDelay: undefined,
|
|
171
|
-
// Don't allow to override subscription status
|
|
172
|
-
subscriptionStatus: undefined,
|
|
173
|
-
// Set success redirect url to store url if it's legacy checkout.
|
|
174
|
-
// when success behavior is CLOSE_MODAL, use the default success behavior and update the keep shopping button link to their store, because just redirect user without confirmation page would confuse them
|
|
175
|
-
successBehavior: shouldOverrideSuccessBehavior
|
|
176
|
-
? 'ZONOS_SUCCESS_PAGE'
|
|
177
|
-
: this.config.checkoutSettings.successBehavior, successRedirectUrl: shouldOverrideSuccessBehavior
|
|
178
|
-
? ((_e = window.Zonos.cartData) === null || _e === void 0 ? void 0 : _e.storeBaseUrl) ||
|
|
179
|
-
(json === null || json === void 0 ? void 0 : json.onlineStoreSettings.url)
|
|
180
|
-
: this.config.checkoutSettings.successRedirectUrl
|
|
181
|
-
}) : undefined });
|
|
212
|
+
const config = Object.assign(Object.assign(Object.assign({}, this.config), { appearance: Object.assign(Object.assign({}, this.config.appearance), { logoUrl: getLogoUrl() }) }), baseConfig);
|
|
182
213
|
// load default setting if failed to load user settings
|
|
183
214
|
zonosStoreInitSetting({
|
|
184
215
|
overrideSettings: config,
|
|
@@ -199,11 +230,20 @@ export class ZonosController {
|
|
|
199
230
|
// init localization store
|
|
200
231
|
await initLocalizationStore();
|
|
201
232
|
// checkout init
|
|
202
|
-
const publishableKey = ((
|
|
233
|
+
const publishableKey = ((_d = json === null || json === void 0 ? void 0 : json.checkoutSettings) === null || _d === void 0 ? void 0 : _d.externalServiceTokens.find(item => item.type === 'STRIPE_PUBLISHABLE_TOKEN')) || null;
|
|
203
234
|
if (!publishableKey || !this.stripeInitEvent) {
|
|
204
235
|
log('Checkout failed to load -- missing publishable key', 'warn');
|
|
205
236
|
return;
|
|
206
237
|
}
|
|
238
|
+
if (window.Zonos.isCollect) {
|
|
239
|
+
// send publishable key out to load stripe
|
|
240
|
+
this.stripeInitEvent.emit({
|
|
241
|
+
publishableKey: publishableKey.token,
|
|
242
|
+
});
|
|
243
|
+
// init google places service
|
|
244
|
+
void this.initGooglePlacesService(json);
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
207
247
|
if (zonosStore.checkoutSettings.subscriptionStatus === 'INACTIVE') {
|
|
208
248
|
log('=== Checkout subscription is "INACTIVE" - Cancel initializing for Checkout ===', 'warn');
|
|
209
249
|
log('zonos controller loaded');
|
|
@@ -270,7 +310,7 @@ export class ZonosController {
|
|
|
270
310
|
zonosStore.organizationName = organizationName;
|
|
271
311
|
}
|
|
272
312
|
render() {
|
|
273
|
-
return h(Host, { key: '
|
|
313
|
+
return h(Host, { key: 'ca4c02bf0aa73d19ea58cdf6a76c8424276b69cd', class: "zonos--elements" });
|
|
274
314
|
}
|
|
275
315
|
static get is() { return "zonos-controller"; }
|
|
276
316
|
static get encapsulation() { return "shadow"; }
|
|
@@ -391,6 +431,32 @@ export class ZonosController {
|
|
|
391
431
|
"tags": []
|
|
392
432
|
}
|
|
393
433
|
},
|
|
434
|
+
"initCollectElement": {
|
|
435
|
+
"complexType": {
|
|
436
|
+
"signature": "(stripe: Stripe) => Promise<void>",
|
|
437
|
+
"parameters": [{
|
|
438
|
+
"name": "stripe",
|
|
439
|
+
"type": "Stripe",
|
|
440
|
+
"docs": ""
|
|
441
|
+
}],
|
|
442
|
+
"references": {
|
|
443
|
+
"Promise": {
|
|
444
|
+
"location": "global",
|
|
445
|
+
"id": "global::Promise"
|
|
446
|
+
},
|
|
447
|
+
"Stripe": {
|
|
448
|
+
"location": "import",
|
|
449
|
+
"path": "@stripe/stripe-js",
|
|
450
|
+
"id": "node_modules::Stripe"
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
"return": "Promise<void>"
|
|
454
|
+
},
|
|
455
|
+
"docs": {
|
|
456
|
+
"text": "Method to initialize Collect element",
|
|
457
|
+
"tags": []
|
|
458
|
+
}
|
|
459
|
+
},
|
|
394
460
|
"setupGoogleFont": {
|
|
395
461
|
"complexType": {
|
|
396
462
|
"signature": "(overrideFont?: string) => Promise<void>",
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import { h, Host, } from "@stencil/core";
|
|
3
|
-
import { paypalStoreInitButtons } from "../store/checkout/paypal";
|
|
3
|
+
import { paypalStoreInitButtons, paypalStoreOnChange, } from "../store/checkout/paypal";
|
|
4
4
|
import { log } from "../utils/logging/log";
|
|
5
5
|
/**
|
|
6
6
|
* This component is a wrapper for the paypal authentication element that would render default style object
|
|
7
7
|
*/
|
|
8
8
|
export class ZonosPaypalPayment {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.storeUnsubscribeList = [];
|
|
11
|
+
}
|
|
9
12
|
async loadPaypal() {
|
|
10
13
|
if (!window.Zonos.paypal) {
|
|
11
14
|
log('Paypal is not available');
|
|
@@ -36,12 +39,20 @@ export class ZonosPaypalPayment {
|
|
|
36
39
|
await paypalButton.render(container);
|
|
37
40
|
});
|
|
38
41
|
}
|
|
42
|
+
componentWillLoad() {
|
|
43
|
+
this.storeUnsubscribeList = [
|
|
44
|
+
paypalStoreOnChange('paypal', this.loadPaypal.bind(this)),
|
|
45
|
+
];
|
|
46
|
+
}
|
|
39
47
|
componentDidLoad() {
|
|
40
48
|
// @Watch doesn't get trigger on initial load
|
|
41
49
|
void this.loadPaypal();
|
|
42
50
|
}
|
|
51
|
+
disconnectedCallback() {
|
|
52
|
+
this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
|
|
53
|
+
}
|
|
43
54
|
render() {
|
|
44
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: 'bcf11ef0ceab1d847c237ec26ec604440983c16f', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: 'ce5033f39b2e9644e30fc1e0e35f64e5d9b9730d', class: "zonos--payment-paypal-container" })));
|
|
45
56
|
}
|
|
46
57
|
static get is() { return "zonos-paypal-payment"; }
|
|
47
58
|
static get encapsulation() { return "scoped"; }
|
|
@@ -283,8 +283,12 @@ const cartStoreGetMethod = (landedCost) => {
|
|
|
283
283
|
}
|
|
284
284
|
return landedCost.method;
|
|
285
285
|
};
|
|
286
|
-
const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption,
|
|
286
|
+
const cartStoreUpdateSelectedShippingOption = async ({ applySubtotalsOnly, landedCostId, selectedShippingOption, }) => {
|
|
287
287
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
288
|
+
log('Updating selected shipping option', 'info', {
|
|
289
|
+
landedCostId,
|
|
290
|
+
selectedShippingOption,
|
|
291
|
+
});
|
|
288
292
|
cartStore.selectedShippingOption = selectedShippingOption;
|
|
289
293
|
// update shipping transit info
|
|
290
294
|
const transitData = cartStoreGetShippingTransitInfo(cartStore.selectedShippingOption);
|
|
@@ -319,16 +323,33 @@ const cartStoreUpdateSelectedShippingOption = async (selectedShippingOption, lan
|
|
|
319
323
|
const isAboveDeminimis = !!((_e = (_d = selectedLandedCost === null || selectedLandedCost === void 0 ? void 0 : selectedLandedCost.landedCost) === null || _d === void 0 ? void 0 : _d.deMinimis) === null || _e === void 0 ? void 0 : _e.find(item => ['DUTY', 'TAX'].includes(item.type) && item.threshold === 'ABOVE'));
|
|
320
324
|
cartStore.isSelectedShippingAboveDeminimis = isAboveDeminimis;
|
|
321
325
|
cartStore.isSelectedShippingGuarantee = isGuarantee;
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
326
|
+
let updateCalculateStatus = false;
|
|
327
|
+
/**
|
|
328
|
+
* For collect, we are trying to mimic the behavior that checkout is currently doing, where there is already a checkout session, we already updated with the landed cost.
|
|
329
|
+
* But we need to call this function so that we can use all of the information that already in place in cartStore, so to avoid latency issue, we only apply subtotals here.
|
|
330
|
+
*/
|
|
331
|
+
if (applySubtotalsOnly) {
|
|
332
|
+
const subtotals = selectedLandedCost.subtotals;
|
|
333
|
+
cartStoreApplySubtotals({
|
|
334
|
+
dutiesTaxesFeesEstimate,
|
|
335
|
+
method: cartStore.landedCostMethod,
|
|
336
|
+
subtotals,
|
|
337
|
+
});
|
|
338
|
+
log('Exchange rate updated for cart items (landed cost subtotal)', 'info', cartStore.exchangeRate);
|
|
339
|
+
updateCalculateStatus = true;
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
// update session with selected landed cost
|
|
343
|
+
updateCalculateStatus = await cartStoreReCalculateTotal({
|
|
344
|
+
adjustmentsAmount: cartStore.adjustmentTotal,
|
|
345
|
+
billToPartyId: stripeStore.partyBillingId,
|
|
346
|
+
cartId: window.Zonos.cartId,
|
|
347
|
+
dutiesTaxesFeesEstimate: dutiesTaxesFeesEstimate,
|
|
348
|
+
landedCostId: (_f = selectedLandedCost.landedCost) === null || _f === void 0 ? void 0 : _f.id,
|
|
349
|
+
shipToPartyId: stripeStore.partyShippingId,
|
|
350
|
+
varianceTestInput: storageStore.enabledVariantTestKeys || [],
|
|
351
|
+
});
|
|
352
|
+
}
|
|
332
353
|
// update conditionally render pay in USD button
|
|
333
354
|
const firstItem = (_g = cartStore.items.find(Boolean)) === null || _g === void 0 ? void 0 : _g.currencyCode;
|
|
334
355
|
// Stripe address event data should be available at this point
|
|
@@ -370,7 +391,7 @@ const cartStoreResetCartItems = () => {
|
|
|
370
391
|
cartStore.items = cartStore.items.map(item => (Object.assign(Object.assign({}, item), { isRestricted: false })));
|
|
371
392
|
cartStore.restrictedItems = [];
|
|
372
393
|
};
|
|
373
|
-
const cartStoreUpdateItems = async ({ adjustments, cartItems, }) => {
|
|
394
|
+
const cartStoreUpdateItems = async ({ adjustments, cartItems, landedCostId, shouldInitSessionOnFailure = true, }) => {
|
|
374
395
|
var _a;
|
|
375
396
|
// Update adjustments and items
|
|
376
397
|
cartStore.adjustments = adjustments;
|
|
@@ -394,9 +415,9 @@ const cartStoreUpdateItems = async ({ adjustments, cartItems, }) => {
|
|
|
394
415
|
currency: currency,
|
|
395
416
|
dutiesTaxesFeesEstimate: 0,
|
|
396
417
|
itemsAmount: total,
|
|
418
|
+
landedCostId,
|
|
397
419
|
shipToPartyId: stripeStore.partyShippingId,
|
|
398
|
-
|
|
399
|
-
shouldInitSessionOnFailure: true,
|
|
420
|
+
shouldInitSessionOnFailure,
|
|
400
421
|
varianceTestInput: storageStore.enabledVariantTestKeys || [],
|
|
401
422
|
});
|
|
402
423
|
stripeStore.isFetchingSession = false;
|
|
@@ -449,4 +470,4 @@ const cartStoreResetTabItems = () => {
|
|
|
449
470
|
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: false }), payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }), shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
|
|
450
471
|
cartStoreResetSelectedShippingOption();
|
|
451
472
|
};
|
|
452
|
-
export { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStoreClearCheckoutInterval, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartStoreHasOneEligibleItem, cartStoreNextStep, cartStoreOnChange, cartStorePreviousStep, cartStoreReset, cartStoreResetCartItems, cartStoreResetTabItems, cartStoreSetCheckoutSession, cartStoreStartCheckoutInterval, cartStoreUpdateItems, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, };
|
|
473
|
+
export { cartStore, cartStoreApplySubtotals, cartStoreCheckItemRestrictions, cartStoreClearCheckoutInterval, cartStoreGetMethod, cartStoreGetShippingTransitInfo, cartStoreHasOneEligibleItem, cartStoreNextStep, cartStoreOnChange, cartStorePreviousStep, cartStoreReCalculateTotal, cartStoreReset, cartStoreResetCartItems, cartStoreResetTabItems, cartStoreSetCheckoutSession, cartStoreStartCheckoutInterval, cartStoreUpdateItems, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, };
|