@zonos/elements 1.3.145 → 1.3.147
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-9d5e2816.js → cart-ff5887f0.js} +63 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-f9015045.js → paypal-dd767dbc.js} +1 -1
- package/dist/cjs/zonos-address_8.cjs.entry.js +2 -2
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +17 -6
- package/dist/cjs/zonos-checkout.cjs.entry.js +68 -12
- package/dist/cjs/zonos-controller.cjs.entry.js +9 -3
- 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-checkout.js +66 -10
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +15 -3
- package/dist/collection/components/main/zonos-controller.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/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/utils/hello/getZCountryUrlParam.js +3 -1
- package/dist/esm/{cart-887f7d66.js → cart-9de02093.js} +63 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-6fd5749b.js → paypal-1efe64a0.js} +1 -1
- package/dist/esm/zonos-address_8.entry.js +2 -2
- package/dist/esm/zonos-cart-items_13.entry.js +17 -6
- package/dist/esm/zonos-checkout.entry.js +68 -12
- package/dist/esm/zonos-controller.entry.js +9 -3
- 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-9de02093.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-6fd5749b.js → paypal-1efe64a0.js} +1 -1
- package/dist/esm-es5/zonos-address_8.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.d.ts +20 -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-checkout.d.ts +2 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +5 -0
- 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/types/checkout/CheckoutConfig.d.ts +20 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-b4823b13.entry.js → p-00182783.entry.js} +1 -1
- package/dist/zonos-elements/{p-896dca32.entry.js → p-056e1930.entry.js} +1 -1
- package/dist/zonos-elements/{p-98db517b.entry.js → p-0a0eccae.entry.js} +1 -1
- package/dist/zonos-elements/p-36cd38ba.system.js +1 -0
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
- package/dist/zonos-elements/{p-9024f5a1.entry.js → p-4b0cb1ce.entry.js} +1 -1
- package/dist/zonos-elements/p-4f398271.entry.js +1 -0
- package/dist/zonos-elements/{p-826b5d0c.system.js → p-5831e9ba.system.js} +1 -1
- package/dist/zonos-elements/{p-fec7bdd4.system.entry.js → p-5d570a00.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4d353108.entry.js → p-6adea6aa.entry.js} +1 -1
- package/dist/zonos-elements/{p-b7a40db9.system.entry.js → p-8455a72e.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8dc3edd5.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9ae29c27.system.entry.js → p-9c6ed828.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1d466ac6.entry.js → p-9dd24661.entry.js} +1 -1
- package/dist/zonos-elements/p-9f5789a5.js +17 -0
- package/dist/zonos-elements/{p-0e9826d2.system.entry.js → p-afd32c67.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5e76c269.entry.js → p-c8fb55dc.entry.js} +1 -1
- package/dist/zonos-elements/{p-fdb592a8.system.js → p-ce4e9134.system.js} +1 -1
- package/dist/zonos-elements/{p-3bd17598.system.entry.js → p-cfce4fa3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e3abf96c.system.entry.js → p-da6d01bc.system.entry.js} +1 -1
- package/dist/zonos-elements/p-e3131c5e.system.entry.js +1 -0
- package/dist/zonos-elements/p-e99dec7d.js +1 -0
- package/dist/zonos-elements/{p-e8926f59.entry.js → p-f4929b6e.entry.js} +1 -1
- package/dist/zonos-elements/{p-2e6265cc.system.entry.js → p-f4958bec.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-794b2d24.system.entry.js → p-f70b072b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e4d509be.entry.js → p-fd26a3cc.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-887f7d66.js +0 -1
- package/dist/zonos-elements/p-3f282167.system.entry.js +0 -1
- package/dist/zonos-elements/p-49b8760c.system.entry.js +0 -1
- package/dist/zonos-elements/p-5e4b6b77.js +0 -17
- package/dist/zonos-elements/p-b0ced00a.system.js +0 -1
- package/dist/zonos-elements/p-b18c4d1d.js +0 -1
- package/dist/zonos-elements/p-f824a75f.entry.js +0 -1
|
@@ -355,6 +355,9 @@ const stringsArabic = {
|
|
|
355
355
|
Success: {
|
|
356
356
|
value: 'نجاح',
|
|
357
357
|
},
|
|
358
|
+
'Tax id is required': {
|
|
359
|
+
value: 'مطلوب رقم التعريف الضريبي',
|
|
360
|
+
},
|
|
358
361
|
'Taxes and fees': {
|
|
359
362
|
value: 'الضرائب والرسوم',
|
|
360
363
|
},
|
|
@@ -820,6 +823,9 @@ const stringsBase = {
|
|
|
820
823
|
Success: {
|
|
821
824
|
value: 'Success',
|
|
822
825
|
},
|
|
826
|
+
'Tax id is required': {
|
|
827
|
+
value: 'Tax id is required',
|
|
828
|
+
},
|
|
823
829
|
'Taxes and fees': {
|
|
824
830
|
value: 'Taxes and fees',
|
|
825
831
|
},
|
|
@@ -1285,6 +1291,9 @@ const stringsChinese = {
|
|
|
1285
1291
|
Success: {
|
|
1286
1292
|
value: '成功',
|
|
1287
1293
|
},
|
|
1294
|
+
'Tax id is required': {
|
|
1295
|
+
value: '需要税号',
|
|
1296
|
+
},
|
|
1288
1297
|
'Taxes and fees': {
|
|
1289
1298
|
value: '税费',
|
|
1290
1299
|
},
|
|
@@ -1750,6 +1759,9 @@ const stringsDanish = {
|
|
|
1750
1759
|
Success: {
|
|
1751
1760
|
value: 'Succes',
|
|
1752
1761
|
},
|
|
1762
|
+
'Tax id is required': {
|
|
1763
|
+
value: 'Skatte-id er påkrævet',
|
|
1764
|
+
},
|
|
1753
1765
|
'Taxes and fees': {
|
|
1754
1766
|
value: 'Skatter og gebyrer',
|
|
1755
1767
|
},
|
|
@@ -2215,6 +2227,9 @@ const stringsDutch = {
|
|
|
2215
2227
|
Success: {
|
|
2216
2228
|
value: 'Succes',
|
|
2217
2229
|
},
|
|
2230
|
+
'Tax id is required': {
|
|
2231
|
+
value: 'Belasting-ID is vereist',
|
|
2232
|
+
},
|
|
2218
2233
|
'Taxes and fees': {
|
|
2219
2234
|
value: 'Belastingen en kosten',
|
|
2220
2235
|
},
|
|
@@ -2680,6 +2695,9 @@ const stringsFrench = {
|
|
|
2680
2695
|
Success: {
|
|
2681
2696
|
value: 'Succès',
|
|
2682
2697
|
},
|
|
2698
|
+
'Tax id is required': {
|
|
2699
|
+
value: "L'identifiant fiscal est requis",
|
|
2700
|
+
},
|
|
2683
2701
|
'Taxes and fees': {
|
|
2684
2702
|
value: 'Taxes et frais',
|
|
2685
2703
|
},
|
|
@@ -3145,6 +3163,9 @@ const stringsGerman = {
|
|
|
3145
3163
|
Success: {
|
|
3146
3164
|
value: 'Erfolg',
|
|
3147
3165
|
},
|
|
3166
|
+
'Tax id is required': {
|
|
3167
|
+
value: 'Steuer-ID ist erforderlich',
|
|
3168
|
+
},
|
|
3148
3169
|
'Taxes and fees': {
|
|
3149
3170
|
value: 'Steuern und Gebühren',
|
|
3150
3171
|
},
|
|
@@ -3610,6 +3631,9 @@ const stringsHebrew = {
|
|
|
3610
3631
|
Success: {
|
|
3611
3632
|
value: 'הצלחה',
|
|
3612
3633
|
},
|
|
3634
|
+
'Tax id is required': {
|
|
3635
|
+
value: 'נדרש מזהה מס',
|
|
3636
|
+
},
|
|
3613
3637
|
'Taxes and fees': {
|
|
3614
3638
|
value: 'מיסים ודמי שירות',
|
|
3615
3639
|
},
|
|
@@ -4075,6 +4099,9 @@ const stringsIndonesian = {
|
|
|
4075
4099
|
Success: {
|
|
4076
4100
|
value: 'Sukses',
|
|
4077
4101
|
},
|
|
4102
|
+
'Tax id is required': {
|
|
4103
|
+
value: 'ID pajak diperlukan',
|
|
4104
|
+
},
|
|
4078
4105
|
'Taxes and fees': {
|
|
4079
4106
|
value: 'Pajak dan biaya',
|
|
4080
4107
|
},
|
|
@@ -4540,6 +4567,9 @@ const stringsItalian = {
|
|
|
4540
4567
|
Success: {
|
|
4541
4568
|
value: 'Successo',
|
|
4542
4569
|
},
|
|
4570
|
+
'Tax id is required': {
|
|
4571
|
+
value: 'È richiesto il codice fiscale',
|
|
4572
|
+
},
|
|
4543
4573
|
'Taxes and fees': {
|
|
4544
4574
|
value: 'Tasse e commissioni',
|
|
4545
4575
|
},
|
|
@@ -5005,6 +5035,9 @@ const stringsJapanese = {
|
|
|
5005
5035
|
Success: {
|
|
5006
5036
|
value: '成功',
|
|
5007
5037
|
},
|
|
5038
|
+
'Tax id is required': {
|
|
5039
|
+
value: '税務IDが必要です',
|
|
5040
|
+
},
|
|
5008
5041
|
'Taxes and fees': {
|
|
5009
5042
|
value: '税金と手数料',
|
|
5010
5043
|
},
|
|
@@ -5470,6 +5503,9 @@ const stringsKorean = {
|
|
|
5470
5503
|
Success: {
|
|
5471
5504
|
value: '성공',
|
|
5472
5505
|
},
|
|
5506
|
+
'Tax id is required': {
|
|
5507
|
+
value: '세금 ID가 필요합니다',
|
|
5508
|
+
},
|
|
5473
5509
|
'Taxes and fees': {
|
|
5474
5510
|
value: '세금 및 수수료',
|
|
5475
5511
|
},
|
|
@@ -5935,6 +5971,9 @@ const stringsNorwegian = {
|
|
|
5935
5971
|
Success: {
|
|
5936
5972
|
value: 'Suksess',
|
|
5937
5973
|
},
|
|
5974
|
+
'Tax id is required': {
|
|
5975
|
+
value: 'Skatte-ID er påkrevd',
|
|
5976
|
+
},
|
|
5938
5977
|
'Taxes and fees': {
|
|
5939
5978
|
value: 'Skatter og avgifter',
|
|
5940
5979
|
},
|
|
@@ -6400,6 +6439,9 @@ const stringsPolish = {
|
|
|
6400
6439
|
Success: {
|
|
6401
6440
|
value: 'Sukces',
|
|
6402
6441
|
},
|
|
6442
|
+
'Tax id is required': {
|
|
6443
|
+
value: 'Wymagany jest identyfikator podatkowy',
|
|
6444
|
+
},
|
|
6403
6445
|
'Taxes and fees': {
|
|
6404
6446
|
value: 'Podatki i opłaty',
|
|
6405
6447
|
},
|
|
@@ -6865,6 +6907,9 @@ const stringsPortuguese = {
|
|
|
6865
6907
|
Success: {
|
|
6866
6908
|
value: 'Sucesso',
|
|
6867
6909
|
},
|
|
6910
|
+
'Tax id is required': {
|
|
6911
|
+
value: 'É necessário o ID fiscal',
|
|
6912
|
+
},
|
|
6868
6913
|
'Taxes and fees': {
|
|
6869
6914
|
value: 'Impostos e taxas',
|
|
6870
6915
|
},
|
|
@@ -7330,6 +7375,9 @@ const stringsRussian = {
|
|
|
7330
7375
|
Success: {
|
|
7331
7376
|
value: 'Успех',
|
|
7332
7377
|
},
|
|
7378
|
+
'Tax id is required': {
|
|
7379
|
+
value: 'Требуется налоговый идентификатор',
|
|
7380
|
+
},
|
|
7333
7381
|
'Taxes and fees': {
|
|
7334
7382
|
value: 'Налоги и сборы',
|
|
7335
7383
|
},
|
|
@@ -7795,6 +7843,9 @@ const stringsSpanish = {
|
|
|
7795
7843
|
Success: {
|
|
7796
7844
|
value: 'Éxito',
|
|
7797
7845
|
},
|
|
7846
|
+
'Tax id is required': {
|
|
7847
|
+
value: 'Se requiere identificación fiscal',
|
|
7848
|
+
},
|
|
7798
7849
|
'Taxes and fees': {
|
|
7799
7850
|
value: 'Impuestos y tarifas',
|
|
7800
7851
|
},
|
|
@@ -8260,6 +8311,9 @@ const stringsSwedish = {
|
|
|
8260
8311
|
Success: {
|
|
8261
8312
|
value: 'Framgång',
|
|
8262
8313
|
},
|
|
8314
|
+
'Tax id is required': {
|
|
8315
|
+
value: 'Skatte-ID krävs',
|
|
8316
|
+
},
|
|
8263
8317
|
'Taxes and fees': {
|
|
8264
8318
|
value: 'Skatter och avgifter',
|
|
8265
8319
|
},
|
|
@@ -8725,6 +8779,9 @@ const stringsTurkish = {
|
|
|
8725
8779
|
Success: {
|
|
8726
8780
|
value: 'Başarı',
|
|
8727
8781
|
},
|
|
8782
|
+
'Tax id is required': {
|
|
8783
|
+
value: 'Vergi kimliği gereklidir',
|
|
8784
|
+
},
|
|
8728
8785
|
'Taxes and fees': {
|
|
8729
8786
|
value: 'Vergiler ve ücretler',
|
|
8730
8787
|
},
|
|
@@ -9190,6 +9247,9 @@ const stringsVietnamese = {
|
|
|
9190
9247
|
Success: {
|
|
9191
9248
|
value: 'Thành công',
|
|
9192
9249
|
},
|
|
9250
|
+
'Tax id is required': {
|
|
9251
|
+
value: 'Yêu cầu mã số thuế',
|
|
9252
|
+
},
|
|
9193
9253
|
'Taxes and fees': {
|
|
9194
9254
|
value: 'Thuế và phí',
|
|
9195
9255
|
},
|
|
@@ -9506,7 +9566,9 @@ const getZCountryUrlParam = (urlParams) => {
|
|
|
9506
9566
|
const zCountry = getCountryParam('zCountry');
|
|
9507
9567
|
// Fallback to legacy 'country'
|
|
9508
9568
|
const fallback = getCountryParam('country');
|
|
9509
|
-
|
|
9569
|
+
// Fallback to customerCountry
|
|
9570
|
+
const secondFallback = getCountryParam('customerCountry');
|
|
9571
|
+
return zCountry || fallback || secondFallback;
|
|
9510
9572
|
};
|
|
9511
9573
|
|
|
9512
9574
|
const getLocalization = async () => {
|
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.147.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.') ||
|
|
@@ -310,10 +310,10 @@ const zonosLoadUrl = (() => {
|
|
|
310
310
|
}
|
|
311
311
|
return null;
|
|
312
312
|
})();
|
|
313
|
-
const ZONOS_URL = "https://v1.3.
|
|
314
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
315
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
316
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
313
|
+
const ZONOS_URL = "https://v1.3.147.js.zonos.com";
|
|
314
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.147";
|
|
315
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.147";
|
|
316
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.147";
|
|
317
317
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
318
318
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
319
319
|
class Zonos {
|
|
@@ -327,7 +327,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
327
327
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
328
328
|
Zonos._paypalMockResponse = null;
|
|
329
329
|
Zonos.isBigCommerce = false;
|
|
330
|
-
Zonos.releaseDate = "
|
|
330
|
+
Zonos.releaseDate = "1736550511625";
|
|
331
331
|
Zonos.isLegacyCheckout = false;
|
|
332
332
|
Zonos.domain = typeof window !== 'undefined'
|
|
333
333
|
? // domain that embeds the iframe
|
|
@@ -343,7 +343,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
343
343
|
Zonos.isNpm = true;
|
|
344
344
|
Zonos.zonosQaUrl = null;
|
|
345
345
|
Zonos.zonosQaUrlApi = null;
|
|
346
|
-
Zonos.version = `v${"1.3.
|
|
346
|
+
Zonos.version = `v${"1.3.147"}`;
|
|
347
347
|
Zonos.modeAlerted = false;
|
|
348
348
|
Zonos.cartData = null;
|
|
349
349
|
Zonos.paypal = null;
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy(JSON.parse("[[\"zonos-checkout\",[[2,\"zonos-checkout\",{\"appearanceSettingsOverride\":[16],\"preview\":[4],\"mobile\":[4],\"overrideStagingMode\":[4,\"override-staging-mode\"],\"defaultAddress\":[16],\"forceDialogOpen\":[4,\"force-dialog-open\"],\"defaultAddressParams\":[32],\"open\":[32],\"stripe\":[32],\"submitLoading\":[32],\"collapseReviewMobile\":[32],\"isAttachError\":[32],\"isMobile\":[32],\"isIframed\":[32],\"zonosReviewRef\":[32],\"storybookPaymentStatusOverride\":[32],\"isLegacyCheckout\":[32],\"confirmDialogOpen\":[32],\"isCartExpired\":[32],\"inventoryCheckErrorMessage\":[32],\"placedOrderInfo\":[32],\"clientSecret\":[32],\"closeDialogHandler\":[64],\"init\":[64],\"setToFinishStep\":[64],\"mockCheckoutSession\":[64]},[[16,\"zonos--init-cart-info\",\"initCartInfoHandler\"],[4,\"keydown\",\"handleKeyPress\"],[9,\"resize\",\"handleWindowResize\"]],{\"appearanceSettingsOverride\":[\"appearanceSettingsOverrideChanged\",\"handleAppearanceSettingsOverrideChange\"],\"overrideStagingMode\":[\"overrideStagingModeChanged\"],\"mobile\":[\"handleMobileChange\"],\"defaultAddress\":[\"handleAddressChange\"],\"clientSecret\":[\"handleClientSecretChange\"],\"open\":[\"handleOpenChange\"]}]]],[\"zonos-hello\",[[1,\"zonos-hello\",{\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettingsOverride\":[16],\"showPeekMessage\":[32],\"zonosStoreHelloSettings\":[32],\"showDialog\":[32],\"peekMessage\":[32],\"initialUrl\":[32],\"allRestrictedItems\":[32],\"allFoundProducts\":[32],\"productsOnPage\":[32],\"isHelloWidgetRendered\":[32],\"isMobile\":[32],\"getCountryList\":[64],\"displayCurrency\":[64],\"convertAndFormat\":[64],\"convert\":[64],\"format\":[64],\"openHelloDialog\":[64]},[[9,\"resize\",\"handleResize\"]],{\"appearanceSettingsOverride\":[\"handleAppearanceSettingsOverrideChange\"]}]]],[\"zonos-controller\",[[1,\"zonos-controller\",{\"config\":[16],\"zonosApiKey\":[1,\"zonos-api-key\"],\"initCheckoutElement\":[64],\"setupGoogleFont\":[64],\"showNotification\":[64],\"reset\":[64],\"overrideConfig\":[64],\"overrideCountry\":[64],\"getAppearanceSetting\":[64],\"updateOrganizationName\":[64]},[[8,\"locationchange\",\"handleLocationChange\"]]]]],[\"zonos-tooltip\",[[1,\"zonos-tooltip\",{\"label\":[1],\"subtitle\":[1],\"showTooltip\":[32]}]]],[\"zonos-component\",[[1,\"zonos-component\",{\"first\":[1],\"middle\":[1],\"last\":[1]}]]],[\"zonos-link\",[[1,\"zonos-link\",{\"href\":[1],\"rel\":[1],\"target\":[1],\"linkTitle\":[1,\"link-title\"]}]]],[\"zonos-logo\",[[1,\"zonos-logo\",{\"theme\":[1],\"width\":[1]}]]],[\"zonos-hello-dialog\",[[1,\"zonos-hello-dialog\",{\"isOpen\":[4,\"is-open\"],\"setIsOpen\":[16],\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettings\":[16],\"restrictedItems\":[16],\"welcomeMessage\":[32],\"showCountrySelect\":[32],\"showLanguageSelect\":[32]},[[4,\"click\",\"globalClickHandler\"]],{\"isOpen\":[\"isOpenHandler\"]}]]],[\"zonos-badge\",[[1,\"zonos-badge\",{\"bold\":[4],\"badgeColor\":[1,\"badge-color\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"rounded\":[4],\"loading\":[4],\"dismissHandler\":[16]}]]],[\"zonos-shipping-rich-radio\",[[1,\"zonos-shipping-rich-radio\",{\"items\":[16],\"borderColor\":[1,\"border-color\"],\"borderStyle\":[1,\"border-style\"],\"theme\":[1],\"selectedItem\":[16]}]]],[\"zonos-toggle\",[[1,\"zonos-toggle\",{\"options\":[16],\"value\":[1]}]]],[\"zonos-collapse\",[[1,\"zonos-collapse\",{\"collapsed\":[4],\"collapseSize\":[2,\"collapse-size\"],\"height\":[32],\"iframe\":[32]}]]],[\"zonos-card\",[[1,\"zonos-card\",{\"actions\":[16],\"backgroundColor\":[1,\"background-color\"],\"borderRadius\":[2,\"border-radius\"],\"footerActions\":[16],\"footerContent\":[16],\"footerHeight\":[2,\"footer-height\"],\"label\":[16],\"spacing\":[1]}]]],[\"zonos-input\",[[1,\"zonos-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"inputSize\":[1,\"input-size\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[32]},null,{\"inputValue\":[\"onInputValueChange\"]}]]],[\"zonos-text\",[[1,\"zonos-text\",{\"textColor\":[1,\"text-color\"],\"size\":[1],\"type\":[1],\"weight\":[2],\"ready\":[32]}]]],[\"zonos-banner\",[[1,\"zonos-banner\",{\"bannerTitle\":[1,\"banner-title\"],\"intent\":[1],\"hasContent\":[32]}]]],[\"zonos-country-flag\",[[1,\"zonos-country-flag\",{\"countryCode\":[1,\"country-code\"],\"size\":[2]}]]],[\"zonos-v-stack\",[[1,\"zonos-v-stack\",{\"spacing\":[2]}]]],[\"zonos-empty-state-payment_4\",[[1,\"zonos-empty-state-payment\",{\"emptyStateText\":[1,\"empty-state-text\"],\"theme\":[1]}],[2,\"zonos-payment\",{\"titleText\":[1,\"title-text\"],\"stripe\":[32],\"stripeElements\":[32]},null,{\"stripeElements\":[\"watchInitStripe\"],\"stripe\":[\"watchInitStripe\"]}],[2,\"zonos-paypal-payment\"],[1,\"zonos-notification\",{\"notificationArray\":[32],\"showNotification\":[64]}]]],[\"zonos-button_3\",[[17,\"zonos-button\",{\"buttonColor\":[1,\"button-color\"],\"backgroundColor\":[1,\"background-color\"],\"borderStyle\":[1,\"border-style\"],\"isDisabled\":[4,\"is-disabled\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"variant\":[1],\"noBackground\":[4,\"no-background\"],\"withBoxShadow\":[4,\"with-box-shadow\"],\"noPaddingLeft\":[4,\"no-padding-left\"],\"noPaddingRight\":[4,\"no-padding-right\"],\"loading\":[4],\"justifyContent\":[1,\"justify-content\"],\"theme\":[1],\"hasIcon\":[32],\"hasContent\":[32]},[[2,\"click\",\"clickHandler\"]],{\"icon\":[\"iconChangeHandler\"]}],[1,\"zonos-spinner\",{\"size\":[2],\"spinnerColor\":[1,\"spinner-color\"]}],[1,\"zonos-icon\",{\"autoHeight\":[4,\"auto-height\"],\"iconColor\":[1,\"icon-color\"],\"content\":[1],\"size\":[2]}]]],[\"zonos-language-select_2\",[[1,\"zonos-language-select\",{\"handleOnClose\":[16]}],[1,\"zonos-select-dialog-header\",{\"handleOnClose\":[16],\"label\":[1]}]]],[\"zonos-country-select_4\",[[1,\"zonos-country-select\",{\"handleOnClose\":[16],\"inputValue\":[32]}],[1,\"zonos-hello-dialog-footer\",{\"appearanceSettings\":[16],\"setShowCountrySelect\":[16],\"setShowLanguageSelect\":[16]}],[1,\"zonos-custom-message\",{\"icon\":[1],\"message\":[1]}],[2,\"zonos-virtual-scroll\",{\"renderItem\":[16],\"itemWidth\":[2,\"item-width\"],\"fallbackItemHeight\":[2,\"fallback-item-height\"],\"itemHeights\":[16],\"container\":[32],\"scrollTop\":[32],\"totalHeight\":[32]},null,{\"itemHeights\":[\"updateTotalHeight\"],\"fallbackItemHeight\":[\"updateTotalHeight\"]}]]],[\"zonos-address_8\",[[1,\"zonos-address-update-dialog\",{\"continueLoading\":[4,\"continue-loading\"],\"dialogLoading\":[4,\"dialog-loading\"],\"dialogOpen\":[4,\"dialog-open\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"shippingAddress\":[16],\"billingAddress\":[16],\"translatedShippingAddress\":[16],\"translatedBillingAddress\":[16],\"showErrorBanner\":[32],\"translatedShippingAddressState\":[32],\"translatedBillingAddressState\":[32]},null,{\"translatedShippingAddress\":[\"watchTranslatedShippingAddress\"],\"translatedBillingAddress\":[\"watchTranslatedBillingAddress\"]}],[2,\"zonos-link-authentication\",{\"titleText\":[1,\"title-text\"],\"defaultEmail\":[1,\"default-email\"],\"isEmailError\":[4,\"is-email-error\"],\"stripe\":[32],\"isStagingMode\":[32],\"clientSecret\":[32]},null,{\"isStagingMode\":[\"watchIsStagingMode\"],\"stripe\":[\"watchInitStripe\"],\"clientSecret\":[\"watchInitStripe\"],\"defaultEmail\":[\"watchDefaultEmail\"]}],[2,\"zonos-address\",{\"type\":[1],\"titleText\":[1,\"title-text\"],\"defaultAddress\":[16],\"stripe\":[32],\"isDirtyAddress\":[32]},null,{\"stripe\":[\"watchInitStripe\"]}],[1,\"zonos-checkbox\",{\"backgroundColor\":[1,\"background-color\"],\"label\":[1],\"isChecked\":[4,\"is-checked\"],\"isDisabled\":[4,\"is-disabled\"],\"size\":[2],\"fontSize\":[1,\"font-size\"],\"borderStyle\":[1,\"border-style\"]},[[1,\"click\",\"onClick\"]]],[1,\"zonos-dialog\",{\"open\":[4],\"headerText\":[1,\"header-text\"],\"width\":[1],\"height\":[1],\"minHeight\":[1,\"min-height\"],\"noHeader\":[4,\"no-header\"],\"noBodyPadding\":[4,\"no-body-padding\"],\"noBorder\":[4,\"no-border\"],\"borderStyle\":[1,\"border-style\"],\"noCloseButton\":[4,\"no-close-button\"],\"noClickOutside\":[4,\"no-click-outside\"],\"mobile\":[4],\"isLoading\":[4,\"is-loading\"],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"],[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-address-display\",{\"currentAddress\":[16],\"addressType\":[1,\"address-type\"]}],[1,\"zonos-address-form\",{\"currentAddress\":[16],\"translatedAddress\":[16],\"addressType\":[1,\"address-type\"],\"localAddress\":[32]},null,{\"translatedAddress\":[\"watchCurrentAddress\"]}],[1,\"zonos-stripe-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"overridePrimaryColor\":[1,\"override-primary-color\"],\"overrideSecondaryColor\":[1,\"override-secondary-color\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[1025],\"internalValue\":[32]},null,{\"inputValue\":[\"onInputValueChange\"],\"value\":[\"onValueChange\"]}]]],[\"zonos-cart-items_13\",[[2,\"zonos-customer-info\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"defaultAddress\":[16],\"showErrorBanner\":[32],\"shippingCountry\":[32],\"isCheckingForRestrictedItems\":[32],\"isValidatingAddress\":[32],\"invalidShippingCharacterList\":[32],\"invalidBillingCharacterList\":[32],\"openAddressValidationDialog\":[32],\"isEmailError\":[32]}],[2,\"zonos-checkout-payment\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"overridePrimaryColor\":[1,\"override-primary-color\"],\"showErrorBanner\":[32],\"hasStripePaymentError\":[32],\"stagingOrderCreateErrorMessage\":[32],\"internalContinueLoading\":[32]},null,{\"continueLoading\":[\"continueLoadingWatcher\"],\"hasStripePaymentError\":[\"stripePaymentErrorWatcher\"]}],[1,\"zonos-checkout-footer\",{\"mobile\":[4],\"dataTheme\":[1,\"data-theme\"],\"showLanguageDialog\":[32],\"isMobile\":[32]},[[4,\"click\",\"handleGlobalClick\"]],{\"mobile\":[\"handleMobileChange\"]}],[2,\"zonos-shipping\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"selectedShippingMethod\":[32],\"collapsedDAPOptions\":[32],\"isSelecting\":[32],\"showErrorBanner\":[32],\"serviceLevelsDDP\":[32],\"serviceLevelsDAP\":[32],\"serviceLevelsOther\":[32],\"serviceLevelsAll\":[32],\"displayBaseCurrency\":[32]}],[1,\"zonos-cart-subtotal\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"loading\":[32]}],[1,\"zonos-cart-restricted-items\",{\"hide\":[4],\"errorImages\":[32],\"internalCollapsed\":[32],\"firstRender\":[32]}],[1,\"zonos-checkout-finish\",{\"borderRadius\":[1,\"border-radius\"],\"storybookForceStatus\":[1,\"storybook-force-status\"],\"overrideNotification\":[16],\"isLoading\":[32],\"notificationType\":[32],\"notificationTitle\":[32],\"notificationMessages\":[32],\"notificationActionText\":[32],\"order\":[32],\"isWaitingToRedirect\":[32]}],[1,\"zonos-confirm-dialog\",{\"dialogTitle\":[1,\"dialog-title\"],\"dialogIntent\":[1,\"dialog-intent\"],\"dialogSubtitle\":[1,\"dialog-subtitle\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"dialogConfirmBtnText\":[1,\"dialog-confirm-btn-text\"],\"dialogWidth\":[2,\"dialog-width\"],\"dialogCancelBtnText\":[1,\"dialog-cancel-btn-text\"],\"dialogType\":[1,\"dialog-type\"],\"isMobile\":[4,\"is-mobile\"],\"dialogOpen\":[4,\"dialog-open\"],\"noClickOutside\":[4,\"no-click-outside\"]},[[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-checkout-progress-tabs\",{\"tabColor\":[1,\"tab-color\"],\"backgroundColor\":[1,\"background-color\"],\"setTabItems\":[64],\"setTabSelected\":[64]}],[1,\"zonos-review\",{\"mobile\":[4],\"collapsed\":[4],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"]]],[1,\"zonos-cart-items\",{\"errorImages\":[32]}],[1,\"zonos-currency-toggle\",{\"errorImages\":[32]}],[1,\"zonos-rest-state\",{\"restStateSubtitle\":[1,\"rest-state-subtitle\"],\"restStateTitle\":[1,\"rest-state-title\"],\"restStateType\":[1,\"rest-state-type\"],\"isErrorImageLoad\":[32]}]]]]"), options);
|
|
8
|
+
return bootstrapLazy(JSON.parse("[[\"zonos-checkout\",[[2,\"zonos-checkout\",{\"appearanceSettingsOverride\":[16],\"preview\":[4],\"mobile\":[4],\"overrideStagingMode\":[4,\"override-staging-mode\"],\"defaultAddress\":[16],\"forceDialogOpen\":[4,\"force-dialog-open\"],\"defaultAddressParams\":[32],\"open\":[32],\"stripe\":[32],\"submitLoading\":[32],\"collapseReviewMobile\":[32],\"isAttachError\":[32],\"isMobile\":[32],\"isIframed\":[32],\"zonosReviewRef\":[32],\"storybookPaymentStatusOverride\":[32],\"isLegacyCheckout\":[32],\"confirmDialogOpen\":[32],\"isCartExpired\":[32],\"inventoryCheckErrorMessage\":[32],\"placedOrderInfo\":[32],\"clientSecret\":[32],\"closeDialogHandler\":[64],\"init\":[64],\"setToFinishStep\":[64],\"mockCheckoutSession\":[64]},[[16,\"zonos--init-cart-info\",\"initCartInfoHandler\"],[4,\"keydown\",\"handleKeyPress\"],[9,\"resize\",\"handleWindowResize\"]],{\"appearanceSettingsOverride\":[\"appearanceSettingsOverrideChanged\",\"handleAppearanceSettingsOverrideChange\"],\"overrideStagingMode\":[\"overrideStagingModeChanged\"],\"mobile\":[\"handleMobileChange\"],\"defaultAddress\":[\"handleAddressChange\"],\"clientSecret\":[\"handleClientSecretChange\"],\"open\":[\"handleOpenChange\"]}]]],[\"zonos-hello\",[[1,\"zonos-hello\",{\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettingsOverride\":[16],\"showPeekMessage\":[32],\"zonosStoreHelloSettings\":[32],\"showDialog\":[32],\"peekMessage\":[32],\"initialUrl\":[32],\"allRestrictedItems\":[32],\"allFoundProducts\":[32],\"productsOnPage\":[32],\"isHelloWidgetRendered\":[32],\"isMobile\":[32],\"getCountryList\":[64],\"displayCurrency\":[64],\"convertAndFormat\":[64],\"convert\":[64],\"format\":[64],\"openHelloDialog\":[64]},[[9,\"resize\",\"handleResize\"]],{\"appearanceSettingsOverride\":[\"handleAppearanceSettingsOverrideChange\"]}]]],[\"zonos-controller\",[[1,\"zonos-controller\",{\"config\":[16],\"zonosApiKey\":[1,\"zonos-api-key\"],\"initCheckoutElement\":[64],\"setupGoogleFont\":[64],\"showNotification\":[64],\"reset\":[64],\"overrideConfig\":[64],\"overrideCountry\":[64],\"getAppearanceSetting\":[64],\"updateOrganizationName\":[64]},[[8,\"locationchange\",\"handleLocationChange\"]]]]],[\"zonos-tooltip\",[[1,\"zonos-tooltip\",{\"label\":[1],\"subtitle\":[1],\"showTooltip\":[32]}]]],[\"zonos-component\",[[1,\"zonos-component\",{\"first\":[1],\"middle\":[1],\"last\":[1]}]]],[\"zonos-link\",[[1,\"zonos-link\",{\"href\":[1],\"rel\":[1],\"target\":[1],\"linkTitle\":[1,\"link-title\"]}]]],[\"zonos-logo\",[[1,\"zonos-logo\",{\"theme\":[1],\"width\":[1]}]]],[\"zonos-hello-dialog\",[[1,\"zonos-hello-dialog\",{\"isOpen\":[4,\"is-open\"],\"setIsOpen\":[16],\"mobileLocationOverride\":[1,\"mobile-location-override\"],\"animateFromLeftOverride\":[4,\"animate-from-left-override\"],\"appearanceSettings\":[16],\"restrictedItems\":[16],\"welcomeMessage\":[32],\"showCountrySelect\":[32],\"showLanguageSelect\":[32]},[[4,\"click\",\"globalClickHandler\"]],{\"isOpen\":[\"isOpenHandler\"]}]]],[\"zonos-badge\",[[1,\"zonos-badge\",{\"bold\":[4],\"badgeColor\":[1,\"badge-color\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"rounded\":[4],\"loading\":[4],\"dismissHandler\":[16]}]]],[\"zonos-shipping-rich-radio\",[[1,\"zonos-shipping-rich-radio\",{\"items\":[16],\"borderColor\":[1,\"border-color\"],\"borderStyle\":[1,\"border-style\"],\"theme\":[1],\"selectedItem\":[16]}]]],[\"zonos-toggle\",[[1,\"zonos-toggle\",{\"options\":[16],\"value\":[1]}]]],[\"zonos-collapse\",[[1,\"zonos-collapse\",{\"collapsed\":[4],\"collapseSize\":[2,\"collapse-size\"],\"height\":[32],\"iframe\":[32]}]]],[\"zonos-card\",[[1,\"zonos-card\",{\"actions\":[16],\"backgroundColor\":[1,\"background-color\"],\"borderRadius\":[2,\"border-radius\"],\"footerActions\":[16],\"footerContent\":[16],\"footerHeight\":[2,\"footer-height\"],\"label\":[16],\"spacing\":[1]}]]],[\"zonos-input\",[[1,\"zonos-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"inputSize\":[1,\"input-size\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[32]},null,{\"inputValue\":[\"onInputValueChange\"]}]]],[\"zonos-text\",[[1,\"zonos-text\",{\"textColor\":[1,\"text-color\"],\"size\":[1],\"type\":[1],\"weight\":[2],\"ready\":[32]}]]],[\"zonos-banner\",[[1,\"zonos-banner\",{\"bannerTitle\":[1,\"banner-title\"],\"intent\":[1],\"hasContent\":[32]}]]],[\"zonos-country-flag\",[[1,\"zonos-country-flag\",{\"countryCode\":[1,\"country-code\"],\"size\":[2]}]]],[\"zonos-v-stack\",[[1,\"zonos-v-stack\",{\"spacing\":[2]}]]],[\"zonos-empty-state-payment_4\",[[1,\"zonos-empty-state-payment\",{\"emptyStateText\":[1,\"empty-state-text\"],\"theme\":[1]}],[2,\"zonos-payment\",{\"titleText\":[1,\"title-text\"],\"stripe\":[32],\"stripeElements\":[32]},null,{\"stripeElements\":[\"watchInitStripe\"],\"stripe\":[\"watchInitStripe\"]}],[2,\"zonos-paypal-payment\"],[1,\"zonos-notification\",{\"notificationArray\":[32],\"showNotification\":[64]}]]],[\"zonos-button_3\",[[17,\"zonos-button\",{\"buttonColor\":[1,\"button-color\"],\"backgroundColor\":[1,\"background-color\"],\"borderStyle\":[1,\"border-style\"],\"isDisabled\":[4,\"is-disabled\"],\"icon\":[16],\"iconRight\":[4,\"icon-right\"],\"size\":[1],\"variant\":[1],\"noBackground\":[4,\"no-background\"],\"withBoxShadow\":[4,\"with-box-shadow\"],\"noPaddingLeft\":[4,\"no-padding-left\"],\"noPaddingRight\":[4,\"no-padding-right\"],\"loading\":[4],\"justifyContent\":[1,\"justify-content\"],\"theme\":[1],\"hasIcon\":[32],\"hasContent\":[32]},[[2,\"click\",\"clickHandler\"]],{\"icon\":[\"iconChangeHandler\"]}],[1,\"zonos-spinner\",{\"size\":[2],\"spinnerColor\":[1,\"spinner-color\"]}],[1,\"zonos-icon\",{\"autoHeight\":[4,\"auto-height\"],\"iconColor\":[1,\"icon-color\"],\"content\":[1],\"size\":[2]}]]],[\"zonos-language-select_2\",[[1,\"zonos-language-select\",{\"handleOnClose\":[16]}],[1,\"zonos-select-dialog-header\",{\"handleOnClose\":[16],\"label\":[1]}]]],[\"zonos-country-select_4\",[[1,\"zonos-country-select\",{\"handleOnClose\":[16],\"inputValue\":[32]}],[1,\"zonos-hello-dialog-footer\",{\"appearanceSettings\":[16],\"setShowCountrySelect\":[16],\"setShowLanguageSelect\":[16]}],[1,\"zonos-custom-message\",{\"icon\":[1],\"message\":[1]}],[2,\"zonos-virtual-scroll\",{\"renderItem\":[16],\"itemWidth\":[2,\"item-width\"],\"fallbackItemHeight\":[2,\"fallback-item-height\"],\"itemHeights\":[16],\"container\":[32],\"scrollTop\":[32],\"totalHeight\":[32]},null,{\"itemHeights\":[\"updateTotalHeight\"],\"fallbackItemHeight\":[\"updateTotalHeight\"]}]]],[\"zonos-address_8\",[[1,\"zonos-address-update-dialog\",{\"continueLoading\":[4,\"continue-loading\"],\"dialogLoading\":[4,\"dialog-loading\"],\"dialogOpen\":[4,\"dialog-open\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"shippingAddress\":[16],\"billingAddress\":[16],\"translatedShippingAddress\":[16],\"translatedBillingAddress\":[16],\"showErrorBanner\":[32],\"translatedShippingAddressState\":[32],\"translatedBillingAddressState\":[32]},null,{\"translatedShippingAddress\":[\"watchTranslatedShippingAddress\"],\"translatedBillingAddress\":[\"watchTranslatedBillingAddress\"]}],[2,\"zonos-link-authentication\",{\"titleText\":[1,\"title-text\"],\"defaultEmail\":[1,\"default-email\"],\"isEmailError\":[4,\"is-email-error\"],\"stripe\":[32],\"isStagingMode\":[32],\"clientSecret\":[32]},null,{\"isStagingMode\":[\"watchIsStagingMode\"],\"stripe\":[\"watchInitStripe\"],\"clientSecret\":[\"watchInitStripe\"],\"defaultEmail\":[\"watchDefaultEmail\"]}],[2,\"zonos-address\",{\"type\":[1],\"titleText\":[1,\"title-text\"],\"defaultAddress\":[16],\"stripe\":[32],\"isDirtyAddress\":[32]},null,{\"stripe\":[\"watchInitStripe\"]}],[1,\"zonos-checkbox\",{\"backgroundColor\":[1,\"background-color\"],\"label\":[1],\"isChecked\":[4,\"is-checked\"],\"isDisabled\":[4,\"is-disabled\"],\"size\":[2],\"fontSize\":[1,\"font-size\"],\"borderStyle\":[1,\"border-style\"]},[[1,\"click\",\"onClick\"]]],[1,\"zonos-dialog\",{\"open\":[4],\"headerText\":[1,\"header-text\"],\"width\":[1],\"height\":[1],\"minHeight\":[1,\"min-height\"],\"noHeader\":[4,\"no-header\"],\"noBodyPadding\":[4,\"no-body-padding\"],\"noBorder\":[4,\"no-border\"],\"borderStyle\":[1,\"border-style\"],\"noCloseButton\":[4,\"no-close-button\"],\"noClickOutside\":[4,\"no-click-outside\"],\"mobile\":[4],\"isLoading\":[4,\"is-loading\"],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"],[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-address-display\",{\"currentAddress\":[16],\"addressType\":[1,\"address-type\"]}],[1,\"zonos-address-form\",{\"currentAddress\":[16],\"translatedAddress\":[16],\"addressType\":[1,\"address-type\"],\"localAddress\":[32]},null,{\"translatedAddress\":[\"watchCurrentAddress\"]}],[1,\"zonos-stripe-input\",{\"inputValue\":[1,\"input-value\"],\"inputLabel\":[1,\"input-label\"],\"overridePrimaryColor\":[1,\"override-primary-color\"],\"overrideSecondaryColor\":[1,\"override-secondary-color\"],\"isDisabled\":[4,\"is-disabled\"],\"isError\":[4,\"is-error\"],\"inputPlaceholder\":[1,\"input-placeholder\"],\"value\":[1025],\"internalValue\":[32]},null,{\"inputValue\":[\"onInputValueChange\"],\"value\":[\"onValueChange\"]}]]],[\"zonos-cart-items_13\",[[2,\"zonos-customer-info\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"defaultAddress\":[16],\"showErrorBanner\":[32],\"shippingCountry\":[32],\"isCheckingForRestrictedItems\":[32],\"isValidatingAddress\":[32],\"isTaxIdError\":[32],\"invalidShippingCharacterList\":[32],\"invalidBillingCharacterList\":[32],\"openAddressValidationDialog\":[32],\"isEmailError\":[32]}],[2,\"zonos-checkout-payment\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"isMobile\":[4,\"is-mobile\"],\"overridePrimaryColor\":[1,\"override-primary-color\"],\"showErrorBanner\":[32],\"hasStripePaymentError\":[32],\"stagingOrderCreateErrorMessage\":[32],\"internalContinueLoading\":[32]},null,{\"continueLoading\":[\"continueLoadingWatcher\"],\"hasStripePaymentError\":[\"stripePaymentErrorWatcher\"]}],[1,\"zonos-checkout-footer\",{\"mobile\":[4],\"dataTheme\":[1,\"data-theme\"],\"showLanguageDialog\":[32],\"isMobile\":[32]},[[4,\"click\",\"handleGlobalClick\"]],{\"mobile\":[\"handleMobileChange\"]}],[2,\"zonos-shipping\",{\"continueLoading\":[4,\"continue-loading\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"submitBtnType\":[1,\"submit-btn-type\"],\"selectedShippingMethod\":[32],\"collapsedDAPOptions\":[32],\"isSelecting\":[32],\"showErrorBanner\":[32],\"serviceLevelsDDP\":[32],\"serviceLevelsDAP\":[32],\"serviceLevelsOther\":[32],\"serviceLevelsAll\":[32],\"displayBaseCurrency\":[32]}],[1,\"zonos-cart-subtotal\",{\"submitBtnType\":[1,\"submit-btn-type\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"loading\":[32]}],[1,\"zonos-cart-restricted-items\",{\"hide\":[4],\"errorImages\":[32],\"internalCollapsed\":[32],\"firstRender\":[32]}],[1,\"zonos-checkout-finish\",{\"borderRadius\":[1,\"border-radius\"],\"storybookForceStatus\":[1,\"storybook-force-status\"],\"overrideNotification\":[16],\"isLoading\":[32],\"notificationType\":[32],\"notificationTitle\":[32],\"notificationMessages\":[32],\"notificationActionText\":[32],\"order\":[32],\"isWaitingToRedirect\":[32]}],[1,\"zonos-confirm-dialog\",{\"dialogTitle\":[1,\"dialog-title\"],\"dialogIntent\":[1,\"dialog-intent\"],\"dialogSubtitle\":[1,\"dialog-subtitle\"],\"submitBtnColor\":[1,\"submit-btn-color\"],\"dialogConfirmBtnText\":[1,\"dialog-confirm-btn-text\"],\"dialogWidth\":[2,\"dialog-width\"],\"dialogCancelBtnText\":[1,\"dialog-cancel-btn-text\"],\"dialogType\":[1,\"dialog-type\"],\"isMobile\":[4,\"is-mobile\"],\"dialogOpen\":[4,\"dialog-open\"],\"noClickOutside\":[4,\"no-click-outside\"]},[[4,\"keydown\",\"handleKeyDown\"]]],[1,\"zonos-checkout-progress-tabs\",{\"tabColor\":[1,\"tab-color\"],\"backgroundColor\":[1,\"background-color\"],\"setTabItems\":[64],\"setTabSelected\":[64]}],[1,\"zonos-review\",{\"mobile\":[4],\"collapsed\":[4],\"isMobile\":[32]},[[9,\"resize\",\"handleWindowResize\"]]],[1,\"zonos-cart-items\",{\"errorImages\":[32]}],[1,\"zonos-currency-toggle\",{\"errorImages\":[32]}],[1,\"zonos-rest-state\",{\"restStateSubtitle\":[1,\"rest-state-subtitle\"],\"restStateTitle\":[1,\"rest-state-title\"],\"restStateType\":[1,\"rest-state-type\"],\"isErrorImageLoad\":[32]}]]]]"), options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as zonosStore, c as createStore } from './zonosStore-44efd080.js';
|
|
2
|
-
import { C as validateCheckoutSession, f as stripeStore, e as cartStore, x as stripeStoreHandleInventoryCheck, q as translate, w as cartStoreNextStep, k as cartStoreClearCheckoutInterval } from './cart-
|
|
2
|
+
import { C as validateCheckoutSession, f as stripeStore, e as cartStore, x as stripeStoreHandleInventoryCheck, q as translate, w as cartStoreNextStep, k as cartStoreClearCheckoutInterval } from './cart-9de02093.js';
|
|
3
3
|
import { h as handleFetch, l as log, b as logError, j as jsonParse } from './handleFetch-b4633675.js';
|
|
4
4
|
import { t as tinycolor } from './isDarkColor-10f38df6.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-d82f06f2.js';
|
|
2
|
-
import { f as stripeStore, T as getFallbackDefaultCountryCode, l as localizationStore, q as translate, e as cartStore } from './cart-
|
|
2
|
+
import { f as stripeStore, T as getFallbackDefaultCountryCode, l as localizationStore, q as translate, e as cartStore } from './cart-9de02093.js';
|
|
3
3
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
4
4
|
import { b as logError, l as log } from './handleFetch-b4633675.js';
|
|
5
5
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
@@ -581,7 +581,7 @@ const ZonosLinkAuthentication = class {
|
|
|
581
581
|
return;
|
|
582
582
|
}
|
|
583
583
|
// No need to initialize link if this is staging mode since we will render the email input field
|
|
584
|
-
if (cartStore.isStagingMode) {
|
|
584
|
+
if (cartStore.isStagingMode || !this.clientSecret) {
|
|
585
585
|
return;
|
|
586
586
|
}
|
|
587
587
|
const defaultValues = this.defaultEmail
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-d82f06f2.js';
|
|
2
|
-
import { e as cartStore, J as currencyFormat, q as translate, K as cartStoreHasOneEligibleItem, L as stripeStoreApplyPromoCode, M as stripeStoreRemovePromoCode, f as stripeStore, A as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, N as stripeStoreResetPromoCode, O as stripeStoreMessageBasedOnStatus, l as localizationStore, w as cartStoreNextStep, P as stripeStoreTranslateAddressToLatin, Q as cartStoreUpdateSelectedShippingOption, R as cartStoreGetShippingTransitInfo, S as sortServiceLevelOptionsByAmount } from './cart-
|
|
2
|
+
import { e as cartStore, J as currencyFormat, q as translate, K as cartStoreHasOneEligibleItem, L as stripeStoreApplyPromoCode, M as stripeStoreRemovePromoCode, f as stripeStore, A as stripeStoreReset, d as stripeStoreRetrievePayment, t as trackConversionEvent, N as stripeStoreResetPromoCode, O as stripeStoreMessageBasedOnStatus, l as localizationStore, w as cartStoreNextStep, P as stripeStoreTranslateAddressToLatin, Q as cartStoreUpdateSelectedShippingOption, R as cartStoreGetShippingTransitInfo, S as sortServiceLevelOptionsByAmount } from './cart-9de02093.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import { s as submitGtag, c as paypalStoreReset, b as paypalStore, i as isContrastColor } from './paypal-
|
|
4
|
+
import { s as submitGtag, c as paypalStoreReset, b as paypalStore, i as isContrastColor } from './paypal-1efe64a0.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
|
|
6
6
|
import { h as handleFetch, l as log, s as sendErrorLog, j as jsonParse, g as getIsTestMode, d as allLogs, b as logError, a as getIsStagingMode } from './handleFetch-b4633675.js';
|
|
7
7
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
@@ -2129,7 +2129,7 @@ const ZonosCurrencyToggle = class {
|
|
|
2129
2129
|
static get assetsDirs() { return ["assets"]; }
|
|
2130
2130
|
};
|
|
2131
2131
|
|
|
2132
|
-
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--tax-id-input.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
|
|
2132
|
+
const zonosCustomerInfoCss = ".sc-zonos-customer-info-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-customer-info-h *.sc-zonos-customer-info{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-customer-info-h img.sc-zonos-customer-info{max-width:100%}.sc-zonos-customer-info-h dl.sc-zonos-customer-info,.sc-zonos-customer-info-h dd.sc-zonos-customer-info,.sc-zonos-customer-info-h h1.sc-zonos-customer-info,.sc-zonos-customer-info-h h2.sc-zonos-customer-info,.sc-zonos-customer-info-h h3.sc-zonos-customer-info,.sc-zonos-customer-info-h h4.sc-zonos-customer-info,.sc-zonos-customer-info-h h5.sc-zonos-customer-info,.sc-zonos-customer-info-h h6.sc-zonos-customer-info,.sc-zonos-customer-info-h hr.sc-zonos-customer-info,.sc-zonos-customer-info-h figure.sc-zonos-customer-info,.sc-zonos-customer-info-h p.sc-zonos-customer-info,.sc-zonos-customer-info-h pre.sc-zonos-customer-info{margin:0}.sc-zonos-customer-info-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-customer-info-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-customer-info-h .zonos--title.sc-zonos-customer-info{margin-bottom:20px}.sc-zonos-customer-info-h .zonos--link-authentication.sc-zonos-customer-info{margin-bottom:32px}.sc-zonos-customer-info-h .zonos--address.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--checkbox.sc-zonos-customer-info+.zonos--address.sc-zonos-customer-info{margin-bottom:0}.sc-zonos-customer-info-h zonos-button.sc-zonos-customer-info{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-customer-info-h .zonos--error-banner.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--tax-id-input.sc-zonos-customer-info{margin-bottom:16px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info{margin-bottom:20px;overflow:auto;padding:5px;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar{width:10px}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-customer-info-h .zonos--group.sc-zonos-customer-info::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;bottom:-5px;padding-top:8px;margin-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0));z-index:1}.sc-zonos-customer-info-h .zonos--group-btn.sc-zonos-customer-info zonos-button.sc-zonos-customer-info{width:100%}";
|
|
2133
2133
|
const ZonosCustomerInfoStyle0 = zonosCustomerInfoCss;
|
|
2134
2134
|
|
|
2135
2135
|
const ZonosCustomerInfo = class {
|
|
@@ -2210,6 +2210,10 @@ const ZonosCustomerInfo = class {
|
|
|
2210
2210
|
submitGtag('zonos-checkout-customer-info');
|
|
2211
2211
|
void trackConversionEvent('checkout_customerInfoCompleted');
|
|
2212
2212
|
};
|
|
2213
|
+
this.isTaxIdRequired = () => {
|
|
2214
|
+
const requireTaxIdCountry = ['MX'];
|
|
2215
|
+
return requireTaxIdCountry.includes(this.shippingCountry);
|
|
2216
|
+
};
|
|
2213
2217
|
this.handleValidate = () => {
|
|
2214
2218
|
var _a, _b;
|
|
2215
2219
|
const stripeShippingAddressEventData = stripeStore.stripeAddressEventData;
|
|
@@ -2227,7 +2231,13 @@ const ZonosCustomerInfo = class {
|
|
|
2227
2231
|
if (!isValidLink && (stripeLinkEventData === null || stripeLinkEventData === void 0 ? void 0 : stripeLinkEventData.empty)) {
|
|
2228
2232
|
this.isEmailError = true;
|
|
2229
2233
|
}
|
|
2230
|
-
if
|
|
2234
|
+
// validate tax id input if it's required for specific countries, optional otherwise
|
|
2235
|
+
const isValidTaxIdInput = !this.isTaxIdRequired() || !!stripeStore.taxId;
|
|
2236
|
+
this.isTaxIdError = !isValidTaxIdInput;
|
|
2237
|
+
if (!isValidBilling ||
|
|
2238
|
+
!isValidShipping ||
|
|
2239
|
+
!isValidLink ||
|
|
2240
|
+
!isValidTaxIdInput) {
|
|
2231
2241
|
return false;
|
|
2232
2242
|
}
|
|
2233
2243
|
return true;
|
|
@@ -2265,6 +2275,7 @@ const ZonosCustomerInfo = class {
|
|
|
2265
2275
|
this.shippingCountry = '';
|
|
2266
2276
|
this.isCheckingForRestrictedItems = false;
|
|
2267
2277
|
this.isValidatingAddress = false;
|
|
2278
|
+
this.isTaxIdError = false;
|
|
2268
2279
|
this.invalidShippingCharacterList = null;
|
|
2269
2280
|
this.invalidBillingCharacterList = null;
|
|
2270
2281
|
this.openAddressValidationDialog = false;
|
|
@@ -2311,9 +2322,9 @@ const ZonosCustomerInfo = class {
|
|
|
2311
2322
|
return null;
|
|
2312
2323
|
}
|
|
2313
2324
|
const taxIdInputInfo = shipToTaxIdLabels[countryCode];
|
|
2314
|
-
return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', onInputChange: (event) => {
|
|
2325
|
+
return (h("div", { class: "zonos--tax-id-input" }, h("zonos-stripe-input", { inputLabel: translate(taxIdInputInfo.friendlyName), inputPlaceholder: taxIdInputInfo.placeholder, inputValue: stripeStore.taxId || '', isError: this.isTaxIdError, onInputChange: (event) => {
|
|
2315
2326
|
stripeStore.taxId = event.detail;
|
|
2316
|
-
} })));
|
|
2327
|
+
} }), this.isTaxIdError && (h("zonos-text", { textColor: 'red-600', type: "caption" }, translate('Tax id is required')))));
|
|
2317
2328
|
}
|
|
2318
2329
|
render() {
|
|
2319
2330
|
var _a, _b;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, F as Fragment } from './index-d82f06f2.js';
|
|
2
|
-
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as stripeStore, g as cartStoreUpdateItems, h as cartStoreReset, j as cartStoreResetTabItems, k as cartStoreClearCheckoutInterval, m as stripeStoreInitCheckoutSession, n as cartStoreStartCheckoutInterval, t as trackConversionEvent, o as getCheckoutSessionBody, p as cartStoreUpdateToErrorState, q as translate, r as getZCountryUrlParam, u as cartStoreSetCheckoutSession, v as stripeStorePrefetchLandedCost, w as cartStoreNextStep, x as stripeStoreHandleInventoryCheck, y as stripeStoreConfirmPayment, z as stripeStoreHandleInventoryRefund, A as stripeStoreReset, B as localizationStoreOnUpdate } from './cart-
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript, b as paypalStore } from './paypal-
|
|
2
|
+
import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as stripeStoreRetrievePayment, e as cartStore, f as stripeStore, g as cartStoreUpdateItems, h as cartStoreReset, j as cartStoreResetTabItems, k as cartStoreClearCheckoutInterval, m as stripeStoreInitCheckoutSession, n as cartStoreStartCheckoutInterval, t as trackConversionEvent, o as getCheckoutSessionBody, p as cartStoreUpdateToErrorState, q as translate, r as getZCountryUrlParam, u as cartStoreSetCheckoutSession, v as stripeStorePrefetchLandedCost, w as cartStoreNextStep, x as stripeStoreHandleInventoryCheck, y as stripeStoreConfirmPayment, z as stripeStoreHandleInventoryRefund, A as stripeStoreReset, B as localizationStoreOnUpdate } from './cart-9de02093.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitGtag, a as paypalInitScript, b as paypalStore } from './paypal-1efe64a0.js';
|
|
4
4
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-44efd080.js';
|
|
5
5
|
import { h as handleFetch, l as log, b as logError, s as sendErrorLog, c as getElapsedTime, d as allLogs, g as getIsTestMode, j as jsonParse, a as getIsStagingMode } from './handleFetch-b4633675.js';
|
|
6
6
|
import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
|
|
@@ -441,7 +441,17 @@ const ZonosCheckout = class {
|
|
|
441
441
|
// if createCartId is provided, use it to build cart. Merchant will provide create a cart from their server side and give the cart id to us.
|
|
442
442
|
if (typeof zonosStore.checkoutSettings.createCartId === 'function') {
|
|
443
443
|
log('"createCartId" is provided, start building cart');
|
|
444
|
-
const
|
|
444
|
+
const cartIdResult = await zonosStore.checkoutSettings.createCartId();
|
|
445
|
+
let cartId;
|
|
446
|
+
if (typeof cartIdResult === 'object') {
|
|
447
|
+
log('object detected, use cartId and prefill address from createCartId');
|
|
448
|
+
cartId = cartIdResult.cartId;
|
|
449
|
+
// set prefill address if provided in createCartId callback result
|
|
450
|
+
this.useShippingDataFromCreateCartId(cartIdResult.shippingData);
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
cartId = cartIdResult;
|
|
454
|
+
}
|
|
445
455
|
window.Zonos.cartId = cartId;
|
|
446
456
|
const cartResult = await setupCartData(cartId);
|
|
447
457
|
const cartData = cartResult === null || cartResult === void 0 ? void 0 : cartResult.cartData;
|
|
@@ -703,6 +713,30 @@ const ZonosCheckout = class {
|
|
|
703
713
|
// apply theme to stripe elements
|
|
704
714
|
void this.applyStripeTheme();
|
|
705
715
|
}
|
|
716
|
+
useShippingDataFromCreateCartId(prefillAddress) {
|
|
717
|
+
// Do only if prefill address is provided
|
|
718
|
+
if (!prefillAddress) {
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
log('shipping data from createCartId result', 'info', Object.entries(prefillAddress));
|
|
722
|
+
const { customerAddress1, customerAddress2, customerCity, customerCountry, customerEmail, customerName, customerPhone, customerState, customerZip, } = prefillAddress;
|
|
723
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
724
|
+
const country = // fallback to selected country code if country is not provided
|
|
725
|
+
customerCountry ||
|
|
726
|
+
getZCountryUrlParam(urlParams) ||
|
|
727
|
+
localizationStore.selectedCountryCode;
|
|
728
|
+
this.applyPrefillAddress({
|
|
729
|
+
customerAddress1,
|
|
730
|
+
customerAddress2,
|
|
731
|
+
customerCity,
|
|
732
|
+
customerCountry: country,
|
|
733
|
+
customerEmail,
|
|
734
|
+
customerName,
|
|
735
|
+
customerPhone,
|
|
736
|
+
customerState,
|
|
737
|
+
customerZip,
|
|
738
|
+
});
|
|
739
|
+
}
|
|
706
740
|
/**
|
|
707
741
|
* Set default address from query param if it's valid
|
|
708
742
|
*/
|
|
@@ -716,17 +750,39 @@ const ZonosCheckout = class {
|
|
|
716
750
|
}
|
|
717
751
|
return value;
|
|
718
752
|
};
|
|
719
|
-
const
|
|
753
|
+
const customerCountry =
|
|
720
754
|
// fallback to selected country code if country is not provided
|
|
721
755
|
getZCountryUrlParam(urlParams) || localizationStore.selectedCountryCode;
|
|
722
|
-
const
|
|
723
|
-
const
|
|
724
|
-
const
|
|
725
|
-
const
|
|
726
|
-
const
|
|
727
|
-
const
|
|
728
|
-
const
|
|
729
|
-
const
|
|
756
|
+
const customerCity = getParam('customerCity');
|
|
757
|
+
const customerEmail = getParam('customerEmail');
|
|
758
|
+
const customerAddress1 = getParam('customerAddress1');
|
|
759
|
+
const customerAddress2 = getParam('customerAddress2');
|
|
760
|
+
const customerName = getParam('customerName');
|
|
761
|
+
const customerPhone = getParam('customerPhone');
|
|
762
|
+
const customerZip = getParam('customerZip');
|
|
763
|
+
const customerState = getParam('customerState');
|
|
764
|
+
this.applyPrefillAddress({
|
|
765
|
+
customerAddress1,
|
|
766
|
+
customerAddress2,
|
|
767
|
+
customerCity,
|
|
768
|
+
customerCountry,
|
|
769
|
+
customerEmail,
|
|
770
|
+
customerName,
|
|
771
|
+
customerPhone,
|
|
772
|
+
customerState,
|
|
773
|
+
customerZip,
|
|
774
|
+
});
|
|
775
|
+
}
|
|
776
|
+
applyPrefillAddress({ customerAddress1, customerAddress2, customerCity, customerCountry, customerEmail, customerName, customerPhone, customerState, customerZip, }) {
|
|
777
|
+
const line1 = customerAddress1 || '';
|
|
778
|
+
const country = customerCountry || '';
|
|
779
|
+
const line2 = customerAddress2 || '';
|
|
780
|
+
const city = customerCity || '';
|
|
781
|
+
const email = customerEmail || '';
|
|
782
|
+
const name = customerName || '';
|
|
783
|
+
const phone = customerPhone || '';
|
|
784
|
+
const postal_code = customerZip || '';
|
|
785
|
+
const state = customerState || '';
|
|
730
786
|
/**
|
|
731
787
|
* If one of the value is null, no need to preset the default address.
|
|
732
788
|
* City and state are optional (they are not always provided for example Puerto Rico)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-d82f06f2.js';
|
|
2
|
-
import { D as isValidSelector, f as stripeStore, E as initLocalizationStore, e as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-
|
|
2
|
+
import { D as isValidSelector, f as stripeStore, E as initLocalizationStore, e as cartStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-9de02093.js';
|
|
3
3
|
import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
|
|
4
4
|
import { h as handleFetch, b as logError, l as log } from './handleFetch-b4633675.js';
|
|
5
5
|
import './isDarkColor-10f38df6.js';
|
|
@@ -254,7 +254,13 @@ const ZonosController = class {
|
|
|
254
254
|
const scripts = template.content.querySelectorAll('script');
|
|
255
255
|
scripts.forEach(script => {
|
|
256
256
|
const scriptToInject = document.createElement('script');
|
|
257
|
-
|
|
257
|
+
if (script.src) {
|
|
258
|
+
scriptToInject.src = script.src;
|
|
259
|
+
scriptToInject.async = script.async;
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
scriptToInject.textContent = script.innerHTML;
|
|
263
|
+
}
|
|
258
264
|
document.body.appendChild(scriptToInject);
|
|
259
265
|
});
|
|
260
266
|
}
|
|
@@ -374,7 +380,7 @@ const ZonosController = class {
|
|
|
374
380
|
zonosStore.organizationName = organizationName;
|
|
375
381
|
}
|
|
376
382
|
render() {
|
|
377
|
-
return h(Host, { key: '
|
|
383
|
+
return h(Host, { key: '001f728dc41550b734fd1b5c9cf15f43c0c4cbdb', class: "zonos--elements" });
|
|
378
384
|
}
|
|
379
385
|
};
|
|
380
386
|
ZonosController.style = ZonosControllerStyle0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-d82f06f2.js';
|
|
2
|
-
import { l as localizationStore } from './cart-
|
|
2
|
+
import { l as localizationStore } from './cart-9de02093.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './handleFetch-b4633675.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-d82f06f2.js';
|
|
2
|
-
import { a as localizationStoreUpdateSelectedCountryCode, q as translate, l as localizationStore } from './cart-
|
|
2
|
+
import { a as localizationStoreUpdateSelectedCountryCode, q as translate, l as localizationStore } from './cart-9de02093.js';
|
|
3
3
|
import { d as zonosStoreFontFamily } from './zonosStore-44efd080.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-10f38df6.js';
|