@ikas/storefront 6.1.0-beta.294 → 6.1.0-beta.296
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import*as s from"react";import{observer as r}from"mobx-react-lite";import{ErrorType as i}from"../../model.js";import{useCheckout as o,ExpressCheckoutElement as n,CheckoutProvider as c}from"@stripe/react-stripe-js/checkout";import{loadStripe as a}from"@stripe/stripe-js";import l from"./style.module.scss.js";import{useTranslation as p}from"../../../../utils/i18n.js";var u=r((function(r){var c=r.vm,a=o();if(!c.stripeExpressCheckoutSessionResponse)return null;return s.createElement("div",{className:l.ExpressCheckoutWrapper,style:{visibility:c.isStripeExpressCheckoutSessionVisible?"visible":"hidden"}},s.createElement(n,{onConfirm:function(s){return e(void 0,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:return"success"!==a.type?[2]:[4,a.checkout.confirm({expressCheckoutConfirmEvent:s,returnUrl:null===(r=c.stripeExpressCheckoutSessionResponse)||void 0===r?void 0:r.callbackUrl})];case 1:return"error"===(e=t.sent()).type&&(console.log("stripe error",e.error),c.handlePaymentError(i.PAYMENT_ERROR,e.error.message)),[2]}}))}))},onReady:function(e){e.availablePaymentMethods&&(c.isStripeExpressCheckoutSessionVisible=!0)}}))})),m=r((function(r){var i=r.vm,o=s.useState(null),n=o[0],m=o[1],
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import*as s from"react";import{observer as r}from"mobx-react-lite";import{ErrorType as i}from"../../model.js";import{useCheckout as o,ExpressCheckoutElement as n,CheckoutProvider as c}from"@stripe/react-stripe-js/checkout";import{loadStripe as a}from"@stripe/stripe-js";import l from"./style.module.scss.js";import{useTranslation as p}from"../../../../utils/i18n.js";var u=r((function(r){var c=r.vm,a=o();if(!c.stripeExpressCheckoutSessionResponse)return null;return s.createElement("div",{className:l.ExpressCheckoutWrapper,style:{visibility:c.isStripeExpressCheckoutSessionVisible?"visible":"hidden"}},s.createElement(n,{onConfirm:function(s){return e(void 0,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:return"success"!==a.type?[2]:[4,a.checkout.confirm({expressCheckoutConfirmEvent:s,returnUrl:null===(r=c.stripeExpressCheckoutSessionResponse)||void 0===r?void 0:r.callbackUrl})];case 1:return"error"===(e=t.sent()).type&&(console.log("stripe error",e.error),c.handlePaymentError(i.PAYMENT_ERROR,e.error.message)),[2]}}))}))},onReady:function(e){e.availablePaymentMethods&&(c.isStripeExpressCheckoutSessionVisible=!0)}}))})),m=r((function(r){var i=r.vm,o=s.useState(null),n=o[0],m=o[1],d=p().t,E=i.stripeExpressCheckoutSessionResponse;return s.useEffect((function(){!function(){e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return E?[4,a(E.apiKey,{stripeAccount:E.accountId})]:[3,2];case 1:e=t.sent(),m(e),t.label=2;case 2:return[2]}}))}))}()}),[E]),E?s.createElement("div",{style:{display:i.isStripeExpressCheckoutSessionVisible?"block":"none"},className:l.StripeExpressCheckoutContainer},s.createElement("div",{className:l.StripeExpressCheckoutTitle},d("checkout-page:stripeExpressCheckoutTitle")),s.createElement("div",{className:l.Container},s.createElement(c,{stripe:n,options:{clientSecret:E.clientSecret,adaptivePricing:{allowed:!0}}},s.createElement(u,{vm:i}))),s.createElement("div",{className:l.StripeExpressCheckoutDivider},s.createElement("span",{className:l.StripeExpressCheckoutDividerLine}),s.createElement("span",{className:l.StripeExpressCheckoutDividerText},d("checkout-page:or")),s.createElement("span",{className:l.StripeExpressCheckoutDividerLine}))):null}));export{m as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "6.1.0-beta.
|
|
3
|
+
"version": "6.1.0-beta.296",
|
|
4
4
|
"description": "Storefront functionality for ikas storefront themes.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"swiper": "11.0.6"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@ikas/storefront-api": "^6.1.0-beta.
|
|
27
|
-
"@ikas/storefront-config": "^6.1.0-beta.
|
|
28
|
-
"@ikas/storefront-model-functions": "^6.1.0-beta.
|
|
29
|
-
"@ikas/storefront-models": "^6.1.0-beta.
|
|
30
|
-
"@ikas/storefront-providers": "^6.1.0-beta.
|
|
26
|
+
"@ikas/storefront-api": "^6.1.0-beta.296",
|
|
27
|
+
"@ikas/storefront-config": "^6.1.0-beta.296",
|
|
28
|
+
"@ikas/storefront-model-functions": "^6.1.0-beta.296",
|
|
29
|
+
"@ikas/storefront-models": "^6.1.0-beta.296",
|
|
30
|
+
"@ikas/storefront-providers": "^6.1.0-beta.296",
|
|
31
31
|
"@ikas/localized-address": "1.0.0-beta.6",
|
|
32
32
|
"@adyen/adyen-web": "^5.57.0",
|
|
33
33
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@ikas/localized-address": "1.0.0-beta.6",
|
|
65
|
-
"@ikas/storefront-api": "^6.1.0-beta.
|
|
66
|
-
"@ikas/storefront-config": "^6.1.0-beta.
|
|
67
|
-
"@ikas/storefront-model-functions": "^6.1.0-beta.
|
|
68
|
-
"@ikas/storefront-models": "^6.1.0-beta.
|
|
69
|
-
"@ikas/storefront-providers": "^6.1.0-beta.
|
|
65
|
+
"@ikas/storefront-api": "^6.1.0-beta.296",
|
|
66
|
+
"@ikas/storefront-config": "^6.1.0-beta.296",
|
|
67
|
+
"@ikas/storefront-model-functions": "^6.1.0-beta.296",
|
|
68
|
+
"@ikas/storefront-models": "^6.1.0-beta.296",
|
|
69
|
+
"@ikas/storefront-providers": "^6.1.0-beta.296",
|
|
70
70
|
"mobx": "^6.1.3",
|
|
71
71
|
"mobx-react-lite": "^3.1.5",
|
|
72
72
|
"next": "12.2.0",
|