@zonos/elements 1.3.26 → 1.3.28
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-7e817cad.js → cart-62ff7ee7.js} +320 -200
- package/dist/cjs/index.cjs.js +3 -54
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-7e0065da.js → submitGtag-a5f8eaab.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +2 -2
- package/dist/cjs/zonos-checkout.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +59 -22
- package/dist/cjs/zonos-hello.cjs.entry.js +30 -3
- package/dist/cjs/zonos-payment.cjs.entry.js +2 -2
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +31 -3
- 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 +55 -21
- package/dist/collection/components/main/zonos-controller.js +1 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +16 -10
- package/dist/collection/components/store/translationStore/strings.base.js +16 -10
- package/dist/collection/components/store/translationStore/strings.chinese.js +16 -10
- package/dist/collection/components/store/translationStore/strings.danish.js +16 -10
- package/dist/collection/components/store/translationStore/strings.dutch.js +16 -10
- package/dist/collection/components/store/translationStore/strings.french.js +16 -10
- package/dist/collection/components/store/translationStore/strings.german.js +16 -10
- package/dist/collection/components/store/translationStore/strings.hebrew.js +16 -10
- package/dist/collection/components/store/translationStore/strings.indonesian.js +16 -10
- package/dist/collection/components/store/translationStore/strings.italian.js +16 -10
- package/dist/collection/components/store/translationStore/strings.japanese.js +16 -10
- package/dist/collection/components/store/translationStore/strings.korean.js +16 -10
- package/dist/collection/components/store/translationStore/strings.norwegian.js +16 -10
- package/dist/collection/components/store/translationStore/strings.polish.js +16 -10
- package/dist/collection/components/store/translationStore/strings.portuguese.js +16 -10
- package/dist/collection/components/store/translationStore/strings.russian.js +16 -10
- package/dist/collection/components/store/translationStore/strings.spanish.js +16 -10
- package/dist/collection/components/store/translationStore/strings.swedish.js +16 -10
- package/dist/collection/components/store/translationStore/strings.turkish.js +16 -10
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +16 -10
- 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-13e6a811.js → cart-b96aaa4f.js} +320 -200
- package/dist/esm/index.js +3 -54
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-c8bb6f2e.js → submitGtag-6e271d76.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +3 -3
- package/dist/esm/zonos-card_2.entry.js +1 -1
- package/dist/esm/zonos-cart-items_12.entry.js +2 -2
- package/dist/esm/zonos-checkout.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_3.entry.js +3 -3
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +59 -22
- package/dist/esm/zonos-hello.entry.js +30 -3
- package/dist/esm/zonos-payment.entry.js +2 -2
- package/dist/esm-es5/cart-b96aaa4f.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{submitGtag-c8bb6f2e.js → submitGtag-6e271d76.js} +1 -1
- package/dist/esm-es5/zonos-address_8.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-payment.entry.js +1 -1
- package/dist/scripts/index.d.ts +11 -3
- 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/hello/zonos-hello/zonos-hello.d.ts +8 -0
- 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 +14 -8
- package/dist/types/components/store/translationStore/strings.base.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.danish.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.french.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.german.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.italian.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.korean.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.polish.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.russian.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +14 -8
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +14 -8
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/wrapStringWithLink.d.ts +4 -0
- package/dist/types/scripts/_zonosBase.d.ts +0 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +2 -2
- package/dist/types/types/hello/HelloConfig.d.ts +10 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-eea8111c.system.entry.js → p-087c83a5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d3e61deb.system.entry.js → p-10b9a681.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1a40aaf4.system.js +1 -0
- package/dist/zonos-elements/{p-43c1dd27.system.entry.js → p-2613b5d3.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2cb880e7.system.entry.js +1 -0
- package/dist/zonos-elements/p-3de62c84.entry.js +1 -0
- package/dist/zonos-elements/{p-492b8e12.entry.js → p-4a0cf47b.entry.js} +1 -1
- package/dist/zonos-elements/{p-094c7343.system.entry.js → p-4e01d1ab.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-452ed1a7.entry.js → p-5b4c1c09.entry.js} +1 -1
- package/dist/zonos-elements/p-5d53f9a4.js +1 -0
- package/dist/zonos-elements/{p-089c3737.system.entry.js → p-666d1605.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b88e52b5.entry.js → p-692816a7.entry.js} +1 -1
- package/dist/zonos-elements/p-725c2d57.entry.js +1 -0
- package/dist/zonos-elements/{p-e975b187.entry.js → p-7664dec5.entry.js} +1 -1
- package/dist/zonos-elements/{p-2011cb03.entry.js → p-78a839b8.entry.js} +1 -1
- package/dist/zonos-elements/p-8b2125b3.system.js +1 -0
- package/dist/zonos-elements/{p-3e488bff.entry.js → p-8c9e7980.entry.js} +1 -1
- package/dist/zonos-elements/p-9b0aa65c.system.js +1 -0
- package/dist/zonos-elements/{p-cab01f64.system.entry.js → p-9cdfb51b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-99da2348.entry.js → p-9f7c0472.entry.js} +1 -1
- package/dist/zonos-elements/{p-58edaab6.system.entry.js → p-b208fec6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-eabe2abc.js → p-b468f941.js} +1 -1
- package/dist/zonos-elements/{p-60621085.entry.js → p-c63a7dde.entry.js} +1 -1
- package/dist/zonos-elements/{p-f7e2d33b.system.entry.js → p-d7b2a87f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
- package/dist/zonos-elements/{p-a5d823d3.system.entry.js → p-f69f1ec6.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-13e6a811.js +0 -1
- package/dist/zonos-elements/p-121be462.system.js +0 -1
- package/dist/zonos-elements/p-1f2077df.entry.js +0 -1
- package/dist/zonos-elements/p-3baf7a18.entry.js +0 -1
- package/dist/zonos-elements/p-74488e31.system.js +0 -1
- package/dist/zonos-elements/p-875a311d.js +0 -1
- package/dist/zonos-elements/p-d1771035.system.js +0 -1
- package/dist/zonos-elements/p-e80a5ed7.system.entry.js +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -232,8 +232,8 @@ const zonosLoadUrl = (() => {
|
|
|
232
232
|
}
|
|
233
233
|
return null;
|
|
234
234
|
})();
|
|
235
|
-
const ZONOS_URL = zonosLoadUrl || "https://v1.3.
|
|
236
|
-
const JS_DELIVR_ZONOS_URL = "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
235
|
+
const ZONOS_URL = zonosLoadUrl || "https://v1.3.28.js.zonos.com";
|
|
236
|
+
const JS_DELIVR_ZONOS_URL = "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.28";
|
|
237
237
|
const INTER_FONT_URL = 'https://rsms.me';
|
|
238
238
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
239
239
|
const INTER_FONT_REGEX = /^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;
|
|
@@ -252,7 +252,7 @@ Zonos.isBigCommerce = false;
|
|
|
252
252
|
*/
|
|
253
253
|
Zonos.isNpm = true;
|
|
254
254
|
Zonos.zonosQaUrl = null;
|
|
255
|
-
Zonos.version = `v${"1.3.
|
|
255
|
+
Zonos.version = `v${"1.3.28"}`;
|
|
256
256
|
Zonos.modeAlerted = false;
|
|
257
257
|
Zonos.tempCartData = null;
|
|
258
258
|
Zonos.getCurrentTimestamp = () => new Date().getTime();
|
|
@@ -270,8 +270,6 @@ Zonos.init = async ({ appearance, checkoutSettings, currencyConverter, helloSett
|
|
|
270
270
|
_a.zonosApiKey = zonosApiKey;
|
|
271
271
|
_a.storeId = storeId;
|
|
272
272
|
log('init zonos');
|
|
273
|
-
// add sentry to the project
|
|
274
|
-
_a.injectSentryScript();
|
|
275
273
|
// inject zonos cdn
|
|
276
274
|
_a.injectZonosCdn();
|
|
277
275
|
// inject css for zonos elements
|
|
@@ -398,55 +396,6 @@ Zonos.injectController = ({ config, zonosApiKey, }) => {
|
|
|
398
396
|
_a.zonosController = zonosController;
|
|
399
397
|
log('Zonos controller injected!');
|
|
400
398
|
};
|
|
401
|
-
Zonos.injectSentryScript = () => {
|
|
402
|
-
const scriptUrl = 'https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js';
|
|
403
|
-
const findScript = () => {
|
|
404
|
-
const script = document.querySelector(`script[src="${scriptUrl}"]`);
|
|
405
|
-
return !!script;
|
|
406
|
-
};
|
|
407
|
-
if (findScript()) {
|
|
408
|
-
log('Sentry script already exists in the document', 'warn');
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
|
-
const headOrBody = document.head || document.body;
|
|
412
|
-
// init zonos elements when the zonosKey is valid
|
|
413
|
-
// inject esmodule cdn for zonos elements
|
|
414
|
-
const script = document.createElement('script');
|
|
415
|
-
script.crossOrigin = 'anonymous';
|
|
416
|
-
script.src = scriptUrl;
|
|
417
|
-
script.integrity =
|
|
418
|
-
'sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l';
|
|
419
|
-
script.setAttribute('data-lazy', 'no');
|
|
420
|
-
script.onerror = () => {
|
|
421
|
-
logError(`Failed to load ${script.src}`);
|
|
422
|
-
};
|
|
423
|
-
script.onload = () => {
|
|
424
|
-
var _b;
|
|
425
|
-
(_b = window.Sentry) === null || _b === void 0 ? void 0 : _b.init({
|
|
426
|
-
beforeSend(event) {
|
|
427
|
-
var _b, _c, _d, _e, _f, _g;
|
|
428
|
-
// only send error to sentry if it's from zonos production
|
|
429
|
-
const firstExceptionFilename = (_g = (_f = (_e = (_d = (_c = (_b = event.exception) === null || _b === void 0 ? void 0 : _b.values) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.stacktrace) === null || _e === void 0 ? void 0 : _e.frames) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.filename;
|
|
430
|
-
const isZonosProduction = (firstExceptionFilename === null || firstExceptionFilename === void 0 ? void 0 : firstExceptionFilename.includes('js.zonos.com')) ||
|
|
431
|
-
(firstExceptionFilename === null || firstExceptionFilename === void 0 ? void 0 : firstExceptionFilename.includes('@zonos/elements'));
|
|
432
|
-
const isDevelopmentHref = window.location.href.includes('dev.elements') ||
|
|
433
|
-
window.location.href.includes('route.js.zonos.com');
|
|
434
|
-
// don't send error to sentry if the errors are in development href
|
|
435
|
-
if (isZonosProduction && !isDevelopmentHref) {
|
|
436
|
-
return event;
|
|
437
|
-
}
|
|
438
|
-
return null;
|
|
439
|
-
},
|
|
440
|
-
dsn: 'https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760',
|
|
441
|
-
ignoreErrors: ['Failed to load Stripe.js'],
|
|
442
|
-
release: `zonos-elements@${_a.version}`,
|
|
443
|
-
tracesSampler: () => {
|
|
444
|
-
return 0.01;
|
|
445
|
-
},
|
|
446
|
-
});
|
|
447
|
-
};
|
|
448
|
-
headOrBody.appendChild(script);
|
|
449
|
-
};
|
|
450
399
|
Zonos.injectScript = ({ fallBackDomain, isModule, scriptDomain, theRestUrl, }) => {
|
|
451
400
|
const fullScriptUrl = `${scriptDomain}/${theRestUrl}`;
|
|
452
401
|
const findScript = () => {
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["zonos-checkout",[[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",[[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",[[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",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["zonos-hello-dialog",[[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",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[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",[[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",[[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",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-button_3",[[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",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2",[[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",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-country-select_3",[[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",[[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",[[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);
|
|
8
|
+
return bootstrapLazy([["zonos-checkout",[[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",[[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],"isHelloWidgetRendered":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["zonos-controller",[[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",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["zonos-hello-dialog",[[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",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[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",[[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",[[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",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-button_3",[[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",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2",[[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",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-country-select_3",[[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",[[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",[[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);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as handleFetch, d as cartStore, l as localizationStore } from './cart-
|
|
1
|
+
import { r as handleFetch, d as cartStore, l as localizationStore } from './cart-b96aaa4f.js';
|
|
2
2
|
import { z as zonosStore } from './zonosStore-ba9e541e.js';
|
|
3
3
|
import { l as log } from './logError-c456c092.js';
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-3b46f3c3.js';
|
|
2
|
-
import { h as stripeStore, l as localizationStore, t as translate } from './cart-
|
|
2
|
+
import { h as stripeStore, l as localizationStore, t as translate } from './cart-b96aaa4f.js';
|
|
3
3
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
4
4
|
import { a as logError } from './logError-c456c092.js';
|
|
5
5
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
@@ -143,7 +143,7 @@ const ZonosAddress = class {
|
|
|
143
143
|
}
|
|
144
144
|
render() {
|
|
145
145
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
146
|
-
return (h(Host, { key: '
|
|
146
|
+
return (h(Host, { key: '5279ab1ec41882e2b47adbb9074da302caeda979', class: "zonos--address zonos--elements" }, h("zonos-text", { key: 'e66644c9dfbeb56c54b8914cecfba5cee3023399', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'a7ca990d5c5c5a59edd6d6bf35a4594fb8dfe5d4', class: "zonos--address-component" })));
|
|
147
147
|
}
|
|
148
148
|
get el() { return getElement(this); }
|
|
149
149
|
static get watchers() { return {
|
|
@@ -631,7 +631,7 @@ const ZonosLinkAuthentication = class {
|
|
|
631
631
|
}
|
|
632
632
|
render() {
|
|
633
633
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
634
|
-
return (h(Host, { key: '
|
|
634
|
+
return (h(Host, { key: '153724937e64d3fdf4360648cefc4548b602e87a', class: "zonos--link-authentication zonos--elements" }, h("zonos-text", { key: 'ac9896dff5fd7acb29d81eebeb9e65a47d65b7fb', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'aca720a9382f63f248e3a2c382e5c61e52750bdf', class: "zonos--link-authentication-component" })));
|
|
635
635
|
}
|
|
636
636
|
get el() { return getElement(this); }
|
|
637
637
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-3b46f3c3.js';
|
|
2
2
|
import { d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { H as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-
|
|
4
|
+
import { H as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-b96aaa4f.js';
|
|
5
5
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
6
6
|
import './logError-c456c092.js';
|
|
7
7
|
import './isDarkColor-f8324c10.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-3b46f3c3.js';
|
|
2
|
-
import { d as cartStore, B as currencyFormat, C as cartStoreHasOneEligibleItem, t as translate, r as handleFetch, p as stripeStoreReset, h as stripeStore, D as stripeStoreRetrievePayment, l as localizationStore, E as stripeStoreTranslateAddressToLatin, F as cartStoreUpdateSelectedShippingOption, G as cartStoreGetShippingTransitInfo } from './cart-
|
|
2
|
+
import { d as cartStore, B as currencyFormat, C as cartStoreHasOneEligibleItem, t as translate, r as handleFetch, p as stripeStoreReset, h as stripeStore, D as stripeStoreRetrievePayment, l as localizationStore, E as stripeStoreTranslateAddressToLatin, F as cartStoreUpdateSelectedShippingOption, G as cartStoreGetShippingTransitInfo } from './cart-b96aaa4f.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
|
|
5
|
-
import { t as trackConversionEvent, s as sendErrorLog, a as submitGtag, c as createCustomEvent } from './submitGtag-
|
|
5
|
+
import { t as trackConversionEvent, s as sendErrorLog, a as submitGtag, c as createCustomEvent } from './submitGtag-6e271d76.js';
|
|
6
6
|
import { g as getBorderRadius } from './getBorderRadius-947c24de.js';
|
|
7
7
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
8
8
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-3b46f3c3.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 stripeStore, j as stripeStoreInitCheckoutSession, k as cartStoreUpdateToErrorState, t as translate, m as stripeStorePrefetchLandedCost, n as cartStoreNextStep, o as stripeStoreConfirmPayment, p as stripeStoreReset, q as localizationStoreOnUpdate } from './cart-
|
|
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 stripeStore, j as stripeStoreInitCheckoutSession, k as cartStoreUpdateToErrorState, t as translate, m as stripeStorePrefetchLandedCost, n as cartStoreNextStep, o as stripeStoreConfirmPayment, p as stripeStoreReset, q as localizationStoreOnUpdate } from './cart-b96aaa4f.js';
|
|
3
3
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-ba9e541e.js';
|
|
4
|
-
import { c as createCustomEvent, s as sendErrorLog, a as submitGtag, t as trackConversionEvent } from './submitGtag-
|
|
4
|
+
import { c as createCustomEvent, s as sendErrorLog, a as submitGtag, t as trackConversionEvent } from './submitGtag-6e271d76.js';
|
|
5
5
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
6
6
|
import { l as log, a as logError } from './logError-c456c092.js';
|
|
7
7
|
import { c as classes } from './classes-0d95c529.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-3b46f3c3.js';
|
|
2
|
-
import { r as handleFetch, u as isValidSelector, h as stripeStore, v as initLocalizationStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-
|
|
2
|
+
import { r as handleFetch, u as isValidSelector, h as stripeStore, v as initLocalizationStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-b96aaa4f.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
|
|
4
4
|
import { a as logError, l as log } from './logError-c456c092.js';
|
|
5
5
|
import './isDarkColor-f8324c10.js';
|
|
@@ -292,7 +292,7 @@ const ZonosController = class {
|
|
|
292
292
|
zonosStore.organizationName = organizationName;
|
|
293
293
|
}
|
|
294
294
|
render() {
|
|
295
|
-
return h(Host, { key: '
|
|
295
|
+
return h(Host, { key: 'cfacd00a3f5fba372425ec51cf885356353ad909', class: "zonos--elements" });
|
|
296
296
|
}
|
|
297
297
|
};
|
|
298
298
|
ZonosController.style = ZonosControllerStyle0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-3b46f3c3.js';
|
|
2
|
-
import { l as localizationStore } from './cart-
|
|
2
|
+
import { l as localizationStore } from './cart-b96aaa4f.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './logError-c456c092.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-3b46f3c3.js';
|
|
2
|
-
import { a as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './cart-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './cart-b96aaa4f.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-f8324c10.js';
|
|
@@ -1879,9 +1879,9 @@ const ZonosHelloDialogFooter = class {
|
|
|
1879
1879
|
const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
|
|
1880
1880
|
// Only use gray-0 (white) when the background color is dark (apply inverted color if the element is using dark theme variable)
|
|
1881
1881
|
const mainColor = primaryColor && isDarkColor(primaryColor) ? 'white' : 'black';
|
|
1882
|
-
return (h(Host, { key: '
|
|
1882
|
+
return (h(Host, { key: 'fe8165b23a8e56d068d00ae0f6caf587094db24f', class: "zonos--elements" }, h("div", { key: '32ee04554a36a2d7017e73425166a914e1e65714', class: "zonos--hello-dialog-footer", style: {
|
|
1883
1883
|
'--primary-color': primaryColor,
|
|
1884
|
-
} }, h("a", { key: '
|
|
1884
|
+
} }, h("a", { key: '9fe05913fae1b739ec763ba32128f9004e3015f5', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: 'ebea8cf3264c8d75369e1f87a71e97530755f79b', "aria-label": "Zonos Logo", autoHeight: true, content: ZonosIcon, iconColor: mainColor, size: 108 })), h("div", { key: '133b9a19a6e1cfc69fa4bf93964307ae546aead6', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'f5f5b8e8750fdf81094caa496b37b6201addab4a', buttonColor: mainColor, icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: '454ef914ec4f5d9c4ffa7fdafb91dc25a27221b9', buttonColor: mainColor, icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
|
|
1885
1885
|
}
|
|
1886
1886
|
get ele() { return getElement(this); }
|
|
1887
1887
|
};
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["zonos-checkout",[[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",[[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",[[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",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["zonos-hello-dialog",[[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",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[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",[[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",[[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",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-button_3",[[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",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2",[[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",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-country-select_3",[[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",[[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",[[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);
|
|
19
|
+
return bootstrapLazy([["zonos-checkout",[[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",[[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],"isHelloWidgetRendered":[32],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["zonos-controller",[[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",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["zonos-link",[[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]],["zonos-logo",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["zonos-text",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["zonos-hello-dialog",[[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",[[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["zonos-payment",[[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32]},null,{"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}]]],["zonos-shipping-rich-radio",[[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",[[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",[[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",[[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["zonos-button_3",[[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",[[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}],[1,"zonos-v-stack",{"spacing":[2]}]]],["zonos-card_2",[[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",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["zonos-country-select_3",[[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",[[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",[[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);
|
|
20
20
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-3b46f3c3.js';
|
|
2
|
-
import {
|
|
2
|
+
import { l as localizationStore, B as currencyFormat, t as translate } from './cart-b96aaa4f.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore-ba9e541e.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
@@ -15,6 +15,10 @@ const getHasMoreSpaceAbove = (ref) => {
|
|
|
15
15
|
return availableSpaceAbove >= availableSpaceBelow;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
const wrapStringWithLink = ({ href, text, }) => {
|
|
19
|
+
return `<zonos-link href="${href}" target="_blank" rel="noopener noreferrer">${text}</zonos-link>`;
|
|
20
|
+
};
|
|
21
|
+
|
|
18
22
|
const BagIcon = `<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="https://www.w3.org/2000/svg">
|
|
19
23
|
<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"/>
|
|
20
24
|
</svg>
|
|
@@ -70,6 +74,23 @@ const ZonosHelloDialog = class {
|
|
|
70
74
|
this.setShowLanguageSelect = async (value) => {
|
|
71
75
|
this.showLanguageSelect = value;
|
|
72
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Store has tax id setup in Zonos settings
|
|
79
|
+
*/
|
|
80
|
+
this.hasTaxId = () => {
|
|
81
|
+
var _a;
|
|
82
|
+
return (_a = localizationStore.countryLandedCost) === null || _a === void 0 ? void 0 : _a.hasTaxId;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Some countries don't have threshold. So we need to show generic message for them
|
|
86
|
+
*/
|
|
87
|
+
this.isNoThresholdCountry = (countryCode) => {
|
|
88
|
+
// Only show threshold message if store doesn't have tax id in the settings
|
|
89
|
+
if (!countryCode || !this.hasTaxId()) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
return ['AU'].includes(countryCode);
|
|
93
|
+
};
|
|
73
94
|
this.getDutyMessage = () => {
|
|
74
95
|
const { countryLandedCost } = localizationStore;
|
|
75
96
|
// Our Robby API spells deminimis wrong here
|
|
@@ -77,8 +98,11 @@ const ZonosHelloDialog = class {
|
|
|
77
98
|
? currencyFormat({ amount: countryLandedCost.dutyDeminimus })
|
|
78
99
|
: null;
|
|
79
100
|
// If deminimis is undefined or null, assume it's $0
|
|
80
|
-
return dutyDeminimis
|
|
81
|
-
?
|
|
101
|
+
return dutyDeminimis &&
|
|
102
|
+
!this.isNoThresholdCountry(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.countryCode)
|
|
103
|
+
? translate('Spend [threshold] duty free', {
|
|
104
|
+
threshold: dutyDeminimis,
|
|
105
|
+
})
|
|
82
106
|
: translate('Duties will apply to all orders');
|
|
83
107
|
};
|
|
84
108
|
this.getTaxMessage = () => {
|
|
@@ -87,8 +111,11 @@ const ZonosHelloDialog = class {
|
|
|
87
111
|
const taxDeminimis = (countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.vatTaxDeminimus)
|
|
88
112
|
? currencyFormat({ amount: countryLandedCost.vatTaxDeminimus })
|
|
89
113
|
: null;
|
|
90
|
-
return taxDeminimis
|
|
91
|
-
?
|
|
114
|
+
return taxDeminimis &&
|
|
115
|
+
!this.isNoThresholdCountry(countryLandedCost === null || countryLandedCost === void 0 ? void 0 : countryLandedCost.countryCode)
|
|
116
|
+
? translate('Spend [threshold] tax free', {
|
|
117
|
+
threshold: taxDeminimis,
|
|
118
|
+
})
|
|
92
119
|
: translate('Taxes will apply to all orders');
|
|
93
120
|
};
|
|
94
121
|
this.getUkDutyTaxMessage = (landedCost) => {
|
|
@@ -97,22 +124,31 @@ const ZonosHelloDialog = class {
|
|
|
97
124
|
return null;
|
|
98
125
|
}
|
|
99
126
|
const dutyDeminimis = landedCost.dutyDeminimus;
|
|
100
|
-
return
|
|
101
|
-
countryName
|
|
102
|
-
|
|
103
|
-
|
|
127
|
+
return [
|
|
128
|
+
translate('Orders to [countryName] must be over [threshold] to ship.', {
|
|
129
|
+
countryName: 'United Kingdom',
|
|
130
|
+
threshold: currencyFormat({ amount: dutyDeminimis }),
|
|
131
|
+
}),
|
|
132
|
+
];
|
|
104
133
|
};
|
|
105
134
|
this.getAustraliaDutyTaxMessage = (landedCost) => {
|
|
106
|
-
return
|
|
107
|
-
percentage
|
|
108
|
-
|
|
109
|
-
|
|
135
|
+
return [
|
|
136
|
+
translate('Duties & taxes in Australia, VAT or GST is [percentage] and is due on all orders', {
|
|
137
|
+
percentage: `${landedCost.vatTaxRate * 100}%`,
|
|
138
|
+
}),
|
|
139
|
+
`${translate('The low-value GST law passed July 1st, 2018 applies to this retailer.')} ${wrapStringWithLink({
|
|
140
|
+
href: 'https://zonos.com/docs/global-ecommerce/landed-cost/tax-remittance/australia-gst',
|
|
141
|
+
text: translate('Learn more.'),
|
|
142
|
+
})}`,
|
|
143
|
+
];
|
|
110
144
|
};
|
|
111
145
|
this.getNewZealandDutyTaxMessge = (landedCost) => {
|
|
112
|
-
return
|
|
113
|
-
percentage
|
|
114
|
-
|
|
115
|
-
|
|
146
|
+
return [
|
|
147
|
+
translate('[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.', {
|
|
148
|
+
percentage: `${landedCost.vatTaxRate * 100}%`,
|
|
149
|
+
threshold: currencyFormat({ amount: landedCost.vatTaxDeminimus }),
|
|
150
|
+
}),
|
|
151
|
+
];
|
|
116
152
|
};
|
|
117
153
|
/**
|
|
118
154
|
* Get additional duty tax message if selected country has tax id
|
|
@@ -122,7 +158,7 @@ const ZonosHelloDialog = class {
|
|
|
122
158
|
return null;
|
|
123
159
|
}
|
|
124
160
|
// only show the message if the store has a tax id for selected country
|
|
125
|
-
if (!
|
|
161
|
+
if (!this.hasTaxId()) {
|
|
126
162
|
return null;
|
|
127
163
|
}
|
|
128
164
|
switch (localizationStore.countryLandedCost.countryCode) {
|
|
@@ -169,7 +205,7 @@ const ZonosHelloDialog = class {
|
|
|
169
205
|
(this.dialogRef && getHasMoreSpaceOnRight(this.dialogRef));
|
|
170
206
|
const animateFromBottom = this.dialogRef && getHasMoreSpaceAbove(this.dialogRef);
|
|
171
207
|
const { customMessages } = localizationStore;
|
|
172
|
-
const welcomeMessage = translate('Welcome to [storeName]
|
|
208
|
+
const welcomeMessage = translate('Welcome to [storeName]', {
|
|
173
209
|
storeName: zonosStore.organizationName,
|
|
174
210
|
});
|
|
175
211
|
const defaultMessageStr = ((_a = customMessages.find(x => x.pageName === 'hello_default')) === null || _a === void 0 ? void 0 : _a.message) ||
|
|
@@ -177,17 +213,18 @@ const ZonosHelloDialog = class {
|
|
|
177
213
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
178
214
|
const currentPage = this.getCurrentPageEnum();
|
|
179
215
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
180
|
-
return (h(Host, { key: '
|
|
216
|
+
return (h(Host, { key: '1194b1466981cf8ba04d726eff3ba34b19510258', class: "zonos--elements" }, h("div", { key: 'ffea099f72ff3f42ddbd5b5947a5b8ca0f3d206d', "aria-hidden": "true", class: classes([
|
|
181
217
|
'zonos--hello-dialog',
|
|
182
218
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
183
219
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
184
220
|
!!this.mobileLocationOverride &&
|
|
185
221
|
'zonos--hello-dialog-mobile-override',
|
|
186
222
|
this.isOpen && 'zonos--hello-dialog-open',
|
|
187
|
-
]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '
|
|
223
|
+
]), ref: el => el && (this.dialogRef = el) }, !this.showCountrySelect && !this.showLanguageSelect && (h("div", { key: '7396d7cd91c69f77d5f2f4ae9a088b1a763c6988' }, h("div", { key: 'aedfda83797a58fc2a0432a89503cbc7774d5c8b', class: "zonos--hello-dialog-content" }, h("zonos-button", { key: '0c9ad53d902ce7c45cdf9192dbe8ea7f9f46f7d4', class: "zonos--close-button", icon: h("zonos-icon", { "aria-label": "Close Zonos Hello dialog", content: RemoveIcon }), noBackground: true, onClick: () => this.setIsOpen(false) }), h("zonos-v-stack", { key: '9a359684275e946fc26bdc6ea7b8a371bf49dea5', spacing: 24 }, h("zonos-country-flag", { key: 'ca230fb4426ecb39febb0972d9a6ce15435c4e1d', class: "zonos--hello-country-flag", countryCode: selectedCountryCode }), h("zonos-v-stack", { key: '17bbc6a70143a9165b8f088b5b2ea1e6e69622ed', class: "zonos--hello-dialog-header", spacing: 4 }, h("zonos-text", { key: '33c66273d9fd8330ee4cf2bfcdf5b454a89e0ae0', type: "boldSubheader" }, welcomeMessage), h("zonos-text", { key: '57cfdcd587ab62fad99016a389771d3a169ad297', innerHTML: defaultMessage, textColor: "gray-800" })), h("zonos-v-stack", { key: '28b9b9e7967e81ca50bc4d0cfe45c9545a8b9dde', spacing: 8 }, this.restrictedItems.map(item => {
|
|
188
224
|
var _a;
|
|
189
225
|
return item && (h("zonos-banner", { bannerTitle: item.name, intent: "error" }, (_a = item.itemRestrictions) === null || _a === void 0 ? void 0 : _a.map(x => (h("zonos-text", { textColor: "red-800" }, x === null || x === void 0 ? void 0 : x.note)))));
|
|
190
|
-
}), h("zonos-card", { key: '
|
|
226
|
+
}), h("zonos-card", { key: '94ef9064b4e523c3f0fc9cd50142da36f003006d', spacing: "12px" }, h("zonos-v-stack", { key: '01b3550b5b080d106eaecedf78b13275e01ae159', spacing: 12 }, h("div", { key: '19b1ba3e12dab87250d3ad19a5dc8e13b6f871d6', class: "zonos--flex-message" }, h("zonos-icon", { key: '9773bf4ad57752437a367c2093de0737693bf588', "aria-label": "Duty de minimis", content: ImportIcon }), h("zonos-text", { key: '4c75d971f37db399e6f4332a6c92b53758629b6b' }, dutyDeMinimisMessage)), h("div", { key: '52640f51d3664582d7bb3c26f2d2d17d82ad856e', class: "zonos--flex-message" }, h("zonos-icon", { key: '9afe9273e6b19aada01018152a64973449b87094', "aria-label": "Tax de minimis", content: MoneyIcon }), h("zonos-text", { key: 'b2481af13570471cc2907c48b54c7039ec31e92c' }, taxDeMinimisMessage)), additionalInformation === null || additionalInformation === void 0 ? void 0 :
|
|
227
|
+
additionalInformation.map(info => (h("div", { class: "zonos--flex-message" }, h("zonos-icon", { "aria-label": "Additional information for buying goods from selected country", content: BagIcon }), h("zonos-text", { innerHTML: info })))))), filteredMessages.map(x => (h("zonos-custom-message", { icon: MessageIcon, message: x.message })))))), h("zonos-hello-dialog-footer", { key: 'a6b2d31ee922db13cf9987a823e99d6088c392b0', appearanceSettings: this.appearanceSettings, setShowCountrySelect: value => this.setShowCountrySelect(value), setShowLanguageSelect: value => this.setShowLanguageSelect(value) }))), this.showCountrySelect && (h("div", { key: '21d187502c3f0ccef0c351f09aa943566228944f' }, h("zonos-country-select", { key: '3dbd522e8a5004c2a1ed766ba92c9d0387f845d8', handleOnClose: () => this.setShowCountrySelect(false) }))), this.showLanguageSelect && (h("div", { key: '686d8bba48fefd49bf2bf15dc295fb79b9cd5299' }, h("zonos-language-select", { key: '22ba1b42ec7ba1808fd806ad3529a377d34b4ac8', handleOnClose: () => this.setShowLanguageSelect(false) }))))));
|
|
191
228
|
}
|
|
192
229
|
static get assetsDirs() { return ["assets"]; }
|
|
193
230
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-3b46f3c3.js';
|
|
2
2
|
import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-ba9e541e.js';
|
|
3
|
-
import { r as handleFetch, l as localizationStore, u as isValidSelector, t as translate, w as getZCountryUrlParam, x as setZCountryUrlParam, y as currencyDisplay, z as currencyConvertAndFormat, A as currencyConvert, B as currencyFormat } from './cart-
|
|
3
|
+
import { r as handleFetch, l as localizationStore, u as isValidSelector, t as translate, w as getZCountryUrlParam, x as setZCountryUrlParam, y as currencyDisplay, z as currencyConvertAndFormat, A as currencyConvert, B as currencyFormat } from './cart-b96aaa4f.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import { a as logError, l as log } from './logError-c456c092.js';
|
|
6
6
|
import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
|
|
@@ -494,7 +494,7 @@ const ZonosHello = class {
|
|
|
494
494
|
case 'productDetail':
|
|
495
495
|
return translate(`See duty and tax thresholds`);
|
|
496
496
|
default:
|
|
497
|
-
return translate('Welcome to [storeName]
|
|
497
|
+
return translate('Welcome to [storeName]', {
|
|
498
498
|
storeName: organizationName,
|
|
499
499
|
});
|
|
500
500
|
}
|
|
@@ -659,6 +659,7 @@ const ZonosHello = class {
|
|
|
659
659
|
this.allRestrictedItems = [];
|
|
660
660
|
this.allFoundProducts = [];
|
|
661
661
|
this.productsOnPage = [];
|
|
662
|
+
this.isHelloWidgetRendered = false;
|
|
662
663
|
}
|
|
663
664
|
componentWillLoad() {
|
|
664
665
|
const initInterval = setInterval(async () => {
|
|
@@ -721,6 +722,25 @@ const ZonosHello = class {
|
|
|
721
722
|
handleResize() {
|
|
722
723
|
debounce_1(this.render.bind(this), RESIZE_DEBOUNCE_DELAY_MS);
|
|
723
724
|
}
|
|
725
|
+
/**
|
|
726
|
+
* This method will handle the Hello widget initialized state, should only trigger once
|
|
727
|
+
*/
|
|
728
|
+
handleHelloWidgetInitializedState({ countryCode, currencyCode, }) {
|
|
729
|
+
var _a, _b;
|
|
730
|
+
// If the toggle is already set to true, do nothing
|
|
731
|
+
if (this.isHelloWidgetRendered) {
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
// Should only trigger once when hello is showing up on the page
|
|
735
|
+
if (localizationStore.selectedCountryCode &&
|
|
736
|
+
typeof zonosStore.helloSettings.onInitSucess === 'function') {
|
|
737
|
+
this.isHelloWidgetRendered = true;
|
|
738
|
+
void ((_b = (_a = zonosStore.helloSettings).onInitSucess) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
739
|
+
countryCode,
|
|
740
|
+
currencyCode,
|
|
741
|
+
}));
|
|
742
|
+
}
|
|
743
|
+
}
|
|
724
744
|
handleAppearanceSettingsOverrideChange() {
|
|
725
745
|
var _a;
|
|
726
746
|
if ((_a = this.appearanceSettingsOverride) === null || _a === void 0 ? void 0 : _a.theme) {
|
|
@@ -735,7 +755,7 @@ const ZonosHello = class {
|
|
|
735
755
|
log('Hello is excluded on this url', 'warn');
|
|
736
756
|
return null;
|
|
737
757
|
}
|
|
738
|
-
const { selectedCountryCode } = localizationStore;
|
|
758
|
+
const { selectedCountryCode, targetCurrency } = localizationStore;
|
|
739
759
|
const mobileLocation = this.mobileLocationOverride || zonosStore.helloSettings.mobileLocation;
|
|
740
760
|
const isMobileWindow = window.innerWidth < 768;
|
|
741
761
|
const isOnLeft = this.animateFromLeftOverride ||
|
|
@@ -750,6 +770,13 @@ const ZonosHello = class {
|
|
|
750
770
|
// This will cause the element to rerender with the new org name when it changes. (used for preview on dashboard)
|
|
751
771
|
this.peekMessage = this.getHelloPeekMessage(zonosStore.organizationName);
|
|
752
772
|
const showHello = this.shouldRenderHello() && !!selectedCountryCode;
|
|
773
|
+
// If the condition for rendering Hello is met, set the toggle to true to trigger callback, should only trigger once
|
|
774
|
+
if (showHello && !this.isHelloWidgetRendered) {
|
|
775
|
+
this.handleHelloWidgetInitializedState({
|
|
776
|
+
countryCode: selectedCountryCode,
|
|
777
|
+
currencyCode: targetCurrency,
|
|
778
|
+
});
|
|
779
|
+
}
|
|
753
780
|
return (h(Host, { class: "zonos--hello zonos--elements", "data-theme": theme }, showHello && (h("div", { class: "zonos--hello-wrapper" }, h("button", { class: classes([
|
|
754
781
|
'zonos--hello-widget',
|
|
755
782
|
this.showPeekMessage && 'zonos--hello-show-peek-message',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-3b46f3c3.js';
|
|
2
|
-
import { h as stripeStore } from './cart-
|
|
2
|
+
import { h as stripeStore } from './cart-b96aaa4f.js';
|
|
3
3
|
import { a as logError } from './logError-c456c092.js';
|
|
4
4
|
import './zonosStore-ba9e541e.js';
|
|
5
5
|
import './isDarkColor-f8324c10.js';
|
|
@@ -41,7 +41,7 @@ const ZonosPayment = class {
|
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
43
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
44
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: 'abebca876eac8bd507fcbdb1c029d2ed0f3b749a', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { key: '142257f2052337206dbb70e70c87b5207f2bd97a', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: 'c55bbaea79a291e45d8ed37d556529365de89e9f', class: "zonos--payment-component" })));
|
|
45
45
|
}
|
|
46
46
|
get el() { return getElement(this); }
|
|
47
47
|
static get watchers() { return {
|