@zonos/elements 1.3.80 → 1.3.82
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/{CheckoutConfig-2fef694e.js → CheckoutConfig-850071ae.js} +1 -1
- package/dist/cjs/{cart-977c9d4c.js → cart-ba540c8e.js} +353 -69
- package/dist/cjs/{createCustomEvent-2b19361e.js → createCustomEvent-1fd24ad8.js} +2 -4
- package/dist/cjs/{handleFetch-661a8225.js → handleFetch-45e76490.js} +29 -1
- package/dist/cjs/index.cjs.js +9 -9
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-3008c89e.js → paypal-6bbe55a7.js} +2 -2
- package/dist/cjs/zonos-address_8.cjs.entry.js +12 -12
- package/dist/cjs/zonos-badge.cjs.entry.js +44 -0
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card.cjs.entry.js +4 -4
- package/dist/cjs/{zonos-badge_13.cjs.entry.js → zonos-cart-items_12.cjs.entry.js} +55 -70
- package/dist/cjs/zonos-checkout.cjs.entry.js +18 -6
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +6 -6
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-notification_3.cjs.entry.js +5 -5
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.css +10 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +73 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +5 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +15 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +8 -9
- package/dist/collection/components/common/zonos-badge/assets/RemoveLineIcon.svg +3 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.css +3 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +43 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- 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 +8 -7
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- 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/common/zonos-virtual-scroll/zonos-virtual-scroll.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 +4 -4
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +17 -1
- package/dist/collection/components/store/checkout/stripe.js +120 -66
- package/dist/collection/components/store/hello/localization.js +2 -3
- package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
- package/dist/collection/components/store/translationStore/strings.base.js +9 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
- package/dist/collection/components/store/translationStore/strings.french.js +9 -0
- package/dist/collection/components/store/translationStore/strings.german.js +9 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
- 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/prepCalculateLandedCost.js +22 -0
- package/dist/collection/components/utils/api/trackConversionEvent.js +0 -2
- package/dist/collection/components/utils/api/triggerBuildLandedCost.js +1 -0
- package/dist/collection/components/utils/handleFetch.js +1 -0
- package/dist/collection/components/utils/hello/currencyConversion/currencyFormat.js +1 -1
- package/dist/collection/components/utils/logging/log.js +26 -1
- package/dist/collection/components/utils/logging/sendErrorLog.js +2 -0
- package/dist/esm/{CheckoutConfig-c7954c2a.js → CheckoutConfig-c0ec120d.js} +1 -1
- package/dist/esm/{cart-414322dc.js → cart-7df78f9f.js} +351 -70
- package/dist/esm/{createCustomEvent-fcd6d294.js → createCustomEvent-fcec608e.js} +2 -4
- package/dist/esm/{handleFetch-80ecfb91.js → handleFetch-0133265e.js} +29 -2
- package/dist/esm/index.js +10 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-3fecd52f.js → paypal-a27aad03.js} +2 -2
- package/dist/esm/zonos-address_8.entry.js +12 -12
- package/dist/esm/zonos-badge.entry.js +40 -0
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card.entry.js +4 -4
- package/dist/esm/{zonos-badge_13.entry.js → zonos-cart-items_12.entry.js} +57 -71
- package/dist/esm/zonos-checkout.entry.js +18 -6
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +3 -3
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +10 -10
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +6 -6
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +6 -6
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-notification_3.entry.js +5 -5
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/{CheckoutConfig-c7954c2a.js → CheckoutConfig-c0ec120d.js} +1 -1
- package/dist/esm-es5/cart-7df78f9f.js +1 -0
- package/dist/esm-es5/{createCustomEvent-fcd6d294.js → createCustomEvent-fcec608e.js} +1 -1
- package/dist/esm-es5/handleFetch-0133265e.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-3fecd52f.js → paypal-a27aad03.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -0
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -0
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-component.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.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-notification_3.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/scripts/index.d.ts +45 -0
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.d.ts +12 -0
- package/dist/types/components/common/zonos-badge/zonos-badge.d.ts +9 -0
- package/dist/types/components/store/checkout/cart.d.ts +8 -1
- package/dist/types/components/store/checkout/stripe.d.ts +12 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
- 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/checkout/sortServiceLevelOptions.d.ts +3 -2
- package/dist/types/components/utils/logging/log.d.ts +2 -1
- package/dist/types/components.d.ts +34 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +2 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +12 -0
- package/dist/types/types/generated/graphql.internal.types.ts +9 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-0290df9c.entry.js → p-112a969c.entry.js} +1 -1
- package/dist/zonos-elements/{p-5170cefb.system.js → p-15651b06.system.js} +1 -1
- package/dist/zonos-elements/p-197c5707.system.js +1 -0
- package/dist/zonos-elements/p-1a92ff9a.system.entry.js +1 -0
- package/dist/zonos-elements/p-2024313c.js +1 -0
- package/dist/zonos-elements/{p-1e4f7997.system.entry.js → p-22e81fee.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f8dace42.system.entry.js → p-270cc182.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1047233d.entry.js → p-2c5e2163.entry.js} +1 -1
- package/dist/zonos-elements/{p-ced3aa4f.system.entry.js → p-2d2edb5a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2d2ff962.entry.js +1 -0
- package/dist/zonos-elements/{p-2a47d2cc.system.entry.js → p-38886017.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cce51fa5.system.entry.js → p-4097a25b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-41f42a5c.entry.js → p-42636c5a.entry.js} +1 -1
- package/dist/zonos-elements/{p-bbabc829.system.entry.js → p-43e2de45.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2d466263.system.js → p-4683797b.system.js} +1 -1
- package/dist/zonos-elements/{p-86bfda32.system.entry.js → p-4e06a2bb.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-25633055.entry.js → p-58832515.entry.js} +1 -1
- package/dist/zonos-elements/{p-e68941ce.system.entry.js → p-59806a8e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-19fc5e11.system.entry.js → p-5d186fc7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0a1db77d.system.entry.js → p-5d4bde9c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f3fc05a8.entry.js → p-6a5d714a.entry.js} +1 -1
- package/dist/zonos-elements/{p-fca6f444.entry.js → p-6a83b682.entry.js} +1 -1
- package/dist/zonos-elements/p-85600e22.system.entry.js +1 -0
- package/dist/zonos-elements/{p-81cdd0d5.system.js → p-8c0ff373.system.js} +1 -1
- package/dist/zonos-elements/p-8dd38974.entry.js +1 -0
- package/dist/zonos-elements/p-8fd6ae63.js +1 -0
- package/dist/zonos-elements/{p-9c02a170.system.js → p-957b1c1b.system.js} +1 -1
- package/dist/zonos-elements/{p-7be7bd28.entry.js → p-997c8f07.entry.js} +1 -1
- package/dist/zonos-elements/{p-982aa677.entry.js → p-a4cdd4f2.entry.js} +1 -1
- package/dist/zonos-elements/p-aa899bf7.entry.js +1 -0
- package/dist/zonos-elements/{p-c2920074.js → p-acabfc47.js} +1 -1
- package/dist/zonos-elements/p-ad7ce197.js +1 -0
- package/dist/zonos-elements/{p-a3e2592b.system.entry.js → p-ae7526a2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6de38759.entry.js → p-afad2fae.entry.js} +1 -1
- package/dist/zonos-elements/{p-166b3181.entry.js → p-b09c3702.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b3fd741.js → p-b8e85bf5.js} +1 -1
- package/dist/zonos-elements/{p-72f0641d.entry.js → p-bf84416a.entry.js} +1 -1
- package/dist/zonos-elements/{p-a033685e.system.entry.js → p-c2b7b670.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-c1400636.entry.js → p-cd17565d.entry.js} +1 -1
- package/dist/zonos-elements/{p-3d01ac9a.entry.js → p-cfd53396.entry.js} +1 -1
- package/dist/zonos-elements/p-cffe7cc8.system.entry.js +1 -0
- package/dist/zonos-elements/{p-f0d6f027.system.entry.js → p-d48f3bd3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ba05f1d6.system.entry.js → p-d621f462.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4032de50.entry.js → p-df83e30b.entry.js} +1 -1
- package/dist/zonos-elements/p-e7eb0a92.system.js +1 -0
- package/dist/zonos-elements/{p-f4765417.entry.js → p-e93b511f.entry.js} +1 -1
- package/dist/zonos-elements/{p-747eed39.entry.js → p-ea68ee1f.entry.js} +1 -1
- package/dist/zonos-elements/{p-de93cc65.system.entry.js → p-f68c38d8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d56f87ab.system.entry.js → p-f7bbdd0c.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-414322dc.js +0 -1
- package/dist/esm-es5/handleFetch-80ecfb91.js +0 -1
- package/dist/esm-es5/zonos-badge_13.entry.js +0 -1
- package/dist/zonos-elements/p-0f640802.system.js +0 -1
- package/dist/zonos-elements/p-2ec2e9d3.js +0 -1
- package/dist/zonos-elements/p-502d5e52.system.entry.js +0 -1
- package/dist/zonos-elements/p-75fd8895.js +0 -1
- package/dist/zonos-elements/p-a725574a.entry.js +0 -1
- package/dist/zonos-elements/p-acbec292.system.entry.js +0 -1
- package/dist/zonos-elements/p-c4957e35.system.js +0 -1
- package/dist/zonos-elements/p-d5818f0a.js +0 -1
- package/dist/zonos-elements/p-e6ec9f12.entry.js +0 -1
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-ba540c8e.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
11
|
-
require('./handleFetch-
|
|
11
|
+
require('./handleFetch-45e76490.js');
|
|
12
12
|
require('./isDarkColor-5efc8367.js');
|
|
13
13
|
require('./getBorderRadius-5a64574c.js');
|
|
14
14
|
|
|
@@ -272,18 +272,18 @@ const ZonosHelloDialog = class {
|
|
|
272
272
|
const defaultMessage = formatStringWithLinks.formatStringWithLinks(defaultMessageStr);
|
|
273
273
|
const currentPage = this.getCurrentPageEnum();
|
|
274
274
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
275
|
-
return (index.h(index.Host, { key: '
|
|
275
|
+
return (index.h(index.Host, { key: '7ff123654399aee05fd295c108e01d924a8964e5', class: "zonos--elements" }, index.h("div", { key: '316720cc18d1b9fbbf86cbfcde1f25106b1197e8', class: classes.classes([
|
|
276
276
|
'zonos--hello-dialog',
|
|
277
277
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
278
278
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
279
279
|
!!this.mobileLocationOverride &&
|
|
280
280
|
'zonos--hello-dialog-mobile-override',
|
|
281
281
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
282
|
-
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", { key: '
|
|
282
|
+
]), inert: !this.isOpen, ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", { key: '29a0018c2c8eb7fdde938e432ea783517d364ea8' }, index.h("div", { key: 'a882452996503ddb4feb3e431eaf9cc14dc2ff34', class: "zonos--hello-dialog-content" }, index.h("zonos-button", { key: '2c656e792daa59c0ce5770d71a779de270a8adc8', class: "zonos--close-button", icon: index.h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), index.h("zonos-v-stack", { key: '1dd3473645c5581fee41da086a478b6eb6f3104e', spacing: 24 }, index.h("zonos-country-flag", { key: '57bdcb6b5e2044b65868a53e91220b7eea5c389e', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), index.h("zonos-v-stack", { key: '8f01898edbd5c30771a2c8d12e0919f6b41cc96c', class: "zonos--hello-dialog-header", spacing: 4 }, index.h("zonos-text", { key: '75728fcc40efe82ff58e767b3c3c9f60f96f37b2', type: "boldSubheader" }, welcomeMessage), index.h("zonos-text", { key: 'b82ebf2adacbb72637064b04957846ee79f10bd5', innerHTML: defaultMessage, textColor: "gray-800" })), index.h("zonos-v-stack", { key: '7a0ae96961883e1a55248d4163da3bed2e76d077', spacing: 8 }, this.restrictedItems.map(item => {
|
|
283
283
|
var _a;
|
|
284
284
|
return item && (index.h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (index.h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
285
|
-
}), index.h("zonos-card", { key: '
|
|
286
|
-
additionalInformation.map(info => (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), index.h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), index.h("zonos-hello-dialog-footer", { key: '
|
|
285
|
+
}), index.h("zonos-card", { key: 'd6a1f8270f3b6c69febc04224e6a0fa7ada5e07a', spacing: "12px" }, index.h("zonos-v-stack", { key: '209eac48b847c3ac4c7e8eb9df35c95416d89536', spacing: 12 }, hasInclusivePrices ? (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty de minimis", content: InclusivePricingIcon }), index.h("zonos-text", null, inclusivePriceMessage))) : (index.h(index.Fragment, null, index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Duty de minimis", content: ImportIcon }), index.h("zonos-text", null, dutyDeMinimisMessage)), index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Tax de minimis", content: MoneyIcon }), index.h("zonos-text", null, taxDeMinimisMessage)))), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
286
|
+
additionalInformation.map(info => (index.h("div", { class: "zonos--flex-message" }, index.h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), index.h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (index.h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), index.h("zonos-hello-dialog-footer", { key: 'e9444ec1c3c3616712faeba92734b4275d373da1', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (index.h("div", { key: 'a612e3daa6de5e5f73422ed8ebed8b3a682c3c46' }, index.h("zonos-country-select", { key: 'b45c18d7feaf95e74da6e0540ea28325a24d287b', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (index.h("div", { key: 'e50779d3c0e3c83587ae445e9ded8e108f893e31' }, index.h("zonos-language-select", { key: 'b502cef6095a0e9a57b3c81fa354ca3614060878', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
287
287
|
}
|
|
288
288
|
static get assetsDirs() { return ["assets"]; }
|
|
289
289
|
static get watchers() { return {
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-ba540c8e.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
9
|
+
const handleFetch = require('./handleFetch-45e76490.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
11
11
|
require('./isDarkColor-5efc8367.js');
|
|
12
12
|
require('./getBorderRadius-5a64574c.js');
|
|
@@ -27,17 +27,17 @@ const ZonosInput = class {
|
|
|
27
27
|
this.inputChange.emit(newValue);
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (index.h(index.Host, { key: '
|
|
30
|
+
return (index.h(index.Host, { key: '1ad1bc4853aa4f4c251e1ab8ac45be8d1e3e98b6', class: classes.classes([
|
|
31
31
|
'zonos--input zonos--elements',
|
|
32
32
|
this.inputSize,
|
|
33
33
|
this.isError && 'has-error',
|
|
34
34
|
]), style: {
|
|
35
35
|
'--border-radius': getBorderRadius.getBorderRadius(),
|
|
36
36
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
37
|
-
} }, index.h("div", { key: '
|
|
37
|
+
} }, index.h("div", { key: 'd2fe3cd5800983913523ab6fce01b19d57c94d9c', class: classes.classes([
|
|
38
38
|
'zonos--label-wrapper',
|
|
39
39
|
this.isDisabled && 'disabled',
|
|
40
|
-
]) }, index.h("input", { key: '
|
|
40
|
+
]) }, index.h("input", { key: 'e0493952e9171c24164f847be23a4462572df336', class: classes.classes([
|
|
41
41
|
'zonos--floated-input',
|
|
42
42
|
!!this.inputLabel && 'has-label',
|
|
43
43
|
this.inputValue && 'has-content',
|
|
@@ -45,7 +45,7 @@ const ZonosInput = class {
|
|
|
45
45
|
]), disabled: this.isDisabled, onInput: e => {
|
|
46
46
|
const input = e.target;
|
|
47
47
|
this.inputChange.emit(input.value);
|
|
48
|
-
}, placeholder: this.inputPlaceholder, type: "text", value: this.value }), index.h("label", { key: '
|
|
48
|
+
}, placeholder: this.inputPlaceholder, type: "text", value: this.value }), index.h("label", { key: 'f9733fa1eafc29354d3d6b045a05542927f3a5e1', class: "zonos--floated-label", "data-label": this.inputLabel }))));
|
|
49
49
|
}
|
|
50
50
|
get el() { return index.getElement(this); }
|
|
51
51
|
static get watchers() { return {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-ba540c8e.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-45e76490.js');
|
|
10
10
|
require('./isDarkColor-5efc8367.js');
|
|
11
11
|
require('./getBorderRadius-5a64574c.js');
|
|
12
12
|
|
|
@@ -31,9 +31,9 @@ const ZonosLanguageSelect = class {
|
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
33
|
const { selectedLocale } = cart.localizationStore;
|
|
34
|
-
return (index.h(index.Host, { key: '
|
|
34
|
+
return (index.h(index.Host, { key: 'bea77d8916a999eade4d1201adbf37803b65901a', class: "zonos--elements", style: {
|
|
35
35
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
36
|
-
} }, index.h("div", { key: '
|
|
36
|
+
} }, index.h("div", { key: '7c16efd7518f5952dac402c1fc2993e110d78fef', class: "zonos--language-select" }, index.h("zonos-select-dialog-header", { key: '52c7626a8378bd7c956a3fa9d339a263f686f80a', handleOnClose: () => this.handleOnClose(), label: cart.translate('Select a language') }), index.h("div", { key: '6c00ad9b3270ae435ee32600651600a0a237ff07', 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 })))))))));
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
ZonosLanguageSelect.style = ZonosLanguageSelectStyle0;
|
|
@@ -50,9 +50,9 @@ const ZonosSelectDialogHeader = class {
|
|
|
50
50
|
this.label = '';
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
|
-
return (index.h(index.Host, { key: '
|
|
53
|
+
return (index.h(index.Host, { key: 'a1b2433a81210b6a0a78be3cb027f885cd870d2c', class: "zonos--elements", style: {
|
|
54
54
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
55
|
-
} }, index.h("zonos-v-stack", { key: '
|
|
55
|
+
} }, index.h("zonos-v-stack", { key: 'a9e61575c6c6c34c6097dd937dea7c199130f7f0', class: "zonos--select-dialog-header-wrapper", spacing: 8 }, index.h("div", { key: '266b89174f64825bec793bd30d44c1f75f220b1f', class: "zonos--select-dialog-header" }, index.h("zonos-text", { key: '7fd1f62f22610a2601497e897e98d5f5e0437601', type: "boldLabel" }, this.label), index.h("zonos-button", { key: 'afa95565fae19d97e038885f5244ee292f960a69', 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: 'c28af84460321290623f17120ef1583aaf898105' }))));
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
ZonosSelectDialogHeader.style = ZonosSelectDialogHeaderStyle0;
|
|
@@ -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: '86fc4a9a03329f66e7f635669ca95d1372a62446', class: "zonos--elements" }, index.h("a", { key: 'ff257fcff1ffcc7e7c659969df96e551afb7146c', href: this.href, rel: this.rel, target: this.target, title: this.linkTitle }, index.h("slot", { key: 'f5906c958642d7e5f4e7bb913febf778995a7dc6' }))));
|
|
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: 'f20974d5ff501108c4a52d01773ab20219c8d389', 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: 'd7acc90de67c51594abd44903c9fcb0b3e10a8bc', alt: "Zonos Logo", src: index.getAssetPath('./assets/ZonosLogo.png') })));
|
|
27
27
|
}
|
|
28
28
|
static get assetsDirs() { return ["assets"]; }
|
|
29
29
|
};
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-d56e0a8b.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-a4395972.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const cart = require('./cart-
|
|
9
|
-
const handleFetch = require('./handleFetch-
|
|
10
|
-
const paypal = require('./paypal-
|
|
8
|
+
const cart = require('./cart-ba540c8e.js');
|
|
9
|
+
const handleFetch = require('./handleFetch-45e76490.js');
|
|
10
|
+
const paypal = require('./paypal-6bbe55a7.js');
|
|
11
11
|
require('./isDarkColor-5efc8367.js');
|
|
12
12
|
require('./getBorderRadius-5a64574c.js');
|
|
13
13
|
|
|
@@ -110,7 +110,7 @@ const ZonosPayment = class {
|
|
|
110
110
|
}
|
|
111
111
|
render() {
|
|
112
112
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
113
|
-
return (index.h(index.Host, { key: '
|
|
113
|
+
return (index.h(index.Host, { key: 'c461a967d00b2d96fa70aaaf1651b435cdcd84bd', class: "zonos--payment zonos--elements" }, this.titleText && (index.h("zonos-text", { key: '44da1d89ce19f7174cad1214ab9463f0b1174c0d', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), index.h("div", { key: 'b9e3491b48d9ede19a5cdef639bd47e6bf0ba742', class: "zonos--payment-component" }), index.h("div", { key: '578516ce1ca1dc01eebb2268bb5449613e14298f', class: "zonos--payment-paypal-container" })));
|
|
114
114
|
}
|
|
115
115
|
get el() { return index.getElement(this); }
|
|
116
116
|
static get watchers() { return {
|
|
@@ -164,7 +164,7 @@ const ZonosPaypalPayment = class {
|
|
|
164
164
|
void this.loadPaypal();
|
|
165
165
|
}
|
|
166
166
|
render() {
|
|
167
|
-
return (index.h(index.Host, { key: '
|
|
167
|
+
return (index.h(index.Host, { key: '6bfc962de500edbb105b7eb899711e48def78167', class: "zonos--paypal-payment zonos--elements" }, index.h("div", { key: '92d1b1c416f5e233c54e50d47129be375ef0a68b', class: "zonos--payment-paypal-container" })));
|
|
168
168
|
}
|
|
169
169
|
get el() { return index.getElement(this); }
|
|
170
170
|
};
|
|
@@ -16,10 +16,10 @@ const ZonosTooltip = class {
|
|
|
16
16
|
this.showTooltip = false;
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (index.h(index.Host, { key: '
|
|
19
|
+
return (index.h(index.Host, { key: '091516a0a68f8b4ab2580a8118900c34b39e931c', class: "zonos--elements" }, index.h("div", { key: '77769b18201f87d601d5bdb860a4bc8c84bb4e90', class: "zonos--tooltip", onMouseEnter: () => (this.showTooltip = true), onMouseLeave: () => (this.showTooltip = false) }, index.h("slot", { key: '139c1de415b94e12b8d575e3662cba9faf56cb2f' }), index.h("div", { key: '60c38adf74e9b776001844c2205ac87a4562b525', class: classes.classes([
|
|
20
20
|
this.showTooltip && 'zonos--show-tooltip',
|
|
21
21
|
'zonos--tooltip-content',
|
|
22
|
-
]) }, index.h("zonos-text", { key: '
|
|
22
|
+
]) }, index.h("zonos-text", { key: 'bb87c44ee7831c24b47c43b17d2b04c79112e900', size: "s", textColor: "gray-0", type: "boldLabel" }, this.label), index.h("zonos-text", { key: '5d114d284a15a1661e926bfe5fae9251513c7370', size: "xs", textColor: "gray-0" }, this.subtitle)))));
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
ZonosTooltip.style = ZonosTooltipStyle0;
|
|
@@ -15,9 +15,9 @@ const VStack = class {
|
|
|
15
15
|
this.spacing = 24;
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
return (index.h(index.Host, { key: '
|
|
18
|
+
return (index.h(index.Host, { key: 'fca41f57f80879bf7cb32fa7858777a26a36755d', style: {
|
|
19
19
|
'--font-family': zonosStore.zonosStoreFontFamily(),
|
|
20
|
-
} }, index.h("div", { key: '
|
|
20
|
+
} }, index.h("div", { key: '8b608328327817a540c56dca58ad32ebe622d48e', class: classes.classes(['vstack']), style: { 'grid-row-gap': `${this.spacing}px` } }, index.h("slot", { key: 'c29eeb4c2d0f781bdca44d355d2da75e15576d86' }))));
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
VStack.style = ZonosVStackStyle0;
|
package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js
CHANGED
|
@@ -17,7 +17,7 @@ export class ZonosCartItems {
|
|
|
17
17
|
this.errorImages = [...this.errorImages, itemImg];
|
|
18
18
|
}, src: item.imageUrl, style: {
|
|
19
19
|
'min-width': '40px',
|
|
20
|
-
}, width: 40 })) : (h("img", { alt: item.name, src: emptyItemImg, width: 40 }))), h("td", { class: "zonos--column zonos--cart-item-name" }, h("zonos-text", { type: "label"
|
|
20
|
+
}, width: 40 })) : (h("img", { alt: item.name, src: emptyItemImg, width: 40 }))), h("td", { class: "zonos--column zonos--cart-item-name" }, h("zonos-text", { type: "label" }, item.name), h("zonos-text", { textColor: "gray-600", type: "caption" }, translate('Quantity'), ": ", item.quantity)), h("td", { class: "zonos--column zonos--cart-item-price" }, h("zonos-text", { type: "semiBoldLabel", weight: 600 }, currencyFormat({
|
|
21
21
|
amount: item.amount * rate * item.quantity,
|
|
22
22
|
currency: cartStore.currency,
|
|
23
23
|
})))));
|
|
@@ -54,7 +54,8 @@
|
|
|
54
54
|
gap: 8px;
|
|
55
55
|
}
|
|
56
56
|
:host .zonos--cart-subtotal-title,
|
|
57
|
-
:host .zonos--cart-subtotal-price
|
|
57
|
+
:host .zonos--cart-subtotal-price,
|
|
58
|
+
:host .zonos--cart-promo-code-col {
|
|
58
59
|
border-bottom: 1px solid var(--zonos-elements-gray-200);
|
|
59
60
|
}
|
|
60
61
|
:host .zonos--cart-duty-tax-price {
|
|
@@ -72,4 +73,12 @@
|
|
|
72
73
|
:host .zonos--cart-subtotal-price zonos-text,
|
|
73
74
|
:host .zonos--cart-pay-total zonos-text {
|
|
74
75
|
white-space: nowrap;
|
|
76
|
+
}
|
|
77
|
+
:host .zonos--cart-promo-code-input-wrapper {
|
|
78
|
+
display: flex;
|
|
79
|
+
gap: 16px;
|
|
80
|
+
align-items: center;
|
|
81
|
+
}
|
|
82
|
+
:host .zonos--cart-promo-code-input {
|
|
83
|
+
flex: 1;
|
|
75
84
|
}
|
|
@@ -1,13 +1,37 @@
|
|
|
1
1
|
import { Fragment, h, Host } from "@stencil/core";
|
|
2
2
|
import { cartStore, cartStoreHasOneEligibleItem, } from "../../../store/checkout/cart";
|
|
3
|
+
import { stripeStoreApplyPromoCode, stripeStoreRemovePromoCode, } from "../../../store/checkout/stripe";
|
|
3
4
|
import { translate } from "../../../store/translationStore";
|
|
4
5
|
import { currencyFormat } from "../../../utils/hello/currencyConversion/currencyFormat";
|
|
5
6
|
export class ZonosCartSubtotal {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.submitBtnType = undefined;
|
|
9
|
+
this.submitBtnColor = undefined;
|
|
10
|
+
this.loading = false;
|
|
11
|
+
}
|
|
6
12
|
render() {
|
|
13
|
+
var _a, _b, _c, _d, _e;
|
|
7
14
|
const showDutyTaxesInfo = cartStore.step === 'payment' || cartStore.step === 'shipping';
|
|
8
15
|
// Show 0 for subtotal and total when all items are restricted
|
|
9
16
|
const total = cartStoreHasOneEligibleItem() ? cartStore.total : 0;
|
|
10
17
|
const subtotal = cartStoreHasOneEligibleItem() ? cartStore.subtotal : 0;
|
|
18
|
+
const appliedPromoCode = (_e = (_d = (_c = (_b = (_a = cartStore.landedCostData) === null || _a === void 0 ? void 0 : _a.find(Boolean)) === null || _b === void 0 ? void 0 : _b.landedCost.appliedAdjustments) === null || _c === void 0 ? void 0 : _c.find(x => { var _a; return ((_a = x.adjustment) === null || _a === void 0 ? void 0 : _a.source) === 'PROMO_CODE'; })) === null || _d === void 0 ? void 0 : _d.adjustment) === null || _e === void 0 ? void 0 : _e.name;
|
|
19
|
+
const applyPromoCode = async () => {
|
|
20
|
+
// Promo code apply button is clicked
|
|
21
|
+
cartStore.promoCodeApplied = true;
|
|
22
|
+
// Reset promo code highlight error state
|
|
23
|
+
cartStore.promoCodeError = false;
|
|
24
|
+
this.loading = true;
|
|
25
|
+
await stripeStoreApplyPromoCode();
|
|
26
|
+
this.loading = false;
|
|
27
|
+
};
|
|
28
|
+
const removePromoCode = async () => {
|
|
29
|
+
// Reset promo code highlight error state
|
|
30
|
+
cartStore.promoCodeError = false;
|
|
31
|
+
this.loading = true;
|
|
32
|
+
await stripeStoreRemovePromoCode();
|
|
33
|
+
this.loading = false;
|
|
34
|
+
};
|
|
11
35
|
const renderShippingInfo = () => {
|
|
12
36
|
if (!cartStore.selectedShippingOption) {
|
|
13
37
|
return (h(Fragment, null, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Shipping')), h("zonos-text", { class: "zonos--caption", type: "caption" }, translate('No shipping method selected'))));
|
|
@@ -27,7 +51,7 @@ export class ZonosCartSubtotal {
|
|
|
27
51
|
amount: cartStore.dutiesTaxFees,
|
|
28
52
|
currency: cartStore.currency,
|
|
29
53
|
})
|
|
30
|
-
: '-')))), !!cartStore.adjustmentTotal && (h("tr", { class: "zonos--row zonos--cart-duties" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("div", { class: "zonos--title-with-icon" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Discounts')))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("zonos-text", { type: "semiBoldLabel" }, currencyFormat({
|
|
54
|
+
: '-')))), cartStore.step !== 'customer-info' && (h("tr", { class: "zonos--row zonos--cart-promo-code" }, h("td", { class: "zonos--column" }), !!appliedPromoCode ? (h(Fragment, null, h("td", { class: "zonos--column zonos--cart-promo-code-col" }, this.loading ? (h("zonos-spinner", { size: 16 })) : (h("zonos-badge", { dismissHandler: () => removePromoCode() }, cartStore.promoCode))), h("td", { class: "zonos--column zonos--cart-promo-code-col" }))) : (h("td", { class: "zonos--column zonos--cart-promo-code-col", colSpan: 2 }, h("div", { class: "zonos--cart-promo-code-input-wrapper" }, h("zonos-input", { class: "zonos--cart-promo-code-input", inputLabel: translate('Add promotional code'), inputValue: cartStore.promoCode, isError: cartStore.promoCodeError, onInputChange: e => (cartStore.promoCode = e.detail.trim()) }), h("zonos-button", { loading: this.loading, onClick: () => applyPromoCode(), variant: "primary" }, translate('Apply'))))))), !!cartStore.adjustmentTotal && (h("tr", { class: "zonos--row zonos--cart-duties" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column zonos--cart-subtotal-title" }, h("div", { class: "zonos--title-with-icon" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Discounts')))), h("td", { class: "zonos--column zonos--cart-subtotal-price" }, h("zonos-text", { type: "semiBoldLabel" }, currencyFormat({
|
|
31
55
|
amount: cartStore.adjustmentTotal,
|
|
32
56
|
currency: cartStore.currency,
|
|
33
57
|
}))))), h("tr", { class: "zonos--row zonos--cart-pay-total" }, h("td", { class: "zonos--column" }), h("td", { class: "zonos--column" }, h("zonos-text", { class: "zonos--title", type: "semiBoldLabel" }, translate('Order total'))), h("td", { class: "zonos--column" }, h("zonos-text", { type: "semiBoldLabel" }, currencyFormat({
|
|
@@ -48,4 +72,52 @@ export class ZonosCartSubtotal {
|
|
|
48
72
|
};
|
|
49
73
|
}
|
|
50
74
|
static get assetsDirs() { return ["assets"]; }
|
|
75
|
+
static get properties() {
|
|
76
|
+
return {
|
|
77
|
+
"submitBtnType": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "HTMLZonosButtonElement['variant']",
|
|
82
|
+
"resolved": "\"danger\" | \"outline\" | \"primary\" | \"standard\" | \"subtle\" | \"success\" | \"warning\" | undefined",
|
|
83
|
+
"references": {
|
|
84
|
+
"HTMLZonosButtonElement": {
|
|
85
|
+
"location": "global",
|
|
86
|
+
"id": "global::HTMLZonosButtonElement"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": true,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": "Button type of the submit button"
|
|
95
|
+
},
|
|
96
|
+
"attribute": "submit-btn-type",
|
|
97
|
+
"reflect": false
|
|
98
|
+
},
|
|
99
|
+
"submitBtnColor": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "string",
|
|
104
|
+
"resolved": "string | undefined",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": true,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": "Button color of the submit button"
|
|
112
|
+
},
|
|
113
|
+
"attribute": "submit-btn-color",
|
|
114
|
+
"reflect": false
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
static get states() {
|
|
119
|
+
return {
|
|
120
|
+
"loading": {}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
51
123
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, h, Host, } from "@stencil/core";
|
|
2
2
|
import { cartStore } from "../../../store/checkout/cart";
|
|
3
3
|
import { paypalStore, paypalStoreReset, } from "../../../store/checkout/paypal";
|
|
4
|
-
import { stripeStore, stripeStoreMessageBasedOnStatus, stripeStoreReset, stripeStoreRetrievePayment, } from "../../../store/checkout/stripe";
|
|
4
|
+
import { stripeStore, stripeStoreMessageBasedOnStatus, stripeStoreReset, stripeStoreResetPromoCode, stripeStoreRetrievePayment, } from "../../../store/checkout/stripe";
|
|
5
5
|
import { translate } from "../../../store/translationStore";
|
|
6
6
|
import { zonosStore } from "../../../store/zonosStore";
|
|
7
7
|
import { trackConversionEvent } from "../../../utils/api/trackConversionEvent";
|
|
@@ -195,6 +195,8 @@ export class ZonosCheckoutFinish {
|
|
|
195
195
|
// wait this to finish before resetting store and checkout session id
|
|
196
196
|
await this.getPullOrder();
|
|
197
197
|
}
|
|
198
|
+
// reset promo when checkout is finished
|
|
199
|
+
stripeStoreResetPromoCode();
|
|
198
200
|
this.isLoading = false;
|
|
199
201
|
stripeStoreReset();
|
|
200
202
|
paypalStoreReset();
|
|
@@ -233,11 +235,11 @@ export class ZonosCheckoutFinish {
|
|
|
233
235
|
var _a, _b;
|
|
234
236
|
const orderId = ((_a = this.order) === null || _a === void 0 ? void 0 : _a.accountOrderNumber) || getGraphQlShortId((_b = this.order) === null || _b === void 0 ? void 0 : _b.id);
|
|
235
237
|
const isTestMode = getIsTestMode();
|
|
236
|
-
return (h(Host, { key: '
|
|
238
|
+
return (h(Host, { key: '9939772d4ce4213978ae6b02b4cd5345d15dbdfd', class: "zonos--checkout-finish zonos--elements", style: {
|
|
237
239
|
'--border-radius': getBorderRadius({
|
|
238
240
|
overrideBorderStyle: this.borderRadius,
|
|
239
241
|
}),
|
|
240
|
-
} }, this.isLoading && (h("div", { key: '
|
|
242
|
+
} }, this.isLoading && (h("div", { key: '491d4d0ba3dc487d448606009a30a5ce8d3bb86e', class: "loading-wrapper" }, h("zonos-spinner", { key: '3179aeb472d3e70628d3f1e3e2b76ed3d622145d' }))), !this.isLoading && (h("div", { key: '6044c9d1ac7599d9168f944dcf82028669fd1f37', class: "zonos--finish-details" }, h("div", { key: 'd22ec981a73db08e4871c8babe29f9a09a5bc29d', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: 'bfef33fd319456253e07c3ef3f81da1b85414df9', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), orderId && (h("div", { key: 'f056c93644d1f9defa263f59111874f154293b51', class: "zonos--order-number" }, "Order #", orderId)), h("zonos-text", { key: '69d38c4640943a5cfdcef5ea6951ddec9c7b8a84', textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { key: 'fbb2d1cc0baab99a3312f2077c28cb9d51b4eb44', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText)), isTestMode && cartStore.step === 'finish' && (h("div", { key: '7b63fd838f850ce6a5acf4970fa66657ca05e235', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: '85035826e36d52ccf8c77aa6ba6e27173fccdaa6', backgroundColor: "gray-0", buttonColor: "gray-1200", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: 'd3848fdbdf1380dce49fcbc2b2903d99ce65247d', onClick: () => this.redirectToUrl(`/orders/all`), size: "lg", variant: "primary" }, "View order in Dashboard")))))));
|
|
241
243
|
}
|
|
242
244
|
static get is() { return "zonos-checkout-finish"; }
|
|
243
245
|
static get encapsulation() { return "shadow"; }
|
|
@@ -16,8 +16,9 @@ import { classes } from "../../utils/classes";
|
|
|
16
16
|
import { createCustomEvent } from "../../utils/createCustomEvent";
|
|
17
17
|
import { getBorderRadius } from "../../utils/getBorderRadius";
|
|
18
18
|
import { isDarkColor } from "../../utils/isDarkColor";
|
|
19
|
-
import { log } from "../../utils/logging/log";
|
|
19
|
+
import { allLogs, log } from "../../utils/logging/log";
|
|
20
20
|
import { logError } from "../../utils/logging/logError";
|
|
21
|
+
import { sendErrorLog } from "../../utils/logging/sendErrorLog";
|
|
21
22
|
import { mergeConfig } from "../../utils/mergeConfig";
|
|
22
23
|
import { submitGtag } from "../../utils/submitGtag";
|
|
23
24
|
import { setupCartData } from "../../../scripts/cart/_setupCartData";
|
|
@@ -196,6 +197,7 @@ export class ZonosCheckout {
|
|
|
196
197
|
button,
|
|
197
198
|
});
|
|
198
199
|
button.addEventListener('click', async (e) => {
|
|
200
|
+
var _a;
|
|
199
201
|
if (!isShippableCountry() || isDisabledCountry()) {
|
|
200
202
|
return;
|
|
201
203
|
}
|
|
@@ -228,6 +230,17 @@ export class ZonosCheckout {
|
|
|
228
230
|
],
|
|
229
231
|
title: translate('Error creating Checkout'),
|
|
230
232
|
});
|
|
233
|
+
// We want to log the error anytime we fail to create a checkout session
|
|
234
|
+
void sendErrorLog({
|
|
235
|
+
endpoint: 'Error creating Checkout',
|
|
236
|
+
errors: [err instanceof Error ? err.toString() : 'Unknown error'],
|
|
237
|
+
metadata: {
|
|
238
|
+
allLogs,
|
|
239
|
+
cartId: window.Zonos.cartId,
|
|
240
|
+
href: window.location.href,
|
|
241
|
+
storeBaseUrl: (_a = window.Zonos.cartData) === null || _a === void 0 ? void 0 : _a.storeBaseUrl,
|
|
242
|
+
},
|
|
243
|
+
});
|
|
231
244
|
}
|
|
232
245
|
}, {
|
|
233
246
|
// Trigger this event before any other event
|
|
@@ -589,7 +602,7 @@ export class ZonosCheckout {
|
|
|
589
602
|
} }), h("zonos-collapse", {
|
|
590
603
|
// only collapsible on mobile
|
|
591
604
|
collapsed: this.collapseReviewMobile && this.isMobile
|
|
592
|
-
}, h("zonos-cart-items", null), this.isMobile && (h("zonos-v-stack", { spacing: 16 }, h("zonos-cart-subtotal",
|
|
605
|
+
}, h("zonos-cart-items", null), this.isMobile && (h("zonos-v-stack", { spacing: 16 }, h("zonos-cart-subtotal", { submitBtnColor: submitButtonColor }), h("zonos-custom-message", { class: "zonos--checkout-default-message", icon: MessageIcon, message: defaultMessage }))))), h("zonos-cart-restricted-items", null), !this.isMobile && (h("zonos-v-stack", { spacing: 16 }, h("zonos-cart-subtotal", null), h("zonos-custom-message", { class: "zonos--checkout-default-message", icon: MessageIcon, message: defaultMessage }))))))), (cartStore.step === 'finish' || cartStore.step === 'error') && (h("div", { class: "zonos--done", "data-theme": rightSideTheme }, h("div", { class: "zonos--header" }, renderLogo(), h("zonos-button", { class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close checkout dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.handleFinishClick(), theme: rightSideTheme })), h("zonos-checkout-finish", { borderRadius: style, onCloseClick: () => this.handleFinishClick(), overrideNotification: cartStore.step === 'error' && !!cartStore.error
|
|
593
606
|
? Object.assign(Object.assign({}, cartStore.error), { type: 'error' }) : undefined, storybookForceStatus: this.storybookPaymentStatusOverride }))), h("zonos-checkout-footer", { "data-theme": rightSideTheme, mobile: this.isMobile,
|
|
594
607
|
/**
|
|
595
608
|
* For this component, use slot instead of passing JSX through prop of other component. Because
|
|
@@ -2,7 +2,6 @@ import { h, Host, } from "@stencil/core";
|
|
|
2
2
|
import { cartStore, cartStoreGetShippingTransitInfo, cartStoreUpdateSelectedShippingOption, } from "../../../store/checkout/cart";
|
|
3
3
|
import { translate } from "../../../store/translationStore";
|
|
4
4
|
import { trackConversionEvent } from "../../../utils/api/trackConversionEvent";
|
|
5
|
-
import { sortServiceLevelOptions } from "../../../utils/checkout/sortServiceLevelOptions";
|
|
6
5
|
import { currencyFormat } from "../../../utils/hello/currencyConversion/currencyFormat";
|
|
7
6
|
import { submitGtag } from "../../../utils/submitGtag";
|
|
8
7
|
export class ZonosShipping {
|
|
@@ -81,8 +80,7 @@ export class ZonosShipping {
|
|
|
81
80
|
};
|
|
82
81
|
})) || []);
|
|
83
82
|
})) || [];
|
|
84
|
-
|
|
85
|
-
this.serviceLevels = sortServiceLevelOptions(serviceLevels);
|
|
83
|
+
this.serviceLevels = serviceLevels;
|
|
86
84
|
};
|
|
87
85
|
this.continueLoading = false;
|
|
88
86
|
this.submitBtnColor = undefined;
|
|
@@ -101,12 +99,13 @@ export class ZonosShipping {
|
|
|
101
99
|
return;
|
|
102
100
|
}
|
|
103
101
|
const firstServiceLevel = this.serviceLevels.find(Boolean);
|
|
104
|
-
if (firstServiceLevel) {
|
|
105
|
-
|
|
106
|
-
void this.handleRadioSelected({
|
|
107
|
-
detail: firstServiceLevel,
|
|
108
|
-
});
|
|
102
|
+
if (!firstServiceLevel) {
|
|
103
|
+
return;
|
|
109
104
|
}
|
|
105
|
+
// preselect the first shipping method
|
|
106
|
+
void this.handleRadioSelected({
|
|
107
|
+
detail: firstServiceLevel,
|
|
108
|
+
});
|
|
110
109
|
}
|
|
111
110
|
render() {
|
|
112
111
|
var _a, _b, _c;
|
|
@@ -114,7 +113,7 @@ export class ZonosShipping {
|
|
|
114
113
|
if (this.showErrorBanner) {
|
|
115
114
|
this.showErrorBanner = !this.handleValidate();
|
|
116
115
|
}
|
|
117
|
-
return (h(Host, { key: '
|
|
116
|
+
return (h(Host, { key: '8b65a52f870ea2274ebca2a007d3dd15d019bc40', class: "zonos--shipping zonos--elements" }, h("div", { key: '0c0d7b7d156ee6a7a1914bbcfb4f835efb8900ba', class: "zonos--group" }, h("zonos-text", { key: '3a761f88410f83eb3b4fdf91351c3ab7fcb65548', 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: '717aa9228e46f55ad6df5788abca033830431576', class: "zonos--error-banner", intent: "error" }, translate('No shipping method selected'))), h("zonos-text", { key: 'ece89e491a72c39eea128aaf6cbefe71242ef651', 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: 'f5f64b048cbf2faf582d3167c7cc2e6f1722323a', class: "zonos--group-btn" }, h("zonos-button", { key: '994b883f870cbad249bc311bf25c2d2e946a3ccb', backgroundColor: this.submitBtnColor, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
118
117
|
// use primary type when on mobile mode
|
|
119
118
|
variant: this.submitBtnType }, translate('Go to payment'))))));
|
|
120
119
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.8282 5.17184C11.0235 5.3671 11.0235 5.68368 10.8282 5.87894L8.70688 8.00026L10.8282 10.1216C11.0235 10.3168 11.0235 10.6334 10.8282 10.8287C10.6329 11.024 10.3164 11.024 10.1211 10.8287L7.99978 8.70737L5.87846 10.8287C5.68319 11.024 5.36661 11.024 5.17135 10.8287C4.97609 10.6334 4.97609 10.3168 5.17135 10.1216L7.29267 8.00026L5.17135 5.87894C4.97609 5.68368 4.97609 5.3671 5.17135 5.17184C5.36661 4.97658 5.68319 4.97658 5.87846 5.17184L7.99978 7.29316L10.1211 5.17184C10.3164 4.97658 10.6329 4.97658 10.8282 5.17184Z" fill="var(--zonos-elements-gray-800)"/>
|
|
3
|
+
</svg>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { zonosStoreFontFamily } from "../../store/zonosStore";
|
|
3
3
|
import { classes } from "../../utils/classes";
|
|
4
|
+
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
5
|
+
import RemoveLineIcon from "./assets/RemoveLineIcon.svg";
|
|
4
6
|
export class ZonosBadge {
|
|
5
7
|
constructor() {
|
|
6
8
|
this.bold = false;
|
|
@@ -9,18 +11,20 @@ export class ZonosBadge {
|
|
|
9
11
|
this.iconRight = false;
|
|
10
12
|
this.size = 'default';
|
|
11
13
|
this.rounded = false;
|
|
14
|
+
this.loading = false;
|
|
15
|
+
this.dismissHandler = undefined;
|
|
12
16
|
}
|
|
13
17
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
18
|
+
return (h(Host, { key: '9704ae6d10af4b720e1edf9ccc0263d4463e64f2', class: classes(['zonos--elements zonos--badge']), style: {
|
|
15
19
|
'--font-family': zonosStoreFontFamily(),
|
|
16
|
-
} }, h("div", { key: '
|
|
20
|
+
} }, h("div", { key: 'e395b7477591edff91059aefc4d3858f45d61098', class: classes([
|
|
17
21
|
'zonos--badge-content',
|
|
18
22
|
this.badgeColor,
|
|
19
23
|
this.rounded && 'rounded',
|
|
20
24
|
this.iconRight && 'icon-right',
|
|
21
25
|
this.size,
|
|
22
26
|
this.bold && 'bold',
|
|
23
|
-
]) }, this.icon, h("zonos-text", { key: '
|
|
27
|
+
]) }, this.icon, h("zonos-text", { key: '92eeb162849c9036bb102012e14fb6476b34b411', textColor: `${this.badgeColor}-800` }, h("slot", { key: '3a52067262d1ba34eb5952dc2f2eaeeb1daa624c' })), this.dismissHandler && (h("zonos-icon", { key: '7bb94d2b2204c81e7c21e31fe2769de2e0f0c19b', "aria-label": "Remove promo code", class: "zonos--badge-dismiss", content: RemoveLineIcon, onClick: () => { var _a; return (_a = this.dismissHandler) === null || _a === void 0 ? void 0 : _a.call(this); } })))));
|
|
24
28
|
}
|
|
25
29
|
static get is() { return "zonos-badge"; }
|
|
26
30
|
static get encapsulation() { return "shadow"; }
|
|
@@ -169,6 +173,42 @@ export class ZonosBadge {
|
|
|
169
173
|
"attribute": "rounded",
|
|
170
174
|
"reflect": false,
|
|
171
175
|
"defaultValue": "false"
|
|
176
|
+
},
|
|
177
|
+
"loading": {
|
|
178
|
+
"type": "boolean",
|
|
179
|
+
"mutable": false,
|
|
180
|
+
"complexType": {
|
|
181
|
+
"original": "boolean",
|
|
182
|
+
"resolved": "boolean",
|
|
183
|
+
"references": {}
|
|
184
|
+
},
|
|
185
|
+
"required": false,
|
|
186
|
+
"optional": false,
|
|
187
|
+
"docs": {
|
|
188
|
+
"tags": [{
|
|
189
|
+
"name": "default",
|
|
190
|
+
"text": "false"
|
|
191
|
+
}],
|
|
192
|
+
"text": "Whether or not the badge is loading"
|
|
193
|
+
},
|
|
194
|
+
"attribute": "loading",
|
|
195
|
+
"reflect": false,
|
|
196
|
+
"defaultValue": "false"
|
|
197
|
+
},
|
|
198
|
+
"dismissHandler": {
|
|
199
|
+
"type": "unknown",
|
|
200
|
+
"mutable": false,
|
|
201
|
+
"complexType": {
|
|
202
|
+
"original": "() => void",
|
|
203
|
+
"resolved": "(() => void) | undefined",
|
|
204
|
+
"references": {}
|
|
205
|
+
},
|
|
206
|
+
"required": false,
|
|
207
|
+
"optional": true,
|
|
208
|
+
"docs": {
|
|
209
|
+
"tags": [],
|
|
210
|
+
"text": "Callback for when the badge is dismissed. Also determines if dismiss icon shown."
|
|
211
|
+
}
|
|
172
212
|
}
|
|
173
213
|
};
|
|
174
214
|
}
|