@zonos/elements 1.3.15-alpha.2 → 1.3.15
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/RemoveIcon-6c79a2a1.js +5 -0
- package/dist/cjs/{cart-1b1d39af.js → cart-db549f04.js} +976 -138
- package/dist/cjs/containsNonLatinChars-2be5129b.js +24 -0
- package/dist/cjs/{getBorderRadius-c8cc2bb3.js → getBorderRadius-44b3eca1.js} +4 -6
- package/dist/cjs/index-654a6001.js +1361 -0
- package/dist/cjs/isCheckoutMobile-f491ca7c.js +8 -0
- package/dist/cjs/{isDarkColor-f5473002.js → isDarkColor-01f45d3f.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{submitGtag-ab287a34.js → submitGtag-fd8acad5.js} +21 -2
- package/dist/cjs/zonos-address_8.cjs.entry.js +642 -0
- package/dist/cjs/zonos-badge_2.cjs.entry.js +9 -9
- package/dist/cjs/zonos-banner.cjs.entry.js +3 -3
- package/dist/cjs/zonos-button_3.cjs.entry.js +192 -0
- package/dist/cjs/zonos-card_2.cjs.entry.js +12 -12
- package/dist/cjs/{zonos-cart-items_10.cjs.entry.js → zonos-cart-items_9.cjs.entry.js} +144 -118
- package/dist/cjs/zonos-checkout.cjs.entry.js +19 -18
- package/dist/cjs/zonos-component.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +14 -14
- package/dist/cjs/zonos-elements.cjs.js +10 -10
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +9 -9
- package/dist/cjs/zonos-hello.cjs.entry.js +6 -6
- package/dist/cjs/zonos-input.cjs.entry.js +57 -0
- package/dist/cjs/zonos-link.cjs.entry.js +2 -2
- package/dist/cjs/zonos-logo.cjs.entry.js +4 -4
- package/dist/cjs/zonos-notification.cjs.entry.js +5 -5
- package/dist/cjs/zonos-payment.cjs.entry.js +7 -7
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +7 -7
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +8 -6
- package/dist/cjs/zonos-text.cjs.entry.js +3 -2
- package/dist/cjs/{zonosStore-aee974e0.js → zonosStore-d8bb0bda.js} +1 -1
- package/dist/collection/collection-manifest.json +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.css +62 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +80 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.css +59 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +148 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.css +115 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +429 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.css +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.css +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.css +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +5 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +9 -9
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +5 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +16 -16
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +6 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +8 -8
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +135 -20
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +5 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +7 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
- package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-badge/zonos-badge.css +1 -1
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-banner/zonos-banner.css +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.css +10 -9
- package/dist/collection/components/common/zonos-button/zonos-button.js +17 -8
- package/dist/collection/components/common/zonos-card/zonos-card.css +9 -9
- package/dist/collection/components/common/zonos-card/zonos-card.js +3 -3
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.css +2 -1
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +22 -4
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.css +1 -1
- 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-country-select/zonos-country-select.css +5 -5
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.css +1 -1
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.css +6 -6
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +6 -4
- package/dist/collection/components/common/zonos-input/zonos-input.css +176 -0
- package/dist/collection/components/common/zonos-input/zonos-input.js +193 -0
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.css +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-notification/zonos-notification.css +3 -3
- package/dist/collection/components/common/zonos-notification/zonos-notification.js +2 -2
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.css +1 -1
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.css +2 -2
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +4 -2
- package/dist/collection/components/common/zonos-text/zonos-text.js +1 -0
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.css +1 -1
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.css +18 -18
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.css +10 -52
- 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.css +4 -4
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +3 -3
- package/dist/collection/components/main/zonos-controller.js +2 -2
- package/dist/collection/components/store/checkout/stripe.js +153 -14
- package/dist/collection/components/store/translationStore/strings.arabic.js +36 -6
- package/dist/collection/components/store/translationStore/strings.base.js +36 -6
- package/dist/collection/components/store/translationStore/strings.chinese.js +36 -6
- package/dist/collection/components/store/translationStore/strings.danish.js +36 -6
- package/dist/collection/components/store/translationStore/strings.dutch.js +36 -6
- package/dist/collection/components/store/translationStore/strings.french.js +36 -6
- package/dist/collection/components/store/translationStore/strings.german.js +36 -6
- package/dist/collection/components/store/translationStore/strings.hebrew.js +36 -6
- package/dist/collection/components/store/translationStore/strings.indonesian.js +36 -6
- package/dist/collection/components/store/translationStore/strings.italian.js +36 -6
- package/dist/collection/components/store/translationStore/strings.japanese.js +36 -6
- package/dist/collection/components/store/translationStore/strings.korean.js +36 -6
- package/dist/collection/components/store/translationStore/strings.norwegian.js +36 -6
- package/dist/collection/components/store/translationStore/strings.polish.js +36 -6
- package/dist/collection/components/store/translationStore/strings.portuguese.js +36 -6
- package/dist/collection/components/store/translationStore/strings.russian.js +36 -6
- package/dist/collection/components/store/translationStore/strings.spanish.js +36 -6
- package/dist/collection/components/store/translationStore/strings.swedish.js +36 -6
- package/dist/collection/components/store/translationStore/strings.turkish.js +36 -6
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +36 -6
- package/dist/collection/components/stripe/zonos-address/zonos-address.css +2 -2
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +3 -71
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.css +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +29 -5
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.css +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/checkout/buildTranslateRequestBody.js +98 -0
- package/dist/collection/components/utils/containsNonLatinChars.js +10 -8
- package/dist/collection/components/utils/getBorderRadius.js +3 -5
- package/dist/collection/styles/stripe/defaultVariable.js +2 -2
- package/dist/collection/types/checkout/TranslatedText.js +1 -0
- package/dist/collection/types/checkout/api/ValidateAddressRequest.js +1 -0
- package/dist/components/containsNonLatinChars.js +21 -0
- package/dist/components/getBorderRadius.js +3 -5
- package/dist/components/stripe.js +255 -4545
- package/dist/components/trackConversionEvent.js +1 -1
- package/dist/components/translationStore.js +5131 -0
- package/dist/components/zonos-address-display.d.ts +11 -0
- package/dist/components/zonos-address-display.js +6 -0
- package/dist/components/zonos-address-display2.js +64 -0
- package/dist/components/zonos-address-form.d.ts +11 -0
- package/dist/components/zonos-address-form.js +6 -0
- package/dist/components/zonos-address-form2.js +84 -0
- package/dist/components/zonos-address-update-dialog.d.ts +11 -0
- package/dist/components/zonos-address-update-dialog.js +6 -0
- package/dist/components/zonos-address-update-dialog2.js +264 -0
- package/dist/components/zonos-address2.js +4 -94
- package/dist/components/zonos-badge2.js +4 -4
- package/dist/components/zonos-banner2.js +1 -1
- package/dist/components/zonos-button2.js +18 -9
- package/dist/components/zonos-card2.js +4 -4
- package/dist/components/zonos-cart-items2.js +2 -2
- package/dist/components/zonos-cart-subtotal2.js +3 -2
- package/dist/components/zonos-checkbox2.js +15 -6
- package/dist/components/zonos-checkout-finish2.js +27 -7
- package/dist/components/zonos-checkout-footer2.js +3 -3
- package/dist/components/zonos-checkout-payment2.js +3 -2
- package/dist/components/zonos-checkout-progress-tabs2.js +6 -5
- package/dist/components/zonos-checkout.js +72 -42
- package/dist/components/zonos-collapse2.js +2 -2
- package/dist/components/zonos-component.js +1 -1
- package/dist/components/zonos-controller.js +2 -2
- package/dist/components/zonos-country-select2.js +3 -3
- package/dist/components/zonos-custom-message2.js +3 -3
- package/dist/components/zonos-customer-info2.js +171 -30
- package/dist/components/zonos-dialog2.js +7 -5
- package/dist/components/zonos-hello-dialog-footer2.js +3 -3
- package/dist/components/zonos-hello-dialog2.js +6 -5
- package/dist/components/zonos-hello.js +3 -2
- package/dist/components/zonos-input.d.ts +11 -0
- package/dist/components/zonos-input.js +6 -0
- package/dist/components/zonos-input2.js +78 -0
- package/dist/components/zonos-language-select2.js +5 -4
- package/dist/components/zonos-link-authentication2.js +13 -6
- package/dist/components/zonos-link.js +1 -1
- package/dist/components/zonos-logo.js +2 -2
- package/dist/components/zonos-notification2.js +3 -3
- package/dist/components/zonos-payment2.js +2 -2
- package/dist/components/zonos-review2.js +3 -2
- package/dist/components/zonos-select-dialog-header2.js +3 -3
- package/dist/components/zonos-shipping-rich-radio2.js +5 -3
- package/dist/components/zonos-shipping2.js +4 -3
- package/dist/components/zonos-text2.js +1 -0
- package/dist/components/zonos-tooltip2.js +3 -3
- package/dist/components/zonos-v-stack2.js +2 -2
- package/dist/esm/RemoveIcon-f6715b36.js +3 -0
- package/dist/esm/{cart-10bcd2e0.js → cart-462e89a6.js} +976 -139
- package/dist/esm/containsNonLatinChars-2d8810c3.js +21 -0
- package/dist/esm/{getBorderRadius-8129b0cb.js → getBorderRadius-567f1786.js} +4 -6
- package/dist/esm/index-e063389c.js +1328 -0
- package/dist/esm/isCheckoutMobile-8846dccb.js +6 -0
- package/dist/esm/{isDarkColor-7a6d2d14.js → isDarkColor-7f62035a.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{submitGtag-84886899.js → submitGtag-ac7c3c89.js} +21 -3
- package/dist/esm/zonos-address_8.entry.js +631 -0
- package/dist/esm/zonos-badge_2.entry.js +9 -9
- package/dist/esm/zonos-banner.entry.js +3 -3
- package/dist/esm/zonos-button_3.entry.js +186 -0
- package/dist/esm/zonos-card_2.entry.js +12 -12
- package/dist/esm/{zonos-cart-items_10.entry.js → zonos-cart-items_9.entry.js} +140 -113
- package/dist/esm/zonos-checkout.entry.js +14 -13
- package/dist/esm/zonos-component.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +6 -6
- package/dist/esm/zonos-country-flag.entry.js +5 -5
- package/dist/esm/zonos-country-select_3.entry.js +14 -14
- package/dist/esm/zonos-elements.js +11 -11
- package/dist/esm/zonos-hello-dialog.entry.js +9 -9
- package/dist/esm/zonos-hello.entry.js +6 -6
- package/dist/esm/zonos-input.entry.js +53 -0
- package/dist/esm/zonos-link.entry.js +2 -2
- package/dist/esm/zonos-logo.entry.js +4 -4
- package/dist/esm/zonos-notification.entry.js +5 -5
- package/dist/esm/zonos-payment.entry.js +7 -7
- package/dist/esm/zonos-select-dialog-header_2.entry.js +7 -7
- package/dist/esm/zonos-shipping-rich-radio.entry.js +8 -6
- package/dist/esm/zonos-text.entry.js +3 -2
- package/dist/esm/{zonosStore-f3eef64b.js → zonosStore-33ff08ff.js} +1 -1
- package/dist/esm-es5/RemoveIcon-f6715b36.js +1 -0
- package/dist/esm-es5/cart-462e89a6.js +1 -0
- package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +1 -0
- package/dist/esm-es5/getBorderRadius-567f1786.js +1 -0
- package/dist/esm-es5/index-e063389c.js +2 -0
- package/dist/esm-es5/isCheckoutMobile-8846dccb.js +1 -0
- package/dist/esm-es5/{isDarkColor-7a6d2d14.js → isDarkColor-7f62035a.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/submitGtag-ac7c3c89.js +1 -0
- package/dist/esm-es5/zonos-address_8.entry.js +1 -0
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -0
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_9.entry.js +1 -0
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -0
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-f3eef64b.js → zonosStore-33ff08ff.js} +1 -1
- package/dist/scripts/loadStripe.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/stripe.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.d.ts +12 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.d.ts +28 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.d.ts +96 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +22 -2
- package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -0
- package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +0 -3
- package/dist/types/components/common/zonos-input/zonos-input.d.ts +35 -0
- package/dist/types/components/store/checkout/stripe.d.ts +25 -1
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.base.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.danish.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.french.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.german.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.italian.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.korean.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.polish.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.russian.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +35 -5
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +35 -5
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +2 -10
- package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +4 -0
- package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
- package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
- package/dist/types/components/utils/checkout/buildTranslateRequestBody.d.ts +26 -0
- package/dist/types/components/utils/containsNonLatinChars.d.ts +1 -0
- package/dist/types/components/utils/getBorderRadius.d.ts +7 -1
- package/dist/types/components.d.ts +308 -6
- package/dist/types/types/checkout/TranslatedText.d.ts +23 -0
- package/dist/types/types/checkout/api/ValidateAddressRequest.d.ts +20 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +2 -0
- package/dist/types/types/generated/graphql.customer.types.ts +2 -0
- package/dist/zonos-elements/p-029f11dd.system.entry.js +1 -0
- package/dist/zonos-elements/{p-2ee0d779.entry.js → p-094c0ee8.entry.js} +1 -1
- package/dist/zonos-elements/p-0c64dbbb.js +1 -0
- package/dist/zonos-elements/p-11504442.entry.js +1 -0
- package/dist/zonos-elements/p-11bef836.system.entry.js +1 -0
- package/dist/zonos-elements/{p-bc3a0f7c.entry.js → p-11f1b78c.entry.js} +1 -1
- package/dist/zonos-elements/p-13ddaf31.js +2 -0
- package/dist/zonos-elements/p-154aaf95.system.js +1 -0
- package/dist/zonos-elements/p-163ff5b5.system.js +2 -0
- package/dist/zonos-elements/{p-32b4e9c3.entry.js → p-1e934274.entry.js} +1 -1
- package/dist/zonos-elements/p-20582e58.system.entry.js +1 -0
- package/dist/zonos-elements/p-2439c82f.system.entry.js +1 -0
- package/dist/zonos-elements/p-2670438c.system.js +1 -0
- package/dist/zonos-elements/p-321226b0.entry.js +1 -0
- package/dist/zonos-elements/p-3221530d.system.entry.js +1 -0
- package/dist/zonos-elements/{p-97534044.entry.js → p-32d27535.entry.js} +1 -1
- package/dist/zonos-elements/p-3d10866d.entry.js +1 -0
- package/dist/zonos-elements/{p-1a5f8df7.entry.js → p-3d8667a7.entry.js} +1 -1
- package/dist/zonos-elements/p-3f05d130.system.entry.js +1 -0
- package/dist/zonos-elements/p-430eefd4.entry.js +1 -0
- package/dist/zonos-elements/p-49825866.system.entry.js +1 -0
- package/dist/zonos-elements/p-5525b740.entry.js +1 -0
- package/dist/zonos-elements/p-578f0aad.system.js +1 -0
- package/dist/zonos-elements/p-58a8ef6c.entry.js +1 -0
- package/dist/zonos-elements/p-5d993965.js +1 -0
- package/dist/zonos-elements/{p-262b8e1e.system.entry.js → p-5f9c066d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-60e262f0.system.entry.js +1 -0
- package/dist/zonos-elements/p-64b594f4.js +1 -0
- package/dist/zonos-elements/p-66471df6.entry.js +1 -0
- package/dist/zonos-elements/{p-95c864ca.system.entry.js → p-679877b1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-fc4da55c.system.js → p-771fbeb3.system.js} +1 -1
- package/dist/zonos-elements/p-79f3c4f5.system.js +1 -0
- package/dist/zonos-elements/{p-e1ac5b2a.system.entry.js → p-80d78980.system.entry.js} +1 -1
- package/dist/zonos-elements/p-81a54668.js +1 -0
- package/dist/zonos-elements/p-83cc2936.js +1 -0
- package/dist/zonos-elements/{p-520e8e63.system.js → p-87badea9.system.js} +1 -1
- package/dist/zonos-elements/p-8a61a04f.system.entry.js +1 -0
- package/dist/zonos-elements/p-8b32f560.system.entry.js +1 -0
- package/dist/zonos-elements/{p-d01576d7.js → p-909a331c.js} +1 -1
- package/dist/zonos-elements/p-94b15a5e.system.entry.js +1 -0
- package/dist/zonos-elements/p-9a45fae5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-24fee841.entry.js → p-9ec93319.entry.js} +1 -1
- package/dist/zonos-elements/p-a6d7ac46.js +1 -0
- package/dist/zonos-elements/p-a6eeb4bd.system.entry.js +1 -0
- package/dist/zonos-elements/p-a93f2e84.entry.js +1 -0
- package/dist/zonos-elements/p-aed0098c.system.js +1 -0
- package/dist/zonos-elements/p-b19d51e0.entry.js +1 -0
- package/dist/zonos-elements/{p-46f9c93e.system.entry.js → p-b9652402.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-13b55282.entry.js → p-baee62a4.entry.js} +1 -1
- package/dist/zonos-elements/{p-eff12c31.system.entry.js → p-bf32179a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-cd1cc224.entry.js +1 -0
- package/dist/zonos-elements/p-d1b63cec.system.entry.js +1 -0
- package/dist/zonos-elements/p-d6b103d5.system.js +1 -0
- package/dist/zonos-elements/{p-376bdf70.entry.js → p-da6767d8.entry.js} +1 -1
- package/dist/zonos-elements/p-dde1383b.entry.js +1 -0
- package/dist/zonos-elements/p-df192668.system.js +1 -0
- package/dist/zonos-elements/{p-70ede197.system.entry.js → p-df24d548.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6743734f.entry.js → p-e7b4b756.entry.js} +1 -1
- package/dist/zonos-elements/{p-d41b5762.js → p-f1962041.js} +1 -1
- package/dist/zonos-elements/p-f3d3c754.system.entry.js +1 -0
- package/dist/zonos-elements/p-f79682b5.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.css +3 -3
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +3 -2
- package/dist/cjs/index-3b4816ef.js +0 -2088
- package/dist/cjs/sendErrorLog-29e50f7e.js +0 -29
- package/dist/cjs/zonos-address_4.cjs.entry.js +0 -388
- package/dist/cjs/zonos-button_2.cjs.entry.js +0 -152
- package/dist/cjs/zonos-icon.cjs.entry.js +0 -39
- package/dist/components/sendErrorLog.js +0 -21
- package/dist/esm/index-0e31d804.js +0 -2055
- package/dist/esm/sendErrorLog-8642e94a.js +0 -26
- package/dist/esm/zonos-address_4.entry.js +0 -381
- package/dist/esm/zonos-button_2.entry.js +0 -147
- package/dist/esm/zonos-icon.entry.js +0 -35
- package/dist/esm-es5/cart-10bcd2e0.js +0 -1
- package/dist/esm-es5/getBorderRadius-8129b0cb.js +0 -1
- package/dist/esm-es5/index-0e31d804.js +0 -2
- package/dist/esm-es5/sendErrorLog-8642e94a.js +0 -1
- package/dist/esm-es5/submitGtag-84886899.js +0 -1
- package/dist/esm-es5/zonos-address_4.entry.js +0 -1
- package/dist/esm-es5/zonos-button_2.entry.js +0 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +0 -1
- package/dist/esm-es5/zonos-icon.entry.js +0 -1
- package/dist/scripts/insertTranslations.js +0 -1
- package/dist/zonos-elements/p-066b5ca3.entry.js +0 -1
- package/dist/zonos-elements/p-0a0d45e9.system.entry.js +0 -1
- package/dist/zonos-elements/p-2244534c.js +0 -2
- package/dist/zonos-elements/p-2693da50.system.entry.js +0 -1
- package/dist/zonos-elements/p-2825570c.system.js +0 -2
- package/dist/zonos-elements/p-33abdb30.js +0 -1
- package/dist/zonos-elements/p-450942a3.system.js +0 -1
- package/dist/zonos-elements/p-46b4010c.entry.js +0 -1
- package/dist/zonos-elements/p-509717bc.system.entry.js +0 -1
- package/dist/zonos-elements/p-5ca09163.entry.js +0 -1
- package/dist/zonos-elements/p-5ff27485.js +0 -1
- package/dist/zonos-elements/p-6f5761e8.js +0 -1
- package/dist/zonos-elements/p-6fb15797.system.entry.js +0 -1
- package/dist/zonos-elements/p-73acb3eb.system.entry.js +0 -1
- package/dist/zonos-elements/p-7432179a.system.entry.js +0 -1
- package/dist/zonos-elements/p-8126011d.entry.js +0 -1
- package/dist/zonos-elements/p-8b44e558.system.js +0 -1
- package/dist/zonos-elements/p-8c568b87.entry.js +0 -1
- package/dist/zonos-elements/p-92d85125.system.entry.js +0 -1
- package/dist/zonos-elements/p-9b385237.entry.js +0 -1
- package/dist/zonos-elements/p-9fc92940.entry.js +0 -1
- package/dist/zonos-elements/p-a6bbf6de.system.entry.js +0 -1
- package/dist/zonos-elements/p-ad0a2581.entry.js +0 -1
- package/dist/zonos-elements/p-b4c3dcda.entry.js +0 -1
- package/dist/zonos-elements/p-b8e8330b.system.js +0 -1
- package/dist/zonos-elements/p-be022d8e.entry.js +0 -1
- package/dist/zonos-elements/p-c6170bec.system.js +0 -1
- package/dist/zonos-elements/p-c9e137e1.system.entry.js +0 -1
- package/dist/zonos-elements/p-d0d78094.system.entry.js +0 -1
- package/dist/zonos-elements/p-d1ba7e52.system.entry.js +0 -1
- package/dist/zonos-elements/p-d29895ed.system.entry.js +0 -1
- package/dist/zonos-elements/p-dac861bb.entry.js +0 -1
- package/dist/zonos-elements/p-e010f227.system.entry.js +0 -1
- package/dist/zonos-elements/p-e703c902.entry.js +0 -1
- package/dist/zonos-elements/p-e8a41797.system.entry.js +0 -1
- package/dist/zonos-elements/p-ed2e94d2.js +0 -1
- package/dist/zonos-elements/p-f2b60329.system.entry.js +0 -1
- package/dist/zonos-elements/p-f4c38bfc.system.js +0 -1
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
|
+
import { translate } from "../../../store/translationStore";
|
|
3
|
+
import { zonosStore } from "../../../store/zonosStore";
|
|
4
|
+
import { classes } from "../../../utils/classes";
|
|
5
|
+
import { containsNonLatinChars } from "../../../utils/containsNonLatinChars";
|
|
6
|
+
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
7
|
+
import RemoveIcon from "./../assets/RemoveIcon.svg";
|
|
8
|
+
export class ZonosAddressUpdateDialog {
|
|
9
|
+
constructor() {
|
|
10
|
+
/**
|
|
11
|
+
* handler for close button click
|
|
12
|
+
*/
|
|
13
|
+
this.closeDialogHandler = () => {
|
|
14
|
+
this.closeDialog.emit();
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Extract value from translated object
|
|
18
|
+
*/
|
|
19
|
+
this.getTranslatedAddress = ({ currentAddress, translatedAddress, }) => {
|
|
20
|
+
var _a, _b, _c, _d, _e, _f;
|
|
21
|
+
const { city, line1, line2, name, postal_code, state } = currentAddress;
|
|
22
|
+
return {
|
|
23
|
+
city: ((_a = translatedAddress.city) === null || _a === void 0 ? void 0 : _a[city]) || city,
|
|
24
|
+
line1: ((_b = translatedAddress.line1) === null || _b === void 0 ? void 0 : _b[line1]) || line1,
|
|
25
|
+
line2: ((_c = translatedAddress.line2) === null || _c === void 0 ? void 0 : _c[line2]) || line2,
|
|
26
|
+
name: ((_d = translatedAddress.name) === null || _d === void 0 ? void 0 : _d[name]) || name,
|
|
27
|
+
postal_code: ((_e = translatedAddress.postal_code) === null || _e === void 0 ? void 0 : _e[postal_code]) || postal_code,
|
|
28
|
+
state: ((_f = translatedAddress.state) === null || _f === void 0 ? void 0 : _f[state]) || state,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* handler for continue button click
|
|
33
|
+
*/
|
|
34
|
+
this.continueClickHandler = async () => {
|
|
35
|
+
var _a, _b, _c;
|
|
36
|
+
// set spinner for the continue button
|
|
37
|
+
this.continueLoading = true;
|
|
38
|
+
const translatedBillingAddress = this.billingAddress
|
|
39
|
+
? this.getTranslatedAddress({
|
|
40
|
+
currentAddress: this.billingAddress,
|
|
41
|
+
translatedAddress: this.translatedBillingAddressState,
|
|
42
|
+
})
|
|
43
|
+
: null;
|
|
44
|
+
const translatedShippingAddress = this.getTranslatedAddress({
|
|
45
|
+
currentAddress: this.shippingAddress,
|
|
46
|
+
translatedAddress: this.translatedShippingAddressState,
|
|
47
|
+
});
|
|
48
|
+
// check to see if there are still non-latin characters in the translated address
|
|
49
|
+
const shippingNonlatinChars = containsNonLatinChars(Object.assign(Object.assign({}, translatedShippingAddress), { country: this.shippingAddress.country }));
|
|
50
|
+
// get list of non-latin characters field in the billing address
|
|
51
|
+
const billingNonLatinChars = translatedBillingAddress &&
|
|
52
|
+
this.billingAddress &&
|
|
53
|
+
containsNonLatinChars(Object.assign(Object.assign({}, translatedBillingAddress), { country: this.billingAddress.country }));
|
|
54
|
+
const shippingHasNonLatinChars = !!Object.keys(shippingNonlatinChars)
|
|
55
|
+
.length;
|
|
56
|
+
const billingHasNonLatinChars = !!billingNonLatinChars && !!Object.keys(billingNonLatinChars).length;
|
|
57
|
+
// if there are non-latin characters in the translated address, scroll to the error input so user can see and fix it
|
|
58
|
+
if (shippingHasNonLatinChars || billingHasNonLatinChars) {
|
|
59
|
+
// get scroll top of the first input has "has-error" class
|
|
60
|
+
const addressForms = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('zonos-address-form');
|
|
61
|
+
const shippingAddressForm = addressForms === null || addressForms === void 0 ? void 0 : addressForms[0];
|
|
62
|
+
const billingAddressForm = addressForms === null || addressForms === void 0 ? void 0 : addressForms[1];
|
|
63
|
+
const errorInput = ((_b = shippingAddressForm === null || shippingAddressForm === void 0 ? void 0 : shippingAddressForm.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.has-error')) ||
|
|
64
|
+
((_c = billingAddressForm === null || billingAddressForm === void 0 ? void 0 : billingAddressForm.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('.has-error'));
|
|
65
|
+
// scroll to the first error input
|
|
66
|
+
if (errorInput) {
|
|
67
|
+
errorInput.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
68
|
+
}
|
|
69
|
+
this.continueLoading = false;
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
// Submit the translated address to the parent component
|
|
73
|
+
this.continueClicked.emit({
|
|
74
|
+
billingAddress: translatedBillingAddress,
|
|
75
|
+
shippingAddress: translatedShippingAddress,
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* This function builds a state object for a translated address.
|
|
80
|
+
* It takes the current and translated address as input and returns an object where each field is an object itself.
|
|
81
|
+
* The key of each field's object is the current address's field value and the value is the corresponding translated address's field value.
|
|
82
|
+
*
|
|
83
|
+
* @param {Object} params - The parameters for the function.
|
|
84
|
+
* @param {EnteredInfo} params.currentAddress - The current address information.
|
|
85
|
+
* @param {EnteredInfo} params.translatedAddress - The translated address information.
|
|
86
|
+
*
|
|
87
|
+
*/
|
|
88
|
+
this.buildTranslateAddressState = ({ currentAddress, translatedAddress, }) => {
|
|
89
|
+
const { city, line1, line2, name, postal_code, state } = currentAddress;
|
|
90
|
+
return {
|
|
91
|
+
city: {
|
|
92
|
+
[city]: translatedAddress.city,
|
|
93
|
+
},
|
|
94
|
+
line1: {
|
|
95
|
+
[line1]: translatedAddress.line1,
|
|
96
|
+
},
|
|
97
|
+
line2: {
|
|
98
|
+
[line2]: translatedAddress.line2,
|
|
99
|
+
},
|
|
100
|
+
name: {
|
|
101
|
+
[name]: translatedAddress.name,
|
|
102
|
+
},
|
|
103
|
+
postal_code: {
|
|
104
|
+
[postal_code]: translatedAddress.postal_code,
|
|
105
|
+
},
|
|
106
|
+
state: {
|
|
107
|
+
[state]: translatedAddress.state,
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
this.continueLoading = false;
|
|
112
|
+
this.dialogLoading = undefined;
|
|
113
|
+
this.dialogOpen = false;
|
|
114
|
+
this.submitBtnType = undefined;
|
|
115
|
+
this.submitBtnColor = undefined;
|
|
116
|
+
this.isMobile = false;
|
|
117
|
+
this.shippingAddress = undefined;
|
|
118
|
+
this.billingAddress = undefined;
|
|
119
|
+
this.translatedShippingAddress = undefined;
|
|
120
|
+
this.translatedBillingAddress = undefined;
|
|
121
|
+
this.showErrorBanner = false;
|
|
122
|
+
this.translatedShippingAddressState = {};
|
|
123
|
+
this.translatedBillingAddressState = {};
|
|
124
|
+
}
|
|
125
|
+
watchTranslatedShippingAddress() {
|
|
126
|
+
this.translatedShippingAddressState = this.translatedShippingAddress;
|
|
127
|
+
}
|
|
128
|
+
watchTranslatedBillingAddress() {
|
|
129
|
+
this.translatedBillingAddressState = this.translatedBillingAddress;
|
|
130
|
+
}
|
|
131
|
+
componentWillLoad() {
|
|
132
|
+
// update the state with the initial props
|
|
133
|
+
this.watchTranslatedBillingAddress();
|
|
134
|
+
this.watchTranslatedShippingAddress();
|
|
135
|
+
}
|
|
136
|
+
render() {
|
|
137
|
+
// dialog background white, so when the button background is also white, we need to change the button type to outline so it's visible
|
|
138
|
+
const submitBtnColor = this.submitBtnColor || zonosStore.appearance.colorSecondary;
|
|
139
|
+
const submitBtnType = submitBtnColor === '#ffffff'
|
|
140
|
+
? 'outline'
|
|
141
|
+
: this.submitBtnType || 'standard';
|
|
142
|
+
const billing = this.billingAddress;
|
|
143
|
+
const shipping = this.shippingAddress;
|
|
144
|
+
return (h(Host, { key: '03535edacb348258592641baa349e9dcf14bf78c', class: classes([
|
|
145
|
+
'zonos--address-update-dialog zonos--elements',
|
|
146
|
+
this.isMobile && 'mobile',
|
|
147
|
+
]) }, h("zonos-dialog", { key: 'c16871425dffe955d422ffa5b9aee1ece0da2890', isLoading: this.dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialog.emit(), open: this.dialogOpen, width: "568px" }, h("div", { key: 'e4fad501f7cfedc5783774d8b1bf785d6947d3c8', class: "zonos--body" }, h("div", { key: '973e7a8097b8c8f60e47e6ad9d8311a64a5a6ff0', class: "zonos--dialog-header" }, h("div", { key: '89c82b6ff3723056d161560da22bd16a992afee7', class: "zonos--dialog-title" }, h("zonos-text", { key: 'bf92ef0b40ea67a492164fedb95dd68b7d023e85', type: "title" }, translate('Update your address')), h("zonos-button", { key: '4e7a1905c976cec396db5c34f633b383bba0d55a', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.closeDialogHandler() })), h("zonos-text", { key: '47b42d8cc14c4757e3fc9f2f43eafbd8d9e9df38' }, translate('To ensure delivery all address details must be in Latin characters.'))), h("div", { key: '28d9804f0a18f143ce541c2c511cbfa21a2a416f', class: "zonos--group" }, h("zonos-text", { key: '43ec5a9fc8594d065b256952ca8e9392fba03839', class: "zonos--what-you-entered", type: "semiBoldLabel" }, translate('What you entered')), h("div", { key: 'b7eb7781ce6aefe20f89b4d5fba190f0102eb5d1', class: "zonos--address-display-group" }, h("zonos-address-display", { key: '152c53176a46575677723ca47386e484c659927a', addressType: "shipping", currentAddress: shipping }), billing && (h("zonos-address-display", { key: '6c7ac2b49d121c26ce45f09a1eac9ef456d45910', addressType: "billing", currentAddress: billing }))), h("div", { key: '2bda98bb0ac9bafcb009ff36fb97a9fc62ce7e2d', class: "zonos--address-form-section" }, h("zonos-text", { key: '87d3380072a049ccde71ba1b752aedd36830348b', type: "semiBoldLabel" }, translate('Translated address')), h("zonos-address-form", { key: '2cb36251c6549da05e272183b2c37478b4166fea', addressType: "shipping", class: "zonos--shipping-address-form", currentAddress: shipping, onAddressChange: e => {
|
|
148
|
+
const address = e.detail;
|
|
149
|
+
this.translatedShippingAddressState =
|
|
150
|
+
this.buildTranslateAddressState({
|
|
151
|
+
currentAddress: shipping,
|
|
152
|
+
translatedAddress: address,
|
|
153
|
+
});
|
|
154
|
+
}, translatedAddress: this.translatedShippingAddressState }), billing && (h("zonos-address-form", { key: '9bf5ebd6fb08851716a72c855451bfeb3ee0ed68', addressType: "billing", class: "zonos--billing-address-form", currentAddress: billing, onAddressChange: e => {
|
|
155
|
+
const address = e.detail;
|
|
156
|
+
this.translatedBillingAddressState =
|
|
157
|
+
this.buildTranslateAddressState({
|
|
158
|
+
currentAddress: billing,
|
|
159
|
+
translatedAddress: address,
|
|
160
|
+
});
|
|
161
|
+
}, translatedAddress: this.translatedBillingAddressState })))), h("div", { key: '621df9c8919973b37c62aca5727bde3635086a6b', class: "zonos--group-btn" }, h("div", { key: '95e9fd31418abc8e89ceef24af7cc251ee45ac93', class: "zonos--button-wrapper" }, h("zonos-button", { key: 'bef31fc81e7cc0f2b3f7ab875a29978b07865b6a', class: "zonos--cancel-btn", onClick: () => this.closeDialogHandler(), variant: "subtle" }, translate('Cancel')), h("zonos-button", { key: '9d183153541766b421c3420681c1159ffa599682', backgroundColor: this.submitBtnColor, class: "zonos--update-btn", loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "sm", variant: submitBtnType }, translate('Update address'))))))));
|
|
162
|
+
}
|
|
163
|
+
static get is() { return "zonos-address-update-dialog"; }
|
|
164
|
+
static get encapsulation() { return "shadow"; }
|
|
165
|
+
static get originalStyleUrls() {
|
|
166
|
+
return {
|
|
167
|
+
"$": ["zonos-address-update-dialog.scss"]
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
static get styleUrls() {
|
|
171
|
+
return {
|
|
172
|
+
"$": ["zonos-address-update-dialog.css"]
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
static get properties() {
|
|
176
|
+
return {
|
|
177
|
+
"continueLoading": {
|
|
178
|
+
"type": "boolean",
|
|
179
|
+
"mutable": false,
|
|
180
|
+
"complexType": {
|
|
181
|
+
"original": "boolean",
|
|
182
|
+
"resolved": "boolean",
|
|
183
|
+
"references": {}
|
|
184
|
+
},
|
|
185
|
+
"required": false,
|
|
186
|
+
"optional": false,
|
|
187
|
+
"docs": {
|
|
188
|
+
"tags": [],
|
|
189
|
+
"text": "Whether or not the continue button is loading"
|
|
190
|
+
},
|
|
191
|
+
"attribute": "continue-loading",
|
|
192
|
+
"reflect": false,
|
|
193
|
+
"defaultValue": "false"
|
|
194
|
+
},
|
|
195
|
+
"dialogLoading": {
|
|
196
|
+
"type": "boolean",
|
|
197
|
+
"mutable": false,
|
|
198
|
+
"complexType": {
|
|
199
|
+
"original": "boolean",
|
|
200
|
+
"resolved": "boolean",
|
|
201
|
+
"references": {}
|
|
202
|
+
},
|
|
203
|
+
"required": true,
|
|
204
|
+
"optional": false,
|
|
205
|
+
"docs": {
|
|
206
|
+
"tags": [],
|
|
207
|
+
"text": "Whether or not the dialog is loading"
|
|
208
|
+
},
|
|
209
|
+
"attribute": "dialog-loading",
|
|
210
|
+
"reflect": false
|
|
211
|
+
},
|
|
212
|
+
"dialogOpen": {
|
|
213
|
+
"type": "boolean",
|
|
214
|
+
"mutable": false,
|
|
215
|
+
"complexType": {
|
|
216
|
+
"original": "boolean",
|
|
217
|
+
"resolved": "boolean",
|
|
218
|
+
"references": {}
|
|
219
|
+
},
|
|
220
|
+
"required": false,
|
|
221
|
+
"optional": false,
|
|
222
|
+
"docs": {
|
|
223
|
+
"tags": [],
|
|
224
|
+
"text": "Whether or not the dialog is open"
|
|
225
|
+
},
|
|
226
|
+
"attribute": "dialog-open",
|
|
227
|
+
"reflect": false,
|
|
228
|
+
"defaultValue": "false"
|
|
229
|
+
},
|
|
230
|
+
"submitBtnType": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"mutable": false,
|
|
233
|
+
"complexType": {
|
|
234
|
+
"original": "HTMLZonosButtonElement['variant']",
|
|
235
|
+
"resolved": "\"danger\" | \"outline\" | \"primary\" | \"standard\" | \"subtle\" | \"success\" | \"warning\" | undefined",
|
|
236
|
+
"references": {
|
|
237
|
+
"HTMLZonosButtonElement": {
|
|
238
|
+
"location": "global",
|
|
239
|
+
"id": "global::HTMLZonosButtonElement"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"required": false,
|
|
244
|
+
"optional": true,
|
|
245
|
+
"docs": {
|
|
246
|
+
"tags": [],
|
|
247
|
+
"text": "Button type of the submit button"
|
|
248
|
+
},
|
|
249
|
+
"attribute": "submit-btn-type",
|
|
250
|
+
"reflect": false
|
|
251
|
+
},
|
|
252
|
+
"submitBtnColor": {
|
|
253
|
+
"type": "string",
|
|
254
|
+
"mutable": false,
|
|
255
|
+
"complexType": {
|
|
256
|
+
"original": "string",
|
|
257
|
+
"resolved": "string | undefined",
|
|
258
|
+
"references": {}
|
|
259
|
+
},
|
|
260
|
+
"required": false,
|
|
261
|
+
"optional": true,
|
|
262
|
+
"docs": {
|
|
263
|
+
"tags": [],
|
|
264
|
+
"text": "Button color of the submit button"
|
|
265
|
+
},
|
|
266
|
+
"attribute": "submit-btn-color",
|
|
267
|
+
"reflect": false
|
|
268
|
+
},
|
|
269
|
+
"isMobile": {
|
|
270
|
+
"type": "boolean",
|
|
271
|
+
"mutable": false,
|
|
272
|
+
"complexType": {
|
|
273
|
+
"original": "boolean",
|
|
274
|
+
"resolved": "boolean",
|
|
275
|
+
"references": {}
|
|
276
|
+
},
|
|
277
|
+
"required": false,
|
|
278
|
+
"optional": false,
|
|
279
|
+
"docs": {
|
|
280
|
+
"tags": [],
|
|
281
|
+
"text": "Whether or not the dialog is open"
|
|
282
|
+
},
|
|
283
|
+
"attribute": "is-mobile",
|
|
284
|
+
"reflect": false,
|
|
285
|
+
"defaultValue": "false"
|
|
286
|
+
},
|
|
287
|
+
"shippingAddress": {
|
|
288
|
+
"type": "unknown",
|
|
289
|
+
"mutable": false,
|
|
290
|
+
"complexType": {
|
|
291
|
+
"original": "EnteredInfo",
|
|
292
|
+
"resolved": "{ city: string; country: CountryCode; email: string; line1: string; line2: string; name: string; phone: string; postal_code: string; state: string; }",
|
|
293
|
+
"references": {
|
|
294
|
+
"EnteredInfo": {
|
|
295
|
+
"location": "import",
|
|
296
|
+
"path": "src/types/checkout/TranslatedText",
|
|
297
|
+
"id": "src/types/checkout/TranslatedText.ts::EnteredInfo"
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"required": true,
|
|
302
|
+
"optional": false,
|
|
303
|
+
"docs": {
|
|
304
|
+
"tags": [],
|
|
305
|
+
"text": "Shipping address that user has entered"
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"billingAddress": {
|
|
309
|
+
"type": "unknown",
|
|
310
|
+
"mutable": false,
|
|
311
|
+
"complexType": {
|
|
312
|
+
"original": "EnteredInfo | null",
|
|
313
|
+
"resolved": "null | { city: string; country: CountryCode; email: string; line1: string; line2: string; name: string; phone: string; postal_code: string; state: string; }",
|
|
314
|
+
"references": {
|
|
315
|
+
"EnteredInfo": {
|
|
316
|
+
"location": "import",
|
|
317
|
+
"path": "src/types/checkout/TranslatedText",
|
|
318
|
+
"id": "src/types/checkout/TranslatedText.ts::EnteredInfo"
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"required": true,
|
|
323
|
+
"optional": false,
|
|
324
|
+
"docs": {
|
|
325
|
+
"tags": [],
|
|
326
|
+
"text": "Billing address that user has entered (optional if billing is the same as shipping)"
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"translatedShippingAddress": {
|
|
330
|
+
"type": "unknown",
|
|
331
|
+
"mutable": false,
|
|
332
|
+
"complexType": {
|
|
333
|
+
"original": "TranslatedAddressObject",
|
|
334
|
+
"resolved": "{ line1?: TranslatedText | undefined; line2?: TranslatedText | undefined; city?: TranslatedText | undefined; state?: TranslatedText | undefined; postal_code?: TranslatedText | undefined; name?: TranslatedText | undefined; }",
|
|
335
|
+
"references": {
|
|
336
|
+
"TranslatedAddressObject": {
|
|
337
|
+
"location": "import",
|
|
338
|
+
"path": "src/types/checkout/TranslatedText",
|
|
339
|
+
"id": "src/types/checkout/TranslatedText.ts::TranslatedAddressObject"
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"required": true,
|
|
344
|
+
"optional": false,
|
|
345
|
+
"docs": {
|
|
346
|
+
"tags": [],
|
|
347
|
+
"text": "Translated address fields that GPT has translated"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"translatedBillingAddress": {
|
|
351
|
+
"type": "unknown",
|
|
352
|
+
"mutable": false,
|
|
353
|
+
"complexType": {
|
|
354
|
+
"original": "TranslatedAddressObject",
|
|
355
|
+
"resolved": "{ line1?: TranslatedText | undefined; line2?: TranslatedText | undefined; city?: TranslatedText | undefined; state?: TranslatedText | undefined; postal_code?: TranslatedText | undefined; name?: TranslatedText | undefined; }",
|
|
356
|
+
"references": {
|
|
357
|
+
"TranslatedAddressObject": {
|
|
358
|
+
"location": "import",
|
|
359
|
+
"path": "src/types/checkout/TranslatedText",
|
|
360
|
+
"id": "src/types/checkout/TranslatedText.ts::TranslatedAddressObject"
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
"required": true,
|
|
365
|
+
"optional": false,
|
|
366
|
+
"docs": {
|
|
367
|
+
"tags": [],
|
|
368
|
+
"text": "Translated address fields that GPT has translated"
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
static get states() {
|
|
374
|
+
return {
|
|
375
|
+
"showErrorBanner": {},
|
|
376
|
+
"translatedShippingAddressState": {},
|
|
377
|
+
"translatedBillingAddressState": {}
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
static get events() {
|
|
381
|
+
return [{
|
|
382
|
+
"method": "closeDialog",
|
|
383
|
+
"name": "closeDialog",
|
|
384
|
+
"bubbles": true,
|
|
385
|
+
"cancelable": true,
|
|
386
|
+
"composed": true,
|
|
387
|
+
"docs": {
|
|
388
|
+
"tags": [],
|
|
389
|
+
"text": "Close dialog button click"
|
|
390
|
+
},
|
|
391
|
+
"complexType": {
|
|
392
|
+
"original": "void",
|
|
393
|
+
"resolved": "void",
|
|
394
|
+
"references": {}
|
|
395
|
+
}
|
|
396
|
+
}, {
|
|
397
|
+
"method": "continueClicked",
|
|
398
|
+
"name": "continueClicked",
|
|
399
|
+
"bubbles": true,
|
|
400
|
+
"cancelable": true,
|
|
401
|
+
"composed": true,
|
|
402
|
+
"docs": {
|
|
403
|
+
"tags": [],
|
|
404
|
+
"text": "Event to emit when the continue button is clicked"
|
|
405
|
+
},
|
|
406
|
+
"complexType": {
|
|
407
|
+
"original": "SubmitEventData",
|
|
408
|
+
"resolved": "{ billingAddress: Record<\"line1\" | \"line2\" | \"city\" | \"state\" | \"postal_code\" | \"name\", string> | null; shippingAddress: Record<\"line1\" | \"line2\" | \"city\" | \"state\" | \"postal_code\" | \"name\", string>; }",
|
|
409
|
+
"references": {
|
|
410
|
+
"SubmitEventData": {
|
|
411
|
+
"location": "local",
|
|
412
|
+
"path": "/home/runner/work/zonos-elements/zonos-elements/src/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.tsx",
|
|
413
|
+
"id": "src/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.tsx::SubmitEventData"
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}];
|
|
418
|
+
}
|
|
419
|
+
static get elementRef() { return "el"; }
|
|
420
|
+
static get watchers() {
|
|
421
|
+
return [{
|
|
422
|
+
"propName": "translatedShippingAddress",
|
|
423
|
+
"methodName": "watchTranslatedShippingAddress"
|
|
424
|
+
}, {
|
|
425
|
+
"propName": "translatedBillingAddress",
|
|
426
|
+
"methodName": "watchTranslatedBillingAddress"
|
|
427
|
+
}];
|
|
428
|
+
}
|
|
429
|
+
}
|
package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js
CHANGED
|
@@ -9,7 +9,7 @@ export class ZonosCartItems {
|
|
|
9
9
|
var _a;
|
|
10
10
|
const emptyItemImg = getAssetPath('./assets/empty-item.jpeg');
|
|
11
11
|
const rate = ((_a = cartStore.exchangeRate) === null || _a === void 0 ? void 0 : _a.rate) || 1;
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: 'e2d53d541a342f816efe95f3a0b5551ea7f95e38', class: "zonos--cart-items zonos--elements" }, h("table", { key: 'f2dbf582004f7db5947e55b5b93f1437dc9d2a95', class: "zonos--cart-table" }, h("tbody", { key: 'a9948cbeb5ad9886d582e518d3bbe0ab9c5dda9d' }, cartStore.items.map(item => {
|
|
13
13
|
const itemImg = item.imageUrl;
|
|
14
14
|
return (h("tr", { class: "zonos--cart-item" }, h("td", { class: "zonos--column zonos--cart-item-image" }, itemImg && !this.errorImages.includes(itemImg) ? (h("img", { alt: item.name, onError: () => {
|
|
15
15
|
this.errorImages = [...this.errorImages, itemImg];
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
font-size: var(--amino-font-size-base);
|
|
40
40
|
}
|
|
41
41
|
:host .zonos--cart-table .zonos--column {
|
|
42
|
-
padding:
|
|
42
|
+
padding: 20px 8px;
|
|
43
43
|
vertical-align: top;
|
|
44
44
|
}
|
|
45
45
|
:host .zonos--cart-table .zonos--column:last-child {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
:host .zonos--title-with-icon {
|
|
52
52
|
display: flex;
|
|
53
53
|
align-items: center;
|
|
54
|
-
gap:
|
|
54
|
+
gap: 8px;
|
|
55
55
|
}
|
|
56
56
|
:host .zonos--cart-subtotal-title,
|
|
57
57
|
:host .zonos--cart-subtotal-price {
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
flex-direction: column;
|
|
41
41
|
justify-content: center;
|
|
42
42
|
align-items: center;
|
|
43
|
-
margin-bottom:
|
|
43
|
+
margin-bottom: 24px;
|
|
44
44
|
border-radius: var(--border-radius, 10px);
|
|
45
|
-
gap:
|
|
45
|
+
gap: 24px;
|
|
46
46
|
max-width: 360px;
|
|
47
47
|
width: auto;
|
|
48
48
|
margin: auto;
|
|
49
|
-
margin-top:
|
|
49
|
+
margin-top: 24px;
|
|
50
50
|
background-color: var(--amino-gray-50);
|
|
51
|
-
padding:
|
|
51
|
+
padding: 20px;
|
|
52
52
|
}
|
|
53
53
|
:host zonos-button {
|
|
54
54
|
width: 100%;
|
|
@@ -153,9 +153,11 @@ export class ZonosCheckoutFinish {
|
|
|
153
153
|
// const totalItems = this.order?.items?.reduce((acc, item) => {
|
|
154
154
|
// return acc + item.quantity;
|
|
155
155
|
// }, 0);
|
|
156
|
-
return (h(Host, { key: '
|
|
157
|
-
'--border-radius': getBorderRadius(
|
|
158
|
-
|
|
156
|
+
return (h(Host, { key: 'fffe0cbefd173f892f3a0359ac45a8b97392172e', class: "zonos--checkout-finish zonos--elements", style: {
|
|
157
|
+
'--border-radius': getBorderRadius({
|
|
158
|
+
overrideBorderStyle: this.borderRadius,
|
|
159
|
+
}),
|
|
160
|
+
} }, this.isLoading && (h("div", { key: 'b0a8c67102f0eb841d114e8cd1cd7e44fe895df4', class: "loading-wrapper" }, h("zonos-spinner", { key: 'e45f13d061cd94f777abfef5f12a8dc9a927c9e1' }))), !this.isLoading && (h(Fragment, null, h("div", { key: '81ca150772d4f6b38563bb46d5c76ebc51f9628c', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: 'c88feb2cc5956087fc91c5a00edb4e142efbfee0', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: '621b100ed02aa5dc37f1da5be90c8f14568a21f3' }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { key: '9fff5bc809f97f8126a8117b2896f984e07fc1be', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, translate('Keep shopping')))))));
|
|
159
161
|
}
|
|
160
162
|
static get is() { return "zonos-checkout-finish"; }
|
|
161
163
|
static get encapsulation() { return "shadow"; }
|
|
@@ -43,20 +43,20 @@
|
|
|
43
43
|
}
|
|
44
44
|
:host .zonos--checkout-footer {
|
|
45
45
|
width: calc(90vw - 22px);
|
|
46
|
-
gap:
|
|
46
|
+
gap: 16px;
|
|
47
47
|
display: flex;
|
|
48
48
|
justify-content: space-between;
|
|
49
|
-
padding:
|
|
49
|
+
padding: 12px;
|
|
50
50
|
align-items: center;
|
|
51
51
|
}
|
|
52
52
|
:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper {
|
|
53
53
|
display: flex;
|
|
54
54
|
align-items: center;
|
|
55
|
-
gap:
|
|
55
|
+
gap: 24px;
|
|
56
56
|
}
|
|
57
57
|
:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo {
|
|
58
58
|
display: inline-flex;
|
|
59
|
-
gap:
|
|
59
|
+
gap: 8px;
|
|
60
60
|
align-items: center;
|
|
61
61
|
}
|
|
62
62
|
:host .zonos--checkout-footer .zonos--checkout-footer-icon-wrapper .zonos--checkout-footer-logo a {
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
:host .zonos--checkout-footer .zonos--checkout-locale-wrapper {
|
|
72
72
|
display: flex;
|
|
73
73
|
align-items: center;
|
|
74
|
-
gap:
|
|
74
|
+
gap: 8px;
|
|
75
75
|
position: relative;
|
|
76
76
|
}
|
|
77
77
|
@media (max-width: 400px) {
|
|
78
78
|
:host .zonos--checkout-footer .zonos--checkout-locale-wrapper {
|
|
79
|
-
gap:
|
|
79
|
+
gap: 4px;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
:host .zonos--checkout-footer .zonos--checkout-footer-dialog {
|
|
@@ -122,15 +122,15 @@
|
|
|
122
122
|
|
|
123
123
|
:host(.mobile) {
|
|
124
124
|
flex-direction: column;
|
|
125
|
-
gap:
|
|
125
|
+
gap: 32px;
|
|
126
126
|
background: var(--amino-gray-0);
|
|
127
127
|
position: relative;
|
|
128
|
-
padding-top:
|
|
128
|
+
padding-top: 24px;
|
|
129
129
|
bottom: 0;
|
|
130
130
|
}
|
|
131
131
|
:host(.mobile) .zonos--checkout-footer {
|
|
132
132
|
flex-direction: column;
|
|
133
|
-
gap:
|
|
133
|
+
gap: 4px;
|
|
134
134
|
}
|
|
135
135
|
:host(.mobile) .zonos--checkout-locale-wrapper {
|
|
136
136
|
flex-direction: column;
|
|
@@ -33,10 +33,10 @@ export class ZonosCheckoutFooter {
|
|
|
33
33
|
const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
|
|
34
34
|
// reverse color when on desktop. With the coversheet backdrop, the color should be white
|
|
35
35
|
const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-1200';
|
|
36
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: 'c66117f4ec54d24eba7e22271294aeb08746a9e1', class: classes(['zonos--elements', this.isMobile && 'mobile']) }, h("div", { key: 'a7b49ac9b5d52c2289c46c6b24c6082e68db64b5', class: "zonos--checkout-footer" }, h("div", { key: 'b2c4beb76236c9fe2eb58d0a27ecddf266c7a103', class: "zonos--checkout-locale-wrapper" }, h("zonos-button", { key: 'b981389f14c0b5696208dbb7ad3fabf0687a168f', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, languageLabel), h("div", { key: 'c0d5b4ab335af157789395632cf4278f55ace3fb', class: classes([
|
|
37
37
|
'zonos--checkout-footer-dialog',
|
|
38
38
|
this.showLanguageDialog && 'zonos--checkout-footer-dialog-open',
|
|
39
|
-
]) }, h("zonos-language-select", { key: '
|
|
39
|
+
]) }, h("zonos-language-select", { key: 'd1442fb364997399f35d657e9f5823da34872c71', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: 'ff8ee730b995a5d8a7b9a3939b96444958390ca5', class: "zonos--checkout-footer-icon-wrapper" }, h("a", { key: 'b2e896b9b37b1b0ba2bbb77034c7b0f6cf5c16a7', href: "https://zonos.com/docs/legal/zonos-privacy-policy", target: "_blank" }, h("zonos-text", { key: 'd1fe8d2bc28f3606b2f766659d52496ad4603c17', textColor: colorDesktop }, "Privacy policy")), h("div", { key: '4875d6ad0e0efc60f299a2db427608bf23b062f6', class: "zonos--checkout-footer-logo" }, h("zonos-text", { key: '13e2c1634ba3d8070f9ff14205fa3c3e9f8f5843', textColor: colorDesktop }, "Powered by"), h("a", { key: 'e00bec78174a8de0963c1a5caf721fd352dc9490', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '5910c724a05c686a7642385955a3faa042efe654', autoHeight: true, content: ZonosIcon, iconColor: colorDesktop, size: 108 })))))));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "zonos-checkout-footer"; }
|
|
42
42
|
static get encapsulation() { return "shadow"; }
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
flex-direction: column;
|
|
38
38
|
}
|
|
39
39
|
:host .zonos--title {
|
|
40
|
-
margin-bottom:
|
|
40
|
+
margin-bottom: 24px;
|
|
41
41
|
}
|
|
42
42
|
:host .zonos--group {
|
|
43
|
-
margin-bottom:
|
|
43
|
+
margin-bottom: 20px;
|
|
44
44
|
overflow: auto;
|
|
45
45
|
padding: 5px;
|
|
46
46
|
}
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
background: #d6d6d6;
|
|
61
61
|
}
|
|
62
62
|
:host .zonos--payment-error-banner {
|
|
63
|
-
margin-bottom:
|
|
63
|
+
margin-bottom: 8px;
|
|
64
64
|
}
|
|
65
65
|
:host .zonos--error-banner {
|
|
66
|
-
margin-bottom:
|
|
66
|
+
margin-bottom: 16px;
|
|
67
67
|
}
|
|
68
68
|
:host zonos-button {
|
|
69
69
|
box-shadow: 0 0 1px 0 var(--amino-gray-600);
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
display: flex;
|
|
74
74
|
justify-content: center;
|
|
75
75
|
bottom: 0;
|
|
76
|
-
margin-top:
|
|
76
|
+
margin-top: 12px;
|
|
77
77
|
background: var(--primary-color, var(--amino-gray-0));
|
|
78
78
|
}
|
|
79
79
|
:host .zonos--group-btn zonos-button {
|