@zonos/elements 1.3.109 → 1.3.110
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-d25b699a.js → cart-a3eab220.js} +235 -75
- package/dist/cjs/createCustomEvent-3e982e57.js +16 -0
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-fd423375.js → paypal-ca479c4b.js} +1 -1
- package/dist/cjs/zonos-address_7.cjs.entry.js +9 -9
- package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
- 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-cart-items_13.cjs.entry.js +126 -104
- package/dist/cjs/zonos-checkout.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- 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_4.cjs.entry.js +9 -9
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
- 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-toggle.cjs.entry.js +2 -2
- 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-checkout-finish/zonos-checkout-finish.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +108 -86
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +2 -2
- 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 +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 +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -2
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/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-toggle/zonos-toggle.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/stripe.js +11 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +9 -3
- package/dist/collection/components/store/translationStore/strings.base.js +9 -3
- package/dist/collection/components/store/translationStore/strings.chinese.js +10 -4
- package/dist/collection/components/store/translationStore/strings.danish.js +10 -4
- package/dist/collection/components/store/translationStore/strings.dutch.js +10 -4
- package/dist/collection/components/store/translationStore/strings.french.js +9 -3
- package/dist/collection/components/store/translationStore/strings.german.js +10 -4
- package/dist/collection/components/store/translationStore/strings.hebrew.js +10 -4
- package/dist/collection/components/store/translationStore/strings.indonesian.js +10 -4
- package/dist/collection/components/store/translationStore/strings.italian.js +10 -4
- package/dist/collection/components/store/translationStore/strings.japanese.js +10 -4
- package/dist/collection/components/store/translationStore/strings.korean.js +10 -4
- package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -3
- package/dist/collection/components/store/translationStore/strings.polish.js +9 -3
- package/dist/collection/components/store/translationStore/strings.portuguese.js +10 -4
- package/dist/collection/components/store/translationStore/strings.russian.js +10 -4
- package/dist/collection/components/store/translationStore/strings.spanish.js +10 -4
- package/dist/collection/components/store/translationStore/strings.swedish.js +10 -4
- package/dist/collection/components/store/translationStore/strings.turkish.js +10 -4
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -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.css +3 -0
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/esm/{cart-911ba5dd.js → cart-163f4dd9.js} +235 -76
- package/dist/esm/createCustomEvent-31a792d3.js +13 -0
- package/dist/esm/index.js +7 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-04a10fc2.js → paypal-77e8eef2.js} +1 -1
- package/dist/esm/zonos-address_7.entry.js +9 -9
- package/dist/esm/zonos-badge.entry.js +3 -3
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card.entry.js +4 -4
- package/dist/esm/zonos-cart-items_13.entry.js +125 -103
- package/dist/esm/zonos-checkout.entry.js +5 -5
- package/dist/esm/zonos-collapse.entry.js +2 -2
- 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_4.entry.js +9 -9
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +5 -5
- 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-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/cart-163f4dd9.js +1 -0
- package/dist/esm-es5/createCustomEvent-31a792d3.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-04a10fc2.js → paypal-77e8eef2.js} +1 -1
- package/dist/esm-es5/zonos-address_7.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- 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_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.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-toggle.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 +0 -5
- 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-checkout-finish/zonos-checkout-finish.d.ts +0 -1
- package/dist/types/components/store/checkout/stripe.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.base.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.french.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.german.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -3
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +0 -5
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-58832515.entry.js → p-019028d5.entry.js} +1 -1
- package/dist/zonos-elements/{p-939d363c.system.entry.js → p-02b1e030.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ba3d2965.entry.js → p-06e3c94f.entry.js} +1 -1
- package/dist/zonos-elements/{p-123cabaa.system.entry.js → p-0810568b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2a1475a4.system.entry.js → p-0a8b6b4a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-eaf09ccb.entry.js → p-0ad85ec6.entry.js} +1 -1
- package/dist/zonos-elements/p-110ee9ab.entry.js +1 -0
- package/dist/zonos-elements/{p-1e1397fe.entry.js → p-124f5c21.entry.js} +1 -1
- package/dist/zonos-elements/{p-796dbada.entry.js → p-1605dd48.entry.js} +1 -1
- package/dist/zonos-elements/{p-ee14ba06.system.entry.js → p-189aa06e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b8850092.entry.js → p-1a0e138c.entry.js} +1 -1
- package/dist/zonos-elements/{p-32c29205.system.entry.js → p-1c1ab3c8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1a9a51bf.entry.js → p-1c7e19f7.entry.js} +1 -1
- package/dist/zonos-elements/p-1dcaf64f.js +17 -0
- package/dist/zonos-elements/{p-9d678aea.system.js → p-281e9a06.system.js} +1 -1
- package/dist/zonos-elements/{p-6927d227.system.entry.js → p-2a0c4426.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-84d38e0c.entry.js → p-31acf417.entry.js} +1 -1
- package/dist/zonos-elements/{p-bfd73737.system.entry.js → p-3c90f724.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ff7b0d6b.system.entry.js → p-42b0fca8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9f89f828.system.entry.js → p-42d9d3af.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ae7526a2.system.entry.js → p-442a308c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-24813754.system.entry.js → p-46a71949.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e880ab28.system.js → p-49135023.system.js} +1 -1
- package/dist/zonos-elements/p-505f92e7.entry.js +1 -0
- package/dist/zonos-elements/{p-8b0feb0e.entry.js → p-58e6386b.entry.js} +1 -1
- package/dist/zonos-elements/p-5a011a47.system.js +1 -0
- package/dist/zonos-elements/p-605473a3.entry.js +1 -0
- package/dist/zonos-elements/p-64372f93.system.js +1 -0
- package/dist/zonos-elements/p-7b999a40.js +1 -0
- package/dist/zonos-elements/{p-8632c8f1.entry.js → p-8acdac29.entry.js} +1 -1
- package/dist/zonos-elements/{p-adbcf21c.entry.js → p-8cafdbc9.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4b5f123.entry.js → p-8e6bbf2c.entry.js} +1 -1
- package/dist/zonos-elements/{p-76a4a647.system.entry.js → p-8e85c28f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-45323a2f.system.entry.js → p-932cbdd7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1d15c126.entry.js → p-9d7a79e3.entry.js} +1 -1
- package/dist/zonos-elements/{p-c9e8f159.system.entry.js → p-a45bd823.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b7f627ec.system.entry.js → p-ab9af87d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-abc6b881.system.entry.js +1 -0
- package/dist/zonos-elements/{p-71fe8da9.entry.js → p-b34ccbfd.entry.js} +1 -1
- package/dist/zonos-elements/{p-d6de8661.entry.js → p-bcfc229f.entry.js} +1 -1
- package/dist/zonos-elements/p-c44f27be.js +1 -0
- package/dist/zonos-elements/{p-36eaad7e.entry.js → p-c598b3c5.entry.js} +1 -1
- package/dist/zonos-elements/{p-4eb3e354.entry.js → p-c652212b.entry.js} +1 -1
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/p-cf69d8c2.system.entry.js +1 -0
- package/dist/zonos-elements/{p-489029d9.system.entry.js → p-d3c1ad61.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e5d1d031.system.entry.js → p-d8a45014.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1b1f2e33.system.entry.js → p-e4a69ce9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0962536e.system.entry.js → p-e5e63927.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4069df3c.entry.js → p-f20b3656.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/createCustomEvent-4ea7b6dc.js +0 -51
- package/dist/esm/createCustomEvent-6ba5bcde.js +0 -47
- package/dist/esm-es5/cart-911ba5dd.js +0 -1
- package/dist/esm-es5/createCustomEvent-6ba5bcde.js +0 -1
- package/dist/zonos-elements/p-018a4b36.js +0 -1
- package/dist/zonos-elements/p-27188a22.system.entry.js +0 -1
- package/dist/zonos-elements/p-39c09f18.system.entry.js +0 -1
- package/dist/zonos-elements/p-60303c84.js +0 -1
- package/dist/zonos-elements/p-631570f0.system.js +0 -1
- package/dist/zonos-elements/p-8d98fed0.entry.js +0 -1
- package/dist/zonos-elements/p-a0af6dc1.entry.js +0 -1
- package/dist/zonos-elements/p-e2fa7600.entry.js +0 -1
- package/dist/zonos-elements/p-e9771827.system.js +0 -1
- package/dist/zonos-elements/p-ef9d6106.js +0 -17
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { d as cartStore,
|
|
2
|
+
import { d as cartStore, F as currencyFormat, o as translate, G as cartStoreHasOneEligibleItem, H as stripeStoreApplyPromoCode, I as stripeStoreRemovePromoCode, x as stripeStoreReset, j as stripeStore, J as stripeStoreRetrievePayment, t as trackConversionEvent, K as stripeStoreResetPromoCode, L as stripeStoreMessageBasedOnStatus, l as localizationStore, M as stripeStoreTranslateAddressToLatin, N as cartStoreUpdateSelectedShippingOption, O as cartStoreGetShippingTransitInfo, P as sortServiceLevelOptionsByAmount } from './cart-163f4dd9.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { s as submitGtag, b as paypalStore, c as paypalStoreReset, i as isContrastColor } from './paypal-
|
|
4
|
+
import { s as submitGtag, b as paypalStore, c as paypalStoreReset, i as isContrastColor } from './paypal-77e8eef2.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-7798ac16.js';
|
|
6
|
-
import {
|
|
6
|
+
import { c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-31a792d3.js';
|
|
7
7
|
import { g as getBorderRadius } from './getBorderRadius-e55a9df1.js';
|
|
8
|
-
import { h as handleFetch, s as sendErrorLog, j as jsonParse } from './handleFetch-3dea7d46.js';
|
|
8
|
+
import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, b as allLogs } from './handleFetch-3dea7d46.js';
|
|
9
9
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
10
10
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
11
11
|
import { i as isDarkColor, t as tinycolor } from './isDarkColor-4261bc3c.js';
|
|
@@ -1248,9 +1248,13 @@ const RemoveIcon = `<svg color="var(--zonos-elements-red-800)" fill="none" heigh
|
|
|
1248
1248
|
|
|
1249
1249
|
const SuccessIcon = `<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>`;
|
|
1250
1250
|
|
|
1251
|
-
const zonosCheckoutFinishCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:20px}:host .zonos--finish-details{max-width:536px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";
|
|
1251
|
+
const zonosCheckoutFinishCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:20px}:host .zonos--finish-details{max-width:536px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";
|
|
1252
1252
|
const ZonosCheckoutFinishStyle0 = zonosCheckoutFinishCss;
|
|
1253
1253
|
|
|
1254
|
+
/**
|
|
1255
|
+
* Maximum number of retries to pull order info (gap between each retry is 1 second)
|
|
1256
|
+
*/
|
|
1257
|
+
const MAX_RETRIES = 30;
|
|
1254
1258
|
const ZonosCheckoutFinish = class {
|
|
1255
1259
|
constructor(hostRef) {
|
|
1256
1260
|
registerInstance(this, hostRef);
|
|
@@ -1287,57 +1291,57 @@ const ZonosCheckoutFinish = class {
|
|
|
1287
1291
|
}
|
|
1288
1292
|
window.location.href = url;
|
|
1289
1293
|
};
|
|
1290
|
-
this.handleSuccessBehavior = () => {
|
|
1291
|
-
var _a, _b
|
|
1294
|
+
this.handleSuccessBehavior = async () => {
|
|
1295
|
+
var _a, _b;
|
|
1292
1296
|
/**
|
|
1293
1297
|
* Save placed order info so we can show order info if they try to place the order again
|
|
1294
1298
|
*/
|
|
1295
1299
|
this.saveOrderIdForDuplicationIssue();
|
|
1296
1300
|
const { successBehavior } = zonosStore.checkoutSettings;
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
}
|
|
1304
|
-
if (legacyOrderNumber) {
|
|
1305
|
-
queryParams.set('orderId', legacyOrderNumber);
|
|
1306
|
-
}
|
|
1307
|
-
const queryString = queryParams.toString();
|
|
1308
|
-
const hasQueryString = redirectUrl.includes('?');
|
|
1309
|
-
this.redirectToUrl(queryString
|
|
1310
|
-
? // Some url already has query string, so we need to append the query string with '&' instead of '?'
|
|
1311
|
-
`${redirectUrl}${hasQueryString ? '&' : '?'}${queryString}`
|
|
1312
|
-
: redirectUrl);
|
|
1313
|
-
}
|
|
1314
|
-
switch (successBehavior) {
|
|
1315
|
-
case 'REDIRECT_TO_SUCCESS_PAGE': {
|
|
1316
|
-
const settingsRedirectUrl = zonosStore.checkoutSettings.successRedirectUrl;
|
|
1301
|
+
switch (true) {
|
|
1302
|
+
// If the merchant wants to redirect to a different page
|
|
1303
|
+
case successBehavior === 'REDIRECT_TO_SUCCESS_PAGE':
|
|
1304
|
+
case !!cartStore.externalConfirmationPageURL: {
|
|
1305
|
+
const settingsRedirectUrl = cartStore.externalConfirmationPageURL ||
|
|
1306
|
+
zonosStore.checkoutSettings.successRedirectUrl;
|
|
1317
1307
|
const redirectUrl = settingsRedirectUrl;
|
|
1308
|
+
// use different default notification message if we are redirecting to a different page
|
|
1309
|
+
this.notificationTitle = translate('Order complete!');
|
|
1310
|
+
this.notificationMessages = [
|
|
1311
|
+
translate('Your order has been successfully placed.'),
|
|
1312
|
+
translate("You will be redirected back to the merchant's site in a few seconds."),
|
|
1313
|
+
];
|
|
1314
|
+
// stop loading spinner to show the redirecting notification
|
|
1315
|
+
this.isLoading = false;
|
|
1316
|
+
// override title if notification type is success
|
|
1317
|
+
this.useOverrideSuccessNotification();
|
|
1318
|
+
// attempt to pull order info before redirecting
|
|
1319
|
+
await this.getPullOrder();
|
|
1320
|
+
// If order is still not ready, should not redirect with no order id as merchant would show an error page and customer may think the order was not placed and retry
|
|
1321
|
+
if (!this.order) {
|
|
1322
|
+
return;
|
|
1323
|
+
}
|
|
1324
|
+
const legacyOrderNumber = ((_b = (_a = this.order.references) === null || _a === void 0 ? void 0 : _a.find(entry => (entry === null || entry === void 0 ? void 0 : entry.key) === 'zonosOrderNumber')) === null || _b === void 0 ? void 0 : _b.value) || null;
|
|
1318
1325
|
const queryParams = new URLSearchParams();
|
|
1319
|
-
if (
|
|
1326
|
+
if (this.order.id) {
|
|
1320
1327
|
queryParams.set('zOrderNumber', this.order.id);
|
|
1321
1328
|
}
|
|
1322
1329
|
if (legacyOrderNumber) {
|
|
1323
1330
|
queryParams.set('orderId', legacyOrderNumber);
|
|
1324
1331
|
}
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
?
|
|
1330
|
-
|
|
1331
|
-
: redirectUrl);
|
|
1332
|
-
}
|
|
1333
|
-
// If no redirect URL, break and display Zonos success page
|
|
1332
|
+
const queryString = queryParams.toString();
|
|
1333
|
+
const hasQueryString = redirectUrl.includes('?');
|
|
1334
|
+
this.redirectToUrl(queryString
|
|
1335
|
+
? // Some url already has query string, so we need to append the query string with '&' instead of '?'
|
|
1336
|
+
`${redirectUrl}${hasQueryString ? '&' : '?'}${queryString}`
|
|
1337
|
+
: redirectUrl);
|
|
1334
1338
|
break;
|
|
1335
1339
|
}
|
|
1336
|
-
case 'CLOSE_MODAL':
|
|
1337
|
-
|
|
1338
|
-
break;
|
|
1339
|
-
case 'ZONOS_SUCCESS_PAGE':
|
|
1340
|
+
case successBehavior === 'CLOSE_MODAL':
|
|
1341
|
+
case successBehavior === 'ZONOS_SUCCESS_PAGE':
|
|
1340
1342
|
default:
|
|
1343
|
+
// override title if notification type is success
|
|
1344
|
+
this.useOverrideSuccessNotification();
|
|
1341
1345
|
// Do nothing, display Zonos success page
|
|
1342
1346
|
this.isLoading = false;
|
|
1343
1347
|
break;
|
|
@@ -1346,44 +1350,67 @@ const ZonosCheckoutFinish = class {
|
|
|
1346
1350
|
// TODO: This method of pulling orders is temporary. Once we have a working event registry system, we will rely on that to tell us when the order is ready to trigger onOrderSuccess
|
|
1347
1351
|
this.getPullOrder = async (attempts = 0) => {
|
|
1348
1352
|
var _a, _b;
|
|
1353
|
+
if (attempts === 0) {
|
|
1354
|
+
log('=== Start to poll for order info', 'info');
|
|
1355
|
+
}
|
|
1349
1356
|
const { baseUrl, order } = await this.pullOrder();
|
|
1350
1357
|
const { isLegacyCheckout } = window.Zonos;
|
|
1351
1358
|
const foundLegacyOrderNumber = !!((_b = (_a = order === null || order === void 0 ? void 0 : order.references) === null || _a === void 0 ? void 0 : _a.find(entry => (entry === null || entry === void 0 ? void 0 : entry.key) === 'zonosOrderNumber')) === null || _b === void 0 ? void 0 : _b.value);
|
|
1352
|
-
|
|
1353
|
-
|
|
1359
|
+
const checkoutSessionId = cartStore.checkoutSessionId;
|
|
1360
|
+
const maxRetries = parseFloat(new URLSearchParams(window.location.search).get('maxPollingRetries') ||
|
|
1361
|
+
'0') || MAX_RETRIES;
|
|
1362
|
+
if (
|
|
1363
|
+
// Order found and was regular checkout user
|
|
1364
|
+
(order && !isLegacyCheckout) ||
|
|
1365
|
+
// Order found, in legacy checkout facade and still haven't found the legacy order number
|
|
1366
|
+
(order && attempts >= maxRetries) ||
|
|
1367
|
+
// Legacy order number is ready in the order
|
|
1354
1368
|
foundLegacyOrderNumber) {
|
|
1355
|
-
|
|
1369
|
+
log('=== Order info found', 'info');
|
|
1370
|
+
if (isLegacyCheckout && order && !foundLegacyOrderNumber) {
|
|
1356
1371
|
// We pushed this one through without the legacy order number, so we should log this
|
|
1357
|
-
const checkoutSessionId = cartStore.checkoutSessionId;
|
|
1358
1372
|
void sendErrorLog({
|
|
1359
|
-
endpoint: `${baseUrl}/api/zonos-elements/get-order?checkoutSessionId=${checkoutSessionId}&orderId=${order
|
|
1360
|
-
errors: [
|
|
1373
|
+
endpoint: `${baseUrl}/api/zonos-elements/get-order?checkoutSessionId=${checkoutSessionId}&orderId=${order.id}`,
|
|
1374
|
+
errors: [
|
|
1375
|
+
`Order found but legacy order number doesn’t exist after ${maxRetries} attempts`,
|
|
1376
|
+
],
|
|
1361
1377
|
metadata: {
|
|
1378
|
+
allLogs,
|
|
1362
1379
|
checkoutSessionId: cartStore.checkoutSessionId || '',
|
|
1363
1380
|
domain: window.location.hostname,
|
|
1364
|
-
orderId:
|
|
1381
|
+
orderId: order.id,
|
|
1382
|
+
storeId: zonosStore.storeId,
|
|
1383
|
+
},
|
|
1384
|
+
});
|
|
1385
|
+
return;
|
|
1386
|
+
}
|
|
1387
|
+
else if (attempts > 10) {
|
|
1388
|
+
// Log out all the logs if we have tried more than 10 times
|
|
1389
|
+
void sendErrorLog({
|
|
1390
|
+
endpoint: `${baseUrl}/api/zonos-elements/get-order?checkoutSessionId=${checkoutSessionId}&orderId=${order.id}`,
|
|
1391
|
+
errors: [`Order found after ${attempts} attempts`],
|
|
1392
|
+
metadata: {
|
|
1393
|
+
allLogs,
|
|
1394
|
+
checkoutSessionId: cartStore.checkoutSessionId || '',
|
|
1395
|
+
domain: window.location.hostname,
|
|
1396
|
+
orderId: order.id,
|
|
1365
1397
|
storeId: zonosStore.storeId,
|
|
1366
1398
|
},
|
|
1367
1399
|
});
|
|
1368
1400
|
}
|
|
1369
|
-
void trackConversionEvent('checkout_orderCompleted');
|
|
1370
1401
|
this.order = order;
|
|
1371
|
-
this.handleSuccessBehavior();
|
|
1372
1402
|
}
|
|
1373
|
-
else if ((!order || !foundLegacyOrderNumber) && attempts <
|
|
1403
|
+
else if ((!order || !foundLegacyOrderNumber) && attempts < maxRetries) {
|
|
1374
1404
|
// Wait for 1 second before the next attempt
|
|
1375
1405
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
1376
1406
|
await this.getPullOrder(attempts + 1);
|
|
1377
1407
|
}
|
|
1378
1408
|
else {
|
|
1379
|
-
// Set loading to false to display generic success page and log error
|
|
1380
|
-
this.isLoading = false;
|
|
1381
|
-
void trackConversionEvent('checkout_orderCompleted');
|
|
1382
|
-
const checkoutSessionId = cartStore.checkoutSessionId;
|
|
1383
1409
|
void sendErrorLog({
|
|
1384
1410
|
endpoint: `${baseUrl}/api/zonos-elements/get-order?checkoutSessionId=${checkoutSessionId}`,
|
|
1385
|
-
errors: [
|
|
1411
|
+
errors: [`Order not found after ${maxRetries} attempts`],
|
|
1386
1412
|
metadata: {
|
|
1413
|
+
allLogs,
|
|
1387
1414
|
checkoutSessionId: cartStore.checkoutSessionId || '',
|
|
1388
1415
|
domain: window.location.hostname,
|
|
1389
1416
|
storeId: zonosStore.storeId,
|
|
@@ -1393,22 +1420,18 @@ const ZonosCheckoutFinish = class {
|
|
|
1393
1420
|
};
|
|
1394
1421
|
// If user provide override notification text, use it
|
|
1395
1422
|
this.useOverrideSuccessNotification = () => {
|
|
1396
|
-
const {
|
|
1423
|
+
const { successPageSubtitleText, successPageTitleText } = zonosStore.checkoutSettings;
|
|
1397
1424
|
if (successPageTitleText) {
|
|
1398
1425
|
this.notificationTitle = successPageTitleText;
|
|
1399
1426
|
}
|
|
1400
1427
|
if (successPageSubtitleText) {
|
|
1401
1428
|
this.notificationMessages = successPageSubtitleText;
|
|
1402
1429
|
}
|
|
1403
|
-
if (successPageActionText) {
|
|
1404
|
-
this.notificationActionText = successPageActionText;
|
|
1405
|
-
}
|
|
1406
1430
|
};
|
|
1407
1431
|
this.checkStripePaymentStatus = async () => {
|
|
1408
|
-
this.isLoading = true;
|
|
1409
1432
|
const clientSecret = new URLSearchParams(window.location.search).get('payment_intent_client_secret') || stripeStore.clientSecret;
|
|
1410
1433
|
if (clientSecret || this.storybookForceStatus) {
|
|
1411
|
-
const { error, messages,
|
|
1434
|
+
const { error, messages, paymentIntentId, status } = await stripeStoreRetrievePayment({
|
|
1412
1435
|
clientSecret,
|
|
1413
1436
|
storybookForceStatus: this.storybookForceStatus,
|
|
1414
1437
|
});
|
|
@@ -1417,38 +1440,41 @@ const ZonosCheckoutFinish = class {
|
|
|
1417
1440
|
this.notificationTitle = error
|
|
1418
1441
|
? translate('Payment failed')
|
|
1419
1442
|
: translate("You're all set!");
|
|
1420
|
-
|
|
1443
|
+
// Payment doesn't go through
|
|
1444
|
+
if (error && (messages === null || messages === void 0 ? void 0 : messages.length)) {
|
|
1421
1445
|
submitGtag('zonos-checkout-payment-fail');
|
|
1446
|
+
void sendErrorLog({
|
|
1447
|
+
endpoint: 'Stripe payment failed',
|
|
1448
|
+
errors: [
|
|
1449
|
+
`Payment intent "${paymentIntentId}" status: ${status} - checkout session: ${cartStore.checkoutSessionId}`,
|
|
1450
|
+
],
|
|
1451
|
+
metadata: {
|
|
1452
|
+
allLogs,
|
|
1453
|
+
credentialToken: window.Zonos.zonosApiKey,
|
|
1454
|
+
},
|
|
1455
|
+
});
|
|
1422
1456
|
}
|
|
1423
1457
|
else {
|
|
1458
|
+
// Save new order info in case the user reloads before we get order info
|
|
1459
|
+
this.saveOrderIdForDuplicationIssue();
|
|
1424
1460
|
submitGtag('zonos-checkout-success');
|
|
1425
|
-
void trackConversionEvent('
|
|
1426
|
-
paymentMethod,
|
|
1427
|
-
});
|
|
1461
|
+
void trackConversionEvent('checkout_orderCompleted');
|
|
1428
1462
|
const successEvent = createCustomEvent('zonos-checkout-success', {
|
|
1429
1463
|
message: 'Zonos Checkout successfully processed order',
|
|
1430
1464
|
});
|
|
1431
1465
|
document.dispatchEvent(successEvent);
|
|
1432
|
-
}
|
|
1433
|
-
// Attempt to pull the order details from the graph every second on 5 attempts. Only pull if checkoutSessionId is available
|
|
1434
|
-
if (this.notificationType === 'success' && cartStore.checkoutSessionId) {
|
|
1435
|
-
// override title if notification type is success
|
|
1436
|
-
this.useOverrideSuccessNotification();
|
|
1437
1466
|
// wait this to finish before resetting store and checkout session id
|
|
1438
|
-
await this.
|
|
1467
|
+
await this.handleSuccessBehavior();
|
|
1439
1468
|
}
|
|
1440
|
-
else {
|
|
1441
|
-
this.isLoading = false;
|
|
1442
|
-
}
|
|
1443
|
-
}
|
|
1444
|
-
else {
|
|
1445
|
-
this.isLoading = false;
|
|
1446
1469
|
}
|
|
1470
|
+
// Make sure to stop the loading spinner even when there's an error
|
|
1471
|
+
this.isLoading = false;
|
|
1472
|
+
// reset promo when checkout is finished
|
|
1473
|
+
stripeStoreResetPromoCode();
|
|
1447
1474
|
stripeStoreReset();
|
|
1448
1475
|
cartStore.checkoutSessionId = null;
|
|
1449
1476
|
};
|
|
1450
1477
|
this.checkPaypalPaymentStatus = async () => {
|
|
1451
|
-
this.isLoading = true;
|
|
1452
1478
|
// render error message if there's an error
|
|
1453
1479
|
if (paypalStore.paypalErrorMessage) {
|
|
1454
1480
|
this.notificationType = 'error';
|
|
@@ -1457,6 +1483,8 @@ const ZonosCheckoutFinish = class {
|
|
|
1457
1483
|
this.isLoading = false;
|
|
1458
1484
|
return;
|
|
1459
1485
|
}
|
|
1486
|
+
// show success message right away when order id is already created
|
|
1487
|
+
this.isLoading = false;
|
|
1460
1488
|
if (paypalStore.orderIdCreated) {
|
|
1461
1489
|
this.notificationType = 'success';
|
|
1462
1490
|
this.notificationTitle = translate("You're all set!");
|
|
@@ -1465,11 +1493,10 @@ const ZonosCheckoutFinish = class {
|
|
|
1465
1493
|
// override title if notification type is success
|
|
1466
1494
|
this.useOverrideSuccessNotification();
|
|
1467
1495
|
// wait this to finish before resetting store and checkout session id
|
|
1468
|
-
await this.
|
|
1496
|
+
await this.handleSuccessBehavior();
|
|
1469
1497
|
}
|
|
1470
1498
|
// reset promo when checkout is finished
|
|
1471
1499
|
stripeStoreResetPromoCode();
|
|
1472
|
-
this.isLoading = false;
|
|
1473
1500
|
stripeStoreReset();
|
|
1474
1501
|
paypalStoreReset();
|
|
1475
1502
|
cartStore.checkoutSessionId = null;
|
|
@@ -1498,10 +1525,11 @@ const ZonosCheckoutFinish = class {
|
|
|
1498
1525
|
this.notificationType = 'success';
|
|
1499
1526
|
this.notificationTitle = '';
|
|
1500
1527
|
this.notificationMessages = [];
|
|
1501
|
-
this.notificationActionText = translate('Keep shopping');
|
|
1502
1528
|
this.order = null;
|
|
1503
1529
|
}
|
|
1504
1530
|
componentDidLoad() {
|
|
1531
|
+
// Reset local storage for placed order info
|
|
1532
|
+
localStorage.removeItem('zonos--placed-order-info');
|
|
1505
1533
|
if (this.overrideNotification) {
|
|
1506
1534
|
// just show the notification and don't check any of the payment status
|
|
1507
1535
|
this.notificationType = this.overrideNotification.type;
|
|
@@ -1510,8 +1538,6 @@ const ZonosCheckoutFinish = class {
|
|
|
1510
1538
|
this.isLoading = false;
|
|
1511
1539
|
return;
|
|
1512
1540
|
}
|
|
1513
|
-
// Save order info in case the user reloads before we get order info
|
|
1514
|
-
this.saveOrderIdForDuplicationIssue();
|
|
1515
1541
|
if (paypalStore.orderIdCreated) {
|
|
1516
1542
|
void this.checkPaypalPaymentStatus();
|
|
1517
1543
|
}
|
|
@@ -1520,16 +1546,12 @@ const ZonosCheckoutFinish = class {
|
|
|
1520
1546
|
}
|
|
1521
1547
|
}
|
|
1522
1548
|
render() {
|
|
1523
|
-
var _a, _b, _c, _d;
|
|
1524
|
-
const orderId = ((_a = this.order) === null || _a === void 0 ? void 0 : _a.accountOrderNumber) ||
|
|
1525
|
-
((_d = (_c = (_b = this.order) === null || _b === void 0 ? void 0 : _b.references) === null || _c === void 0 ? void 0 : _c.find(ref => ref.key === 'zonosOrderNumber')) === null || _d === void 0 ? void 0 : _d.value) ||
|
|
1526
|
-
null;
|
|
1527
1549
|
const isTestMode = getIsTestMode();
|
|
1528
|
-
return (h(Host, { key: '
|
|
1550
|
+
return (h(Host, { key: 'a255ef40504c8e569b44dcdde6a8026745f38c9f', class: "zonos--checkout-finish zonos--elements", style: {
|
|
1529
1551
|
'--border-radius': getBorderRadius({
|
|
1530
1552
|
overrideBorderStyle: this.borderRadius,
|
|
1531
1553
|
}),
|
|
1532
|
-
} },
|
|
1554
|
+
} }, !this.isLoading && (h("div", { key: 'a14c5a6476b6d77c8b070239b3dbf3b1248d91a1', class: "zonos--finish-details" }, h("div", { key: '7d1d11bc6d1648f6e05fa08c8afa38df2db4f773', 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: '6e2b00afd313f4724cbd0e3c0ff6d099a4eb0423', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: '89ddff1e318401adcc01a1883628651688a39338', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null)))))), isTestMode && cartStore.step === 'finish' && (h("div", { key: '078de76fc1c106538d8ac586edc831639b94e2e1', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: '30b68c106ad0eada43b8fadd0b20738d63af0f24', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: 'a8d092e0a2084ed2c1e2342a7aaf06bf309b559b', onClick: () => this.redirectToUrl(`/orders/all`), size: "lg", variant: "primary" }, "View order in Dashboard")))))));
|
|
1533
1555
|
}
|
|
1534
1556
|
static get assetsDirs() { return ["assets"]; }
|
|
1535
1557
|
};
|
|
@@ -1577,10 +1599,10 @@ const ZonosCheckoutFooter = class {
|
|
|
1577
1599
|
const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
|
|
1578
1600
|
// reverse color when on desktop. With the coversheet backdrop, the color should be white
|
|
1579
1601
|
const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-1000';
|
|
1580
|
-
return (h(Host, { key: '
|
|
1602
|
+
return (h(Host, { key: 'c84407b445b03673c739e526407d5daece2465c1', class: classes(['zonos--elements', this.isMobile && 'mobile']) }, h("div", { key: 'de44554ef9af66b36e957ffc7c03c3102eb54289', class: "zonos--checkout-footer" }, h("div", { key: 'c045ebefdfe7e0c78f003ba25478297713726adc', class: "zonos--checkout-locale-wrapper" }, h("zonos-button", { key: 'f9028e5d572a8563f4b223edf28554ecc6bc79a2', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, languageLabel), h("div", { key: 'efa7bd0f7ff692d10eddacdcd922eefd8734dcde', class: classes([
|
|
1581
1603
|
'zonos--checkout-footer-dialog',
|
|
1582
1604
|
this.showLanguageDialog && 'zonos--checkout-footer-dialog-open',
|
|
1583
|
-
]) }, h("zonos-language-select", { key: '
|
|
1605
|
+
]) }, h("zonos-language-select", { key: '4086571d445ad29f824975a6ad107d1351302d78', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: 'f16a9caea53befe23f6fc6f5690635d9cd6e196b', class: "zonos--checkout-footer-icon-wrapper" }, h("a", { key: '5ca1a5aadf50bb038209a505b8bece798c92efc5', href: "https://zonos.com/docs/legal/zonos-privacy-policy", target: "_blank" }, h("zonos-text", { key: 'c60d81728e5ebdddea08429eae156e312e407d35', textColor: colorDesktop }, "Privacy policy")), h("div", { key: 'e50935aea98312ab3ffd3c04e8155843e802791a', class: "zonos--checkout-footer-logo" }, h("zonos-text", { key: 'b8e10c2d63cf5bade264213ae2e37639b10347ae', textColor: colorDesktop }, "Powered by"), h("a", { key: '5f4ad624ac59e6e59d0bc73f70eb98399009cf1a', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: 'db358784c050fedfb7b0e4e02ca54c9926691963', autoHeight: true, content: ZonosIcon, iconColor: colorDesktop, size: 108 })))))));
|
|
1584
1606
|
}
|
|
1585
1607
|
get el() { return getElement(this); }
|
|
1586
1608
|
static get watchers() { return {
|
|
@@ -1749,17 +1771,17 @@ const ZonosCheckoutProgressTabs = class {
|
|
|
1749
1771
|
color: labelSelectedColor,
|
|
1750
1772
|
})
|
|
1751
1773
|
: labelSelectedColor;
|
|
1752
|
-
return (h(Host, { key: '
|
|
1774
|
+
return (h(Host, { key: 'cb720c17828585b4e5235c0695d1887efacfc232', class: "zonos--elements", style: {
|
|
1753
1775
|
'--color': contrastLabelColor,
|
|
1754
1776
|
'--progress-percent': this.getTotalSuccessStep(),
|
|
1755
|
-
} }, h("div", { key: '
|
|
1777
|
+
} }, h("div", { key: '3249121ebbb26b8a377f0fdf39700e5098374bae', class: "zonos--tab-wrapper" }, Object.values(cartStore.tabItems).map((tab, index) => {
|
|
1756
1778
|
const isSelected = tab.value === selectedStep;
|
|
1757
1779
|
return (h("button", { class: classes([
|
|
1758
1780
|
'zonos--tab-item',
|
|
1759
1781
|
tab.value === selectedStep && 'selected',
|
|
1760
1782
|
tab.isDone && 'done',
|
|
1761
1783
|
]), disabled: !this.isTabClickable(tab.value), key: tab.value, onClick: () => (cartStore.step = tab.value) }, h("div", { class: "zonos--tab-index" }, h("zonos-text", { class: "zonos--tab-index-label", textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, index + 1), h("zonos-icon", { class: "zonos--tab-index-done-icon", content: TabCheckmark, iconColor: isSelected ? contrastLabelColor : 'gray-1000' })), h("zonos-text", { textColor: isSelected ? contrastLabelColor : 'gray-1000', type: "label" }, translate(tab.label))));
|
|
1762
|
-
})), h("div", { key: '
|
|
1784
|
+
})), h("div", { key: 'da31d2d0a835182509a8199dc4fa9f1278be23e1', class: "zonos--tab-progress" }, h("div", { key: '6523c3e32b0926915b7d06f9cb19f6fc427c0e84', class: "zonos--progress-bar-fill" }))));
|
|
1763
1785
|
}
|
|
1764
1786
|
static get assetsDirs() { return ["assets"]; }
|
|
1765
1787
|
get ele() { return getElement(this); }
|
|
@@ -1861,13 +1883,13 @@ const ZonosConfirmDialog = class {
|
|
|
1861
1883
|
const borderStyle = getBorderRadius();
|
|
1862
1884
|
// Get theme for the update dialog, inherit from the theme, no from this component theme
|
|
1863
1885
|
const theme = getZonosStoreTheme(zonosStore.appearance.theme);
|
|
1864
|
-
return (h(Host, { key: '
|
|
1886
|
+
return (h(Host, { key: '2ae28cccbc55249c415bdeb1f3b6ebfcd16705fd', class: classes([this.dialogOpen && 'open', 'zonos--elements']), "data-dialog-type": this.dialogType, "data-theme": theme, style: {
|
|
1865
1887
|
'--border-radius': borderStyle,
|
|
1866
1888
|
'--dialog-width': `${this.dialogWidth}px`,
|
|
1867
1889
|
'--font-family': zonosStoreFontFamily(),
|
|
1868
|
-
} }, h("div", { key: '
|
|
1890
|
+
} }, h("div", { key: '6887502fc45f8726e00875c1533853f170d61b69', class: "zonos--backdrop", tabIndex: -1 }), h("div", { key: '9e303d17187cf0c8d281e4faa9ad65704b7b5f56', "aria-hidden": "true", class: classes(['zonos--confirm-layout', this.dialogIntent]), onClick: e => this.clickOutsideDialogHandler(e) }, h("div", { key: '2a7a8633c62e14bb134ebb6cd08050a558498afc', class: "zonos--confirm-dialog", onBlur: () => {
|
|
1869
1891
|
this.focusDialog();
|
|
1870
|
-
} }, h("div", { key: '
|
|
1892
|
+
} }, h("div", { key: '738395a26d051c099893c9d186e711742b87fd0d', class: "wrapper" }, h("div", { key: '6037c59790568e095c42fabd6bc2c02d026e36de', class: "icon-wrapper" }, this.renderIcon()), h("div", { key: '0db72c9e8702e642e6eba5d81d2560f69491742e', class: "content" }, h("div", { key: 'a6e25a16aba531ed8e4f0400c44df1ef5f3bd968', class: "title" }, h("zonos-text", { key: '8d572ed39778bb406bf69791fe8c8685c03a884f', type: "subheader" }, this.dialogTitle)), this.dialogSubtitle && (h("div", { key: 'c4a57430c8fc7003be681857f4a5a5c9588c4a38', class: "subtitle" }, h("zonos-text", { key: '73d8b2ca508ab2e022b92f12a0f6bbc0d4c6abe2', textColor: "gray-800" }, this.dialogSubtitle)))), h("div", { key: 'f7c52a24a3ed7ca4ac63b57dc38dc67b6272d9f3', class: "footer" }, this.dialogType === 'confirm' && (h("zonos-button", { key: '50906e6744254cb190e0e13e51c7509f3560623e', backgroundColor: "gray-0", class: "cancel-button", onClick: () => this.closeDialogHandler(), size: "lg", withBoxShadow: true }, this.dialogCancelBtnText || translate('Cancel'))), h("zonos-button", { key: '9b25a61bca74e9ee10e5f9057232faf3507acbe8', class: "confirm-button", onClick: () => this.confirmDialogHandler(), size: "lg", variant: this.getButtonConfirmVariant() }, this.dialogConfirmBtnText)))))));
|
|
1871
1893
|
}
|
|
1872
1894
|
static get assetsDirs() { return ["assets"]; }
|
|
1873
1895
|
get el() { return getElement(this); }
|
|
@@ -2121,11 +2143,11 @@ const ZonosRestState = class {
|
|
|
2121
2143
|
}
|
|
2122
2144
|
render() {
|
|
2123
2145
|
const imageUrl = this.getImageRestState();
|
|
2124
|
-
return (h(Host, { key: '
|
|
2146
|
+
return (h(Host, { key: 'e27bb400718152b275761f858f8667474d452b09', class: classes(['zonos--elements zonos--restState']), style: {
|
|
2125
2147
|
'--font-family': zonosStoreFontFamily(),
|
|
2126
|
-
} }, h("div", { key: '
|
|
2148
|
+
} }, h("div", { key: '4b00e2becf4fe8ea79be85e3053a8e60b0c56929', class: "zonos--restState-image" }, h("img", { key: 'ff7cc6756987eb4a1270157b8b8477b01b6c9aca', alt: this.restStateType, onError: () => {
|
|
2127
2149
|
this.isErrorImageLoad = true;
|
|
2128
|
-
}, src: imageUrl })), h("div", { key: '
|
|
2150
|
+
}, src: imageUrl })), h("div", { key: '0e941e59df893963592951660017530ae64f5176', class: "content" }, h("zonos-text", { key: '99827682fe5a3c5a55dbb8abffac070a1cfdb3a2', class: "title", type: "boldSubheader" }, this.restStateTitle), h("zonos-text", { key: '9d052f43dc1d5955250e63e231479773d418f8f9', class: "subtitle" }, this.restStateSubtitle)), h("div", { key: 'd43236e1e2d25636985da4b44761a5dd86ea1f4b', class: "action" }, h("slot", { key: 'c4b89eb985e3a0d9805e67ea6f7e2cdf4cd3560f' }))));
|
|
2129
2151
|
}
|
|
2130
2152
|
static get assetsDirs() { return ["assets"]; }
|
|
2131
2153
|
};
|
|
@@ -2376,13 +2398,13 @@ const ZonosShipping = class {
|
|
|
2376
2398
|
if (this.showErrorBanner) {
|
|
2377
2399
|
this.showErrorBanner = !this.handleValidate();
|
|
2378
2400
|
}
|
|
2379
|
-
return (h(Host, { key: '
|
|
2401
|
+
return (h(Host, { key: '7b16a998c47d1e834c1de3aaac030461e38e43d5', class: "zonos--shipping zonos--elements" }, h("div", { key: '796d1d43d1a409b6b94a8faa3a41bcfb8d26aeb2', class: "zonos--group" }, h("zonos-text", { key: '78629e22a49733794d6ac3bd56bd48c5c7a2ff5a', class: "zonos--title", type: "semiBoldSubheader" }, translate('Delivery options')), this.showErrorBanner && !!this.serviceLevelsAll.length && (h("zonos-banner", { key: 'fc0367bfad972e86f0f78fd7ac279c69aa51aeb8', class: "zonos--error-banner", intent: "error" }, translate('No shipping method selected'))), h("zonos-text", { key: 'e79faacea340e54ee6fcde62073d87960dfbfbcf', class: "zonos--shipping-method-title", type: "semiBoldLabel" }, translate('Shipping method')), !this.serviceLevelsAll.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.'), class: "zonos--shipping-method-error", intent: "error" })) : (h("div", { class: "zonos--shipping-options-wrapper" }, h("zonos-shipping-rich-radio", { items: defaultShownServiceLevels, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }), !!defaultShownServiceLevels.length &&
|
|
2380
2402
|
!!this.serviceLevelsDAP.length && (h("button", { class: classes([
|
|
2381
2403
|
'zonos--shipping-options-collapse-trigger',
|
|
2382
2404
|
this.collapsedDAPOptions && 'collapsed',
|
|
2383
2405
|
]), onClick: () => {
|
|
2384
2406
|
this.collapsedDAPOptions = !this.collapsedDAPOptions;
|
|
2385
|
-
} }, h("div", { class: "zonos--title-wrapper" }, h("zonos-text", { type: "label" }, `${translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), h("zonos-icon", { content: ChevronUpIcon })))), h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, h("div", { class: "zonos--dap-wrapper" }, h("zonos-banner", { bannerTitle: translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, translate('You may incur additional fees from the shipping carrier by not prepaying.')), h("zonos-shipping-rich-radio", { items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }))))), h("div", { key: '
|
|
2407
|
+
} }, h("div", { class: "zonos--title-wrapper" }, h("zonos-text", { type: "label" }, `${translate(this.collapsedDAPOptions ? 'Show non-prepaid options' : 'Hide non-prepaid options')} `), h("zonos-icon", { content: ChevronUpIcon })))), h("zonos-collapse", { collapsed: this.collapsedDAPOptions }, h("div", { class: "zonos--dap-wrapper" }, h("zonos-banner", { bannerTitle: translate('Duties and taxes will be charged upon delivery.'), intent: "warning" }, translate('You may incur additional fees from the shipping carrier by not prepaying.')), h("zonos-shipping-rich-radio", { items: this.serviceLevelsDAP, onRadioSelected: e => this.handleRadioSelected(e), selectedItem: this.selectedShippingMethod }))))), h("div", { key: '03c7dc8d310db7dc161b064a1f384034e8b5a067', class: "zonos--group-btn" }, h("zonos-button", { key: '33d4afb9f86b8f8e5a8843c2ccfefac3e9ec1d76', backgroundColor: this.submitBtnColor, loading: this.continueLoading || this.isSelecting, onClick: () => this.continueClickHandler(), size: "lg",
|
|
2386
2408
|
// use primary type when on mobile mode
|
|
2387
2409
|
variant: this.submitBtnType }, translate('Go to payment'))))));
|
|
2388
2410
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-86b8247e.js';
|
|
2
|
-
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, n as cartStoreUpdateToErrorState,
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript } from './paypal-
|
|
2
|
+
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStore, k as stripeStoreInitCheckoutSession, m as cartStoreStartCheckoutInterval, t as trackConversionEvent, n as cartStoreUpdateToErrorState, o as translate, p as getZCountryUrlParam, q as cartStoreSetCheckoutSession, r as stripeStorePrefetchLandedCost, u as cartStoreNextStep, v as stripeStoreHandleInventoryCheck, w as stripeStoreConfirmPayment, x as stripeStoreReset, y as localizationStoreOnUpdate } from './cart-163f4dd9.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript } from './paypal-77e8eef2.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-7798ac16.js';
|
|
5
5
|
import { h as handleFetch, l as log, a as logError, s as sendErrorLog, g as getElapsedTime, b as allLogs, j as jsonParse } from './handleFetch-3dea7d46.js';
|
|
6
|
-
import {
|
|
6
|
+
import { c as createCustomEvent, g as getIsTestMode } from './createCustomEvent-31a792d3.js';
|
|
7
7
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
8
8
|
import { c as classes } from './classes-0d95c529.js';
|
|
9
9
|
import { g as getBorderRadius } from './getBorderRadius-e55a9df1.js';
|
|
@@ -242,8 +242,8 @@ const ZonosCheckoutStyle0 = zonosCheckoutCss;
|
|
|
242
242
|
|
|
243
243
|
// 90 minutes
|
|
244
244
|
const CHECKOUT_SESSION_TIMEOUT = 90 * 60 * 1000;
|
|
245
|
-
//
|
|
246
|
-
const ORDER_DUPLICATION_NOTIFICATION_EXPIRATION =
|
|
245
|
+
// 6 hours
|
|
246
|
+
const ORDER_DUPLICATION_NOTIFICATION_EXPIRATION = 6 * 60 * 60 * 1000;
|
|
247
247
|
const ZonosCheckout = class {
|
|
248
248
|
constructor(hostRef) {
|
|
249
249
|
registerInstance(this, hostRef);
|
|
@@ -46,10 +46,10 @@ const ZonosCollapse = class {
|
|
|
46
46
|
// set overflow to hidden to prevent content from showing when collapsed
|
|
47
47
|
this.el.style.overflow = 'hidden';
|
|
48
48
|
}
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '22d1cfa07362c868ff1b58315789d3d65bcce556', class: 'zonos--elements zonos--collapse', style: {
|
|
50
50
|
'--font-family': zonosStoreFontFamily(),
|
|
51
51
|
height: this.getElementHeight(),
|
|
52
|
-
} }, h("div", { key: '
|
|
52
|
+
} }, h("div", { key: 'fa8c388a6497311d4dd4989e3f9ad2f7f3b8ee82' }, h("iframe", { key: 'b93e841bc726709fdca538d7fed38e09470c3ff5', class: "height-change-listener", tabindex: "-1", title: "collapse-height-change-listener" }), h("slot", { key: 'aac6f96a0d928d372248f3fa1a906cd764f6e0d3' }))));
|
|
53
53
|
}
|
|
54
54
|
get el() { return getElement(this); }
|
|
55
55
|
};
|
|
@@ -18,7 +18,7 @@ const ZonosComponent = class {
|
|
|
18
18
|
return format(this.first, this.middle, this.last);
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return h("div", { key: '
|
|
21
|
+
return h("div", { key: '63b0c771133fd495f36e2c67601d64d6e56f5f2b' }, "Hello, World! I'm ", this.getText());
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
ZonosComponent.style = ZonosComponentStyle0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-86b8247e.js';
|
|
2
|
-
import {
|
|
2
|
+
import { z as isValidSelector, j as stripeStore, A as initLocalizationStore, d as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-163f4dd9.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-7798ac16.js';
|
|
4
4
|
import { h as handleFetch, a as logError, l as log } from './handleFetch-3dea7d46.js';
|
|
5
5
|
import './isDarkColor-4261bc3c.js';
|
|
@@ -328,7 +328,7 @@ const ZonosController = class {
|
|
|
328
328
|
zonosStore.organizationName = organizationName;
|
|
329
329
|
}
|
|
330
330
|
render() {
|
|
331
|
-
return h(Host, { key: '
|
|
331
|
+
return h(Host, { key: 'f2d050c785576dde681a5df55ba24bc42436375f', class: "zonos--elements" });
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
334
|
ZonosController.style = ZonosControllerStyle0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-86b8247e.js';
|
|
2
|
-
import { l as localizationStore } from './cart-
|
|
2
|
+
import { l as localizationStore } from './cart-163f4dd9.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-7798ac16.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './handleFetch-3dea7d46.js';
|