@zonos/elements 1.3.182 → 1.3.183
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-dcd068d1.js → cart-3d0c0f0b.js} +60 -0
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-4bbc4779.js → paypal-9eaa9196.js} +1 -1
- package/dist/cjs/zonos-address_7.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +50 -15
- package/dist/cjs/zonos-checkout.cjs.entry.js +2 -2
- 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-elements.cjs.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +2 -2
- 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/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +11 -14
- 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/utils/taxIdValidationResult.js +38 -0
- package/dist/esm/{cart-d2c86d90.js → cart-3fb04f1f.js} +60 -0
- package/dist/esm/index.js +7 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-5c0d6407.js → paypal-1f2e863c.js} +1 -1
- package/dist/esm/zonos-address_7.entry.js +1 -1
- package/dist/esm/zonos-cart-items_13.entry.js +50 -15
- package/dist/esm/zonos-checkout.entry.js +2 -2
- 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-elements.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +2 -2
- 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-es5/cart-3fb04f1f.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-5c0d6407.js → paypal-1f2e863c.js} +1 -1
- package/dist/esm-es5/zonos-address_7.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_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/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +1 -2
- 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/utils/taxIdValidationResult.d.ts +12 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-5c695748.entry.js → p-107b08c1.entry.js} +1 -1
- package/dist/zonos-elements/{p-a43fba41.js → p-112aecac.js} +1 -1
- package/dist/zonos-elements/{p-5957eff5.system.entry.js → p-29e8c9e8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a2368c1c.system.entry.js → p-358043a2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-09fbafe4.entry.js → p-43feb95e.entry.js} +1 -1
- package/dist/zonos-elements/{p-e42e0cdb.entry.js → p-4622cca6.entry.js} +1 -1
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
- package/dist/zonos-elements/{p-1b1cdb4c.system.entry.js → p-4aca92c5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9d014d94.system.entry.js → p-4ca666ea.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-753811b7.system.entry.js → p-4eff2f8a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5a71d418.entry.js → p-587568b5.entry.js} +1 -1
- package/dist/zonos-elements/{p-00e5d2be.system.js → p-59e31080.system.js} +1 -1
- package/dist/zonos-elements/{p-99f50bf3.system.js → p-5bebcfc2.system.js} +1 -1
- package/dist/zonos-elements/{p-1cebd67c.entry.js → p-64dbc282.entry.js} +1 -1
- package/dist/zonos-elements/{p-5be6b837.system.entry.js → p-7cb87ea7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-57af5f9c.entry.js → p-7decb19b.entry.js} +1 -1
- package/dist/zonos-elements/{p-99f17671.entry.js → p-8f640b28.entry.js} +1 -1
- package/dist/zonos-elements/p-a69dbe14.js +1 -0
- package/dist/zonos-elements/{p-ff8d9f3a.entry.js → p-ac889f52.entry.js} +1 -1
- package/dist/zonos-elements/{p-d00049db.entry.js → p-b998494a.entry.js} +1 -1
- package/dist/zonos-elements/{p-79e43df6.system.entry.js → p-bc0f885e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5e1a782a.system.entry.js → p-c5c8f803.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c6d96a42.system.js +1 -0
- package/dist/zonos-elements/{p-33de55b8.system.entry.js → p-d367c9ae.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-42abd4dd.system.entry.js → p-f66a5c7c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c3f2b86c.entry.js → p-fa65b53d.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-d2c86d90.js +0 -1
- package/dist/zonos-elements/p-18ec705b.js +0 -1
- package/dist/zonos-elements/p-91bc2187.system.js +0 -1
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-3d0c0f0b.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const handleFetch = require('./handleFetch-969d05d8.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2f90486e.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-3d0c0f0b.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-3812b318.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
9
|
require('./handleFetch-969d05d8.js');
|
|
@@ -3,6 +3,7 @@ import { stripeStore, stripeStoreTranslateAddressToLatin, } from "../../../store
|
|
|
3
3
|
import { translate } from "../../../store/translationStore";
|
|
4
4
|
import { getZonosStoreTheme, zonosStore, } from "../../../store/zonosStore";
|
|
5
5
|
import { containsNonLatinChars } from "../../../utils/containsNonLatinChars";
|
|
6
|
+
import { taxIdValidationResult } from "../../../utils/taxIdValidationResult";
|
|
6
7
|
import { countryRequireTaxId, shipToTaxIdLabels, } from "../../../../types/checkout/Tax";
|
|
7
8
|
export class ZonosCustomerInfo {
|
|
8
9
|
constructor() {
|
|
@@ -83,10 +84,6 @@ export class ZonosCustomerInfo {
|
|
|
83
84
|
}
|
|
84
85
|
this.continueClicked.emit();
|
|
85
86
|
};
|
|
86
|
-
this.isTaxIdRequired = () => {
|
|
87
|
-
const requireTaxIdCountry = ['MX'];
|
|
88
|
-
return requireTaxIdCountry.includes(this.shippingCountry);
|
|
89
|
-
};
|
|
90
87
|
this.handleValidate = () => {
|
|
91
88
|
var _a, _b;
|
|
92
89
|
const stripeShippingAddressEventData = stripeStore.stripeAddressEventData;
|
|
@@ -105,12 +102,12 @@ export class ZonosCustomerInfo {
|
|
|
105
102
|
this.isEmailError = true;
|
|
106
103
|
}
|
|
107
104
|
// validate tax id input if it's required for specific countries, optional otherwise
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
const { error, valid } = taxIdValidationResult({
|
|
106
|
+
shippingCountry: this.shippingCountry,
|
|
107
|
+
taxId: stripeStore.taxId,
|
|
108
|
+
});
|
|
109
|
+
this.taxIdErrorMessage = !valid ? translate(error) : '';
|
|
110
|
+
if (!isValidBilling || !isValidShipping || !isValidLink || !valid) {
|
|
114
111
|
return false;
|
|
115
112
|
}
|
|
116
113
|
return true;
|
|
@@ -148,7 +145,7 @@ export class ZonosCustomerInfo {
|
|
|
148
145
|
this.shippingCountry = '';
|
|
149
146
|
this.isCheckingForRestrictedItems = false;
|
|
150
147
|
this.isValidatingAddress = false;
|
|
151
|
-
this.
|
|
148
|
+
this.taxIdErrorMessage = '';
|
|
152
149
|
this.invalidShippingCharacterList = null;
|
|
153
150
|
this.invalidBillingCharacterList = null;
|
|
154
151
|
this.openAddressValidationDialog = false;
|
|
@@ -195,9 +192,9 @@ export class ZonosCustomerInfo {
|
|
|
195
192
|
return null;
|
|
196
193
|
}
|
|
197
194
|
const taxIdInputInfo = shipToTaxIdLabels[countryCode];
|
|
198
|
-
return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', isError: this.
|
|
195
|
+
return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', isError: !!this.taxIdErrorMessage, onInputChange: (event) => {
|
|
199
196
|
stripeStore.taxId = event.detail;
|
|
200
|
-
} }), this.
|
|
197
|
+
} }), this.taxIdErrorMessage && (h("zonos-text", { textColor: 'red-600', type: "caption" }, this.taxIdErrorMessage))));
|
|
201
198
|
}
|
|
202
199
|
render() {
|
|
203
200
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -375,7 +372,7 @@ export class ZonosCustomerInfo {
|
|
|
375
372
|
"shippingCountry": {},
|
|
376
373
|
"isCheckingForRestrictedItems": {},
|
|
377
374
|
"isValidatingAddress": {},
|
|
378
|
-
"
|
|
375
|
+
"taxIdErrorMessage": {},
|
|
379
376
|
"invalidShippingCharacterList": {},
|
|
380
377
|
"invalidBillingCharacterList": {},
|
|
381
378
|
"openAddressValidationDialog": {},
|
|
@@ -152,6 +152,9 @@ export const stringsArabic = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'إخفاء الخيارات غير المدفوعة مسبقًا',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'تنسيق RFC غير صالح. يجب أن يكون 12-13 حرفًا كبيرًا وأرقامًا فقط.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'رمز ترويجي غير صالح',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsBase = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Hide non-prepaid options',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Invalid promo code',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsChinese = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: '隐藏非预付选项',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: '无效的RFC格式。必须仅包含12-13个大写字母和数字。',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: '无效的促销代码',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsDanish = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Skjul ikke-forudbetalte muligheder',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Ugyldigt RFC-format. Skal kun indeholde 12-13 store bogstaver og tal.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Ugyldig kampagnekode',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsDutch = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Verberg niet-vooruitbetaalde opties',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Ongeldig RFC-formaat. Moet alleen 12-13 hoofdletters en cijfers bevatten.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Ongeldige promotiecode',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsFrench = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Masquer les options non prépayées',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Format RFC invalide. Doit contenir uniquement 12 à 13 lettres majuscules et chiffres.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Code promo invalide',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsGerman = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Nicht vorausbezahlte Optionen ausblenden',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Ungültiges RFC-Format. Muss nur 12–13 Großbuchstaben und Zahlen enthalten.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Ungültiger Aktionscode',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsHebrew = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'הסתר אפשרויות שאינן בתשלום מראש',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'פורמט RFC לא חוקי. חייב להיות 12–13 אותיות גדולות ומספרים בלבד.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'קוד קידום מכירות לא חוקי',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsIndonesian = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Sembunyikan opsi yang tidak prabayar',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Format RFC tidak valid. Harus hanya terdiri dari 12-13 huruf besar dan angka.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Kode promo tidak valid',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsItalian = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Nascondi opzioni non prepagate',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Formato RFC non valido. Deve contenere solo 12-13 lettere maiuscole e numeri.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Codice promozionale non valido',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsJapanese = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: '未払いオプションを非表示にする',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: '無効なRFC形式です。12〜13の大文字と数字のみである必要があります。',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: '無効なプロモーションコード',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsKorean = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: '선불이 아닌 옵션 숨기기',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: '잘못된 RFC 형식입니다. 12~13개의 대문자와 숫자만 포함해야 합니다.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: '유효하지 않은 프로모션 코드',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsNorwegian = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Skjul ikke-forhåndsbetalte alternativer',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Ugyldig RFC-format. Må kun inneholde 12–13 store bokstaver og tall.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Ugyldig kampanjekode',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsPolish = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Ukryj opcje nieprzedpłacone',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Nieprawidłowy format RFC. Musi zawierać tylko 12-13 wielkich liter i cyfr.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Nieprawidłowy kod promocyjny',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsPortuguese = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Ocultar opções não pré-pagas',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Formato de RFC inválido. Deve ter apenas 12-13 letras maiúsculas e números.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Código promocional inválido',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsRussian = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Скрыть неоплаченные варианты',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Неверный формат RFC. Должно быть 12–13 заглавных букв и цифр.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Недействительный промо-код',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsSpanish = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Ocultar opciones no prepagadas',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Formato de RFC no válido. Debe tener solo 12-13 letras mayúsculas y números.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Código promocional no válido',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsSwedish = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Dölj icke-förbetalda alternativ',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Ogiltigt RFC-format. Måste endast innehålla 12–13 versaler och siffror.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Ogiltig kampanjkod',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsTurkish = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Ön ödemesiz seçenekleri gizle',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Geçersiz RFC formatı. Yalnızca 12-13 büyük harf ve rakam olmalıdır.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Geçersiz promosyon kodu',
|
|
157
160
|
},
|
|
@@ -152,6 +152,9 @@ export const stringsVietnamese = {
|
|
|
152
152
|
'Hide non-prepaid options': {
|
|
153
153
|
value: 'Ẩn các tùy chọn chưa trả trước',
|
|
154
154
|
},
|
|
155
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
156
|
+
value: 'Định dạng RFC không hợp lệ. Phải chỉ có 12–13 chữ cái viết hoa và số.',
|
|
157
|
+
},
|
|
155
158
|
'Invalid promo code': {
|
|
156
159
|
value: 'Mã khuyến mãi không hợp lệ',
|
|
157
160
|
},
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const isTaxIdRequired = (shippingCountry) => {
|
|
2
|
+
const requireTaxIdCountry = ['MX'];
|
|
3
|
+
return requireTaxIdCountry.includes(shippingCountry);
|
|
4
|
+
};
|
|
5
|
+
export const taxIdValidationResult = ({ shippingCountry, taxId, }) => {
|
|
6
|
+
const taxRequired = isTaxIdRequired(shippingCountry);
|
|
7
|
+
if (!taxRequired) {
|
|
8
|
+
return {
|
|
9
|
+
error: null,
|
|
10
|
+
valid: true,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
if (!taxId) {
|
|
14
|
+
return {
|
|
15
|
+
error: 'Tax id is required',
|
|
16
|
+
valid: false,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
// validate tax id for mexico;
|
|
20
|
+
if (shippingCountry === 'MX') {
|
|
21
|
+
const isValid = /^[A-ZÑ]{3,4}[0-9]{6}[A-Z0-9]{3}$/.test(taxId);
|
|
22
|
+
if (!isValid) {
|
|
23
|
+
return {
|
|
24
|
+
error: 'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.',
|
|
25
|
+
valid: false,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
error: null,
|
|
30
|
+
valid: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
// Other countries doesn't need to validate tax id in the right format
|
|
34
|
+
return {
|
|
35
|
+
error: null,
|
|
36
|
+
valid: true,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -157,6 +157,9 @@ const stringsArabic = {
|
|
|
157
157
|
'Hide non-prepaid options': {
|
|
158
158
|
value: 'إخفاء الخيارات غير المدفوعة مسبقًا',
|
|
159
159
|
},
|
|
160
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
161
|
+
value: 'تنسيق RFC غير صالح. يجب أن يكون 12-13 حرفًا كبيرًا وأرقامًا فقط.',
|
|
162
|
+
},
|
|
160
163
|
'Invalid promo code': {
|
|
161
164
|
value: 'رمز ترويجي غير صالح',
|
|
162
165
|
},
|
|
@@ -640,6 +643,9 @@ const stringsBase = {
|
|
|
640
643
|
'Hide non-prepaid options': {
|
|
641
644
|
value: 'Hide non-prepaid options',
|
|
642
645
|
},
|
|
646
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
647
|
+
value: 'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.',
|
|
648
|
+
},
|
|
643
649
|
'Invalid promo code': {
|
|
644
650
|
value: 'Invalid promo code',
|
|
645
651
|
},
|
|
@@ -1123,6 +1129,9 @@ const stringsChinese = {
|
|
|
1123
1129
|
'Hide non-prepaid options': {
|
|
1124
1130
|
value: '隐藏非预付选项',
|
|
1125
1131
|
},
|
|
1132
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
1133
|
+
value: '无效的RFC格式。必须仅包含12-13个大写字母和数字。',
|
|
1134
|
+
},
|
|
1126
1135
|
'Invalid promo code': {
|
|
1127
1136
|
value: '无效的促销代码',
|
|
1128
1137
|
},
|
|
@@ -1606,6 +1615,9 @@ const stringsDanish = {
|
|
|
1606
1615
|
'Hide non-prepaid options': {
|
|
1607
1616
|
value: 'Skjul ikke-forudbetalte muligheder',
|
|
1608
1617
|
},
|
|
1618
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
1619
|
+
value: 'Ugyldigt RFC-format. Skal kun indeholde 12-13 store bogstaver og tal.',
|
|
1620
|
+
},
|
|
1609
1621
|
'Invalid promo code': {
|
|
1610
1622
|
value: 'Ugyldig kampagnekode',
|
|
1611
1623
|
},
|
|
@@ -2089,6 +2101,9 @@ const stringsDutch = {
|
|
|
2089
2101
|
'Hide non-prepaid options': {
|
|
2090
2102
|
value: 'Verberg niet-vooruitbetaalde opties',
|
|
2091
2103
|
},
|
|
2104
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
2105
|
+
value: 'Ongeldig RFC-formaat. Moet alleen 12-13 hoofdletters en cijfers bevatten.',
|
|
2106
|
+
},
|
|
2092
2107
|
'Invalid promo code': {
|
|
2093
2108
|
value: 'Ongeldige promotiecode',
|
|
2094
2109
|
},
|
|
@@ -2572,6 +2587,9 @@ const stringsFrench = {
|
|
|
2572
2587
|
'Hide non-prepaid options': {
|
|
2573
2588
|
value: 'Masquer les options non prépayées',
|
|
2574
2589
|
},
|
|
2590
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
2591
|
+
value: 'Format RFC invalide. Doit contenir uniquement 12 à 13 lettres majuscules et chiffres.',
|
|
2592
|
+
},
|
|
2575
2593
|
'Invalid promo code': {
|
|
2576
2594
|
value: 'Code promo invalide',
|
|
2577
2595
|
},
|
|
@@ -3055,6 +3073,9 @@ const stringsGerman = {
|
|
|
3055
3073
|
'Hide non-prepaid options': {
|
|
3056
3074
|
value: 'Nicht vorausbezahlte Optionen ausblenden',
|
|
3057
3075
|
},
|
|
3076
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
3077
|
+
value: 'Ungültiges RFC-Format. Muss nur 12–13 Großbuchstaben und Zahlen enthalten.',
|
|
3078
|
+
},
|
|
3058
3079
|
'Invalid promo code': {
|
|
3059
3080
|
value: 'Ungültiger Aktionscode',
|
|
3060
3081
|
},
|
|
@@ -3538,6 +3559,9 @@ const stringsHebrew = {
|
|
|
3538
3559
|
'Hide non-prepaid options': {
|
|
3539
3560
|
value: 'הסתר אפשרויות שאינן בתשלום מראש',
|
|
3540
3561
|
},
|
|
3562
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
3563
|
+
value: 'פורמט RFC לא חוקי. חייב להיות 12–13 אותיות גדולות ומספרים בלבד.',
|
|
3564
|
+
},
|
|
3541
3565
|
'Invalid promo code': {
|
|
3542
3566
|
value: 'קוד קידום מכירות לא חוקי',
|
|
3543
3567
|
},
|
|
@@ -4021,6 +4045,9 @@ const stringsIndonesian = {
|
|
|
4021
4045
|
'Hide non-prepaid options': {
|
|
4022
4046
|
value: 'Sembunyikan opsi yang tidak prabayar',
|
|
4023
4047
|
},
|
|
4048
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
4049
|
+
value: 'Format RFC tidak valid. Harus hanya terdiri dari 12-13 huruf besar dan angka.',
|
|
4050
|
+
},
|
|
4024
4051
|
'Invalid promo code': {
|
|
4025
4052
|
value: 'Kode promo tidak valid',
|
|
4026
4053
|
},
|
|
@@ -4504,6 +4531,9 @@ const stringsItalian = {
|
|
|
4504
4531
|
'Hide non-prepaid options': {
|
|
4505
4532
|
value: 'Nascondi opzioni non prepagate',
|
|
4506
4533
|
},
|
|
4534
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
4535
|
+
value: 'Formato RFC non valido. Deve contenere solo 12-13 lettere maiuscole e numeri.',
|
|
4536
|
+
},
|
|
4507
4537
|
'Invalid promo code': {
|
|
4508
4538
|
value: 'Codice promozionale non valido',
|
|
4509
4539
|
},
|
|
@@ -4987,6 +5017,9 @@ const stringsJapanese = {
|
|
|
4987
5017
|
'Hide non-prepaid options': {
|
|
4988
5018
|
value: '未払いオプションを非表示にする',
|
|
4989
5019
|
},
|
|
5020
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
5021
|
+
value: '無効なRFC形式です。12〜13の大文字と数字のみである必要があります。',
|
|
5022
|
+
},
|
|
4990
5023
|
'Invalid promo code': {
|
|
4991
5024
|
value: '無効なプロモーションコード',
|
|
4992
5025
|
},
|
|
@@ -5470,6 +5503,9 @@ const stringsKorean = {
|
|
|
5470
5503
|
'Hide non-prepaid options': {
|
|
5471
5504
|
value: '선불이 아닌 옵션 숨기기',
|
|
5472
5505
|
},
|
|
5506
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
5507
|
+
value: '잘못된 RFC 형식입니다. 12~13개의 대문자와 숫자만 포함해야 합니다.',
|
|
5508
|
+
},
|
|
5473
5509
|
'Invalid promo code': {
|
|
5474
5510
|
value: '유효하지 않은 프로모션 코드',
|
|
5475
5511
|
},
|
|
@@ -5953,6 +5989,9 @@ const stringsNorwegian = {
|
|
|
5953
5989
|
'Hide non-prepaid options': {
|
|
5954
5990
|
value: 'Skjul ikke-forhåndsbetalte alternativer',
|
|
5955
5991
|
},
|
|
5992
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
5993
|
+
value: 'Ugyldig RFC-format. Må kun inneholde 12–13 store bokstaver og tall.',
|
|
5994
|
+
},
|
|
5956
5995
|
'Invalid promo code': {
|
|
5957
5996
|
value: 'Ugyldig kampanjekode',
|
|
5958
5997
|
},
|
|
@@ -6436,6 +6475,9 @@ const stringsPolish = {
|
|
|
6436
6475
|
'Hide non-prepaid options': {
|
|
6437
6476
|
value: 'Ukryj opcje nieprzedpłacone',
|
|
6438
6477
|
},
|
|
6478
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
6479
|
+
value: 'Nieprawidłowy format RFC. Musi zawierać tylko 12-13 wielkich liter i cyfr.',
|
|
6480
|
+
},
|
|
6439
6481
|
'Invalid promo code': {
|
|
6440
6482
|
value: 'Nieprawidłowy kod promocyjny',
|
|
6441
6483
|
},
|
|
@@ -6919,6 +6961,9 @@ const stringsPortuguese = {
|
|
|
6919
6961
|
'Hide non-prepaid options': {
|
|
6920
6962
|
value: 'Ocultar opções não pré-pagas',
|
|
6921
6963
|
},
|
|
6964
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
6965
|
+
value: 'Formato de RFC inválido. Deve ter apenas 12-13 letras maiúsculas e números.',
|
|
6966
|
+
},
|
|
6922
6967
|
'Invalid promo code': {
|
|
6923
6968
|
value: 'Código promocional inválido',
|
|
6924
6969
|
},
|
|
@@ -7402,6 +7447,9 @@ const stringsRussian = {
|
|
|
7402
7447
|
'Hide non-prepaid options': {
|
|
7403
7448
|
value: 'Скрыть неоплаченные варианты',
|
|
7404
7449
|
},
|
|
7450
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
7451
|
+
value: 'Неверный формат RFC. Должно быть 12–13 заглавных букв и цифр.',
|
|
7452
|
+
},
|
|
7405
7453
|
'Invalid promo code': {
|
|
7406
7454
|
value: 'Недействительный промо-код',
|
|
7407
7455
|
},
|
|
@@ -7885,6 +7933,9 @@ const stringsSpanish = {
|
|
|
7885
7933
|
'Hide non-prepaid options': {
|
|
7886
7934
|
value: 'Ocultar opciones no prepagadas',
|
|
7887
7935
|
},
|
|
7936
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
7937
|
+
value: 'Formato de RFC no válido. Debe tener solo 12-13 letras mayúsculas y números.',
|
|
7938
|
+
},
|
|
7888
7939
|
'Invalid promo code': {
|
|
7889
7940
|
value: 'Código promocional no válido',
|
|
7890
7941
|
},
|
|
@@ -8368,6 +8419,9 @@ const stringsSwedish = {
|
|
|
8368
8419
|
'Hide non-prepaid options': {
|
|
8369
8420
|
value: 'Dölj icke-förbetalda alternativ',
|
|
8370
8421
|
},
|
|
8422
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
8423
|
+
value: 'Ogiltigt RFC-format. Måste endast innehålla 12–13 versaler och siffror.',
|
|
8424
|
+
},
|
|
8371
8425
|
'Invalid promo code': {
|
|
8372
8426
|
value: 'Ogiltig kampanjkod',
|
|
8373
8427
|
},
|
|
@@ -8851,6 +8905,9 @@ const stringsTurkish = {
|
|
|
8851
8905
|
'Hide non-prepaid options': {
|
|
8852
8906
|
value: 'Ön ödemesiz seçenekleri gizle',
|
|
8853
8907
|
},
|
|
8908
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
8909
|
+
value: 'Geçersiz RFC formatı. Yalnızca 12-13 büyük harf ve rakam olmalıdır.',
|
|
8910
|
+
},
|
|
8854
8911
|
'Invalid promo code': {
|
|
8855
8912
|
value: 'Geçersiz promosyon kodu',
|
|
8856
8913
|
},
|
|
@@ -9334,6 +9391,9 @@ const stringsVietnamese = {
|
|
|
9334
9391
|
'Hide non-prepaid options': {
|
|
9335
9392
|
value: 'Ẩn các tùy chọn chưa trả trước',
|
|
9336
9393
|
},
|
|
9394
|
+
'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.': {
|
|
9395
|
+
value: 'Định dạng RFC không hợp lệ. Phải chỉ có 12–13 chữ cái viết hoa và số.',
|
|
9396
|
+
},
|
|
9337
9397
|
'Invalid promo code': {
|
|
9338
9398
|
value: 'Mã khuyến mãi không hợp lệ',
|
|
9339
9399
|
},
|
package/dist/esm/index.js
CHANGED
|
@@ -126,7 +126,7 @@ const getZonosQaUrl = () => {
|
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
128
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
129
|
-
const cdnUrl = "https://v1.3.
|
|
129
|
+
const cdnUrl = "https://v1.3.183.js.zonos.com";
|
|
130
130
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
131
131
|
if (!qaUrl &&
|
|
132
132
|
(cdnUrl.includes('test.') ||
|
|
@@ -362,10 +362,10 @@ const zonosLoadUrl = (() => {
|
|
|
362
362
|
}
|
|
363
363
|
return null;
|
|
364
364
|
})();
|
|
365
|
-
const ZONOS_URL = "https://v1.3.
|
|
366
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
367
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
368
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
365
|
+
const ZONOS_URL = "https://v1.3.183.js.zonos.com";
|
|
366
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.183";
|
|
367
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.183";
|
|
368
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.183";
|
|
369
369
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
370
370
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
371
371
|
class Zonos {
|
|
@@ -380,7 +380,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
380
380
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
381
381
|
Zonos._paypalMockResponse = null;
|
|
382
382
|
Zonos.isBigCommerce = false;
|
|
383
|
-
Zonos.releaseDate = "
|
|
383
|
+
Zonos.releaseDate = "1744403359888";
|
|
384
384
|
Zonos.isLegacyCheckout = false;
|
|
385
385
|
Zonos.domain = typeof window !== 'undefined'
|
|
386
386
|
? // domain that embeds the iframe
|
|
@@ -397,7 +397,7 @@ Zonos.isNpm = true;
|
|
|
397
397
|
Zonos.zonosQaUrl = null;
|
|
398
398
|
Zonos.zonosQaUrlApi = null;
|
|
399
399
|
Zonos.trackEventLogs = [];
|
|
400
|
-
Zonos.version = `v${"1.3.
|
|
400
|
+
Zonos.version = `v${"1.3.183"}`;
|
|
401
401
|
Zonos.modeAlerted = false;
|
|
402
402
|
Zonos.cartData = null;
|
|
403
403
|
Zonos.paypal = null;
|