@zonos/elements 1.3.11-alpha.1 → 1.3.11-alpha.3
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-d9e9ecfc.js → cart-fcddc0e6.js} +71 -8
- package/dist/cjs/{getBorderRadius-9d619bf6.js → getBorderRadius-4fa738c3.js} +1 -1
- package/dist/cjs/{getContrastColor-af2386af.js → getContrastColor-c72796c6.js} +1 -1
- package/dist/cjs/{isDarkColor-a68274cf.js → isDarkColor-7faf0a82.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{submitGtag-b7ef5d5b.js → submitGtag-ec6ead54.js} +15 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +12 -9
- 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_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-card_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +19 -21
- package/dist/cjs/zonos-checkout.cjs.entry.js +238 -13
- package/dist/cjs/zonos-controller.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +16 -4
- package/dist/cjs/zonos-icon.cjs.entry.js +1 -1
- 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 +4 -4
- package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-21334303.js → zonosStore-bd2a0c59.js} +19 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +4 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +91 -9
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.css +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
- package/dist/collection/components/common/zonos-button/zonos-button.js +1 -1
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +5 -5
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.css +1 -0
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +5 -4
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +5 -5
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +2 -2
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +7 -7
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +17 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +5 -5
- package/dist/collection/components/store/checkout/stripe.js +8 -2
- package/dist/collection/components/store/translationStore/strings.arabic.js +3 -0
- package/dist/collection/components/store/translationStore/strings.base.js +3 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +3 -0
- package/dist/collection/components/store/translationStore/strings.french.js +3 -0
- package/dist/collection/components/store/translationStore/strings.german.js +3 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +3 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -0
- package/dist/collection/components/store/zonosStore.js +19 -2
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +5 -2
- package/dist/collection/components/utils/api/buildCartItemsByTempCart.js +24 -0
- package/dist/collection/components/utils/api/tempCartItem/getAttributes.js +66 -0
- package/dist/collection/components/utils/api/tempCartItem/getMeasurements.js +58 -0
- package/dist/collection/components/utils/api/trackConversionEvent.js +2 -0
- package/dist/collection/components/utils/checkout/isShippableCountry.js +2 -0
- package/dist/collection/components/utils/createCustomEvent.js +9 -0
- package/dist/collection/scripts/zonosBase.js +1 -0
- package/dist/collection/styles/stripe/addressRuleStyle.js +0 -3
- package/dist/collection/types/checkout/api/TempCart.js +1 -0
- package/dist/collection/types/generated/graphql.customer.types.js +73 -0
- package/dist/components/stripe.js +68 -5
- package/dist/components/trackConversionEvent.js +2 -0
- package/dist/components/zonos-address2.js +5 -2
- package/dist/components/zonos-button2.js +1 -1
- package/dist/components/zonos-checkbox2.js +3 -3
- package/dist/components/zonos-checkout-finish2.js +14 -6
- package/dist/components/zonos-checkout-progress-tabs2.js +6 -6
- package/dist/components/zonos-checkout.js +238 -11
- package/dist/components/zonos-dialog2.js +3 -3
- package/dist/components/zonos-hello-dialog2.js +1 -1
- package/dist/components/zonos-hello.js +16 -2
- package/dist/components/zonos-review2.js +1 -1
- package/dist/components/zonos-shipping-rich-radio2.js +1 -1
- package/dist/components/zonos-shipping2.js +1 -1
- package/dist/components/zonosStore.js +19 -2
- package/dist/esm/{cart-6cfd7560.js → cart-228e1ef7.js} +71 -8
- package/dist/esm/{getBorderRadius-c5fb7746.js → getBorderRadius-a89e45fb.js} +1 -1
- package/dist/esm/{getContrastColor-a1a6f6aa.js → getContrastColor-5fbc4746.js} +1 -1
- package/dist/esm/{isDarkColor-810fcaa5.js → isDarkColor-6bf71e51.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{submitGtag-acca574d.js → submitGtag-c3727595.js} +15 -3
- package/dist/esm/zonos-address_4.entry.js +12 -9
- package/dist/esm/zonos-badge_2.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_2.entry.js +5 -5
- package/dist/esm/zonos-card_2.entry.js +4 -4
- package/dist/esm/zonos-cart-items_10.entry.js +19 -21
- package/dist/esm/zonos-checkout.entry.js +238 -13
- package/dist/esm/zonos-controller.entry.js +4 -4
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_3.entry.js +4 -4
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +16 -4
- package/dist/esm/zonos-icon.entry.js +1 -1
- 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 +4 -4
- package/dist/esm/zonos-select-dialog-header_2.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/{zonosStore-e5f3d4da.js → zonosStore-c4c45591.js} +19 -2
- package/dist/esm-es5/cart-228e1ef7.js +1 -0
- package/dist/esm-es5/{getBorderRadius-c5fb7746.js → getBorderRadius-a89e45fb.js} +1 -1
- package/dist/esm-es5/getContrastColor-5fbc4746.js +1 -0
- package/dist/esm-es5/{isDarkColor-810fcaa5.js → isDarkColor-6bf71e51.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/submitGtag-c3727595.js +1 -0
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_2.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-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-icon.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-e5f3d4da.js → zonosStore-c4c45591.js} +1 -1
- package/dist/scripts/getTempCartById.js +1 -0
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +7 -0
- package/dist/types/components/common/zonos-checkbox/zonos-checkbox.d.ts +1 -1
- package/dist/types/components/common/zonos-dialog/zonos-dialog.d.ts +1 -1
- package/dist/types/components/common/zonos-icon/zonos-icon.d.ts +1 -1
- package/dist/types/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.d.ts +2 -1
- package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +1 -0
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +2 -1
- package/dist/types/components/store/checkout/cart.d.ts +9 -3
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -0
- package/dist/types/components/store/zonosStore.d.ts +11 -2
- package/dist/types/components/utils/api/buildCartItemsByTempCart.d.ts +7 -0
- package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
- package/dist/types/components/utils/api/tempCartItem/getAttributes.d.ts +11 -0
- package/dist/types/components/utils/api/tempCartItem/getMeasurements.d.ts +7 -0
- package/dist/types/components/utils/changeDeepProperty.d.ts +1 -1
- package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +1 -1
- package/dist/types/components/utils/createCustomEvent.d.ts +12 -0
- package/dist/types/components/utils/getBorderRadius.d.ts +1 -1
- package/dist/types/components/utils/handleFetch.d.ts +2 -1
- package/dist/types/components.d.ts +2 -4
- package/dist/types/scripts/zonosBase.d.ts +10 -1
- package/dist/types/styles/stripe/addressRuleStyle.d.ts +2 -1
- package/dist/types/types/checkout/CheckoutConfig.d.ts +6 -1
- package/dist/types/types/checkout/api/TempCart.d.ts +80 -0
- package/dist/types/types/generated/graphql.customer.types.d.ts +97 -0
- package/dist/types/types/generated/graphql.customer.types.ts +135 -1
- package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
- package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
- package/dist/types/types/global.d.ts +10 -0
- package/dist/types/types/utils/deep/IDeepKeyofAtIndex.d.ts +1 -1
- package/dist/zonos-elements/{p-7e00a5dc.system.entry.js → p-001518eb.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0082c5be.system.entry.js +1 -0
- package/dist/zonos-elements/p-07022f11.js +1 -0
- package/dist/zonos-elements/{p-ff17c03b.entry.js → p-11f1b5fb.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b51de7b.system.entry.js → p-145dd34a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-65a877e2.entry.js → p-14a2824f.entry.js} +1 -1
- package/dist/zonos-elements/{p-f8b03017.system.entry.js → p-15cd4a76.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c4862aab.system.entry.js → p-160cdf4e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b1ee44c6.system.js → p-167b3369.system.js} +1 -1
- package/dist/zonos-elements/{p-59595553.entry.js → p-171eb334.entry.js} +1 -1
- package/dist/zonos-elements/{p-e74f27da.js → p-1bbdfae5.js} +1 -1
- package/dist/zonos-elements/{p-22db99c9.system.entry.js → p-1d833f22.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b9cde0c3.entry.js → p-215cd7ec.entry.js} +1 -1
- package/dist/zonos-elements/{p-6a80f7f5.entry.js → p-223d72d8.entry.js} +1 -1
- package/dist/zonos-elements/{p-817e7f8e.entry.js → p-30cd191f.entry.js} +1 -1
- package/dist/zonos-elements/{p-824b8708.system.entry.js → p-35c328ba.system.entry.js} +1 -1
- package/dist/zonos-elements/p-397d8268.entry.js +1 -0
- package/dist/zonos-elements/{p-6db032ee.system.js → p-41c2b1c5.system.js} +1 -1
- package/dist/zonos-elements/{p-6dc606c6.entry.js → p-4515ec7b.entry.js} +1 -1
- package/dist/zonos-elements/{p-ac7155d7.entry.js → p-470284a3.entry.js} +1 -1
- package/dist/zonos-elements/{p-fd8c50e8.system.entry.js → p-499d7f5d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b76909ab.entry.js → p-4c9367f1.entry.js} +1 -1
- package/dist/zonos-elements/{p-9a2c3874.system.entry.js → p-4d7b27af.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-60ac5342.system.entry.js → p-55940b5a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a641dfcd.entry.js → p-5d5c0fbf.entry.js} +1 -1
- package/dist/zonos-elements/{p-fac20c60.system.entry.js → p-5f6f0581.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6484bf31.system.js +1 -0
- package/dist/zonos-elements/{p-b2c48954.system.entry.js → p-67ff446b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-212992ec.system.entry.js → p-6c5c5377.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6e81adba.system.js +1 -1
- package/dist/zonos-elements/{p-ff962844.entry.js → p-72c6bf0f.entry.js} +1 -1
- package/dist/zonos-elements/p-7575a42a.js +1 -0
- package/dist/zonos-elements/p-770e5b9e.js +1 -0
- package/dist/zonos-elements/{p-a398bc59.system.entry.js → p-7ff3a533.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0f414d6a.system.js → p-86034f1e.system.js} +1 -1
- package/dist/zonos-elements/{p-6daa64bf.entry.js → p-925ae524.entry.js} +1 -1
- package/dist/zonos-elements/p-93dafeea.system.entry.js +1 -0
- package/dist/zonos-elements/{p-ed4d8d71.system.js → p-94bbf247.system.js} +1 -1
- package/dist/zonos-elements/p-960e4021.system.js +1 -0
- package/dist/zonos-elements/{p-a1a477c9.js → p-9a90fb56.js} +1 -1
- package/dist/zonos-elements/{p-d96f8d89.system.entry.js → p-a144d26a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ac5aecca.entry.js +1 -0
- package/dist/zonos-elements/p-c815e8b4.system.entry.js +1 -0
- package/dist/zonos-elements/p-d11b2449.js +1 -0
- package/dist/zonos-elements/{p-26aee7a0.entry.js → p-d31e5fcc.entry.js} +1 -1
- package/dist/zonos-elements/p-db1adc42.entry.js +1 -0
- package/dist/zonos-elements/{p-b0e9226a.entry.js → p-e3de496a.entry.js} +1 -1
- package/dist/zonos-elements/p-e5b5cbfd.system.entry.js +1 -0
- package/dist/zonos-elements/{p-51c32b3d.entry.js → p-f1037168.entry.js} +1 -1
- package/dist/zonos-elements/{p-2d5a6a7f.system.entry.js → p-f42bffad.system.entry.js} +1 -1
- package/dist/zonos-elements/p-fe8de89b.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-6cfd7560.js +0 -1
- package/dist/esm-es5/getContrastColor-a1a6f6aa.js +0 -1
- package/dist/esm-es5/submitGtag-acca574d.js +0 -1
- package/dist/zonos-elements/p-0dfd549e.system.entry.js +0 -1
- package/dist/zonos-elements/p-0f8acb62.js +0 -1
- package/dist/zonos-elements/p-2fdec8bc.system.entry.js +0 -1
- package/dist/zonos-elements/p-352ba771.system.js +0 -1
- package/dist/zonos-elements/p-4051a42d.js +0 -1
- package/dist/zonos-elements/p-5162f4cc.system.entry.js +0 -1
- package/dist/zonos-elements/p-55b8b98b.js +0 -1
- package/dist/zonos-elements/p-5a40684c.entry.js +0 -1
- package/dist/zonos-elements/p-61e08de7.system.entry.js +0 -1
- package/dist/zonos-elements/p-66cc1554.system.js +0 -1
- package/dist/zonos-elements/p-a7bfe188.entry.js +0 -1
- package/dist/zonos-elements/p-c6e44a9b.entry.js +0 -1
- package/dist/zonos-elements/p-cde25873.js +0 -1
- package/dist/zonos-elements/p-e2131057.entry.js +0 -1
package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js
CHANGED
|
@@ -37,7 +37,7 @@ export class ZonosShippingRichRadio {
|
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
39
|
var _a;
|
|
40
|
-
return (h(Host, { key: '
|
|
40
|
+
return (h(Host, { key: 'a1c2ace211e4d0b9d63a784028cc725bab7229e7', class: "zonos--shipping-rich-radio zonos--elements", "data-theme": this.theme, style: Object.assign(Object.assign({}, this.getRadioItemStyleVariables()), { '--font-family': zonosStoreFontFamily() }) }, (_a = this.items) === null || _a === void 0 ? void 0 : _a.map(item => {
|
|
41
41
|
var _a;
|
|
42
42
|
const selected = ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value) === item.value;
|
|
43
43
|
return (h("div", { "aria-hidden": "true", class: classes([
|
|
@@ -90,8 +90,8 @@ export class ZonosShippingRichRadio {
|
|
|
90
90
|
"references": {
|
|
91
91
|
"Color": {
|
|
92
92
|
"location": "import",
|
|
93
|
-
"path": "src/types",
|
|
94
|
-
"id": "src/types/
|
|
93
|
+
"path": "src/types/styles/Color",
|
|
94
|
+
"id": "src/types/styles/Color.ts::Color"
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
},
|
|
@@ -113,8 +113,8 @@ export class ZonosShippingRichRadio {
|
|
|
113
113
|
"references": {
|
|
114
114
|
"ElementsUiStyle": {
|
|
115
115
|
"location": "import",
|
|
116
|
-
"path": "src/types",
|
|
117
|
-
"id": "src/types/
|
|
116
|
+
"path": "src/types/generated/graphql.customer.types",
|
|
117
|
+
"id": "src/types/generated/graphql.customer.types.ts::ElementsUiStyle"
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
},
|
|
@@ -136,8 +136,8 @@ export class ZonosShippingRichRadio {
|
|
|
136
136
|
"references": {
|
|
137
137
|
"ElementsUiTheme": {
|
|
138
138
|
"location": "import",
|
|
139
|
-
"path": "src/types",
|
|
140
|
-
"id": "src/types/
|
|
139
|
+
"path": "src/types/generated/graphql.customer.types",
|
|
140
|
+
"id": "src/types/generated/graphql.customer.types.ts::ElementsUiTheme"
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { h, Host } from "@stencil/core";
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
2
|
import debounce from "lodash/debounce";
|
|
3
3
|
import { localizationStore } from "../../store/hello/localization";
|
|
4
4
|
import { translate } from "../../store/translationStore";
|
|
5
|
-
import { zonosStore, } from "../../store/zonosStore";
|
|
5
|
+
import { getZonosStoreTheme, zonosStore, } from "../../store/zonosStore";
|
|
6
6
|
import { classes } from "../../utils/classes";
|
|
7
7
|
import { currencyConvert } from "../../utils/hello/currencyConversion/currencyConvert";
|
|
8
8
|
import { currencyConvertAndFormat } from "../../utils/hello/currencyConversion/currencyConvertAndFormat";
|
|
@@ -204,6 +204,8 @@ export class ZonosHello {
|
|
|
204
204
|
this.helloRef.setAttribute('data-zonos-hello-loaded', '');
|
|
205
205
|
this.updateHelloOnPageChange();
|
|
206
206
|
this.watchPriceChange();
|
|
207
|
+
// update theme to browser preference theme if appearance theme is system
|
|
208
|
+
this.handleAppearanceSettingsOverrideChange();
|
|
207
209
|
clearInterval(initInterval);
|
|
208
210
|
}
|
|
209
211
|
}, 100);
|
|
@@ -250,6 +252,13 @@ export class ZonosHello {
|
|
|
250
252
|
handleResize() {
|
|
251
253
|
debounce(this.render.bind(this), RESIZE_DEBOUNCE_DELAY_MS);
|
|
252
254
|
}
|
|
255
|
+
handleAppearanceSettingsOverrideChange() {
|
|
256
|
+
var _a;
|
|
257
|
+
if ((_a = this.appearanceSettingsOverride) === null || _a === void 0 ? void 0 : _a.theme) {
|
|
258
|
+
// update theme to browser preference theme if appearance theme is system
|
|
259
|
+
this.appearanceSettingsOverride.theme = getZonosStoreTheme(this.appearanceSettingsOverride.theme);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
253
262
|
render() {
|
|
254
263
|
var _a, _b;
|
|
255
264
|
const isExcludedUrl = (_a = zonosStore.helloSettings.excludedUrlPatterns) === null || _a === void 0 ? void 0 : _a.some(pattern => new RegExp(pattern).test(window.location.href));
|
|
@@ -508,6 +517,12 @@ export class ZonosHello {
|
|
|
508
517
|
}
|
|
509
518
|
};
|
|
510
519
|
}
|
|
520
|
+
static get watchers() {
|
|
521
|
+
return [{
|
|
522
|
+
"propName": "appearanceSettingsOverride",
|
|
523
|
+
"methodName": "handleAppearanceSettingsOverrideChange"
|
|
524
|
+
}];
|
|
525
|
+
}
|
|
511
526
|
static get listeners() {
|
|
512
527
|
return [{
|
|
513
528
|
"name": "resize",
|
|
@@ -97,7 +97,7 @@ export class ZonosHelloDialog {
|
|
|
97
97
|
const defaultMessage = formatStringWithLinks(defaultMessageStr);
|
|
98
98
|
const currentPage = this.getCurrentPageEnum();
|
|
99
99
|
const filteredMessages = customMessages.filter(x => x.pageName === currentPage);
|
|
100
|
-
return (h(Host, { key: '
|
|
100
|
+
return (h(Host, { key: 'dcd4c055999375785e289cc273c37e50c358d594', class: "zonos--elements" }, h("div", { key: 'a8921afb921ee0b4c0adb31dca0da646c91bdecc', "aria-hidden": "true", class: classes([
|
|
101
101
|
'zonos--hello-dialog',
|
|
102
102
|
animateLeft && 'zonos--hello-dialog-animate-from-left',
|
|
103
103
|
animateFromBottom && 'zonos--hello-dialog-animate-from-bottom',
|
|
@@ -170,8 +170,8 @@ export class ZonosHelloDialog {
|
|
|
170
170
|
"references": {
|
|
171
171
|
"HelloMobileLocation": {
|
|
172
172
|
"location": "import",
|
|
173
|
-
"path": "src/types",
|
|
174
|
-
"id": "src/types/
|
|
173
|
+
"path": "src/types/generated/graphql.customer.types",
|
|
174
|
+
"id": "src/types/generated/graphql.customer.types.ts::HelloMobileLocation"
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
},
|
|
@@ -220,8 +220,8 @@ export class ZonosHelloDialog {
|
|
|
220
220
|
},
|
|
221
221
|
"AppearanceConfig": {
|
|
222
222
|
"location": "import",
|
|
223
|
-
"path": "src/
|
|
224
|
-
"id": "src/
|
|
223
|
+
"path": "src/components/store/zonosStore",
|
|
224
|
+
"id": "src/components/store/zonosStore.ts::AppearanceConfig"
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
},
|
|
@@ -196,6 +196,9 @@ const stripeStorePrefetchLandedCost = async () => {
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
catch (err) {
|
|
199
|
+
// default to empty array if we fail to fetch landed cost, so we can show the error message
|
|
200
|
+
cartStore.landedCostData = [];
|
|
201
|
+
cartStore.shippingData = [];
|
|
199
202
|
logError(err);
|
|
200
203
|
}
|
|
201
204
|
stripeStore.isFetchingLandedCost = false;
|
|
@@ -267,15 +270,18 @@ const stripeStoreRetrievePayment = async ({ clientSecret: _clientSecret, storybo
|
|
|
267
270
|
};
|
|
268
271
|
};
|
|
269
272
|
const stripeStoreConfirmPayment = async () => {
|
|
270
|
-
var _a, _b, _c;
|
|
273
|
+
var _a, _b, _c, _d;
|
|
271
274
|
const stripePaymentReady = !!((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
272
275
|
const stripeElements = stripeStore.stripeElements;
|
|
273
276
|
const stripe = stripeStore.stripe;
|
|
274
277
|
const stripeClientSecret = stripeStore.clientSecret;
|
|
278
|
+
if (!((_b = cartStore.selectedLandedCost) === null || _b === void 0 ? void 0 : _b.landedCost.id)) {
|
|
279
|
+
throw new Error('Attemped to confirm the payment when no landed cost is found in store');
|
|
280
|
+
}
|
|
275
281
|
if (stripe && stripeElements && stripePaymentReady && stripeClientSecret) {
|
|
276
282
|
const { error } = await stripe.confirmPayment({
|
|
277
283
|
confirmParams: {
|
|
278
|
-
receipt_email: (
|
|
284
|
+
receipt_email: (_d = (_c = stripeStore.stripeLinkEventData) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.email,
|
|
279
285
|
return_url: window.location.href,
|
|
280
286
|
},
|
|
281
287
|
elements: stripeElements,
|
|
@@ -62,6 +62,9 @@ export const stringsArabic = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'لم يتم تحديد طريقة الشحن',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'لم يتم العثور على طرق شحن - يرجى مراجعة وتحديث تفاصيل عنوانك بتحديد علامة التبويب "العميل" أعلاه. إذا واصلت مواجهة مشكلات، اتصل بفريق الدعم لدينا للحصول على المساعدة.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'لم يتم العثور على طرق شحن - جرب تحرير عنوانك أو الاتصال بالدعم إذا استمر الخطأ',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsBase = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'No shipping method selected',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'No shipping methods found - try editing your address or contacting support if the error persists',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsChinese = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: '未选择运输方式',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: '未找到配送方式 - 请通过选择上方的"客户"标签,检查并更新您的地址详情。如果您继续遇到问题,请联系我们的支持团队寻求帮助。',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: '未找到运输方法 - 如果错误仍然存在,请尝试编辑您的地址或联系支持',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsDanish = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'Ingen leveringsmetode valgt',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'Ingen leveringsmetoder fundet - venligst gennemgå og opdater dine adresseoplysninger ved at vælge "Kunde" fanen ovenfor. Hvis du fortsætter med at opleve problemer, kontakt da vores supportteam for assistance.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'Ingen forsendelsesmetoder fundet - prøv at redigere din adresse eller kontakte support, hvis fejlen fortsætter',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsDutch = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'Geen verzendmethode geselecteerd',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'Geen verzendmethoden gevonden - gelieve uw adresgegevens te controleren en bij te werken door het tabblad "Klant" hierboven te selecteren. Als u problemen blijft ondervinden, neem dan contact op met ons ondersteuningsteam voor hulp.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'Geen verzendmethoden gevonden - probeer uw adres te bewerken of neem contact op met de ondersteuning als de fout aanhoudt',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsFrench = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'Aucune méthode de livraison sélectionnée',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: "Aucune méthode d'expédition trouvée - veuillez vérifier et mettre à jour vos détails d'adresse en sélectionnant l'onglet 'Client' ci-dessus. Si vous continuez à rencontrer des problèmes, contactez notre équipe de support pour assistance.",
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: "Aucune méthode d'expédition trouvée - essayez de modifier votre adresse ou de contacter le support si l'erreur persiste",
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsGerman = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'Keine Versandart ausgewählt',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'Keine Versandmethoden gefunden - bitte überprüfen und aktualisieren Sie Ihre Adressangaben, indem Sie den Reiter "Kunde" oben auswählen. Wenn Sie weiterhin Probleme haben, kontaktieren Sie unser Support-Team zur Unterstützung.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'Keine Versandmethoden gefunden - versuchen Sie, Ihre Adresse zu bearbeiten, oder kontaktieren Sie den Support, wenn der Fehler weiterhin besteht',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsHebrew = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'לא נבחרה שיטת משלוח',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'לא נמצאו שיטות משלוח - אנא בדוק ועדכן את פרטי הכתובת שלך על ידי בחירת הכרטיסייה "לקוח" למעלה. אם אתה ממשיך להיתקל בבעיות, צור קשר עם צוות התמיכה שלנו לעזרה.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'לא נמצאו שיטות משלוח - נסו לערוך את הכתובת שלך או ליצור קשר עם התמיכה אם השגיאה ממשיכה',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsIndonesian = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'Tidak ada metode pengiriman yang dipilih',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'Tidak ditemukan metode pengiriman - silakan tinjau dan perbarui detail alamat Anda dengan memilih tab "Pelanggan" di atas. Jika Anda terus mengalami masalah, hubungi tim dukungan kami untuk bantuan.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'Tidak ditemukan metode pengiriman - coba edit alamat Anda atau hubungi dukungan jika kesalahan masih berlanjut',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsItalian = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'Nessun metodo di spedizione selezionato',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'Nessun metodo di spedizione trovato - si prega di rivedere e aggiornare i dettagli del vostro indirizzo selezionando la scheda "Cliente" sopra. Se continuate a incontrare problemi, contattate il nostro team di supporto per assistenza.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: "Nessun metodo di spedizione trovato - prova a modificare il tuo indirizzo o contatta il supporto se l'errore persiste",
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsJapanese = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: '配送方法が選択されていません',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: '配送方法が見つかりませんでした - 上の「顧客」タブを選択して住所の詳細を確認し、更新してください。引き続き問題が発生する場合は、サポートチームに連絡して支援を受けてください。',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: '配送方法が見つかりません - 住所を編集するか、エラーが続く場合はサポートにお問い合わせください',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsKorean = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: '선택된 배송 방법이 없습니다',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: '배송 방법을 찾을 수 없습니다 - 위의 "고객" 탭을 선택하여 주소 세부 정보를 검토하고 업데이트하십시오. 문제가 계속 발생하는 경우, 지원 팀에 연락하여 도움을 받으십시오.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: '배송 방법을 찾을 수 없습니다 - 주소를 편집하거나 오류가 계속되는 경우 지원팀에 문의하세요',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsNorwegian = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'Ingen fraktmetode valgt',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'Ingen fraktmetoder funnet - vennligst se over og oppdater dine adresseopplysninger ved å velge "Kunde"-fanen ovenfor. Hvis du fortsetter å oppleve problemer, kontakt vårt støtteteam for assistanse.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'Ingen fraktmetoder funnet - prøv å redigere adressen din eller kontakte støtte hvis feilen fortsetter',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsPolish = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'Nie wybrano metody wysyłki',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'Nie znaleziono metod wysyłki - proszę przejrzeć i zaktualizować szczegóły adresu, wybierając zakładkę "Klient" powyżej. Jeśli nadal napotykasz problemy, skontaktuj się z naszym zespołem wsparcia w celu uzyskania pomocy.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'Nie znaleziono metod dostawy - spróbuj edytować swój adres lub skontaktować się z obsługą, jeśli błąd będzie się utrzymywać',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsPortuguese = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'Nenhum método de envio selecionado',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'Nenhum método de envio encontrado - por favor, revise e atualize os detalhes do seu endereço selecionando a aba "Cliente" acima. Se você continuar encontrando problemas, entre em contato com nossa equipe de suporte para assistência.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'Nenhum método de envio encontrado - tente editar seu endereço ou entrar em contato com o suporte se o erro persistir',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsRussian = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'Метод доставки не выбран',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'Способы доставки не найдены - пожалуйста, проверьте и обновите детали вашего адреса, выбрав вкладку "Клиент" выше. Если вы продолжаете сталкиваться с проблемами, свяжитесь с нашей службой поддержки за помощью.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'Не найдено методов доставки - попробуйте отредактировать ваш адрес или свяжитесь с поддержкой, если ошибка сохраняется',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsSpanish = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'No se ha seleccionado un método de envío',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'No se encontraron métodos de envío - por favor revise y actualice los detalles de su dirección seleccionando la pestaña "Cliente" arriba. Si continúa encontrando problemas, contacte a nuestro equipo de soporte para obtener ayuda.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'No se encontraron métodos de envío: intenta editar tu dirección o contactar al soporte si el error persiste',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsSwedish = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'Ingen fraktmetod vald',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'Inga leveransmetoder hittades - vänligen granska och uppdatera dina adressuppgifter genom att välja "Kund"-fliken ovan. Om du fortsätter att stöta på problem, kontakta vårt supportteam för hjälp.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'Inga leveransmetoder hittades - försök redigera din adress eller kontakta supporten om felet kvarstår',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsTurkish = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'Kargo yöntemi seçilmedi',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'Gönderim yöntemleri bulunamadı - lütfen "Müşteri" sekmesini yukarıdan seçerek adres detaylarınızı gözden geçirin ve güncelleyin. Sorunlarla karşılaşmaya devam ederseniz, yardım için destek ekibimizle iletişime geçin.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'Hiçbir gönderi yöntemi bulunamadı - eğer hata devam ediyorsa adresinizi düzenlemeyi deneyin veya destekle iletişime geçin',
|
|
67
70
|
},
|
|
@@ -62,6 +62,9 @@ export const stringsVietnamese = {
|
|
|
62
62
|
'No shipping method selected': {
|
|
63
63
|
value: 'Chưa chọn phương thức vận chuyển',
|
|
64
64
|
},
|
|
65
|
+
'No shipping methods found - please review and update your address details by selecting the "Customer" tab above. If you continue to encounter issues, contact our support team for assistance.': {
|
|
66
|
+
value: 'Không tìm thấy phương thức vận chuyển - vui lòng xem lại và cập nhật chi tiết địa chỉ của bạn bằng cách chọn tab "Khách hàng" phía trên. Nếu bạn tiếp tục gặp sự cố, hãy liên hệ với đội ngũ hỗ trợ của chúng tôi để được hỗ trợ.',
|
|
67
|
+
},
|
|
65
68
|
'No shipping methods found - try editing your address or contacting support if the error persists': {
|
|
66
69
|
value: 'Không tìm thấy phương thức vận chuyển - hãy thử chỉnh sửa địa chỉ của bạn hoặc liên hệ hỗ trợ nếu lỗi vẫn tiếp tục',
|
|
67
70
|
},
|
|
@@ -74,6 +74,17 @@ const { reset, state: zonosStore } = createStore(() => ({
|
|
|
74
74
|
zonosApiKey: '',
|
|
75
75
|
}));
|
|
76
76
|
let savedZonosSettings = null;
|
|
77
|
+
/**
|
|
78
|
+
* Get theme from media query if theme is SYSTEM, otherwise return the theme
|
|
79
|
+
*/
|
|
80
|
+
const getZonosStoreTheme = (theme) => {
|
|
81
|
+
if (theme === 'SYSTEM') {
|
|
82
|
+
return window.matchMedia('(prefers-color-scheme: dark)').matches
|
|
83
|
+
? 'DARK'
|
|
84
|
+
: 'LIGHT';
|
|
85
|
+
}
|
|
86
|
+
return theme;
|
|
87
|
+
};
|
|
77
88
|
/**
|
|
78
89
|
* Init setting from zonos setting
|
|
79
90
|
*/
|
|
@@ -84,9 +95,15 @@ const zonosStoreInitSetting = ({ overrideSettings, zonosSettings, }) => {
|
|
|
84
95
|
// save zonos settings to be used later
|
|
85
96
|
savedZonosSettings = zonosSettings;
|
|
86
97
|
}
|
|
87
|
-
|
|
98
|
+
const mergedAppearanceConfig = mergeConfig(zonosStore.appearance, (savedZonosSettings === null || savedZonosSettings === void 0 ? void 0 : savedZonosSettings.appearanceSettings) ||
|
|
88
99
|
(zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.appearanceSettings) ||
|
|
89
100
|
null, overrideSettings === null || overrideSettings === void 0 ? void 0 : overrideSettings.appearance);
|
|
101
|
+
// override the theme to user browser preferences if it is set to SYSTEM
|
|
102
|
+
if (mergedAppearanceConfig.theme === 'SYSTEM') {
|
|
103
|
+
// update theme to user browser preferences
|
|
104
|
+
mergedAppearanceConfig.theme = getZonosStoreTheme(mergedAppearanceConfig.theme);
|
|
105
|
+
}
|
|
106
|
+
zonosStore.appearance = mergedAppearanceConfig;
|
|
90
107
|
zonosStore.checkoutSettings = mergeConfig(zonosStore.checkoutSettings, (savedZonosSettings === null || savedZonosSettings === void 0 ? void 0 : savedZonosSettings.checkoutSettings) ||
|
|
91
108
|
(zonosSettings === null || zonosSettings === void 0 ? void 0 : zonosSettings.checkoutSettings) ||
|
|
92
109
|
null, overrideSettings === null || overrideSettings === void 0 ? void 0 : overrideSettings.checkoutSettings);
|
|
@@ -102,4 +119,4 @@ const zonosStoreFontFamily = () => {
|
|
|
102
119
|
const fontFamily = zonosStore.appearance.fontFamily || 'Inter';
|
|
103
120
|
return fontFamily;
|
|
104
121
|
};
|
|
105
|
-
export { zonosStore, zonosStoreFontFamily, zonosStoreInitSetting };
|
|
122
|
+
export { getZonosStoreTheme, zonosStore, zonosStoreFontFamily, zonosStoreInitSetting, };
|
|
@@ -99,7 +99,10 @@ export class ZonosAddress {
|
|
|
99
99
|
: [];
|
|
100
100
|
const addressElement = stripeElements.create('address', {
|
|
101
101
|
allowedCountries: this.type === 'shipping' ? shippingZone : [],
|
|
102
|
-
|
|
102
|
+
// only show the default address if stripeAddressEventData is not provided
|
|
103
|
+
contacts: this.defaultAddress && !stripeAddressEventData
|
|
104
|
+
? [this.defaultAddress]
|
|
105
|
+
: [],
|
|
103
106
|
defaultValues: {
|
|
104
107
|
address: Object.assign(Object.assign({}, stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address), { country: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country) ||
|
|
105
108
|
localizationStore.selectedCountryCode ||
|
|
@@ -173,7 +176,7 @@ export class ZonosAddress {
|
|
|
173
176
|
}
|
|
174
177
|
render() {
|
|
175
178
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
176
|
-
return (h(Host, { key: '
|
|
179
|
+
return (h(Host, { key: '81b9d2e822eea4eb85a3d7d21ff645c9f0841f30', class: "zonos--address zonos--elements" }, h("zonos-text", { key: 'cd180e130f161233fd05365f9250913214846ced', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: 'b4d15f56e1215305367c071c4d9be985b09245b8', class: "zonos--address-component" }), this.hasInvalidCharacters && (h("zonos-banner", { bannerTitle: translate('Please ensure your text uses the Latin alphabet only (A-Z, a-z).'), intent: "error" }))));
|
|
177
180
|
}
|
|
178
181
|
static get is() { return "zonos-address"; }
|
|
179
182
|
static get encapsulation() { return "scoped"; }
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getAttributes } from "./tempCartItem/getAttributes";
|
|
2
|
+
import { getMeasurements } from "./tempCartItem/getMeasurements";
|
|
3
|
+
/**
|
|
4
|
+
* Map the items from tempCart like how we do it in dgs
|
|
5
|
+
* @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L393
|
|
6
|
+
*/
|
|
7
|
+
export const buildCartItemsByTempCart = (tempCartData) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const tempCartItems = ((_a = tempCartData === null || tempCartData === void 0 ? void 0 : tempCartData.items) === null || _a === void 0 ? void 0 : _a.map(item => ({
|
|
10
|
+
amount: item.unitPrice || 0,
|
|
11
|
+
attributes: getAttributes(item),
|
|
12
|
+
countryOfOrigin: item.countryOfOrigin || undefined,
|
|
13
|
+
currencyCode: 'USD',
|
|
14
|
+
description: item.itemDescriptionLong || '',
|
|
15
|
+
imageUrl: item.imageURL || '',
|
|
16
|
+
itemType: 'PHYSICAL_GOOD',
|
|
17
|
+
measurements: getMeasurements(item),
|
|
18
|
+
name: item.description || '',
|
|
19
|
+
productId: item.productId || '',
|
|
20
|
+
quantity: item.quantity || 0,
|
|
21
|
+
sku: item.sku || '',
|
|
22
|
+
}))) || [];
|
|
23
|
+
return tempCartItems;
|
|
24
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is just function to make the key typesafe to enter
|
|
3
|
+
* @returns
|
|
4
|
+
*/
|
|
5
|
+
const objAttribute = ({ key, value, }) => value
|
|
6
|
+
? {
|
|
7
|
+
key,
|
|
8
|
+
value,
|
|
9
|
+
}
|
|
10
|
+
: null;
|
|
11
|
+
/**
|
|
12
|
+
* Map legacy item attribute to dgs item attributes
|
|
13
|
+
* @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L412
|
|
14
|
+
*/
|
|
15
|
+
export const getAttributes = (item) => {
|
|
16
|
+
return [
|
|
17
|
+
objAttribute({
|
|
18
|
+
key: 'brand',
|
|
19
|
+
value: item.itemBrand,
|
|
20
|
+
}),
|
|
21
|
+
objAttribute({
|
|
22
|
+
key: 'material',
|
|
23
|
+
value: item.itemMaterial,
|
|
24
|
+
}),
|
|
25
|
+
objAttribute({
|
|
26
|
+
key: 'category',
|
|
27
|
+
value: item.itemCategory,
|
|
28
|
+
}),
|
|
29
|
+
objAttribute({
|
|
30
|
+
key: 'color',
|
|
31
|
+
value: item.itemColor,
|
|
32
|
+
}),
|
|
33
|
+
objAttribute({
|
|
34
|
+
key: 'customization',
|
|
35
|
+
value: item.itemCustomization,
|
|
36
|
+
}),
|
|
37
|
+
objAttribute({
|
|
38
|
+
key: 'descriptionDetailed',
|
|
39
|
+
value: item.itemDescriptionDetailed,
|
|
40
|
+
}),
|
|
41
|
+
objAttribute({
|
|
42
|
+
key: 'fabricContent',
|
|
43
|
+
value: item.itemFabricContent,
|
|
44
|
+
}),
|
|
45
|
+
objAttribute({
|
|
46
|
+
key: 'ltlClass',
|
|
47
|
+
value: item.itemLtlClass,
|
|
48
|
+
}),
|
|
49
|
+
objAttribute({
|
|
50
|
+
key: 'pickingLocation',
|
|
51
|
+
value: item.itemPickingLocation,
|
|
52
|
+
}),
|
|
53
|
+
objAttribute({
|
|
54
|
+
key: 'shipFromLocation',
|
|
55
|
+
value: item.itemShipFromLocation,
|
|
56
|
+
}),
|
|
57
|
+
objAttribute({
|
|
58
|
+
key: 'size',
|
|
59
|
+
value: item.itemSize,
|
|
60
|
+
}),
|
|
61
|
+
objAttribute({
|
|
62
|
+
key: 'status',
|
|
63
|
+
value: item.status,
|
|
64
|
+
}),
|
|
65
|
+
].filter(Boolean);
|
|
66
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Map legacy weight units with dgs
|
|
3
|
+
* @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L483
|
|
4
|
+
*/
|
|
5
|
+
const getItemWeightUnit = (weightUnit) => {
|
|
6
|
+
if (!weightUnit) {
|
|
7
|
+
return 'POUND';
|
|
8
|
+
}
|
|
9
|
+
switch (weightUnit.toUpperCase()) {
|
|
10
|
+
case 'KG':
|
|
11
|
+
return 'KILOGRAM';
|
|
12
|
+
case 'OZ':
|
|
13
|
+
return 'OUNCE';
|
|
14
|
+
case 'G':
|
|
15
|
+
return 'GRAM';
|
|
16
|
+
default:
|
|
17
|
+
return 'POUND';
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Mapping legacy measurement with dgs
|
|
22
|
+
* @ref https://github.com/Zonos/ShippingQuoteService/blob/f8bd4f1ff41cb34b49b9f3f435576ec28dedf906/src/main/java/com/iglobal/services/shippingquote/dto/ShippingQuoteRequestDto.java#L441
|
|
23
|
+
*/
|
|
24
|
+
export const getMeasurements = (item) => {
|
|
25
|
+
if (!item) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
const measurements = [];
|
|
29
|
+
if (item.length) {
|
|
30
|
+
measurements.push({
|
|
31
|
+
type: 'LENGTH',
|
|
32
|
+
unitOfMeasure: 'INCH',
|
|
33
|
+
value: item.length,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
if (item.width) {
|
|
37
|
+
measurements.push({
|
|
38
|
+
type: 'WIDTH',
|
|
39
|
+
unitOfMeasure: 'INCH',
|
|
40
|
+
value: item.width,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (item.weight) {
|
|
44
|
+
measurements.push({
|
|
45
|
+
type: 'WEIGHT',
|
|
46
|
+
unitOfMeasure: getItemWeightUnit(item.weightUnits),
|
|
47
|
+
value: item.weight,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
if (item.height) {
|
|
51
|
+
measurements.push({
|
|
52
|
+
type: 'HEIGHT',
|
|
53
|
+
unitOfMeasure: 'INCH',
|
|
54
|
+
value: item.height,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return measurements;
|
|
58
|
+
};
|
|
@@ -5,6 +5,8 @@ export const trackConversionEvent = async (eventName, metadata) => {
|
|
|
5
5
|
var _a, _b;
|
|
6
6
|
// If a Zonos domain, or in qa mode with zonosQaUrl, or debug mode is on, we don't want analytics to be tracked
|
|
7
7
|
if (window.location.href.includes('zonos.com') ||
|
|
8
|
+
// legacy mock checkout, no need to track analytics for this
|
|
9
|
+
window.location.href.includes('checkout.iglobalstores.com') ||
|
|
8
10
|
!!((_a = window.Zonos) === null || _a === void 0 ? void 0 : _a.zonosQaUrl) ||
|
|
9
11
|
!!((_b = window.Zonos) === null || _b === void 0 ? void 0 : _b.debug)) {
|
|
10
12
|
return;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { localizationStore } from "../../store/hello/localization";
|
|
2
|
+
import { createCustomEvent } from "../createCustomEvent";
|
|
2
3
|
import { log } from "../logging/log";
|
|
3
4
|
export const isShippableCountry = (showLog = true) => {
|
|
4
5
|
if (!localizationStore.localizationLoaded) {
|
|
@@ -6,6 +7,7 @@ export const isShippableCountry = (showLog = true) => {
|
|
|
6
7
|
}
|
|
7
8
|
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
8
9
|
if (!localizationStore.isShippableCountry) {
|
|
10
|
+
document.dispatchEvent(createCustomEvent('legacyCheckoutError', 'Unable to initiate checkout process in a country where shipping is not available'));
|
|
9
11
|
if (showLog) {
|
|
10
12
|
log(`Checkout: not shippable country`);
|
|
11
13
|
}
|