@zonos/elements 1.3.14 → 1.3.15-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cart-5d196917.js → cart-1b1d39af.js} +162 -70
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{sendErrorLog-3e181984.js → sendErrorLog-29e50f7e.js} +1 -1
- package/dist/cjs/{submitGtag-44e3a996.js → submitGtag-ab287a34.js} +1 -1
- package/dist/cjs/zonos-address_4.cjs.entry.js +9 -9
- package/dist/cjs/zonos-badge_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-button_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +90 -69
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -3
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +7 -7
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-payment.cjs.entry.js +2 -2
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +17 -17
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +40 -28
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +23 -23
- package/dist/collection/components/common/component-template/zonos-link/zonos-link.js +1 -1
- 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.css +3 -0
- 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.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-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +3 -3
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +5 -10
- package/dist/collection/components/store/checkout/stripe.js +18 -8
- package/dist/collection/components/store/translationStore/strings.arabic.js +6 -3
- package/dist/collection/components/store/translationStore/strings.base.js +6 -3
- package/dist/collection/components/store/translationStore/strings.chinese.js +6 -3
- package/dist/collection/components/store/translationStore/strings.danish.js +6 -3
- package/dist/collection/components/store/translationStore/strings.dutch.js +6 -3
- package/dist/collection/components/store/translationStore/strings.french.js +6 -3
- package/dist/collection/components/store/translationStore/strings.german.js +6 -3
- package/dist/collection/components/store/translationStore/strings.hebrew.js +6 -3
- package/dist/collection/components/store/translationStore/strings.indonesian.js +6 -3
- package/dist/collection/components/store/translationStore/strings.italian.js +6 -3
- package/dist/collection/components/store/translationStore/strings.japanese.js +6 -3
- package/dist/collection/components/store/translationStore/strings.korean.js +6 -3
- package/dist/collection/components/store/translationStore/strings.norwegian.js +6 -3
- package/dist/collection/components/store/translationStore/strings.polish.js +6 -3
- package/dist/collection/components/store/translationStore/strings.portuguese.js +6 -3
- package/dist/collection/components/store/translationStore/strings.russian.js +6 -3
- package/dist/collection/components/store/translationStore/strings.spanish.js +6 -3
- package/dist/collection/components/store/translationStore/strings.swedish.js +6 -3
- package/dist/collection/components/store/translationStore/strings.turkish.js +6 -3
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +6 -3
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/api/triggerBuildLandedCost.js +1 -0
- package/dist/collection/components/utils/formatDate.js +6 -2
- package/dist/collection/types/generated/graphql.customer.types.js +45 -44
- package/dist/collection/types/generated/graphql.frontend.types.js +48 -48
- package/dist/components/stripe.js +162 -71
- package/dist/components/zonos-address2.js +1 -1
- package/dist/components/zonos-badge2.js +3 -3
- package/dist/components/zonos-button2.js +3 -3
- package/dist/components/zonos-card2.js +3 -3
- package/dist/components/zonos-checkbox2.js +3 -3
- package/dist/components/zonos-checkout-finish2.js +1 -1
- package/dist/components/zonos-checkout-payment2.js +18 -17
- package/dist/components/zonos-checkout-progress-tabs2.js +4 -4
- package/dist/components/zonos-checkout.js +3 -1
- 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 +2 -2
- package/dist/components/zonos-custom-message2.js +2 -2
- package/dist/components/zonos-customer-info2.js +41 -28
- package/dist/components/zonos-dialog2.js +3 -3
- package/dist/components/zonos-hello-dialog-footer2.js +2 -2
- package/dist/components/zonos-hello-dialog2.js +4 -4
- package/dist/components/zonos-hello.js +1 -1
- package/dist/components/zonos-language-select2.js +3 -3
- package/dist/components/zonos-link-authentication2.js +2 -2
- package/dist/components/zonos-link.js +1 -1
- package/dist/components/zonos-logo.js +2 -2
- package/dist/components/zonos-payment2.js +1 -1
- package/dist/components/zonos-select-dialog-header2.js +2 -2
- package/dist/components/zonos-shipping2.js +25 -24
- package/dist/components/zonos-tooltip2.js +2 -2
- package/dist/components/zonos-v-stack2.js +2 -2
- package/dist/esm/{cart-515aac56.js → cart-10bcd2e0.js} +162 -71
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{sendErrorLog-e4546d7b.js → sendErrorLog-8642e94a.js} +1 -1
- package/dist/esm/{submitGtag-6767c31f.js → submitGtag-84886899.js} +1 -1
- package/dist/esm/zonos-address_4.entry.js +9 -9
- package/dist/esm/zonos-badge_2.entry.js +5 -5
- package/dist/esm/zonos-button_2.entry.js +3 -3
- package/dist/esm/zonos-card_2.entry.js +6 -6
- package/dist/esm/zonos-cart-items_10.entry.js +90 -69
- package/dist/esm/zonos-checkout.entry.js +5 -3
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_3.entry.js +7 -7
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +4 -4
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-payment.entry.js +2 -2
- package/dist/esm/zonos-select-dialog-header_2.entry.js +4 -4
- package/dist/esm-es5/cart-10bcd2e0.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/sendErrorLog-8642e94a.js +1 -0
- package/dist/esm-es5/{submitGtag-6767c31f.js → submitGtag-84886899.js} +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-button_2.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
- 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-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.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/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +4 -4
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +3 -4
- package/dist/types/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.d.ts +4 -4
- package/dist/types/components/store/checkout/cart.d.ts +2 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.base.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.danish.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.french.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.german.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.italian.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.korean.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.polish.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.russian.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +6 -3
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +6 -3
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/triggerBuildLandedCost.d.ts +1 -0
- package/dist/types/components/utils/formatDate.d.ts +1 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +36 -35
- package/dist/types/types/generated/graphql.customer.types.ts +100 -99
- package/dist/types/types/generated/graphql.frontend.types.d.ts +34 -34
- package/dist/types/types/generated/graphql.frontend.types.ts +110 -110
- package/dist/zonos-elements/{p-aa671fa6.entry.js → p-056a453e.entry.js} +1 -1
- package/dist/zonos-elements/{p-3b4225b2.entry.js → p-0fc08944.entry.js} +1 -1
- package/dist/zonos-elements/{p-a583e3c6.system.entry.js → p-19f0392f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d9aa8599.entry.js → p-1a5f8df7.entry.js} +1 -1
- package/dist/zonos-elements/{p-cd449b56.entry.js → p-24bd40ec.entry.js} +1 -1
- package/dist/zonos-elements/{p-05f749dc.system.entry.js → p-262b8e1e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f48a613e.system.entry.js → p-26c55472.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1f5c2d7b.entry.js → p-2ffcc816.entry.js} +1 -1
- package/dist/zonos-elements/p-33abdb30.js +1 -0
- package/dist/zonos-elements/{p-8ec3995a.system.entry.js → p-34565753.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9da65d62.entry.js → p-440eb12c.entry.js} +1 -1
- package/dist/zonos-elements/{p-f6bbff95.entry.js → p-44e8e803.entry.js} +1 -1
- package/dist/zonos-elements/p-450942a3.system.js +1 -0
- package/dist/zonos-elements/{p-bc2bd266.system.entry.js → p-51afdc14.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7aef7d5d.system.entry.js → p-536b62a8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2aa3c0e8.system.entry.js → p-596a4beb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-16b59229.system.entry.js → p-5c41ac7d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f0b4e58a.js → p-5ff27485.js} +1 -1
- package/dist/zonos-elements/{p-257af88b.entry.js → p-66b42924.entry.js} +1 -1
- package/dist/zonos-elements/{p-4fbd0ce6.entry.js → p-6adbe3e4.entry.js} +1 -1
- package/dist/zonos-elements/p-6f5761e8.js +1 -0
- package/dist/zonos-elements/p-6fb15797.system.entry.js +1 -0
- package/dist/zonos-elements/{p-522294b9.system.entry.js → p-7411d43e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-aa5e2f7c.system.entry.js → p-7432179a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8cb8fa93.entry.js → p-74c8aa64.entry.js} +1 -1
- package/dist/zonos-elements/p-8126011d.entry.js +1 -0
- package/dist/zonos-elements/{p-c5bc49b5.system.entry.js → p-8b44b059.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-bdd775f2.system.js → p-8b44e558.system.js} +1 -1
- package/dist/zonos-elements/{p-3f713699.entry.js → p-8d1f81e1.entry.js} +1 -1
- package/dist/zonos-elements/{p-ab06e5c8.system.entry.js → p-8e5796a8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4f626a90.system.entry.js → p-b2f56dcb.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b4c3dcda.entry.js +1 -0
- package/dist/zonos-elements/p-b4e704c7.entry.js +1 -0
- package/dist/zonos-elements/{p-808413f8.entry.js → p-b6393a04.entry.js} +1 -1
- package/dist/zonos-elements/p-b8e8330b.system.js +1 -1
- package/dist/zonos-elements/p-c6170bec.system.js +1 -0
- package/dist/zonos-elements/{p-3d8254a2.system.entry.js → p-ca8ae8a4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a48e7c84.entry.js → p-dd1ba8fb.entry.js} +1 -1
- package/dist/zonos-elements/p-e7b5cf0d.system.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-515aac56.js +0 -1
- package/dist/esm-es5/sendErrorLog-e4546d7b.js +0 -1
- package/dist/zonos-elements/p-17ded5a1.system.entry.js +0 -1
- package/dist/zonos-elements/p-2d404058.system.js +0 -1
- package/dist/zonos-elements/p-3e38990b.entry.js +0 -1
- package/dist/zonos-elements/p-418c056d.entry.js +0 -1
- package/dist/zonos-elements/p-816f1aee.js +0 -1
- package/dist/zonos-elements/p-882ec68e.system.js +0 -1
- package/dist/zonos-elements/p-93698719.system.entry.js +0 -1
- package/dist/zonos-elements/p-ca6cf075.js +0 -1
- package/dist/zonos-elements/p-e9a41fd8.entry.js +0 -1
|
@@ -19,16 +19,16 @@ const ZonosBadge = /*@__PURE__*/ proxyCustomElement(class ZonosBadge extends HTM
|
|
|
19
19
|
this.rounded = false;
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: '01a64861017098d6cdfa94b46ee675660147c45d', class: classes(['zonos--elements zonos--badge']), style: {
|
|
23
23
|
'--font-family': zonosStoreFontFamily(),
|
|
24
|
-
} }, h("div", { key: '
|
|
24
|
+
} }, h("div", { key: 'ef736fdfe0352ea201ecb34cbec695d90cfe4e5f', class: classes([
|
|
25
25
|
'zonos--badge-content',
|
|
26
26
|
this.badgeColor,
|
|
27
27
|
this.rounded && 'rounded',
|
|
28
28
|
this.iconRight && 'icon-right',
|
|
29
29
|
this.size,
|
|
30
30
|
this.bold && 'bold',
|
|
31
|
-
]) }, this.icon, h("zonos-text", { key: '
|
|
31
|
+
]) }, this.icon, h("zonos-text", { key: '941793bf2ee10ad47bc5263f1bc2cbf6637d8bcd' }, h("slot", { key: '11da2ba6d11f451ecb71b1b2eb9ae29a009f8418' })))));
|
|
32
32
|
}
|
|
33
33
|
static get style() { return ZonosBadgeStyle0; }
|
|
34
34
|
}, [1, "zonos-badge", {
|
|
@@ -99,12 +99,12 @@ const ZonosButton = /*@__PURE__*/ proxyCustomElement(class ZonosButton extends H
|
|
|
99
99
|
const spinnerColor = backgroundActualColor && isDarkColor(backgroundActualColor)
|
|
100
100
|
? 'white'
|
|
101
101
|
: 'black';
|
|
102
|
-
return (h(Host, { key: '
|
|
102
|
+
return (h(Host, { key: '5f6e507c51fe1b02bbc14ff2bea2267ced9f8053', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
|
|
103
103
|
'--background-color': overrideBackground,
|
|
104
104
|
'--border-radius': borderStyle,
|
|
105
105
|
'--color': color,
|
|
106
106
|
'--font-family': zonosStoreFontFamily(),
|
|
107
|
-
}) }, h("button", { key: '
|
|
107
|
+
}) }, h("button", { key: 'f464fef0f48e4e8fbfec844c8f4e3e6c525c70fd', class: classes([
|
|
108
108
|
this.hasIcon && 'has-icon',
|
|
109
109
|
this.hasContent && 'has-content',
|
|
110
110
|
this.noBackground && 'no-background',
|
|
@@ -117,7 +117,7 @@ const ZonosButton = /*@__PURE__*/ proxyCustomElement(class ZonosButton extends H
|
|
|
117
117
|
overrideBackground &&
|
|
118
118
|
variant === 'standard' &&
|
|
119
119
|
'override-background',
|
|
120
|
-
]), disabled: disabled }, this.loading && (h("div", { key: '
|
|
120
|
+
]), disabled: disabled }, this.loading && (h("div", { key: '9fafd9c3c4764df1b9e268f6784b75fdfe21f9a7', class: "zonos--spinner-wrapper" }, h("zonos-spinner", { key: '5a2acbea7bbf41d76ce262f073f78e9f966dddc9', size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, h("slot", { key: '29982e7b98f8e9940f20916513434b5b1125c93a', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
121
121
|
}
|
|
122
122
|
get ele() { return this; }
|
|
123
123
|
static get watchers() { return {
|
|
@@ -19,12 +19,12 @@ const ZonosCard = /*@__PURE__*/ proxyCustomElement(class ZonosCard extends HTMLE
|
|
|
19
19
|
this.spacing = '24px';
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: 'e45c790b27e1991c005156ad6e53b1c8754d4dc5', style: {
|
|
23
23
|
'--font-family': zonosStoreFontFamily(),
|
|
24
|
-
} }, h("div", { key: '
|
|
24
|
+
} }, h("div", { key: 'efb85ca20d87be834dfe8dd0a80ba590e34480f3', class: classes(['styled-card']), style: { padding: this.spacing } }, this.label && (h("header", { key: 'edf7aa372e011fc76b14628b7a850fbb4577040e', class: "card-header", style: { padding: this.spacing } }, h("zonos-text", { key: 'ed7202d01519374129dc9f20f4c0914f2af311f8', type: "subheader" }, this.label), h("h-stack", { key: 'f3d041b3a96cfd5df4395efb7cbc958fb4ff3140', spacing: 8 }, this.actions))), h("slot", { key: '5957af957d0f2b1d9974dee154d050089dee574b' }), (this.footerActions || this.footerContent) && (h("footer", { key: '723c690483ebbe294c132fe39482180051bb7b8e', class: "card-footer", style: {
|
|
25
25
|
height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
|
|
26
26
|
padding: this.spacing,
|
|
27
|
-
} }, h("div", { key: '
|
|
27
|
+
} }, h("div", { key: '12a11f8192e9bdd95afd52a7b58ad99b6300c830' }, this.footerContent), h("h-stack", { key: '60cb2397fbe8f81a4248ab0581380ba125d08797', spacing: 8 }, this.footerActions))))));
|
|
28
28
|
}
|
|
29
29
|
static get style() { return ZonosCardStyle0; }
|
|
30
30
|
}, [1, "zonos-card", {
|
|
@@ -46,14 +46,14 @@ const ZonosCheckbox = /*@__PURE__*/ proxyCustomElement(class ZonosCheckbox exten
|
|
|
46
46
|
? 'var(--amino-gray-800)'
|
|
47
47
|
: 'var(--amino-gray-0)';
|
|
48
48
|
const borderStyle = getBorderRadius(this.borderStyle, '4px');
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '3cf37521b3f7dc267bdcd23f0c023cdff9f73048', class: classes(['zonos--elements zonos--checkbox']), style: {
|
|
50
50
|
'--background-color': backgroundColor,
|
|
51
51
|
'--border-radius': borderStyle,
|
|
52
52
|
'--font-family': zonosStoreFontFamily(),
|
|
53
53
|
'--size': `${this.size}px`,
|
|
54
|
-
} }, h("label", { key: '
|
|
54
|
+
} }, h("label", { key: '6771cc475d111684518492cbff6204a9cad5ec33', class: classes([this.isDisabled && 'disabled']) }, h("input", { key: '832a30d4aa546a5c7b5ab9e8437428aa08f20c17', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
|
|
55
55
|
this.checkboxSelected.emit(e.target.checked);
|
|
56
|
-
}, type: "checkbox" }), h("span", { key: '
|
|
56
|
+
}, type: "checkbox" }), h("span", { key: '9fe422aee5af96df40176d7d96006c578fe9273f', class: "checkmark-container" }, h("svg", { key: '7097c01f50d8cca92ee1bb531e0ac316cfca1036', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '2fb6af94baa97412ce3dd49ceca12397886ce50b', "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: 'f1c02b4377be2e48936a6e32049117b7a81a292b', size: this.fontSize }, this.label)))));
|
|
57
57
|
}
|
|
58
58
|
static get style() { return ZonosCheckboxStyle0; }
|
|
59
59
|
}, [1, "zonos-checkbox", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
|
|
2
|
-
import { h as handleFetch,
|
|
2
|
+
import { h as handleFetch, u as stripeStoreReset, c as cartStore, s as stripeStore, v as stripeStoreRetrievePayment, t as translate } from './stripe.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore.js';
|
|
4
4
|
import { t as trackConversionEvent } from './trackConversionEvent.js';
|
|
5
5
|
import { g as getBorderRadius } from './getBorderRadius.js';
|
|
@@ -8,7 +8,7 @@ import { d as defineCustomElement$3 } from './zonos-payment2.js';
|
|
|
8
8
|
import { d as defineCustomElement$2 } from './zonos-spinner2.js';
|
|
9
9
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
10
10
|
|
|
11
|
-
const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-payment{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}";
|
|
11
|
+
const zonosCheckoutPaymentCss = ".sc-zonos-checkout-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-payment-h *.sc-zonos-checkout-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-checkout-payment-h img.sc-zonos-checkout-payment{max-width:100%}.sc-zonos-checkout-payment-h dl.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h dd.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h1.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h2.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h3.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h4.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h5.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h h6.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h hr.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h figure.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h p.sc-zonos-checkout-payment,.sc-zonos-checkout-payment-h pre.sc-zonos-checkout-payment{margin:0}.sc-zonos-checkout-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-checkout-payment-h .zonos--title.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-24)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar{width:10px}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-payment-h .zonos--group.sc-zonos-checkout-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-payment-h .zonos--payment-error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-8)}.sc-zonos-checkout-payment-h .zonos--error-banner.sc-zonos-checkout-payment{margin-bottom:var(--amino-space-16)}.sc-zonos-checkout-payment-h zonos-button.sc-zonos-checkout-payment{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:0;margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-checkout-payment-h .zonos--group-btn.sc-zonos-checkout-payment zonos-button.sc-zonos-checkout-payment{width:100%}";
|
|
12
12
|
const ZonosCheckoutPaymentStyle0 = zonosCheckoutPaymentCss;
|
|
13
13
|
|
|
14
14
|
const ZonosCheckoutPayment = /*@__PURE__*/ proxyCustomElement(class ZonosCheckoutPayment extends HTMLElement {
|
|
@@ -16,49 +16,50 @@ const ZonosCheckoutPayment = /*@__PURE__*/ proxyCustomElement(class ZonosCheckou
|
|
|
16
16
|
super();
|
|
17
17
|
this.__registerHost();
|
|
18
18
|
this.continueClicked = createEvent(this, "continueClicked", 7);
|
|
19
|
+
this.handleValidate = () => {
|
|
20
|
+
var _a;
|
|
21
|
+
return !!((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
22
|
+
};
|
|
19
23
|
/**
|
|
20
24
|
* handler for continue button click
|
|
21
25
|
*/
|
|
22
26
|
this.continueClickHandler = () => {
|
|
27
|
+
if (!this.handleValidate()) {
|
|
28
|
+
this.showErrorBanner = true;
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
23
31
|
this.continueClicked.emit();
|
|
32
|
+
// submit google tag when the form is complete
|
|
33
|
+
submitGtag('zonos-checkout-payment-info');
|
|
24
34
|
};
|
|
25
35
|
this.paymentError = false;
|
|
26
36
|
this.submitBtnType = undefined;
|
|
27
37
|
this.continueLoading = false;
|
|
28
38
|
this.submitBtnColor = undefined;
|
|
29
|
-
this.
|
|
30
|
-
}
|
|
31
|
-
watchFormComplete() {
|
|
32
|
-
if (!this.disabled) {
|
|
33
|
-
// submit google tag when the form is complete
|
|
34
|
-
submitGtag('zonos-checkout-payment-info');
|
|
35
|
-
}
|
|
39
|
+
this.showErrorBanner = false;
|
|
36
40
|
}
|
|
37
41
|
render() {
|
|
38
|
-
var _a;
|
|
39
42
|
if (!stripeStore.stripeElements) {
|
|
40
43
|
return null;
|
|
41
44
|
}
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
46
|
+
if (this.showErrorBanner) {
|
|
47
|
+
this.showErrorBanner = !this.handleValidate();
|
|
48
|
+
}
|
|
49
|
+
return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), this.paymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, translate("We couldn't complete your payment. Please verify the payment details and try again."))), h("zonos-payment", null), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
44
50
|
// use primary type when on mobile mode
|
|
45
51
|
variant: this.submitBtnType }, "Pay", ' ', formatCurrency({
|
|
46
52
|
amount: cartStore.total,
|
|
47
53
|
currency: cartStore.currency,
|
|
48
54
|
}))))));
|
|
49
55
|
}
|
|
50
|
-
static get watchers() { return {
|
|
51
|
-
"disabled": ["watchFormComplete"]
|
|
52
|
-
}; }
|
|
53
56
|
static get style() { return ZonosCheckoutPaymentStyle0; }
|
|
54
57
|
}, [2, "zonos-checkout-payment", {
|
|
55
58
|
"paymentError": [4, "payment-error"],
|
|
56
59
|
"submitBtnType": [1, "submit-btn-type"],
|
|
57
60
|
"continueLoading": [4, "continue-loading"],
|
|
58
61
|
"submitBtnColor": [1, "submit-btn-color"],
|
|
59
|
-
"
|
|
60
|
-
}, undefined, {
|
|
61
|
-
"disabled": ["watchFormComplete"]
|
|
62
|
+
"showErrorBanner": [32]
|
|
62
63
|
}]);
|
|
63
64
|
function defineCustomElement() {
|
|
64
65
|
if (typeof customElements === "undefined") {
|
|
@@ -27,7 +27,7 @@ const TabCheckmark = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none
|
|
|
27
27
|
</svg>
|
|
28
28
|
`;
|
|
29
29
|
|
|
30
|
-
const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
|
|
30
|
+
const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item:disabled{cursor:not-allowed}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
|
|
31
31
|
const ZonosCheckoutProgressTabsStyle0 = zonosCheckoutProgressTabsCss;
|
|
32
32
|
|
|
33
33
|
const ZonosCheckoutProgressTabs = /*@__PURE__*/ proxyCustomElement(class ZonosCheckoutProgressTabs extends HTMLElement {
|
|
@@ -89,17 +89,17 @@ const ZonosCheckoutProgressTabs = /*@__PURE__*/ proxyCustomElement(class ZonosCh
|
|
|
89
89
|
color: labelSelectedColor,
|
|
90
90
|
})
|
|
91
91
|
: labelSelectedColor;
|
|
92
|
-
return (h(Host, { key: '
|
|
92
|
+
return (h(Host, { key: '419ccd73b029f2bbb92824f9398249d69cfd22aa', class: "zonos--elements", style: {
|
|
93
93
|
'--color': contrastLabelColor,
|
|
94
94
|
'--progress-percent': this.getTotalSuccessStep(),
|
|
95
|
-
} }, h("div", { key: '
|
|
95
|
+
} }, h("div", { key: '2dccf47e6211a6d25f2f8a4ece84c2759d06dc5a', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
96
96
|
const isSelected = tab.value === selectedStep;
|
|
97
97
|
return (h("button", { class: classes([
|
|
98
98
|
'zonos--tab-item',
|
|
99
99
|
tab.value === selectedStep && 'selected',
|
|
100
100
|
tab.isDone && 'done',
|
|
101
101
|
]), 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))));
|
|
102
|
-
})), h("div", { key: '
|
|
102
|
+
})), h("div", { key: '8f70a570e14fe00d855081a5a00607cdbbe87f1b', class: "zonos--tab-progress" }, h("div", { key: '85dd90b7a571ee92035bc6a03ce1d97af85e1e0d', class: "zonos--progress-bar-fill" }))));
|
|
103
103
|
}
|
|
104
104
|
static get assetsDirs() { return ["assets"]; }
|
|
105
105
|
get ele() { return this; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host, Fragment } from '@stencil/core/internal/client';
|
|
2
|
-
import { a as localizationStore, b as log, d as stripeStoreGetDomesticShippingSession, e as localizationStoreUpdateSelectedCountryCode, f as stripeStoreCleanupDomesticShippingSession, l as logError, g as stripeStoreSaveDomesticShippingSession, i as initStripeElements, c as cartStore, j as cartStoreUpdateItems, k as cartStoreReset, s as stripeStore,
|
|
2
|
+
import { a as localizationStore, b as log, d as stripeStoreGetDomesticShippingSession, e as localizationStoreUpdateSelectedCountryCode, f as stripeStoreCleanupDomesticShippingSession, l as logError, g as stripeStoreSaveDomesticShippingSession, i as initStripeElements, c as cartStore, j as cartStoreUpdateItems, k as cartStoreReset, m as cartStoreResetTabItems, s as stripeStore, n as stripeStoreInitCheckoutSession, o as cartStoreUpdateToErrorState, t as translate, p as stripeStorePrefetchLandedCost, q as cartStoreNextStep, r as stripeStoreConfirmPayment, u as stripeStoreReset } from './stripe.js';
|
|
3
3
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore.js';
|
|
4
4
|
import { t as trackConversionEvent } from './trackConversionEvent.js';
|
|
5
5
|
import { i as isCheckoutMobile } from './isCheckoutMobile.js';
|
|
@@ -381,6 +381,8 @@ const ZonosCheckout$1 = /*@__PURE__*/ proxyCustomElement(class ZonosCheckout ext
|
|
|
381
381
|
}
|
|
382
382
|
// reset step to customer info
|
|
383
383
|
cartStore.step = 'customer-info';
|
|
384
|
+
// reset the tab item, so that user needs to click on Continue button to re-quote the landed cost if needed.
|
|
385
|
+
cartStoreResetTabItems();
|
|
384
386
|
}
|
|
385
387
|
async buildCartAndInit() {
|
|
386
388
|
// if tempCartUUID is provided, use it instead of buildCartDetail
|
|
@@ -48,10 +48,10 @@ const ZonosCollapse = /*@__PURE__*/ proxyCustomElement(class ZonosCollapse exten
|
|
|
48
48
|
// set overflow to hidden to prevent content from showing when collapsed
|
|
49
49
|
this.el.style.overflow = 'hidden';
|
|
50
50
|
}
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: '7e0d608d6bfe0ffa5b04b2a30fb27e956c7cb255', class: 'zonos--elements zonos--collapse', style: {
|
|
52
52
|
'--font-family': zonosStoreFontFamily(),
|
|
53
53
|
height: this.getElementHeight(),
|
|
54
|
-
} }, h("div", { key: '
|
|
54
|
+
} }, h("div", { key: '94f69d9e0e6c849a9b609567036ff5cfd2f8ce9c' }, h("iframe", { key: '66ad13c9e08d2ece856543af98c440fec4fd5975', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: '9d0f92e6d22f3e365bc3cec1e5d23325e045bc1a' }))));
|
|
55
55
|
}
|
|
56
56
|
get el() { return this; }
|
|
57
57
|
static get style() { return ZonosCollapseStyle0; }
|
|
@@ -20,7 +20,7 @@ const ZonosComponent$1 = /*@__PURE__*/ proxyCustomElement(class ZonosComponent e
|
|
|
20
20
|
return format(this.first, this.middle, this.last);
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return h("div", { key: '
|
|
23
|
+
return h("div", { key: 'b88706a49b858decbff163e085da6df8b8513eac' }, "Hello, World! I'm ", this.getText());
|
|
24
24
|
}
|
|
25
25
|
static get style() { return ZonosComponentStyle0; }
|
|
26
26
|
}, [1, "zonos-component", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { h as handleFetch, l as logError,
|
|
2
|
+
import { h as handleFetch, l as logError, z as isValidSelector, b as log, s as stripeStore, A as initLocalizationStore, e as localizationStoreUpdateSelectedCountryCode } from './stripe.js';
|
|
3
3
|
import { z as zonosStore, d as zonosStoreInitSetting, a as zonosStoreFontFamily } from './zonosStore.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './zonos-notification2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './zonos-text2.js';
|
|
@@ -265,7 +265,7 @@ const ZonosController$1 = /*@__PURE__*/ proxyCustomElement(class ZonosController
|
|
|
265
265
|
zonosStore.organizationName = organizationName;
|
|
266
266
|
}
|
|
267
267
|
render() {
|
|
268
|
-
return h(Host, { key: '
|
|
268
|
+
return h(Host, { key: '59ea7b586263bcd6c5f42c8e52144dbd56463d89', class: "zonos--elements" });
|
|
269
269
|
}
|
|
270
270
|
static get style() { return ZonosControllerStyle0; }
|
|
271
271
|
}, [1, "zonos-controller", {
|
|
@@ -1829,9 +1829,9 @@ const ZonosCountrySelect = /*@__PURE__*/ proxyCustomElement(class ZonosCountrySe
|
|
|
1829
1829
|
const filteredCountries = this.inputValue
|
|
1830
1830
|
? fuseObject.map(country => country.item)
|
|
1831
1831
|
: countries.sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
1832
|
-
return (h(Host, { key: '
|
|
1832
|
+
return (h(Host, { key: 'd7397a52b23af00e87b88f3869798ea17de7efa3', class: "zonos--elements", style: {
|
|
1833
1833
|
'--font-family': zonosStoreFontFamily(),
|
|
1834
|
-
} }, h("div", { key: '
|
|
1834
|
+
} }, h("div", { key: '6bf32f3ab45ac6640da6b375539e78afe9e730bc', class: "zonos--country-select" }, h("zonos-v-stack", { key: '95203326a2ead88bef76d91a545b89b2a497eb21', class: "zonos--country-select-header", spacing: 8 }, h("zonos-select-dialog-header", { key: 'b2b120a3a4e5fe69466e2d0803181cb83cf6aec3', handleOnClose: () => this.handleOnClose(), label: "Select a country" }, h("input", { key: '4269dfc717b0e2397449a15053da7036cefc03ec', class: "zonos--country-select-input", onInput: this.handleInputChange, placeholder: "Search countries", value: this.inputValue }))), h("div", { key: 'dc7e39c2ee17ff3e5a2ebca1c69e6c399b848f4b', 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 })))))))));
|
|
1835
1835
|
}
|
|
1836
1836
|
get ele() { return this; }
|
|
1837
1837
|
static get style() { return ZonosCountrySelectStyle0; }
|
|
@@ -31,9 +31,9 @@ const ZonosCustomMessage = /*@__PURE__*/ proxyCustomElement(class ZonosCustomMes
|
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
33
|
const messageWithLinks = formatStringWithLinks(this.message);
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '493a7967c460956be2c539e887c839950aea92e9', class: "zonos--elements", style: {
|
|
35
35
|
'--font-family': zonosStoreFontFamily(),
|
|
36
|
-
} }, this.message && (h("zonos-card", { key: '
|
|
36
|
+
} }, this.message && (h("zonos-card", { key: '056de7926b3f8a1c0126a465abbc0962cc7f2f64', class: "zonos--custom-message", spacing: "12px" }, h("div", { key: '992ed280cb9d44abf872698fd54acbf9b384255b', class: "zonos--flex-message" }, h("zonos-icon", { key: '5a3fe5a438ab1e5ab10ed831cc65a4783a36f195', "aria-label": "Custom message icon", content: this.icon }), h("zonos-text", { key: 'b5fcefeeae68c3d4bd60a36c039050e6d4f2927a', innerHTML: messageWithLinks }))))));
|
|
37
37
|
}
|
|
38
38
|
static get style() { return ZonosCustomMessageStyle0; }
|
|
39
39
|
}, [1, "zonos-custom-message", {
|
|
@@ -11,7 +11,7 @@ import { d as defineCustomElement$3 } from './zonos-link-authentication2.js';
|
|
|
11
11
|
import { d as defineCustomElement$2 } from './zonos-spinner2.js';
|
|
12
12
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
13
13
|
|
|
14
|
-
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:var(--amino-space-8);margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
|
|
14
|
+
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:var(--amino-space-20)}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:var(--amino-space-32)}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:var(--amino-space-16)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:var(--amino-space-8);margin-top:var(--amino-space-12);background:var(--primary-color, var(--amino-gray-0))}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
|
|
15
15
|
const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
|
|
16
16
|
|
|
17
17
|
const ZonosCustomerInfo = /*@__PURE__*/ proxyCustomElement(class ZonosCustomerInfo extends HTMLElement {
|
|
@@ -34,60 +34,73 @@ const ZonosCustomerInfo = /*@__PURE__*/ proxyCustomElement(class ZonosCustomerIn
|
|
|
34
34
|
}
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
+
if (!this.handleValidate()) {
|
|
38
|
+
// scroll to the top zonos-banner
|
|
39
|
+
setTimeout(() => {
|
|
40
|
+
var _a;
|
|
41
|
+
(_a = this.el
|
|
42
|
+
.querySelector('zonos-banner.zonos--error-banner')) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
43
|
+
behavior: 'smooth',
|
|
44
|
+
block: 'center',
|
|
45
|
+
});
|
|
46
|
+
}, 50);
|
|
47
|
+
this.showErrorBanner = true;
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
this.showErrorBanner = false;
|
|
37
51
|
this.continueClicked.emit();
|
|
52
|
+
// submit google tag when the form is complete
|
|
53
|
+
submitGtag('zonos-checkout-customer-info');
|
|
54
|
+
void trackConversionEvent('checkout_customerInfoCompleted');
|
|
55
|
+
};
|
|
56
|
+
this.handleValidate = () => {
|
|
57
|
+
const stripeShippingAddressEventData = stripeStore.stripeAddressEventData;
|
|
58
|
+
const stripeBillingAddressEventData = stripeStore.stripeBillingAddressEventData;
|
|
59
|
+
const stripeLinkEventData = stripeStore.stripeLinkEventData;
|
|
60
|
+
// if the shipping is different from billing, we need to make sure the billing address is valid and disable the button if it's not
|
|
61
|
+
const isValidBilling = stripeStore.stripeShippingSameAsBilling
|
|
62
|
+
? !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete)
|
|
63
|
+
: !!(stripeBillingAddressEventData === null || stripeBillingAddressEventData === void 0 ? void 0 : stripeBillingAddressEventData.complete);
|
|
64
|
+
const isValidShipping = !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete);
|
|
65
|
+
const isValidLink = !!(stripeLinkEventData === null || stripeLinkEventData === void 0 ? void 0 : stripeLinkEventData.complete);
|
|
66
|
+
if (!isValidBilling || !isValidShipping || !isValidLink) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
return true;
|
|
38
70
|
};
|
|
39
71
|
this.continueLoading = false;
|
|
40
72
|
this.submitBtnType = undefined;
|
|
41
73
|
this.submitBtnColor = undefined;
|
|
42
74
|
this.defaultAddress = null;
|
|
43
|
-
this.
|
|
75
|
+
this.showErrorBanner = false;
|
|
44
76
|
this.hasInvalidShippingCharacters = false;
|
|
45
77
|
this.hasInvalidBillingCharacters = false;
|
|
46
78
|
}
|
|
47
|
-
watchFormComplete() {
|
|
48
|
-
if (!this.disabled) {
|
|
49
|
-
// submit google tag when the form is complete
|
|
50
|
-
submitGtag('zonos-checkout-customer-info');
|
|
51
|
-
void trackConversionEvent('checkout_customerInfoCompleted');
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
79
|
render() {
|
|
55
80
|
if (!stripeStore.stripeElements) {
|
|
56
81
|
return null;
|
|
57
82
|
}
|
|
58
|
-
const stripeShippingAddressEventData = stripeStore.stripeAddressEventData;
|
|
59
|
-
const stripeBillingAddressEventData = stripeStore.stripeBillingAddressEventData;
|
|
60
|
-
const stripeLinkEventData = stripeStore.stripeLinkEventData;
|
|
61
|
-
// if the shipping is different from billing, we need to make sure the billing address is valid and disable the button if it's not
|
|
62
|
-
const isValidBilling = stripeStore.stripeShippingSameAsBilling
|
|
63
|
-
? !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete)
|
|
64
|
-
: !!(stripeBillingAddressEventData === null || stripeBillingAddressEventData === void 0 ? void 0 : stripeBillingAddressEventData.complete);
|
|
65
|
-
const isValidShipping = !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete);
|
|
66
|
-
const isValidLink = !!(stripeLinkEventData === null || stripeLinkEventData === void 0 ? void 0 : stripeLinkEventData.complete);
|
|
67
|
-
// make sure data is valid
|
|
68
|
-
this.disabled = !isValidBilling || !isValidShipping || !isValidLink;
|
|
69
83
|
const showBilling = !stripeStore.stripeShippingSameAsBilling;
|
|
70
|
-
|
|
84
|
+
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
85
|
+
if (this.showErrorBanner) {
|
|
86
|
+
this.showErrorBanner = !this.handleValidate();
|
|
87
|
+
}
|
|
88
|
+
return (h(Host, { class: "zonos--customer-info zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Customer information')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), h("zonos-link-authentication", { titleText: translate('Contact') }), h("zonos-address", { defaultAddress: this.defaultAddress, onInvalidCharacters: e => (this.hasInvalidShippingCharacters = e.detail), titleText: translate('Address'), type: "shipping" }), h("zonos-checkbox", { isChecked: stripeStore.stripeShippingSameAsBilling, label: translate('Shipping address same as billing'), onCheckboxSelected: e => {
|
|
71
89
|
stripeStore.stripeShippingSameAsBilling = e.detail;
|
|
72
|
-
} }), h("zonos-collapse", { collapsed: !showBilling }, h("zonos-address", { defaultAddress: this.defaultAddress, onInvalidCharacters: e => (this.hasInvalidBillingCharacters = e.detail), titleText: translate('Billing address'), type: "billing" })), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor,
|
|
90
|
+
} }), h("zonos-collapse", { collapsed: !showBilling }, h("zonos-address", { defaultAddress: this.defaultAddress, onInvalidCharacters: e => (this.hasInvalidBillingCharacters = e.detail), titleText: translate('Billing address'), type: "billing" })), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
73
91
|
// use primary type when on mobile mode
|
|
74
92
|
variant: this.submitBtnType }, translate('Continue to shipping'))))));
|
|
75
93
|
}
|
|
76
94
|
get el() { return this; }
|
|
77
|
-
static get watchers() { return {
|
|
78
|
-
"disabled": ["watchFormComplete"]
|
|
79
|
-
}; }
|
|
80
95
|
static get style() { return ZonosCustomerInfoStyle0; }
|
|
81
96
|
}, [2, "zonos-customer-info", {
|
|
82
97
|
"continueLoading": [4, "continue-loading"],
|
|
83
98
|
"submitBtnType": [1, "submit-btn-type"],
|
|
84
99
|
"submitBtnColor": [1, "submit-btn-color"],
|
|
85
100
|
"defaultAddress": [16],
|
|
86
|
-
"
|
|
101
|
+
"showErrorBanner": [32],
|
|
87
102
|
"hasInvalidShippingCharacters": [32],
|
|
88
103
|
"hasInvalidBillingCharacters": [32]
|
|
89
|
-
}, undefined, {
|
|
90
|
-
"disabled": ["watchFormComplete"]
|
|
91
104
|
}]);
|
|
92
105
|
function defineCustomElement() {
|
|
93
106
|
if (typeof customElements === "undefined") {
|
|
@@ -57,7 +57,7 @@ const ZonosDialog = /*@__PURE__*/ proxyCustomElement(class ZonosDialog extends H
|
|
|
57
57
|
document.body.style.overflow = 'auto';
|
|
58
58
|
}
|
|
59
59
|
const borderStyle = getBorderRadius(this.borderStyle);
|
|
60
|
-
return (h(Host, { key: '
|
|
60
|
+
return (h(Host, { key: 'c97c24de2950d418d1aec4738ea6152e24f8049a', class: classes([
|
|
61
61
|
'zonos--elements',
|
|
62
62
|
this.open && 'open',
|
|
63
63
|
this.isLoading && 'is-loading',
|
|
@@ -68,10 +68,10 @@ const ZonosDialog = /*@__PURE__*/ proxyCustomElement(class ZonosDialog extends H
|
|
|
68
68
|
'--font-family': zonosStoreFontFamily(),
|
|
69
69
|
'--height': this.height || 'initial',
|
|
70
70
|
'--width': this.width,
|
|
71
|
-
} }, h("div", { key: '
|
|
71
|
+
} }, h("div", { key: 'd8053eb085edd344a5c667123515932a759ee4df', class: "zonos--backdrop" }), h("div", { key: '15f11f85257160698f7850495f3d8866dfd46346', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, h("div", { key: '6cb8ab8555511cfdbb502ecdb7b796894ff9b0df', class: "zonos--dialog" }, this.isLoading && (h("div", { key: '7dc1c154cda561aca93c0b3f09bf1c8f9d01446b', class: "zonos--loading" }, h("zonos-spinner", { key: '71701888d4320b35f43934a425a6e44653c84e62', size: 30 }))), (this.headerText || !this.noCloseButton) && (h("div", { key: '5e9ea325a80cefc212c4375dec076d4a703d3bbb', class: "zonos--header" }, this.headerText && (h("h3", { key: '6372813c8c79c0c4a09cca96bf85749ce32a43fb', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (h("zonos-button", { key: '00d2f9393acec2da88794977cf6cfd4308fffb31', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), h("div", { key: '71177d6272533d34143f50d2ebce277b3cb6a6db', class: classes([
|
|
72
72
|
'zonos--body',
|
|
73
73
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
74
|
-
]) }, h("slot", { key: '
|
|
74
|
+
]) }, h("slot", { key: 'ae388c5f9d7a250e0f829313acc561aea9ba1468' })), h("slot", { key: '202816af31727db4a92af8f63daeb34992ac5504', name: "dialog-footer" })))));
|
|
75
75
|
}
|
|
76
76
|
static get assetsDirs() { return ["assets"]; }
|
|
77
77
|
static get style() { return ZonosDialogStyle0; }
|
|
@@ -36,9 +36,9 @@ const ZonosHelloDialogFooter = /*@__PURE__*/ proxyCustomElement(class ZonosHello
|
|
|
36
36
|
const primaryColor = (_a = this.appearanceSettings) === null || _a === void 0 ? void 0 : _a.colorPrimary;
|
|
37
37
|
const footerTheme = primaryColor && isDarkColor(primaryColor) ? 'DARK' : 'LIGHT';
|
|
38
38
|
const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: '57933a1dc8584daeb3f66393ebb98e7cdb1ff5e3', class: "zonos--elements" }, h("div", { key: '801626fa9eb4baa7a8e1ef1afda6336bbe085ca1', class: "zonos--hello-dialog-footer", "data-theme": footerTheme, style: {
|
|
40
40
|
'--primary-color': (_c = this.appearanceSettings) === null || _c === void 0 ? void 0 : _c.colorPrimary,
|
|
41
|
-
} }, h("a", { key: '
|
|
41
|
+
} }, h("a", { key: '0e03d262f71f5fced451b8b298462b1f070848ad', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: 'e17d1eac7bc1e5e5bf2c86c384dc5b01725802ef', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: "gray-1200", size: 108 })), h("div", { key: 'd7a065b6bd87b41aae013b0cddf4cb50852664fe', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: '22a0a218fd1627519cde3663face486ba2d5ec41', buttonColor: "gray-1200", icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: "gray-1200" }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: '6800d57eb7a877e873bb8050f313017c39a516e7', buttonColor: "gray-1200", icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
|
|
42
42
|
}
|
|
43
43
|
static get style() { return ZonosHelloDialogFooterStyle0; }
|
|
44
44
|
}, [1, "zonos-hello-dialog-footer", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { G as currencyFormat, a as localizationStore, t as translate } from './stripe.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore.js';
|
|
4
4
|
import { c as classes } from './classes.js';
|
|
5
5
|
import { f as formatStringWithLinks, d as defineCustomElement$8 } from './zonos-custom-message2.js';
|
|
@@ -200,17 +200,17 @@ const ZonosHelloDialog = /*@__PURE__*/ proxyCustomElement(class ZonosHelloDialog
|
|
|
200
200
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
201
201
|
const currentPage = this.getCurrentPageEnum();
|
|
202
202
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
203
|
-
return (h(Host, { key: '
|
|
203
|
+
return (h(Host, { key: '8bf0a772ecb6fccdc2972e972f9f0408ce592218', class: "zonos--elements" }, h("div", { key: '88f20fe04677e325017a7ecfdde9912e4e8e22b4', "aria-hidden": "true", class: classes([
|
|
204
204
|
'zonos--hello-dialog',
|
|
205
205
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
206
206
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
207
207
|
!!this.mobileLocationOverride &&
|
|
208
208
|
'zonos--hello-dialog-mobile-override',
|
|
209
209
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
210
|
-
]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '
|
|
210
|
+
]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: 'b11f2f53423877831a21b643d2368dccb6fe224c' }, h("div", { key: '57ff469e1f2c2531c1954bdf6d2f49fddbe63bcd', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: 'a418c15bb7aae60382eb31dd97ed8e0666e1fce9', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { key: '5709d31fd18036086c4ede870204a62fe89d590d', spacing: 24 }, h("zonos-country-flag", { key: 'ec590dc403375ff798b1d0d5a4a30bbaa74892f2', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '37d40d7dd95da6d333bd0fdf2f19fe724ffab2b9', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '281df8ec6ab89f5a93ac9f727f90c17b38bfcbb2', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '512245b074199b9e568afabfd9f843227aeb68cf', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '283e04fb0b4009458e93431ef9f9dc12900541a6', spacing: 8 }, this.restrictedItems.map(item => {
|
|
211
211
|
var _a;
|
|
212
212
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
213
|
-
}), h("zonos-card", { key: '
|
|
213
|
+
}), h("zonos-card", { key: 'e0e0d8fb11132dc1f64e3fcf4f0cc2c1bf691f62', spacing: "12px" }, h("zonos-v-stack", { key: '0dc4346f8856bd8ba5f248f29bce36ef7966231b', spacing: 12 }, h("div", { key: 'ad9354280047ecd4ac32b988de69d77dcbe34216', class: "zonos--flex-message" }, h("zonos-icon", { key: 'aceb265d47dedefb6311ac216afe87a160f6eb70', "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", { key: '05ea0760b16a03c9a4ff1e900257823e1c4a8cca' }, dutyDeMinimisMessage)), h("div", { key: 'fa3e8189c8d022ed3a2e8aee479d5788c47cef4c', class: "zonos--flex-message" }, h("zonos-icon", { key: '674d09a02bdce580ac686b6605f281712fb36642', "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", { key: '25e4d23761eed05537c368d57bc0c8124cfc9789' }, taxDeMinimisMessage)), additionalInformation && (h("div", { key: '0f21e1127ee976dc54c0143388adb96424df6b48', class: "zonos--flex-message" }, h("zonos-icon", { key: '7b728089b819a901335c409e2ab375943c3cf6e1', "aria-label": "Low value order shipping restriction", content: BagIcon }), h("zonos-text", { key: '8c9d174c332811647071cdaf667d073f88c80d11' }, additionalInformation))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: 'fade96ffe3372328d5e40401e5899194bb64537a', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '27d2f1e0221a8fa5c5d065bb06ec3aac34b5b8c2' }, h("zonos-country-select", { key: '3e95cbd0b23acbf6a9acc225c22e190628fb36c6', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '308654a87db5adbbd7c776e761aa180bba128a83' }, h("zonos-language-select", { key: 'e28f547a6bb066b8d5e6f8cceabc5c14e5c23da1', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
214
214
|
}
|
|
215
215
|
static get assetsDirs() { return ["assets"]; }
|
|
216
216
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore.js';
|
|
3
|
-
import { h as handleFetch, l as logError, a as localizationStore,
|
|
3
|
+
import { h as handleFetch, l as logError, a as localizationStore, z as isValidSelector, t as translate, B as getZCountryUrlParam, C as setZCountryUrlParam, b as log, D as currencyDisplay, E as currencyConvertAndFormat, F as currencyConvert, G as currencyFormat } from './stripe.js';
|
|
4
4
|
import { c as classes } from './classes.js';
|
|
5
5
|
import { g as getHasMoreSpaceOnRight, d as defineCustomElement$9 } from './zonos-hello-dialog2.js';
|
|
6
6
|
import { d as defineCustomElement$f } from './zonos-banner2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { w as localizationStoreUpdateSelectedLocale, t as translate, a as localizationStore } from './stripe.js';
|
|
3
3
|
import { a as zonosStoreFontFamily } from './zonosStore.js';
|
|
4
4
|
import { l as languages } from './ILanguage.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './zonos-button2.js';
|
|
@@ -32,9 +32,9 @@ const ZonosLanguageSelect = /*@__PURE__*/ proxyCustomElement(class ZonosLanguage
|
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
34
|
const { selectedLocale } = localizationStore;
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: '5ccbe14cb452d09ae6bc2fb607f745397d94f55e', class: "zonos--elements", style: {
|
|
36
36
|
'--font-family': zonosStoreFontFamily(),
|
|
37
|
-
} }, h("div", { key: '
|
|
37
|
+
} }, h("div", { key: '9679284a648e7fa09bbdcba7f2d7b6665134772b', class: "zonos--language-select" }, h("zonos-select-dialog-header", { key: '15f1b2497a2808c2df25611ec33d2f4dc4ba8586', handleOnClose: () => this.handleOnClose(), label: translate('Select a language') }), h("div", { key: 'f072ae8c34af9d218f8975cbead1123a1b449e62', 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 })))))))));
|
|
38
38
|
}
|
|
39
39
|
static get style() { return ZonosLanguageSelectStyle0; }
|
|
40
40
|
}, [1, "zonos-language-select", {
|