@ikas/storefront 5.0.75 → 5.0.76

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{__assign as e,__awaiter as t,__generator as r}from'./../../../../ext/tslib/tslib.es6.js';import*as n from"react";import{observer as i}from"mobx-react-lite";var c=i((function(i){var c,o=i.vm;i.isSelected;var a=n.useRef(null),s=null===(c=o.iyzicoResponse)||void 0===c?void 0:c.checkoutFormContent;return n.useEffect((function(){if(s&&a.current){var e=a.current;window.iyziInit=void 0;var t=document.createElement("div");return t.innerHTML=s,t.querySelectorAll("script").forEach((function(t){var r=document.createElement("script");r.type="text/javascript",t.src?r.src=t.src:r.textContent=t.textContent,e.appendChild(r)})),function(){e.querySelectorAll("script").forEach((function(e){return e.remove()})),delete window.iyziInit}}}),[s]),n.useEffect((function(){var e=a.current;if(e&&s){var n=!1,i=function(e){return t(void 0,void 0,void 0,(function(){var t,i;return r(this,(function(r){switch(r.label){case 0:if(t=e.target,!(i=t.closest("#iyz-payment-button"))||n)return[2];e.preventDefault(),e.stopImmediatePropagation(),n=!0,r.label=1;case 1:return r.trys.push([1,,3,4]),[4,o.saveCart()];case 2:return r.sent(),[3,4];case 3:return i.click(),n=!1,[7];case 4:return[2]}}))}))};return e.addEventListener("click",i,!0),function(){e.removeEventListener("click",i,!0)}}}),[s,o]),s?n.createElement("div",{style:e({},!o.showIyzicoContainer&&{display:"none"}),ref:a},n.createElement("div",{id:"iyzipay-checkout-form",className:"responsive"})):null}));export{c as Iyzico};
1
+ import{__assign as e,__awaiter as t,__generator as r}from'./../../../../ext/tslib/tslib.es6.js';import*as n from"react";import{observer as i}from"mobx-react-lite";var o=i((function(i){var o,c=i.vm;i.isSelected;var s=n.useRef(null),a=null===(o=c.iyzicoResponse)||void 0===o?void 0:o.checkoutFormContent;return n.useEffect((function(){if(a&&s.current){var e=s.current;window.iyziInit=void 0;var t=document.createElement("div");return t.innerHTML=a,t.querySelectorAll("script").forEach((function(t){var r=document.createElement("script");r.type="text/javascript",t.src?r.src=t.src:r.textContent=t.textContent,e.appendChild(r)})),function(){e.querySelectorAll("script").forEach((function(e){return e.remove()})),delete window.iyziInit}}}),[a]),n.useEffect((function(){var e=s.current;if(e&&a){var n=!1,i=!1,o=function(e){return t(void 0,void 0,void 0,(function(){var t,o,s,a;return r(this,(function(r){switch(r.label){case 0:if(t=e.target,!(o=t.closest("#iyz-payment-button")))return[2];if(i)return i=!1,[2];if(s=!!(null===(a=c.checkout.billingAddress)||void 0===a?void 0:a.isValidAddress),n||!s)return e.preventDefault(),e.stopImmediatePropagation(),s||(c.isErrorsVisible=!0),[2];e.preventDefault(),e.stopImmediatePropagation(),n=!0,r.label=1;case 1:return r.trys.push([1,,3,4]),[4,c.saveCart()];case 2:return r.sent(),[3,4];case 3:if(s){i=!0;try{o.click()}finally{i=!1}}return n=!1,[7];case 4:return[2]}}))}))};return e.addEventListener("click",o,!0),function(){e.removeEventListener("click",o,!0)}}}),[a,c]),a?n.createElement("div",{style:e({},!c.showIyzicoContainer&&{display:"none"}),ref:s},n.createElement("div",{id:"iyzipay-checkout-form",className:"responsive"})):null}));export{o as Iyzico};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "5.0.75",
3
+ "version": "5.0.76",
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": "^5.0.75",
27
- "@ikas/storefront-config": "^5.0.75",
28
- "@ikas/storefront-model-functions": "^5.0.75",
29
- "@ikas/storefront-models": "^5.0.75",
30
- "@ikas/storefront-providers": "^5.0.75",
26
+ "@ikas/storefront-api": "^5.0.76",
27
+ "@ikas/storefront-config": "^5.0.76",
28
+ "@ikas/storefront-model-functions": "^5.0.76",
29
+ "@ikas/storefront-models": "^5.0.76",
30
+ "@ikas/storefront-providers": "^5.0.76",
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": "^5.0.75",
66
- "@ikas/storefront-config": "^5.0.75",
67
- "@ikas/storefront-model-functions": "^5.0.75",
68
- "@ikas/storefront-models": "^5.0.75",
69
- "@ikas/storefront-providers": "^5.0.75",
65
+ "@ikas/storefront-api": "^5.0.76",
66
+ "@ikas/storefront-config": "^5.0.76",
67
+ "@ikas/storefront-model-functions": "^5.0.76",
68
+ "@ikas/storefront-models": "^5.0.76",
69
+ "@ikas/storefront-providers": "^5.0.76",
70
70
  "mobx": "^6.1.3",
71
71
  "mobx-react-lite": "^3.1.5",
72
72
  "next": "12.2.0",