@zonos/elements 1.3.229 → 1.3.231
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/{buildCartItemsByTempCart-309fcebf.js → buildCartItemsByTempCart-edddbf4b.js} +1 -0
- package/dist/cjs/{cart-ad82a680.js → cart-9b519566.js} +6 -2
- package/dist/cjs/hasInclusivePrice-12605be9.js +24 -0
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{localization-31e3dfe3.js → localization-38af974b.js} +118 -30
- package/dist/cjs/{paypal-88b5e878.js → paypal-e8fa2302.js} +3 -3
- package/dist/cjs/{placeTestOrder-6aefbf9c.js → placeTestOrder-6388881f.js} +11 -7
- package/dist/cjs/{renderFallback-87c908ad.js → renderFallback-bb2c4bce.js} +2 -2
- package/dist/cjs/{translationStore-b8b25e9d.js → translationStore-f2d5eae9.js} +420 -360
- package/dist/cjs/zonos-address_11.cjs.entry.js +21 -5
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +73 -13
- package/dist/cjs/zonos-checkout.cjs.entry.js +9 -6
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +6 -6
- package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +12 -5
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +9 -6
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +55 -45
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +68 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -1
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +7 -4
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +54 -43
- package/dist/collection/components/main/zonos-controller.js +5 -2
- package/dist/collection/components/store/hello/localization.js +47 -16
- package/dist/collection/components/store/translationStore/strings.arabic.js +21 -18
- package/dist/collection/components/store/translationStore/strings.base.js +21 -18
- package/dist/collection/components/store/translationStore/strings.chinese.js +21 -18
- package/dist/collection/components/store/translationStore/strings.danish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.dutch.js +21 -18
- package/dist/collection/components/store/translationStore/strings.french.js +21 -18
- package/dist/collection/components/store/translationStore/strings.german.js +21 -18
- package/dist/collection/components/store/translationStore/strings.hebrew.js +21 -18
- package/dist/collection/components/store/translationStore/strings.indonesian.js +21 -18
- package/dist/collection/components/store/translationStore/strings.italian.js +21 -18
- package/dist/collection/components/store/translationStore/strings.japanese.js +21 -18
- package/dist/collection/components/store/translationStore/strings.korean.js +21 -18
- package/dist/collection/components/store/translationStore/strings.norwegian.js +21 -18
- package/dist/collection/components/store/translationStore/strings.polish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.portuguese.js +21 -18
- package/dist/collection/components/store/translationStore/strings.russian.js +21 -18
- package/dist/collection/components/store/translationStore/strings.spanish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.swedish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.turkish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +21 -18
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +18 -2
- package/dist/collection/components/utils/api/buildCartItemsByTempCart.js +1 -0
- package/dist/collection/components/utils/api/{getInclusivePricing.js → getInclusivePriceConfigurations.js} +1 -1
- package/dist/collection/components/utils/api/getLocalization.js +2 -5
- package/dist/collection/components/utils/api/getZonosSettings.js +5 -0
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +6 -0
- package/dist/collection/components/utils/checkout/renderCheckoutCurrency.js +10 -5
- package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +4 -1
- package/dist/collection/components/utils/getOverridenZCountry.js +11 -0
- package/dist/collection/components/utils/hasInclusivePrice.js +10 -0
- package/dist/collection/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.js +10 -0
- package/dist/collection/components/utils/hello/currencyConversion/applyInclusivePrice.js +39 -0
- package/dist/collection/components/utils/hello/currencyConversion/calculateInclusivePrice.js +32 -0
- package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +11 -6
- package/dist/collection/constants/key.js +9 -0
- package/dist/collection/types/InclusivePricing.js +1 -0
- package/dist/collection/types/generated/graphql.internal.types.js +87 -3
- package/dist/collection/types/index.js +1 -0
- package/dist/collection/utils/performBlurCurrency.js +38 -5
- package/dist/esm/{buildCartItemsByTempCart-c4488f73.js → buildCartItemsByTempCart-a117f75d.js} +1 -0
- package/dist/esm/{cart-c74f9aaa.js → cart-bc0e1598.js} +6 -2
- package/dist/esm/hasInclusivePrice-706cc09d.js +20 -0
- package/dist/esm/index.js +7 -7
- package/dist/esm/{localization-106476cb.js → localization-53f67640.js} +117 -31
- package/dist/esm/{paypal-bf3a2bdd.js → paypal-3a6a048d.js} +3 -3
- package/dist/esm/{placeTestOrder-891295e8.js → placeTestOrder-917731cf.js} +11 -7
- package/dist/esm/{renderFallback-ce0e238a.js → renderFallback-cd0e40d9.js} +2 -2
- package/dist/esm/{translationStore-766b7521.js → translationStore-d241dcf7.js} +420 -360
- package/dist/esm/zonos-address_11.entry.js +21 -5
- package/dist/esm/zonos-cart-items_13.entry.js +73 -13
- package/dist/esm/zonos-checkout.entry.js +9 -6
- package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
- package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
- package/dist/esm/zonos-collect.entry.js +6 -6
- package/dist/esm/zonos-confirm-dialog_2.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +12 -5
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +9 -6
- package/dist/esm/zonos-empty-state-payment_4.entry.js +4 -4
- package/dist/esm/zonos-hello-dialog.entry.js +55 -45
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm-es5/buildCartItemsByTempCart-a117f75d.js +1 -0
- package/dist/esm-es5/cart-bc0e1598.js +1 -0
- package/dist/esm-es5/hasInclusivePrice-706cc09d.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/localization-53f67640.js +1 -0
- package/dist/esm-es5/{paypal-bf3a2bdd.js → paypal-3a6a048d.js} +1 -1
- package/dist/esm-es5/placeTestOrder-917731cf.js +1 -0
- package/dist/esm-es5/{renderFallback-ce0e238a.js → renderFallback-cd0e40d9.js} +1 -1
- package/dist/esm-es5/translationStore-d241dcf7.js +1 -0
- package/dist/esm-es5/zonos-address_11.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-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-confirm-dialog_2.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-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/blurCurrencyOnInit.js +1 -1
- package/dist/scripts/index.d.ts +39 -6
- 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-cart-subtotal/zonos-cart-subtotal.d.ts +2 -0
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +1 -1
- package/dist/types/components/store/checkout/cart.d.ts +3 -0
- package/dist/types/components/store/hello/localization.d.ts +14 -3
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.base.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.danish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.french.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.german.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.italian.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.korean.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.polish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.russian.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +18 -15
- package/dist/types/components/utils/api/getInclusivePriceConfigurations.d.ts +2 -0
- package/dist/types/components/utils/getOverridenZCountry.d.ts +5 -0
- package/dist/types/components/utils/hasInclusivePrice.d.ts +1 -0
- package/dist/types/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.d.ts +1 -0
- package/dist/types/components/utils/hello/currencyConversion/applyInclusivePrice.d.ts +1 -0
- package/dist/types/components/utils/hello/currencyConversion/calculateInclusivePrice.d.ts +27 -0
- package/dist/types/constants/key.d.ts +9 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +5 -0
- package/dist/types/types/InclusivePricing.d.ts +13 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +1 -0
- package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +6 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +192 -51
- package/dist/types/types/generated/graphql.internal.types.ts +229 -50
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +2 -0
- package/dist/types/utils/performBlurCurrency.d.ts +12 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-c89e9d56.system.js → p-0047fecf.system.js} +1 -1
- package/dist/zonos-elements/{p-bd373de0.system.entry.js → p-0bc8e55c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-964a4d85.js → p-2008df67.js} +1 -1
- package/dist/zonos-elements/{p-2db90c99.system.entry.js → p-22338b4a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3d2925c5.system.entry.js → p-2eaa5013.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-288f5a5b.system.entry.js → p-304bdbc2.system.entry.js} +1 -1
- package/dist/zonos-elements/p-30981f80.entry.js +1 -0
- package/dist/zonos-elements/{p-69451a50.system.js → p-398d9022.system.js} +1 -1
- package/dist/zonos-elements/p-3a242dfc.system.js +1 -0
- package/dist/zonos-elements/{p-5608ac9d.entry.js → p-3eda5c2c.entry.js} +1 -1
- package/dist/zonos-elements/p-3f0ca5f9.js +1 -0
- package/dist/zonos-elements/{p-23f6a2fb.system.entry.js → p-3f35b8b1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-de984173.system.js → p-419c292c.system.js} +1 -1
- package/dist/zonos-elements/{p-7a97e1cf.system.entry.js → p-4697f061.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4f5be8f0.entry.js +1 -0
- package/dist/zonos-elements/p-516a9666.system.js +1 -0
- package/dist/zonos-elements/p-55c6ff14.system.entry.js +1 -0
- package/dist/zonos-elements/p-6d563f33.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9c728733.system.js → p-7730879e.system.js} +1 -1
- package/dist/zonos-elements/p-7920d79c.system.js +1 -0
- package/dist/zonos-elements/p-7c96a585.js +1 -0
- package/dist/zonos-elements/p-81b357f7.system.js +1 -1
- package/dist/zonos-elements/{p-29c80a34.js → p-83666056.js} +1 -1
- package/dist/zonos-elements/{p-2b84039a.entry.js → p-91fa43ef.entry.js} +1 -1
- package/dist/zonos-elements/p-9a444a82.system.entry.js +1 -0
- package/dist/zonos-elements/p-9bdad585.system.entry.js +1 -0
- package/dist/zonos-elements/p-abc0fb80.js +1 -0
- package/dist/zonos-elements/{p-b0a75761.entry.js → p-ac26a931.entry.js} +1 -1
- package/dist/zonos-elements/p-bb707dfd.system.js +1 -0
- package/dist/zonos-elements/{p-10894d36.entry.js → p-bc963b03.entry.js} +1 -1
- package/dist/zonos-elements/p-c0e080e3.js +1 -0
- package/dist/zonos-elements/p-c20429ea.entry.js +1 -0
- package/dist/zonos-elements/p-c28da00e.entry.js +1 -0
- package/dist/zonos-elements/p-c9be03e0.entry.js +1 -0
- package/dist/zonos-elements/{p-6c8e4f01.system.entry.js → p-cb70de13.system.entry.js} +1 -1
- package/dist/zonos-elements/p-cec35a21.entry.js +1 -0
- package/dist/zonos-elements/{p-cf56b990.entry.js → p-d15cd138.entry.js} +1 -1
- package/dist/zonos-elements/{p-6f1024de.system.entry.js → p-d852d6da.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d9486c57.entry.js +1 -0
- package/dist/zonos-elements/p-db73c11a.entry.js +1 -0
- package/dist/zonos-elements/{p-203c7fda.js → p-e27a9450.js} +1 -1
- package/dist/zonos-elements/{p-76f924b3.entry.js → p-ede9e968.entry.js} +1 -1
- package/dist/zonos-elements/p-ee8fcde6.js +1 -0
- package/dist/zonos-elements/p-f688d7a4.system.js +1 -0
- package/dist/zonos-elements/{p-236e0144.system.entry.js → p-ff1722d0.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ff522088.system.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +3 -3
- package/dist/esm-es5/buildCartItemsByTempCart-c4488f73.js +0 -1
- package/dist/esm-es5/cart-c74f9aaa.js +0 -1
- package/dist/esm-es5/localization-106476cb.js +0 -1
- package/dist/esm-es5/placeTestOrder-891295e8.js +0 -1
- package/dist/esm-es5/translationStore-766b7521.js +0 -1
- package/dist/types/components/utils/api/getInclusivePricing.d.ts +0 -6
- package/dist/zonos-elements/p-053a042e.entry.js +0 -1
- package/dist/zonos-elements/p-0d3767ec.entry.js +0 -1
- package/dist/zonos-elements/p-1d15662c.js +0 -1
- package/dist/zonos-elements/p-21b251f0.system.entry.js +0 -1
- package/dist/zonos-elements/p-225a61c4.system.entry.js +0 -1
- package/dist/zonos-elements/p-462f8857.entry.js +0 -1
- package/dist/zonos-elements/p-57ee34aa.system.entry.js +0 -1
- package/dist/zonos-elements/p-595668d7.system.js +0 -1
- package/dist/zonos-elements/p-62803534.entry.js +0 -1
- package/dist/zonos-elements/p-6497ce22.entry.js +0 -1
- package/dist/zonos-elements/p-65db3219.entry.js +0 -1
- package/dist/zonos-elements/p-94853366.system.entry.js +0 -1
- package/dist/zonos-elements/p-9972941a.entry.js +0 -1
- package/dist/zonos-elements/p-ad7be556.system.entry.js +0 -1
- package/dist/zonos-elements/p-b4fe3604.system.js +0 -1
- package/dist/zonos-elements/p-b8293509.js +0 -1
- package/dist/zonos-elements/p-c3c3cd98.js +0 -1
- package/dist/zonos-elements/p-cdaf52f4.system.js +0 -1
- package/dist/zonos-elements/p-cef1e888.system.js +0 -1
- package/dist/zonos-elements/p-eea0d8af.js +0 -1
- package/dist/zonos-elements/p-f4085c23.entry.js +0 -1
|
@@ -194,6 +194,12 @@ export const stringsVietnamese = {
|
|
|
194
194
|
Duties: {
|
|
195
195
|
value: 'Nhiệm vụ',
|
|
196
196
|
},
|
|
197
|
+
'Duties and fees': {
|
|
198
|
+
value: 'Thuế và phí',
|
|
199
|
+
},
|
|
200
|
+
'Duties and fees included': {
|
|
201
|
+
value: 'Đã bao gồm thuế và phí',
|
|
202
|
+
},
|
|
197
203
|
'Duties and taxes will be applied to items and shipping.': {
|
|
198
204
|
value: 'Thuế và phí sẽ được áp dụng cho hàng hóa và vận chuyển.',
|
|
199
205
|
},
|
|
@@ -431,26 +437,14 @@ export const stringsVietnamese = {
|
|
|
431
437
|
'Proceed with order': {
|
|
432
438
|
value: 'Tiếp tục với đơn hàng',
|
|
433
439
|
},
|
|
434
|
-
'Product prices already include duties and fees. No additional duties or fees will be added at checkout
|
|
435
|
-
value: 'Giá sản phẩm đã bao gồm thuế và phí. Không có thuế hoặc phí bổ sung sẽ được thêm vào khi thanh toán
|
|
436
|
-
},
|
|
437
|
-
'Product prices already include duties and taxes. No additional duties or taxes will be added at checkout, with rare exceptions.': {
|
|
438
|
-
value: 'Giá sản phẩm đã bao gồm thuế và phí. Không có thuế hoặc phí bổ sung nào sẽ được thêm vào khi thanh toán, ngoại trừ một số trường hợp hiếm hoi.',
|
|
439
|
-
},
|
|
440
|
-
'Product prices already include duties, taxes, and fees. No additional duties, taxes, or fees will be added at checkout, with rare exceptions.': {
|
|
441
|
-
value: 'Giá sản phẩm đã bao gồm thuế, phí và lệ phí. Không có thuế, phí hoặc lệ phí bổ sung nào sẽ được thêm vào khi thanh toán, ngoại trừ những trường hợp hiếm hoi.',
|
|
440
|
+
'Product prices already include duties and fees. No additional duties or fees will be added at checkout.': {
|
|
441
|
+
value: 'Giá sản phẩm đã bao gồm thuế và phí. Không có thuế hoặc phí bổ sung nào sẽ được thêm vào khi thanh toán.',
|
|
442
442
|
},
|
|
443
|
-
'Product prices already include duties. No additional duties will be added at checkout
|
|
444
|
-
value: 'Giá sản phẩm đã bao gồm thu
|
|
443
|
+
'Product prices already include duties, taxes and fees. No additional duties, taxes, or fees will be added at checkout.': {
|
|
444
|
+
value: 'Giá sản phẩm đã bao gồm thuế, phí và lệ phí. Không có thuế, phí hoặc lệ phí bổ sung nào sẽ được thêm vào khi thanh toán.',
|
|
445
445
|
},
|
|
446
|
-
'Product prices already include
|
|
447
|
-
value: 'Giá sản phẩm đã bao gồm
|
|
448
|
-
},
|
|
449
|
-
'Product prices already include taxes and fees. No additional taxes or fees will be added at checkout, with rare exceptions.': {
|
|
450
|
-
value: 'Giá sản phẩm đã bao gồm thuế và phí. Không có thêm thuế hoặc phí nào sẽ được thêm vào khi thanh toán, ngoại trừ những trường hợp hiếm hoi.',
|
|
451
|
-
},
|
|
452
|
-
'Product prices already include taxes. No additional taxes will be added at checkout, with rare exceptions.': {
|
|
453
|
-
value: 'Giá sản phẩm đã bao gồm thuế. Không có thuế bổ sung sẽ được thêm vào khi thanh toán, ngoại trừ một số trường hợp hiếm hoi.',
|
|
446
|
+
'Product prices already include taxes. No additional taxes will be added at checkout.': {
|
|
447
|
+
value: 'Giá sản phẩm đã bao gồm thuế. Không có thuế bổ sung nào sẽ được thêm vào khi thanh toán.',
|
|
454
448
|
},
|
|
455
449
|
Province: {
|
|
456
450
|
value: 'Tỉnh',
|
|
@@ -575,9 +569,15 @@ export const stringsVietnamese = {
|
|
|
575
569
|
'Taxes and fees': {
|
|
576
570
|
value: 'Thuế và phí',
|
|
577
571
|
},
|
|
572
|
+
'Taxes included': {
|
|
573
|
+
value: 'Đã bao gồm thuế',
|
|
574
|
+
},
|
|
578
575
|
'Taxes will apply to all orders.': {
|
|
579
576
|
value: 'Thuế sẽ áp dụng cho tất cả các đơn hàng.',
|
|
580
577
|
},
|
|
578
|
+
'Taxes, duties, and fees included': {
|
|
579
|
+
value: 'Thuế, phí và lệ phí đã bao gồm',
|
|
580
|
+
},
|
|
581
581
|
'Test cards': {
|
|
582
582
|
value: 'Thẻ kiểm tra',
|
|
583
583
|
},
|
|
@@ -599,6 +599,9 @@ export const stringsVietnamese = {
|
|
|
599
599
|
'The low-value GST law passed July 1st, 2018 applies to this retailer.': {
|
|
600
600
|
value: 'Luật GST giá trị thấp được thông qua ngày 1 tháng 7 năm 2018 áp dụng cho nhà bán lẻ này.',
|
|
601
601
|
},
|
|
602
|
+
'The purchase price covers duties, taxes and fees.': {
|
|
603
|
+
value: 'Giá mua bao gồm thuế, phí và lệ phí.',
|
|
604
|
+
},
|
|
602
605
|
"There's been an error creating your checkout session. Please reload and try again or contact support if the error persists": {
|
|
603
606
|
value: 'Đã xảy ra lỗi khi tạo phiên thanh toán của bạn. Vui lòng tải lại và thử lại hoặc liên hệ với hỗ trợ nếu lỗi vẫn tiếp tục',
|
|
604
607
|
},
|
package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js
CHANGED
|
@@ -8,7 +8,7 @@ import { log } from "../../utils/logging/log";
|
|
|
8
8
|
import { logError } from "../../utils/logging/logError";
|
|
9
9
|
import { sendErrorLog } from "../../utils/logging/sendErrorLog";
|
|
10
10
|
import { validateEmailValue } from "../../utils/validateEmailValue";
|
|
11
|
-
const MAX_RETRIES_INITIALIZE_LINK =
|
|
11
|
+
const MAX_RETRIES_INITIALIZE_LINK = 31;
|
|
12
12
|
/**
|
|
13
13
|
* This component is a wrapper for the stripe authentication element that would render default style object
|
|
14
14
|
*/
|
|
@@ -85,6 +85,22 @@ export class ZonosLinkAuthentication {
|
|
|
85
85
|
});
|
|
86
86
|
stripeStore.stripeLinkElement = linkAuthenticationElement;
|
|
87
87
|
this.retriesInitializeLink = 0;
|
|
88
|
+
// 10 seconds
|
|
89
|
+
if (this.retriesInitializeLink > 11) {
|
|
90
|
+
log('Stripe link element initialized', 'info', {
|
|
91
|
+
retriesInitializeLink: this.retriesInitializeLink,
|
|
92
|
+
stripe: this.stripe,
|
|
93
|
+
});
|
|
94
|
+
void sendErrorLog({
|
|
95
|
+
endpoint: 'stripe-link-authentication-init-long-running',
|
|
96
|
+
errors: [
|
|
97
|
+
'Stripe link element initialized after 20 retries - 10 seconds',
|
|
98
|
+
],
|
|
99
|
+
metadata: {
|
|
100
|
+
retriesInitializeLink: this.retriesInitializeLink,
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
}
|
|
88
104
|
}
|
|
89
105
|
catch (error) {
|
|
90
106
|
if (error instanceof Error) {
|
|
@@ -99,7 +115,7 @@ export class ZonosLinkAuthentication {
|
|
|
99
115
|
endpoint: 'stripe-link-authentication-init-error',
|
|
100
116
|
errors: [error.message],
|
|
101
117
|
metadata: {
|
|
102
|
-
|
|
118
|
+
retriesInitializeLink: this.retriesInitializeLink,
|
|
103
119
|
},
|
|
104
120
|
});
|
|
105
121
|
}
|
|
@@ -12,6 +12,7 @@ export const buildCartItemsByTempCart = (tempCartData) => {
|
|
|
12
12
|
imageUrl: item.imageUrl || '',
|
|
13
13
|
itemType: item.itemType || 'PHYSICAL_GOOD',
|
|
14
14
|
measurements: item.measurements || [],
|
|
15
|
+
metadata: item.metadata || [],
|
|
15
16
|
name: item.name || item.description || '',
|
|
16
17
|
productId: item.productId || '',
|
|
17
18
|
quantity: item.quantity || 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { handleFetch } from "../handleFetch";
|
|
2
2
|
import { logError } from "../logging/logError";
|
|
3
|
-
export const
|
|
3
|
+
export const getInclusivePriceConfigurations = async (countryCode) => {
|
|
4
4
|
var _a;
|
|
5
5
|
if (!countryCode) {
|
|
6
6
|
return null;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
+
import { getOverridenZCountry } from "../getOverridenZCountry";
|
|
1
2
|
import { handleFetch } from "../handleFetch";
|
|
2
|
-
import { getZCountryUrlParam } from "../hello/getZCountryUrlParam";
|
|
3
3
|
export const getLocalization = async () => {
|
|
4
4
|
try {
|
|
5
|
-
const
|
|
6
|
-
// load and use country from session storage when zCountry query param is not present
|
|
7
|
-
const countryLoadedSession = window.sessionStorage.getItem('zonos--country');
|
|
8
|
-
const zCountry = getZCountryUrlParam(currentUrl.searchParams) || countryLoadedSession;
|
|
5
|
+
const zCountry = getOverridenZCountry();
|
|
9
6
|
const searchParams = new URLSearchParams();
|
|
10
7
|
if (zCountry) {
|
|
11
8
|
searchParams.set('zCountry', zCountry);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getGenericSettingsOverride } from "./getGenericSettingsOverride";
|
|
2
|
+
import { getOverridenZCountry } from "../getOverridenZCountry";
|
|
2
3
|
import { handleFetch } from "../handleFetch";
|
|
3
4
|
import { log } from "../logging/log";
|
|
4
5
|
import { logError } from "../logging/logError";
|
|
@@ -16,6 +17,10 @@ export const getZonosSettings = async () => {
|
|
|
16
17
|
if (overrideSettings.overrideShouldEnabledCustomAddress) {
|
|
17
18
|
params.set('overrideShouldEnabledCustomAddress', overrideSettings.overrideShouldEnabledCustomAddress);
|
|
18
19
|
}
|
|
20
|
+
const zCountry = getOverridenZCountry();
|
|
21
|
+
if (zCountry) {
|
|
22
|
+
params.set('zCountry', zCountry);
|
|
23
|
+
}
|
|
19
24
|
const { errors, json, zonosMode } = await handleFetch(`/api/zonos-elements/zonos-settings?${params.toString()}`);
|
|
20
25
|
if (errors.length) {
|
|
21
26
|
logError(`Error occurred when getting zonos settings. If this is not an unauthorized error, it will use user settings or default settings`);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { cartStore } from "../../store/checkout/cart";
|
|
2
2
|
import { stripeStore } from "../../store/checkout/stripe";
|
|
3
|
+
import { localizationStore } from "../../store/hello/localization";
|
|
3
4
|
import { storageStore } from "../../store/storageStore";
|
|
4
5
|
import { extractName } from "../extractName";
|
|
6
|
+
import { getOverridenZCountry } from "../getOverridenZCountry";
|
|
5
7
|
import { log } from "../logging/log";
|
|
6
8
|
/**
|
|
7
9
|
* Extract value from translated object
|
|
@@ -52,6 +54,7 @@ export const prepCartCalculateLandedCost = (cartId) => {
|
|
|
52
54
|
const { firstName: billingFirstName, lastName: billingLastName } = extractName({
|
|
53
55
|
name: translatedBillingAddress.name,
|
|
54
56
|
});
|
|
57
|
+
const checkoutSessionCountry = getOverridenZCountry() || 'US';
|
|
55
58
|
return {
|
|
56
59
|
billingAddress: {
|
|
57
60
|
addressLine1: translatedBillingAddress.line1,
|
|
@@ -71,6 +74,9 @@ export const prepCartCalculateLandedCost = (cartId) => {
|
|
|
71
74
|
// Use the first item's currency code
|
|
72
75
|
cartCurrencyCode: (_a = cartStore.items[0]) === null || _a === void 0 ? void 0 : _a.currencyCode,
|
|
73
76
|
cartId,
|
|
77
|
+
checkoutSessionCountry: checkoutSessionCountry ||
|
|
78
|
+
localizationStore.selectedCountryCode ||
|
|
79
|
+
undefined,
|
|
74
80
|
checkoutSessionId: storageStore.checkoutSessionId || '',
|
|
75
81
|
contact: {
|
|
76
82
|
companyName: stripeStore.companyName,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cartStore } from "../../store/checkout/cart";
|
|
2
2
|
import { getDisplayCurrency } from "./getDisplayCurrency";
|
|
3
|
+
import { applyInclusiveEffectiveRate } from "../hello/currencyConversion/applyInclusiveEffectiveRate";
|
|
3
4
|
import { currencyFormat } from "../hello/currencyConversion/currencyFormat";
|
|
4
5
|
/**
|
|
5
6
|
* Unified currency rendering for checkout amounts.
|
|
@@ -8,12 +9,16 @@ import { currencyFormat } from "../hello/currencyConversion/currencyFormat";
|
|
|
8
9
|
export const renderCheckoutCurrency = ({ amount, isForeign }) => {
|
|
9
10
|
var _a, _b;
|
|
10
11
|
const targetRate = ((_a = cartStore.exchangeRate) === null || _a === void 0 ? void 0 : _a.rate) || 1;
|
|
12
|
+
// If the amount already in foreign currency, no need to apply the inclusive effective rate since it's already has the inclusive effective rate applied
|
|
13
|
+
const appliedAmount = isForeign
|
|
14
|
+
? amount
|
|
15
|
+
: applyInclusiveEffectiveRate(amount);
|
|
11
16
|
const presentmentCurrency = cartStore.currency;
|
|
12
17
|
const itemCurrency = (_b = cartStore.items[0]) === null || _b === void 0 ? void 0 : _b.currencyCode;
|
|
13
18
|
// If the item currency is the same as the presentment currency, we can just return the amount in the presentment currency in the same format
|
|
14
19
|
if (itemCurrency === presentmentCurrency) {
|
|
15
20
|
return currencyFormat({
|
|
16
|
-
amount,
|
|
21
|
+
amount: appliedAmount,
|
|
17
22
|
currency: presentmentCurrency,
|
|
18
23
|
});
|
|
19
24
|
}
|
|
@@ -22,8 +27,8 @@ export const renderCheckoutCurrency = ({ amount, isForeign }) => {
|
|
|
22
27
|
if (isForeign) {
|
|
23
28
|
// Amount is in foreign currency, divide by the rate to convert it to the base currency if displaying in base currency
|
|
24
29
|
const displayAmount = shouldDisplayBaseCurrency
|
|
25
|
-
?
|
|
26
|
-
:
|
|
30
|
+
? appliedAmount / targetRate
|
|
31
|
+
: appliedAmount;
|
|
27
32
|
return currencyFormat({
|
|
28
33
|
amount: displayAmount,
|
|
29
34
|
currency: displayCurrency,
|
|
@@ -31,8 +36,8 @@ export const renderCheckoutCurrency = ({ amount, isForeign }) => {
|
|
|
31
36
|
}
|
|
32
37
|
// Amount is already in base currency, need to multiply rate to convert to foreign currency if display in foreign currency
|
|
33
38
|
const displayAmount = shouldDisplayBaseCurrency
|
|
34
|
-
?
|
|
35
|
-
:
|
|
39
|
+
? appliedAmount
|
|
40
|
+
: appliedAmount * targetRate;
|
|
36
41
|
return currencyFormat({
|
|
37
42
|
amount: displayAmount,
|
|
38
43
|
currency: displayCurrency,
|
|
@@ -44,7 +44,10 @@ export const watchBigcommerceDomesticCheckout = ({ domesticRedirectedBtnSelector
|
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
// update the country code in localization store and check if it's shippable
|
|
47
|
-
localizationStoreUpdateSelectedCountryCode(
|
|
47
|
+
localizationStoreUpdateSelectedCountryCode({
|
|
48
|
+
isInitializing: false,
|
|
49
|
+
newSelectedCountryCode: shippingCountry,
|
|
50
|
+
});
|
|
48
51
|
// do nothing if the country is still domestic
|
|
49
52
|
if (!isShippableCountry(false)) {
|
|
50
53
|
// cleanup the domestic shipping session if it's domestic because we will open the intl checkout after redirecting
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { getZCountryUrlParam } from "./hello/getZCountryUrlParam";
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve the zCountry from the URL or session storage.
|
|
4
|
+
*/
|
|
5
|
+
export const getOverridenZCountry = () => {
|
|
6
|
+
const currentUrl = new URL(window.location.href);
|
|
7
|
+
// load and use country from session storage when zCountry query param is not present
|
|
8
|
+
const countryLoadedSession = window.sessionStorage.getItem('zonos--country');
|
|
9
|
+
const zCountry = getZCountryUrlParam(currentUrl.searchParams) || countryLoadedSession;
|
|
10
|
+
return zCountry;
|
|
11
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { localizationStore } from "../store/hello/localization";
|
|
2
|
+
import { DUTY_KEY, TAXES_KEY } from "../../constants/key";
|
|
3
|
+
export const hasInclusivePrice = () => {
|
|
4
|
+
var _a;
|
|
5
|
+
return (_a = localizationStore.inclusivePricingConfigurations) === null || _a === void 0 ? void 0 : _a.some(x => {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
return ((_a = x.configurations[DUTY_KEY]) === null || _a === void 0 ? void 0 : _a.status) === 'ENABLED' ||
|
|
8
|
+
((_b = x.configurations[TAXES_KEY]) === null || _b === void 0 ? void 0 : _b.status) === 'ENABLED';
|
|
9
|
+
});
|
|
10
|
+
};
|
package/dist/collection/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { localizationStore } from "../../../store/hello/localization";
|
|
2
|
+
export const applyInclusiveEffectiveRate = (amount) => {
|
|
3
|
+
const inclusivePrice = localizationStore.inclusivePricingConfigurations.find(x => x.shipToCountry === localizationStore.selectedCountryCode);
|
|
4
|
+
if (!inclusivePrice) {
|
|
5
|
+
return amount;
|
|
6
|
+
}
|
|
7
|
+
const effectiveRate = inclusivePrice.effectiveRate;
|
|
8
|
+
// Just multiply the amount by the effective rate to get the new amount for inclusive pricing
|
|
9
|
+
return amount * (1 + effectiveRate);
|
|
10
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { localizationStore } from "../../../store/hello/localization";
|
|
2
|
+
import { calculateInclusivePrice } from "./calculateInclusivePrice";
|
|
3
|
+
import { DUTY_KEY, NON_ZONOS_FEE_KEY, TAXES_KEY, ZONOS_FEE_KEY, } from "../../../../constants/key";
|
|
4
|
+
export const applyInclusivePrice = (amount) => {
|
|
5
|
+
const inclusivePrice = localizationStore.inclusivePricingConfigurations.find(x => x.shipToCountry === localizationStore.selectedCountryCode);
|
|
6
|
+
if (!inclusivePrice) {
|
|
7
|
+
return amount;
|
|
8
|
+
}
|
|
9
|
+
const dutyConfiguration = inclusivePrice.configurations[DUTY_KEY] || {
|
|
10
|
+
rate: 0,
|
|
11
|
+
status: 'DISABLED',
|
|
12
|
+
};
|
|
13
|
+
const taxConfiguration = inclusivePrice.configurations[TAXES_KEY] || {
|
|
14
|
+
rate: 0,
|
|
15
|
+
status: 'DISABLED',
|
|
16
|
+
};
|
|
17
|
+
const nonZonosFeeConfiguration = inclusivePrice.configurations[NON_ZONOS_FEE_KEY] || {
|
|
18
|
+
rate: 0,
|
|
19
|
+
status: 'DISABLED',
|
|
20
|
+
};
|
|
21
|
+
const zonosFeeConfiguration = inclusivePrice.configurations[ZONOS_FEE_KEY] || {
|
|
22
|
+
rate: 0,
|
|
23
|
+
status: 'DISABLED',
|
|
24
|
+
};
|
|
25
|
+
// Only use the rate if the configuration is enabled
|
|
26
|
+
const dutyRate = dutyConfiguration.status === 'ENABLED' ? dutyConfiguration.rate : 0;
|
|
27
|
+
const taxRate = taxConfiguration.status === 'ENABLED' ? taxConfiguration.rate : 0;
|
|
28
|
+
const nonZonosFeeRate = nonZonosFeeConfiguration.status === 'ENABLED'
|
|
29
|
+
? nonZonosFeeConfiguration.rate
|
|
30
|
+
: 0;
|
|
31
|
+
const zonosFeeRate = zonosFeeConfiguration.status === 'ENABLED' ? zonosFeeConfiguration.rate : 0;
|
|
32
|
+
return calculateInclusivePrice({
|
|
33
|
+
amount,
|
|
34
|
+
dutyBuffer: dutyRate,
|
|
35
|
+
nonZonosFee: nonZonosFeeRate,
|
|
36
|
+
taxBuffer: taxRate,
|
|
37
|
+
zonosFee: zonosFeeRate,
|
|
38
|
+
});
|
|
39
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base item: $10
|
|
3
|
+
* Duty: 10%
|
|
4
|
+
* Taxes: 5%
|
|
5
|
+
* Zonos Fee: 14%
|
|
6
|
+
* Non-Zonos Fee: 7%
|
|
7
|
+
*
|
|
8
|
+
* Duty: $10 * 10% = $1
|
|
9
|
+
* Taxes: ($10 + $1) * 5% = $0.55
|
|
10
|
+
* Non-Zonos Fee: $10 * 7% = $0.7
|
|
11
|
+
* Zonos Fee: ($1 + $0.55 + $0.7) * 14% = $0.315
|
|
12
|
+
* Total: $10 + $1 + $0.55 + $0.7 + $0.315 = $12.565
|
|
13
|
+
*
|
|
14
|
+
* The calculation is performed as follows:
|
|
15
|
+
* - Duty: amount * dutyBuffer
|
|
16
|
+
* - Tax: (amount + duty) * taxBuffer
|
|
17
|
+
* - Non-Zonos Fee: amount * nonZonosFee
|
|
18
|
+
* - Zonos Fee: (duty + tax + nonZonosFee) * zonosFee
|
|
19
|
+
* - Total: amount + duty + tax + nonZonosFee + zonosFee
|
|
20
|
+
*/
|
|
21
|
+
export const calculateInclusivePrice = ({ amount, dutyBuffer, nonZonosFee, taxBuffer, zonosFee, }) => {
|
|
22
|
+
const dutyBufferedAmount = amount * dutyBuffer;
|
|
23
|
+
const taxBufferedAmount = (amount + dutyBufferedAmount) * taxBuffer;
|
|
24
|
+
const nonZonosFeeBufferedAmount = amount * nonZonosFee;
|
|
25
|
+
const zonosFeeBufferedAmount = (dutyBufferedAmount + taxBufferedAmount + nonZonosFeeBufferedAmount) *
|
|
26
|
+
zonosFee;
|
|
27
|
+
return (amount +
|
|
28
|
+
dutyBufferedAmount +
|
|
29
|
+
taxBufferedAmount +
|
|
30
|
+
nonZonosFeeBufferedAmount +
|
|
31
|
+
zonosFeeBufferedAmount);
|
|
32
|
+
};
|
package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { localizationStore } from "../../../store/hello/localization";
|
|
2
2
|
import { zonosStore } from "../../../store/zonosStore";
|
|
3
|
+
import { applyInclusiveEffectiveRate } from "./applyInclusiveEffectiveRate";
|
|
3
4
|
import { currencyConvert } from "./currencyConvert";
|
|
4
5
|
import { currencyConvertAndFormat } from "./currencyConvertAndFormat";
|
|
5
6
|
import { currencyFormat } from "./currencyFormat";
|
|
6
7
|
import { getCurrencyElements } from "./getCurrencyElements";
|
|
7
8
|
import { getInitialElementAmount } from "./getInitialElementAmount";
|
|
8
9
|
import { logError } from "../../logging/logError";
|
|
9
|
-
import {
|
|
10
|
+
import { performBlurSpecificElement, removeBlurSpecificElement, } from "../../../../utils/performBlurCurrency";
|
|
10
11
|
const convertCurrency = (element) => {
|
|
11
12
|
var _a;
|
|
12
13
|
const amount = getInitialElementAmount(element);
|
|
@@ -31,18 +32,20 @@ const convertCurrency = (element) => {
|
|
|
31
32
|
// Update currency when the country code changes
|
|
32
33
|
currentCountryValue !== localizationStore.selectedCountryCode)) {
|
|
33
34
|
// Hide the currency until DOM is ready to display the new value
|
|
34
|
-
|
|
35
|
+
const timeoutId = performBlurSpecificElement(element);
|
|
36
|
+
const appliedInclusivePrice = applyInclusiveEffectiveRate(amount);
|
|
35
37
|
const customizedCurrencyFormat = typeof zonosStore.currencyConverter === 'function' &&
|
|
36
38
|
zonosStore.currencyConverter({
|
|
37
39
|
convert: currencyConvert,
|
|
38
40
|
convertAndFormat: currencyConvertAndFormat,
|
|
39
41
|
currencyCode: localizationStore.targetCurrency,
|
|
40
42
|
format: (value) => currencyFormat({ amount: value }),
|
|
41
|
-
originalAmount:
|
|
43
|
+
originalAmount: appliedInclusivePrice,
|
|
42
44
|
selector: element,
|
|
43
45
|
});
|
|
44
46
|
// default to the currencyConvertAndFormat if the currencyConverter function does not return a value, or invalid value. This is to make sure we don't break the merchant's price.
|
|
45
|
-
const observedFormattedValue = customizedCurrencyFormat ||
|
|
47
|
+
const observedFormattedValue = customizedCurrencyFormat ||
|
|
48
|
+
currencyConvertAndFormat(appliedInclusivePrice);
|
|
46
49
|
if (observedFormattedValue !== element.textContent) {
|
|
47
50
|
// Only set textContent if the value has changed, this is to prevent it redrawing the element if the value is the same
|
|
48
51
|
element.textContent = observedFormattedValue;
|
|
@@ -52,9 +55,11 @@ const convertCurrency = (element) => {
|
|
|
52
55
|
// save the new value to the data-zintl attribute
|
|
53
56
|
element.setAttribute('data-zintl', observedFormattedValue);
|
|
54
57
|
element.setAttribute('data-zcountry-code', localizationStore.selectedCountryCode || '');
|
|
58
|
+
void removeBlurSpecificElement({
|
|
59
|
+
specificSelector: element,
|
|
60
|
+
timeoutId,
|
|
61
|
+
});
|
|
55
62
|
}
|
|
56
|
-
// Remove blur effect after the currency is converted
|
|
57
|
-
void removeBlurCurrency();
|
|
58
63
|
};
|
|
59
64
|
export const defaultCurrencyConverter = () => {
|
|
60
65
|
const { currencyElementSelector } = zonosStore.helloSettings;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Since the backend and the frontend are using the same keys,
|
|
3
|
+
* make sure to not change the key value below since if it changes
|
|
4
|
+
* and the frontend script is cached, the formula may not work as expected.
|
|
5
|
+
*/
|
|
6
|
+
export const DUTY_KEY = 'gkjqw123';
|
|
7
|
+
export const NON_ZONOS_FEE_KEY = 'jUwjs2Hs3';
|
|
8
|
+
export const TAXES_KEY = 'Kq93wqw3';
|
|
9
|
+
export const ZONOS_FEE_KEY = 'eius22kk';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1197,6 +1197,10 @@ export const customsSpecAttributeType = {
|
|
|
1197
1197
|
Vat: 'VAT',
|
|
1198
1198
|
Voec: 'VOEC',
|
|
1199
1199
|
};
|
|
1200
|
+
export const customsSpecEndUseType = {
|
|
1201
|
+
ForResale: 'FOR_RESALE',
|
|
1202
|
+
NotForResale: 'NOT_FOR_RESALE',
|
|
1203
|
+
};
|
|
1200
1204
|
export const customsSpecSourceType = {
|
|
1201
1205
|
ApiRequest: 'API_REQUEST',
|
|
1202
1206
|
Catalog: 'CATALOG',
|
|
@@ -1225,6 +1229,21 @@ export const deMinimisType = {
|
|
|
1225
1229
|
Fee: 'FEE',
|
|
1226
1230
|
Tax: 'TAX',
|
|
1227
1231
|
};
|
|
1232
|
+
export const declarationPaymentStatus = {
|
|
1233
|
+
Open: 'OPEN',
|
|
1234
|
+
Paid: 'PAID',
|
|
1235
|
+
};
|
|
1236
|
+
export const declarationSource = {
|
|
1237
|
+
Post: 'POST',
|
|
1238
|
+
Prepay: 'PREPAY',
|
|
1239
|
+
Zonos: 'ZONOS',
|
|
1240
|
+
};
|
|
1241
|
+
export const declarationStatus = {
|
|
1242
|
+
ItmattReceived: 'ITMATT_RECEIVED',
|
|
1243
|
+
Open: 'OPEN',
|
|
1244
|
+
PartiallyShipped: 'PARTIALLY_SHIPPED',
|
|
1245
|
+
Shipped: 'SHIPPED',
|
|
1246
|
+
};
|
|
1228
1247
|
export const deleteJobStatus = {
|
|
1229
1248
|
Completed: 'COMPLETED',
|
|
1230
1249
|
Error: 'ERROR',
|
|
@@ -1871,6 +1890,7 @@ export const landedCostCalculationMethod = {
|
|
|
1871
1890
|
};
|
|
1872
1891
|
export const landedCostEndUse = {
|
|
1873
1892
|
ForResale: 'FOR_RESALE',
|
|
1893
|
+
Gift: 'GIFT',
|
|
1874
1894
|
NotForResale: 'NOT_FOR_RESALE',
|
|
1875
1895
|
};
|
|
1876
1896
|
export const landedCostFeeType = {
|
|
@@ -2293,6 +2313,7 @@ export const partyType = {
|
|
|
2293
2313
|
Payor: 'PAYOR',
|
|
2294
2314
|
};
|
|
2295
2315
|
export const paymentProcessorCode = {
|
|
2316
|
+
Na: 'NA',
|
|
2296
2317
|
Paypal: 'PAYPAL',
|
|
2297
2318
|
Stripe: 'STRIPE',
|
|
2298
2319
|
StripeTransfer: 'STRIPE_TRANSFER',
|
|
@@ -2494,6 +2515,60 @@ export const shipmentConsolidationStatus = {
|
|
|
2494
2515
|
Closed: 'CLOSED',
|
|
2495
2516
|
Open: 'OPEN',
|
|
2496
2517
|
};
|
|
2518
|
+
export const shipmentPackagingTypeCode = {
|
|
2519
|
+
Bpm: 'BPM',
|
|
2520
|
+
BpmFlat: 'BPM_FLAT',
|
|
2521
|
+
BpmParcel: 'BPM_PARCEL',
|
|
2522
|
+
CustomerSuppliedPackage: 'CUSTOMER_SUPPLIED_PACKAGE',
|
|
2523
|
+
DhlBottleBox_1: 'DHL_BOTTLE_BOX_1',
|
|
2524
|
+
DhlBottleBox_2: 'DHL_BOTTLE_BOX_2',
|
|
2525
|
+
DhlBottleBox_3: 'DHL_BOTTLE_BOX_3',
|
|
2526
|
+
DhlBottleBox_6: 'DHL_BOTTLE_BOX_6',
|
|
2527
|
+
DhlBox_2A: 'DHL_BOX_2A',
|
|
2528
|
+
DhlBox_2B: 'DHL_BOX_2B',
|
|
2529
|
+
DhlBox_2C: 'DHL_BOX_2C',
|
|
2530
|
+
DhlBox_3: 'DHL_BOX_3',
|
|
2531
|
+
DhlBox_4: 'DHL_BOX_4',
|
|
2532
|
+
DhlBox_5: 'DHL_BOX_5',
|
|
2533
|
+
DhlBox_6: 'DHL_BOX_6',
|
|
2534
|
+
DhlBox_7: 'DHL_BOX_7',
|
|
2535
|
+
DhlBox_8: 'DHL_BOX_8',
|
|
2536
|
+
DhlCardEnvelope: 'DHL_CARD_ENVELOPE',
|
|
2537
|
+
DhlCardEnvelopeImperial: 'DHL_CARD_ENVELOPE_IMPERIAL',
|
|
2538
|
+
DhlExpressEnvelope: 'DHL_EXPRESS_ENVELOPE',
|
|
2539
|
+
DhlTubeLarge: 'DHL_TUBE_LARGE',
|
|
2540
|
+
DhlTubeSmall: 'DHL_TUBE_SMALL',
|
|
2541
|
+
DhlWineBottleBox_2: 'DHL_WINE_BOTTLE_BOX_2',
|
|
2542
|
+
DhlWineBottleBox_3: 'DHL_WINE_BOTTLE_BOX_3',
|
|
2543
|
+
DhlWineBottleBox_4: 'DHL_WINE_BOTTLE_BOX_4',
|
|
2544
|
+
DhlWineBottleBox_5: 'DHL_WINE_BOTTLE_BOX_5',
|
|
2545
|
+
FedexBox: 'FEDEX_BOX',
|
|
2546
|
+
FedexEnvelope: 'FEDEX_ENVELOPE',
|
|
2547
|
+
FedexPak: 'FEDEX_PAK',
|
|
2548
|
+
FedexTube: 'FEDEX_TUBE',
|
|
2549
|
+
Fedex_10KgBox: 'FEDEX_10KG_BOX',
|
|
2550
|
+
Fedex_25KgBox: 'FEDEX_25KG_BOX',
|
|
2551
|
+
FirstClass: 'FIRST_CLASS',
|
|
2552
|
+
Flats: 'FLATS',
|
|
2553
|
+
Irregulars: 'IRREGULARS',
|
|
2554
|
+
LargeExpressBox: 'LARGE_EXPRESS_BOX',
|
|
2555
|
+
Machineables: 'MACHINEABLES',
|
|
2556
|
+
MediaMail: 'MEDIA_MAIL',
|
|
2557
|
+
MediumExpressBox: 'MEDIUM_EXPRESS_BOX',
|
|
2558
|
+
Pak: 'PAK',
|
|
2559
|
+
Pallet: 'PALLET',
|
|
2560
|
+
ParcelPost: 'PARCEL_POST',
|
|
2561
|
+
Parcels: 'PARCELS',
|
|
2562
|
+
Priority: 'PRIORITY',
|
|
2563
|
+
SmallExpressBox: 'SMALL_EXPRESS_BOX',
|
|
2564
|
+
StandardFlat: 'STANDARD_FLAT',
|
|
2565
|
+
Tube: 'TUBE',
|
|
2566
|
+
UpsExpressBox: 'UPS_EXPRESS_BOX',
|
|
2567
|
+
UpsLetter: 'UPS_LETTER',
|
|
2568
|
+
Ups_10KgBox: 'UPS_10KG_BOX',
|
|
2569
|
+
Ups_25KgBox: 'UPS_25KG_BOX',
|
|
2570
|
+
YourPackaging: 'YOUR_PACKAGING',
|
|
2571
|
+
};
|
|
2497
2572
|
export const shipmentRatingAmountTargetType = {
|
|
2498
2573
|
BillingCompany: 'BILLING_COMPANY',
|
|
2499
2574
|
MerchantBase: 'MERCHANT_BASE',
|
|
@@ -3049,12 +3124,12 @@ export function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
3049
3124
|
getCheckoutSessionAttributes(variables, requestHeaders) {
|
|
3050
3125
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getCheckoutSessionAttributes', 'query');
|
|
3051
3126
|
},
|
|
3127
|
+
getCheckoutSessionReferences(variables, requestHeaders) {
|
|
3128
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getCheckoutSessionReferences', 'query');
|
|
3129
|
+
},
|
|
3052
3130
|
getCollectCheckoutSession(variables, requestHeaders) {
|
|
3053
3131
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getCollectCheckoutSession', 'query');
|
|
3054
3132
|
},
|
|
3055
|
-
getInclusivePriceSettingByCountry(variables, requestHeaders) {
|
|
3056
|
-
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getInclusivePriceSettingByCountry', 'query');
|
|
3057
|
-
},
|
|
3058
3133
|
getOrder(variables, requestHeaders) {
|
|
3059
3134
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getOrder', 'query');
|
|
3060
3135
|
},
|
|
@@ -3079,6 +3154,15 @@ export function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
3079
3154
|
helloSettings(variables, requestHeaders) {
|
|
3080
3155
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'helloSettings', 'query');
|
|
3081
3156
|
},
|
|
3157
|
+
inclusivePriceConfigurationId(variables, requestHeaders) {
|
|
3158
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'inclusivePriceConfigurationId', 'query');
|
|
3159
|
+
},
|
|
3160
|
+
inclusivePriceConfigurations(variables, requestHeaders) {
|
|
3161
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'inclusivePriceConfigurations', 'query');
|
|
3162
|
+
},
|
|
3163
|
+
inclusivePriceConfigurationsSync(variables, requestHeaders) {
|
|
3164
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'inclusivePriceConfigurationsSync', 'mutation');
|
|
3165
|
+
},
|
|
3082
3166
|
landedCostSettings(variables, requestHeaders) {
|
|
3083
3167
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'landedCostSettings', 'query');
|
|
3084
3168
|
},
|
|
@@ -16,6 +16,7 @@ export * from './checkout/CheckoutConfig';
|
|
|
16
16
|
export * from './checkout/TaxId';
|
|
17
17
|
export * from './ConversionEvent';
|
|
18
18
|
export * from './hello/HelloConfig';
|
|
19
|
+
export * from './InclusivePricing';
|
|
19
20
|
export * from './JsonError';
|
|
20
21
|
export * from './LogError';
|
|
21
22
|
export * from './LogLoadScript';
|
|
@@ -15,15 +15,48 @@ export const removeBlurCurrency = async () => {
|
|
|
15
15
|
});
|
|
16
16
|
window.zonosBlurCurrencyOnInitIntervalId = undefined;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* This function is used to remove the blur effect from a specific element. (combined with performBlurSpecificElement)
|
|
20
|
+
* @returns void
|
|
21
|
+
*/
|
|
22
|
+
export const removeBlurSpecificElement = async ({ specificSelector, timeoutId, }) => {
|
|
23
|
+
// Wait a bit to make sure price is fully rendered in DOM
|
|
24
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
25
|
+
if (timeoutId) {
|
|
26
|
+
clearTimeout(timeoutId);
|
|
27
|
+
}
|
|
28
|
+
specificSelector.classList.remove(BLUR_CURRENCY_CLASSNAME);
|
|
29
|
+
};
|
|
30
|
+
const blurCurrencyElements = ({ currencySelector, specificSelector, }) => {
|
|
19
31
|
// Do nothing if the currency selector is not provided or blurCurrencyOnInit is false
|
|
20
|
-
if (!currencySelector) {
|
|
32
|
+
if (!currencySelector && !specificSelector) {
|
|
21
33
|
return;
|
|
22
34
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
35
|
+
if (specificSelector) {
|
|
36
|
+
specificSelector.classList.add(BLUR_CURRENCY_CLASSNAME);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
const currencyElements = document.querySelectorAll([currencySelector].filter(Boolean).join(','));
|
|
40
|
+
currencyElements.forEach(element => {
|
|
41
|
+
element.classList.add(BLUR_CURRENCY_CLASSNAME);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
export const performBlurSpecificElement = (specificSelector) => {
|
|
46
|
+
if (typeof window === 'undefined') {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
blurCurrencyElements({
|
|
50
|
+
specificSelector,
|
|
26
51
|
});
|
|
52
|
+
// The blur will be removed as soon as we got the exchange rate back. But if the exchange rate is not available for some reason, the blur effect will be automatically removed after 10 seconds
|
|
53
|
+
const timeoutId = setTimeout(() => {
|
|
54
|
+
void removeBlurSpecificElement({
|
|
55
|
+
specificSelector,
|
|
56
|
+
timeoutId,
|
|
57
|
+
});
|
|
58
|
+
}, BLUR_CURRENCY_DURATION);
|
|
59
|
+
return timeoutId;
|
|
27
60
|
};
|
|
28
61
|
export const performBlurCurrency = () => {
|
|
29
62
|
if (typeof window === 'undefined') {
|
package/dist/esm/{buildCartItemsByTempCart-c4488f73.js → buildCartItemsByTempCart-a117f75d.js}
RENAMED
|
@@ -12,6 +12,7 @@ const buildCartItemsByTempCart = (tempCartData) => {
|
|
|
12
12
|
imageUrl: item.imageUrl || '',
|
|
13
13
|
itemType: item.itemType || 'PHYSICAL_GOOD',
|
|
14
14
|
measurements: item.measurements || [],
|
|
15
|
+
metadata: item.metadata || [],
|
|
15
16
|
name: item.name || item.description || '',
|
|
16
17
|
productId: item.productId || '',
|
|
17
18
|
quantity: item.quantity || 0,
|