@ikas/storefront 6.1.0-beta.95 → 6.1.0-beta.96
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
|
|
1
|
+
import{__awaiter as e,__generator as n}from'./../../../../ext/tslib/tslib.es6.js';import*as i from"react";import{observer as a}from"mobx-react-lite";import"@adyen/adyen-web/dist/adyen.css";import"@ikas/storefront-config";import{useTranslation as t}from"../../../../utils/i18n.js";var r=a((function(a){var r=a.vm;a.isSelected;var o=t().t,s=i.useState(""),c=s[0],l=s[1],d=i.useCallback((function(){if(l(""),r.hepsipayFrameInitResponse)if(r.hepsipayFrameInitResponse.frameUrl)if(window.HepsipaySdk){var i={frameUrl:r.hepsipayFrameInitResponse.frameUrl,frameDivId:"hepsipayFrameContainer",paymentStatusCallback:function(i){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return[2]}))}))},frameFailureCallback:function(){return console.error("Frame failed to load")},onPaymentFailureLogCallback:function(e){r.isStepLoading=!1},onPaymentSuccessCallback:function(i){return e(void 0,void 0,void 0,(function(){return n(this,(function(e){return i&&"hp-payment-success"===i.messageType&&(window.location.href=i.merchantCallBackUrl),[2]}))}))},maxHeight:"600",disableDynamicHeight:!1,showFramePaymentButton:!1,useApiCallOnSuccessCallback:!1,overrideFontFamily:"Inter",hideHeader:!1};window.HepsipaySdk.init(i)}else console.error("HepsipaySdk is not available");else l(o("checkout-page:hepsiPayErrorMessage"))}),[r.hepsipayFrameInitResponse]);return i.useEffect((function(){var i=document.createElement("script");i.src="https://images.hepsiburada.net/hepsipay/packages/pf/hepsipay-0.3.1.min.js",i.async=!0,i.onload=d,i.onerror=function(){return console.error("Failed to load Hepsipay SDK")},document.body.appendChild(i);var a=function(i){return e(void 0,void 0,void 0,(function(){var e;return n(this,(function(n){return i.origin!==window.location.origin||((e=i.data).messageType,e.data),[2]}))}))};return window.addEventListener("message",a),function(){document.body.removeChild(i),window.removeEventListener("message",a)}}),[d]),i.createElement("div",null,i.createElement("div",{id:"hepsipayFrameContainer"}),!!c&&i.createElement("span",{style:{fontSize:14}},c))}));export{r as HepsiPay};
|
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.96",
|
|
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.
|
|
25
|
-
"@ikas/storefront-config": "^6.1.0-beta.
|
|
26
|
-
"@ikas/storefront-model-functions": "^6.1.0-beta.
|
|
27
|
-
"@ikas/storefront-models": "^6.1.0-beta.
|
|
28
|
-
"@ikas/storefront-providers": "^6.1.0-beta.
|
|
24
|
+
"@ikas/storefront-api": "^6.1.0-beta.96",
|
|
25
|
+
"@ikas/storefront-config": "^6.1.0-beta.96",
|
|
26
|
+
"@ikas/storefront-model-functions": "^6.1.0-beta.96",
|
|
27
|
+
"@ikas/storefront-models": "^6.1.0-beta.96",
|
|
28
|
+
"@ikas/storefront-providers": "^6.1.0-beta.96",
|
|
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.
|
|
64
|
-
"@ikas/storefront-config": "^6.1.0-beta.
|
|
65
|
-
"@ikas/storefront-model-functions": "^6.1.0-beta.
|
|
66
|
-
"@ikas/storefront-models": "^6.1.0-beta.
|
|
67
|
-
"@ikas/storefront-providers": "^6.1.0-beta.
|
|
63
|
+
"@ikas/storefront-api": "^6.1.0-beta.96",
|
|
64
|
+
"@ikas/storefront-config": "^6.1.0-beta.96",
|
|
65
|
+
"@ikas/storefront-model-functions": "^6.1.0-beta.96",
|
|
66
|
+
"@ikas/storefront-models": "^6.1.0-beta.96",
|
|
67
|
+
"@ikas/storefront-providers": "^6.1.0-beta.96",
|
|
68
68
|
"mobx": "^6.1.3",
|
|
69
69
|
"mobx-react-lite": "^3.1.5",
|
|
70
70
|
"next": "12.2.0",
|