@everymatrix/user-deposit-withdrawal 1.22.2 → 1.22.10
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/loader.cjs.js +1 -1
- package/dist/cjs/user-deposit-withdrawal.cjs.entry.js +4 -1
- package/dist/cjs/user-deposit-withdrawal.cjs.js +1 -1
- package/dist/collection/components/user-deposit-withdrawal/user-deposit-withdrawal.js +21 -1
- package/dist/components/user-deposit-withdrawal.js +5 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/user-deposit-withdrawal.entry.js +4 -1
- package/dist/esm/user-deposit-withdrawal.js +1 -1
- package/dist/types/components/user-deposit-withdrawal/user-deposit-withdrawal.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/user-deposit-withdrawal/{p-57b2074a.entry.js → p-dad29c54.entry.js} +1 -1
- package/dist/user-deposit-withdrawal/user-deposit-withdrawal.esm.js +1 -1
- package/package.json +1 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -68,7 +68,7 @@ const UserDepositWithdrawal = class {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
handleMessage(message) {
|
|
71
|
-
var _a, _b, _c, _d, _e, _f;
|
|
71
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
72
72
|
if (((_a = message.data) === null || _a === void 0 ? void 0 : _a.type) === 'mm-hcback-to-merchant') {
|
|
73
73
|
this.doRedirect(message.data.type, this.homeUrl);
|
|
74
74
|
}
|
|
@@ -84,6 +84,9 @@ const UserDepositWithdrawal = class {
|
|
|
84
84
|
if (((_f = message.data) === null || _f === void 0 ? void 0 : _f.redirect) === 'mm-hc-contact') {
|
|
85
85
|
this.doRedirect(window.location.href, this.contactUrl);
|
|
86
86
|
}
|
|
87
|
+
if (((_g = message.data) === null || _g === void 0 ? void 0 : _g.redirect) === 'mm-wm-hc-init-deposit') {
|
|
88
|
+
this.doRedirect(window.location.href, this.depositUrl);
|
|
89
|
+
}
|
|
87
90
|
}
|
|
88
91
|
doRedirect(reason, url) {
|
|
89
92
|
const redirectArgs = { reason, url, cancel: false };
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["user-deposit-withdrawal.cjs",[[1,"user-deposit-withdrawal",{"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16]}]]]], options);
|
|
19
19
|
});
|
|
@@ -61,7 +61,7 @@ export class UserDepositWithdrawal {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
handleMessage(message) {
|
|
64
|
-
var _a, _b, _c, _d, _e, _f;
|
|
64
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
65
65
|
if (((_a = message.data) === null || _a === void 0 ? void 0 : _a.type) === 'mm-hcback-to-merchant') {
|
|
66
66
|
this.doRedirect(message.data.type, this.homeUrl);
|
|
67
67
|
}
|
|
@@ -77,6 +77,9 @@ export class UserDepositWithdrawal {
|
|
|
77
77
|
if (((_f = message.data) === null || _f === void 0 ? void 0 : _f.redirect) === 'mm-hc-contact') {
|
|
78
78
|
this.doRedirect(window.location.href, this.contactUrl);
|
|
79
79
|
}
|
|
80
|
+
if (((_g = message.data) === null || _g === void 0 ? void 0 : _g.redirect) === 'mm-wm-hc-init-deposit') {
|
|
81
|
+
this.doRedirect(window.location.href, this.depositUrl);
|
|
82
|
+
}
|
|
80
83
|
}
|
|
81
84
|
doRedirect(reason, url) {
|
|
82
85
|
const redirectArgs = { reason, url, cancel: false };
|
|
@@ -320,6 +323,23 @@ export class UserDepositWithdrawal {
|
|
|
320
323
|
"attribute": "contact-url",
|
|
321
324
|
"reflect": true
|
|
322
325
|
},
|
|
326
|
+
"depositUrl": {
|
|
327
|
+
"type": "string",
|
|
328
|
+
"mutable": false,
|
|
329
|
+
"complexType": {
|
|
330
|
+
"original": "string",
|
|
331
|
+
"resolved": "string",
|
|
332
|
+
"references": {}
|
|
333
|
+
},
|
|
334
|
+
"required": false,
|
|
335
|
+
"optional": false,
|
|
336
|
+
"docs": {
|
|
337
|
+
"tags": [],
|
|
338
|
+
"text": ""
|
|
339
|
+
},
|
|
340
|
+
"attribute": "deposit-url",
|
|
341
|
+
"reflect": true
|
|
342
|
+
},
|
|
323
343
|
"homeUrl": {
|
|
324
344
|
"type": "string",
|
|
325
345
|
"mutable": false,
|
|
@@ -66,7 +66,7 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
handleMessage(message) {
|
|
69
|
-
var _a, _b, _c, _d, _e, _f;
|
|
69
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
70
70
|
if (((_a = message.data) === null || _a === void 0 ? void 0 : _a.type) === 'mm-hcback-to-merchant') {
|
|
71
71
|
this.doRedirect(message.data.type, this.homeUrl);
|
|
72
72
|
}
|
|
@@ -82,6 +82,9 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
82
82
|
if (((_f = message.data) === null || _f === void 0 ? void 0 : _f.redirect) === 'mm-hc-contact') {
|
|
83
83
|
this.doRedirect(window.location.href, this.contactUrl);
|
|
84
84
|
}
|
|
85
|
+
if (((_g = message.data) === null || _g === void 0 ? void 0 : _g.redirect) === 'mm-wm-hc-init-deposit') {
|
|
86
|
+
this.doRedirect(window.location.href, this.depositUrl);
|
|
87
|
+
}
|
|
85
88
|
}
|
|
86
89
|
doRedirect(reason, url) {
|
|
87
90
|
const redirectArgs = { reason, url, cancel: false };
|
|
@@ -114,6 +117,7 @@ const UserDepositWithdrawal$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
114
117
|
"sportsUrl": [513, "sports-url"],
|
|
115
118
|
"casinoUrl": [513, "casino-url"],
|
|
116
119
|
"contactUrl": [513, "contact-url"],
|
|
120
|
+
"depositUrl": [513, "deposit-url"],
|
|
117
121
|
"homeUrl": [513, "home-url"],
|
|
118
122
|
"beforeRedirect": [16]
|
|
119
123
|
}]);
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -64,7 +64,7 @@ const UserDepositWithdrawal = class {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
handleMessage(message) {
|
|
67
|
-
var _a, _b, _c, _d, _e, _f;
|
|
67
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
68
68
|
if (((_a = message.data) === null || _a === void 0 ? void 0 : _a.type) === 'mm-hcback-to-merchant') {
|
|
69
69
|
this.doRedirect(message.data.type, this.homeUrl);
|
|
70
70
|
}
|
|
@@ -80,6 +80,9 @@ const UserDepositWithdrawal = class {
|
|
|
80
80
|
if (((_f = message.data) === null || _f === void 0 ? void 0 : _f.redirect) === 'mm-hc-contact') {
|
|
81
81
|
this.doRedirect(window.location.href, this.contactUrl);
|
|
82
82
|
}
|
|
83
|
+
if (((_g = message.data) === null || _g === void 0 ? void 0 : _g.redirect) === 'mm-wm-hc-init-deposit') {
|
|
84
|
+
this.doRedirect(window.location.href, this.depositUrl);
|
|
85
|
+
}
|
|
83
86
|
}
|
|
84
87
|
doRedirect(reason, url) {
|
|
85
88
|
const redirectArgs = { reason, url, cancel: false };
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["user-deposit-withdrawal",[[1,"user-deposit-withdrawal",{"endpoint":[513],"type":[513],"channel":[513],"language":[513],"productType":[513,"product-type"],"userId":[513,"user-id"],"session":[513],"successUrl":[513,"success-url"],"cancelUrl":[513,"cancel-url"],"failUrl":[513,"fail-url"],"sportsUrl":[513,"sports-url"],"casinoUrl":[513,"casino-url"],"contactUrl":[513,"contact-url"],"depositUrl":[513,"deposit-url"],"homeUrl":[513,"home-url"],"beforeRedirect":[16]}]]]], options);
|
|
17
17
|
});
|
|
@@ -13,6 +13,7 @@ export namespace Components {
|
|
|
13
13
|
"casinoUrl": string;
|
|
14
14
|
"channel": string;
|
|
15
15
|
"contactUrl": string;
|
|
16
|
+
"depositUrl": string;
|
|
16
17
|
"endpoint": string;
|
|
17
18
|
"failUrl": string;
|
|
18
19
|
"homeUrl": string;
|
|
@@ -43,6 +44,7 @@ declare namespace LocalJSX {
|
|
|
43
44
|
"casinoUrl"?: string;
|
|
44
45
|
"channel": string;
|
|
45
46
|
"contactUrl"?: string;
|
|
47
|
+
"depositUrl"?: string;
|
|
46
48
|
"endpoint": string;
|
|
47
49
|
"failUrl"?: string;
|
|
48
50
|
"homeUrl"?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,H as s}from"./p-ed11cb75.js";const o=()=>{},e=class{constructor(i){t(this,i),this.beforeRedirect=o,this.bindedHandler=this.handleMessage.bind(this)}get typeParameter(){return"deposit"===this.type?"Deposit":"withdraw"===this.type?"Withdraw":void 0}watchLoadWidget(){this.loadWidget()}async componentWillLoad(){await this.loadWidget()}componentDidLoad(){window.addEventListener("message",this.bindedHandler,!1)}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}render(){return i(s,null,i("iframe",{width:"100%",height:"100%",src:this.cashierInfoUrl}))}async loadWidget(){const t={Channel:this.channel,Type:this.typeParameter,SuccessUrl:this.successUrl,CancelUrl:this.cancelUrl,FailUrl:this.failUrl,Language:this.language,productType:this.productType};try{const i=`${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`,s=await fetch(i,{method:"POST",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok){const t=await s.text();throw new Error(t)}const o=await s.json();this.cashierInfoUrl=o.CashierInfo.Url}catch(t){console.error(t)}}handleMessage(t){var i,s,o,e,h,a;"mm-hcback-to-merchant"===(null===(i=t.data)||void 0===i?void 0:i.type)&&this.doRedirect(t.data.type,this.homeUrl),"mm-hc-back-tomerchant"===(null===(s=t.data)||void 0===s?void 0:s.redirect)&&this.doRedirect(t.data.redirect,this.homeUrl),"mm-hc-sports"===(null===(o=t.data)||void 0===o?void 0:o.redirect)&&this.doRedirect(null===(e=t.data)||void 0===e?void 0:e.redirect,this.sportsUrl),"mm-hc-casino"===(null===(h=t.data)||void 0===h?void 0:h.redirect)&&this.doRedirect(window.location.href,this.casinoUrl),"mm-hc-contact"===(null===(a=t.data)||void 0===a?void 0:a.redirect)&&this.doRedirect(window.location.href,this.contactUrl)}doRedirect(t,i){const s={reason:t,url:i,cancel:!1};this.beforeRedirect(s),s.cancel||(window.location.href=s.url?s.url:"/")}static get watchers(){return{session:["watchLoadWidget"],userId:["watchLoadWidget"]}}};e.style=":host{display:block;height:100%;overflow:hidden}";export{e as user_deposit_withdrawal}
|
|
1
|
+
import{r as t,h as i,H as s}from"./p-ed11cb75.js";const o=()=>{},e=class{constructor(i){t(this,i),this.beforeRedirect=o,this.bindedHandler=this.handleMessage.bind(this)}get typeParameter(){return"deposit"===this.type?"Deposit":"withdraw"===this.type?"Withdraw":void 0}watchLoadWidget(){this.loadWidget()}async componentWillLoad(){await this.loadWidget()}componentDidLoad(){window.addEventListener("message",this.bindedHandler,!1)}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1)}render(){return i(s,null,i("iframe",{width:"100%",height:"100%",src:this.cashierInfoUrl}))}async loadWidget(){const t={Channel:this.channel,Type:this.typeParameter,SuccessUrl:this.successUrl,CancelUrl:this.cancelUrl,FailUrl:this.failUrl,Language:this.language,productType:this.productType};try{const i=`${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`,s=await fetch(i,{method:"POST",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok){const t=await s.text();throw new Error(t)}const o=await s.json();this.cashierInfoUrl=o.CashierInfo.Url}catch(t){console.error(t)}}handleMessage(t){var i,s,o,e,h,a,n;"mm-hcback-to-merchant"===(null===(i=t.data)||void 0===i?void 0:i.type)&&this.doRedirect(t.data.type,this.homeUrl),"mm-hc-back-tomerchant"===(null===(s=t.data)||void 0===s?void 0:s.redirect)&&this.doRedirect(t.data.redirect,this.homeUrl),"mm-hc-sports"===(null===(o=t.data)||void 0===o?void 0:o.redirect)&&this.doRedirect(null===(e=t.data)||void 0===e?void 0:e.redirect,this.sportsUrl),"mm-hc-casino"===(null===(h=t.data)||void 0===h?void 0:h.redirect)&&this.doRedirect(window.location.href,this.casinoUrl),"mm-hc-contact"===(null===(a=t.data)||void 0===a?void 0:a.redirect)&&this.doRedirect(window.location.href,this.contactUrl),"mm-wm-hc-init-deposit"===(null===(n=t.data)||void 0===n?void 0:n.redirect)&&this.doRedirect(window.location.href,this.depositUrl)}doRedirect(t,i){const s={reason:t,url:i,cancel:!1};this.beforeRedirect(s),s.cancel||(window.location.href=s.url?s.url:"/")}static get watchers(){return{session:["watchLoadWidget"],userId:["watchLoadWidget"]}}};e.style=":host{display:block;height:100%;overflow:hidden}";export{e as user_deposit_withdrawal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as r,b as e}from"./p-ed11cb75.js";(()=>{const e=import.meta.url,s={};return""!==e&&(s.resourcesUrl=new URL(".",e).href),r(s)})().then((r=>e([["p-
|
|
1
|
+
import{p as r,b as e}from"./p-ed11cb75.js";(()=>{const e=import.meta.url,s={};return""!==e&&(s.resourcesUrl=new URL(".",e).href),r(s)})().then((r=>e([["p-dad29c54",[[1,"user-deposit-withdrawal",{endpoint:[513],type:[513],channel:[513],language:[513],productType:[513,"product-type"],userId:[513,"user-id"],session:[513],successUrl:[513,"success-url"],cancelUrl:[513,"cancel-url"],failUrl:[513,"fail-url"],sportsUrl:[513,"sports-url"],casinoUrl:[513,"casino-url"],contactUrl:[513,"contact-url"],depositUrl:[513,"deposit-url"],homeUrl:[513,"home-url"],beforeRedirect:[16]}]]]],r)));
|