@zonos/elements 1.3.83 → 1.3.85
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-4de3faca.js → cart-fc426d98.js} +94 -144
- package/dist/cjs/{createCustomEvent-65331eae.js → createCustomEvent-354c8e63.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{paypal-370b3a10.js → paypal-1fe5ed0c.js} +1 -1
- package/dist/cjs/zonos-address_7.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +30 -13
- package/dist/cjs/zonos-checkout.cjs.entry.js +9 -7
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification_3.cjs.entry.js +4 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +12 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +7 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +2 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +3 -2
- package/dist/collection/components/store/checkout/cart.js +0 -1
- package/dist/collection/components/store/checkout/stripe.js +4 -2
- package/dist/collection/components/store/hello/localization.js +6 -2
- package/dist/collection/components/store/translationStore/strings.arabic.js +4 -7
- package/dist/collection/components/store/translationStore/strings.base.js +4 -7
- package/dist/collection/components/store/translationStore/strings.chinese.js +4 -7
- package/dist/collection/components/store/translationStore/strings.danish.js +4 -7
- package/dist/collection/components/store/translationStore/strings.dutch.js +4 -7
- package/dist/collection/components/store/translationStore/strings.french.js +4 -7
- package/dist/collection/components/store/translationStore/strings.german.js +4 -7
- package/dist/collection/components/store/translationStore/strings.hebrew.js +4 -7
- package/dist/collection/components/store/translationStore/strings.indonesian.js +4 -7
- package/dist/collection/components/store/translationStore/strings.italian.js +4 -7
- package/dist/collection/components/store/translationStore/strings.japanese.js +4 -7
- package/dist/collection/components/store/translationStore/strings.korean.js +4 -7
- package/dist/collection/components/store/translationStore/strings.norwegian.js +4 -7
- package/dist/collection/components/store/translationStore/strings.polish.js +4 -7
- package/dist/collection/components/store/translationStore/strings.portuguese.js +4 -7
- package/dist/collection/components/store/translationStore/strings.russian.js +4 -7
- package/dist/collection/components/store/translationStore/strings.spanish.js +4 -7
- package/dist/collection/components/store/translationStore/strings.swedish.js +4 -7
- package/dist/collection/components/store/translationStore/strings.turkish.js +4 -7
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +4 -7
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +3 -3
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +2 -2
- package/dist/collection/components/utils/checkout/isDisabledCountry.js +0 -2
- package/dist/collection/components/utils/checkout/isShippableCountry.js +0 -2
- package/dist/collection/components/utils/getContrastColor.js +8 -3
- package/dist/collection/styles/stripe/addressRuleStyle.js +4 -0
- package/dist/esm/{cart-bdc45f59.js → cart-6c44367a.js} +94 -145
- package/dist/esm/{createCustomEvent-4db13122.js → createCustomEvent-ec15a4a7.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{paypal-1b29d424.js → paypal-a562a640.js} +1 -1
- package/dist/esm/zonos-address_7.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +30 -13
- package/dist/esm/zonos-checkout.entry.js +9 -7
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-notification_3.entry.js +4 -4
- package/dist/esm-es5/cart-6c44367a.js +1 -0
- package/dist/esm-es5/{createCustomEvent-4db13122.js → createCustomEvent-ec15a4a7.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{paypal-1b29d424.js → paypal-a562a640.js} +1 -1
- package/dist/esm-es5/zonos-address_7.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_4.entry.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-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
- 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/store/hello/localization.d.ts +4 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.base.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.danish.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.french.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.german.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.italian.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.korean.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.polish.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.russian.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +2 -5
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +2 -5
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/zonos-elements/assets/ChevronUpIcon.svg +1 -23
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-a34f0674.entry.js → p-01604d44.entry.js} +1 -1
- package/dist/zonos-elements/{p-a6cff57f.system.js → p-08fee913.system.js} +1 -1
- package/dist/zonos-elements/{p-4ec7afc5.system.js → p-092961f1.system.js} +1 -1
- package/dist/zonos-elements/{p-2140ccb4.system.entry.js → p-133595ff.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2183128a.system.entry.js → p-1eb59b7c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3457c5e8.system.entry.js → p-35b6b151.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-017bf338.entry.js → p-3b3cb2a4.entry.js} +1 -1
- package/dist/zonos-elements/p-51e2df70.entry.js +1 -0
- package/dist/zonos-elements/{p-b0303b0e.entry.js → p-5ba198b3.entry.js} +1 -1
- package/dist/zonos-elements/{p-e3df5ff6.system.entry.js → p-5ebde561.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9cfa3736.system.entry.js → p-63a33354.system.entry.js} +1 -1
- package/dist/zonos-elements/p-64b67900.entry.js +1 -0
- package/dist/zonos-elements/p-6b7fa35e.system.js +1 -0
- package/dist/zonos-elements/p-710ac059.js +1 -0
- package/dist/zonos-elements/{p-01d11845.system.entry.js → p-76013796.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f1d043ad.system.entry.js → p-7b4a5b9b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-95241447.entry.js +1 -0
- package/dist/zonos-elements/p-a26a8ca5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9b911f6f.entry.js → p-a858a304.entry.js} +1 -1
- package/dist/zonos-elements/{p-6aa35f18.entry.js → p-b5316c2c.entry.js} +1 -1
- package/dist/zonos-elements/{p-a1fa0a1c.system.js → p-b9645c27.system.js} +1 -1
- package/dist/zonos-elements/p-c37b99dd.system.entry.js +1 -0
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-7cc5e325.js → p-cbb742ab.js} +1 -1
- package/dist/zonos-elements/p-d7b341e3.system.entry.js +1 -0
- package/dist/zonos-elements/p-de6c2a4a.entry.js +1 -0
- package/dist/zonos-elements/{p-771e2623.entry.js → p-e78c2429.entry.js} +1 -1
- package/dist/zonos-elements/p-ee8b5e53.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-bdc45f59.js +0 -1
- package/dist/zonos-elements/p-00bb8221.system.entry.js +0 -1
- package/dist/zonos-elements/p-0cc8c6a3.system.js +0 -1
- package/dist/zonos-elements/p-278d61ed.js +0 -1
- package/dist/zonos-elements/p-2b60faf8.entry.js +0 -1
- package/dist/zonos-elements/p-3347e142.entry.js +0 -1
- package/dist/zonos-elements/p-5fb337a0.entry.js +0 -1
- package/dist/zonos-elements/p-7f3aeb53.system.entry.js +0 -1
- package/dist/zonos-elements/p-844ec9f9.system.entry.js +0 -1
- package/dist/zonos-elements/p-c6350880.entry.js +0 -1
- package/dist/zonos-elements/p-ce41cbde.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
2
|
import { stripeStore } from "../../store/checkout/stripe";
|
|
3
|
-
import { localizationStore } from "../../store/hello/localization";
|
|
3
|
+
import { DEFAULT_COUNTRY_CODE_LEGACY_CHECKOUT, localizationStore, } from "../../store/hello/localization";
|
|
4
4
|
import { isCheckoutMobile } from "../../utils/checkout/isCheckoutMobile";
|
|
5
5
|
import { logError } from "../../utils/logging/logError";
|
|
6
6
|
/**
|
|
@@ -72,7 +72,7 @@ export class ZonosAddress {
|
|
|
72
72
|
defaultValues: {
|
|
73
73
|
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) ||
|
|
74
74
|
localizationStore.selectedCountryCode ||
|
|
75
|
-
|
|
75
|
+
DEFAULT_COUNTRY_CODE_LEGACY_CHECKOUT }),
|
|
76
76
|
firstName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.firstName,
|
|
77
77
|
lastName: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.lastName,
|
|
78
78
|
phone: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.phone,
|
|
@@ -135,7 +135,7 @@ export class ZonosAddress {
|
|
|
135
135
|
}
|
|
136
136
|
render() {
|
|
137
137
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
138
|
-
return (h(Host, { key: '
|
|
138
|
+
return (h(Host, { key: 'aa9a569b302099681082cd4219b553f9c70842ea', class: "zonos--address zonos--elements" }, h("zonos-text", { key: '60050e9f8f0b80dde9acc9ffbd868333fdabf2b3', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("div", { key: '5af7ee4f23d75fc877cdde7babe0edaefef14da8', class: "zonos--address-component" })));
|
|
139
139
|
}
|
|
140
140
|
static get is() { return "zonos-address"; }
|
|
141
141
|
static get encapsulation() { return "scoped"; }
|
|
@@ -17,7 +17,7 @@ export class ZonosPayment {
|
|
|
17
17
|
// Create and mount the Authentication Element in ${type} mode
|
|
18
18
|
const paymentElement = stripeStore.stripePaymentElement ||
|
|
19
19
|
this.stripeElements.create('payment', {
|
|
20
|
-
layout: '
|
|
20
|
+
layout: 'tabs',
|
|
21
21
|
});
|
|
22
22
|
const paymentElementContainer = this.el.querySelector('.zonos--payment-component');
|
|
23
23
|
if (!paymentElementContainer) {
|
|
@@ -36,7 +36,7 @@ export class ZonosPayment {
|
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
38
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: 'cf616ec959fd1b7396ed86b23561f459e0da8722', class: "zonos--payment zonos--elements" }, this.titleText && (h("zonos-text", { key: 'e5564db71ba2c0d67d372cb1804d6d462cdf1b33', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), h("div", { key: '3ea47f2c0a541590210d181bc73ecb3fb27e7783', class: "zonos--payment-component" }), h("div", { key: 'd3a46a127448568caf4309806e88556594075c12', class: "zonos--payment-paypal-container" })));
|
|
40
40
|
}
|
|
41
41
|
static get is() { return "zonos-payment"; }
|
|
42
42
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { localizationStore } from "../../store/hello/localization";
|
|
2
|
-
import { createCustomEvent } from "../createCustomEvent";
|
|
3
2
|
import { log } from "../logging/log";
|
|
4
3
|
export const isDisabledCountry = (showLog = true) => {
|
|
5
4
|
if (!localizationStore.localizationLoaded) {
|
|
6
5
|
return true;
|
|
7
6
|
}
|
|
8
7
|
if (localizationStore.isDisabledCountry) {
|
|
9
|
-
document.dispatchEvent(createCustomEvent('legacyCheckoutError', 'Unable to initiate checkout process in a country that has been disabled for checkout'));
|
|
10
8
|
if (showLog) {
|
|
11
9
|
log(`Checkout: disabled country`);
|
|
12
10
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { localizationStore } from "../../store/hello/localization";
|
|
2
|
-
import { createCustomEvent } from "../createCustomEvent";
|
|
3
2
|
import { log } from "../logging/log";
|
|
4
3
|
export const isShippableCountry = (showLog = true) => {
|
|
5
4
|
if (!localizationStore.localizationLoaded) {
|
|
@@ -7,7 +6,6 @@ export const isShippableCountry = (showLog = true) => {
|
|
|
7
6
|
}
|
|
8
7
|
// if localization is loaded and the localization is not a shippable country, keep the original click event
|
|
9
8
|
if (!localizationStore.isShippableCountry) {
|
|
10
|
-
document.dispatchEvent(createCustomEvent('legacyCheckoutError', 'Unable to initiate checkout process in a country where shipping is not available'));
|
|
11
9
|
if (showLog) {
|
|
12
10
|
log(`Checkout: not shippable country`);
|
|
13
11
|
}
|
|
@@ -14,7 +14,12 @@ export const getContrastColor = ({ backgroundColor, color, }) => {
|
|
|
14
14
|
if (isDarkColor(color)) {
|
|
15
15
|
return '#ffffff';
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const newDarkerColor = tinycolor(color).darken(25).toHexString();
|
|
18
|
+
const newLigherColor = tinycolor(color).lighten(25).toHexString();
|
|
19
|
+
// get readibility of the color
|
|
20
|
+
const isNewColorContrastEnough = isContrastColor({
|
|
21
|
+
backgroundColor1: backgroundColor,
|
|
22
|
+
backgroundColor2: newDarkerColor,
|
|
23
|
+
});
|
|
24
|
+
return isNewColorContrastEnough ? newDarkerColor : newLigherColor;
|
|
20
25
|
};
|