@zonos/elements 1.3.15-alpha.0 → 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-b1c89065.js → cart-1b1d39af.js} +131 -63
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{sendErrorLog-f7172707.js → sendErrorLog-29e50f7e.js} +1 -1
- package/dist/cjs/{submitGtag-219f4e54.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 +89 -68
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -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-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.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/stripe.js +4 -1
- 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 +131 -63
- 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-payment2.js +18 -17
- package/dist/components/zonos-checkout-progress-tabs2.js +3 -3
- package/dist/components/zonos-collapse2.js +2 -2
- package/dist/components/zonos-component.js +1 -1
- package/dist/components/zonos-controller.js +1 -1
- 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 +3 -3
- package/dist/components/zonos-language-select2.js +2 -2
- package/dist/components/zonos-link-authentication2.js +1 -1
- 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 +24 -23
- package/dist/components/zonos-tooltip2.js +2 -2
- package/dist/components/zonos-v-stack2.js +2 -2
- package/dist/esm/{cart-1b0aaea9.js → cart-10bcd2e0.js} +131 -63
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{sendErrorLog-4e7a8e6e.js → sendErrorLog-8642e94a.js} +1 -1
- package/dist/esm/{submitGtag-ce1c25e6.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 +89 -68
- package/dist/esm/zonos-checkout.entry.js +3 -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-ce1c25e6.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/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-81df5a1b.entry.js → p-056a453e.entry.js} +1 -1
- package/dist/zonos-elements/{p-85c2b823.entry.js → p-0fc08944.entry.js} +1 -1
- package/dist/zonos-elements/{p-30d04ce6.system.entry.js → p-19f0392f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c93c8ecc.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-393a8412.system.entry.js → p-262b8e1e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4fbc3ea7.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-ef8affe4.js → p-33abdb30.js} +1 -1
- package/dist/zonos-elements/{p-e412387c.system.entry.js → p-34565753.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d8c5b848.entry.js → p-440eb12c.entry.js} +1 -1
- package/dist/zonos-elements/{p-ae707165.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-b5b09a07.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-fe83fc20.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-3921d516.entry.js → p-6adbe3e4.entry.js} +1 -1
- package/dist/zonos-elements/p-6f5761e8.js +1 -0
- package/dist/zonos-elements/{p-94226f90.system.entry.js → p-6fb15797.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ac1bccb6.system.entry.js → p-7411d43e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9ee65a0b.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-78983c23.entry.js → p-8126011d.entry.js} +1 -1
- package/dist/zonos-elements/{p-c5bc49b5.system.entry.js → p-8b44b059.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6847b4e8.system.js → p-8b44e558.system.js} +1 -1
- package/dist/zonos-elements/{p-def5023c.entry.js → p-8d1f81e1.entry.js} +1 -1
- package/dist/zonos-elements/{p-6a429588.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-6fd110c3.entry.js → p-b4c3dcda.entry.js} +1 -1
- 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-1b0aaea9.js +0 -1
- package/dist/esm-es5/sendErrorLog-4e7a8e6e.js +0 -1
- package/dist/zonos-elements/p-5247c5ab.entry.js +0 -1
- package/dist/zonos-elements/p-659e81b2.js +0 -1
- package/dist/zonos-elements/p-86867593.system.js +0 -1
- package/dist/zonos-elements/p-8cfec6b6.system.entry.js +0 -1
- package/dist/zonos-elements/p-f28970e2.system.js +0 -1
|
@@ -3,9 +3,9 @@
|
|
|
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
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
8
|
-
const sendErrorLog = require('./sendErrorLog-
|
|
8
|
+
const sendErrorLog = require('./sendErrorLog-29e50f7e.js');
|
|
9
9
|
const classes = require('./classes-b7918f56.js');
|
|
10
10
|
const getBorderRadius = require('./getBorderRadius-c8cc2bb3.js');
|
|
11
11
|
const isDarkColor = require('./isDarkColor-f5473002.js');
|
|
@@ -224,7 +224,7 @@ const ZonosAddress = class {
|
|
|
224
224
|
}
|
|
225
225
|
render() {
|
|
226
226
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
227
|
-
return (index.h(index.Host, { key: '
|
|
227
|
+
return (index.h(index.Host, { key: '549fc102d06aa0fd138ca03afb2e6fc691108ac2', class: "zonos--address zonos--elements" }, index.h("zonos-text", { key: '6e8853dccc44714d21c9c0417d068dab9f10bd2e', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("div", { key: '2c28a21f87720427b9a98d0d6e2fa638232855dc', class: "zonos--address-component" }), this.invalidCharacterList && (index.h("zonos-banner", { key: '6fc1f7445d51531c8f4009d1f2f82831a9351c4c', bannerTitle: cart.translate('Please resolve the following errors:'), intent: "error" }, Object.keys(this.invalidCharacterList).map(fieldName => (index.h("zonos-text", null, `- ${cart.translate(mappedFields[fieldName])}: ${cart.translate('only supports Latin characters (A-Z, a-z)')}`)))))));
|
|
228
228
|
}
|
|
229
229
|
get el() { return index.getElement(this); }
|
|
230
230
|
static get watchers() { return {
|
|
@@ -272,14 +272,14 @@ const ZonosCheckbox = class {
|
|
|
272
272
|
? 'var(--amino-gray-800)'
|
|
273
273
|
: 'var(--amino-gray-0)';
|
|
274
274
|
const borderStyle = getBorderRadius.getBorderRadius(this.borderStyle, '4px');
|
|
275
|
-
return (index.h(index.Host, { key: '
|
|
275
|
+
return (index.h(index.Host, { key: '3cf37521b3f7dc267bdcd23f0c023cdff9f73048', class: classes.classes(['zonos--elements zonos--checkbox']), style: {
|
|
276
276
|
'--background-color': backgroundColor,
|
|
277
277
|
'--border-radius': borderStyle,
|
|
278
278
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
279
279
|
'--size': `${this.size}px`,
|
|
280
|
-
} }, index.h("label", { key: '
|
|
280
|
+
} }, index.h("label", { key: '6771cc475d111684518492cbff6204a9cad5ec33', class: classes.classes([this.isDisabled && 'disabled']) }, index.h("input", { key: '832a30d4aa546a5c7b5ab9e8437428aa08f20c17', checked: this.isChecked, disabled: this.isDisabled, hidden: true, onChange: e => {
|
|
281
281
|
this.checkboxSelected.emit(e.target.checked);
|
|
282
|
-
}, type: "checkbox" }), index.h("span", { key: '
|
|
282
|
+
}, type: "checkbox" }), index.h("span", { key: '9fe422aee5af96df40176d7d96006c578fe9273f', class: "checkmark-container" }, index.h("svg", { key: '7097c01f50d8cca92ee1bb531e0ac316cfca1036', class: "checkmark", color: checkmarkColor, fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, index.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 && (index.h("zonos-text", { key: 'f1c02b4377be2e48936a6e32049117b7a81a292b', size: this.fontSize }, this.label)))));
|
|
283
283
|
}
|
|
284
284
|
};
|
|
285
285
|
ZonosCheckbox.style = ZonosCheckboxStyle0;
|
|
@@ -329,10 +329,10 @@ const ZonosCollapse = class {
|
|
|
329
329
|
// set overflow to hidden to prevent content from showing when collapsed
|
|
330
330
|
this.el.style.overflow = 'hidden';
|
|
331
331
|
}
|
|
332
|
-
return (index.h(index.Host, { key: '
|
|
332
|
+
return (index.h(index.Host, { key: '7e0d608d6bfe0ffa5b04b2a30fb27e956c7cb255', class: 'zonos--elements zonos--collapse', style: {
|
|
333
333
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
334
334
|
height: this.getElementHeight(),
|
|
335
|
-
} }, index.h("div", { key: '
|
|
335
|
+
} }, index.h("div", { key: '94f69d9e0e6c849a9b609567036ff5cfd2f8ce9c' }, index.h("iframe", { key: '66ad13c9e08d2ece856543af98c440fec4fd5975', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), index.h("slot", { key: '9d0f92e6d22f3e365bc3cec1e5d23325e045bc1a' }))));
|
|
336
336
|
}
|
|
337
337
|
get el() { return index.getElement(this); }
|
|
338
338
|
};
|
|
@@ -373,7 +373,7 @@ const ZonosLinkAuthentication = class {
|
|
|
373
373
|
}
|
|
374
374
|
render() {
|
|
375
375
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
376
|
-
return (index.h(index.Host, { key: '
|
|
376
|
+
return (index.h(index.Host, { key: '31c41fa819b53a3de0b772f2a808bbc2a5954f0b', class: "zonos--link-authentication zonos--elements" }, index.h("zonos-text", { key: '79168635348479523ac726458ac4fdc5c791f6a7', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), index.h("div", { key: '1eb99df8b3ca8d92b0bdbbd1ef8fd5f561294904', class: "zonos--link-authentication-component" })));
|
|
377
377
|
}
|
|
378
378
|
get el() { return index.getElement(this); }
|
|
379
379
|
static get watchers() { return {
|
|
@@ -20,16 +20,16 @@ const ZonosBadge = class {
|
|
|
20
20
|
this.rounded = false;
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (index.h(index.Host, { key: '
|
|
23
|
+
return (index.h(index.Host, { key: '01a64861017098d6cdfa94b46ee675660147c45d', class: classes.classes(['zonos--elements zonos--badge']), style: {
|
|
24
24
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
25
|
-
} }, index.h("div", { key: '
|
|
25
|
+
} }, index.h("div", { key: 'ef736fdfe0352ea201ecb34cbec695d90cfe4e5f', class: classes.classes([
|
|
26
26
|
'zonos--badge-content',
|
|
27
27
|
this.badgeColor,
|
|
28
28
|
this.rounded && 'rounded',
|
|
29
29
|
this.iconRight && 'icon-right',
|
|
30
30
|
this.size,
|
|
31
31
|
this.bold && 'bold',
|
|
32
|
-
]) }, this.icon, index.h("zonos-text", { key: '
|
|
32
|
+
]) }, this.icon, index.h("zonos-text", { key: '941793bf2ee10ad47bc5263f1bc2cbf6637d8bcd' }, index.h("slot", { key: '11da2ba6d11f451ecb71b1b2eb9ae29a009f8418' })))));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
ZonosBadge.style = ZonosBadgeStyle0;
|
|
@@ -45,10 +45,10 @@ const ZonosTooltip = class {
|
|
|
45
45
|
this.showTooltip = false;
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (index.h(index.Host, { key: '
|
|
48
|
+
return (index.h(index.Host, { key: '20c737a7dd6aae9b2b7aa1a293dd891cc618dfbb', class: "zonos--elements" }, index.h("div", { key: '09aefcda610b6536a10b0a325c2b460d2f5a2976', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, index.h("slot", { key: '4191e0e3297b1c5ff625ee965773d026a970db68' }), index.h("div", { key: 'f4a4455f57ad9e03a6bf3d4309999480caa077f4', class: classes.classes([
|
|
49
49
|
this.showTooltip && 'zonos--show-tooltip',
|
|
50
50
|
'zonos--tooltip-content',
|
|
51
|
-
]) }, index.h("zonos-text", { key: '
|
|
51
|
+
]) }, index.h("zonos-text", { key: '36d1afd592d1e83cf325bb64bef2ff94cd6f5adb', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), index.h("zonos-text", { key: '8e9562f0cb35a53e32dd39cabf22cc26a1e07d47', size: "xs", textColor: "gray-0" }, this.subtitle)))));
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
ZonosTooltip.style = ZonosTooltipStyle0;
|
|
@@ -100,12 +100,12 @@ const ZonosButton = class {
|
|
|
100
100
|
const spinnerColor = backgroundActualColor && isDarkColor.isDarkColor(backgroundActualColor)
|
|
101
101
|
? 'white'
|
|
102
102
|
: 'black';
|
|
103
|
-
return (index.h(index.Host, { key: '
|
|
103
|
+
return (index.h(index.Host, { key: '5f6e507c51fe1b02bbc14ff2bea2267ced9f8053', class: classes.classes(['zonos--elements']), "data-theme": this.theme || buttonTheme, disabled: disabled, style: styles({
|
|
104
104
|
'--background-color': overrideBackground,
|
|
105
105
|
'--border-radius': borderStyle,
|
|
106
106
|
'--color': color,
|
|
107
107
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
108
|
-
}) }, index.h("button", { key: '
|
|
108
|
+
}) }, index.h("button", { key: 'f464fef0f48e4e8fbfec844c8f4e3e6c525c70fd', class: classes.classes([
|
|
109
109
|
this.hasIcon && 'has-icon',
|
|
110
110
|
this.hasContent && 'has-content',
|
|
111
111
|
this.noBackground && 'no-background',
|
|
@@ -118,7 +118,7 @@ const ZonosButton = class {
|
|
|
118
118
|
overrideBackground &&
|
|
119
119
|
variant === 'standard' &&
|
|
120
120
|
'override-background',
|
|
121
|
-
]), disabled: disabled }, this.loading && (index.h("div", { key: '
|
|
121
|
+
]), disabled: disabled }, this.loading && (index.h("div", { key: '9fafd9c3c4764df1b9e268f6784b75fdfe21f9a7', class: "zonos--spinner-wrapper" }, index.h("zonos-spinner", { key: '5a2acbea7bbf41d76ce262f073f78e9f966dddc9', size: 16, spinnerColor: spinnerColor }))), !this.loading && !this.iconRight && this.icon, index.h("slot", { key: '29982e7b98f8e9940f20916513434b5b1125c93a', onSlotchange: this.handleSlotChange }), !this.loading && this.iconRight && this.icon)));
|
|
122
122
|
}
|
|
123
123
|
get ele() { return index.getElement(this); }
|
|
124
124
|
static get watchers() { return {
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-3b4816ef.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const cart = require('./cart-
|
|
8
|
+
const cart = require('./cart-1b1d39af.js');
|
|
9
9
|
const ILanguage = require('./ILanguage-d247b45b.js');
|
|
10
10
|
require('./isDarkColor-f5473002.js');
|
|
11
11
|
require('./getBorderRadius-c8cc2bb3.js');
|
|
@@ -24,12 +24,12 @@ const ZonosCard = class {
|
|
|
24
24
|
this.spacing = '24px';
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return (index.h(index.Host, { key: '
|
|
27
|
+
return (index.h(index.Host, { key: 'e45c790b27e1991c005156ad6e53b1c8754d4dc5', style: {
|
|
28
28
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
29
|
-
} }, index.h("div", { key: '
|
|
29
|
+
} }, index.h("div", { key: 'efb85ca20d87be834dfe8dd0a80ba590e34480f3', class: classes.classes(['styled-card']), style: { padding: this.spacing } }, this.label && (index.h("header", { key: 'edf7aa372e011fc76b14628b7a850fbb4577040e', class: "card-header", style: { padding: this.spacing } }, index.h("zonos-text", { key: 'ed7202d01519374129dc9f20f4c0914f2af311f8', type: "subheader" }, this.label), index.h("h-stack", { key: 'f3d041b3a96cfd5df4395efb7cbc958fb4ff3140', spacing: 8 }, this.actions))), index.h("slot", { key: '5957af957d0f2b1d9974dee154d050089dee574b' }), (this.footerActions || this.footerContent) && (index.h("footer", { key: '723c690483ebbe294c132fe39482180051bb7b8e', class: "card-footer", style: {
|
|
30
30
|
height: this.footerHeight ? `${this.footerHeight}px` : 'auto',
|
|
31
31
|
padding: this.spacing,
|
|
32
|
-
} }, index.h("div", { key: '
|
|
32
|
+
} }, index.h("div", { key: '12a11f8192e9bdd95afd52a7b58ad99b6300c830' }, this.footerContent), index.h("h-stack", { key: '60cb2397fbe8f81a4248ab0581380ba125d08797', spacing: 8 }, this.footerActions))))));
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
ZonosCard.style = ZonosCardStyle0;
|
|
@@ -55,9 +55,9 @@ const ZonosLanguageSelect = class {
|
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
57
|
const { selectedLocale } = cart.localizationStore;
|
|
58
|
-
return (index.h(index.Host, { key: '
|
|
58
|
+
return (index.h(index.Host, { key: '5ccbe14cb452d09ae6bc2fb607f745397d94f55e', class: "zonos--elements", style: {
|
|
59
59
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
60
|
-
} }, index.h("div", { key: '
|
|
60
|
+
} }, index.h("div", { key: '9679284a648e7fa09bbdcba7f2d7b6665134772b', class: "zonos--language-select" }, index.h("zonos-select-dialog-header", { key: '15f1b2497a2808c2df25611ec33d2f4dc4ba8586', handleOnClose: () => this.handleOnClose(), label: cart.translate('Select a language') }), index.h("div", { key: 'f072ae8c34af9d218f8975cbead1123a1b449e62', class: "zonos--language-select-content" }, ILanguage.languages.map(language => (index.h("button", { class: "zonos--language-select-button", onClick: () => this.languageSelected(language.code) }, index.h("zonos-text", { textColor: "gray-800" }, language.translatedLabel), language.code === selectedLocale && (index.h("zonos-icon", { content: GreenCheckDuotoneIcon, size: 16 })))))))));
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
ZonosLanguageSelect.style = ZonosLanguageSelectStyle0;
|
|
@@ -3,11 +3,11 @@
|
|
|
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
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
8
|
-
const submitGtag = require('./submitGtag-
|
|
8
|
+
const submitGtag = require('./submitGtag-ab287a34.js');
|
|
9
9
|
const getBorderRadius = require('./getBorderRadius-c8cc2bb3.js');
|
|
10
|
-
const sendErrorLog = require('./sendErrorLog-
|
|
10
|
+
const sendErrorLog = require('./sendErrorLog-29e50f7e.js');
|
|
11
11
|
const classes = require('./classes-b7918f56.js');
|
|
12
12
|
const ILanguage = require('./ILanguage-d247b45b.js');
|
|
13
13
|
const isDarkColor = require('./isDarkColor-f5473002.js');
|
|
@@ -304,47 +304,50 @@ const ZonosCheckoutFooter = class {
|
|
|
304
304
|
};
|
|
305
305
|
ZonosCheckoutFooter.style = ZonosCheckoutFooterStyle0;
|
|
306
306
|
|
|
307
|
-
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%}";
|
|
307
|
+
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%}";
|
|
308
308
|
const ZonosCheckoutPaymentStyle0 = zonosCheckoutPaymentCss;
|
|
309
309
|
|
|
310
310
|
const ZonosCheckoutPayment = class {
|
|
311
311
|
constructor(hostRef) {
|
|
312
312
|
index.registerInstance(this, hostRef);
|
|
313
313
|
this.continueClicked = index.createEvent(this, "continueClicked", 7);
|
|
314
|
+
this.handleValidate = () => {
|
|
315
|
+
var _a;
|
|
316
|
+
return !!((_a = cart.stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
317
|
+
};
|
|
314
318
|
/**
|
|
315
319
|
* handler for continue button click
|
|
316
320
|
*/
|
|
317
321
|
this.continueClickHandler = () => {
|
|
322
|
+
if (!this.handleValidate()) {
|
|
323
|
+
this.showErrorBanner = true;
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
318
326
|
this.continueClicked.emit();
|
|
327
|
+
// submit google tag when the form is complete
|
|
328
|
+
submitGtag.submitGtag('zonos-checkout-payment-info');
|
|
319
329
|
};
|
|
320
330
|
this.paymentError = false;
|
|
321
331
|
this.submitBtnType = undefined;
|
|
322
332
|
this.continueLoading = false;
|
|
323
333
|
this.submitBtnColor = undefined;
|
|
324
|
-
this.
|
|
325
|
-
}
|
|
326
|
-
watchFormComplete() {
|
|
327
|
-
if (!this.disabled) {
|
|
328
|
-
// submit google tag when the form is complete
|
|
329
|
-
submitGtag.submitGtag('zonos-checkout-payment-info');
|
|
330
|
-
}
|
|
334
|
+
this.showErrorBanner = false;
|
|
331
335
|
}
|
|
332
336
|
render() {
|
|
333
|
-
var _a;
|
|
334
337
|
if (!cart.stripeStore.stripeElements) {
|
|
335
338
|
return null;
|
|
336
339
|
}
|
|
337
|
-
|
|
338
|
-
|
|
340
|
+
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
341
|
+
if (this.showErrorBanner) {
|
|
342
|
+
this.showErrorBanner = !this.handleValidate();
|
|
343
|
+
}
|
|
344
|
+
return (index.h(index.Host, { class: "zonos--checkout-payment zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Payment method')), this.showErrorBanner && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, cart.translate('Missing required fields. Make sure all fields are completed.'))), this.paymentError && (index.h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, cart.translate("We couldn't complete your payment. Please verify the payment details and try again."))), index.h("zonos-payment", null), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
339
345
|
// use primary type when on mobile mode
|
|
340
346
|
variant: this.submitBtnType }, "Pay", ' ', formatCurrency({
|
|
341
347
|
amount: cart.cartStore.total,
|
|
342
348
|
currency: cart.cartStore.currency,
|
|
343
349
|
}))))));
|
|
344
350
|
}
|
|
345
|
-
static get watchers() { return {
|
|
346
|
-
"disabled": ["watchFormComplete"]
|
|
347
|
-
}; }
|
|
348
351
|
};
|
|
349
352
|
ZonosCheckoutPayment.style = ZonosCheckoutPaymentStyle0;
|
|
350
353
|
|
|
@@ -428,24 +431,24 @@ const ZonosCheckoutProgressTabs = class {
|
|
|
428
431
|
color: labelSelectedColor,
|
|
429
432
|
})
|
|
430
433
|
: labelSelectedColor;
|
|
431
|
-
return (index.h(index.Host, { key: '
|
|
434
|
+
return (index.h(index.Host, { key: '419ccd73b029f2bbb92824f9398249d69cfd22aa', class: "zonos--elements", style: {
|
|
432
435
|
'--color': contrastLabelColor,
|
|
433
436
|
'--progress-percent': this.getTotalSuccessStep(),
|
|
434
|
-
} }, index.h("div", { key: '
|
|
437
|
+
} }, index.h("div", { key: '2dccf47e6211a6d25f2f8a4ece84c2759d06dc5a', class: "zonos--tab-wrapper" }, Object.values(cart.cartStore.tabItems).map((tab, index$1) => {
|
|
435
438
|
const isSelected = tab.value === selectedStep;
|
|
436
439
|
return (index.h("button", { class: classes.classes([
|
|
437
440
|
'zonos--tab-item',
|
|
438
441
|
tab.value === selectedStep && 'selected',
|
|
439
442
|
tab.isDone && 'done',
|
|
440
443
|
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cart.cartStore.step = tab.value) }, index.h("div", { class: "zonos--tab-index" }, index.h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, index$1 + 1), index.h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1200' })), index.h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1200', type: "label" }, cart.translate(tab.label))));
|
|
441
|
-
})), index.h("div", { key: '
|
|
444
|
+
})), index.h("div", { key: '8f70a570e14fe00d855081a5a00607cdbbe87f1b', class: "zonos--tab-progress" }, index.h("div", { key: '85dd90b7a571ee92035bc6a03ce1d97af85e1e0d', class: "zonos--progress-bar-fill" }))));
|
|
442
445
|
}
|
|
443
446
|
static get assetsDirs() { return ["assets"]; }
|
|
444
447
|
get ele() { return index.getElement(this); }
|
|
445
448
|
};
|
|
446
449
|
ZonosCheckoutProgressTabs.style = ZonosCheckoutProgressTabsStyle0;
|
|
447
450
|
|
|
448
|
-
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%}";
|
|
451
|
+
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%}";
|
|
449
452
|
const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
|
|
450
453
|
|
|
451
454
|
const ZonosCustomerInfo = class {
|
|
@@ -467,49 +470,64 @@ const ZonosCustomerInfo = class {
|
|
|
467
470
|
}
|
|
468
471
|
return;
|
|
469
472
|
}
|
|
473
|
+
if (!this.handleValidate()) {
|
|
474
|
+
// scroll to the top zonos-banner
|
|
475
|
+
setTimeout(() => {
|
|
476
|
+
var _a;
|
|
477
|
+
(_a = this.el
|
|
478
|
+
.querySelector('zonos-banner.zonos--error-banner')) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
479
|
+
behavior: 'smooth',
|
|
480
|
+
block: 'center',
|
|
481
|
+
});
|
|
482
|
+
}, 50);
|
|
483
|
+
this.showErrorBanner = true;
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
this.showErrorBanner = false;
|
|
470
487
|
this.continueClicked.emit();
|
|
488
|
+
// submit google tag when the form is complete
|
|
489
|
+
submitGtag.submitGtag('zonos-checkout-customer-info');
|
|
490
|
+
void submitGtag.trackConversionEvent('checkout_customerInfoCompleted');
|
|
491
|
+
};
|
|
492
|
+
this.handleValidate = () => {
|
|
493
|
+
const stripeShippingAddressEventData = cart.stripeStore.stripeAddressEventData;
|
|
494
|
+
const stripeBillingAddressEventData = cart.stripeStore.stripeBillingAddressEventData;
|
|
495
|
+
const stripeLinkEventData = cart.stripeStore.stripeLinkEventData;
|
|
496
|
+
// 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
|
|
497
|
+
const isValidBilling = cart.stripeStore.stripeShippingSameAsBilling
|
|
498
|
+
? !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete)
|
|
499
|
+
: !!(stripeBillingAddressEventData === null || stripeBillingAddressEventData === void 0 ? void 0 : stripeBillingAddressEventData.complete);
|
|
500
|
+
const isValidShipping = !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete);
|
|
501
|
+
const isValidLink = !!(stripeLinkEventData === null || stripeLinkEventData === void 0 ? void 0 : stripeLinkEventData.complete);
|
|
502
|
+
if (!isValidBilling || !isValidShipping || !isValidLink) {
|
|
503
|
+
return false;
|
|
504
|
+
}
|
|
505
|
+
return true;
|
|
471
506
|
};
|
|
472
507
|
this.continueLoading = false;
|
|
473
508
|
this.submitBtnType = undefined;
|
|
474
509
|
this.submitBtnColor = undefined;
|
|
475
510
|
this.defaultAddress = null;
|
|
476
|
-
this.
|
|
511
|
+
this.showErrorBanner = false;
|
|
477
512
|
this.hasInvalidShippingCharacters = false;
|
|
478
513
|
this.hasInvalidBillingCharacters = false;
|
|
479
514
|
}
|
|
480
|
-
watchFormComplete() {
|
|
481
|
-
if (!this.disabled) {
|
|
482
|
-
// submit google tag when the form is complete
|
|
483
|
-
submitGtag.submitGtag('zonos-checkout-customer-info');
|
|
484
|
-
void submitGtag.trackConversionEvent('checkout_customerInfoCompleted');
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
515
|
render() {
|
|
488
516
|
if (!cart.stripeStore.stripeElements) {
|
|
489
517
|
return null;
|
|
490
518
|
}
|
|
491
|
-
const stripeShippingAddressEventData = cart.stripeStore.stripeAddressEventData;
|
|
492
|
-
const stripeBillingAddressEventData = cart.stripeStore.stripeBillingAddressEventData;
|
|
493
|
-
const stripeLinkEventData = cart.stripeStore.stripeLinkEventData;
|
|
494
|
-
// 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
|
|
495
|
-
const isValidBilling = cart.stripeStore.stripeShippingSameAsBilling
|
|
496
|
-
? !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete)
|
|
497
|
-
: !!(stripeBillingAddressEventData === null || stripeBillingAddressEventData === void 0 ? void 0 : stripeBillingAddressEventData.complete);
|
|
498
|
-
const isValidShipping = !!(stripeShippingAddressEventData === null || stripeShippingAddressEventData === void 0 ? void 0 : stripeShippingAddressEventData.complete);
|
|
499
|
-
const isValidLink = !!(stripeLinkEventData === null || stripeLinkEventData === void 0 ? void 0 : stripeLinkEventData.complete);
|
|
500
|
-
// make sure data is valid
|
|
501
|
-
this.disabled = !isValidBilling || !isValidShipping || !isValidLink;
|
|
502
519
|
const showBilling = !cart.stripeStore.stripeShippingSameAsBilling;
|
|
503
|
-
|
|
520
|
+
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
521
|
+
if (this.showErrorBanner) {
|
|
522
|
+
this.showErrorBanner = !this.handleValidate();
|
|
523
|
+
}
|
|
524
|
+
return (index.h(index.Host, { class: "zonos--customer-info zonos--elements" }, index.h("div", { class: "zonos--group" }, index.h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Customer information')), this.showErrorBanner && (index.h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, cart.translate('Missing required fields. Make sure all fields are completed.'))), index.h("zonos-link-authentication", { titleText: cart.translate('Contact') }), index.h("zonos-address", { defaultAddress: this.defaultAddress, onInvalidCharacters: e => (this.hasInvalidShippingCharacters = e.detail), titleText: cart.translate('Address'), type: "shipping" }), index.h("zonos-checkbox", { isChecked: cart.stripeStore.stripeShippingSameAsBilling, label: cart.translate('Shipping address same as billing'), onCheckboxSelected: e => {
|
|
504
525
|
cart.stripeStore.stripeShippingSameAsBilling = e.detail;
|
|
505
|
-
} }), index.h("zonos-collapse", { collapsed: !showBilling }, index.h("zonos-address", { defaultAddress: this.defaultAddress, onInvalidCharacters: e => (this.hasInvalidBillingCharacters = e.detail), titleText: cart.translate('Billing address'), type: "billing" })), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor,
|
|
526
|
+
} }), index.h("zonos-collapse", { collapsed: !showBilling }, index.h("zonos-address", { defaultAddress: this.defaultAddress, onInvalidCharacters: e => (this.hasInvalidBillingCharacters = e.detail), titleText: cart.translate('Billing address'), type: "billing" })), index.h("div", { class: "zonos--group-btn" }, index.h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
506
527
|
// use primary type when on mobile mode
|
|
507
528
|
variant: this.submitBtnType }, cart.translate('Continue to shipping'))))));
|
|
508
529
|
}
|
|
509
530
|
get el() { return index.getElement(this); }
|
|
510
|
-
static get watchers() { return {
|
|
511
|
-
"disabled": ["watchFormComplete"]
|
|
512
|
-
}; }
|
|
513
531
|
};
|
|
514
532
|
ZonosCustomerInfo.style = ZonosCustomerInfoStyle0;
|
|
515
533
|
|
|
@@ -562,7 +580,7 @@ const ZonosDialog = class {
|
|
|
562
580
|
document.body.style.overflow = 'auto';
|
|
563
581
|
}
|
|
564
582
|
const borderStyle = getBorderRadius.getBorderRadius(this.borderStyle);
|
|
565
|
-
return (index.h(index.Host, { key: '
|
|
583
|
+
return (index.h(index.Host, { key: 'c97c24de2950d418d1aec4738ea6152e24f8049a', class: classes.classes([
|
|
566
584
|
'zonos--elements',
|
|
567
585
|
this.open && 'open',
|
|
568
586
|
this.isLoading && 'is-loading',
|
|
@@ -573,10 +591,10 @@ const ZonosDialog = class {
|
|
|
573
591
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
574
592
|
'--height': this.height || 'initial',
|
|
575
593
|
'--width': this.width,
|
|
576
|
-
} }, index.h("div", { key: '
|
|
594
|
+
} }, index.h("div", { key: 'd8053eb085edd344a5c667123515932a759ee4df', class: "zonos--backdrop" }), index.h("div", { key: '15f11f85257160698f7850495f3d8866dfd46346', "aria-hidden": "true", class: "zonos--dialog-layout", onClick: this.clickOutsideDialogHandler }, index.h("div", { key: '6cb8ab8555511cfdbb502ecdb7b796894ff9b0df', class: "zonos--dialog" }, this.isLoading && (index.h("div", { key: '7dc1c154cda561aca93c0b3f09bf1c8f9d01446b', class: "zonos--loading" }, index.h("zonos-spinner", { key: '71701888d4320b35f43934a425a6e44653c84e62', size: 30 }))), (this.headerText || !this.noCloseButton) && (index.h("div", { key: '5e9ea325a80cefc212c4375dec076d4a703d3bbb', class: "zonos--header" }, this.headerText && (index.h("h3", { key: '6372813c8c79c0c4a09cca96bf85749ce32a43fb', class: "zonos--header-text" }, this.headerText)), !this.noCloseButton && (index.h("zonos-button", { key: '00d2f9393acec2da88794977cf6cfd4308fffb31', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close dialog", content: RemoveIcon }), noBackground: true, onClick: this.closeButtonHandler })))), index.h("div", { key: '71177d6272533d34143f50d2ebce277b3cb6a6db', class: classes.classes([
|
|
577
595
|
'zonos--body',
|
|
578
596
|
this.noBodyPadding && 'zonos--no-body-padding',
|
|
579
|
-
]) }, index.h("slot", { key: '
|
|
597
|
+
]) }, index.h("slot", { key: 'ae388c5f9d7a250e0f829313acc561aea9ba1468' })), index.h("slot", { key: '202816af31727db4a92af8f63daeb34992ac5504', name: "dialog-footer" })))));
|
|
580
598
|
}
|
|
581
599
|
static get assetsDirs() { return ["assets"]; }
|
|
582
600
|
};
|
|
@@ -630,7 +648,7 @@ const ZonosReview = class {
|
|
|
630
648
|
};
|
|
631
649
|
ZonosReview.style = ZonosReviewStyle0;
|
|
632
650
|
|
|
633
|
-
const zonosShippingCss = ".sc-zonos-shipping-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{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-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";
|
|
651
|
+
const zonosShippingCss = ".sc-zonos-shipping-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-shipping-h *.sc-zonos-shipping{font-family:var(--font-family, Inter), Inter}.sc-zonos-shipping-h img.sc-zonos-shipping{max-width:100%}.sc-zonos-shipping-h dl.sc-zonos-shipping,.sc-zonos-shipping-h dd.sc-zonos-shipping,.sc-zonos-shipping-h h1.sc-zonos-shipping,.sc-zonos-shipping-h h2.sc-zonos-shipping,.sc-zonos-shipping-h h3.sc-zonos-shipping,.sc-zonos-shipping-h h4.sc-zonos-shipping,.sc-zonos-shipping-h h5.sc-zonos-shipping,.sc-zonos-shipping-h h6.sc-zonos-shipping,.sc-zonos-shipping-h hr.sc-zonos-shipping,.sc-zonos-shipping-h figure.sc-zonos-shipping,.sc-zonos-shipping-h p.sc-zonos-shipping,.sc-zonos-shipping-h pre.sc-zonos-shipping{margin:0}.sc-zonos-shipping-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-shipping-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-shipping-h .zonos--title.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--shipping-method-title.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h .zonos-shipping-rich-radio.sc-zonos-shipping{margin-bottom:var(--amino-space-24)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping{margin-bottom:var(--amino-space-20);overflow:auto;padding:5px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar{width:10px}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-track{background:var(--amino-gray-50)}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-shipping-h .zonos--group.sc-zonos-shipping::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-shipping-h .zonos--error-banner.sc-zonos-shipping{margin-bottom:var(--amino-space-16)}.sc-zonos-shipping-h zonos-button.sc-zonos-shipping{-webkit-box-shadow:0 0 1px 0 var(--amino-gray-600);box-shadow:0 0 1px 0 var(--amino-gray-600)}.sc-zonos-shipping-h .zonos--group-btn.sc-zonos-shipping{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-shipping-h .zonos--group-btn.sc-zonos-shipping zonos-button.sc-zonos-shipping{width:100%}.sc-zonos-shipping-h zonos-banner.sc-zonos-shipping{margin-top:var(--amino-space-24)}";
|
|
634
652
|
const ZonosShippingStyle0 = zonosShippingCss;
|
|
635
653
|
|
|
636
654
|
const ZonosShipping = class {
|
|
@@ -654,13 +672,27 @@ const ZonosShipping = class {
|
|
|
654
672
|
return;
|
|
655
673
|
}
|
|
656
674
|
this.isSelecting = false;
|
|
657
|
-
|
|
675
|
+
};
|
|
676
|
+
this.handleValidate = () => {
|
|
677
|
+
return !!this.selectedShippingMethod;
|
|
658
678
|
};
|
|
659
679
|
/**
|
|
660
680
|
* handler for continue button click
|
|
661
681
|
*/
|
|
662
682
|
this.continueClickHandler = () => {
|
|
683
|
+
var _a;
|
|
684
|
+
// show error banner if the form is not complete
|
|
685
|
+
if (!this.handleValidate()) {
|
|
686
|
+
this.showErrorBanner = true;
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
this.showErrorBanner = false;
|
|
663
690
|
this.continueClicked.emit();
|
|
691
|
+
// submit google tag when the form is complete
|
|
692
|
+
submitGtag.submitGtag('zonos-checkout-shipping-info');
|
|
693
|
+
void submitGtag.trackConversionEvent('checkout_shippingInfoCompleted', {
|
|
694
|
+
serviceLevelId: (_a = this.selectedShippingMethod) === null || _a === void 0 ? void 0 : _a.value,
|
|
695
|
+
});
|
|
664
696
|
};
|
|
665
697
|
this.initServiceLevels = () => {
|
|
666
698
|
var _a;
|
|
@@ -692,37 +724,26 @@ const ZonosShipping = class {
|
|
|
692
724
|
this.submitBtnType = undefined;
|
|
693
725
|
this.selectedShippingMethod = null;
|
|
694
726
|
this.isSelecting = false;
|
|
695
|
-
this.
|
|
727
|
+
this.showErrorBanner = false;
|
|
696
728
|
this.serviceLevels = [];
|
|
697
729
|
}
|
|
698
|
-
watchFormComplete() {
|
|
699
|
-
var _a;
|
|
700
|
-
if (!this.disabled) {
|
|
701
|
-
// submit google tag when the form is complete
|
|
702
|
-
submitGtag.submitGtag('zonos-checkout-shipping-info');
|
|
703
|
-
void submitGtag.trackConversionEvent('checkout_shippingInfoCompleted', {
|
|
704
|
-
serviceLevelId: (_a = this.selectedShippingMethod) === null || _a === void 0 ? void 0 : _a.value,
|
|
705
|
-
});
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
730
|
componentWillLoad() {
|
|
709
731
|
this.initServiceLevels();
|
|
710
732
|
const selectedServiceLevel = this.serviceLevels.find(item => { var _a; return item.value === ((_a = cart.cartStore.selectedShippingOption) === null || _a === void 0 ? void 0 : _a.id); }) || null;
|
|
711
733
|
if (selectedServiceLevel) {
|
|
712
734
|
this.selectedShippingMethod = selectedServiceLevel;
|
|
713
735
|
}
|
|
714
|
-
// enable continue button if there is a selected shipping option
|
|
715
|
-
this.disabled = !selectedServiceLevel;
|
|
716
736
|
}
|
|
717
737
|
render() {
|
|
718
|
-
var _a, _b;
|
|
719
|
-
|
|
738
|
+
var _a, _b, _c;
|
|
739
|
+
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
740
|
+
if (this.showErrorBanner) {
|
|
741
|
+
this.showErrorBanner = !this.handleValidate();
|
|
742
|
+
}
|
|
743
|
+
return (index.h(index.Host, { key: 'f46a224f05bd6a5b762e7b4a9130c809fa1806d9', class: "zonos--shipping zonos--elements" }, index.h("div", { key: '07dceedd0abb2c794c8f4b7c70d51f84eb76f82f', class: "zonos--group" }, index.h("zonos-text", { key: 'e9aec3b541e90bca19218f5444b2a1282c1fade2', class: "zonos--title", type: "semiBoldSubheader" }, cart.translate('Delivery options')), this.showErrorBanner && !!((_a = this.serviceLevels) === null || _a === void 0 ? void 0 : _a.length) && (index.h("zonos-banner", { key: 'df955af5f7318a0146d72aae0d5292a5455c16d9', class: "zonos--error-banner", intent: "error" }, cart.translate('No shipping method selected'))), index.h("zonos-text", { key: 'eacb6cc1936ac9a70f32deca90fa88efd9d560bd', class: "zonos--shipping-method-title", type: "semiBoldLabel" }, cart.translate('Shipping method')), !((_b = this.serviceLevels) === null || _b === void 0 ? void 0 : _b.length) ? (index.h("zonos-banner", { bannerTitle: cart.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" })) : (index.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) })), index.h("div", { key: '37aed76bf80c937ed9dddbefb7f6417bf1322a89', class: "zonos--group-btn" }, index.h("zonos-button", { key: '09a5e1986f6d39ece56a0ea9b47324f81e4c3d84', backgroundColor: this.submitBtnColor, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
720
744
|
// use primary type when on mobile mode
|
|
721
745
|
variant: this.submitBtnType }, cart.translate('Go to payment'))))));
|
|
722
746
|
}
|
|
723
|
-
static get watchers() { return {
|
|
724
|
-
"disabled": ["watchFormComplete"]
|
|
725
|
-
}; }
|
|
726
747
|
};
|
|
727
748
|
ZonosShipping.style = ZonosShippingStyle0;
|
|
728
749
|
|
|
@@ -3,10 +3,10 @@
|
|
|
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
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
8
|
-
const submitGtag = require('./submitGtag-
|
|
9
|
-
const sendErrorLog = require('./sendErrorLog-
|
|
8
|
+
const submitGtag = require('./submitGtag-ab287a34.js');
|
|
9
|
+
const sendErrorLog = require('./sendErrorLog-29e50f7e.js');
|
|
10
10
|
const classes = require('./classes-b7918f56.js');
|
|
11
11
|
const getBorderRadius = require('./getBorderRadius-c8cc2bb3.js');
|
|
12
12
|
const isDarkColor = require('./isDarkColor-f5473002.js');
|
|
@@ -22,7 +22,7 @@ const ZonosComponent = class {
|
|
|
22
22
|
return format(this.first, this.middle, this.last);
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return index.h("div", { key: '
|
|
25
|
+
return index.h("div", { key: 'b88706a49b858decbff163e085da6df8b8513eac' }, "Hello, World! I'm ", this.getText());
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
ZonosComponent.style = ZonosComponentStyle0;
|
|
@@ -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
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
8
8
|
require('./isDarkColor-f5473002.js');
|
|
9
9
|
require('./getBorderRadius-c8cc2bb3.js');
|
|
@@ -267,7 +267,7 @@ const ZonosController = class {
|
|
|
267
267
|
zonosStore.zonosStore.organizationName = organizationName;
|
|
268
268
|
}
|
|
269
269
|
render() {
|
|
270
|
-
return index.h(index.Host, { key: '
|
|
270
|
+
return index.h(index.Host, { key: '59ea7b586263bcd6c5f42c8e52144dbd56463d89', class: "zonos--elements" });
|
|
271
271
|
}
|
|
272
272
|
};
|
|
273
273
|
ZonosController.style = ZonosControllerStyle0;
|
|
@@ -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
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
require('./isDarkColor-f5473002.js');
|