@ikas/storefront 6.1.0-beta.132 → 6.1.0-beta.133

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 n}from'./../../../../ext/tslib/tslib.es6.js';import*as t from"react";import{observer as o}from"mobx-react-lite";import s from"@adyen/adyen-web";import"@adyen/adyen-web/dist/adyen.css";import r from"./adyen.module.scss.js";var i;!function(e){e.Authorised="Authorised",e.Cancelled="Cancelled"}(i||(i={}));var a=o((function(o){var a=o.vm,d=o.isSelected,u=t.useRef(null);return t.useEffect((function(){e(void 0,void 0,void 0,(function(){var t,o,r;return n(this,(function(d){switch(d.label){case 0:return a.adyenResponse&&u.current?(t={environment:a.adyenResponse.returnUrl.includes(".dev")?"test":"live",clientKey:a.adyenResponse.clientKey,analytics:{enabled:!0},session:{id:a.adyenResponse.sessionId,sessionData:a.adyenResponse.sessionData},beforeSubmit:function(t,o,s){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return s.resolve(t),[2]}))}))},onPaymentCompleted:function(e,n){e.resultCode===i.Authorised&&a.adyenResponse?window.location.href="".concat(a.adyenResponse.returnUrl,"&redirectResult=").concat(e.sessionResult):(a.isStepLoading=!1,setTimeout((function(){r.setStatus("ready")}),3e3))},onError:function(e,n){a.isStepLoading=!1,setTimeout((function(){r.setStatus("ready")}),3e3)},paymentMethodsConfiguration:{card:{showPayButton:!1}}},[4,s(t)]):[3,2];case 1:o=d.sent(),r=o.create("dropin").mount(u.current),a.setAdyenDropinElement(r),d.label=2;case 2:return[2]}}))}))}),[a.adyenResponse]),a.adyenResponse?t.createElement("div",{className:[r.AdyenContainer,d?"":r.NotSelectedAdyenContainer].join(" ")},t.createElement("div",{ref:u})):null}));export{a as Adyen};
1
+ import{__awaiter as e,__generator as n}from'./../../../../ext/tslib/tslib.es6.js';import*as t from"react";import{observer as o}from"mobx-react-lite";import{ErrorType as s}from"../../model.js";import r from"@adyen/adyen-web";import"@adyen/adyen-web/dist/adyen.css";import i from"./adyen.module.scss.js";var a;!function(e){e.Authorised="Authorised",e.Cancelled="Cancelled"}(a||(a={}));var d=o((function(o){var d=o.vm,u=o.isSelected,c=t.useRef(null);return t.useEffect((function(){e(void 0,void 0,void 0,(function(){var t,o,i;return n(this,(function(u){switch(u.label){case 0:return d.adyenResponse&&c.current?(t={environment:d.adyenResponse.returnUrl.includes(".dev")?"test":"live",clientKey:d.adyenResponse.clientKey,analytics:{enabled:!0},session:{id:d.adyenResponse.sessionId,sessionData:d.adyenResponse.sessionData},beforeSubmit:function(t,o,s){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return s.resolve(t),[2]}))}))},onPaymentCompleted:function(e,n){e.resultCode===a.Authorised&&d.adyenResponse?window.location.href="".concat(d.adyenResponse.returnUrl,"&redirectResult=").concat(e.sessionResult):(d.isStepLoading=!1,setTimeout((function(){i.setStatus("ready")}),3e3))},onError:function(e,n){throw d.isStepLoading=!1,setTimeout((function(){i.setStatus("ready")}),3e3),{type:s.API_ERROR,data:JSON.stringify(e)}},paymentMethodsConfiguration:{card:{showPayButton:!1}}},[4,r(t)]):[3,2];case 1:o=u.sent(),i=o.create("dropin").mount(c.current),d.setAdyenDropinElement(i),u.label=2;case 2:return[2]}}))}))}),[d.adyenResponse]),d.adyenResponse?t.createElement("div",{className:[i.AdyenContainer,u?"":i.NotSelectedAdyenContainer].join(" ")},t.createElement("div",{ref:c})):null}));export{d as Adyen};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "6.1.0-beta.132",
3
+ "version": "6.1.0-beta.133",
4
4
  "description": "Storefront functionality for ikas storefront themes.",
5
5
  "author": "ikas",
6
6
  "license": "ISC",
@@ -21,11 +21,11 @@
21
21
  "swiper": "11.0.6"
22
22
  },
23
23
  "devDependencies": {
24
- "@ikas/storefront-api": "^6.1.0-beta.132",
25
- "@ikas/storefront-config": "^6.1.0-beta.132",
26
- "@ikas/storefront-model-functions": "^6.1.0-beta.132",
27
- "@ikas/storefront-models": "^6.1.0-beta.132",
28
- "@ikas/storefront-providers": "^6.1.0-beta.132",
24
+ "@ikas/storefront-api": "^6.1.0-beta.133",
25
+ "@ikas/storefront-config": "^6.1.0-beta.133",
26
+ "@ikas/storefront-model-functions": "^6.1.0-beta.133",
27
+ "@ikas/storefront-models": "^6.1.0-beta.133",
28
+ "@ikas/storefront-providers": "^6.1.0-beta.133",
29
29
  "@ikas/localized-address": "1.0.0-beta.6",
30
30
  "@adyen/adyen-web": "^5.57.0",
31
31
  "@rollup/plugin-commonjs": "^22.0.0",
@@ -60,11 +60,11 @@
60
60
  },
61
61
  "peerDependencies": {
62
62
  "@ikas/localized-address": "1.0.0-beta.6",
63
- "@ikas/storefront-api": "^6.1.0-beta.132",
64
- "@ikas/storefront-config": "^6.1.0-beta.132",
65
- "@ikas/storefront-model-functions": "^6.1.0-beta.132",
66
- "@ikas/storefront-models": "^6.1.0-beta.132",
67
- "@ikas/storefront-providers": "^6.1.0-beta.132",
63
+ "@ikas/storefront-api": "^6.1.0-beta.133",
64
+ "@ikas/storefront-config": "^6.1.0-beta.133",
65
+ "@ikas/storefront-model-functions": "^6.1.0-beta.133",
66
+ "@ikas/storefront-models": "^6.1.0-beta.133",
67
+ "@ikas/storefront-providers": "^6.1.0-beta.133",
68
68
  "mobx": "^6.1.3",
69
69
  "mobx-react-lite": "^3.1.5",
70
70
  "next": "12.2.0",