@zonos/elements 1.3.18-alpha.2 → 1.3.18-alpha.4
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/README.md +341 -96
- package/dist/cjs/{cart-941a31dd.js → cart-72b0bccc.js} +34 -85
- package/dist/cjs/index.cjs.js +628 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/logError-4e2f2020.js +58 -0
- package/dist/cjs/{submitGtag-9210b4fe.js → submitGtag-b0c8de90.js} +3 -2
- package/dist/cjs/zonos-address_8.cjs.entry.js +13 -12
- package/dist/cjs/zonos-badge_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_2.cjs.entry.js +7 -6
- package/dist/cjs/zonos-cart-items_11.cjs.entry.js +11 -10
- package/dist/cjs/zonos-checkout.cjs.entry.js +20 -15
- package/dist/cjs/zonos-controller.cjs.entry.js +47 -20
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +6 -5
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +10 -9
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +3 -2
- package/dist/collection/__mocks__/zonos-url/index.js +1 -0
- package/dist/collection/__tests__/build-utils/urlCheckOne.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +4 -9
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +8 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +3 -3
- 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 +3 -3
- 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 +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- 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/{component-template/zonos-link → zonos-link}/zonos-link.js +1 -1
- package/dist/collection/components/main/zonos-controller.js +41 -6
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +3 -3
- package/dist/collection/components/utils/hello/setZCountryUrlParam.js +5 -1
- package/dist/collection/environment.js +0 -2
- package/dist/collection/index.js +1 -0
- package/dist/collection/scripts/_extractZonosQaUrl.js +26 -0
- package/dist/collection/scripts/_getZonosQaUrl.js +44 -0
- package/dist/collection/scripts/{loadStripe.js → _loadStripe.js} +1 -1
- package/dist/collection/scripts/{zonosBase.js → _zonosBase.js} +29 -6
- package/dist/collection/scripts/index.js +2 -0
- package/dist/collection/types/generated/graphql.customer.types.js +1 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +1 -0
- package/dist/esm/{cart-cc593c2b.js → cart-1a37e002.js} +7 -56
- package/dist/esm/index.js +625 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/logError-c456c092.js +55 -0
- package/dist/esm/{submitGtag-e50f903f.js → submitGtag-754935b4.js} +2 -1
- package/dist/esm/zonos-address_8.entry.js +11 -10
- package/dist/esm/zonos-badge_2.entry.js +3 -3
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card_2.entry.js +7 -6
- package/dist/esm/zonos-cart-items_11.entry.js +11 -10
- package/dist/esm/zonos-checkout.entry.js +8 -3
- package/dist/esm/zonos-controller.entry.js +30 -3
- package/dist/esm/zonos-country-flag.entry.js +2 -1
- package/dist/esm/zonos-country-select_3.entry.js +6 -5
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +2 -1
- package/dist/esm/zonos-hello.entry.js +2 -1
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +2 -1
- package/dist/esm-es5/cart-1a37e002.js +1 -0
- package/dist/esm-es5/index.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/logError-c456c092.js +1 -0
- package/dist/esm-es5/submitGtag-754935b4.js +1 -0
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_11.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/scripts/index.d.ts +3908 -0
- package/dist/scripts/index.js +1 -0
- package/dist/scripts/loadZonos.d.ts +3954 -0
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +5 -7
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +2 -2
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +2 -2
- package/dist/types/components/main/zonos-controller.d.ts +6 -1
- package/dist/types/components/store/checkout/stripe.d.ts +1 -1
- package/dist/types/components/store/zonosStore.d.ts +1 -1
- package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +2 -2
- package/dist/types/components/utils/styles.d.ts +1 -0
- package/dist/types/components.d.ts +22 -14
- package/dist/types/index.d.ts +1 -0
- package/dist/types/scripts/_extractZonosQaUrl.d.ts +11 -0
- package/dist/types/scripts/_getZonosQaUrl.d.ts +4 -0
- package/dist/types/scripts/{loadStripe.d.ts → _loadStripe.d.ts} +1 -1
- package/dist/types/scripts/{zonosBase.d.ts → _zonosBase.d.ts} +36 -2
- package/dist/types/scripts/index.d.ts +2 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +5 -0
- package/dist/types/types/checkout/api/CalculateLandedCostRequest.d.ts +9 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +1 -0
- package/dist/types/types/generated/graphql.customer.types.ts +3 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -0
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -0
- package/dist/types/types/global.d.ts +1 -1
- package/dist/zonos-elements/index.esm.js +1 -0
- package/dist/zonos-elements/p-0878369a.entry.js +1 -0
- package/dist/zonos-elements/p-0d1c06d7.entry.js +1 -0
- package/dist/zonos-elements/{p-9aab3ad7.entry.js → p-0d5b5bcc.entry.js} +1 -1
- package/dist/zonos-elements/p-1491717a.entry.js +1 -0
- package/dist/zonos-elements/p-14ff42fe.system.entry.js +1 -0
- package/dist/zonos-elements/p-2800c274.system.entry.js +1 -0
- package/dist/zonos-elements/p-2e02a76f.system.entry.js +1 -0
- package/dist/zonos-elements/{p-020a9b86.entry.js → p-3ba8838a.entry.js} +1 -1
- package/dist/zonos-elements/p-4594a125.js +1 -0
- package/dist/zonos-elements/p-483e1724.entry.js +1 -0
- package/dist/zonos-elements/{p-d0bc8902.system.entry.js → p-4f72bfee.system.entry.js} +1 -1
- package/dist/zonos-elements/p-58be220f.system.js +1 -0
- package/dist/zonos-elements/{p-9e9c318b.entry.js → p-58fc8ec1.entry.js} +1 -1
- package/dist/zonos-elements/p-63db40b9.system.js +1 -0
- package/dist/zonos-elements/p-6449c92b.js +1 -0
- package/dist/zonos-elements/p-6746455b.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c20e5430.entry.js → p-6cb9812b.entry.js} +1 -1
- package/dist/zonos-elements/p-7487ef47.entry.js +1 -0
- package/dist/zonos-elements/p-7b2d367b.entry.js +1 -0
- package/dist/zonos-elements/p-9389cc42.system.entry.js +1 -0
- package/dist/zonos-elements/p-9be6c62b.system.js +1 -0
- package/dist/zonos-elements/p-9c242e4b.system.entry.js +1 -0
- package/dist/zonos-elements/p-a37796e1.entry.js +1 -0
- package/dist/zonos-elements/p-afb89d65.entry.js +1 -0
- package/dist/zonos-elements/p-bbb84165.system.entry.js +1 -0
- package/dist/zonos-elements/{p-96b8c9ba.system.entry.js → p-bdfa3705.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c195e980.system.entry.js +1 -0
- package/dist/zonos-elements/p-c87c76d4.entry.js +1 -0
- package/dist/zonos-elements/p-d9011df9.entry.js +1 -0
- package/dist/zonos-elements/{p-3e26d7b3.system.entry.js → p-dda78e8e.system.entry.js} +1 -1
- package/dist/zonos-elements/p-de9e610d.system.entry.js +1 -0
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
- package/dist/zonos-elements/p-eaa335e1.js +1 -0
- package/dist/zonos-elements/{p-e13bfbda.system.entry.js → p-ed3524ae.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f5b14bab.system.js +1 -0
- package/dist/zonos-elements/p-f9a42a3c.system.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +4 -2
- package/dist/components/ILanguage.js +0 -24
- package/dist/components/classes.js +0 -12
- package/dist/components/containsNonLatinChars.js +0 -21
- package/dist/components/formatCurrency.js +0 -11
- package/dist/components/getBorderRadius.js +0 -18
- package/dist/components/index.d.ts +0 -33
- package/dist/components/index.js +0 -1
- package/dist/components/isCheckoutMobile.js +0 -6
- package/dist/components/isColorVariable.js +0 -14
- package/dist/components/isDarkColor.js +0 -1199
- package/dist/components/stripe.js +0 -1691
- package/dist/components/submitGtag.js +0 -19
- package/dist/components/trackConversionEvent.js +0 -37
- package/dist/components/translationStore.js +0 -5611
- package/dist/components/zonos-address-display.d.ts +0 -11
- package/dist/components/zonos-address-display.js +0 -6
- package/dist/components/zonos-address-display2.js +0 -64
- package/dist/components/zonos-address-form.d.ts +0 -11
- package/dist/components/zonos-address-form.js +0 -6
- package/dist/components/zonos-address-form2.js +0 -84
- package/dist/components/zonos-address-update-dialog.d.ts +0 -11
- package/dist/components/zonos-address-update-dialog.js +0 -6
- package/dist/components/zonos-address-update-dialog2.js +0 -264
- package/dist/components/zonos-address.d.ts +0 -11
- package/dist/components/zonos-address.js +0 -6
- package/dist/components/zonos-address2.js +0 -176
- package/dist/components/zonos-badge.d.ts +0 -11
- package/dist/components/zonos-badge.js +0 -6
- package/dist/components/zonos-badge2.js +0 -61
- package/dist/components/zonos-banner.d.ts +0 -11
- package/dist/components/zonos-banner.js +0 -6
- package/dist/components/zonos-banner2.js +0 -95
- package/dist/components/zonos-button.d.ts +0 -11
- package/dist/components/zonos-button.js +0 -6
- package/dist/components/zonos-button2.js +0 -186
- package/dist/components/zonos-card.d.ts +0 -11
- package/dist/components/zonos-card.js +0 -6
- package/dist/components/zonos-card2.js +0 -57
- package/dist/components/zonos-cart-items.d.ts +0 -11
- package/dist/components/zonos-cart-items.js +0 -6
- package/dist/components/zonos-cart-items2.js +0 -57
- package/dist/components/zonos-cart-restricted-items.d.ts +0 -11
- package/dist/components/zonos-cart-restricted-items.js +0 -6
- package/dist/components/zonos-cart-restricted-items2.js +0 -135
- package/dist/components/zonos-cart-subtotal.d.ts +0 -11
- package/dist/components/zonos-cart-subtotal.js +0 -6
- package/dist/components/zonos-cart-subtotal2.js +0 -91
- package/dist/components/zonos-checkbox.d.ts +0 -11
- package/dist/components/zonos-checkbox.js +0 -6
- package/dist/components/zonos-checkbox2.js +0 -96
- package/dist/components/zonos-checkout-finish.d.ts +0 -11
- package/dist/components/zonos-checkout-finish.js +0 -6
- package/dist/components/zonos-checkout-finish2.js +0 -246
- package/dist/components/zonos-checkout-footer.d.ts +0 -11
- package/dist/components/zonos-checkout-footer.js +0 -6
- package/dist/components/zonos-checkout-footer2.js +0 -125
- package/dist/components/zonos-checkout-payment.d.ts +0 -11
- package/dist/components/zonos-checkout-payment.js +0 -6
- package/dist/components/zonos-checkout-payment2.js +0 -104
- package/dist/components/zonos-checkout-progress-tabs.d.ts +0 -11
- package/dist/components/zonos-checkout-progress-tabs.js +0 -6
- package/dist/components/zonos-checkout-progress-tabs2.js +0 -138
- package/dist/components/zonos-checkout.d.ts +0 -11
- package/dist/components/zonos-checkout.js +0 -1051
- package/dist/components/zonos-collapse.d.ts +0 -11
- package/dist/components/zonos-collapse.js +0 -6
- package/dist/components/zonos-collapse2.js +0 -78
- package/dist/components/zonos-component.d.ts +0 -11
- package/dist/components/zonos-component.js +0 -48
- package/dist/components/zonos-confirm-dialog.d.ts +0 -11
- package/dist/components/zonos-confirm-dialog.js +0 -6
- package/dist/components/zonos-confirm-dialog2.js +0 -161
- package/dist/components/zonos-controller.d.ts +0 -11
- package/dist/components/zonos-controller.js +0 -309
- package/dist/components/zonos-country-flag.d.ts +0 -11
- package/dist/components/zonos-country-flag.js +0 -6
- package/dist/components/zonos-country-flag2.js +0 -54
- package/dist/components/zonos-country-select.d.ts +0 -11
- package/dist/components/zonos-country-select.js +0 -6
- package/dist/components/zonos-country-select2.js +0 -1891
- package/dist/components/zonos-custom-message.d.ts +0 -11
- package/dist/components/zonos-custom-message.js +0 -6
- package/dist/components/zonos-custom-message2.js +0 -72
- package/dist/components/zonos-customer-info.d.ts +0 -11
- package/dist/components/zonos-customer-info.js +0 -6
- package/dist/components/zonos-customer-info2.js +0 -316
- package/dist/components/zonos-dialog.d.ts +0 -11
- package/dist/components/zonos-dialog.js +0 -6
- package/dist/components/zonos-dialog2.js +0 -136
- package/dist/components/zonos-hello-dialog-footer.d.ts +0 -11
- package/dist/components/zonos-hello-dialog-footer.js +0 -6
- package/dist/components/zonos-hello-dialog-footer2.js +0 -83
- package/dist/components/zonos-hello-dialog.d.ts +0 -11
- package/dist/components/zonos-hello-dialog.js +0 -6
- package/dist/components/zonos-hello-dialog2.js +0 -305
- package/dist/components/zonos-hello.d.ts +0 -11
- package/dist/components/zonos-hello.js +0 -879
- package/dist/components/zonos-icon.d.ts +0 -11
- package/dist/components/zonos-icon.js +0 -6
- package/dist/components/zonos-icon2.js +0 -55
- package/dist/components/zonos-input.d.ts +0 -11
- package/dist/components/zonos-input.js +0 -6
- package/dist/components/zonos-input2.js +0 -78
- package/dist/components/zonos-language-select.d.ts +0 -11
- package/dist/components/zonos-language-select.js +0 -6
- package/dist/components/zonos-language-select2.js +0 -88
- package/dist/components/zonos-link-authentication.d.ts +0 -11
- package/dist/components/zonos-link-authentication.js +0 -6
- package/dist/components/zonos-link-authentication2.js +0 -80
- package/dist/components/zonos-link.d.ts +0 -11
- package/dist/components/zonos-link.js +0 -43
- package/dist/components/zonos-logo.d.ts +0 -11
- package/dist/components/zonos-logo.js +0 -49
- package/dist/components/zonos-notification.d.ts +0 -11
- package/dist/components/zonos-notification.js +0 -6
- package/dist/components/zonos-notification2.js +0 -92
- package/dist/components/zonos-payment.d.ts +0 -11
- package/dist/components/zonos-payment.js +0 -6
- package/dist/components/zonos-payment2.js +0 -77
- package/dist/components/zonos-review.d.ts +0 -11
- package/dist/components/zonos-review.js +0 -6
- package/dist/components/zonos-review2.js +0 -89
- package/dist/components/zonos-select-dialog-header.d.ts +0 -11
- package/dist/components/zonos-select-dialog-header.js +0 -6
- package/dist/components/zonos-select-dialog-header2.js +0 -71
- package/dist/components/zonos-shipping-rich-radio.d.ts +0 -11
- package/dist/components/zonos-shipping-rich-radio.js +0 -6
- package/dist/components/zonos-shipping-rich-radio2.js +0 -88
- package/dist/components/zonos-shipping.d.ts +0 -11
- package/dist/components/zonos-shipping.js +0 -6
- package/dist/components/zonos-shipping2.js +0 -159
- package/dist/components/zonos-spinner.d.ts +0 -11
- package/dist/components/zonos-spinner.js +0 -6
- package/dist/components/zonos-spinner2.js +0 -43
- package/dist/components/zonos-text.d.ts +0 -11
- package/dist/components/zonos-text.js +0 -6
- package/dist/components/zonos-text2.js +0 -182
- package/dist/components/zonos-tooltip.d.ts +0 -11
- package/dist/components/zonos-tooltip.js +0 -6
- package/dist/components/zonos-tooltip2.js +0 -48
- package/dist/components/zonos-v-stack.d.ts +0 -11
- package/dist/components/zonos-v-stack.js +0 -6
- package/dist/components/zonos-v-stack2.js +0 -38
- package/dist/components/zonosStore.js +0 -2881
- package/dist/esm-es5/cart-cc593c2b.js +0 -1
- package/dist/esm-es5/submitGtag-e50f903f.js +0 -1
- package/dist/scripts/checkIfLoadVersionDomain.js +0 -1
- package/dist/scripts/extractZonosQaUrl.js +0 -1
- package/dist/scripts/getTempCartById.js +0 -1
- package/dist/scripts/loadStripe.js +0 -1
- package/dist/scripts/stripe.js +0 -1
- package/dist/scripts/zonosBase.js +0 -1
- package/dist/zonos-elements/p-04030a48.entry.js +0 -1
- package/dist/zonos-elements/p-0e892292.entry.js +0 -1
- package/dist/zonos-elements/p-0fac99e7.entry.js +0 -1
- package/dist/zonos-elements/p-1795c760.system.entry.js +0 -1
- package/dist/zonos-elements/p-24ac1c6f.entry.js +0 -1
- package/dist/zonos-elements/p-26a60a6e.entry.js +0 -1
- package/dist/zonos-elements/p-32744531.entry.js +0 -1
- package/dist/zonos-elements/p-35ac375a.system.entry.js +0 -1
- package/dist/zonos-elements/p-3bc88c3c.system.entry.js +0 -1
- package/dist/zonos-elements/p-4caaaaeb.system.entry.js +0 -1
- package/dist/zonos-elements/p-50ea2036.system.js +0 -1
- package/dist/zonos-elements/p-5e783394.entry.js +0 -1
- package/dist/zonos-elements/p-6366e7e3.entry.js +0 -1
- package/dist/zonos-elements/p-7c8ee4b9.system.entry.js +0 -1
- package/dist/zonos-elements/p-80ea85b8.entry.js +0 -1
- package/dist/zonos-elements/p-8da16d53.system.js +0 -1
- package/dist/zonos-elements/p-98a0b694.system.entry.js +0 -1
- package/dist/zonos-elements/p-b98cdf39.system.entry.js +0 -1
- package/dist/zonos-elements/p-d7b8c1c1.system.entry.js +0 -1
- package/dist/zonos-elements/p-dd0fd351.entry.js +0 -1
- package/dist/zonos-elements/p-e015cb0e.js +0 -1
- package/dist/zonos-elements/p-e1fbd05d.system.entry.js +0 -1
- package/dist/zonos-elements/p-e553dd19.js +0 -1
- package/dist/zonos-elements/p-e6fa0ebc.system.js +0 -1
- package/dist/zonos-elements/p-f6546bf4.system.entry.js +0 -1
- /package/dist/collection/components/common/{component-template/zonos-link → zonos-link}/zonos-link.css +0 -0
- /package/dist/collection/scripts/{checkIfLoadVersionDomain.js → _checkIfLoadVersionDomain.js} +0 -0
- /package/dist/collection/scripts/{stripe.js → _stripe.js} +0 -0
- /package/dist/types/components/common/{component-template/zonos-link → zonos-link}/zonos-link.d.ts +0 -0
- /package/dist/types/scripts/{checkIfLoadVersionDomain.d.ts → _checkIfLoadVersionDomain.d.ts} +0 -0
- /package/dist/types/scripts/{stripe.d.ts → _stripe.d.ts} +0 -0
|
@@ -11,16 +11,16 @@ export class ZonosBadge {
|
|
|
11
11
|
this.rounded = false;
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '6abf1f29bb6368710b45414baca9643421de2643', class: classes(['zonos--elements zonos--badge']), style: {
|
|
15
15
|
'--font-family': zonosStoreFontFamily(),
|
|
16
|
-
} }, h("div", { key: '
|
|
16
|
+
} }, h("div", { key: 'fb0b246a59f0350313673d4430ac4f2bcd9d6b80', class: classes([
|
|
17
17
|
'zonos--badge-content',
|
|
18
18
|
this.badgeColor,
|
|
19
19
|
this.rounded && 'rounded',
|
|
20
20
|
this.iconRight && 'icon-right',
|
|
21
21
|
this.size,
|
|
22
22
|
this.bold && 'bold',
|
|
23
|
-
]) }, this.icon, h("zonos-text", { key: '
|
|
23
|
+
]) }, this.icon, h("zonos-text", { key: '2d6024af48ce0e082d3a1332794978cfd42793d6' }, h("slot", { key: '9cb7e771b0a949b912c6fa5946018cbf072ed018' })))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "zonos-badge"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -84,12 +84,12 @@ export class ZonosButton {
|
|
|
84
84
|
const spinnerColor = backgroundActualColor && isDarkColor(backgroundActualColor)
|
|
85
85
|
? 'white'
|
|
86
86
|
: 'black';
|
|
87
|
-
return (h(Host, { key: '
|
|
87
|
+
return (h(Host, { key: '00d085d600a759366f4a2de8617d81831c0ce16b', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
|
|
88
88
|
'--background-color': overrideBackground,
|
|
89
89
|
'--border-radius': borderStyle,
|
|
90
90
|
'--color': contrastColor,
|
|
91
91
|
'--font-family': zonosStoreFontFamily(),
|
|
92
|
-
}) }, h("button", { key: '
|
|
92
|
+
}) }, h("button", { key: 'b79ffdb0212630598e95f07059bb3b41049cff47', class: classes([
|
|
93
93
|
this.hasIcon && 'has-icon',
|
|
94
94
|
this.hasContent && 'has-content',
|
|
95
95
|
this.noBackground && 'no-background',
|
|
@@ -103,7 +103,7 @@ export class ZonosButton {
|
|
|
103
103
|
overrideBackground &&
|
|
104
104
|
variant === 'standard' &&
|
|
105
105
|
'override-background',
|
|
106
|
-
]), disabled: disabled }, this.loading && (h("div", { key: '
|
|
106
|
+
]), disabled: disabled }, this.loading && (h("div", { key: '4462430185736b45b11bd18f08d1e3c6177f192f', class: "zonos--spinner-wrapper" }, h("zonos-spinner", { key: 'c866ff989b95929e8d6a44d950dc943531f1dc0c', size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: 'a57d0b3924eef51bf3938261c8d823e9d8aa0206', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
107
107
|
}
|
|
108
108
|
static get is() { return "zonos-button"; }
|
|
109
109
|
static get encapsulation() { return "shadow"; }
|
|
@@ -12,12 +12,12 @@ export class ZonosCard {
|
|
|
12
12
|
this.spacing = '24px';
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: '0e52ca31db6c2f956da1910d6e0a222b588c1bcc', style: {
|
|
16
16
|
'--font-family': zonosStoreFontFamily(),
|
|
17
|
-
} }, h("div", { key: '
|
|
17
|
+
} }, h("div", { key: '69f391d821f88cbee4b0c586a8323b1dd68d7fd3', class: classes(['styled-card']), style: { padding: this.spacing } }, this.label && (h("header", { key: '4568a1d7c354830e6e65e31b20b38140aaab9d01', class: "card-header", style: { padding: this.spacing } }, h("zonos-text", { key: 'e0a6b7a3776916f8208c27373878041807d91960', type: "subheader" }, this.label), h("h-stack", { key: 'c5f8d01b2f477b16ab9387081987eae64b156e76', spacing: 8 }, this.actions))), h("slot", { key: '6001acfaae8ba37456a7c23bae5c44a91da074f9' }), (this.footerActions || this.footerContent) && (h("footer", { key: '78b926a323a5f1375c8120d5aa8b1ab2a4f3fa4a', class: "card-footer", style: {
|
|
18
18
|
height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
|
|
19
19
|
padding: this.spacing,
|
|
20
|
-
} }, h("div", { key: '
|
|
20
|
+
} }, h("div", { key: '2bd0c86b75096c2ee786d4a9b16a3d6e385fbbf1' }, this.footerContent), h("h-stack", { key: '7a3f840ac9678a905338a99b8327115bc8199789', spacing: 8 }, this.footerActions))))));
|
|
21
21
|
}
|
|
22
22
|
static get is() { return "zonos-card"; }
|
|
23
23
|
static get encapsulation() { return "shadow"; }
|
|
@@ -36,14 +36,14 @@ export class ZonosCheckbox {
|
|
|
36
36
|
customRoundRadius: '4px',
|
|
37
37
|
overrideBorderStyle: this.borderStyle,
|
|
38
38
|
});
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: '8a1adb8ba23d34a7730e5b5a81bc6b5ada58cb83', class: classes(['zonos--elements zonos--checkbox']), style: {
|
|
40
40
|
'--background-color': backgroundColor,
|
|
41
41
|
'--border-radius': borderStyle,
|
|
42
42
|
'--font-family': zonosStoreFontFamily(),
|
|
43
43
|
'--size': `${this.size}px`,
|
|
44
|
-
} }, h("label", { key: '
|
|
44
|
+
} }, h("label", { key: 'e954bcef9e021bfbb98031f030542a89d8faf0f3', class: classes([this.isDisabled && 'disabled']) }, h("input", { key: '17788f6c205a139dde1b42cc91579d0975233e77', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
|
|
45
45
|
this.checkboxSelected.emit(e.target.checked);
|
|
46
|
-
}, type: "checkbox" }), h("span", { key: '
|
|
46
|
+
}, type: "checkbox" }), h("span", { key: '589486a19b7b0b42ce8eabd2230a8b4620ca3216', class: "checkmark-container" }, h("svg", { key: 'd56ce06c20e0c3460b6222d323d0a17059147157', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '5e6af8d520bcb7c3b0fe2891ce0c2e783976b501', "clip-rule": "evenodd", d: "M17.456 7.404a.75.75 0 0 1 .14 1.052l-6.5 8.5a.75.75 0 0 1-1.126.074l-4-4a.75.75 0 0 1 1.06-1.06l3.395 3.394 5.98-7.82a.75.75 0 0 1 1.05-.14Z", fill: "currentColor", "fill-rule": "evenodd" }))), this.label && (h("zonos-text", { key: '18c5a586756ddc0808c05f305c89dbb07f1b7d16', size: this.fontSize }, this.label)))));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "zonos-checkbox"; }
|
|
49
49
|
static get encapsulation() { return "shadow"; }
|
|
@@ -63,17 +63,17 @@ export class ZonosCheckoutProgressTabs {
|
|
|
63
63
|
color: labelSelectedColor,
|
|
64
64
|
})
|
|
65
65
|
: labelSelectedColor;
|
|
66
|
-
return (h(Host, { key: '
|
|
66
|
+
return (h(Host, { key: '1c51be111b22f45ad33d430dc4d0a250f8e4d911', class: "zonos--elements", style: {
|
|
67
67
|
'--color': contrastLabelColor,
|
|
68
68
|
'--progress-percent': this.getTotalSuccessStep(),
|
|
69
|
-
} }, h("div", { key: '
|
|
69
|
+
} }, h("div", { key: '01e24d42123318aa23982e742b5f2053f5b5392d', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
70
70
|
const isSelected = tab.value === selectedStep;
|
|
71
71
|
return (h("button", { class: classes([
|
|
72
72
|
'zonos--tab-item',
|
|
73
73
|
tab.value === selectedStep && 'selected',
|
|
74
74
|
tab.isDone && 'done',
|
|
75
75
|
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cartStore.step = tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1200' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, translate(tab.label))));
|
|
76
|
-
})), h("div", { key: '
|
|
76
|
+
})), h("div", { key: '55832cb123f7efa019ccddfe6bd82938d9f02206', class: "zonos--tab-progress" }, h("div", { key: '15fd9749c64530f09854a297cbc35fe97d3398e3', class: "zonos--progress-bar-fill" }))));
|
|
77
77
|
}
|
|
78
78
|
static get is() { return "zonos-checkout-progress-tabs"; }
|
|
79
79
|
static get encapsulation() { return "shadow"; }
|
|
@@ -42,10 +42,10 @@ export class ZonosCollapse {
|
|
|
42
42
|
// set overflow to hidden to prevent content from showing when collapsed
|
|
43
43
|
this.el.style.overflow = 'hidden';
|
|
44
44
|
}
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: 'c268257dcef8e8def5e34bf5b3ea432136c06d6a', class: 'zonos--elements zonos--collapse', style: {
|
|
46
46
|
'--font-family': zonosStoreFontFamily(),
|
|
47
47
|
height: this.getElementHeight(),
|
|
48
|
-
} }, h("div", { key: '
|
|
48
|
+
} }, h("div", { key: 'ea4abe6a03ffed6f4fd1248e668d123c1a8cef77' }, h("iframe", { key: 'dc010404892272fece7a913149e75171bb6e786c', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: 'c9dc7dd83363211d249ee417111f3a36057f0af0' }))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "zonos-collapse"; }
|
|
51
51
|
static get encapsulation() { return "shadow"; }
|
|
@@ -81,12 +81,12 @@ export class ZonosConfirmDialog {
|
|
|
81
81
|
const borderStyle = getBorderRadius();
|
|
82
82
|
// Get theme for the update dialog, inherit from the theme, no from this component theme
|
|
83
83
|
const theme = getZonosStoreTheme(zonosStore.appearance.theme);
|
|
84
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: 'e52030ffc052c699daa87c5b62ee8b44ddad7f7f', class: classes([this.dialogOpen && 'open', 'zonos--elements']), "data-theme": theme, style: {
|
|
85
85
|
'--border-radius': borderStyle,
|
|
86
86
|
'--font-family': zonosStoreFontFamily(),
|
|
87
|
-
} }, h("div", { key: '
|
|
87
|
+
} }, h("div", { key: 'a34d31946f198b2593f142b582aec18f69fe74c5', class: "zonos--backdrop", tabIndex: -1 }), h("div", { key: '2f3dfa27dfbfbc4080eb710dd3db530521b63d36', "aria-hidden": "true", class: classes(['zonos--confirm-layout', this.dialogIntent]), onClick: e => this.clickOutsideDialogHandler(e) }, h("div", { key: '8f61424a8899c81f9510deda0adc3ff3e2da102b', class: "zonos--confirm-dialog", onBlur: () => {
|
|
88
88
|
this.focusDialog();
|
|
89
|
-
} }, h("div", { key: '
|
|
89
|
+
} }, h("div", { key: '2fca3f071d7f9d2af628d909770bb12a3acabfe2', class: "wrapper" }, h("div", { key: 'fed312e492a9fcac175a9cac7501255aeb975c10', class: "icon-wrapper" }, this.renderIcon()), h("div", { key: '131651e201a8d6b2ee9e0c82bd1990bc9a8dc702', class: "content" }, h("div", { key: 'a42e1a9271bdfb9fba133e9af330bdb8b16be230', class: "title" }, h("zonos-text", { key: '91461b9e572e3eb0e6e8616612cce56cf723678f', type: "subheader" }, this.dialogTitle)), this.dialogSubtitle && (h("div", { key: 'fde989f7ef37692173c1476b5cfd98f6cc71bb6e', class: "subtitle" }, h("zonos-text", { key: '2e273099ff036b1aa62bba923fff696d1d291867', textColor: "gray-800" }, this.dialogSubtitle)))), h("div", { key: '3b7f50adf490388feb759f2e09a626ece5f29c20', class: "footer" }, h("zonos-button", { key: '9686f10d831470273543cf3b5217a8e59bb5160a', backgroundColor: "gray-0", class: "cancel-button", onClick: () => this.closeDialogHandler(), size: "lg", withBoxShadow: true }, this.dialogCancelBtnText), h("zonos-button", { key: '3781a86d62efe11e8dc08886e3b4ad885c64776a', class: "confirm-button", onClick: () => this.confirmDialogHandler(), size: "lg", variant: this.getButtonConfirmVariant() }, this.dialogConfirmBtnText)))))));
|
|
90
90
|
}
|
|
91
91
|
static get is() { return "zonos-confirm-dialog"; }
|
|
92
92
|
static get encapsulation() { return "shadow"; }
|
|
@@ -35,9 +35,9 @@ export class ZonosCountrySelect {
|
|
|
35
35
|
const filteredCountries = this.inputValue
|
|
36
36
|
? fuseObject.map(country => country.item)
|
|
37
37
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: '36b388d67c25bfe93dee6a7fd3c444ce0764c832', class: "zonos--elements", style: {
|
|
39
39
|
'--font-family': zonosStoreFontFamily(),
|
|
40
|
-
} }, h("div", { key: '
|
|
40
|
+
} }, h("div", { key: '80c2a2b8a38f5183c583a240b4702fe234df58e9', class: "zonos--country-select" }, h("zonos-v-stack", { key: 'fee57e283cc49f7b1d48cb6564003d77a75f02a6', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: '030338d8bc4f52c0bf4fbcdef1415321f59de05b', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: '855653189b575ad697b9b90cb733ef912e7f2b83', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: '353bf39d18d2aad7c2f4096592c6e13572bc5a16', class: "zonos--country-select-content" }, filteredCountries.map(country => (h("button", { class: "zonos--country-select-country", onClick: () => this.countrySelected(country.code) }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: country.code }), h("zonos-text", { textColor: "gray-800" }, country.displayName), country.code === localizationStore.selectedCountryCode && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 20 })))))))));
|
|
41
41
|
}
|
|
42
42
|
static get is() { return "zonos-country-select"; }
|
|
43
43
|
static get encapsulation() { return "shadow"; }
|
|
@@ -8,9 +8,9 @@ export class ZonosCustomMessage {
|
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
10
|
const messageWithLinks = formatStringWithLinks(this.message);
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: 'a0c9c81f42cc74f53f497ea37d9f1fcfe2853c25', class: "zonos--elements", style: {
|
|
12
12
|
'--font-family': zonosStoreFontFamily(),
|
|
13
|
-
} }, this.message && (h("zonos-card", { key: '
|
|
13
|
+
} }, this.message && (h("zonos-card", { key: '334b1d76339667cd873d966b069429b9a2c08249', class: "zonos--custom-message", spacing: "12px" }, h("div", { key: 'c3a72d8c248acc2ac36b45d5afe0c69428eb1a75', class: "zonos--flex-message" }, h("zonos-icon", { key: 'c8ca45558e2dc0e389a0fb99943b81dfd0328f3e', "aria-label": "Custom message icon", content: this.icon }), h("zonos-text", { key: '9a1ce78aba237d325a0b3d1c61b62ca4f3b89c18', innerHTML: messageWithLinks }))))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-custom-message"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -59,7 +59,7 @@ export class ZonosDialog {
|
|
|
59
59
|
const borderStyle = getBorderRadius({
|
|
60
60
|
overrideBorderStyle: this.borderStyle,
|
|
61
61
|
});
|
|
62
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: 'fe812c0c5a81b0b09ad6e0b554d036711e12c0ed', class: classes([
|
|
63
63
|
'zonos--elements',
|
|
64
64
|
this.open && 'open',
|
|
65
65
|
this.isLoading && 'is-loading',
|
|
@@ -71,10 +71,10 @@ export class ZonosDialog {
|
|
|
71
71
|
'--height': this.height || 'initial',
|
|
72
72
|
'--min-height': this.minHeight || '500px',
|
|
73
73
|
'--width': this.width,
|
|
74
|
-
} }, h("div", { key: '
|
|
74
|
+
} }, h("div", { key: 'aaa10008c2eecf00efc29124448d2cbc8567f440', class: "zonos--backdrop" }), h("div", { key: 'b45a8f56ed413a7cb935d84b342d2ac50812ba6b', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: '80d2312742cfa766e171f1e3d79aba9df26bcba5', class: "zonos--dialog" }, this.isLoading && (h("div", { key: 'f35bfdd001b0687d683b7d416c812035bd1bcb10', class: "zonos--loading" }, h("zonos-spinner", { key: 'df7e9af43340ce3e1ca66126c0d68a6950cad9e7', size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { key: '8248f4104881ee8c3d3202b1bbc07f7b969d86f5', class: "zonos--header" }, this.headerText && (h("h3", { key: '88620497b42f82f122b8e1c675490e566da27af6', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { key: '9b17424799dbb772b51a87f246285642ec621f0b', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler, variant: "subtle" })))), h("div", { key: '904ba64d8c82826baffed469f5b09ef7189c4aff', class: classes([
|
|
75
75
|
'zonos--body',
|
|
76
76
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
77
|
-
]) }, h("slot", { key: '
|
|
77
|
+
]) }, h("slot", { key: '24f85c3c84100217db0866a10d6f3443b64c39d2' })), h("slot", { key: 'aabf202487d080a8277aeb641b602cf507a39061', name: "dialog-footer" })))));
|
|
78
78
|
}
|
|
79
79
|
static get is() { return "zonos-dialog"; }
|
|
80
80
|
static get encapsulation() { return "shadow"; }
|
|
@@ -17,17 +17,17 @@ export class ZonosInput {
|
|
|
17
17
|
this.inputChange.emit(newValue);
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: 'f2bf9e34ef694f026eceed1327603659bbd4c5a4', class: classes([
|
|
21
21
|
'zonos--input zonos--elements',
|
|
22
22
|
this.inputSize,
|
|
23
23
|
this.isError && 'has-error',
|
|
24
24
|
]), style: {
|
|
25
25
|
'--border-radius': getBorderRadius(),
|
|
26
26
|
'--font-family': zonosStoreFontFamily(),
|
|
27
|
-
} }, h("div", { key: '
|
|
27
|
+
} }, h("div", { key: '0fe9066fc683f6a683c494209fa29b10c0076dc5', class: classes([
|
|
28
28
|
'zonos--label-wrapper',
|
|
29
29
|
this.isDisabled && 'disabled',
|
|
30
|
-
]) }, h("input", { key: '
|
|
30
|
+
]) }, h("input", { key: 'f185418ddc6a83e829a9d2dd44a021288f00d4d5', class: classes([
|
|
31
31
|
'zonos--floated-input',
|
|
32
32
|
!!this.inputLabel && 'has-label',
|
|
33
33
|
this.inputValue && 'has-content',
|
|
@@ -35,7 +35,7 @@ export class ZonosInput {
|
|
|
35
35
|
]), disabled: this.isDisabled, onInput: e => {
|
|
36
36
|
const input = e.target;
|
|
37
37
|
this.inputChange.emit(input.value);
|
|
38
|
-
}, placeholder: this.inputPlaceholder, type: "text", value: this.value }), h("label", { key: '
|
|
38
|
+
}, placeholder: this.inputPlaceholder, type: "text", value: this.value }), h("label", { key: '3d4ab801e27af15d819b17db226f0d5f719ac903', class: "zonos--floated-label", "data-label": this.inputLabel }))));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "zonos-input"; }
|
|
41
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -16,9 +16,9 @@ export class ZonosLanguageSelect {
|
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
18
|
const { selectedLocale } = localizationStore;
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '34580123b768ce983c0c9c6fa309bdb1d6756a5a', class: "zonos--elements", style: {
|
|
20
20
|
'--font-family': zonosStoreFontFamily(),
|
|
21
|
-
} }, h("div", { key: '
|
|
21
|
+
} }, h("div", { key: '6e86352a45b5d9ad0e5ed5dac330367a49a6c6fe', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: 'd5b55cbb2858a2c0a6aa6ce0ea0d50eecc7360e8', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: 'c9aeb075428357c4cb15d9a2b09df7c8d6b01b11', class: "zonos--language-select-content" }, languages.map(language => (h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "zonos-language-select"; }
|
|
24
24
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/common/{component-template/zonos-link → zonos-link}/zonos-link.js
RENAMED
|
@@ -7,7 +7,7 @@ export class ZonosLink {
|
|
|
7
7
|
this.linkTitle = undefined;
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: 'a148ed9b4d285cd39b63da348dcfcc11f4973f04', class: "zonos--elements" }, h("a", { key: '121b299148c4227c0b500ecb6ded03470476aa90', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, h("slot", { key: 'cf6637f399d3c069bd6ea3d0f3a900fd0740afc5' }))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "zonos-link"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -65,7 +65,29 @@ export class ZonosController {
|
|
|
65
65
|
log(`[FONT] ${overrideFont} font override applied`);
|
|
66
66
|
zonosStore.appearance = Object.assign(Object.assign({}, zonosStore.appearance), { fontFamily: overrideFont });
|
|
67
67
|
}
|
|
68
|
+
handleLocationChange() {
|
|
69
|
+
// re-inject hello component if the location changes
|
|
70
|
+
void initHello(zonosStore.helloSettings);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Init history listener to know when the location changes to re-inject hello component
|
|
74
|
+
*/
|
|
75
|
+
initHistoryListener() {
|
|
76
|
+
const oldPushState = history.pushState;
|
|
77
|
+
history.pushState = function pushState() {
|
|
78
|
+
window.dispatchEvent(new window.Event('pushstate'));
|
|
79
|
+
window.dispatchEvent(new window.Event('locationchange'));
|
|
80
|
+
return oldPushState.apply(this, arguments);
|
|
81
|
+
};
|
|
82
|
+
const oldReplaceState = history.replaceState;
|
|
83
|
+
history.replaceState = function replaceState() {
|
|
84
|
+
window.dispatchEvent(new window.Event('replacestate'));
|
|
85
|
+
window.dispatchEvent(new window.Event('locationchange'));
|
|
86
|
+
return oldReplaceState.apply(this, arguments);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
68
89
|
async componentWillLoad() {
|
|
90
|
+
this.initHistoryListener();
|
|
69
91
|
zonosStore.zonosApiKey = this.zonosApiKey;
|
|
70
92
|
// running with scope async function to avoid blocking the main thread
|
|
71
93
|
(async () => {
|
|
@@ -77,9 +99,13 @@ export class ZonosController {
|
|
|
77
99
|
}
|
|
78
100
|
// init zonos notification
|
|
79
101
|
this.initZonosNotification();
|
|
102
|
+
const config = Object.assign(Object.assign({}, this.config), {
|
|
103
|
+
// override subscription status
|
|
104
|
+
subscriptionStatus: undefined
|
|
105
|
+
});
|
|
80
106
|
// load default setting if fail to load user setting
|
|
81
107
|
zonosStoreInitSetting({
|
|
82
|
-
overrideSettings:
|
|
108
|
+
overrideSettings: config,
|
|
83
109
|
zonosSettings: json,
|
|
84
110
|
});
|
|
85
111
|
// setup google font after store loaded
|
|
@@ -152,7 +178,7 @@ export class ZonosController {
|
|
|
152
178
|
zonosStore.organizationName = organizationName;
|
|
153
179
|
}
|
|
154
180
|
render() {
|
|
155
|
-
return h(Host, { key: '
|
|
181
|
+
return h(Host, { key: '5085618e4664aa12a2d48d289ae5b2c3ac15d83b', class: "zonos--elements" });
|
|
156
182
|
}
|
|
157
183
|
static get is() { return "zonos-controller"; }
|
|
158
184
|
static get encapsulation() { return "shadow"; }
|
|
@@ -177,8 +203,8 @@ export class ZonosController {
|
|
|
177
203
|
"references": {
|
|
178
204
|
"LoadZonosParamsConfig": {
|
|
179
205
|
"location": "import",
|
|
180
|
-
"path": "src/scripts/
|
|
181
|
-
"id": "src/scripts/
|
|
206
|
+
"path": "src/scripts/_zonosBase",
|
|
207
|
+
"id": "src/scripts/_zonosBase.ts::LoadZonosParamsConfig"
|
|
182
208
|
}
|
|
183
209
|
}
|
|
184
210
|
},
|
|
@@ -316,8 +342,8 @@ export class ZonosController {
|
|
|
316
342
|
},
|
|
317
343
|
"LoadZonosParamsConfig": {
|
|
318
344
|
"location": "import",
|
|
319
|
-
"path": "src/scripts/
|
|
320
|
-
"id": "src/scripts/
|
|
345
|
+
"path": "src/scripts/_zonosBase",
|
|
346
|
+
"id": "src/scripts/_zonosBase.ts::LoadZonosParamsConfig"
|
|
321
347
|
}
|
|
322
348
|
},
|
|
323
349
|
"return": "Promise<void>"
|
|
@@ -401,4 +427,13 @@ export class ZonosController {
|
|
|
401
427
|
}
|
|
402
428
|
};
|
|
403
429
|
}
|
|
430
|
+
static get listeners() {
|
|
431
|
+
return [{
|
|
432
|
+
"name": "locationchange",
|
|
433
|
+
"method": "handleLocationChange",
|
|
434
|
+
"target": "window",
|
|
435
|
+
"capture": false,
|
|
436
|
+
"passive": false
|
|
437
|
+
}];
|
|
438
|
+
}
|
|
404
439
|
}
|
|
@@ -135,7 +135,7 @@ export class ZonosAddress {
|
|
|
135
135
|
}
|
|
136
136
|
render() {
|
|
137
137
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
138
|
-
return (h(Host, { key: '
|
|
138
|
+
return (h(Host, { key: '9ef595622320579d43ac54bdfdf0e8a24ab5132b', class: "zonos--address zonos--elements" }, h("zonos-text", { key: '82925c3c426f384a266cfe62c2899d1ec30d0920', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'bb3b99783a75434a5a7cc6856ccf9218f1cfd212', class: "zonos--address-component" })));
|
|
139
139
|
}
|
|
140
140
|
static get is() { return "zonos-address"; }
|
|
141
141
|
static get encapsulation() { return "scoped"; }
|
|
@@ -189,10 +189,10 @@ export class ZonosAddress {
|
|
|
189
189
|
"type": "unknown",
|
|
190
190
|
"mutable": false,
|
|
191
191
|
"complexType": {
|
|
192
|
-
"original": "
|
|
192
|
+
"original": "ContactOption | null",
|
|
193
193
|
"resolved": "ContactOption | null",
|
|
194
194
|
"references": {
|
|
195
|
-
"
|
|
195
|
+
"ContactOption": {
|
|
196
196
|
"location": "import",
|
|
197
197
|
"path": "@stripe/stripe-js",
|
|
198
198
|
"id": ""
|
|
@@ -5,5 +5,9 @@ export const setZCountryUrlParam = (selectedCountryCode) => {
|
|
|
5
5
|
const urlSearchParams = new URLSearchParams(window.location.search);
|
|
6
6
|
urlSearchParams.set('zCountry', selectedCountryCode);
|
|
7
7
|
const newUrl = `${window.location.pathname}?${urlSearchParams.toString()}`;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Setting the state to null in window.history.replaceState can cause issues with rendering when using next/link and pressing the back button.
|
|
10
|
+
* @ref https://github.com/vercel/next.js/issues/33233#issuecomment-1052349396
|
|
11
|
+
**/
|
|
12
|
+
window.history.replaceState(window.history.state, document.title, newUrl);
|
|
9
13
|
};
|
|
@@ -181,12 +181,10 @@ export const getReplaceEnv = (props) => Object.keys(env).reduce((prev, curr) =>
|
|
|
181
181
|
const foundOverride = !!override && currEnv in override;
|
|
182
182
|
// return the override value if it's found
|
|
183
183
|
if (foundOverride) {
|
|
184
|
-
// @ts-expect-error
|
|
185
184
|
prev[`process.env.${currEnv}`] = `"${override[currEnv]}"`;
|
|
186
185
|
return prev;
|
|
187
186
|
}
|
|
188
187
|
if (currEnv) {
|
|
189
|
-
// @ts-expect-error
|
|
190
188
|
prev[`process.env.${currEnv}`] = `"${env[currEnv] || ''}"`;
|
|
191
189
|
}
|
|
192
190
|
return prev;
|
package/dist/collection/index.js
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts the zonosQaUrl from the url
|
|
3
|
+
*
|
|
4
|
+
* @param url - url to extract zonosQaUrl from
|
|
5
|
+
*
|
|
6
|
+
* **NOTE**: value of zonosQaUrl param should be without protocol, allowed characters are: a-z, A-Z, 0-9, -, _
|
|
7
|
+
* @example
|
|
8
|
+
* valid: https://www.zonos.com/?zonosQaUrl=some-feature-v988
|
|
9
|
+
* invalid: https://www.zonos.com/?zonosQaUrl=https://zonos-something
|
|
10
|
+
*/
|
|
11
|
+
export const extractZonosQaUrl = (url) => {
|
|
12
|
+
if (!url) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
// get params from url
|
|
16
|
+
const param = new URL(url).searchParams;
|
|
17
|
+
const zonosQaUrl = param.get('zonosQaUrl');
|
|
18
|
+
if (!zonosQaUrl) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
const hasInvalidCharacters = /[^a-zA-Z0-9-_]+/.test(zonosQaUrl);
|
|
22
|
+
if (!!hasInvalidCharacters) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return zonosQaUrl;
|
|
26
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { log } from "../components/utils/logging/log";
|
|
2
|
+
import { extractZonosQaUrl } from "./_extractZonosQaUrl";
|
|
3
|
+
/**
|
|
4
|
+
* Get the Zonos QA URL and return it. Will remove `zonosQaUrl` from the url query if it doesn't exists.
|
|
5
|
+
*/
|
|
6
|
+
export const getZonosQaUrl = () => {
|
|
7
|
+
if (typeof window === 'undefined') {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
11
|
+
if (!qaUrl) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
// If the qaUrl, use the dev-elements domain to forward the request to the dev server to quickly debug the issue
|
|
15
|
+
if (qaUrl === 'dev-elements') {
|
|
16
|
+
return 'https://dev.elements.zonos.com';
|
|
17
|
+
}
|
|
18
|
+
const suffixDomain = 'preview.js.zonos.com';
|
|
19
|
+
const fullUrl = `https://${qaUrl}.${suffixDomain}`;
|
|
20
|
+
log(`[ZONOS-WARNING] using '${fullUrl}' for loading script`, 'warn');
|
|
21
|
+
// request to the url and check if the request has an error
|
|
22
|
+
void fetch(fullUrl)
|
|
23
|
+
.then(() => {
|
|
24
|
+
// cleanup checkout session to avoid using the prod session in preview domain
|
|
25
|
+
window.sessionStorage.removeItem('zonos--checkout-session-id');
|
|
26
|
+
window.sessionStorage.removeItem('zonos--client-secret');
|
|
27
|
+
})
|
|
28
|
+
.catch(() => {
|
|
29
|
+
alert(`[ZONOS-WARNING] '${fullUrl}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);
|
|
30
|
+
// remove the zonosQaUrl param from url
|
|
31
|
+
const urlSearchParams = new URLSearchParams(window.location.search);
|
|
32
|
+
urlSearchParams.delete('zonosQaUrl');
|
|
33
|
+
const { pathname } = window.location;
|
|
34
|
+
const newUrl = `${pathname}?${urlSearchParams.toString()}`;
|
|
35
|
+
/**
|
|
36
|
+
* Setting the state to null in window.history.replaceState can cause issues with rendering when using next/link and pressing the back button.
|
|
37
|
+
* @ref https://github.com/vercel/next.js/issues/33233#issuecomment-1052349396
|
|
38
|
+
**/
|
|
39
|
+
window.history.replaceState(window.history.state, '', newUrl);
|
|
40
|
+
window.location.reload();
|
|
41
|
+
return null;
|
|
42
|
+
});
|
|
43
|
+
return fullUrl;
|
|
44
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Execute our own script injection after a tick to give users time to do their
|
|
2
|
-
import { initStripe, zonosStripeLoadScript, } from "./
|
|
2
|
+
import { initStripe, zonosStripeLoadScript, } from "./_stripe";
|
|
3
3
|
// own script injection.
|
|
4
4
|
const stripePromise = Promise.resolve().then(() => zonosStripeLoadScript(null));
|
|
5
5
|
let loadCalled = false;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
var _a;
|
|
2
2
|
import { log } from "../components/utils/logging/log";
|
|
3
3
|
import { logError } from "../components/utils/logging/logError";
|
|
4
|
-
import { checkIfLoadVersionDomain } from "./
|
|
5
|
-
import {
|
|
4
|
+
import { checkIfLoadVersionDomain } from "./_checkIfLoadVersionDomain";
|
|
5
|
+
import { getZonosQaUrl } from "./_getZonosQaUrl";
|
|
6
|
+
import { zonosLoadStripe } from "./_loadStripe";
|
|
6
7
|
/**
|
|
7
8
|
* Get the load version and url based on the loadScriptSrc, if the domain that used to load `zonos.js` is in white listed domains, use currentLoadScriptUrl as the load url instead, if zonosQaUrl exists, it would also fall under the white listed domain
|
|
8
9
|
*/
|
|
9
10
|
const zonosLoadUrl = (() => {
|
|
11
|
+
if (typeof document === 'undefined') {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
10
14
|
const scriptExist = document.querySelector(`script[src*="/zonos.js"]`);
|
|
11
15
|
const { currentLoadScriptUrl, isWhiteListed } = checkIfLoadVersionDomain({
|
|
12
16
|
loadScriptSrc: scriptExist === null || scriptExist === void 0 ? void 0 : scriptExist.src,
|
|
@@ -26,9 +30,15 @@ export class Zonos {
|
|
|
26
30
|
_a = Zonos;
|
|
27
31
|
Zonos.doneInit = false;
|
|
28
32
|
// if query 'zonosDebug=1' param from url, debug mode is on
|
|
29
|
-
Zonos.debug =
|
|
30
|
-
|
|
33
|
+
Zonos.debug = typeof window !== 'undefined' &&
|
|
34
|
+
!!window.location.search.match(/\?.*(&*)zonosDebug=1/);
|
|
35
|
+
Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
36
|
+
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
31
37
|
Zonos.isBigCommerce = false;
|
|
38
|
+
/**
|
|
39
|
+
* By default, the package will load from npm
|
|
40
|
+
*/
|
|
41
|
+
Zonos.isNpm = true;
|
|
32
42
|
Zonos.internationalHideSelector = '';
|
|
33
43
|
Zonos.zonosQaUrl = null;
|
|
34
44
|
Zonos.version = `v${process.env.NEXT_PUBLIC_ZONOS_PACKAGE_VERSION}`;
|
|
@@ -265,20 +275,33 @@ Zonos.injectScript = ({ fallBackDomain, isModule, scriptDomain, theRestUrl, }) =
|
|
|
265
275
|
};
|
|
266
276
|
headOrBody.appendChild(script);
|
|
267
277
|
};
|
|
278
|
+
/**
|
|
279
|
+
* We now support loading Zonos via npm. For clients using npm, `zonosBase` will always load from the server side. Therefore, the `zonosLoadUrl` defined earlier won't work since it lacks access to client-side APIs such as `window` and `document`.
|
|
280
|
+
*/
|
|
281
|
+
Zonos.getZonosUrl = () => {
|
|
282
|
+
// To ensure that sites using zonos-elements load the script from a specific domain when using npm, we need to check for zonosQaUrl and use it if available. Otherwise it will always load from the compiled versioned domain
|
|
283
|
+
if (_a.isNpm) {
|
|
284
|
+
const zonosQaUrl = getZonosQaUrl();
|
|
285
|
+
// Default to hard coded domain if zonosQaUrl is not available
|
|
286
|
+
return zonosQaUrl || ZONOS_URL;
|
|
287
|
+
}
|
|
288
|
+
return ZONOS_URL;
|
|
289
|
+
};
|
|
268
290
|
Zonos.injectZonosCdn = () => {
|
|
291
|
+
const ZONOS_LOAD_URL = _a.getZonosUrl();
|
|
269
292
|
// init zonos elements when the zonosKey is valid
|
|
270
293
|
// inject esmodule cdn for zonos elements
|
|
271
294
|
_a.injectScript({
|
|
272
295
|
fallBackDomain: JS_DELIVR_ZONOS_URL,
|
|
273
296
|
isModule: true,
|
|
274
|
-
scriptDomain:
|
|
297
|
+
scriptDomain: ZONOS_LOAD_URL,
|
|
275
298
|
theRestUrl: 'dist/zonos-elements/zonos-elements.esm.js',
|
|
276
299
|
});
|
|
277
300
|
// inject non module cdn for zonos elements
|
|
278
301
|
_a.injectScript({
|
|
279
302
|
fallBackDomain: JS_DELIVR_ZONOS_URL,
|
|
280
303
|
isModule: false,
|
|
281
|
-
scriptDomain:
|
|
304
|
+
scriptDomain: ZONOS_LOAD_URL,
|
|
282
305
|
theRestUrl: 'dist/zonos-elements/zonos-elements.js',
|
|
283
306
|
});
|
|
284
307
|
log('Zonos cdn script injected!');
|
|
@@ -43,6 +43,7 @@ export const featureAudienceNameEnum = {
|
|
|
43
43
|
I18nSales: 'i18n_sales',
|
|
44
44
|
ItHead: 'it_head',
|
|
45
45
|
NewCheckoutMerchant: 'new_checkout_merchant',
|
|
46
|
+
NewPayoutReportMerchant: 'new_payout_report_merchant',
|
|
46
47
|
Onboarding: 'onboarding',
|
|
47
48
|
PrincipalEngineer: 'principal_engineer',
|
|
48
49
|
ProServeHead: 'pro_serve_head',
|