@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
|
@@ -16,7 +16,7 @@ const ZonosLink = class {
|
|
|
16
16
|
this.linkTitle = undefined;
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (index.h(index.Host, { key: '
|
|
19
|
+
return (index.h(index.Host, { key: '555e179675070efaaf8bf0d0ea674fe034b8700c', class: "zonos--elements" }, index.h("a", { key: '0c608a6f572eaabb93021d8618f2b1fd58b10188', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, index.h("slot", { key: '4fef15b277b11e062d1fc2cf8bc3e564ed5b2a57' }))));
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
ZonosLink.style = ZonosLinkStyle0;
|
|
@@ -19,11 +19,11 @@ const ZonosLogo = class {
|
|
|
19
19
|
const filterColor = this.theme === 'DARK'
|
|
20
20
|
? 'invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)'
|
|
21
21
|
: 'whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)';
|
|
22
|
-
return (index.h(index.Host, { key: '
|
|
22
|
+
return (index.h(index.Host, { key: '3d2041632c4ad901d228ce6e267e6b5f9b408dc8', class: classes.classes(['zonos--elements zonos--logo']), style: {
|
|
23
23
|
'--filter-color': filterColor,
|
|
24
24
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
25
25
|
'--width': this.width,
|
|
26
|
-
} }, index.h("img", { key: '
|
|
26
|
+
} }, index.h("img", { key: 'e069b288a647051e1b5a505fb2b5b4a1851780ed', alt: "Zonos Logo", src: index.getAssetPath('./assets/ZonosLogo.png') })));
|
|
27
27
|
}
|
|
28
28
|
static get assetsDirs() { return ["assets"]; }
|
|
29
29
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-3b4816ef.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-1b1d39af.js');
|
|
7
7
|
require('./zonosStore-aee974e0.js');
|
|
8
8
|
require('./isDarkColor-f5473002.js');
|
|
9
9
|
require('./getBorderRadius-c8cc2bb3.js');
|
|
@@ -44,7 +44,7 @@ const ZonosPayment = class {
|
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
46
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
47
|
-
return (index.h(index.Host, { key: '
|
|
47
|
+
return (index.h(index.Host, { key: '6bed9a37a91b7e3f0f381fbd1fe79fc7930a1483', class: "zonos--payment zonos--elements" }, this.titleText && (index.h("zonos-text", { key: 'd5231078e732006bbcd8cde34aa3f3c82bbec5f2', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), index.h("div", { key: 'e0138c15df81fc7f78f7997e48722c2377298145', class: "zonos--payment-component" })));
|
|
48
48
|
}
|
|
49
49
|
get el() { return index.getElement(this); }
|
|
50
50
|
static get watchers() { return {
|
|
@@ -18,9 +18,9 @@ const ZonosSelectDialogHeader = class {
|
|
|
18
18
|
this.label = '';
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (index.h(index.Host, { key: '
|
|
21
|
+
return (index.h(index.Host, { key: 'f5fdbdf6077dc7f928ce27b9a659264451851848', class: "zonos--elements", style: {
|
|
22
22
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
23
|
-
} }, index.h("zonos-v-stack", { key: '
|
|
23
|
+
} }, index.h("zonos-v-stack", { key: '2c702d85c59f05b13e2e390112a883287ea7caa9', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, index.h("div", { key: '6d96d65d0bf84c9c3fa393e40793ce614c38d56d', class: "zonos--select-dialog-header" }, index.h("zonos-text", { key: 'faa95bb90a92ea18b357fc85c417fe12ec683abd', type: "boldLabel" }, this.label), index.h("zonos-button", { key: '69cb8bc40f9af380971bf25d9901f8508950d9a6', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close select dialog", content: RemoveIcon, size: 20 }), noBackground: true, onClick: () => this.handleOnClose() })), index.h("slot", { key: 'abdbb9baa47b4c954b81ea4101b24ababf45ae31' }))));
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
ZonosSelectDialogHeader.style = ZonosSelectDialogHeaderStyle0;
|
|
@@ -34,9 +34,9 @@ const VStack = class {
|
|
|
34
34
|
this.spacing = 24;
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (index.h(index.Host, { key: '
|
|
37
|
+
return (index.h(index.Host, { key: 'c6bd39c68cd1056b90f5ced0bb21065ea9bd657c', style: {
|
|
38
38
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
39
|
-
} }, index.h("div", { key: '
|
|
39
|
+
} }, index.h("div", { key: 'fa24c9d7aafdee826d51bc9b0537c3ec1df672d3', class: classes.classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, index.h("slot", { key: 'a1f2bde182c1073dfeebe72855af2c729c303fee' }))));
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
VStack.style = ZonosVStackStyle0;
|
|
@@ -6,31 +6,37 @@ import { formatCurrency } from "../../../utils/formatCurrency";
|
|
|
6
6
|
import { submitGtag } from "../../../utils/submitGtag";
|
|
7
7
|
export class ZonosCheckoutPayment {
|
|
8
8
|
constructor() {
|
|
9
|
+
this.handleValidate = () => {
|
|
10
|
+
var _a;
|
|
11
|
+
return !!((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
12
|
+
};
|
|
9
13
|
/**
|
|
10
14
|
* handler for continue button click
|
|
11
15
|
*/
|
|
12
16
|
this.continueClickHandler = () => {
|
|
17
|
+
if (!this.handleValidate()) {
|
|
18
|
+
this.showErrorBanner = true;
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
13
21
|
this.continueClicked.emit();
|
|
22
|
+
// submit google tag when the form is complete
|
|
23
|
+
submitGtag('zonos-checkout-payment-info');
|
|
14
24
|
};
|
|
15
25
|
this.paymentError = false;
|
|
16
26
|
this.submitBtnType = undefined;
|
|
17
27
|
this.continueLoading = false;
|
|
18
28
|
this.submitBtnColor = undefined;
|
|
19
|
-
this.
|
|
20
|
-
}
|
|
21
|
-
watchFormComplete() {
|
|
22
|
-
if (!this.disabled) {
|
|
23
|
-
// submit google tag when the form is complete
|
|
24
|
-
submitGtag('zonos-checkout-payment-info');
|
|
25
|
-
}
|
|
29
|
+
this.showErrorBanner = false;
|
|
26
30
|
}
|
|
27
31
|
render() {
|
|
28
|
-
var _a;
|
|
29
32
|
if (!stripeStore.stripeElements) {
|
|
30
33
|
return null;
|
|
31
34
|
}
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
36
|
+
if (this.showErrorBanner) {
|
|
37
|
+
this.showErrorBanner = !this.handleValidate();
|
|
38
|
+
}
|
|
39
|
+
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",
|
|
34
40
|
// use primary type when on mobile mode
|
|
35
41
|
variant: this.submitBtnType }, "Pay", ' ', formatCurrency({
|
|
36
42
|
amount: cartStore.total,
|
|
@@ -130,7 +136,7 @@ export class ZonosCheckoutPayment {
|
|
|
130
136
|
}
|
|
131
137
|
static get states() {
|
|
132
138
|
return {
|
|
133
|
-
"
|
|
139
|
+
"showErrorBanner": {}
|
|
134
140
|
};
|
|
135
141
|
}
|
|
136
142
|
static get events() {
|
|
@@ -151,10 +157,4 @@ export class ZonosCheckoutPayment {
|
|
|
151
157
|
}
|
|
152
158
|
}];
|
|
153
159
|
}
|
|
154
|
-
static get watchers() {
|
|
155
|
-
return [{
|
|
156
|
-
"propName": "disabled",
|
|
157
|
-
"methodName": "watchFormComplete"
|
|
158
|
-
}];
|
|
159
|
-
}
|
|
160
160
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, h, Host, } from "@stencil/core";
|
|
2
|
-
import { cartStore, cartStoreNextStep, cartStoreReset, cartStoreUpdateItems, cartStoreUpdateToErrorState, } from "../../store/checkout/cart";
|
|
2
|
+
import { cartStore, cartStoreNextStep, cartStoreReset, cartStoreResetTabItems, cartStoreUpdateItems, cartStoreUpdateToErrorState, } from "../../store/checkout/cart";
|
|
3
3
|
import { initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreInitCheckoutSession, stripeStorePrefetchLandedCost, stripeStoreReset, } from "../../store/checkout/stripe";
|
|
4
4
|
import { localizationStore } from "../../store/hello/localization";
|
|
5
5
|
import { translate } from "../../store/translationStore";
|
|
@@ -84,6 +84,8 @@ export class ZonosCheckout {
|
|
|
84
84
|
}
|
|
85
85
|
// reset step to customer info
|
|
86
86
|
cartStore.step = 'customer-info';
|
|
87
|
+
// reset the tab item, so that user needs to click on Continue button to re-quote the landed cost if needed.
|
|
88
|
+
cartStoreResetTabItems();
|
|
87
89
|
}
|
|
88
90
|
async buildCartAndInit() {
|
|
89
91
|
// if tempCartUUID is provided, use it instead of buildCartDetail
|
|
@@ -20,42 +20,60 @@ export class ZonosCustomerInfo {
|
|
|
20
20
|
}
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
+
if (!this.handleValidate()) {
|
|
24
|
+
// scroll to the top zonos-banner
|
|
25
|
+
setTimeout(() => {
|
|
26
|
+
var _a;
|
|
27
|
+
(_a = this.el
|
|
28
|
+
.querySelector('zonos-banner.zonos--error-banner')) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
29
|
+
behavior: 'smooth',
|
|
30
|
+
block: 'center',
|
|
31
|
+
});
|
|
32
|
+
}, 50);
|
|
33
|
+
this.showErrorBanner = true;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
this.showErrorBanner = false;
|
|
23
37
|
this.continueClicked.emit();
|
|
38
|
+
// submit google tag when the form is complete
|
|
39
|
+
submitGtag('zonos-checkout-customer-info');
|
|
40
|
+
void trackConversionEvent('checkout_customerInfoCompleted');
|
|
41
|
+
};
|
|
42
|
+
this.handleValidate = () => {
|
|
43
|
+
const stripeShippingAddressEventData = stripeStore.stripeAddressEventData;
|
|
44
|
+
const stripeBillingAddressEventData = stripeStore.stripeBillingAddressEventData;
|
|
45
|
+
const stripeLinkEventData = stripeStore.stripeLinkEventData;
|
|
46
|
+
// 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
|
|
47
|
+
const isValidBilling = stripeStore.stripeShippingSameAsBilling
|
|
48
|
+
? !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete)
|
|
49
|
+
: !!(stripeBillingAddressEventData === null || stripeBillingAddressEventData === void 0 ? void 0 : stripeBillingAddressEventData.complete);
|
|
50
|
+
const isValidShipping = !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete);
|
|
51
|
+
const isValidLink = !!(stripeLinkEventData === null || stripeLinkEventData === void 0 ? void 0 : stripeLinkEventData.complete);
|
|
52
|
+
if (!isValidBilling || !isValidShipping || !isValidLink) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
24
56
|
};
|
|
25
57
|
this.continueLoading = false;
|
|
26
58
|
this.submitBtnType = undefined;
|
|
27
59
|
this.submitBtnColor = undefined;
|
|
28
60
|
this.defaultAddress = null;
|
|
29
|
-
this.
|
|
61
|
+
this.showErrorBanner = false;
|
|
30
62
|
this.hasInvalidShippingCharacters = false;
|
|
31
63
|
this.hasInvalidBillingCharacters = false;
|
|
32
64
|
}
|
|
33
|
-
watchFormComplete() {
|
|
34
|
-
if (!this.disabled) {
|
|
35
|
-
// submit google tag when the form is complete
|
|
36
|
-
submitGtag('zonos-checkout-customer-info');
|
|
37
|
-
void trackConversionEvent('checkout_customerInfoCompleted');
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
65
|
render() {
|
|
41
66
|
if (!stripeStore.stripeElements) {
|
|
42
67
|
return null;
|
|
43
68
|
}
|
|
44
|
-
const stripeShippingAddressEventData = stripeStore.stripeAddressEventData;
|
|
45
|
-
const stripeBillingAddressEventData = stripeStore.stripeBillingAddressEventData;
|
|
46
|
-
const stripeLinkEventData = stripeStore.stripeLinkEventData;
|
|
47
|
-
// 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
|
|
48
|
-
const isValidBilling = stripeStore.stripeShippingSameAsBilling
|
|
49
|
-
? !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete)
|
|
50
|
-
: !!(stripeBillingAddressEventData === null || stripeBillingAddressEventData === void 0 ? void 0 : stripeBillingAddressEventData.complete);
|
|
51
|
-
const isValidShipping = !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete);
|
|
52
|
-
const isValidLink = !!(stripeLinkEventData === null || stripeLinkEventData === void 0 ? void 0 : stripeLinkEventData.complete);
|
|
53
|
-
// make sure data is valid
|
|
54
|
-
this.disabled = !isValidBilling || !isValidShipping || !isValidLink;
|
|
55
69
|
const showBilling = !stripeStore.stripeShippingSameAsBilling;
|
|
56
|
-
|
|
70
|
+
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
71
|
+
if (this.showErrorBanner) {
|
|
72
|
+
this.showErrorBanner = !this.handleValidate();
|
|
73
|
+
}
|
|
74
|
+
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 => {
|
|
57
75
|
stripeStore.stripeShippingSameAsBilling = e.detail;
|
|
58
|
-
} }), 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,
|
|
76
|
+
} }), 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",
|
|
59
77
|
// use primary type when on mobile mode
|
|
60
78
|
variant: this.submitBtnType }, translate('Continue to shipping'))))));
|
|
61
79
|
}
|
|
@@ -156,7 +174,7 @@ export class ZonosCustomerInfo {
|
|
|
156
174
|
}
|
|
157
175
|
static get states() {
|
|
158
176
|
return {
|
|
159
|
-
"
|
|
177
|
+
"showErrorBanner": {},
|
|
160
178
|
"hasInvalidShippingCharacters": {},
|
|
161
179
|
"hasInvalidBillingCharacters": {}
|
|
162
180
|
};
|
|
@@ -180,10 +198,4 @@ export class ZonosCustomerInfo {
|
|
|
180
198
|
}];
|
|
181
199
|
}
|
|
182
200
|
static get elementRef() { return "el"; }
|
|
183
|
-
static get watchers() {
|
|
184
|
-
return [{
|
|
185
|
-
"propName": "disabled",
|
|
186
|
-
"methodName": "watchFormComplete"
|
|
187
|
-
}];
|
|
188
|
-
}
|
|
189
201
|
}
|
|
@@ -23,13 +23,27 @@ export class ZonosShipping {
|
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
this.isSelecting = false;
|
|
26
|
-
|
|
26
|
+
};
|
|
27
|
+
this.handleValidate = () => {
|
|
28
|
+
return !!this.selectedShippingMethod;
|
|
27
29
|
};
|
|
28
30
|
/**
|
|
29
31
|
* handler for continue button click
|
|
30
32
|
*/
|
|
31
33
|
this.continueClickHandler = () => {
|
|
34
|
+
var _a;
|
|
35
|
+
// show error banner if the form is not complete
|
|
36
|
+
if (!this.handleValidate()) {
|
|
37
|
+
this.showErrorBanner = true;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
this.showErrorBanner = false;
|
|
32
41
|
this.continueClicked.emit();
|
|
42
|
+
// submit google tag when the form is complete
|
|
43
|
+
submitGtag('zonos-checkout-shipping-info');
|
|
44
|
+
void trackConversionEvent('checkout_shippingInfoCompleted', {
|
|
45
|
+
serviceLevelId: (_a = this.selectedShippingMethod) === null || _a === void 0 ? void 0 : _a.value,
|
|
46
|
+
});
|
|
33
47
|
};
|
|
34
48
|
this.initServiceLevels = () => {
|
|
35
49
|
var _a;
|
|
@@ -61,31 +75,23 @@ export class ZonosShipping {
|
|
|
61
75
|
this.submitBtnType = undefined;
|
|
62
76
|
this.selectedShippingMethod = null;
|
|
63
77
|
this.isSelecting = false;
|
|
64
|
-
this.
|
|
78
|
+
this.showErrorBanner = false;
|
|
65
79
|
this.serviceLevels = [];
|
|
66
80
|
}
|
|
67
|
-
watchFormComplete() {
|
|
68
|
-
var _a;
|
|
69
|
-
if (!this.disabled) {
|
|
70
|
-
// submit google tag when the form is complete
|
|
71
|
-
submitGtag('zonos-checkout-shipping-info');
|
|
72
|
-
void trackConversionEvent('checkout_shippingInfoCompleted', {
|
|
73
|
-
serviceLevelId: (_a = this.selectedShippingMethod) === null || _a === void 0 ? void 0 : _a.value,
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
81
|
componentWillLoad() {
|
|
78
82
|
this.initServiceLevels();
|
|
79
83
|
const selectedServiceLevel = this.serviceLevels.find(item => { var _a; return item.value === ((_a = cartStore.selectedShippingOption) === null || _a === void 0 ? void 0 : _a.id); }) || null;
|
|
80
84
|
if (selectedServiceLevel) {
|
|
81
85
|
this.selectedShippingMethod = selectedServiceLevel;
|
|
82
86
|
}
|
|
83
|
-
// enable continue button if there is a selected shipping option
|
|
84
|
-
this.disabled = !selectedServiceLevel;
|
|
85
87
|
}
|
|
86
88
|
render() {
|
|
87
|
-
var _a, _b;
|
|
88
|
-
|
|
89
|
+
var _a, _b, _c;
|
|
90
|
+
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
91
|
+
if (this.showErrorBanner) {
|
|
92
|
+
this.showErrorBanner = !this.handleValidate();
|
|
93
|
+
}
|
|
94
|
+
return (h(Host, { key: 'f46a224f05bd6a5b762e7b4a9130c809fa1806d9', class: "zonos--shipping zonos--elements" }, h("div", { key: '07dceedd0abb2c794c8f4b7c70d51f84eb76f82f', class: "zonos--group" }, h("zonos-text", { key: 'e9aec3b541e90bca19218f5444b2a1282c1fade2', class: "zonos--title", type: "semiBoldSubheader" }, translate('Delivery options')), this.showErrorBanner && !!((_a = this.serviceLevels) === null || _a === void 0 ? void 0 : _a.length) && (h("zonos-banner", { key: 'df955af5f7318a0146d72aae0d5292a5455c16d9', class: "zonos--error-banner", intent: "error" }, translate('No shipping method selected'))), h("zonos-text", { key: 'eacb6cc1936ac9a70f32deca90fa88efd9d560bd', class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !((_b = this.serviceLevels) === null || _b === void 0 ? void 0 : _b.length) ? (h("zonos-banner", { bannerTitle: translate('No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.'), intent: "error" })) : (h("zonos-shipping-rich-radio", { initialSelectedValue: (_c = this.selectedShippingMethod) === null || _c === void 0 ? void 0 : _c.value, items: this.serviceLevels, onRadioSelected: e => this.handleRadioSelected(e) })), h("div", { key: '37aed76bf80c937ed9dddbefb7f6417bf1322a89', class: "zonos--group-btn" }, h("zonos-button", { key: '09a5e1986f6d39ece56a0ea9b47324f81e4c3d84', backgroundColor: this.submitBtnColor, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
89
95
|
// use primary type when on mobile mode
|
|
90
96
|
variant: this.submitBtnType }, translate('Go to payment'))))));
|
|
91
97
|
}
|
|
@@ -166,7 +172,7 @@ export class ZonosShipping {
|
|
|
166
172
|
return {
|
|
167
173
|
"selectedShippingMethod": {},
|
|
168
174
|
"isSelecting": {},
|
|
169
|
-
"
|
|
175
|
+
"showErrorBanner": {},
|
|
170
176
|
"serviceLevels": {}
|
|
171
177
|
};
|
|
172
178
|
}
|
|
@@ -188,10 +194,4 @@ export class ZonosShipping {
|
|
|
188
194
|
}
|
|
189
195
|
}];
|
|
190
196
|
}
|
|
191
|
-
static get watchers() {
|
|
192
|
-
return [{
|
|
193
|
-
"propName": "disabled",
|
|
194
|
-
"methodName": "watchFormComplete"
|
|
195
|
-
}];
|
|
196
|
-
}
|
|
197
197
|
}
|
|
@@ -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: '555e179675070efaaf8bf0d0ea674fe034b8700c', class: "zonos--elements" }, h("a", { key: '0c608a6f572eaabb93021d8618f2b1fd58b10188', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, h("slot", { key: '4fef15b277b11e062d1fc2cf8bc3e564ed5b2a57' }))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "zonos-link"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: '01a64861017098d6cdfa94b46ee675660147c45d', class: classes(['zonos--elements zonos--badge']), style: {
|
|
15
15
|
'--font-family': zonosStoreFontFamily(),
|
|
16
|
-
} }, h("div", { key: '
|
|
16
|
+
} }, h("div", { key: 'ef736fdfe0352ea201ecb34cbec695d90cfe4e5f', 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: '941793bf2ee10ad47bc5263f1bc2cbf6637d8bcd' }, h("slot", { key: '11da2ba6d11f451ecb71b1b2eb9ae29a009f8418' })))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "zonos-badge"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -66,12 +66,12 @@ export class ZonosButton {
|
|
|
66
66
|
const spinnerColor = backgroundActualColor && isDarkColor(backgroundActualColor)
|
|
67
67
|
? 'white'
|
|
68
68
|
: 'black';
|
|
69
|
-
return (h(Host, { key: '
|
|
69
|
+
return (h(Host, { key: '5f6e507c51fe1b02bbc14ff2bea2267ced9f8053', class: classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
|
|
70
70
|
'--background-color': overrideBackground,
|
|
71
71
|
'--border-radius': borderStyle,
|
|
72
72
|
'--color': color,
|
|
73
73
|
'--font-family': zonosStoreFontFamily(),
|
|
74
|
-
}) }, h("button", { key: '
|
|
74
|
+
}) }, h("button", { key: 'f464fef0f48e4e8fbfec844c8f4e3e6c525c70fd', class: classes([
|
|
75
75
|
this.hasIcon && 'has-icon',
|
|
76
76
|
this.hasContent && 'has-content',
|
|
77
77
|
this.noBackground && 'no-background',
|
|
@@ -84,7 +84,7 @@ export class ZonosButton {
|
|
|
84
84
|
overrideBackground &&
|
|
85
85
|
variant === 'standard' &&
|
|
86
86
|
'override-background',
|
|
87
|
-
]), disabled: disabled }, this.loading && (h("div", { key: '
|
|
87
|
+
]), 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)));
|
|
88
88
|
}
|
|
89
89
|
static get is() { return "zonos-button"; }
|
|
90
90
|
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: 'e45c790b27e1991c005156ad6e53b1c8754d4dc5', style: {
|
|
16
16
|
'--font-family': zonosStoreFontFamily(),
|
|
17
|
-
} }, h("div", { key: '
|
|
17
|
+
} }, 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: {
|
|
18
18
|
height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
|
|
19
19
|
padding: this.spacing,
|
|
20
|
-
} }, h("div", { key: '
|
|
20
|
+
} }, h("div", { key: '12a11f8192e9bdd95afd52a7b58ad99b6300c830' }, this.footerContent), h("h-stack", { key: '60cb2397fbe8f81a4248ab0581380ba125d08797', spacing: 8 }, this.footerActions))))));
|
|
21
21
|
}
|
|
22
22
|
static get is() { return "zonos-card"; }
|
|
23
23
|
static get encapsulation() { return "shadow"; }
|
|
@@ -27,14 +27,14 @@ export class ZonosCheckbox {
|
|
|
27
27
|
? 'var(--amino-gray-800)'
|
|
28
28
|
: 'var(--amino-gray-0)';
|
|
29
29
|
const borderStyle = getBorderRadius(this.borderStyle, '4px');
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '3cf37521b3f7dc267bdcd23f0c023cdff9f73048', class: classes(['zonos--elements zonos--checkbox']), style: {
|
|
31
31
|
'--background-color': backgroundColor,
|
|
32
32
|
'--border-radius': borderStyle,
|
|
33
33
|
'--font-family': zonosStoreFontFamily(),
|
|
34
34
|
'--size': `${this.size}px`,
|
|
35
|
-
} }, h("label", { key: '
|
|
35
|
+
} }, h("label", { key: '6771cc475d111684518492cbff6204a9cad5ec33', class: classes([this.isDisabled && 'disabled']) }, h("input", { key: '832a30d4aa546a5c7b5ab9e8437428aa08f20c17', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
|
|
36
36
|
this.checkboxSelected.emit(e.target.checked);
|
|
37
|
-
}, type: "checkbox" }), h("span", { key: '
|
|
37
|
+
}, 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)))));
|
|
38
38
|
}
|
|
39
39
|
static get is() { return "zonos-checkbox"; }
|
|
40
40
|
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: '419ccd73b029f2bbb92824f9398249d69cfd22aa', class: "zonos--elements", style: {
|
|
67
67
|
'--color': contrastLabelColor,
|
|
68
68
|
'--progress-percent': this.getTotalSuccessStep(),
|
|
69
|
-
} }, h("div", { key: '
|
|
69
|
+
} }, h("div", { key: '2dccf47e6211a6d25f2f8a4ece84c2759d06dc5a', 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: '8f70a570e14fe00d855081a5a00607cdbbe87f1b', class: "zonos--tab-progress" }, h("div", { key: '85dd90b7a571ee92035bc6a03ce1d97af85e1e0d', 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: '7e0d608d6bfe0ffa5b04b2a30fb27e956c7cb255', class: 'zonos--elements zonos--collapse', style: {
|
|
46
46
|
'--font-family': zonosStoreFontFamily(),
|
|
47
47
|
height: this.getElementHeight(),
|
|
48
|
-
} }, h("div", { key: '
|
|
48
|
+
} }, h("div", { key: '94f69d9e0e6c849a9b609567036ff5cfd2f8ce9c' }, h("iframe", { key: '66ad13c9e08d2ece856543af98c440fec4fd5975', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: '9d0f92e6d22f3e365bc3cec1e5d23325e045bc1a' }))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "zonos-collapse"; }
|
|
51
51
|
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: 'd7397a52b23af00e87b88f3869798ea17de7efa3', class: "zonos--elements", style: {
|
|
39
39
|
'--font-family': zonosStoreFontFamily(),
|
|
40
|
-
} }, h("div", { key: '
|
|
40
|
+
} }, 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 })))))))));
|
|
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: '493a7967c460956be2c539e887c839950aea92e9', class: "zonos--elements", style: {
|
|
12
12
|
'--font-family': zonosStoreFontFamily(),
|
|
13
|
-
} }, this.message && (h("zonos-card", { key: '
|
|
13
|
+
} }, 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 }))))));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "zonos-custom-message"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -47,7 +47,7 @@ export class ZonosDialog {
|
|
|
47
47
|
document.body.style.overflow = 'auto';
|
|
48
48
|
}
|
|
49
49
|
const borderStyle = getBorderRadius(this.borderStyle);
|
|
50
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(Host, { key: 'c97c24de2950d418d1aec4738ea6152e24f8049a', class: classes([
|
|
51
51
|
'zonos--elements',
|
|
52
52
|
this.open && 'open',
|
|
53
53
|
this.isLoading && 'is-loading',
|
|
@@ -58,10 +58,10 @@ export class ZonosDialog {
|
|
|
58
58
|
'--font-family': zonosStoreFontFamily(),
|
|
59
59
|
'--height': this.height || 'initial',
|
|
60
60
|
'--width': this.width,
|
|
61
|
-
} }, h("div", { key: '
|
|
61
|
+
} }, 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([
|
|
62
62
|
'zonos--body',
|
|
63
63
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
64
|
-
]) }, h("slot", { key: '
|
|
64
|
+
]) }, h("slot", { key: 'ae388c5f9d7a250e0f829313acc561aea9ba1468' })), h("slot", { key: '202816af31727db4a92af8f63daeb34992ac5504', name: "dialog-footer" })))));
|
|
65
65
|
}
|
|
66
66
|
static get is() { return "zonos-dialog"; }
|
|
67
67
|
static get encapsulation() { return "shadow"; }
|