@zonos/elements 1.3.243 → 1.3.245
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-6d254f1a.js → cart-52cf3366.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-ac0440e7.js → hasInclusivePrice-dbb82df8.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-8984eb26.js → invoice-972f1ab3.js} +2 -2
- package/dist/cjs/{isCollectMobileTablet-7e929884.js → isCollectMobileTablet-fd11246c.js} +2 -2
- package/dist/cjs/{localization-ec5a6780.js → localization-b1075a8c.js} +60 -0
- package/dist/cjs/{paypal-0f4b77fd.js → paypal-e339cc8c.js} +2 -2
- package/dist/cjs/{placeTestOrder-6cc9d040.js → placeTestOrder-3dfbe3d6.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-df60f3a6.js → renderCheckoutCurrency-55056c97.js} +2 -2
- package/dist/cjs/zonos-address-display_9.cjs.entry.js +2 -2
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +19 -6
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +3 -0
- package/dist/collection/components/store/translationStore/strings.base.js +3 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +3 -0
- package/dist/collection/components/store/translationStore/strings.french.js +3 -0
- package/dist/collection/components/store/translationStore/strings.german.js +3 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +3 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +3 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +3 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -0
- package/dist/collection/components/utils/taxIdValidationResult.js +13 -0
- package/dist/collection/types/generated/graphql.internal.types.js +21 -0
- package/dist/esm/{cart-00134a17.js → cart-7f4704dc.js} +1 -1
- package/dist/esm/{hasInclusivePrice-f41e52b8.js → hasInclusivePrice-3958ed11.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-4a8178f8.js → invoice-d3d256fb.js} +2 -2
- package/dist/esm/{isCollectMobileTablet-70fa91b6.js → isCollectMobileTablet-27693de5.js} +2 -2
- package/dist/esm/{localization-ee8bb238.js → localization-401ec6d4.js} +60 -0
- package/dist/esm/{paypal-2e28d0e7.js → paypal-61270b79.js} +2 -2
- package/dist/esm/{placeTestOrder-aa884e31.js → placeTestOrder-c2180600.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-54994d08.js → renderCheckoutCurrency-dea06d44.js} +2 -2
- package/dist/esm/zonos-address-display_9.entry.js +2 -2
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-card_5.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +19 -6
- package/dist/esm/zonos-checkout.entry.js +3 -3
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/{cart-00134a17.js → cart-7f4704dc.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-f41e52b8.js → hasInclusivePrice-3958ed11.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-4a8178f8.js → invoice-d3d256fb.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-70fa91b6.js → isCollectMobileTablet-27693de5.js} +1 -1
- package/dist/esm-es5/localization-401ec6d4.js +1 -0
- package/dist/esm-es5/{paypal-2e28d0e7.js → paypal-61270b79.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-aa884e31.js → placeTestOrder-c2180600.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-54994d08.js → renderCheckoutCurrency-dea06d44.js} +1 -1
- package/dist/esm-es5/zonos-address-display_9.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-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-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/scripts/index.d.ts +15 -4
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -0
- package/dist/types/components/utils/hello/initHello.d.ts +3 -3
- package/dist/types/components/utils/taxIdValidationResult.d.ts +1 -1
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +4 -3
- package/dist/types/types/generated/graphql.internal.types.d.ts +38 -6
- package/dist/types/types/generated/graphql.internal.types.ts +49 -6
- package/dist/types/types/hello/HelloConfig.d.ts +2 -2
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-cfb2b5c7.entry.js → p-0aada8ab.entry.js} +1 -1
- package/dist/zonos-elements/{p-41147617.entry.js → p-1216cfb3.entry.js} +1 -1
- package/dist/zonos-elements/{p-e3b4a218.system.entry.js → p-133e9ce7.system.entry.js} +1 -1
- package/dist/zonos-elements/p-1d91e5d1.entry.js +1 -0
- package/dist/zonos-elements/p-21fb6b39.js +1 -0
- package/dist/zonos-elements/{p-10b1f35f.entry.js → p-2601538e.entry.js} +1 -1
- package/dist/zonos-elements/{p-914149a4.js → p-276faa43.js} +1 -1
- package/dist/zonos-elements/{p-20c5d640.system.entry.js → p-2889a485.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c9db8939.js → p-288aab46.js} +1 -1
- package/dist/zonos-elements/{p-0e70900c.entry.js → p-291b85f7.entry.js} +1 -1
- package/dist/zonos-elements/{p-11e79ab7.system.js → p-33fdde8a.system.js} +1 -1
- package/dist/zonos-elements/{p-6b1091f1.system.entry.js → p-367c13db.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1db4ae37.system.entry.js → p-38bdbdcc.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-599347f4.system.entry.js → p-3b1898bc.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-56107bdf.system.entry.js → p-3f078bf5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-dbea1f9b.entry.js → p-3f46d83e.entry.js} +1 -1
- package/dist/zonos-elements/{p-0fcd7a94.system.js → p-415c2a90.system.js} +1 -1
- package/dist/zonos-elements/{p-29bb70e0.entry.js → p-4bd8a16c.entry.js} +1 -1
- package/dist/zonos-elements/{p-7a4a4b52.entry.js → p-4d7b82b5.entry.js} +1 -1
- package/dist/zonos-elements/{p-633017f0.system.entry.js → p-5be33a13.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-d042455d.entry.js → p-5f956a0d.entry.js} +1 -1
- package/dist/zonos-elements/{p-90e10b7e.system.entry.js → p-6b9b7cfb.system.entry.js} +1 -1
- package/dist/zonos-elements/p-74e258ff.system.js +1 -0
- package/dist/zonos-elements/{p-73e79407.entry.js → p-7521549c.entry.js} +1 -1
- package/dist/zonos-elements/{p-675dd093.system.js → p-775c1122.system.js} +1 -1
- package/dist/zonos-elements/{p-f7e6c1b5.system.entry.js → p-78c8bb58.system.entry.js} +1 -1
- package/dist/zonos-elements/p-85430ec1.js +1 -0
- package/dist/zonos-elements/{p-c11668b5.system.entry.js → p-8d2e24a4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-47f02d2a.system.entry.js → p-8dc7d82f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-95524f54.js +1 -0
- package/dist/zonos-elements/{p-899c3878.system.entry.js → p-95703417.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-67e19c00.system.entry.js → p-993723c2.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6d82c3a4.js → p-a0a62b7e.js} +2 -2
- package/dist/zonos-elements/{p-6beaff11.entry.js → p-a3411f20.entry.js} +1 -1
- package/dist/zonos-elements/{p-069e8b40.entry.js → p-a53d3d46.entry.js} +1 -1
- package/dist/zonos-elements/{p-6fad6110.system.js → p-a556ec07.system.js} +1 -1
- package/dist/zonos-elements/{p-f5cfce05.js → p-a6489088.js} +1 -1
- package/dist/zonos-elements/{p-c02e3fef.js → p-a79f3685.js} +1 -1
- package/dist/zonos-elements/{p-975c6928.system.js → p-acc0eee3.system.js} +1 -1
- package/dist/zonos-elements/{p-0a1b82df.entry.js → p-ba228769.entry.js} +1 -1
- package/dist/zonos-elements/p-c2442878.system.js +1 -1
- package/dist/zonos-elements/{p-af7e37c1.system.entry.js → p-c62b6741.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ea1d5802.entry.js → p-c708f7e9.entry.js} +1 -1
- package/dist/zonos-elements/{p-4fc549f4.system.entry.js → p-c88cd318.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-343dee8b.system.js → p-d1effb76.system.js} +1 -1
- package/dist/zonos-elements/{p-68f419f1.system.js → p-e0809901.system.js} +1 -1
- package/dist/zonos-elements/{p-b3dbe0ec.system.js → p-e7543082.system.js} +1 -1
- package/dist/zonos-elements/{p-9691381e.entry.js → p-e90e9584.entry.js} +1 -1
- package/dist/zonos-elements/{p-c8e5bb8a.entry.js → p-ebef34e3.entry.js} +1 -1
- package/dist/zonos-elements/{p-60443628.system.entry.js → p-f6c6b6d3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a04c7b1e.entry.js → p-faae5eca.entry.js} +1 -1
- package/dist/zonos-elements/{p-75813a38.system.entry.js → p-fe699cc5.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/localization-ee8bb238.js +0 -1
- package/dist/zonos-elements/p-2dd9b3e0.entry.js +0 -1
- package/dist/zonos-elements/p-4d2ed8d5.js +0 -1
- package/dist/zonos-elements/p-6dc9b9e5.js +0 -1
- package/dist/zonos-elements/p-752dae00.system.js +0 -1
- package/dist/zonos-elements/p-fab5f272.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(r,e,t,o){function n(r){return r instanceof t?r:new t((function(e){e(r)}))}return new(t||(t=Promise))((function(t,a){function i(r){try{c(o.next(r))}catch(r){a(r)}}function u(r){try{c(o["throw"](r))}catch(r){a(r)}}function c(r){r.done?t(r.value):n(r.value).then(i,u)}c((o=o.apply(r,e||[])).next())}))};var __generator=this&&this.__generator||function(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(r){return function(e){return c([r,e])}}function c(u){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(t=0)),t)try{if(o=1,n&&(a=u[0]&2?n["return"]:u[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;if(n=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;n=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1];a=u;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(u);break}if(a[2])t.ops.pop();t.trys.pop();continue}u=e.call(r,t)}catch(r){u=[6,r];n=0}finally{o=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{z as zonosStore,c as createStore}from"./zonosStore-b434e436.js";import{t as trackConversionEvent,A as validateCheckoutSession,b as stripeStore,d as cartStore,v as stripeStoreHandleInventoryCheck,r as cartStoreNextStep,h as cartStoreClearCheckoutInterval}from"./cart-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(r,e,t,o){function n(r){return r instanceof t?r:new t((function(e){e(r)}))}return new(t||(t=Promise))((function(t,a){function i(r){try{c(o.next(r))}catch(r){a(r)}}function u(r){try{c(o["throw"](r))}catch(r){a(r)}}function c(r){r.done?t(r.value):n(r.value).then(i,u)}c((o=o.apply(r,e||[])).next())}))};var __generator=this&&this.__generator||function(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(r){return function(e){return c([r,e])}}function c(u){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,u[0]&&(t=0)),t)try{if(o=1,n&&(a=u[0]&2?n["return"]:u[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;if(n=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;n=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1];a=u;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(u);break}if(a[2])t.ops.pop();t.trys.pop();continue}u=e.call(r,t)}catch(r){u=[6,r];n=0}finally{o=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{z as zonosStore,c as createStore}from"./zonosStore-b434e436.js";import{t as trackConversionEvent,A as validateCheckoutSession,b as stripeStore,d as cartStore,v as stripeStoreHandleInventoryCheck,r as cartStoreNextStep,h as cartStoreClearCheckoutInterval}from"./cart-7f4704dc.js";import{t as translate,s as storageStore}from"./localization-401ec6d4.js";import{h as handleFetch,l as logError,j as jsonParse}from"./handleFetch-a844cac1.js";import{t as tinycolor}from"./isDarkColor-9ddd90cc.js";import{l as log}from"./VarianceTest-572cecf5.js";
|
|
2
2
|
/*!
|
|
3
3
|
* paypal-js v8.1.0 (2024-06-07T16:55:00.122Z)
|
|
4
4
|
* Copyright 2020-present, PayPal, Inc. All rights reserved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(r,t,e,n){function o(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{u(n.next(r))}catch(r){i(r)}}function c(r){try{u(n["throw"](r))}catch(r){i(r)}}function u(r){r.done?e(r.value):o(r.value).then(a,c)}u((n=n.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(r){return function(t){return u([r,t])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(e=0)),e)try{if(n=1,o&&(i=c[0]&2?o["return"]:c[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;if(o=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;o=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1];i=c;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(c);break}if(i[2])e.ops.pop();e.trys.pop();continue}c=t.call(r,e)}catch(r){c=[6,r];o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{d as cartStore}from"./cart-
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(r,t,e,n){function o(r){return r instanceof e?r:new e((function(t){t(r)}))}return new(e||(e=Promise))((function(e,i){function a(r){try{u(n.next(r))}catch(r){i(r)}}function c(r){try{u(n["throw"](r))}catch(r){i(r)}}function u(r){r.done?e(r.value):o(r.value).then(a,c)}u((n=n.apply(r,t||[])).next())}))};var __generator=this&&this.__generator||function(r,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(r){return function(t){return u([r,t])}}function u(c){if(n)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(e=0)),e)try{if(n=1,o&&(i=c[0]&2?o["return"]:c[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;if(o=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;o=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1];i=c;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(c);break}if(i[2])e.ops.pop();e.trys.pop();continue}c=t.call(r,e)}catch(r){c=[6,r];o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};import{d as cartStore}from"./cart-7f4704dc.js";import{s as storageStore}from"./localization-401ec6d4.js";import{l as logError,h as handleFetch}from"./handleFetch-a844cac1.js";var placeTestOrder=function(){return __awaiter(void 0,void 0,void 0,(function(){var r,t,e,n,o,i,a,c,u;return __generator(this,(function(s){switch(s.label){case 0:e=(r=cartStore.partiesData.find((function(r){return r.type==="DESTINATION"})))===null||r===void 0?void 0:r.id;n=(t=cartStore.partiesData.find((function(r){return r.type==="PAYOR"})))===null||t===void 0?void 0:t.id;o=storageStore.checkoutSessionId;if(!o||!n||!e){logError("Missing required data",{billToPartyId:n,checkoutSessionId:o,shipToPartyId:e});return[2,{errors:["Missing required data"],json:null}]}i={billToPartyId:n,checkoutSessionId:o,shipToPartyId:e};return[4,handleFetch("/api/zonos-elements/place-test-order",{body:i,method:"POST"})];case 1:a=s.sent(),c=a.errors,u=a.json;if(c.length||!u){logError("Error occurs when placing test order",c);return[2,{errors:c.map((function(r){return r.message})),json:null}]}return[2,{errors:[],json:u}]}}))}))};export{placeTestOrder as p};
|
package/dist/esm-es5/{renderCheckoutCurrency-54994d08.js → renderCheckoutCurrency-dea06d44.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as cartStore}from"./cart-
|
|
1
|
+
import{d as cartStore}from"./cart-7f4704dc.js";import{o as applyInclusiveEffectiveRate,d as currencyFormat}from"./localization-401ec6d4.js";var getDisplayCurrency=function(){var r,a;var t=cartStore.displayBaseCurrency;var e=t&&((r=cartStore.exchangeRate)===null||r===void 0?void 0:r.sourceCurrencyCode)?(a=cartStore.exchangeRate)===null||a===void 0?void 0:a.sourceCurrencyCode:cartStore.currency;return e};var renderCheckoutCurrency=function(r){var a=r.amount,t=r.isForeign;var e,c;var o=((e=cartStore.exchangeRate)===null||e===void 0?void 0:e.rate)||1;var n=t?a:applyInclusiveEffectiveRate(a);var u=cartStore.currency;var v=(c=cartStore.items[0])===null||c===void 0?void 0:c.currencyCode;if(v===u){return currencyFormat({amount:n,currency:u})}var i=cartStore.displayBaseCurrency;var l=getDisplayCurrency();if(t){var y=i?n/o:n;return currencyFormat({amount:y,currency:l})}var d=i?n:n*o;return currencyFormat({amount:d,currency:l})};export{renderCheckoutCurrency as r};
|