@zonos/elements 1.3.139 → 1.3.141
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-0070bff2.js → cart-e1b59d03.js} +180 -1
- package/dist/cjs/index.cjs.js +41 -13
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-7c8a99b0.js → paypal-86cc51e4.js} +13 -1
- package/dist/cjs/zonos-address_7.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +49 -7
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -3
- 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-hello-dialog.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-notification_3.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +24 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +4 -2
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +11 -4
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +1 -1
- package/dist/collection/components/store/checkout/paypal.js +14 -1
- package/dist/collection/components/store/checkout/stripe.js +9 -0
- package/dist/collection/components/store/hello/localization.js +3 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +6 -0
- package/dist/collection/components/store/translationStore/strings.base.js +6 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +6 -0
- package/dist/collection/components/store/translationStore/strings.french.js +6 -0
- package/dist/collection/components/store/translationStore/strings.german.js +6 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +6 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +6 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +6 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +6 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +6 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +6 -0
- package/dist/collection/components/utils/api/getCheckoutSession.js +14 -0
- package/dist/collection/components/utils/resetToSelectedTab.js +17 -0
- package/dist/collection/components/utils/validateCheckoutSession.js +39 -0
- package/dist/collection/scripts/_zonosBase.js +34 -6
- package/dist/esm/{cart-e5fb3abe.js → cart-709f053f.js} +181 -3
- package/dist/esm/index.js +41 -13
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-9636651e.js → paypal-77a60c44.js} +13 -1
- package/dist/esm/zonos-address_7.entry.js +1 -1
- package/dist/esm/zonos-cart-items_13.entry.js +49 -7
- package/dist/esm/zonos-checkout.entry.js +5 -3
- 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-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-notification_3.entry.js +2 -2
- package/dist/esm-es5/cart-709f053f.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/paypal-77a60c44.js +17 -0
- 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-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
- package/dist/scripts/index.d.ts +1 -0
- 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-payment/zonos-checkout-payment.d.ts +6 -0
- package/dist/types/components/store/checkout/stripe.d.ts +4 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +6 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +6 -0
- package/dist/types/components/store/translationStore.d.ts +1 -1
- package/dist/types/components/utils/api/getCheckoutSession.d.ts +9 -0
- package/dist/types/components/utils/resetToSelectedTab.d.ts +12 -0
- package/dist/types/components/utils/validateCheckoutSession.d.ts +9 -0
- package/dist/types/scripts/_zonosBase.d.ts +1 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +5 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +112 -0
- package/dist/types/types/generated/graphql.internal.types.ts +102 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-85545d0b.system.entry.js → p-01ad5be8.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0c027d2e.entry.js +1 -0
- package/dist/zonos-elements/{p-d66cbed3.system.entry.js → p-1c4ff7b2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-30f75fc0.system.entry.js → p-22d69480.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3316bcb0.system.entry.js → p-25c7e4fa.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-456d8ac3.system.entry.js → p-289ded20.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f8d7bad6.entry.js → p-35b8dcde.entry.js} +1 -1
- package/dist/zonos-elements/{p-daf800c5.system.entry.js → p-49e4ca08.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d374ef35.system.entry.js → p-64a04391.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6b0aa1bb.system.js +17 -0
- package/dist/zonos-elements/{p-59f7cc80.entry.js → p-8368a79e.entry.js} +1 -1
- package/dist/zonos-elements/{p-e176da08.system.entry.js → p-896d62a4.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8f9affb3.system.entry.js +1 -0
- package/dist/zonos-elements/p-a58731ec.system.js +1 -0
- package/dist/zonos-elements/{p-9138a10d.entry.js → p-ad1d6ea2.entry.js} +1 -1
- package/dist/zonos-elements/p-afffdfc2.js +1 -0
- package/dist/zonos-elements/{p-3f71bac6.entry.js → p-b832ec52.entry.js} +1 -1
- package/dist/zonos-elements/{p-0931f518.entry.js → p-b9efc660.entry.js} +1 -1
- package/dist/zonos-elements/p-be2feba6.entry.js +1 -0
- package/dist/zonos-elements/p-c78dd680.system.js +1 -1
- package/dist/zonos-elements/{p-244fe3a1.system.entry.js → p-cf72603f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d35376d3.js +17 -0
- package/dist/zonos-elements/{p-035571bf.entry.js → p-e6c31531.entry.js} +1 -1
- package/dist/zonos-elements/{p-99190477.entry.js → p-f2867195.entry.js} +1 -1
- package/dist/zonos-elements/{p-d58b6247.entry.js → p-f8ca3e71.entry.js} +1 -1
- package/dist/zonos-elements/p-f8e8b50e.system.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +2 -1
- package/dist/esm-es5/cart-e5fb3abe.js +0 -1
- package/dist/esm-es5/paypal-9636651e.js +0 -17
- package/dist/zonos-elements/p-1037c75b.system.js +0 -1
- package/dist/zonos-elements/p-4e4a45cb.js +0 -17
- package/dist/zonos-elements/p-75048606.system.js +0 -1
- package/dist/zonos-elements/p-79a8c9ef.system.js +0 -17
- package/dist/zonos-elements/p-b7652a21.system.entry.js +0 -1
- package/dist/zonos-elements/p-e3112267.entry.js +0 -1
- package/dist/zonos-elements/p-f64e4276.js +0 -1
- package/dist/zonos-elements/p-f66fbfe8.entry.js +0 -1
|
@@ -177,6 +177,9 @@ const stringsArabic = {
|
|
|
177
177
|
'No countries found': {
|
|
178
178
|
value: 'لم يتم العثور على دول',
|
|
179
179
|
},
|
|
180
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
181
|
+
value: 'لم يتم اختيار تقييم الشحنة. يرجى العودة إلى خطوة "الشحن" واختيار تقييم الشحنة للمتابعة.',
|
|
182
|
+
},
|
|
180
183
|
'No shipping method selected': {
|
|
181
184
|
value: 'لم يتم تحديد طريقة الشحن',
|
|
182
185
|
},
|
|
@@ -372,6 +375,9 @@ const stringsArabic = {
|
|
|
372
375
|
'Unable to check inventory. Please try again.': {
|
|
373
376
|
value: 'تعذر التحقق من المخزون. حاول مرة أخرى.',
|
|
374
377
|
},
|
|
378
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
379
|
+
value: 'غير قادر على استرداد جلسة الدفع في الوقت الحالي. يرجى المحاولة مرة أخرى أو الاتصال بفريق الدعم لدينا.',
|
|
380
|
+
},
|
|
375
381
|
'Update address': {
|
|
376
382
|
value: 'تحديث العنوان',
|
|
377
383
|
},
|
|
@@ -615,6 +621,9 @@ const stringsBase = {
|
|
|
615
621
|
'No countries found': {
|
|
616
622
|
value: 'No countries found',
|
|
617
623
|
},
|
|
624
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
625
|
+
value: 'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.',
|
|
626
|
+
},
|
|
618
627
|
'No shipping method selected': {
|
|
619
628
|
value: 'No shipping method selected',
|
|
620
629
|
},
|
|
@@ -810,6 +819,9 @@ const stringsBase = {
|
|
|
810
819
|
'Unable to check inventory. Please try again.': {
|
|
811
820
|
value: 'Unable to check inventory. Please try again.',
|
|
812
821
|
},
|
|
822
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
823
|
+
value: 'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.',
|
|
824
|
+
},
|
|
813
825
|
'Update address': {
|
|
814
826
|
value: 'Update address',
|
|
815
827
|
},
|
|
@@ -1053,6 +1065,9 @@ const stringsChinese = {
|
|
|
1053
1065
|
'No countries found': {
|
|
1054
1066
|
value: '未找到国家',
|
|
1055
1067
|
},
|
|
1068
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
1069
|
+
value: '未选择运费评级。请返回到"运输"步骤并选择运费评级以继续。',
|
|
1070
|
+
},
|
|
1056
1071
|
'No shipping method selected': {
|
|
1057
1072
|
value: '未选择运输方式',
|
|
1058
1073
|
},
|
|
@@ -1248,6 +1263,9 @@ const stringsChinese = {
|
|
|
1248
1263
|
'Unable to check inventory. Please try again.': {
|
|
1249
1264
|
value: '无法检查库存。请再试一次。',
|
|
1250
1265
|
},
|
|
1266
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
1267
|
+
value: '目前无法检索结账会话。请重试或联系我们的支持团队。',
|
|
1268
|
+
},
|
|
1251
1269
|
'Update address': {
|
|
1252
1270
|
value: '更新地址',
|
|
1253
1271
|
},
|
|
@@ -1491,6 +1509,9 @@ const stringsDanish = {
|
|
|
1491
1509
|
'No countries found': {
|
|
1492
1510
|
value: 'Ingen lande fundet',
|
|
1493
1511
|
},
|
|
1512
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
1513
|
+
value: 'Ingen forsendelsesvurdering valgt. Gå venligst tilbage til "Forsendelse"-trinnet og vælg en forsendelsesvurdering for at fortsætte.',
|
|
1514
|
+
},
|
|
1494
1515
|
'No shipping method selected': {
|
|
1495
1516
|
value: 'Ingen leveringsmetode valgt',
|
|
1496
1517
|
},
|
|
@@ -1686,6 +1707,9 @@ const stringsDanish = {
|
|
|
1686
1707
|
'Unable to check inventory. Please try again.': {
|
|
1687
1708
|
value: 'Kunne ikke tjekke lagerbeholdningen. Prøv venligst igen.',
|
|
1688
1709
|
},
|
|
1710
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
1711
|
+
value: 'Kan ikke hente betalingssessionen i øjeblikket. Prøv venligst igen eller kontakt vores supportteam.',
|
|
1712
|
+
},
|
|
1689
1713
|
'Update address': {
|
|
1690
1714
|
value: 'Opdater adresse',
|
|
1691
1715
|
},
|
|
@@ -1929,6 +1953,9 @@ const stringsDutch = {
|
|
|
1929
1953
|
'No countries found': {
|
|
1930
1954
|
value: 'Geen landen gevonden',
|
|
1931
1955
|
},
|
|
1956
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
1957
|
+
value: 'Geen verzendbeoordeling geselecteerd. Ga alstublieft terug naar de stap "Verzending" en selecteer een verzendbeoordeling om door te gaan.',
|
|
1958
|
+
},
|
|
1932
1959
|
'No shipping method selected': {
|
|
1933
1960
|
value: 'Geen verzendmethode geselecteerd',
|
|
1934
1961
|
},
|
|
@@ -2124,6 +2151,9 @@ const stringsDutch = {
|
|
|
2124
2151
|
'Unable to check inventory. Please try again.': {
|
|
2125
2152
|
value: 'Kon de voorraad niet controleren. Probeer het opnieuw.',
|
|
2126
2153
|
},
|
|
2154
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
2155
|
+
value: 'Kan de betaal sessie momenteel niet ophalen. Probeer het opnieuw of neem contact op met ons ondersteuningsteam.',
|
|
2156
|
+
},
|
|
2127
2157
|
'Update address': {
|
|
2128
2158
|
value: 'Adres bijwerken',
|
|
2129
2159
|
},
|
|
@@ -2367,6 +2397,9 @@ const stringsFrench = {
|
|
|
2367
2397
|
'No countries found': {
|
|
2368
2398
|
value: 'Aucun pays trouvé',
|
|
2369
2399
|
},
|
|
2400
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
2401
|
+
value: `Aucune évaluation d'expédition sélectionnée. Veuillez revenir à l'étape "Expédition" et sélectionner une évaluation d'expédition pour continuer.`,
|
|
2402
|
+
},
|
|
2370
2403
|
'No shipping method selected': {
|
|
2371
2404
|
value: 'Aucune méthode de livraison sélectionnée',
|
|
2372
2405
|
},
|
|
@@ -2562,6 +2595,9 @@ const stringsFrench = {
|
|
|
2562
2595
|
'Unable to check inventory. Please try again.': {
|
|
2563
2596
|
value: "Impossible de vérifier l'inventaire. Veuillez réessayer.",
|
|
2564
2597
|
},
|
|
2598
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
2599
|
+
value: "Impossible de récupérer la session de paiement pour le moment. Veuillez réessayer ou contacter notre équipe d'assistance.",
|
|
2600
|
+
},
|
|
2565
2601
|
'Update address': {
|
|
2566
2602
|
value: "Mettre à jour l'adresse",
|
|
2567
2603
|
},
|
|
@@ -2805,6 +2841,9 @@ const stringsGerman = {
|
|
|
2805
2841
|
'No countries found': {
|
|
2806
2842
|
value: 'Keine Länder gefunden',
|
|
2807
2843
|
},
|
|
2844
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
2845
|
+
value: 'Keine Versandbewertung ausgewählt. Bitte gehen Sie zurück zum Schritt "Versand" und wählen Sie eine Versandbewertung aus, um fortzufahren.',
|
|
2846
|
+
},
|
|
2808
2847
|
'No shipping method selected': {
|
|
2809
2848
|
value: 'Keine Versandart ausgewählt',
|
|
2810
2849
|
},
|
|
@@ -3000,6 +3039,9 @@ const stringsGerman = {
|
|
|
3000
3039
|
'Unable to check inventory. Please try again.': {
|
|
3001
3040
|
value: 'Inventar konnte nicht überprüft werden. Bitte versuchen Sie es erneut.',
|
|
3002
3041
|
},
|
|
3042
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
3043
|
+
value: 'Die Checkout-Sitzung kann momentan nicht abgerufen werden. Bitte versuchen Sie es erneut oder kontaktieren Sie unser Support-Team.',
|
|
3044
|
+
},
|
|
3003
3045
|
'Update address': {
|
|
3004
3046
|
value: 'Adresse aktualisieren',
|
|
3005
3047
|
},
|
|
@@ -3243,6 +3285,9 @@ const stringsHebrew = {
|
|
|
3243
3285
|
'No countries found': {
|
|
3244
3286
|
value: 'לא נמצאו מדינות',
|
|
3245
3287
|
},
|
|
3288
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
3289
|
+
value: 'לא נבחר דירוג משלוח. אנא חזור לשלב "משלוח" ובחר דירוג משלוח כדי להמשיך.',
|
|
3290
|
+
},
|
|
3246
3291
|
'No shipping method selected': {
|
|
3247
3292
|
value: 'לא נבחרה שיטת משלוח',
|
|
3248
3293
|
},
|
|
@@ -3438,6 +3483,9 @@ const stringsHebrew = {
|
|
|
3438
3483
|
'Unable to check inventory. Please try again.': {
|
|
3439
3484
|
value: 'לא ניתן היה לבדוק את המלאי. אנא נסה שוב.',
|
|
3440
3485
|
},
|
|
3486
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
3487
|
+
value: 'לא ניתן לאחזר את מושב התשלום כרגע. אנא נסה שוב או צור קשר עם צוות התמיכה שלנו.',
|
|
3488
|
+
},
|
|
3441
3489
|
'Update address': {
|
|
3442
3490
|
value: 'עדכון כתובת',
|
|
3443
3491
|
},
|
|
@@ -3681,6 +3729,9 @@ const stringsIndonesian = {
|
|
|
3681
3729
|
'No countries found': {
|
|
3682
3730
|
value: 'Tidak ada negara yang ditemukan',
|
|
3683
3731
|
},
|
|
3732
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
3733
|
+
value: 'Tidak ada penilaian pengiriman yang dipilih. Silakan kembali ke langkah "Pengiriman" dan pilih penilaian pengiriman untuk melanjutkan.',
|
|
3734
|
+
},
|
|
3684
3735
|
'No shipping method selected': {
|
|
3685
3736
|
value: 'Tidak ada metode pengiriman yang dipilih',
|
|
3686
3737
|
},
|
|
@@ -3876,6 +3927,9 @@ const stringsIndonesian = {
|
|
|
3876
3927
|
'Unable to check inventory. Please try again.': {
|
|
3877
3928
|
value: 'Tidak dapat memeriksa inventaris. Silakan coba lagi.',
|
|
3878
3929
|
},
|
|
3930
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
3931
|
+
value: 'Tidak dapat mengambil sesi checkout saat ini. Silakan coba lagi atau hubungi tim dukungan kami.',
|
|
3932
|
+
},
|
|
3879
3933
|
'Update address': {
|
|
3880
3934
|
value: 'Perbarui alamat',
|
|
3881
3935
|
},
|
|
@@ -4119,6 +4173,9 @@ const stringsItalian = {
|
|
|
4119
4173
|
'No countries found': {
|
|
4120
4174
|
value: 'Nessun paese trovato',
|
|
4121
4175
|
},
|
|
4176
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
4177
|
+
value: 'Nessuna valutazione di spedizione selezionata. Si prega di tornare al passaggio "Spedizione" e selezionare una valutazione di spedizione per procedere.',
|
|
4178
|
+
},
|
|
4122
4179
|
'No shipping method selected': {
|
|
4123
4180
|
value: 'Nessun metodo di spedizione selezionato',
|
|
4124
4181
|
},
|
|
@@ -4314,6 +4371,9 @@ const stringsItalian = {
|
|
|
4314
4371
|
'Unable to check inventory. Please try again.': {
|
|
4315
4372
|
value: "Impossibile verificare l'inventario. Si prega di riprovare.",
|
|
4316
4373
|
},
|
|
4374
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
4375
|
+
value: 'Impossibile recuperare la sessione di pagamento al momento. Si prega di riprovare o contattare il nostro team di supporto.',
|
|
4376
|
+
},
|
|
4317
4377
|
'Update address': {
|
|
4318
4378
|
value: 'Aggiorna indirizzo',
|
|
4319
4379
|
},
|
|
@@ -4557,6 +4617,9 @@ const stringsJapanese = {
|
|
|
4557
4617
|
'No countries found': {
|
|
4558
4618
|
value: '国が見つかりません',
|
|
4559
4619
|
},
|
|
4620
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
4621
|
+
value: '配送評価が選択されていません。「配送」ステップに戻り、配送評価を選択して続行してください。',
|
|
4622
|
+
},
|
|
4560
4623
|
'No shipping method selected': {
|
|
4561
4624
|
value: '配送方法が選択されていません',
|
|
4562
4625
|
},
|
|
@@ -4752,6 +4815,9 @@ const stringsJapanese = {
|
|
|
4752
4815
|
'Unable to check inventory. Please try again.': {
|
|
4753
4816
|
value: '在庫を確認できません。再試行してください。',
|
|
4754
4817
|
},
|
|
4818
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
4819
|
+
value: '現在、チェックアウトセッションを取得できません。もう一度お試しいただくか、サポートチームにお問い合わせください。',
|
|
4820
|
+
},
|
|
4755
4821
|
'Update address': {
|
|
4756
4822
|
value: '住所を更新',
|
|
4757
4823
|
},
|
|
@@ -4995,6 +5061,9 @@ const stringsKorean = {
|
|
|
4995
5061
|
'No countries found': {
|
|
4996
5062
|
value: '국가를 찾을 수 없습니다',
|
|
4997
5063
|
},
|
|
5064
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
5065
|
+
value: '배송 등급이 선택되지 않았습니다. "배송" 단계로 돌아가서 배송 등급을 선택하여 진행하세요.',
|
|
5066
|
+
},
|
|
4998
5067
|
'No shipping method selected': {
|
|
4999
5068
|
value: '선택된 배송 방법이 없습니다',
|
|
5000
5069
|
},
|
|
@@ -5190,6 +5259,9 @@ const stringsKorean = {
|
|
|
5190
5259
|
'Unable to check inventory. Please try again.': {
|
|
5191
5260
|
value: '재고를 확인할 수 없습니다. 다시 시도해 주세요.',
|
|
5192
5261
|
},
|
|
5262
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
5263
|
+
value: '현재 결제 세션을 가져올 수 없습니다. 다시 시도하거나 지원 팀에 문의하십시오.',
|
|
5264
|
+
},
|
|
5193
5265
|
'Update address': {
|
|
5194
5266
|
value: '주소 업데이트',
|
|
5195
5267
|
},
|
|
@@ -5433,6 +5505,9 @@ const stringsNorwegian = {
|
|
|
5433
5505
|
'No countries found': {
|
|
5434
5506
|
value: 'Ingen land funnet',
|
|
5435
5507
|
},
|
|
5508
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
5509
|
+
value: 'Ingen forsendelsesvurdering valgt. Vennligst gå tilbake til "Frakt"-trinnet og velg en forsendelsesvurdering for å fortsette.',
|
|
5510
|
+
},
|
|
5436
5511
|
'No shipping method selected': {
|
|
5437
5512
|
value: 'Ingen fraktmetode valgt',
|
|
5438
5513
|
},
|
|
@@ -5628,6 +5703,9 @@ const stringsNorwegian = {
|
|
|
5628
5703
|
'Unable to check inventory. Please try again.': {
|
|
5629
5704
|
value: 'Kunne ikke sjekke lagerbeholdningen. Vennligst prøv igjen.',
|
|
5630
5705
|
},
|
|
5706
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
5707
|
+
value: 'Kan ikke hente utsjekkingsøkten for øyeblikket. Vennligst prøv igjen eller kontakt vårt supportteam.',
|
|
5708
|
+
},
|
|
5631
5709
|
'Update address': {
|
|
5632
5710
|
value: 'Oppdater adresse',
|
|
5633
5711
|
},
|
|
@@ -5871,6 +5949,9 @@ const stringsPolish = {
|
|
|
5871
5949
|
'No countries found': {
|
|
5872
5950
|
value: 'Nie znaleziono krajów',
|
|
5873
5951
|
},
|
|
5952
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
5953
|
+
value: 'Nie wybrano oceny przesyłki. Proszę wrócić do kroku "Wysyłka" i wybrać ocenę przesyłki, aby kontynuować.',
|
|
5954
|
+
},
|
|
5874
5955
|
'No shipping method selected': {
|
|
5875
5956
|
value: 'Nie wybrano metody wysyłki',
|
|
5876
5957
|
},
|
|
@@ -6066,6 +6147,9 @@ const stringsPolish = {
|
|
|
6066
6147
|
'Unable to check inventory. Please try again.': {
|
|
6067
6148
|
value: 'Nie można sprawdzić stanu magazynu. Spróbuj ponownie.',
|
|
6068
6149
|
},
|
|
6150
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
6151
|
+
value: 'Nie można pobrać sesji kasy w tej chwili. Proszę spróbować ponownie lub skontaktować się z naszym zespołem wsparcia.',
|
|
6152
|
+
},
|
|
6069
6153
|
'Update address': {
|
|
6070
6154
|
value: 'Zaktualizuj adres',
|
|
6071
6155
|
},
|
|
@@ -6309,6 +6393,9 @@ const stringsPortuguese = {
|
|
|
6309
6393
|
'No countries found': {
|
|
6310
6394
|
value: 'Nenhum país encontrado',
|
|
6311
6395
|
},
|
|
6396
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
6397
|
+
value: 'Nenhuma classificação de envio selecionada. Por favor, volte para a etapa de "Envio" e selecione uma classificação de envio para prosseguir.',
|
|
6398
|
+
},
|
|
6312
6399
|
'No shipping method selected': {
|
|
6313
6400
|
value: 'Nenhum método de envio selecionado',
|
|
6314
6401
|
},
|
|
@@ -6504,6 +6591,9 @@ const stringsPortuguese = {
|
|
|
6504
6591
|
'Unable to check inventory. Please try again.': {
|
|
6505
6592
|
value: 'Não foi possível verificar o inventário. Por favor, tente novamente.',
|
|
6506
6593
|
},
|
|
6594
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
6595
|
+
value: 'Não é possível recuperar a sessão de checkout no momento. Por favor, tente novamente ou entre em contato com nossa equipe de suporte.',
|
|
6596
|
+
},
|
|
6507
6597
|
'Update address': {
|
|
6508
6598
|
value: 'Atualizar endereço',
|
|
6509
6599
|
},
|
|
@@ -6747,6 +6837,9 @@ const stringsRussian = {
|
|
|
6747
6837
|
'No countries found': {
|
|
6748
6838
|
value: 'Страны не найдены',
|
|
6749
6839
|
},
|
|
6840
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
6841
|
+
value: 'Не выбран рейтинг доставки. Пожалуйста, вернитесь к шагу "Доставка" и выберите рейтинг доставки, чтобы продолжить.',
|
|
6842
|
+
},
|
|
6750
6843
|
'No shipping method selected': {
|
|
6751
6844
|
value: 'Метод доставки не выбран',
|
|
6752
6845
|
},
|
|
@@ -6942,6 +7035,9 @@ const stringsRussian = {
|
|
|
6942
7035
|
'Unable to check inventory. Please try again.': {
|
|
6943
7036
|
value: 'Не удалось проверить наличие на складе. Пожалуйста, попробуйте снова.',
|
|
6944
7037
|
},
|
|
7038
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
7039
|
+
value: 'Не удается получить сеанс оформления заказа в данный момент. Пожалуйста, попробуйте еще раз или свяжитесь с нашей службой поддержки.',
|
|
7040
|
+
},
|
|
6945
7041
|
'Update address': {
|
|
6946
7042
|
value: 'Обновить адрес',
|
|
6947
7043
|
},
|
|
@@ -7185,6 +7281,9 @@ const stringsSpanish = {
|
|
|
7185
7281
|
'No countries found': {
|
|
7186
7282
|
value: 'No se encontraron países',
|
|
7187
7283
|
},
|
|
7284
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
7285
|
+
value: 'No se ha seleccionado una calificación de envío. Por favor, regrese al paso de "Envío" y seleccione una calificación de envío para continuar.',
|
|
7286
|
+
},
|
|
7188
7287
|
'No shipping method selected': {
|
|
7189
7288
|
value: 'No se ha seleccionado un método de envío',
|
|
7190
7289
|
},
|
|
@@ -7380,6 +7479,9 @@ const stringsSpanish = {
|
|
|
7380
7479
|
'Unable to check inventory. Please try again.': {
|
|
7381
7480
|
value: 'No se pudo verificar el inventario. Por favor, inténtelo de nuevo.',
|
|
7382
7481
|
},
|
|
7482
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
7483
|
+
value: 'No se puede recuperar la sesión de pago en este momento. Por favor, inténtelo de nuevo o contacte a nuestro equipo de soporte.',
|
|
7484
|
+
},
|
|
7383
7485
|
'Update address': {
|
|
7384
7486
|
value: 'Actualizar dirección',
|
|
7385
7487
|
},
|
|
@@ -7623,6 +7725,9 @@ const stringsSwedish = {
|
|
|
7623
7725
|
'No countries found': {
|
|
7624
7726
|
value: 'Inga länder hittades',
|
|
7625
7727
|
},
|
|
7728
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
7729
|
+
value: 'Ingen fraktbedömning vald. Gå tillbaka till steget "Frakt" och välj en fraktbedömning för att fortsätta.',
|
|
7730
|
+
},
|
|
7626
7731
|
'No shipping method selected': {
|
|
7627
7732
|
value: 'Ingen fraktmetod vald',
|
|
7628
7733
|
},
|
|
@@ -7818,6 +7923,9 @@ const stringsSwedish = {
|
|
|
7818
7923
|
'Unable to check inventory. Please try again.': {
|
|
7819
7924
|
value: 'Det gick inte att kontrollera lagret. Försök igen.',
|
|
7820
7925
|
},
|
|
7926
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
7927
|
+
value: 'Kan inte hämta betalningssessionen just nu. Försök igen eller kontakta vårt supportteam.',
|
|
7928
|
+
},
|
|
7821
7929
|
'Update address': {
|
|
7822
7930
|
value: 'Uppdatera adress',
|
|
7823
7931
|
},
|
|
@@ -8061,6 +8169,9 @@ const stringsTurkish = {
|
|
|
8061
8169
|
'No countries found': {
|
|
8062
8170
|
value: 'Ülke bulunamadı',
|
|
8063
8171
|
},
|
|
8172
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
8173
|
+
value: 'Gönderi derecelendirmesi seçilmedi. Lütfen "Kargo" adımına geri dönün ve devam etmek için bir gönderi derecelendirmesi seçin.',
|
|
8174
|
+
},
|
|
8064
8175
|
'No shipping method selected': {
|
|
8065
8176
|
value: 'Kargo yöntemi seçilmedi',
|
|
8066
8177
|
},
|
|
@@ -8256,6 +8367,9 @@ const stringsTurkish = {
|
|
|
8256
8367
|
'Unable to check inventory. Please try again.': {
|
|
8257
8368
|
value: 'Envanter kontrol edilemedi. Lütfen tekrar deneyin.',
|
|
8258
8369
|
},
|
|
8370
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
8371
|
+
value: 'Şu anda ödeme oturumunu alamıyoruz. Lütfen tekrar deneyin veya destek ekibimizle iletişime geçin.',
|
|
8372
|
+
},
|
|
8259
8373
|
'Update address': {
|
|
8260
8374
|
value: 'Adresi güncelle',
|
|
8261
8375
|
},
|
|
@@ -8499,6 +8613,9 @@ const stringsVietnamese = {
|
|
|
8499
8613
|
'No countries found': {
|
|
8500
8614
|
value: 'Không tìm thấy quốc gia nào',
|
|
8501
8615
|
},
|
|
8616
|
+
'No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.': {
|
|
8617
|
+
value: 'Chưa chọn đánh giá vận chuyển. Vui lòng quay lại bước "Vận chuyển" và chọn đánh giá vận chuyển để tiếp tục.',
|
|
8618
|
+
},
|
|
8502
8619
|
'No shipping method selected': {
|
|
8503
8620
|
value: 'Chưa chọn phương thức vận chuyển',
|
|
8504
8621
|
},
|
|
@@ -8694,6 +8811,9 @@ const stringsVietnamese = {
|
|
|
8694
8811
|
'Unable to check inventory. Please try again.': {
|
|
8695
8812
|
value: 'Không thể kiểm tra hàng tồn kho. Vui lòng thử lại.',
|
|
8696
8813
|
},
|
|
8814
|
+
'Unable to retrieve the checkout session at the moment. Please try again or contact our support team.': {
|
|
8815
|
+
value: 'Không thể truy xuất phiên thanh toán vào lúc này. Vui lòng thử lại hoặc liên hệ với đội ngũ hỗ trợ của chúng tôi.',
|
|
8816
|
+
},
|
|
8697
8817
|
'Update address': {
|
|
8698
8818
|
value: 'Cập nhật địa chỉ',
|
|
8699
8819
|
},
|
|
@@ -9331,6 +9451,7 @@ const getNewLocalization = async () => {
|
|
|
9331
9451
|
startExchangeRateTimeout({ isGuaranteed, maxAge });
|
|
9332
9452
|
};
|
|
9333
9453
|
const getCustomMessages = async () => {
|
|
9454
|
+
handleFetch.log(`Getting custom messages for ${localizationStore.selectedCountryCode}`);
|
|
9334
9455
|
if (!localizationStore.selectedCountryCode || !zonosStore.zonosStore.storeId) {
|
|
9335
9456
|
return;
|
|
9336
9457
|
}
|
|
@@ -9390,7 +9511,6 @@ const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
|
|
|
9390
9511
|
}
|
|
9391
9512
|
localizationStore.targetCurrency = currencyCode;
|
|
9392
9513
|
void getNewLocalization();
|
|
9393
|
-
void getCustomMessages();
|
|
9394
9514
|
// Save the country code to session storage for later use
|
|
9395
9515
|
window.sessionStorage.setItem('zonos--country', selectedCountryCode);
|
|
9396
9516
|
// Update the URL query param with the new country code
|
|
@@ -9451,6 +9571,7 @@ const localizationStoreUpdateSelectedLocale = (newSelectedLocale) => {
|
|
|
9451
9571
|
localizationStore.selectedLocale = newSelectedLocale;
|
|
9452
9572
|
translationStoreUpdateLanguage(newSelectedLocale);
|
|
9453
9573
|
void updateCheckoutSessionLanguage();
|
|
9574
|
+
void getCustomMessages();
|
|
9454
9575
|
};
|
|
9455
9576
|
const initLocalizationStore = async () => {
|
|
9456
9577
|
// all countries from countries.json, shipping zone and localization
|
|
@@ -9466,6 +9587,7 @@ const initLocalizationStore = async () => {
|
|
|
9466
9587
|
initHelloCountryList(allCountries || {});
|
|
9467
9588
|
const { country, locale } = localization;
|
|
9468
9589
|
handleFetch.log(`Country code from localization: ${country}`);
|
|
9590
|
+
handleFetch.log(`Locale from localization: ${locale}`);
|
|
9469
9591
|
// update selected country code in store
|
|
9470
9592
|
localizationStoreUpdateSelectedCountryCode(country);
|
|
9471
9593
|
// use locale from params if it exists, otherwise use locale from localization
|
|
@@ -9914,6 +10036,54 @@ const sortServiceLevelOptionsByAmount = (serviceLevels) => {
|
|
|
9914
10036
|
return sortedServiceLevels;
|
|
9915
10037
|
};
|
|
9916
10038
|
|
|
10039
|
+
const getCheckoutSession = async () => {
|
|
10040
|
+
if (!cartStore.checkoutSessionId) {
|
|
10041
|
+
return {
|
|
10042
|
+
errors: [{ message: 'No checkout session id found' }],
|
|
10043
|
+
json: null,
|
|
10044
|
+
};
|
|
10045
|
+
}
|
|
10046
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
10047
|
+
searchParams.set('checkoutSessionId', cartStore.checkoutSessionId);
|
|
10048
|
+
const { errors, json } = await handleFetch.handleFetch(`/api/zonos-elements/get-checkout-session?${searchParams.toString()}`);
|
|
10049
|
+
return { errors, json };
|
|
10050
|
+
};
|
|
10051
|
+
|
|
10052
|
+
/**
|
|
10053
|
+
* Validate checkout session before confirming payment
|
|
10054
|
+
*/
|
|
10055
|
+
const validateCheckoutSession = async () => {
|
|
10056
|
+
var _a;
|
|
10057
|
+
// get checkout session info
|
|
10058
|
+
const { errors, json } = await getCheckoutSession();
|
|
10059
|
+
if (errors.length || !json) {
|
|
10060
|
+
handleFetch.logError('Failed to retrieve checkout session info before confirming payment ', errors);
|
|
10061
|
+
void handleFetch.sendErrorLog({
|
|
10062
|
+
endpoint: 'validateCheckoutSession',
|
|
10063
|
+
errors: errors.map(error => error.message),
|
|
10064
|
+
metadata: { allLogs: handleFetch.allLogs },
|
|
10065
|
+
});
|
|
10066
|
+
return {
|
|
10067
|
+
errorMessage: translate('Unable to retrieve the checkout session at the moment. Please try again or contact our support team.'),
|
|
10068
|
+
valid: false,
|
|
10069
|
+
};
|
|
10070
|
+
}
|
|
10071
|
+
// Make sure landed cost is found in the checkout session
|
|
10072
|
+
if (!((_a = json.checkoutSession.landedCost) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
10073
|
+
handleFetch.logError('Landed cost is not found in the checkout session before confirming payment.');
|
|
10074
|
+
void handleFetch.sendErrorLog({
|
|
10075
|
+
endpoint: 'validateCheckoutSession',
|
|
10076
|
+
errors: ['No landed cost found before confirming payment'],
|
|
10077
|
+
metadata: { allLogs: handleFetch.allLogs },
|
|
10078
|
+
});
|
|
10079
|
+
return {
|
|
10080
|
+
errorMessage: translate('No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.'),
|
|
10081
|
+
valid: false,
|
|
10082
|
+
};
|
|
10083
|
+
}
|
|
10084
|
+
return { errorMessage: '', valid: true };
|
|
10085
|
+
};
|
|
10086
|
+
|
|
9917
10087
|
const addressRuleStyle = ({ theme, }) => {
|
|
9918
10088
|
const defaultStyle = {
|
|
9919
10089
|
'.AccordionItem': {
|
|
@@ -9986,6 +10156,7 @@ const defaultVariable = ({ borderStyle, theme, }) => {
|
|
|
9986
10156
|
|
|
9987
10157
|
const { onChange: onChange$1, reset: reset$1, state: stripeStore, } = zonosStore.createStore(() => ({
|
|
9988
10158
|
clientSecret: sessionStorage.getItem('zonos--client-secret') || null,
|
|
10159
|
+
customErrorMessage: null,
|
|
9989
10160
|
fetchingLandedCostAbortController: null,
|
|
9990
10161
|
hasPaymentError: false,
|
|
9991
10162
|
isFetchingLandedCost: false,
|
|
@@ -10432,9 +10603,16 @@ const stripeStoreConfirmPayment = async () => {
|
|
|
10432
10603
|
const stripeElements = stripeStore.stripeElements;
|
|
10433
10604
|
const stripe = stripeStore.stripe;
|
|
10434
10605
|
const stripeClientSecret = stripeStore.clientSecret;
|
|
10606
|
+
stripeStore.customErrorMessage = null;
|
|
10435
10607
|
if (!((_b = cartStore.selectedLandedCost) === null || _b === void 0 ? void 0 : _b.landedCost.id)) {
|
|
10436
10608
|
throw new Error('Attempted to confirm the payment when no landed cost is found in store');
|
|
10437
10609
|
}
|
|
10610
|
+
// Check if the checkout session is valid before proceeding
|
|
10611
|
+
const checkoutSessionStatus = await validateCheckoutSession();
|
|
10612
|
+
if (!checkoutSessionStatus.valid) {
|
|
10613
|
+
stripeStore.customErrorMessage = checkoutSessionStatus.errorMessage;
|
|
10614
|
+
throw new Error(checkoutSessionStatus.errorMessage);
|
|
10615
|
+
}
|
|
10438
10616
|
if (stripe &&
|
|
10439
10617
|
stripeElements &&
|
|
10440
10618
|
stripePaymentReady &&
|
|
@@ -11140,3 +11318,4 @@ exports.stripeStoreSaveDomesticShippingSession = stripeStoreSaveDomesticShipping
|
|
|
11140
11318
|
exports.stripeStoreTranslateAddressToLatin = stripeStoreTranslateAddressToLatin;
|
|
11141
11319
|
exports.trackConversionEvent = trackConversionEvent;
|
|
11142
11320
|
exports.translate = translate;
|
|
11321
|
+
exports.validateCheckoutSession = validateCheckoutSession;
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -127,7 +127,7 @@ const getZonosQaUrl = () => {
|
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
129
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
130
|
-
const cdnUrl = "https://v1.3.
|
|
130
|
+
const cdnUrl = "https://v1.3.141.js.zonos.com";
|
|
131
131
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
132
132
|
if (!qaUrl &&
|
|
133
133
|
(cdnUrl.includes('test.') ||
|
|
@@ -311,13 +311,12 @@ const zonosLoadUrl = (() => {
|
|
|
311
311
|
}
|
|
312
312
|
return null;
|
|
313
313
|
})();
|
|
314
|
-
const ZONOS_URL = "https://v1.3.
|
|
315
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
316
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
317
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
318
|
-
const INTER_FONT_URL = 'https://rsms.me';
|
|
314
|
+
const ZONOS_URL = "https://v1.3.141.js.zonos.com";
|
|
315
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.141";
|
|
316
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.141";
|
|
317
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.141";
|
|
319
318
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
320
|
-
const
|
|
319
|
+
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
321
320
|
class Zonos {
|
|
322
321
|
}
|
|
323
322
|
_a = Zonos;
|
|
@@ -329,7 +328,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
329
328
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
330
329
|
Zonos._paypalMockResponse = null;
|
|
331
330
|
Zonos.isBigCommerce = false;
|
|
332
|
-
Zonos.releaseDate = "
|
|
331
|
+
Zonos.releaseDate = "1734130586435";
|
|
333
332
|
Zonos.isLegacyCheckout = false;
|
|
334
333
|
Zonos.domain = typeof window !== 'undefined'
|
|
335
334
|
? // domain that embeds the iframe
|
|
@@ -345,7 +344,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
345
344
|
Zonos.isNpm = true;
|
|
346
345
|
Zonos.zonosQaUrl = null;
|
|
347
346
|
Zonos.zonosQaUrlApi = null;
|
|
348
|
-
Zonos.version = `v${"1.3.
|
|
347
|
+
Zonos.version = `v${"1.3.141"}`;
|
|
349
348
|
Zonos.modeAlerted = false;
|
|
350
349
|
Zonos.cartData = null;
|
|
351
350
|
Zonos.paypal = null;
|
|
@@ -422,6 +421,8 @@ Zonos.init = async (params) => {
|
|
|
422
421
|
document.body.appendChild(hiddenButton);
|
|
423
422
|
}
|
|
424
423
|
handleFetch.log('init zonos');
|
|
424
|
+
// inject custom script for hosted checkout if can find it in metadata
|
|
425
|
+
_a.injectCustomScriptForHostedCheckout();
|
|
425
426
|
// inject zonos cdn
|
|
426
427
|
_a.injectZonosCdn();
|
|
427
428
|
// inject css for zonos elements
|
|
@@ -441,6 +442,33 @@ Zonos.init = async (params) => {
|
|
|
441
442
|
});
|
|
442
443
|
_a.doneInit = true;
|
|
443
444
|
};
|
|
445
|
+
Zonos.injectCustomScriptForHostedCheckout = () => {
|
|
446
|
+
const cartData = _a.cartData;
|
|
447
|
+
const metadata = (cartData === null || cartData === void 0 ? void 0 : cartData.metadata) || [];
|
|
448
|
+
const headerScript = metadata.find(meta => meta.key === 'customHeaderScript');
|
|
449
|
+
const footerScript = metadata.find(meta => meta.key === 'customFooterScript');
|
|
450
|
+
// Only inject the script if checkout is on Zonos hosted checkout and custom script is available
|
|
451
|
+
if (!window.Zonos.isLegacyCheckout || (!headerScript && !footerScript)) {
|
|
452
|
+
handleFetch.log('Skip injecting custom script for hosted checkout', 'info', {
|
|
453
|
+
footerScript,
|
|
454
|
+
headerScript,
|
|
455
|
+
isLegacyCheckout: window.Zonos.isLegacyCheckout,
|
|
456
|
+
});
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
if (headerScript) {
|
|
460
|
+
handleFetch.log('Injecting custom header script');
|
|
461
|
+
const script = document.createElement('script');
|
|
462
|
+
script.textContent = headerScript.value;
|
|
463
|
+
document.head.appendChild(script);
|
|
464
|
+
}
|
|
465
|
+
if (footerScript) {
|
|
466
|
+
handleFetch.log('Injecting custom footer script');
|
|
467
|
+
const script = document.createElement('script');
|
|
468
|
+
script.textContent = footerScript.value;
|
|
469
|
+
document.body.appendChild(script);
|
|
470
|
+
}
|
|
471
|
+
};
|
|
444
472
|
Zonos.displayCurrency = () => {
|
|
445
473
|
const zonosHello = document.querySelector('zonos-hello');
|
|
446
474
|
if (zonosHello) {
|
|
@@ -675,13 +703,13 @@ Zonos.injectZonosCss = () => {
|
|
|
675
703
|
};
|
|
676
704
|
Zonos.injectFonts = () => {
|
|
677
705
|
const findFont = () => {
|
|
678
|
-
const links = document.querySelectorAll(`link[rel="stylesheet"][href^="${
|
|
706
|
+
const links = document.querySelectorAll(`link[rel="stylesheet"][href^="${GOOGLE_FONT_URL}"]`);
|
|
679
707
|
for (let i = 0; i < links.length; i++) {
|
|
680
708
|
const link = links[i];
|
|
681
709
|
if (!link) {
|
|
682
710
|
continue;
|
|
683
711
|
}
|
|
684
|
-
if (
|
|
712
|
+
if (GOOGLE_FONT_REGEX.test(link.href)) {
|
|
685
713
|
continue;
|
|
686
714
|
}
|
|
687
715
|
return link;
|
|
@@ -696,12 +724,12 @@ Zonos.injectFonts = () => {
|
|
|
696
724
|
// inject font css for zonos elements
|
|
697
725
|
const fontPreconnect = document.createElement('link');
|
|
698
726
|
fontPreconnect.rel = 'preconnect';
|
|
699
|
-
fontPreconnect.href =
|
|
727
|
+
fontPreconnect.href = GOOGLE_FONT_URL;
|
|
700
728
|
headOrBody.appendChild(fontPreconnect);
|
|
701
729
|
// inject font css for zonos elements
|
|
702
730
|
const font = document.createElement('link');
|
|
703
731
|
font.rel = 'stylesheet';
|
|
704
|
-
font.href = `${
|
|
732
|
+
font.href = `${GOOGLE_FONT_URL}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`;
|
|
705
733
|
headOrBody.appendChild(font);
|
|
706
734
|
handleFetch.log('Zonos font injected!');
|
|
707
735
|
};
|