@zonos/elements 1.3.25 → 1.3.27
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-ab3b679e.js → cart-61caeb84.js} +472 -168
- package/dist/cjs/{getBorderRadius-ea0984bb.js → getBorderRadius-074b46ef.js} +1 -1
- package/dist/cjs/index.cjs.js +3 -54
- package/dist/cjs/{isDarkColor-b14d5752.js → isDarkColor-371a3b1a.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-1471da9f.js → submitGtag-d3898668.js} +2 -2
- package/dist/cjs/zonos-address_8.cjs.entry.js +6 -6
- package/dist/cjs/zonos-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +29 -12
- package/dist/cjs/zonos-checkout.cjs.entry.js +52 -6
- package/dist/cjs/zonos-controller.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +6 -6
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +61 -24
- package/dist/cjs/zonos-hello.cjs.entry.js +19 -12
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +5 -5
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-3958bbeb.js → zonosStore-4c6c85da.js} +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +20 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +49 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +8 -8
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +15 -8
- 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 +54 -20
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/hello/localization.js +9 -5
- package/dist/collection/components/store/translationStore/strings.arabic.js +23 -8
- package/dist/collection/components/store/translationStore/strings.base.js +23 -8
- package/dist/collection/components/store/translationStore/strings.chinese.js +23 -8
- package/dist/collection/components/store/translationStore/strings.danish.js +23 -8
- package/dist/collection/components/store/translationStore/strings.dutch.js +23 -8
- package/dist/collection/components/store/translationStore/strings.french.js +23 -8
- package/dist/collection/components/store/translationStore/strings.german.js +23 -8
- package/dist/collection/components/store/translationStore/strings.hebrew.js +23 -8
- package/dist/collection/components/store/translationStore/strings.indonesian.js +23 -8
- package/dist/collection/components/store/translationStore/strings.italian.js +23 -8
- package/dist/collection/components/store/translationStore/strings.japanese.js +23 -8
- package/dist/collection/components/store/translationStore/strings.korean.js +23 -8
- package/dist/collection/components/store/translationStore/strings.norwegian.js +23 -8
- package/dist/collection/components/store/translationStore/strings.polish.js +23 -8
- package/dist/collection/components/store/translationStore/strings.portuguese.js +23 -8
- package/dist/collection/components/store/translationStore/strings.russian.js +23 -8
- package/dist/collection/components/store/translationStore/strings.spanish.js +23 -8
- package/dist/collection/components/store/translationStore/strings.swedish.js +23 -8
- package/dist/collection/components/store/translationStore/strings.turkish.js +23 -8
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +23 -8
- package/dist/collection/components/store/zonosStore.js +1 -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/wrapStringWithLink.js +3 -0
- package/dist/collection/scripts/_zonosBase.js +0 -51
- package/dist/esm/{cart-564ab33a.js → cart-530a8750.js} +472 -168
- package/dist/esm/{getBorderRadius-5e5a5800.js → getBorderRadius-947c24de.js} +1 -1
- package/dist/esm/index.js +3 -54
- package/dist/esm/{isDarkColor-5185b62c.js → isDarkColor-f8324c10.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-90ebe7d0.js → submitGtag-44ba0846.js} +2 -2
- package/dist/esm/zonos-address_8.entry.js +6 -6
- package/dist/esm/zonos-badge_2.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card_2.entry.js +4 -4
- package/dist/esm/zonos-cart-items_12.entry.js +29 -12
- package/dist/esm/zonos-checkout.entry.js +52 -6
- package/dist/esm/zonos-controller.entry.js +5 -5
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_3.entry.js +6 -6
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +61 -24
- package/dist/esm/zonos-hello.entry.js +19 -12
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-notification.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +5 -5
- package/dist/esm/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/{zonosStore-8b9ea19c.js → zonosStore-ba9e541e.js} +1 -0
- package/dist/esm-es5/cart-530a8750.js +1 -0
- package/dist/esm-es5/{getBorderRadius-5e5a5800.js → getBorderRadius-947c24de.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-5185b62c.js → isDarkColor-f8324c10.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{submitGtag-90ebe7d0.js → submitGtag-44ba0846.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification.entry.js +1 -1
- package/dist/esm-es5/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-8b9ea19c.js → zonosStore-ba9e541e.js} +1 -1
- package/dist/scripts/index.d.ts +52 -6
- 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 +2 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +10 -0
- package/dist/types/components/common/zonos-confirm-dialog/zonos-confirm-dialog.d.ts +2 -2
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +1 -1
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +8 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.base.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.danish.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.french.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.german.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.italian.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.korean.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.polish.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.russian.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +22 -7
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +22 -7
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/wrapStringWithLink.d.ts +4 -0
- package/dist/types/components.d.ts +4 -4
- package/dist/types/scripts/_zonosBase.d.ts +0 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +40 -0
- package/dist/types/types/hello/HelloConfig.d.ts +9 -2
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-088d6460.system.entry.js → p-01304a58.system.entry.js} +1 -1
- package/dist/zonos-elements/p-094bfe56.system.entry.js +1 -0
- package/dist/zonos-elements/{p-474719c5.entry.js → p-099e229a.entry.js} +1 -1
- package/dist/zonos-elements/{p-be14323b.system.js → p-0b538ed4.system.js} +1 -1
- package/dist/zonos-elements/{p-ba066673.entry.js → p-11f87d7d.entry.js} +1 -1
- package/dist/zonos-elements/{p-1e2fbb1d.system.entry.js → p-13454044.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f8b58cf8.system.entry.js → p-18d04e89.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b79753bb.system.entry.js → p-27d648c3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-87c4a2af.entry.js → p-2a5a0bae.entry.js} +1 -1
- package/dist/zonos-elements/{p-9c0859b5.entry.js → p-2aa72606.entry.js} +1 -1
- package/dist/zonos-elements/{p-bf9dca26.js → p-31b3d26b.js} +1 -1
- package/dist/zonos-elements/{p-c0ddef11.entry.js → p-3541e6dd.entry.js} +1 -1
- package/dist/zonos-elements/{p-b7e4a6b0.entry.js → p-35d00c30.entry.js} +1 -1
- package/dist/zonos-elements/{p-aaba6f75.entry.js → p-37685139.entry.js} +1 -1
- package/dist/zonos-elements/{p-d6796b73.system.entry.js → p-3dc59d89.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4eaae82e.entry.js +1 -0
- package/dist/zonos-elements/{p-f3feed11.entry.js → p-5441b729.entry.js} +1 -1
- package/dist/zonos-elements/{p-c53cef11.js → p-5821856c.js} +1 -1
- package/dist/zonos-elements/{p-0ea19a4d.entry.js → p-5857ad65.entry.js} +1 -1
- package/dist/zonos-elements/p-5d006b02.system.js +1 -0
- package/dist/zonos-elements/{p-f1223c14.system.entry.js → p-5f580c9b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-687dbccc.entry.js +1 -0
- package/dist/zonos-elements/p-68dfcd25.system.entry.js +1 -0
- package/dist/zonos-elements/{p-1752853e.entry.js → p-699a5376.entry.js} +1 -1
- package/dist/zonos-elements/p-6fe27968.entry.js +1 -0
- package/dist/zonos-elements/{p-5992c6fb.system.entry.js → p-73ba4398.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-84791c5c.entry.js → p-75ba695c.entry.js} +1 -1
- package/dist/zonos-elements/{p-4d36edfd.system.entry.js → p-7b5a0a18.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1b76a929.system.entry.js → p-84f7a3a2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b45db572.system.entry.js → p-8f8baabf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a5e9d372.js → p-9a1c0d02.js} +1 -1
- package/dist/zonos-elements/p-a5704be4.system.entry.js +1 -0
- package/dist/zonos-elements/{p-33b054d9.system.js → p-a8cb25de.system.js} +1 -1
- package/dist/zonos-elements/{p-02a01106.system.entry.js → p-a90393e0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c8e83577.system.entry.js → p-acfb9be6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b4ccc72c.js +1 -0
- package/dist/zonos-elements/{p-9912a954.js → p-bb032c2f.js} +1 -1
- package/dist/zonos-elements/{p-bfc30599.entry.js → p-bb5a9eaa.entry.js} +1 -1
- package/dist/zonos-elements/{p-d7e6cad0.system.entry.js → p-c0fcc0fa.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c4154737.system.js +1 -0
- package/dist/zonos-elements/{p-7fa5a6ea.entry.js → p-c4e38b85.entry.js} +1 -1
- package/dist/zonos-elements/{p-07fe47f2.system.entry.js → p-cbed004d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9c8705ac.entry.js → p-d4724ac8.entry.js} +1 -1
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
- package/dist/zonos-elements/{p-e2301200.system.entry.js → p-e15ef12e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8853e051.system.js → p-e37440ad.system.js} +1 -1
- package/dist/zonos-elements/{p-6b2a2f68.entry.js → p-e3978982.entry.js} +1 -1
- package/dist/zonos-elements/{p-a164ea90.system.entry.js → p-ecd994c8.system.entry.js} +1 -1
- package/dist/zonos-elements/p-fb1120a2.system.js +1 -0
- package/dist/zonos-elements/p-fb1b98a8.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-564ab33a.js +0 -1
- package/dist/zonos-elements/p-233c2599.system.entry.js +0 -1
- package/dist/zonos-elements/p-2619fe29.system.js +0 -1
- package/dist/zonos-elements/p-63b0aef9.system.entry.js +0 -1
- package/dist/zonos-elements/p-6ed78fba.entry.js +0 -1
- package/dist/zonos-elements/p-9a0c5589.system.entry.js +0 -1
- package/dist/zonos-elements/p-b44de1c3.entry.js +0 -1
- package/dist/zonos-elements/p-c2688c49.system.js +0 -1
- package/dist/zonos-elements/p-d170253b.entry.js +0 -1
- package/dist/zonos-elements/p-e2bdba42.system.js +0 -1
- package/dist/zonos-elements/p-e815af26.entry.js +0 -1
- package/dist/zonos-elements/p-fc4f1e0c.js +0 -1
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["zonos-checkout.cjs",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"domesticRedirectedBtnSelector":[32],"legacyCheckoutHiddenBtnSelector":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"showSessionTimoutScreen":[32],"checkoutTimeoutInterval":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"mobile":["handleMobileChange"]}]]],["zonos-hello.cjs",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["zonos-controller.cjs",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["zonos-component.cjs",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link.cjs",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo.cjs",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text.cjs",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["zonos-hello-dialog.cjs",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification.cjs",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment.cjs",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio.cjs",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"initialSelectedValue":[8,"initial-selected-value"],"selectedItem":[32]}]]],["zonos-badge_2.cjs",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4]}],[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-input.cjs",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["zonos-banner.cjs",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-button_3.cjs",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-select-dialog-header_2.cjs",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2.cjs",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-card",{"actions":[16],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-country-flag.cjs",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-country-select_3.cjs",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}]]],["zonos-address_8.cjs",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-cart-items_12.cjs",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"showErrorBanner":[32]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevels":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"order":[32]}],[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["zonos-checkout.cjs",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"mobile":[4],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"open":[32],"stripe":[32],"submitLoading":[32],"paymentError":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"domesticRedirectedBtnSelector":[32],"legacyCheckoutHiddenBtnSelector":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"showSessionTimoutScreen":[32],"checkoutTimeoutInterval":[32],"inventoryCheckErrorMessage":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"mobile":["handleMobileChange"]}]]],["zonos-hello.cjs",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["zonos-controller.cjs",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"setupGoogleFont":[64],"showNotification":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["zonos-component.cjs",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link.cjs",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo.cjs",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text.cjs",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["zonos-hello-dialog.cjs",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["zonos-notification.cjs",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment.cjs",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio.cjs",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"initialSelectedValue":[8,"initial-selected-value"],"selectedItem":[32]}]]],["zonos-badge_2.cjs",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4]}],[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["zonos-input.cjs",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["zonos-banner.cjs",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-button_3.cjs",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["zonos-select-dialog-header_2.cjs",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2.cjs",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-card",{"actions":[16],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}]]],["zonos-country-flag.cjs",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-country-select_3.cjs",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}]]],["zonos-address_8.cjs",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"stripe":[32],"isDirtyAddress":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"stripe":[32]},null,{"stripe":["watchInitStripe"]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}],[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["zonos-cart-items_12.cjs",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-checkout-payment",{"paymentError":[4,"payment-error"],"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"showErrorBanner":[32]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevels":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-cart-subtotal"],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32]}],[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
7
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const cart = require('./cart-61caeb84.js');
|
|
7
|
+
const zonosStore = require('./zonosStore-4c6c85da.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
11
|
require('./logError-4e2f2020.js');
|
|
12
|
-
require('./isDarkColor-
|
|
13
|
-
require('./getBorderRadius-
|
|
12
|
+
require('./isDarkColor-371a3b1a.js');
|
|
13
|
+
require('./getBorderRadius-074b46ef.js');
|
|
14
14
|
|
|
15
15
|
const getHasMoreSpaceAbove = (ref) => {
|
|
16
16
|
const componentRect = ref.getBoundingClientRect();
|
|
@@ -19,6 +19,10 @@ const getHasMoreSpaceAbove = (ref) => {
|
|
|
19
19
|
return availableSpaceAbove >= availableSpaceBelow;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
+
const wrapStringWithLink = ({ href, text, }) => {
|
|
23
|
+
return `<zonos-link href="${href}" target="_blank" rel="noopener noreferrer">${text}</zonos-link>`;
|
|
24
|
+
};
|
|
25
|
+
|
|
22
26
|
const BagIcon = `<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">
|
|
23
27
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.66666 4.16667C9.20642 4.16667 8.83333 4.53976 8.83333 5V5.83333H12.1667V5C12.1667 4.53976 11.7936 4.16667 11.3333 4.16667H9.66666ZM13.8333 5.83333V5C13.8333 3.61929 12.714 2.5 11.3333 2.5H9.66666C8.28595 2.5 7.16666 3.61929 7.16666 5V5.83333H6.77759C5.44832 5.83333 4.35149 6.87354 4.2811 8.20094L3.92756 14.8676C3.85169 16.2983 4.99133 17.5 6.42405 17.5H14.5759C16.0087 17.5 17.1483 16.2983 17.0724 14.8676L16.7189 8.20094C16.6485 6.87354 15.5517 5.83333 14.2224 5.83333H13.8333ZM12.1667 7.5V8.33333C12.1667 8.79357 12.5398 9.16667 13 9.16667C13.4602 9.16667 13.8333 8.79357 13.8333 8.33333V7.5H14.2224C14.6655 7.5 15.0311 7.84674 15.0546 8.2892L15.4081 14.9559C15.4334 15.4328 15.0535 15.8333 14.5759 15.8333H6.42405C5.94648 15.8333 5.5666 15.4328 5.59189 14.9559L5.94542 8.2892C5.96889 7.84674 6.3345 7.5 6.77759 7.5H7.16666V8.33333C7.16666 8.79357 7.53976 9.16667 7.99999 9.16667C8.46023 9.16667 8.83333 8.79357 8.83333 8.33333V7.5H12.1667Z" fill="#4D505A"/>
|
|
24
28
|
</svg>
|
|
@@ -74,6 +78,23 @@ const ZonosHelloDialog = class {
|
|
|
74
78
|
this.setShowLanguageSelect = async (value) => {
|
|
75
79
|
this.showLanguageSelect = value;
|
|
76
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* Store has tax id setup in Zonos settings
|
|
83
|
+
*/
|
|
84
|
+
this.hasTaxId = () => {
|
|
85
|
+
var _a;
|
|
86
|
+
return (_a = cart.localizationStore.countryLandedCost) === null || _a === void 0 ? void 0 : _a.hasTaxId;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Some countries don't have threshold. So we need to show generic message for them
|
|
90
|
+
*/
|
|
91
|
+
this.isNoThresholdCountry = (countryCode) => {
|
|
92
|
+
// Only show threshold message if store doesn't have tax id in the settings
|
|
93
|
+
if (!countryCode || !this.hasTaxId()) {
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
return ['AU'].includes(countryCode);
|
|
97
|
+
};
|
|
77
98
|
this.getDutyMessage = () => {
|
|
78
99
|
const { countryLandedCost } = cart.localizationStore;
|
|
79
100
|
// Our Robby API spells deminimis wrong here
|
|
@@ -81,8 +102,11 @@ const ZonosHelloDialog = class {
|
|
|
81
102
|
? cart.currencyFormat({ amount: countryLandedCost.dutyDeminimus })
|
|
82
103
|
: null;
|
|
83
104
|
// If deminimis is undefined or null, assume it's $0
|
|
84
|
-
return dutyDeminimis
|
|
85
|
-
|
|
105
|
+
return dutyDeminimis &&
|
|
106
|
+
!this.isNoThresholdCountry(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.countryCode)
|
|
107
|
+
? cart.translate('Spend [threshold] duty free', {
|
|
108
|
+
threshold: dutyDeminimis,
|
|
109
|
+
})
|
|
86
110
|
: cart.translate('Duties will apply to all orders');
|
|
87
111
|
};
|
|
88
112
|
this.getTaxMessage = () => {
|
|
@@ -91,8 +115,11 @@ const ZonosHelloDialog = class {
|
|
|
91
115
|
const taxDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.vatTaxDeminimus)
|
|
92
116
|
? cart.currencyFormat({ amount: countryLandedCost.vatTaxDeminimus })
|
|
93
117
|
: null;
|
|
94
|
-
return taxDeminimis
|
|
95
|
-
|
|
118
|
+
return taxDeminimis &&
|
|
119
|
+
!this.isNoThresholdCountry(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.countryCode)
|
|
120
|
+
? cart.translate('Spend [threshold] tax free', {
|
|
121
|
+
threshold: taxDeminimis,
|
|
122
|
+
})
|
|
96
123
|
: cart.translate('Taxes will apply to all orders');
|
|
97
124
|
};
|
|
98
125
|
this.getUkDutyTaxMessage = (landedCost) => {
|
|
@@ -101,22 +128,31 @@ const ZonosHelloDialog = class {
|
|
|
101
128
|
return null;
|
|
102
129
|
}
|
|
103
130
|
const dutyDeminimis = landedCost.dutyDeminimus;
|
|
104
|
-
return
|
|
105
|
-
countryName
|
|
106
|
-
|
|
107
|
-
|
|
131
|
+
return [
|
|
132
|
+
cart.translate('Orders to [countryName] must be over [threshold] to ship.', {
|
|
133
|
+
countryName: 'United Kingdom',
|
|
134
|
+
threshold: cart.currencyFormat({ amount: dutyDeminimis }),
|
|
135
|
+
}),
|
|
136
|
+
];
|
|
108
137
|
};
|
|
109
138
|
this.getAustraliaDutyTaxMessage = (landedCost) => {
|
|
110
|
-
return
|
|
111
|
-
percentage
|
|
112
|
-
|
|
113
|
-
|
|
139
|
+
return [
|
|
140
|
+
cart.translate('Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders', {
|
|
141
|
+
percentage: `${landedCost.vatTaxRate * 100}%`,
|
|
142
|
+
}),
|
|
143
|
+
`${cart.translate('The low-value GST law passed July 1st, 2018 applies to this retailer.')} ${wrapStringWithLink({
|
|
144
|
+
href: 'https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst',
|
|
145
|
+
text: cart.translate('Learn more.'),
|
|
146
|
+
})}`,
|
|
147
|
+
];
|
|
114
148
|
};
|
|
115
149
|
this.getNewZealandDutyTaxMessge = (landedCost) => {
|
|
116
|
-
return
|
|
117
|
-
percentage
|
|
118
|
-
|
|
119
|
-
|
|
150
|
+
return [
|
|
151
|
+
cart.translate('[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.', {
|
|
152
|
+
percentage: `${landedCost.vatTaxRate * 100}%`,
|
|
153
|
+
threshold: cart.currencyFormat({ amount: landedCost.vatTaxDeminimus }),
|
|
154
|
+
}),
|
|
155
|
+
];
|
|
120
156
|
};
|
|
121
157
|
/**
|
|
122
158
|
* Get additional duty tax message if selected country has tax id
|
|
@@ -126,7 +162,7 @@ const ZonosHelloDialog = class {
|
|
|
126
162
|
return null;
|
|
127
163
|
}
|
|
128
164
|
// only show the message if the store has a tax id for selected country
|
|
129
|
-
if (!
|
|
165
|
+
if (!this.hasTaxId()) {
|
|
130
166
|
return null;
|
|
131
167
|
}
|
|
132
168
|
switch (cart.localizationStore.countryLandedCost.countryCode) {
|
|
@@ -181,17 +217,18 @@ const ZonosHelloDialog = class {
|
|
|
181
217
|
const defaultMessage = formatStringWithLinks.formatStringWithLinks(defaultMessageStr);
|
|
182
218
|
const currentPage = this.getCurrentPageEnum();
|
|
183
219
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
184
|
-
return (index.h(index.Host, { key: '
|
|
220
|
+
return (index.h(index.Host, { key: 'bb2b080aaba7b85599b7e6bcb7cabee70863070f', class: "zonos--elements" }, index.h("div", { key: 'aabdbd8c4b47f759396d1a56fac426570385768d', "aria-hidden": "true", class: classes.classes([
|
|
185
221
|
'zonos--hello-dialog',
|
|
186
222
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
187
223
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
188
224
|
!!this.mobileLocationOverride &&
|
|
189
225
|
'zonos--hello-dialog-mobile-override',
|
|
190
226
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
191
|
-
]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", { key: '
|
|
227
|
+
]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (index.h("div", { key: 'd9189f1ced79d3d3fd11c99ea1407e7b83a2573b' }, index.h("div", { key: '83ac2ab3583935ececea8be98ab64559d802725a', class: "zonos--hello-dialog-content" }, index.h("zonos-button", { key: '4f36dea145e751d63a2d0df3f472ffe674fbb580', 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: 'e8a7cebe4ca88da80b974e3a3536714fe4da47c1', spacing: 24 }, index.h("zonos-country-flag", { key: 'e02c72135b9c7e9e533fc46c8f4b286ba1cb1b63', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), index.h("zonos-v-stack", { key: '7d199c0a5f465fe1640e690d2712f11a80e1f378', class: "zonos--hello-dialog-header", spacing: 4 }, index.h("zonos-text", { key: '97bf6611bd485ace8ad9b94c3520148ae0d1eab0', type: "boldSubheader" }, welcomeMessage), index.h("zonos-text", { key: 'c1e524bf689f34aed978f350676ffa957724176f', innerHTML: defaultMessage, textColor: "gray-800" })), index.h("zonos-v-stack", { key: '81a2fabb2f6c2d853f2f6619f7c6829754d80a59', spacing: 8 }, this.restrictedItems.map(item => {
|
|
192
228
|
var _a;
|
|
193
229
|
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)))));
|
|
194
|
-
}), index.h("zonos-card", { key: '
|
|
230
|
+
}), index.h("zonos-card", { key: '29ba8b81746a696ca43b88daa89a7c85af5a2b34', spacing: "12px" }, index.h("zonos-v-stack", { key: '8f4e79efe07a4c7c1b493178c952bfe61a151f0c', spacing: 12 }, index.h("div", { key: 'a17eda2b103d376f7ca8a9b528d613195b3a1fe7', class: "zonos--flex-message" }, index.h("zonos-icon", { key: '13c828d956198211a1fbda77840f8b91692d1582', "aria-label": "Duty de minimis", content: ImportIcon }), index.h("zonos-text", { key: 'c38511e16905f169b821d0cd8d98dee80a7c1de1' }, dutyDeMinimisMessage)), index.h("div", { key: '9b3165d870419732d4be1421336326f8d4e98547', class: "zonos--flex-message" }, index.h("zonos-icon", { key: '46248b95b97a3ec74ffc038dda29ca74a1e700c2', "aria-label": "Tax de minimis", content: MoneyIcon }), index.h("zonos-text", { key: '1d698d83f9fa43746de870553d1ba1c09389aefb' }, taxDeMinimisMessage)), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
231
|
+
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: 'fcc21cc1e8b3de45af03c64ffc95dc2ab6f57bf3', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (index.h("div", { key: 'bbf019b27e6da7aa3256f14bf928aae26ca92f54' }, index.h("zonos-country-select", { key: 'a70d55e1872ec626e8446866dbad3aafca69790c', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (index.h("div", { key: '77f63941fcbb3bc0c668a61aa48ca2e60b8addeb' }, index.h("zonos-language-select", { key: '57a4d06c098662b00c3587f3b2290552dc04f2fe', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
195
232
|
}
|
|
196
233
|
static get assetsDirs() { return ["assets"]; }
|
|
197
234
|
static get watchers() { return {
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
7
|
-
const cart = require('./cart-
|
|
6
|
+
const zonosStore = require('./zonosStore-4c6c85da.js');
|
|
7
|
+
const cart = require('./cart-61caeb84.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const logError = require('./logError-4e2f2020.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
11
|
-
require('./isDarkColor-
|
|
12
|
-
require('./getBorderRadius-
|
|
11
|
+
require('./isDarkColor-371a3b1a.js');
|
|
12
|
+
require('./getBorderRadius-074b46ef.js');
|
|
13
13
|
|
|
14
14
|
var root = zonosStore._root;
|
|
15
15
|
|
|
@@ -632,18 +632,25 @@ const ZonosHello = class {
|
|
|
632
632
|
return hasMoreSpaceOnRight;
|
|
633
633
|
}
|
|
634
634
|
};
|
|
635
|
-
this.
|
|
635
|
+
this.shouldRenderHello = (showLog = true) => {
|
|
636
636
|
if (!cart.localizationStore.localizationLoaded) {
|
|
637
637
|
return false;
|
|
638
638
|
}
|
|
639
|
-
|
|
640
|
-
if (
|
|
641
|
-
if (
|
|
642
|
-
logError.log(`Hello: not shippable country`);
|
|
639
|
+
const { showForCountries } = zonosStore.zonosStore.helloSettings;
|
|
640
|
+
if (showLog) {
|
|
641
|
+
if (!cart.localizationStore.isShippableCountry) {
|
|
642
|
+
logError.log(`Hello: not shippable country - Show for countries: ${showForCountries}`);
|
|
643
643
|
}
|
|
644
|
-
return false;
|
|
645
644
|
}
|
|
646
|
-
|
|
645
|
+
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
646
|
+
if (showForCountries === 'ONLY_SHIPPABLE') {
|
|
647
|
+
return cart.localizationStore.isShippableCountry;
|
|
648
|
+
}
|
|
649
|
+
// if user wants to show hello for all countries
|
|
650
|
+
if (showForCountries === 'ALL') {
|
|
651
|
+
return true;
|
|
652
|
+
}
|
|
653
|
+
return showForCountries === null || showForCountries === void 0 ? void 0 : showForCountries.includes(cart.localizationStore.selectedCountryCode || '');
|
|
647
654
|
};
|
|
648
655
|
this.mobileLocationOverride = undefined;
|
|
649
656
|
this.animateFromLeftOverride = undefined;
|
|
@@ -746,7 +753,7 @@ const ZonosHello = class {
|
|
|
746
753
|
// The organization name can be changed after init with the updateOrganizationName method.
|
|
747
754
|
// This will cause the element to rerender with the new org name when it changes. (used for preview on dashboard)
|
|
748
755
|
this.peekMessage = this.getHelloPeekMessage(zonosStore.zonosStore.organizationName);
|
|
749
|
-
const showHello = this.
|
|
756
|
+
const showHello = this.shouldRenderHello() && !!selectedCountryCode;
|
|
750
757
|
return (index.h(index.Host, { class: "zonos--hello zonos--elements", "data-theme": theme }, showHello && (index.h("div", { class: "zonos--hello-wrapper" }, index.h("button", { class: classes.classes([
|
|
751
758
|
'zonos--hello-widget',
|
|
752
759
|
this.showPeekMessage && 'zonos--hello-show-peek-message',
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-4c6c85da.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-074b46ef.js');
|
|
9
9
|
|
|
10
10
|
const zonosInputCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin:1px;}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:\"\";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--border-radius)}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}";
|
|
11
11
|
const ZonosInputStyle0 = zonosInputCss;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-4c6c85da.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const zonosLogoCss = ":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-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-4c6c85da.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const zonosNotificationCss = ":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-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-61caeb84.js');
|
|
7
7
|
const logError = require('./logError-4e2f2020.js');
|
|
8
|
-
require('./zonosStore-
|
|
9
|
-
require('./isDarkColor-
|
|
10
|
-
require('./getBorderRadius-
|
|
8
|
+
require('./zonosStore-4c6c85da.js');
|
|
9
|
+
require('./isDarkColor-371a3b1a.js');
|
|
10
|
+
require('./getBorderRadius-074b46ef.js');
|
|
11
11
|
|
|
12
12
|
const zonosPaymentCss = ".sc-zonos-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-payment-h *.sc-zonos-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-payment-h img.sc-zonos-payment{max-width:100%}.sc-zonos-payment-h dl.sc-zonos-payment,.sc-zonos-payment-h dd.sc-zonos-payment,.sc-zonos-payment-h h1.sc-zonos-payment,.sc-zonos-payment-h h2.sc-zonos-payment,.sc-zonos-payment-h h3.sc-zonos-payment,.sc-zonos-payment-h h4.sc-zonos-payment,.sc-zonos-payment-h h5.sc-zonos-payment,.sc-zonos-payment-h h6.sc-zonos-payment,.sc-zonos-payment-h hr.sc-zonos-payment,.sc-zonos-payment-h figure.sc-zonos-payment,.sc-zonos-payment-h p.sc-zonos-payment,.sc-zonos-payment-h pre.sc-zonos-payment{margin:0}.sc-zonos-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-payment-h .zonos--title.sc-zonos-payment{margin-bottom:16px}";
|
|
13
13
|
const ZonosPaymentStyle0 = zonosPaymentCss;
|
|
@@ -45,7 +45,7 @@ const ZonosPayment = class {
|
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
47
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
48
|
-
return (index.h(index.Host, { key: '
|
|
48
|
+
return (index.h(index.Host, { key: 'abebca876eac8bd507fcbdb1c029d2ed0f3b749a', class: "zonos--payment zonos--elements" }, this.titleText && (index.h("zonos-text", { key: '142257f2052337206dbb70e70c87b5207f2bd97a', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), index.h("div", { key: 'c55bbaea79a291e45d8ed37d556529365de89e9f', class: "zonos--payment-component" })));
|
|
49
49
|
}
|
|
50
50
|
get el() { return index.getElement(this); }
|
|
51
51
|
static get watchers() { return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-4c6c85da.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const RemoveIcon = `<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>`;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-4c6c85da.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-074b46ef.js');
|
|
9
9
|
const isColorVariable = require('./isColorVariable-6f5a9608.js');
|
|
10
10
|
|
|
11
11
|
const zonosShippingRichRadioCss = ":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 input{margin:0;accent-color:var(--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b071017b.js');
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
6
|
+
const zonosStore = require('./zonosStore-4c6c85da.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const isColorVariable = require('./isColorVariable-6f5a9608.js');
|
|
9
9
|
|
|
@@ -2824,6 +2824,7 @@ const { dispose: zonosStoreDispose, reset, state: zonosStore, } = createStore(()
|
|
|
2824
2824
|
productListUrlPattern: '',
|
|
2825
2825
|
productTitleElementSelector: '',
|
|
2826
2826
|
restrictionBehavior: 'DISABLED',
|
|
2827
|
+
showForCountries: 'ONLY_SHIPPABLE',
|
|
2827
2828
|
},
|
|
2828
2829
|
loadedConfig: false,
|
|
2829
2830
|
organizationId: '',
|
|
@@ -84,6 +84,19 @@ export class ZonosCheckoutFinish {
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
|
+
// If user provide override notification text, use it
|
|
88
|
+
this.useOverrideSuccessNotification = () => {
|
|
89
|
+
const { successPageActionText, successPageSubtitleText, successPageTitleText, } = zonosStore.checkoutSettings;
|
|
90
|
+
if (successPageTitleText) {
|
|
91
|
+
this.notificationTitle = successPageTitleText;
|
|
92
|
+
}
|
|
93
|
+
if (successPageSubtitleText) {
|
|
94
|
+
this.notificationMessages = successPageSubtitleText;
|
|
95
|
+
}
|
|
96
|
+
if (successPageActionText) {
|
|
97
|
+
this.notificationActionText = successPageActionText;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
87
100
|
this.checkPaymentStatus = async () => {
|
|
88
101
|
this.isLoading = true;
|
|
89
102
|
const clientSecret = new URLSearchParams(window.location.search).get('payment_intent_client_secret') || stripeStore.clientSecret;
|
|
@@ -97,6 +110,9 @@ export class ZonosCheckoutFinish {
|
|
|
97
110
|
this.notificationTitle = error
|
|
98
111
|
? translate('Payment failed')
|
|
99
112
|
: translate("You're all set!");
|
|
113
|
+
this.notificationActionText = translate('Keep shopping');
|
|
114
|
+
// override title if notification type is success
|
|
115
|
+
this.useOverrideSuccessNotification();
|
|
100
116
|
if (error) {
|
|
101
117
|
submitGtag('zonos-checkout-payment-fail');
|
|
102
118
|
}
|
|
@@ -135,6 +151,7 @@ export class ZonosCheckoutFinish {
|
|
|
135
151
|
this.notificationType = 'success';
|
|
136
152
|
this.notificationTitle = '';
|
|
137
153
|
this.notificationMessages = [];
|
|
154
|
+
this.notificationActionText = '';
|
|
138
155
|
this.order = null;
|
|
139
156
|
}
|
|
140
157
|
componentDidLoad() {
|
|
@@ -156,11 +173,11 @@ export class ZonosCheckoutFinish {
|
|
|
156
173
|
// const totalItems = this.order?.items?.reduce((acc, item) => {
|
|
157
174
|
// return acc + item.quantity;
|
|
158
175
|
// }, 0);
|
|
159
|
-
return (h(Host, { key: '
|
|
176
|
+
return (h(Host, { key: '24b1aac6cd07e3981e29bb401a8e1afeba45bf4a', class: "zonos--checkout-finish zonos--elements", style: {
|
|
160
177
|
'--border-radius': getBorderRadius({
|
|
161
178
|
overrideBorderStyle: this.borderRadius,
|
|
162
179
|
}),
|
|
163
|
-
} }, this.isLoading && (h("div", { key: '
|
|
180
|
+
} }, this.isLoading && (h("div", { key: '8ddf7d87472a65b9e48504459a67b904611a6207', class: "loading-wrapper" }, h("zonos-spinner", { key: '01106349e974c8dccfab50c97875b5031c7becec' }))), !this.isLoading && (h(Fragment, null, h("div", { key: '9a274bcc2ce21bd5e14b22f0bb17cc75519bf67e', 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: '6b8e0ff98659d87a474142766e8debd84bbcf357', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: '204c517f0cb91a2a7f029cbb51ec4dbc73f7fbdb' }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { key: '540dbea2ab328655fccdd7ac24ee996b1041c222', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))))));
|
|
164
181
|
}
|
|
165
182
|
static get is() { return "zonos-checkout-finish"; }
|
|
166
183
|
static get encapsulation() { return "shadow"; }
|
|
@@ -247,6 +264,7 @@ export class ZonosCheckoutFinish {
|
|
|
247
264
|
"notificationType": {},
|
|
248
265
|
"notificationTitle": {},
|
|
249
266
|
"notificationMessages": {},
|
|
267
|
+
"notificationActionText": {},
|
|
250
268
|
"order": {}
|
|
251
269
|
};
|
|
252
270
|
}
|
|
@@ -73,6 +73,7 @@ export class ZonosCheckout {
|
|
|
73
73
|
this.confirmDialogOpen = false;
|
|
74
74
|
this.showSessionTimoutScreen = false;
|
|
75
75
|
this.checkoutTimeoutInterval = null;
|
|
76
|
+
this.inventoryCheckErrorMessage = null;
|
|
76
77
|
}
|
|
77
78
|
/**
|
|
78
79
|
* Init cart info handler event
|
|
@@ -384,10 +385,47 @@ export class ZonosCheckout {
|
|
|
384
385
|
this.submitLoading = false;
|
|
385
386
|
}, 500);
|
|
386
387
|
}
|
|
388
|
+
handleInventoryCheckDialogCancel() {
|
|
389
|
+
// reset inventory check message to close the inventory check alert
|
|
390
|
+
this.inventoryCheckErrorMessage = null;
|
|
391
|
+
}
|
|
392
|
+
handleInventoryCheckDialogConfirm() {
|
|
393
|
+
// reset inventory check message to close the inventory check alert
|
|
394
|
+
this.inventoryCheckErrorMessage = null;
|
|
395
|
+
// close the dialog
|
|
396
|
+
void this.closeDialogHandler({ confirmed: true });
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Handle inventory check and returns error message if the callback provided.
|
|
400
|
+
*/
|
|
401
|
+
async handleInventoryCheck() {
|
|
402
|
+
const { onInventoryCheck } = zonosStore.checkoutSettings;
|
|
403
|
+
if (typeof onInventoryCheck !== 'function') {
|
|
404
|
+
return null;
|
|
405
|
+
}
|
|
406
|
+
const message = await onInventoryCheck({ items: cartStore.items });
|
|
407
|
+
return message;
|
|
408
|
+
}
|
|
387
409
|
async handleCheckoutPaymentContinue() {
|
|
388
410
|
// reset error state
|
|
389
411
|
this.paymentError = false;
|
|
390
412
|
this.submitLoading = true;
|
|
413
|
+
// reset inventory check message
|
|
414
|
+
this.inventoryCheckErrorMessage = null;
|
|
415
|
+
try {
|
|
416
|
+
// check inventory before proceeding to payment
|
|
417
|
+
this.inventoryCheckErrorMessage = await this.handleInventoryCheck();
|
|
418
|
+
}
|
|
419
|
+
catch (err) {
|
|
420
|
+
// If user provide callback and it throw an exception, default to this message and stop the payment.
|
|
421
|
+
this.inventoryCheckErrorMessage = translate('Unable to check inventory. Please try again.');
|
|
422
|
+
}
|
|
423
|
+
// Don't proceed to payment if there's an error message
|
|
424
|
+
if (this.inventoryCheckErrorMessage) {
|
|
425
|
+
// stop the submit loading state
|
|
426
|
+
this.submitLoading = false;
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
391
429
|
try {
|
|
392
430
|
await stripeStoreConfirmPayment();
|
|
393
431
|
cartStoreNextStep();
|
|
@@ -539,7 +577,15 @@ export class ZonosCheckout {
|
|
|
539
577
|
this.confirmDialogOpen = false;
|
|
540
578
|
},
|
|
541
579
|
// Mark user selected confirm to close the dialog
|
|
542
|
-
onConfirmClicked: () => this.closeDialogHandler({ confirmed: true }) }))
|
|
580
|
+
onConfirmClicked: () => this.closeDialogHandler({ confirmed: true }) }), h("zonos-confirm-dialog", { class: "zonos--inventory-check-failure-dialog", dialogConfirmBtnText: translate('Return to cart'), dialogIntent: "danger",
|
|
581
|
+
// Show dialog if inventory check error message is not null
|
|
582
|
+
dialogOpen: !!this.inventoryCheckErrorMessage,
|
|
583
|
+
// If diallog is in open state, the message should not be null
|
|
584
|
+
dialogSubtitle: this.inventoryCheckErrorMessage, dialogTitle: translate("Couldn't place order"), dialogType: "alert", onCancelClicked: () => {
|
|
585
|
+
this.handleInventoryCheckDialogCancel();
|
|
586
|
+
},
|
|
587
|
+
// Mark user selected confirm to close the dialog
|
|
588
|
+
onConfirmClicked: () => this.handleInventoryCheckDialogConfirm() })));
|
|
543
589
|
}
|
|
544
590
|
static get is() { return "zonos-checkout"; }
|
|
545
591
|
static get encapsulation() { return "scoped"; }
|
|
@@ -675,7 +721,8 @@ export class ZonosCheckout {
|
|
|
675
721
|
"isLegacyCheckout": {},
|
|
676
722
|
"confirmDialogOpen": {},
|
|
677
723
|
"showSessionTimoutScreen": {},
|
|
678
|
-
"checkoutTimeoutInterval": {}
|
|
724
|
+
"checkoutTimeoutInterval": {},
|
|
725
|
+
"inventoryCheckErrorMessage": {}
|
|
679
726
|
};
|
|
680
727
|
}
|
|
681
728
|
static get methods() {
|